@arcgis/coding-components 4.29.0-beta.99 → 4.29.0

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 (164) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +111 -111
  3. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +113 -113
  4. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +111 -111
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +111 -111
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +111 -111
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +111 -111
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +111 -111
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +111 -111
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +19 -19
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +111 -111
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +111 -111
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +111 -111
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +111 -111
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +111 -111
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +111 -111
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +111 -111
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +111 -111
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +111 -111
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +111 -111
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +111 -111
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +111 -111
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +111 -111
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +111 -111
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +66 -66
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +66 -66
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +111 -111
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +111 -111
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +66 -66
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +111 -111
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +111 -111
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +111 -111
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +111 -111
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +111 -111
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +111 -111
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +111 -111
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +111 -111
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +111 -111
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +66 -66
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +66 -66
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +66 -66
  42. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +4 -4
  43. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +4 -4
  44. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +4 -4
  45. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +4 -4
  46. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +4 -4
  47. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +3 -3
  48. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +3 -3
  49. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +4 -4
  50. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.en.json +3 -3
  51. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +4 -4
  52. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +3 -3
  53. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +4 -4
  54. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +4 -4
  55. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +4 -4
  56. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +4 -4
  57. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +4 -4
  58. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +4 -4
  59. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +4 -4
  60. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +4 -4
  61. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +4 -4
  62. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +4 -4
  63. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +4 -4
  64. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nb.json +4 -4
  65. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +4 -4
  66. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +4 -4
  67. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +4 -4
  68. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +4 -4
  69. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +4 -4
  70. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +3 -3
  71. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +4 -4
  72. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +4 -4
  73. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +4 -4
  74. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +4 -4
  75. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +4 -4
  76. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +4 -4
  77. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +4 -4
  78. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +4 -4
  79. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +4 -4
  80. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +4 -4
  81. package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +4 -4
  82. package/dist/arcgis-coding-components/index.esm.js +2 -2
  83. package/dist/arcgis-coding-components/{p-e1cb02b3.js → p-0a2edf01.js} +2 -2
  84. package/dist/arcgis-coding-components/p-11e79992.js +6 -0
  85. package/dist/arcgis-coding-components/{p-f75beb80.js → p-36e2cbc2.js} +3 -3
  86. package/dist/arcgis-coding-components/{p-457e3916.js → p-4406b5a8.js} +2 -2
  87. package/dist/arcgis-coding-components/{p-87d7ad9e.js → p-4eb30e60.js} +1 -1
  88. package/dist/arcgis-coding-components/{p-7f9d3fdc.js → p-619ca372.js} +1 -1
  89. package/dist/arcgis-coding-components/{p-7e0e8ecc.js → p-71125c69.js} +2 -2
  90. package/dist/arcgis-coding-components/{p-0bab0228.js → p-8d7f0979.js} +2 -2
  91. package/dist/arcgis-coding-components/p-9b8091c1.entry.js +6 -0
  92. package/dist/arcgis-coding-components/{p-ad86a5f5.js → p-bd81fdff.js} +11 -11
  93. package/dist/arcgis-coding-components/{p-f23f7fee.js → p-ecc8dd8a.js} +2 -2
  94. package/dist/arcgis-coding-components/{p-4648782b.js → p-f9016c56.js} +2 -2
  95. package/dist/cjs/{arcade-defaults-5dd9ebb7.js → arcade-defaults-b30ccec8.js} +271 -236
  96. package/dist/cjs/{arcade-mode-0b4c53a1.js → arcade-mode-eb755260.js} +11 -14
  97. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +160 -184
  98. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  99. package/dist/cjs/{css-fe7f8980.js → css-9e907aa0.js} +1 -1
  100. package/dist/cjs/{cssMode-4c9b3a32.js → cssMode-e4189b13.js} +3 -3
  101. package/dist/cjs/{html-b044fbba.js → html-2582ae43.js} +3 -3
  102. package/dist/cjs/{htmlMode-956a6ffa.js → htmlMode-0edcf1ee.js} +3 -3
  103. package/dist/cjs/{index-aaceaf1f.js → index-54d6f9be.js} +1 -1
  104. package/dist/cjs/index.cjs.js +3 -3
  105. package/dist/cjs/{javascript-6c55ac8b.js → javascript-425c653a.js} +4 -4
  106. package/dist/cjs/{jsonMode-d83e322c.js → jsonMode-eea03515.js} +3 -3
  107. package/dist/cjs/loader.cjs.js +3 -3
  108. package/dist/cjs/{tsMode-5c5ffa3e.js → tsMode-b92c9221.js} +3 -3
  109. package/dist/cjs/{typescript-6143656a.js → typescript-cfc1221c.js} +3 -3
  110. package/dist/components/arcade-api.js +20 -18
  111. package/dist/components/arcade-contribution.js +9 -8
  112. package/dist/components/arcade-defaults.js +188 -168
  113. package/dist/components/arcade-mode.js +10 -12
  114. package/dist/components/arcade-results.js +29 -83
  115. package/dist/components/arcade-suggestions.js +15 -12
  116. package/dist/components/arcade-variables.js +30 -21
  117. package/dist/components/arcgis-arcade-api.js +1 -1
  118. package/dist/components/arcgis-arcade-editor.js +61 -49
  119. package/dist/components/arcgis-arcade-results.js +1 -1
  120. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  121. package/dist/components/arcgis-arcade-variables.js +1 -1
  122. package/dist/components/arcgis-code-editor.js +1 -1
  123. package/dist/components/code-editor.js +1 -1
  124. package/dist/components/fields.js +37 -23
  125. package/dist/components/index.js +1 -1
  126. package/dist/components/index2.js +3 -3
  127. package/dist/components/markdown.js +10 -1
  128. package/dist/components/utilities.js +4 -4
  129. package/dist/esm/{arcade-defaults-2d7283d4.js → arcade-defaults-a5dc6132.js} +267 -233
  130. package/dist/esm/{arcade-mode-a8abe5af.js → arcade-mode-d06b6e4f.js} +11 -14
  131. package/dist/esm/arcgis-arcade-api_6.entry.js +160 -184
  132. package/dist/esm/arcgis-coding-components.js +4 -4
  133. package/dist/esm/{css-d31a02ca.js → css-59b4804d.js} +1 -1
  134. package/dist/esm/{cssMode-5ee45e91.js → cssMode-2bce7da7.js} +3 -3
  135. package/dist/esm/{html-5c2e488c.js → html-3ad47fc0.js} +3 -3
  136. package/dist/esm/{htmlMode-376cd5e8.js → htmlMode-6cb73c91.js} +3 -3
  137. package/dist/esm/{index-1b265749.js → index-ee54d182.js} +1 -1
  138. package/dist/esm/index.js +3 -3
  139. package/dist/esm/{javascript-13ddec2b.js → javascript-8917f926.js} +4 -4
  140. package/dist/esm/{jsonMode-674e89d6.js → jsonMode-9a1dbf00.js} +3 -3
  141. package/dist/esm/loader.js +4 -4
  142. package/dist/esm/{tsMode-4c4398d7.js → tsMode-2caf1509.js} +3 -3
  143. package/dist/esm/{typescript-b328b622.js → typescript-a3abccc0.js} +3 -3
  144. package/dist/loader/cdn.js +1 -1
  145. package/dist/loader/index.cjs.js +1 -1
  146. package/dist/loader/index.es2017.js +1 -1
  147. package/dist/loader/index.js +1 -1
  148. package/dist/types/components/arcade-editor/arcade-editor.d.ts +2 -7
  149. package/dist/types/components/arcade-variables/arcade-variables.d.ts +0 -1
  150. package/dist/types/components.d.ts +2 -7
  151. package/dist/types/utils/arcade-monaco/arcade-contribution.d.ts +2 -2
  152. package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +1 -0
  153. package/dist/types/utils/constants.d.ts +2 -2
  154. package/dist/types/utils/fields.d.ts +1 -0
  155. package/dist/types/utils/markdown.d.ts +3 -0
  156. package/dist/types/utils/profile/editor-profile.d.ts +49 -63
  157. package/dist/types/utils/profile/types.d.ts +122 -1
  158. package/dist/types/utils/profile/utils.d.ts +22 -9
  159. package/package.json +8 -8
  160. package/dist/arcgis-coding-components/p-6d56a4b8.entry.js +0 -6
  161. package/dist/arcgis-coding-components/p-a75f5087.js +0 -6
  162. package/dist/components/functional-components.js +0 -15
  163. package/dist/types/utils/functional-components.d.ts +0 -7
  164. package/dist/types/utils/json-format.d.ts +0 -1
@@ -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.29/esri/copyright.txt for details.
4
- * v4.29.0-beta.99
4
+ * v4.29.0
5
5
  */
6
6
  'use strict';
7
7
 
8
- const index = require('./index-aaceaf1f.js');
8
+ const index = require('./index-54d6f9be.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-fe7f8980.js'); });
120547
+ return Promise.resolve().then(function () { return require('./css-9e907aa0.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-b044fbba.js'); });
120565
+ return Promise.resolve().then(function () { return require('./html-2582ae43.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-6c55ac8b.js'); });
120585
+ return Promise.resolve().then(function () { return require('./javascript-425c653a.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-6143656a.js'); });
120603
+ return Promise.resolve().then(function () { return require('./typescript-cfc1221c.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-4c9b3a32.js'); });
120724
+ return Promise.resolve().then(function () { return require('./cssMode-e4189b13.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-956a6ffa.js'); });
120849
+ return Promise.resolve().then(function () { return require('./htmlMode-0edcf1ee.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-d83e322c.js'); });
120951
+ return Promise.resolve().then(function () { return require('./jsonMode-eea03515.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-5c5ffa3e.js'); });
121220
+ return Promise.resolve().then(function () { return require('./tsMode-b92c9221.js'); });
121221
121221
  }
121222
121222
  }
121223
121223
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -168947,72 +168947,78 @@ var main = createCommonjsModule(function (module, exports) {
168947
168947
  });
168948
168948
  });
168949
168949
 
168950
- const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
168951
- function requireModule(modulePath) {
168952
- return new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168950
+ const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
168951
+ function isDefaultModule(module) {
168952
+ return module.default !== undefined;
168953
+ }
168954
+ async function requireModule(modulePath) {
168955
+ return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168953
168956
  resolve(moduleDefault);
168954
168957
  }));
168955
168958
  }
168956
168959
  async function importLayersFeatureLayer() {
168957
- if (amd) {
168958
- return requireModule("esri/layers/FeatureLayer");
168960
+ if (isAMD) {
168961
+ return await requireModule("esri/layers/FeatureLayer");
168959
168962
  }
168960
168963
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/layers/FeatureLayer.js')); });
168961
- return module.default;
168964
+ return isDefaultModule(module) ? module.default : module;
168962
168965
  }
168963
168966
  async function importPortalPortalItem() {
168964
- if (amd) {
168965
- return requireModule("esri/portal/PortalItem");
168967
+ if (isAMD) {
168968
+ return await requireModule("esri/portal/PortalItem");
168966
168969
  }
168967
168970
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/portal/PortalItem.js')); });
168968
- return module.default;
168971
+ return isDefaultModule(module) ? module.default : module;
168972
+ }
168973
+ async function newPortalPortalItem(properties) {
168974
+ const ModConstructor = await importPortalPortalItem();
168975
+ return new ModConstructor(properties);
168969
168976
  }
168970
168977
  async function importWebMap() {
168971
- if (amd) {
168972
- return requireModule("esri/WebMap");
168978
+ if (isAMD) {
168979
+ return await requireModule("esri/WebMap");
168973
168980
  }
168974
168981
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebMap.js')); });
168975
- return module.default;
168982
+ return isDefaultModule(module) ? module.default : module;
168983
+ }
168984
+ async function newWebMap(properties) {
168985
+ const ModConstructor = await importWebMap();
168986
+ return new ModConstructor(properties);
168976
168987
  }
168977
168988
  async function importWebScene() {
168978
- if (amd) {
168979
- return requireModule("esri/WebScene");
168989
+ if (isAMD) {
168990
+ return await requireModule("esri/WebScene");
168980
168991
  }
168981
168992
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebScene.js')); });
168982
- return module.default;
168993
+ return isDefaultModule(module) ? module.default : module;
168983
168994
  }
168984
168995
  async function newWebScene(properties) {
168985
168996
  const ModConstructor = await importWebScene();
168986
168997
  return new ModConstructor(properties);
168987
168998
  }
168988
168999
  async function importArcade() {
168989
- if (amd) {
168990
- return requireModule("esri/arcade");
169000
+ if (isAMD) {
169001
+ return await requireModule("esri/arcade");
168991
169002
  }
168992
169003
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/arcade.js')); });
168993
- return module;
169004
+ return isDefaultModule(module) ? module.default : module;
168994
169005
  }
168995
169006
  async function importRequest() {
168996
- if (amd) {
168997
- return requireModule("esri/request");
169007
+ if (isAMD) {
169008
+ return await requireModule("esri/request");
168998
169009
  }
168999
169010
  const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/request.js')); });
169000
- return module.default;
169011
+ return isDefaultModule(module) ? module.default : module;
169001
169012
  }
169002
169013
 
169003
- async function newPortalItem(definition) {
169004
- const PortalItem = await importPortalPortalItem();
169005
- return new PortalItem(definition);
169006
- }
169014
+ //#region core adapter fix
169007
169015
  async function newFeatureLayer(definition) {
169008
169016
  const FeatureLayer = await importLayersFeatureLayer();
169009
169017
  // Fix title for the layer. Instead of defaulting to the map viewer style.
169010
169018
  return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
169011
169019
  }
169012
- async function newWebMap(definition) {
169013
- const WebMap = await importWebMap();
169014
- return new WebMap(definition);
169015
- }
169020
+ //#endregion
169021
+ //#region Type Guards
169016
169022
  function isSupportedLayerInstance(item) {
169017
169023
  return (!!item &&
169018
169024
  typeof item === "object" &&
@@ -169097,8 +169103,88 @@ function isPredefinedProfile(item) {
169097
169103
  typeof item.definitions === "object" &&
169098
169104
  !Array.isArray(item.definitions));
169099
169105
  }
169106
+ function isTitleCapableSource(item) {
169107
+ return !!item && typeof item === "object" && "title" in item && typeof item.title === "string";
169108
+ }
169109
+ function isUrlCapableSource(item) {
169110
+ return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169111
+ }
169112
+ function isLayerIdCapableSource(item) {
169113
+ return !!item && typeof item === "object" && "layerId" in item && typeof item.layerId === "number";
169114
+ }
169115
+ function isFeatureTypesCapableLayer(item) {
169116
+ return !!item && typeof item === "object" && "typeIdField" in item && "types" in item;
169117
+ }
169118
+ function isDomainsCapableLayer(item) {
169119
+ return !!item && typeof item === "object" && "getFieldDomain" in item && typeof item.getFieldDomain === "function";
169120
+ }
169121
+ function isSubtypeFieldCapableLayer(item) {
169122
+ return !!item && typeof item === "object" && "subtypeField" in item;
169123
+ }
169124
+ function isSubtypesCapableLayer(item) {
169125
+ return isSubtypeFieldCapableLayer(item) && "subtypes" in item;
169126
+ }
169127
+ function isRelationshipsCapableLayer(item) {
169128
+ return (isLayerIdCapableSource(item) &&
169129
+ "relationships" in item &&
169130
+ "url" in item &&
169131
+ Array.isArray(item.relationships) &&
169132
+ typeof item.url === "string");
169133
+ }
169134
+ function isTableCapableLayer(item) {
169135
+ return !!item && typeof item === "object" && "isTable" in item && typeof item.isTable === "boolean";
169136
+ }
169137
+ function isLoadableSource(item) {
169138
+ return !!item && typeof item === "object" && "load" in item && typeof item.load === "function";
169139
+ }
169140
+ //#endregion
169141
+ //#region Service Metadata
169142
+ async function supportedSourceFromDefinition(definition) {
169143
+ if (!definition) {
169144
+ return null;
169145
+ }
169146
+ let source = null;
169147
+ if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169148
+ source = definition;
169149
+ }
169150
+ else {
169151
+ source = await newFeatureLayer(definition);
169152
+ }
169153
+ if (isLoadableSource(source)) {
169154
+ await source.load();
169155
+ }
169156
+ return source;
169157
+ }
169158
+ async function serviceMetaData(url) {
169159
+ url += "/layers";
169160
+ const request = await importRequest();
169161
+ const response = await request(url, { responseType: "json", query: { f: "json" } });
169162
+ const data = {
169163
+ layers: response.data?.layers ?? [],
169164
+ tables: response.data?.tables ?? []
169165
+ };
169166
+ const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169167
+ const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169168
+ const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169169
+ return { layers, tables };
169170
+ }
169171
+ function filterFeatureLayerInfos(layers, queryCapability) {
169172
+ return layers.filter((layer) => {
169173
+ if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169174
+ return false;
169175
+ }
169176
+ const capabilities = layer.capabilities
169177
+ ? layer.capabilities
169178
+ .toLowerCase()
169179
+ .split(",")
169180
+ .map((value) => value.trim())
169181
+ : [];
169182
+ return capabilities.includes(queryCapability);
169183
+ });
169184
+ }
169185
+ //#endregion
169100
169186
 
169101
- var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return setTimeout(()=>e?.setFocus(),0),!0;for(let r=0;r<e.children.length;r++)if(d(e.children[r],t))return !0;let n=e.shadowRoot;if(n){for(let r=0;r<n.children.length;r++)if(d(n.children[r],t))return !0}return !1}function F(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function N(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await N("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function R(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n);})),await b(e,n);}function H(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=R(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await N(r,l,u);}e._t9nLocale=r,e._t9nStrings=o,await t?.call(e);}var v='"',w="'";function L(e,t){return new Array(t+1).join(e)}function Q(e){let t=v,n=w;e.includes(t)&&!e.includes(n)&&(n=v,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function D(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function K(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function Z(e){return `\u200E${e??""}\u200E`}function Y(e){return e!==null}function ee(e){return e!==void 0}function oe(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function se(e){try{return new URL(e),!0}catch{return !1}}
169187
+ var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
169102
169188
 
169103
169189
  /**
169104
169190
  * Filters a collection of items by the given keys and filter word.
@@ -169111,7 +169197,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169111
169197
  if (!_keys.length) {
169112
169198
  return [];
169113
169199
  }
169114
- const filterExpression = D(filterWord);
169200
+ const filterExpression = K(filterWord);
169115
169201
  return collection.filter((item) => {
169116
169202
  if (beforeFilteringFn) {
169117
169203
  const res = beforeFilteringFn(item);
@@ -169119,7 +169205,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169119
169205
  return res;
169120
169206
  }
169121
169207
  }
169122
- return _keys.some((key) => filterExpression.test(`${item[key] ?? ""}`));
169208
+ return _keys.some((key) => filterExpression.test(String(item[key] ?? "")));
169123
169209
  });
169124
169210
  }
169125
169211
  /**
@@ -169214,43 +169300,12 @@ function supportedFields(fields) {
169214
169300
  }
169215
169301
  });
169216
169302
  }
169217
-
169218
- function isTitleCapableSource(item) {
169219
- return !!item && typeof item === "object" && "title" in item && typeof item.title === "string";
169220
- }
169221
- function isUrlCapableSource(item) {
169222
- return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169223
- }
169224
- function isLayerIdCapableSource(item) {
169225
- return !!item && typeof item === "object" && "layerId" in item && typeof item.layerId === "number";
169226
- }
169227
- function isFeatureTypesCapableLayer(item) {
169228
- return !!item && typeof item === "object" && "typeIdField" in item && "types" in item;
169229
- }
169230
- function isDomainsCapableLayer(item) {
169231
- return !!item && typeof item === "object" && "getFieldDomain" in item && typeof item.getFieldDomain === "function";
169232
- }
169233
- function isSubtypeFieldCapableLayer(item) {
169234
- return !!item && typeof item === "object" && "subtypeField" in item;
169235
- }
169236
- function isSubtypesCapableLayer(item) {
169237
- return isSubtypeFieldCapableLayer(item) && "subtypes" in item;
169238
- }
169239
- function isRelationshipsCapableLayer(item) {
169240
- return (isLayerIdCapableSource(item) &&
169241
- "relationships" in item &&
169242
- "url" in item &&
169243
- Array.isArray(item.relationships) &&
169244
- typeof item.url === "string");
169245
- }
169246
- function isTableCapableLayer(item) {
169247
- return !!item && typeof item === "object" && "isTable" in item && typeof item.isTable === "boolean";
169248
- }
169249
- function isLoadableSource(item) {
169250
- return !!item && typeof item === "object" && "load" in item && typeof item.load === "function";
169303
+ function fieldAlias(field) {
169304
+ return field.alias || field.name;
169251
169305
  }
169306
+
169252
169307
  //#endregion
169253
- //#region Support Functions
169308
+ //#region Support functions
169254
169309
  async function getRelatedFeatureLayer(layer, relationship) {
169255
169310
  const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169256
169311
  await relatedFeatureLayer.load();
@@ -169291,66 +169346,8 @@ function sortFields(layer) {
169291
169346
  return firstField.name.localeCompare(secondField.name, "en", { sensitivity: "base" });
169292
169347
  };
169293
169348
  }
169294
- function getTypeOrSubtypeDomainGroup(profile, types, field) {
169295
- // Try the coded domain first
169296
- if (isCodedValueDomainInstance(field.domain)) {
169297
- return getCodedValueDomainGroup(profile, field.domain, { code: "subtypes" });
169298
- }
169299
- // No coded domain, we will manufacture it
169300
- const values = types?.map((t) => {
169301
- const label = isSubtypeInstance(t) ? t.code : t.id;
169302
- return new ValueVariable({ profile, label: `${label}`, description: t.name, snippet: `"${label}"` });
169303
- }) ?? [];
169304
- return new GroupOfVariables(profile, { code: "subtypes" }, values);
169305
- }
169306
- function getCodedValueDomainGroup(profile, domain, label) {
169307
- const values = domain.codedValues.map((v) => new ValueVariable({
169308
- profile,
169309
- label: `${v.code}`,
169310
- description: v.name,
169311
- snippet: `"${v.code}"`,
169312
- filterDescription: true
169313
- }));
169314
- return new GroupOfVariables(profile, label, values);
169315
- }
169316
- function getDomainValuesGroup(profile, types, field) {
169317
- const variables = [];
169318
- if (!types || types.length === 0) {
169319
- return null;
169320
- }
169321
- types.forEach((type) => {
169322
- let domain = type.domains[field.name];
169323
- if (!domain) {
169324
- return;
169325
- }
169326
- if (isInheritedDomainInstance(domain)) {
169327
- domain = field.domain;
169328
- return;
169329
- }
169330
- if (!isCodedValueDomainInstance(domain)) {
169331
- return;
169332
- }
169333
- const domainValuesGroup = getCodedValueDomainGroup(profile, domain, {
169334
- code: "domainvaluesfortypeformat",
169335
- formatValues: {
169336
- fieldName: field.alias ?? field.name,
169337
- typeName: type.name
169338
- }
169339
- });
169340
- const id = isSubtypeInstance(type) ? type.code : type.id;
169341
- const label = `${id}`;
169342
- const snippet = `"${id}""`;
169343
- const subtypeDictionary = new DictionaryVariable({ profile, label, snippet });
169344
- subtypeDictionary.variables = [domainValuesGroup];
169345
- variables.push(subtypeDictionary);
169346
- });
169347
- if (!variables.length) {
169348
- return null;
169349
- }
169350
- return new GroupOfVariables(profile, { code: "domainvaluesbysubtypes" }, variables);
169351
- }
169352
169349
  function areAllDomainsInherited(types, field) {
169353
- return types?.every((type) => type.domains[field.name]?.type === "inherited") ?? false;
169350
+ return types?.every((type) => type.domains?.[field.name]?.type === "inherited") ?? false;
169354
169351
  }
169355
169352
  // const validIdentifierExpr = new RegExp(/^[a-z_$][\w$]*$/gi);
169356
169353
  const validIdentifierExpr = /^[a-z_$][a-z0-9_$]*$/giu;
@@ -169367,52 +169364,7 @@ function assembleMemberExpression(obj, prop) {
169367
169364
  return `${obj}${getMemberExpressionProperty(prop)}`;
169368
169365
  }
169369
169366
  //#endregion
169370
- //#region Sources
169371
- async function supportedSourceFromDefinition(definition) {
169372
- if (!definition) {
169373
- return null;
169374
- }
169375
- let source = null;
169376
- if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169377
- source = definition;
169378
- }
169379
- else {
169380
- source = await newFeatureLayer(definition);
169381
- }
169382
- if (isLoadableSource(source)) {
169383
- await source.load();
169384
- }
169385
- return source;
169386
- }
169387
- async function serviceMetaData(url) {
169388
- url += "/layers";
169389
- const request = await importRequest();
169390
- const response = await request(url, { responseType: "json", query: { f: "json" } });
169391
- const data = {
169392
- layers: response.data?.layers ?? [],
169393
- tables: response.data?.tables ?? []
169394
- };
169395
- const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169396
- const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169397
- const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169398
- return { layers, tables };
169399
- }
169400
- function filterFeatureLayerInfos(layers, queryCapability) {
169401
- return layers.filter((layer) => {
169402
- if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169403
- return false;
169404
- }
169405
- const capabilities = layer.capabilities
169406
- ? layer.capabilities
169407
- .toLowerCase()
169408
- .split(",")
169409
- .map((value) => value.trim())
169410
- : [];
169411
- return capabilities.includes(queryCapability);
169412
- });
169413
- }
169414
- //#endregion
169415
- //#region Functions to Editor Variables to a language service variables
169367
+ //#region Editor Profile to Language Service Profile functions
169416
169368
  async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
169417
169369
  return await Promise.all(editorVariables.map(async (editorVariable) => {
169418
169370
  switch (editorVariable.type) {
@@ -169480,20 +169432,21 @@ async function featureToLSFeature(editorFeature, kind) {
169480
169432
  if (featureCompletionDescription) {
169481
169433
  featureCompletionDescription += " \n \n";
169482
169434
  }
169483
- featureCompletionDescription += `**${field.name}** (${field.alias ?? field.name}) \n${field.type}`;
169435
+ featureCompletionDescription += `**${field.name}** (${fieldAlias(field)}) \n${field.type}`;
169484
169436
  if (field.description) {
169485
169437
  featureCompletionDescription += ` \n'${field.description}`;
169486
169438
  }
169487
169439
  // The property for the field
169488
169440
  const type = fieldTypeToArcadeType(field);
169489
169441
  const insertText = getMemberExpressionProperty(field.name, false);
169442
+ const description = fieldAlias(field);
169490
169443
  fieldProfileValues.push({
169491
169444
  name: field.name,
169492
- description: field.alias || field.name,
169445
+ description,
169493
169446
  type,
169494
169447
  completion: {
169495
169448
  label: field.name,
169496
- detail: field.alias || field.name,
169449
+ detail: description,
169497
169450
  insertText,
169498
169451
  insertTextMode: main.InsertTextMode.asIs,
169499
169452
  insertTextFormat: main.InsertTextFormat.PlainText,
@@ -169582,9 +169535,9 @@ class ProfileItemBase {
169582
169535
  // If the component is under RTL, the string is messed up.
169583
169536
  // It is converted from $feature to feature$, This is not acceptable since the label
169584
169537
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
169585
- return Z(this._label);
169538
+ return G(this._label);
169586
169539
  }
169587
- return K(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169540
+ return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169588
169541
  }
169589
169542
  /**
169590
169543
  * Returns the description string.
@@ -169596,7 +169549,7 @@ class ProfileItemBase {
169596
169549
  if (typeof this.description === "string") {
169597
169550
  return this.description;
169598
169551
  }
169599
- return K(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169552
+ return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169600
169553
  }
169601
169554
  /**
169602
169555
  * Returns true if the item pass the filter test
@@ -169673,8 +169626,9 @@ class ArrayVariable extends VariableBase {
169673
169626
  * collection is ready or not.
169674
169627
  */
169675
169628
  class CollectionBasedVariable extends VariableBase {
169676
- constructor() {
169677
- super(...arguments);
169629
+ constructor(owner, props) {
169630
+ super(props);
169631
+ this.owner = owner;
169678
169632
  this.isCollection = true;
169679
169633
  this._loaded = true;
169680
169634
  /**
@@ -169684,19 +169638,21 @@ class CollectionBasedVariable extends VariableBase {
169684
169638
  */
169685
169639
  this.variables = [];
169686
169640
  }
169641
+ get breadcrumb() {
169642
+ // If there's an owner, prepend its breadcrumb and append the current name
169643
+ if (this.owner) {
169644
+ const ownerBreadcrumb = this.owner.breadcrumb;
169645
+ return ownerBreadcrumb ? `${ownerBreadcrumb} / ${this.name}` : this.name;
169646
+ }
169647
+ // If there's no owner, this is the root element, so just return its name
169648
+ return this.name;
169649
+ }
169687
169650
  /**
169688
169651
  * Returns true if the collection has been loaded
169689
169652
  */
169690
169653
  get loaded() {
169691
169654
  return this._loaded;
169692
169655
  }
169693
- /**
169694
- * Loads the items if the collection is asynchronous.
169695
- * If the colleciton is synchronous then the function is a no-op.
169696
- */
169697
- async loadSource() {
169698
- return;
169699
- }
169700
169656
  /**
169701
169657
  * Returns an url to the associated information
169702
169658
  */
@@ -169719,8 +169675,8 @@ class GroupOfVariables extends ProfileItemBase {
169719
169675
  }
169720
169676
  }
169721
169677
  class DictionaryVariable extends CollectionBasedVariable {
169722
- constructor(props) {
169723
- super(props);
169678
+ constructor(owner, props) {
169679
+ super(owner, props);
169724
169680
  this.type = "dictionary";
169725
169681
  /**
169726
169682
  * The variables that the dictionary holds. It is different than the variables.
@@ -169734,6 +169690,9 @@ class DictionaryVariable extends CollectionBasedVariable {
169734
169690
  this.variables = [new GroupOfVariables(this._profile, this.snippet, this.dictionaryVariables)];
169735
169691
  }
169736
169692
  }
169693
+ async loadSource() {
169694
+ // No-op
169695
+ }
169737
169696
  loadPropertyDeclarations(declarations) {
169738
169697
  this.dictionaryVariables = this.createVariableInstances(declarations);
169739
169698
  this.variables = this.dictionaryVariables;
@@ -169758,23 +169717,26 @@ class DictionaryVariable extends CollectionBasedVariable {
169758
169717
  case "text":
169759
169718
  case "boolean":
169760
169719
  case "date":
169720
+ case "dateOnly":
169721
+ case "time":
169761
169722
  case "geometry":
169723
+ case "knowledgeGraph":
169762
169724
  return new ValueVariable({ profile: this._profile, declaration, label: snippet, snippet });
169763
169725
  case "feature":
169764
- return new FeatureVariable({ profile: this._profile, declaration, label: snippet, snippet });
169726
+ return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
169765
169727
  case "featureSet":
169766
- return new FeatureSetVariable({ profile: this._profile, declaration, label: snippet, snippet }, [
169728
+ return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
169767
169729
  new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
169768
169730
  ]);
169769
169731
  case "featureSetCollection":
169770
- return new FeatureSetCollectionVariable({
169732
+ return new FeatureSetCollectionVariable(this, {
169771
169733
  profile: this._profile,
169772
169734
  declaration,
169773
169735
  label: snippet,
169774
169736
  snippet
169775
169737
  });
169776
169738
  case "dictionary":
169777
- return new DictionaryVariable({
169739
+ return new DictionaryVariable(this, {
169778
169740
  profile: this._profile,
169779
169741
  declaration,
169780
169742
  label: snippet,
@@ -169788,7 +169750,7 @@ class DictionaryVariable extends CollectionBasedVariable {
169788
169750
  snippet
169789
169751
  });
169790
169752
  default:
169791
- console.error("Invalid profile variable", declaration);
169753
+ console.error("Editor profile: Invalid profile variable", declaration);
169792
169754
  return null;
169793
169755
  }
169794
169756
  }
@@ -169802,8 +169764,8 @@ class DictionaryVariable extends CollectionBasedVariable {
169802
169764
  }
169803
169765
  }
169804
169766
  class SourceBasedVariable extends CollectionBasedVariable {
169805
- constructor(props, relationshipsProperties) {
169806
- super(props);
169767
+ constructor(owner, props, relationshipsProperties) {
169768
+ super(owner, props);
169807
169769
  this.relationshipsProperties = relationshipsProperties;
169808
169770
  this._source = null;
169809
169771
  this._loaded = false;
@@ -169828,7 +169790,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169828
169790
  return this._profile?.intlStrings.layer ?? "layer";
169829
169791
  }
169830
169792
  async loadSource() {
169831
- if (Y(this._loadPromise) && ee(this._loadPromise)) {
169793
+ if (ee(this._loadPromise) && te(this._loadPromise)) {
169832
169794
  return await this._loadPromise;
169833
169795
  }
169834
169796
  this._loadPromise = this._loadSource();
@@ -169860,7 +169822,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169860
169822
  return new ValueVariable({
169861
169823
  profile: this._profile,
169862
169824
  label: valueSnippet,
169863
- description: field.alias ?? field.name,
169825
+ description: fieldAlias(field),
169864
169826
  snippet: valueSnippet,
169865
169827
  icon: fieldTypeToIconName(field),
169866
169828
  filterDescription: true
@@ -169902,7 +169864,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169902
169864
  // Sepcial case for the subtype field
169903
169865
  if (field.name === this._source.subtypeField) {
169904
169866
  const domainDictionary = this._createDomainDictionary(field);
169905
- domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._source.subtypes, field));
169867
+ domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
169906
169868
  return domainDictionary;
169907
169869
  }
169908
169870
  // Check if all the domains for the field in the types are inherited.
@@ -169912,7 +169874,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169912
169874
  }
169913
169875
  // We have domains per subtype
169914
169876
  // We need to go thru each types and create a dictionary.
169915
- const domainValuesBySubtypeGroup = getDomainValuesGroup(this._profile, this._source.subtypes, field);
169877
+ const domainValuesBySubtypeGroup = this._getDomainValuesGroup(this._source.subtypes, field);
169916
169878
  if (!domainValuesBySubtypeGroup) {
169917
169879
  return null;
169918
169880
  }
@@ -169928,7 +169890,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169928
169890
  // Special case for the type id field
169929
169891
  if (field.name === this._source.typeIdField) {
169930
169892
  const domainDictionary = this._createDomainDictionary(field);
169931
- domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._source.types, field));
169893
+ domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types, field));
169932
169894
  return domainDictionary;
169933
169895
  }
169934
169896
  // Check if all the domains for the field in the types are inherited.
@@ -169938,7 +169900,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169938
169900
  }
169939
169901
  // We have domains per feature type
169940
169902
  // We need to go thru each types and create a dictionary.
169941
- const domainValuesByFeatureTypeGroup = getDomainValuesGroup(this._profile, this._source.types, field);
169903
+ const domainValuesByFeatureTypeGroup = this._getDomainValuesGroup(this._source.types, field);
169942
169904
  if (!domainValuesByFeatureTypeGroup) {
169943
169905
  return null;
169944
169906
  }
@@ -169955,27 +169917,99 @@ class SourceBasedVariable extends CollectionBasedVariable {
169955
169917
  if (!isCodedValueDomainInstance(fieldDomain)) {
169956
169918
  return null;
169957
169919
  }
169958
- const domainValuesGroup = getCodedValueDomainGroup(this._profile, fieldDomain, {
169920
+ const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
169959
169921
  code: "domainvalues"
169960
169922
  });
169961
169923
  const domainDictionary = this._createDomainDictionary(field);
169962
169924
  domainDictionary.variables.push(domainValuesGroup);
169963
169925
  return domainDictionary;
169964
169926
  }
169927
+ _getTypeOrSubtypeDomainGroup(types, field) {
169928
+ // Try the coded domain first
169929
+ if (isCodedValueDomainInstance(field.domain)) {
169930
+ return this._getCodedValueDomainGroup(field.domain, { code: "subtypes" });
169931
+ }
169932
+ // No coded domain, we will manufacture it
169933
+ const values = types?.map((t) => {
169934
+ const label = isSubtypeInstance(t) ? t.code : t.id;
169935
+ return new ValueVariable({
169936
+ profile: this._profile,
169937
+ label: `${label}`,
169938
+ description: t.name,
169939
+ snippet: `"${label}"`
169940
+ });
169941
+ }) ?? [];
169942
+ return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
169943
+ }
169944
+ _getCodedValueDomainGroup(domain, label) {
169945
+ const values = domain.codedValues.map((v) => new ValueVariable({
169946
+ profile: this._profile,
169947
+ label: `${v.code}`,
169948
+ description: v.name,
169949
+ snippet: `"${v.code}"`,
169950
+ filterDescription: true
169951
+ }));
169952
+ return new GroupOfVariables(this._profile, label, values);
169953
+ }
169954
+ _getDomainValuesGroup(types, field) {
169955
+ const variables = [];
169956
+ if (!types || types.length === 0) {
169957
+ return null;
169958
+ }
169959
+ types.forEach((type) => {
169960
+ let domain = type.domains?.[field.name];
169961
+ if (!domain) {
169962
+ return;
169963
+ }
169964
+ if (isInheritedDomainInstance(domain)) {
169965
+ domain = field.domain;
169966
+ return;
169967
+ }
169968
+ if (!isCodedValueDomainInstance(domain)) {
169969
+ return;
169970
+ }
169971
+ const alias = fieldAlias(field);
169972
+ const domainValuesGroup = this._getCodedValueDomainGroup(domain, {
169973
+ code: "domainvaluesfortypeformat",
169974
+ formatValues: {
169975
+ fieldName: alias,
169976
+ typeName: type.name
169977
+ }
169978
+ });
169979
+ const id = isSubtypeInstance(type) ? type.code : type.id;
169980
+ const label = `${id}`;
169981
+ const snippet = `"${id}""`;
169982
+ const subtypeDictionary = new DictionaryVariable(this, {
169983
+ profile: this._profile,
169984
+ label,
169985
+ snippet,
169986
+ description: type.name,
169987
+ declaration: { name: alias }
169988
+ });
169989
+ subtypeDictionary.variables = [domainValuesGroup];
169990
+ variables.push(subtypeDictionary);
169991
+ });
169992
+ if (!variables.length) {
169993
+ return null;
169994
+ }
169995
+ return new GroupOfVariables(this._profile, { code: "domainvaluesbysubtypes" }, variables);
169996
+ }
169965
169997
  _createDomainDictionary(field) {
169966
169998
  // Create the domain dictionary.
169967
169999
  // The dictionary will have a header group and a value group.
169968
170000
  // At this point we are only creating the header group in the dictionary.
169969
170001
  const valueSnippet = this._getValueSnippet(field);
169970
- const domainDictionary = new DictionaryVariable({
170002
+ const alias = fieldAlias(field);
170003
+ const domainDictionary = new DictionaryVariable(this, {
169971
170004
  profile: this._profile,
169972
170005
  label: valueSnippet,
169973
- description: field.alias ?? field.name,
170006
+ description: alias,
169974
170007
  snippet: valueSnippet,
169975
- icon: "form-dropdown"
170008
+ icon: "form-dropdown",
170009
+ declaration: { name: field.name }
169976
170010
  });
169977
170011
  // Add the header group
169978
- const headerGroup = new GroupOfVariables(this._profile, field.alias ?? field.name, [
170012
+ const headerGroup = new GroupOfVariables(this._profile, alias, [
169979
170013
  new ValueVariable({
169980
170014
  profile: this._profile,
169981
170015
  label: valueSnippet,
@@ -170016,7 +170050,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170016
170050
  return null;
170017
170051
  }
170018
170052
  const snippet = `FeatureSetByRelationshipName(${this.snippet}, "${relationship.name}")`;
170019
- return new FeatureSetVariable({
170053
+ return new FeatureSetVariable(this, {
170020
170054
  profile: this._profile,
170021
170055
  declaration: { definition: relatedLayer },
170022
170056
  label: relatedLayer.title,
@@ -170024,7 +170058,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170024
170058
  nonInteractive: true
170025
170059
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
170026
170060
  }));
170027
- relationshipsGroup.variables = relationshipItems.filter(Y);
170061
+ relationshipsGroup.variables = relationshipItems.filter(ee);
170028
170062
  if (!relationshipsGroup.variables.length) {
170029
170063
  return null;
170030
170064
  }
@@ -170032,8 +170066,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
170032
170066
  }
170033
170067
  }
170034
170068
  class FeatureVariable extends SourceBasedVariable {
170035
- constructor(props) {
170036
- super(props, { exposeRelationships: true });
170069
+ constructor(owner, props) {
170070
+ super(owner, props, { exposeRelationships: true });
170037
170071
  this.type = "feature";
170038
170072
  }
170039
170073
  get title() {
@@ -170101,11 +170135,11 @@ class FeatureVariable extends SourceBasedVariable {
170101
170135
  }
170102
170136
  }
170103
170137
  class FeatureSetVariable extends SourceBasedVariable {
170104
- constructor(props, featureSetSnippets = [],
170138
+ constructor(owner, props, featureSetSnippets = [],
170105
170139
  // Relationships for feature set if only supported if the feature set is actually
170106
170140
  // representing a relationsip feature layer for a feature source.
170107
170141
  relationshipProps) {
170108
- super(props, relationshipProps);
170142
+ super(owner, props, relationshipProps);
170109
170143
  this.featureSetSnippets = featureSetSnippets;
170110
170144
  this.type = "featureSet";
170111
170145
  }
@@ -170152,8 +170186,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170152
170186
  }
170153
170187
  }
170154
170188
  class FeatureSetCollectionVariable extends CollectionBasedVariable {
170155
- constructor(props) {
170156
- super(props);
170189
+ constructor(owner, props) {
170190
+ super(owner, props);
170157
170191
  this.type = "featureSetCollection";
170158
170192
  this._featureSetCollections = null;
170159
170193
  this._loaded = false;
@@ -170182,7 +170216,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170182
170216
  return this._profile?.intlStrings.featureservice ?? "featureservice";
170183
170217
  }
170184
170218
  async loadSource() {
170185
- if (Y(this._loadPromise) && ee(this._loadPromise)) {
170219
+ if (ee(this._loadPromise) && te(this._loadPromise)) {
170186
170220
  return await this._loadPromise;
170187
170221
  }
170188
170222
  this._loadPromise = this._loadSource();
@@ -170203,7 +170237,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170203
170237
  : {
170204
170238
  code: "webmapformat",
170205
170239
  formatValues: {
170206
- webMapTitle: this._featureSetCollections.source.portalItem.title || "Untitled map"
170240
+ webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
170207
170241
  }
170208
170242
  };
170209
170243
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
@@ -170261,7 +170295,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170261
170295
  };
170262
170296
  }
170263
170297
  async _featureSetCollectionFromPortalItem(definition) {
170264
- const portalItem = await newPortalItem(definition);
170298
+ const portalItem = await newPortalPortalItem(definition);
170265
170299
  await portalItem.load();
170266
170300
  switch (portalItem.type) {
170267
170301
  case "Web Map": {
@@ -170320,9 +170354,9 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170320
170354
  return layerVariables;
170321
170355
  }
170322
170356
  _createFeatureSetVariable(featureLayer, isFromWebMap = false) {
170323
- return new FeatureSetVariable({
170357
+ return new FeatureSetVariable(this, {
170324
170358
  profile: this._profile,
170325
- declaration: { definition: featureLayer },
170359
+ declaration: { name: featureLayer.title, definition: featureLayer },
170326
170360
  label: featureLayer.title,
170327
170361
  description: "",
170328
170362
  nonInteractive: true
@@ -170360,7 +170394,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170360
170394
  class EditorProfile extends DictionaryVariable {
170361
170395
  constructor(definition, intlStrings, locale = "en") {
170362
170396
  // Delay the load of the variable declarations so we have a `this`
170363
- super({
170397
+ super(undefined, {
170364
170398
  profile: null,
170365
170399
  declaration: { properties: [] }
170366
170400
  });
@@ -170598,7 +170632,7 @@ class ArcadeLanguageServiceDefaults {
170598
170632
  if (isPredefinedProfile(definition)) {
170599
170633
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
170600
170634
  }
170601
- const intlStrings = await N(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170635
+ const intlStrings = await v(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170602
170636
  if (!intlStrings) {
170603
170637
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
170604
170638
  }
@@ -170683,17 +170717,16 @@ const arcade = {
170683
170717
  exports.B = B;
170684
170718
  exports.D = D;
170685
170719
  exports.Emitter = Emitter;
170686
- exports.F = F;
170687
- exports.H = H;
170720
+ exports.G = G;
170688
170721
  exports.IStandaloneThemeService = IStandaloneThemeService;
170689
170722
  exports.K = K;
170690
170723
  exports.KeyCode = KeyCode;
170691
170724
  exports.KeyMod = KeyMod;
170692
170725
  exports.MarkerSeverity = MarkerSeverity;
170693
- exports.Q = Q;
170694
170726
  exports.Range = Range;
170695
170727
  exports.U = U;
170696
170728
  exports.Uri = Uri;
170729
+ exports.W = W;
170697
170730
  exports.Z = Z;
170698
170731
  exports.arcade = arcade;
170699
170732
  exports.arcadeDefaults = arcadeDefaults;
@@ -170703,13 +170736,15 @@ exports.editor = editor;
170703
170736
  exports.filterCollection = filterCollection;
170704
170737
  exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
170705
170738
  exports.h = h;
170739
+ exports.ie = ie;
170706
170740
  exports.importArcade = importArcade;
170707
170741
  exports.importRequest = importRequest;
170708
170742
  exports.k = k;
170709
170743
  exports.languages = languages;
170710
170744
  exports.main = main;
170711
170745
  exports.monaco_editor_core_star = monaco_editor_core_star;
170712
- exports.oe = oe;
170746
+ exports.q = q;
170747
+ exports.re = re;
170713
170748
  exports.se = se;
170714
170749
  exports.supportedFields = supportedFields;
170715
170750
  exports.typescriptDefaults = typescriptDefaults;