@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,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.29/esri/copyright.txt for details.
4
- * v4.29.0-beta.99
4
+ * v4.29.0
5
5
  */
6
- import { g as getAssetPath } from './index-1b265749.js';
6
+ import { g as getAssetPath } from './index-ee54d182.js';
7
7
 
8
8
  /**
9
9
  * Returns the last element of an array.
@@ -120522,7 +120522,7 @@ registerLanguage({
120522
120522
  mimetypes: ["text/css"],
120523
120523
  loader: () => {
120524
120524
  {
120525
- return import('./css-d31a02ca.js');
120525
+ return import('./css-59b4804d.js');
120526
120526
  }
120527
120527
  }
120528
120528
  });
@@ -120540,7 +120540,7 @@ registerLanguage({
120540
120540
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
120541
120541
  loader: () => {
120542
120542
  {
120543
- return import('./html-5c2e488c.js');
120543
+ return import('./html-3ad47fc0.js');
120544
120544
  }
120545
120545
  }
120546
120546
  });
@@ -120560,7 +120560,7 @@ registerLanguage({
120560
120560
  mimetypes: ["text/javascript"],
120561
120561
  loader: () => {
120562
120562
  {
120563
- return import('./javascript-13ddec2b.js');
120563
+ return import('./javascript-8917f926.js');
120564
120564
  }
120565
120565
  }
120566
120566
  });
@@ -120578,7 +120578,7 @@ registerLanguage({
120578
120578
  mimetypes: ["text/typescript"],
120579
120579
  loader: () => {
120580
120580
  {
120581
- return import('./typescript-b328b622.js');
120581
+ return import('./typescript-a3abccc0.js');
120582
120582
  }
120583
120583
  }
120584
120584
  });
@@ -120699,7 +120699,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
120699
120699
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
120700
120700
  function getMode$3() {
120701
120701
  {
120702
- return import('./cssMode-5ee45e91.js');
120702
+ return import('./cssMode-2bce7da7.js');
120703
120703
  }
120704
120704
  }
120705
120705
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -120824,7 +120824,7 @@ monaco_editor_core_exports$2.languages.html = {
120824
120824
  };
120825
120825
  function getMode$2() {
120826
120826
  {
120827
- return import('./htmlMode-376cd5e8.js');
120827
+ return import('./htmlMode-6cb73c91.js');
120828
120828
  }
120829
120829
  }
120830
120830
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -120926,7 +120926,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
120926
120926
  monaco_editor_core_exports$1.languages.json = { jsonDefaults };
120927
120927
  function getMode$1() {
120928
120928
  {
120929
- return import('./jsonMode-674e89d6.js');
120929
+ return import('./jsonMode-9a1dbf00.js');
120930
120930
  }
120931
120931
  }
120932
120932
  monaco_editor_core_exports$1.languages.register({
@@ -121195,7 +121195,7 @@ monaco_editor_core_exports.languages.typescript = {
121195
121195
  };
121196
121196
  function getMode() {
121197
121197
  {
121198
- return import('./tsMode-4c4398d7.js');
121198
+ return import('./tsMode-2caf1509.js');
121199
121199
  }
121200
121200
  }
121201
121201
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -168925,72 +168925,78 @@ var main = createCommonjsModule(function (module, exports) {
168925
168925
  });
168926
168926
  });
168927
168927
 
168928
- const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
168929
- function requireModule(modulePath) {
168930
- return new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168928
+ const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
168929
+ function isDefaultModule(module) {
168930
+ return module.default !== undefined;
168931
+ }
168932
+ async function requireModule(modulePath) {
168933
+ return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168931
168934
  resolve(moduleDefault);
168932
168935
  }));
168933
168936
  }
168934
168937
  async function importLayersFeatureLayer() {
168935
- if (amd) {
168936
- return requireModule("esri/layers/FeatureLayer");
168938
+ if (isAMD) {
168939
+ return await requireModule("esri/layers/FeatureLayer");
168937
168940
  }
168938
168941
  const module = await import('@arcgis/core/layers/FeatureLayer.js');
168939
- return module.default;
168942
+ return isDefaultModule(module) ? module.default : module;
168940
168943
  }
168941
168944
  async function importPortalPortalItem() {
168942
- if (amd) {
168943
- return requireModule("esri/portal/PortalItem");
168945
+ if (isAMD) {
168946
+ return await requireModule("esri/portal/PortalItem");
168944
168947
  }
168945
168948
  const module = await import('@arcgis/core/portal/PortalItem.js');
168946
- return module.default;
168949
+ return isDefaultModule(module) ? module.default : module;
168950
+ }
168951
+ async function newPortalPortalItem(properties) {
168952
+ const ModConstructor = await importPortalPortalItem();
168953
+ return new ModConstructor(properties);
168947
168954
  }
168948
168955
  async function importWebMap() {
168949
- if (amd) {
168950
- return requireModule("esri/WebMap");
168956
+ if (isAMD) {
168957
+ return await requireModule("esri/WebMap");
168951
168958
  }
168952
168959
  const module = await import('@arcgis/core/WebMap.js');
168953
- return module.default;
168960
+ return isDefaultModule(module) ? module.default : module;
168961
+ }
168962
+ async function newWebMap(properties) {
168963
+ const ModConstructor = await importWebMap();
168964
+ return new ModConstructor(properties);
168954
168965
  }
168955
168966
  async function importWebScene() {
168956
- if (amd) {
168957
- return requireModule("esri/WebScene");
168967
+ if (isAMD) {
168968
+ return await requireModule("esri/WebScene");
168958
168969
  }
168959
168970
  const module = await import('@arcgis/core/WebScene.js');
168960
- return module.default;
168971
+ return isDefaultModule(module) ? module.default : module;
168961
168972
  }
168962
168973
  async function newWebScene(properties) {
168963
168974
  const ModConstructor = await importWebScene();
168964
168975
  return new ModConstructor(properties);
168965
168976
  }
168966
168977
  async function importArcade() {
168967
- if (amd) {
168968
- return requireModule("esri/arcade");
168978
+ if (isAMD) {
168979
+ return await requireModule("esri/arcade");
168969
168980
  }
168970
168981
  const module = await import('@arcgis/core/arcade.js');
168971
- return module;
168982
+ return isDefaultModule(module) ? module.default : module;
168972
168983
  }
168973
168984
  async function importRequest() {
168974
- if (amd) {
168975
- return requireModule("esri/request");
168985
+ if (isAMD) {
168986
+ return await requireModule("esri/request");
168976
168987
  }
168977
168988
  const module = await import('@arcgis/core/request.js');
168978
- return module.default;
168989
+ return isDefaultModule(module) ? module.default : module;
168979
168990
  }
168980
168991
 
168981
- async function newPortalItem(definition) {
168982
- const PortalItem = await importPortalPortalItem();
168983
- return new PortalItem(definition);
168984
- }
168992
+ //#region core adapter fix
168985
168993
  async function newFeatureLayer(definition) {
168986
168994
  const FeatureLayer = await importLayersFeatureLayer();
168987
168995
  // Fix title for the layer. Instead of defaulting to the map viewer style.
168988
168996
  return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
168989
168997
  }
168990
- async function newWebMap(definition) {
168991
- const WebMap = await importWebMap();
168992
- return new WebMap(definition);
168993
- }
168998
+ //#endregion
168999
+ //#region Type Guards
168994
169000
  function isSupportedLayerInstance(item) {
168995
169001
  return (!!item &&
168996
169002
  typeof item === "object" &&
@@ -169075,8 +169081,88 @@ function isPredefinedProfile(item) {
169075
169081
  typeof item.definitions === "object" &&
169076
169082
  !Array.isArray(item.definitions));
169077
169083
  }
169084
+ function isTitleCapableSource(item) {
169085
+ return !!item && typeof item === "object" && "title" in item && typeof item.title === "string";
169086
+ }
169087
+ function isUrlCapableSource(item) {
169088
+ return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169089
+ }
169090
+ function isLayerIdCapableSource(item) {
169091
+ return !!item && typeof item === "object" && "layerId" in item && typeof item.layerId === "number";
169092
+ }
169093
+ function isFeatureTypesCapableLayer(item) {
169094
+ return !!item && typeof item === "object" && "typeIdField" in item && "types" in item;
169095
+ }
169096
+ function isDomainsCapableLayer(item) {
169097
+ return !!item && typeof item === "object" && "getFieldDomain" in item && typeof item.getFieldDomain === "function";
169098
+ }
169099
+ function isSubtypeFieldCapableLayer(item) {
169100
+ return !!item && typeof item === "object" && "subtypeField" in item;
169101
+ }
169102
+ function isSubtypesCapableLayer(item) {
169103
+ return isSubtypeFieldCapableLayer(item) && "subtypes" in item;
169104
+ }
169105
+ function isRelationshipsCapableLayer(item) {
169106
+ return (isLayerIdCapableSource(item) &&
169107
+ "relationships" in item &&
169108
+ "url" in item &&
169109
+ Array.isArray(item.relationships) &&
169110
+ typeof item.url === "string");
169111
+ }
169112
+ function isTableCapableLayer(item) {
169113
+ return !!item && typeof item === "object" && "isTable" in item && typeof item.isTable === "boolean";
169114
+ }
169115
+ function isLoadableSource(item) {
169116
+ return !!item && typeof item === "object" && "load" in item && typeof item.load === "function";
169117
+ }
169118
+ //#endregion
169119
+ //#region Service Metadata
169120
+ async function supportedSourceFromDefinition(definition) {
169121
+ if (!definition) {
169122
+ return null;
169123
+ }
169124
+ let source = null;
169125
+ if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169126
+ source = definition;
169127
+ }
169128
+ else {
169129
+ source = await newFeatureLayer(definition);
169130
+ }
169131
+ if (isLoadableSource(source)) {
169132
+ await source.load();
169133
+ }
169134
+ return source;
169135
+ }
169136
+ async function serviceMetaData(url) {
169137
+ url += "/layers";
169138
+ const request = await importRequest();
169139
+ const response = await request(url, { responseType: "json", query: { f: "json" } });
169140
+ const data = {
169141
+ layers: response.data?.layers ?? [],
169142
+ tables: response.data?.tables ?? []
169143
+ };
169144
+ const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169145
+ const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169146
+ const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169147
+ return { layers, tables };
169148
+ }
169149
+ function filterFeatureLayerInfos(layers, queryCapability) {
169150
+ return layers.filter((layer) => {
169151
+ if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169152
+ return false;
169153
+ }
169154
+ const capabilities = layer.capabilities
169155
+ ? layer.capabilities
169156
+ .toLowerCase()
169157
+ .split(",")
169158
+ .map((value) => value.trim())
169159
+ : [];
169160
+ return capabilities.includes(queryCapability);
169161
+ });
169162
+ }
169163
+ //#endregion
169078
169164
 
169079
- 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}}
169165
+ 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}}
169080
169166
 
169081
169167
  /**
169082
169168
  * Filters a collection of items by the given keys and filter word.
@@ -169089,7 +169175,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169089
169175
  if (!_keys.length) {
169090
169176
  return [];
169091
169177
  }
169092
- const filterExpression = D(filterWord);
169178
+ const filterExpression = K(filterWord);
169093
169179
  return collection.filter((item) => {
169094
169180
  if (beforeFilteringFn) {
169095
169181
  const res = beforeFilteringFn(item);
@@ -169097,7 +169183,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169097
169183
  return res;
169098
169184
  }
169099
169185
  }
169100
- return _keys.some((key) => filterExpression.test(`${item[key] ?? ""}`));
169186
+ return _keys.some((key) => filterExpression.test(String(item[key] ?? "")));
169101
169187
  });
169102
169188
  }
169103
169189
  /**
@@ -169192,43 +169278,12 @@ function supportedFields(fields) {
169192
169278
  }
169193
169279
  });
169194
169280
  }
169195
-
169196
- function isTitleCapableSource(item) {
169197
- return !!item && typeof item === "object" && "title" in item && typeof item.title === "string";
169198
- }
169199
- function isUrlCapableSource(item) {
169200
- return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169201
- }
169202
- function isLayerIdCapableSource(item) {
169203
- return !!item && typeof item === "object" && "layerId" in item && typeof item.layerId === "number";
169204
- }
169205
- function isFeatureTypesCapableLayer(item) {
169206
- return !!item && typeof item === "object" && "typeIdField" in item && "types" in item;
169207
- }
169208
- function isDomainsCapableLayer(item) {
169209
- return !!item && typeof item === "object" && "getFieldDomain" in item && typeof item.getFieldDomain === "function";
169210
- }
169211
- function isSubtypeFieldCapableLayer(item) {
169212
- return !!item && typeof item === "object" && "subtypeField" in item;
169213
- }
169214
- function isSubtypesCapableLayer(item) {
169215
- return isSubtypeFieldCapableLayer(item) && "subtypes" in item;
169216
- }
169217
- function isRelationshipsCapableLayer(item) {
169218
- return (isLayerIdCapableSource(item) &&
169219
- "relationships" in item &&
169220
- "url" in item &&
169221
- Array.isArray(item.relationships) &&
169222
- typeof item.url === "string");
169223
- }
169224
- function isTableCapableLayer(item) {
169225
- return !!item && typeof item === "object" && "isTable" in item && typeof item.isTable === "boolean";
169226
- }
169227
- function isLoadableSource(item) {
169228
- return !!item && typeof item === "object" && "load" in item && typeof item.load === "function";
169281
+ function fieldAlias(field) {
169282
+ return field.alias || field.name;
169229
169283
  }
169284
+
169230
169285
  //#endregion
169231
- //#region Support Functions
169286
+ //#region Support functions
169232
169287
  async function getRelatedFeatureLayer(layer, relationship) {
169233
169288
  const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169234
169289
  await relatedFeatureLayer.load();
@@ -169269,66 +169324,8 @@ function sortFields(layer) {
169269
169324
  return firstField.name.localeCompare(secondField.name, "en", { sensitivity: "base" });
169270
169325
  };
169271
169326
  }
169272
- function getTypeOrSubtypeDomainGroup(profile, types, field) {
169273
- // Try the coded domain first
169274
- if (isCodedValueDomainInstance(field.domain)) {
169275
- return getCodedValueDomainGroup(profile, field.domain, { code: "subtypes" });
169276
- }
169277
- // No coded domain, we will manufacture it
169278
- const values = types?.map((t) => {
169279
- const label = isSubtypeInstance(t) ? t.code : t.id;
169280
- return new ValueVariable({ profile, label: `${label}`, description: t.name, snippet: `"${label}"` });
169281
- }) ?? [];
169282
- return new GroupOfVariables(profile, { code: "subtypes" }, values);
169283
- }
169284
- function getCodedValueDomainGroup(profile, domain, label) {
169285
- const values = domain.codedValues.map((v) => new ValueVariable({
169286
- profile,
169287
- label: `${v.code}`,
169288
- description: v.name,
169289
- snippet: `"${v.code}"`,
169290
- filterDescription: true
169291
- }));
169292
- return new GroupOfVariables(profile, label, values);
169293
- }
169294
- function getDomainValuesGroup(profile, types, field) {
169295
- const variables = [];
169296
- if (!types || types.length === 0) {
169297
- return null;
169298
- }
169299
- types.forEach((type) => {
169300
- let domain = type.domains[field.name];
169301
- if (!domain) {
169302
- return;
169303
- }
169304
- if (isInheritedDomainInstance(domain)) {
169305
- domain = field.domain;
169306
- return;
169307
- }
169308
- if (!isCodedValueDomainInstance(domain)) {
169309
- return;
169310
- }
169311
- const domainValuesGroup = getCodedValueDomainGroup(profile, domain, {
169312
- code: "domainvaluesfortypeformat",
169313
- formatValues: {
169314
- fieldName: field.alias ?? field.name,
169315
- typeName: type.name
169316
- }
169317
- });
169318
- const id = isSubtypeInstance(type) ? type.code : type.id;
169319
- const label = `${id}`;
169320
- const snippet = `"${id}""`;
169321
- const subtypeDictionary = new DictionaryVariable({ profile, label, snippet });
169322
- subtypeDictionary.variables = [domainValuesGroup];
169323
- variables.push(subtypeDictionary);
169324
- });
169325
- if (!variables.length) {
169326
- return null;
169327
- }
169328
- return new GroupOfVariables(profile, { code: "domainvaluesbysubtypes" }, variables);
169329
- }
169330
169327
  function areAllDomainsInherited(types, field) {
169331
- return types?.every((type) => type.domains[field.name]?.type === "inherited") ?? false;
169328
+ return types?.every((type) => type.domains?.[field.name]?.type === "inherited") ?? false;
169332
169329
  }
169333
169330
  // const validIdentifierExpr = new RegExp(/^[a-z_$][\w$]*$/gi);
169334
169331
  const validIdentifierExpr = /^[a-z_$][a-z0-9_$]*$/giu;
@@ -169345,52 +169342,7 @@ function assembleMemberExpression(obj, prop) {
169345
169342
  return `${obj}${getMemberExpressionProperty(prop)}`;
169346
169343
  }
169347
169344
  //#endregion
169348
- //#region Sources
169349
- async function supportedSourceFromDefinition(definition) {
169350
- if (!definition) {
169351
- return null;
169352
- }
169353
- let source = null;
169354
- if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169355
- source = definition;
169356
- }
169357
- else {
169358
- source = await newFeatureLayer(definition);
169359
- }
169360
- if (isLoadableSource(source)) {
169361
- await source.load();
169362
- }
169363
- return source;
169364
- }
169365
- async function serviceMetaData(url) {
169366
- url += "/layers";
169367
- const request = await importRequest();
169368
- const response = await request(url, { responseType: "json", query: { f: "json" } });
169369
- const data = {
169370
- layers: response.data?.layers ?? [],
169371
- tables: response.data?.tables ?? []
169372
- };
169373
- const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169374
- const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169375
- const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169376
- return { layers, tables };
169377
- }
169378
- function filterFeatureLayerInfos(layers, queryCapability) {
169379
- return layers.filter((layer) => {
169380
- if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169381
- return false;
169382
- }
169383
- const capabilities = layer.capabilities
169384
- ? layer.capabilities
169385
- .toLowerCase()
169386
- .split(",")
169387
- .map((value) => value.trim())
169388
- : [];
169389
- return capabilities.includes(queryCapability);
169390
- });
169391
- }
169392
- //#endregion
169393
- //#region Functions to Editor Variables to a language service variables
169345
+ //#region Editor Profile to Language Service Profile functions
169394
169346
  async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
169395
169347
  return await Promise.all(editorVariables.map(async (editorVariable) => {
169396
169348
  switch (editorVariable.type) {
@@ -169458,20 +169410,21 @@ async function featureToLSFeature(editorFeature, kind) {
169458
169410
  if (featureCompletionDescription) {
169459
169411
  featureCompletionDescription += " \n \n";
169460
169412
  }
169461
- featureCompletionDescription += `**${field.name}** (${field.alias ?? field.name}) \n${field.type}`;
169413
+ featureCompletionDescription += `**${field.name}** (${fieldAlias(field)}) \n${field.type}`;
169462
169414
  if (field.description) {
169463
169415
  featureCompletionDescription += ` \n'${field.description}`;
169464
169416
  }
169465
169417
  // The property for the field
169466
169418
  const type = fieldTypeToArcadeType(field);
169467
169419
  const insertText = getMemberExpressionProperty(field.name, false);
169420
+ const description = fieldAlias(field);
169468
169421
  fieldProfileValues.push({
169469
169422
  name: field.name,
169470
- description: field.alias || field.name,
169423
+ description,
169471
169424
  type,
169472
169425
  completion: {
169473
169426
  label: field.name,
169474
- detail: field.alias || field.name,
169427
+ detail: description,
169475
169428
  insertText,
169476
169429
  insertTextMode: main.InsertTextMode.asIs,
169477
169430
  insertTextFormat: main.InsertTextFormat.PlainText,
@@ -169560,9 +169513,9 @@ class ProfileItemBase {
169560
169513
  // If the component is under RTL, the string is messed up.
169561
169514
  // It is converted from $feature to feature$, This is not acceptable since the label
169562
169515
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
169563
- return Z(this._label);
169516
+ return G(this._label);
169564
169517
  }
169565
- return K(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169518
+ return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169566
169519
  }
169567
169520
  /**
169568
169521
  * Returns the description string.
@@ -169574,7 +169527,7 @@ class ProfileItemBase {
169574
169527
  if (typeof this.description === "string") {
169575
169528
  return this.description;
169576
169529
  }
169577
- return K(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169530
+ return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169578
169531
  }
169579
169532
  /**
169580
169533
  * Returns true if the item pass the filter test
@@ -169651,8 +169604,9 @@ class ArrayVariable extends VariableBase {
169651
169604
  * collection is ready or not.
169652
169605
  */
169653
169606
  class CollectionBasedVariable extends VariableBase {
169654
- constructor() {
169655
- super(...arguments);
169607
+ constructor(owner, props) {
169608
+ super(props);
169609
+ this.owner = owner;
169656
169610
  this.isCollection = true;
169657
169611
  this._loaded = true;
169658
169612
  /**
@@ -169662,19 +169616,21 @@ class CollectionBasedVariable extends VariableBase {
169662
169616
  */
169663
169617
  this.variables = [];
169664
169618
  }
169619
+ get breadcrumb() {
169620
+ // If there's an owner, prepend its breadcrumb and append the current name
169621
+ if (this.owner) {
169622
+ const ownerBreadcrumb = this.owner.breadcrumb;
169623
+ return ownerBreadcrumb ? `${ownerBreadcrumb} / ${this.name}` : this.name;
169624
+ }
169625
+ // If there's no owner, this is the root element, so just return its name
169626
+ return this.name;
169627
+ }
169665
169628
  /**
169666
169629
  * Returns true if the collection has been loaded
169667
169630
  */
169668
169631
  get loaded() {
169669
169632
  return this._loaded;
169670
169633
  }
169671
- /**
169672
- * Loads the items if the collection is asynchronous.
169673
- * If the colleciton is synchronous then the function is a no-op.
169674
- */
169675
- async loadSource() {
169676
- return;
169677
- }
169678
169634
  /**
169679
169635
  * Returns an url to the associated information
169680
169636
  */
@@ -169697,8 +169653,8 @@ class GroupOfVariables extends ProfileItemBase {
169697
169653
  }
169698
169654
  }
169699
169655
  class DictionaryVariable extends CollectionBasedVariable {
169700
- constructor(props) {
169701
- super(props);
169656
+ constructor(owner, props) {
169657
+ super(owner, props);
169702
169658
  this.type = "dictionary";
169703
169659
  /**
169704
169660
  * The variables that the dictionary holds. It is different than the variables.
@@ -169712,6 +169668,9 @@ class DictionaryVariable extends CollectionBasedVariable {
169712
169668
  this.variables = [new GroupOfVariables(this._profile, this.snippet, this.dictionaryVariables)];
169713
169669
  }
169714
169670
  }
169671
+ async loadSource() {
169672
+ // No-op
169673
+ }
169715
169674
  loadPropertyDeclarations(declarations) {
169716
169675
  this.dictionaryVariables = this.createVariableInstances(declarations);
169717
169676
  this.variables = this.dictionaryVariables;
@@ -169736,23 +169695,26 @@ class DictionaryVariable extends CollectionBasedVariable {
169736
169695
  case "text":
169737
169696
  case "boolean":
169738
169697
  case "date":
169698
+ case "dateOnly":
169699
+ case "time":
169739
169700
  case "geometry":
169701
+ case "knowledgeGraph":
169740
169702
  return new ValueVariable({ profile: this._profile, declaration, label: snippet, snippet });
169741
169703
  case "feature":
169742
- return new FeatureVariable({ profile: this._profile, declaration, label: snippet, snippet });
169704
+ return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
169743
169705
  case "featureSet":
169744
- return new FeatureSetVariable({ profile: this._profile, declaration, label: snippet, snippet }, [
169706
+ return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
169745
169707
  new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
169746
169708
  ]);
169747
169709
  case "featureSetCollection":
169748
- return new FeatureSetCollectionVariable({
169710
+ return new FeatureSetCollectionVariable(this, {
169749
169711
  profile: this._profile,
169750
169712
  declaration,
169751
169713
  label: snippet,
169752
169714
  snippet
169753
169715
  });
169754
169716
  case "dictionary":
169755
- return new DictionaryVariable({
169717
+ return new DictionaryVariable(this, {
169756
169718
  profile: this._profile,
169757
169719
  declaration,
169758
169720
  label: snippet,
@@ -169766,7 +169728,7 @@ class DictionaryVariable extends CollectionBasedVariable {
169766
169728
  snippet
169767
169729
  });
169768
169730
  default:
169769
- console.error("Invalid profile variable", declaration);
169731
+ console.error("Editor profile: Invalid profile variable", declaration);
169770
169732
  return null;
169771
169733
  }
169772
169734
  }
@@ -169780,8 +169742,8 @@ class DictionaryVariable extends CollectionBasedVariable {
169780
169742
  }
169781
169743
  }
169782
169744
  class SourceBasedVariable extends CollectionBasedVariable {
169783
- constructor(props, relationshipsProperties) {
169784
- super(props);
169745
+ constructor(owner, props, relationshipsProperties) {
169746
+ super(owner, props);
169785
169747
  this.relationshipsProperties = relationshipsProperties;
169786
169748
  this._source = null;
169787
169749
  this._loaded = false;
@@ -169806,7 +169768,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169806
169768
  return this._profile?.intlStrings.layer ?? "layer";
169807
169769
  }
169808
169770
  async loadSource() {
169809
- if (Y(this._loadPromise) && ee(this._loadPromise)) {
169771
+ if (ee(this._loadPromise) && te(this._loadPromise)) {
169810
169772
  return await this._loadPromise;
169811
169773
  }
169812
169774
  this._loadPromise = this._loadSource();
@@ -169838,7 +169800,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169838
169800
  return new ValueVariable({
169839
169801
  profile: this._profile,
169840
169802
  label: valueSnippet,
169841
- description: field.alias ?? field.name,
169803
+ description: fieldAlias(field),
169842
169804
  snippet: valueSnippet,
169843
169805
  icon: fieldTypeToIconName(field),
169844
169806
  filterDescription: true
@@ -169880,7 +169842,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169880
169842
  // Sepcial case for the subtype field
169881
169843
  if (field.name === this._source.subtypeField) {
169882
169844
  const domainDictionary = this._createDomainDictionary(field);
169883
- domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._source.subtypes, field));
169845
+ domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
169884
169846
  return domainDictionary;
169885
169847
  }
169886
169848
  // Check if all the domains for the field in the types are inherited.
@@ -169890,7 +169852,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169890
169852
  }
169891
169853
  // We have domains per subtype
169892
169854
  // We need to go thru each types and create a dictionary.
169893
- const domainValuesBySubtypeGroup = getDomainValuesGroup(this._profile, this._source.subtypes, field);
169855
+ const domainValuesBySubtypeGroup = this._getDomainValuesGroup(this._source.subtypes, field);
169894
169856
  if (!domainValuesBySubtypeGroup) {
169895
169857
  return null;
169896
169858
  }
@@ -169906,7 +169868,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169906
169868
  // Special case for the type id field
169907
169869
  if (field.name === this._source.typeIdField) {
169908
169870
  const domainDictionary = this._createDomainDictionary(field);
169909
- domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._source.types, field));
169871
+ domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types, field));
169910
169872
  return domainDictionary;
169911
169873
  }
169912
169874
  // Check if all the domains for the field in the types are inherited.
@@ -169916,7 +169878,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169916
169878
  }
169917
169879
  // We have domains per feature type
169918
169880
  // We need to go thru each types and create a dictionary.
169919
- const domainValuesByFeatureTypeGroup = getDomainValuesGroup(this._profile, this._source.types, field);
169881
+ const domainValuesByFeatureTypeGroup = this._getDomainValuesGroup(this._source.types, field);
169920
169882
  if (!domainValuesByFeatureTypeGroup) {
169921
169883
  return null;
169922
169884
  }
@@ -169933,27 +169895,99 @@ class SourceBasedVariable extends CollectionBasedVariable {
169933
169895
  if (!isCodedValueDomainInstance(fieldDomain)) {
169934
169896
  return null;
169935
169897
  }
169936
- const domainValuesGroup = getCodedValueDomainGroup(this._profile, fieldDomain, {
169898
+ const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
169937
169899
  code: "domainvalues"
169938
169900
  });
169939
169901
  const domainDictionary = this._createDomainDictionary(field);
169940
169902
  domainDictionary.variables.push(domainValuesGroup);
169941
169903
  return domainDictionary;
169942
169904
  }
169905
+ _getTypeOrSubtypeDomainGroup(types, field) {
169906
+ // Try the coded domain first
169907
+ if (isCodedValueDomainInstance(field.domain)) {
169908
+ return this._getCodedValueDomainGroup(field.domain, { code: "subtypes" });
169909
+ }
169910
+ // No coded domain, we will manufacture it
169911
+ const values = types?.map((t) => {
169912
+ const label = isSubtypeInstance(t) ? t.code : t.id;
169913
+ return new ValueVariable({
169914
+ profile: this._profile,
169915
+ label: `${label}`,
169916
+ description: t.name,
169917
+ snippet: `"${label}"`
169918
+ });
169919
+ }) ?? [];
169920
+ return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
169921
+ }
169922
+ _getCodedValueDomainGroup(domain, label) {
169923
+ const values = domain.codedValues.map((v) => new ValueVariable({
169924
+ profile: this._profile,
169925
+ label: `${v.code}`,
169926
+ description: v.name,
169927
+ snippet: `"${v.code}"`,
169928
+ filterDescription: true
169929
+ }));
169930
+ return new GroupOfVariables(this._profile, label, values);
169931
+ }
169932
+ _getDomainValuesGroup(types, field) {
169933
+ const variables = [];
169934
+ if (!types || types.length === 0) {
169935
+ return null;
169936
+ }
169937
+ types.forEach((type) => {
169938
+ let domain = type.domains?.[field.name];
169939
+ if (!domain) {
169940
+ return;
169941
+ }
169942
+ if (isInheritedDomainInstance(domain)) {
169943
+ domain = field.domain;
169944
+ return;
169945
+ }
169946
+ if (!isCodedValueDomainInstance(domain)) {
169947
+ return;
169948
+ }
169949
+ const alias = fieldAlias(field);
169950
+ const domainValuesGroup = this._getCodedValueDomainGroup(domain, {
169951
+ code: "domainvaluesfortypeformat",
169952
+ formatValues: {
169953
+ fieldName: alias,
169954
+ typeName: type.name
169955
+ }
169956
+ });
169957
+ const id = isSubtypeInstance(type) ? type.code : type.id;
169958
+ const label = `${id}`;
169959
+ const snippet = `"${id}""`;
169960
+ const subtypeDictionary = new DictionaryVariable(this, {
169961
+ profile: this._profile,
169962
+ label,
169963
+ snippet,
169964
+ description: type.name,
169965
+ declaration: { name: alias }
169966
+ });
169967
+ subtypeDictionary.variables = [domainValuesGroup];
169968
+ variables.push(subtypeDictionary);
169969
+ });
169970
+ if (!variables.length) {
169971
+ return null;
169972
+ }
169973
+ return new GroupOfVariables(this._profile, { code: "domainvaluesbysubtypes" }, variables);
169974
+ }
169943
169975
  _createDomainDictionary(field) {
169944
169976
  // Create the domain dictionary.
169945
169977
  // The dictionary will have a header group and a value group.
169946
169978
  // At this point we are only creating the header group in the dictionary.
169947
169979
  const valueSnippet = this._getValueSnippet(field);
169948
- const domainDictionary = new DictionaryVariable({
169980
+ const alias = fieldAlias(field);
169981
+ const domainDictionary = new DictionaryVariable(this, {
169949
169982
  profile: this._profile,
169950
169983
  label: valueSnippet,
169951
- description: field.alias ?? field.name,
169984
+ description: alias,
169952
169985
  snippet: valueSnippet,
169953
- icon: "form-dropdown"
169986
+ icon: "form-dropdown",
169987
+ declaration: { name: field.name }
169954
169988
  });
169955
169989
  // Add the header group
169956
- const headerGroup = new GroupOfVariables(this._profile, field.alias ?? field.name, [
169990
+ const headerGroup = new GroupOfVariables(this._profile, alias, [
169957
169991
  new ValueVariable({
169958
169992
  profile: this._profile,
169959
169993
  label: valueSnippet,
@@ -169994,7 +170028,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169994
170028
  return null;
169995
170029
  }
169996
170030
  const snippet = `FeatureSetByRelationshipName(${this.snippet}, "${relationship.name}")`;
169997
- return new FeatureSetVariable({
170031
+ return new FeatureSetVariable(this, {
169998
170032
  profile: this._profile,
169999
170033
  declaration: { definition: relatedLayer },
170000
170034
  label: relatedLayer.title,
@@ -170002,7 +170036,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170002
170036
  nonInteractive: true
170003
170037
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
170004
170038
  }));
170005
- relationshipsGroup.variables = relationshipItems.filter(Y);
170039
+ relationshipsGroup.variables = relationshipItems.filter(ee);
170006
170040
  if (!relationshipsGroup.variables.length) {
170007
170041
  return null;
170008
170042
  }
@@ -170010,8 +170044,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
170010
170044
  }
170011
170045
  }
170012
170046
  class FeatureVariable extends SourceBasedVariable {
170013
- constructor(props) {
170014
- super(props, { exposeRelationships: true });
170047
+ constructor(owner, props) {
170048
+ super(owner, props, { exposeRelationships: true });
170015
170049
  this.type = "feature";
170016
170050
  }
170017
170051
  get title() {
@@ -170079,11 +170113,11 @@ class FeatureVariable extends SourceBasedVariable {
170079
170113
  }
170080
170114
  }
170081
170115
  class FeatureSetVariable extends SourceBasedVariable {
170082
- constructor(props, featureSetSnippets = [],
170116
+ constructor(owner, props, featureSetSnippets = [],
170083
170117
  // Relationships for feature set if only supported if the feature set is actually
170084
170118
  // representing a relationsip feature layer for a feature source.
170085
170119
  relationshipProps) {
170086
- super(props, relationshipProps);
170120
+ super(owner, props, relationshipProps);
170087
170121
  this.featureSetSnippets = featureSetSnippets;
170088
170122
  this.type = "featureSet";
170089
170123
  }
@@ -170130,8 +170164,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170130
170164
  }
170131
170165
  }
170132
170166
  class FeatureSetCollectionVariable extends CollectionBasedVariable {
170133
- constructor(props) {
170134
- super(props);
170167
+ constructor(owner, props) {
170168
+ super(owner, props);
170135
170169
  this.type = "featureSetCollection";
170136
170170
  this._featureSetCollections = null;
170137
170171
  this._loaded = false;
@@ -170160,7 +170194,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170160
170194
  return this._profile?.intlStrings.featureservice ?? "featureservice";
170161
170195
  }
170162
170196
  async loadSource() {
170163
- if (Y(this._loadPromise) && ee(this._loadPromise)) {
170197
+ if (ee(this._loadPromise) && te(this._loadPromise)) {
170164
170198
  return await this._loadPromise;
170165
170199
  }
170166
170200
  this._loadPromise = this._loadSource();
@@ -170181,7 +170215,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170181
170215
  : {
170182
170216
  code: "webmapformat",
170183
170217
  formatValues: {
170184
- webMapTitle: this._featureSetCollections.source.portalItem.title || "Untitled map"
170218
+ webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
170185
170219
  }
170186
170220
  };
170187
170221
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
@@ -170239,7 +170273,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170239
170273
  };
170240
170274
  }
170241
170275
  async _featureSetCollectionFromPortalItem(definition) {
170242
- const portalItem = await newPortalItem(definition);
170276
+ const portalItem = await newPortalPortalItem(definition);
170243
170277
  await portalItem.load();
170244
170278
  switch (portalItem.type) {
170245
170279
  case "Web Map": {
@@ -170298,9 +170332,9 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170298
170332
  return layerVariables;
170299
170333
  }
170300
170334
  _createFeatureSetVariable(featureLayer, isFromWebMap = false) {
170301
- return new FeatureSetVariable({
170335
+ return new FeatureSetVariable(this, {
170302
170336
  profile: this._profile,
170303
- declaration: { definition: featureLayer },
170337
+ declaration: { name: featureLayer.title, definition: featureLayer },
170304
170338
  label: featureLayer.title,
170305
170339
  description: "",
170306
170340
  nonInteractive: true
@@ -170338,7 +170372,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170338
170372
  class EditorProfile extends DictionaryVariable {
170339
170373
  constructor(definition, intlStrings, locale = "en") {
170340
170374
  // Delay the load of the variable declarations so we have a `this`
170341
- super({
170375
+ super(undefined, {
170342
170376
  profile: null,
170343
170377
  declaration: { properties: [] }
170344
170378
  });
@@ -170576,7 +170610,7 @@ class ArcadeLanguageServiceDefaults {
170576
170610
  if (isPredefinedProfile(definition)) {
170577
170611
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
170578
170612
  }
170579
- const intlStrings = await N(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170613
+ const intlStrings = await v(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170580
170614
  if (!intlStrings) {
170581
170615
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
170582
170616
  }
@@ -170658,4 +170692,4 @@ const arcade = {
170658
170692
  setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
170659
170693
  };
170660
170694
 
170661
- export { B, D, Emitter as E, F, H, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Q, Range as R, StandaloneServices as S, Uri as U, Z, arcade as a, commonjsGlobal as b, createCommonjsModule as c, arcadeDefaults as d, editor as e, filterCollection as f, generateTokensCSSForColorMap as g, importArcade as h, importRequest as i, h as j, U as k, languages as l, k as m, K as n, oe as o, supportedFields as p, KeyMod as q, monaco_editor_core_star as r, se as s, typescriptDefaults as t, main as u, x };
170695
+ export { B, D, Emitter as E, G, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, W, Z, arcade as a, commonjsGlobal as b, createCommonjsModule as c, importRequest as d, editor as e, arcadeDefaults as f, generateTokensCSSForColorMap as g, filterCollection as h, ie as i, importArcade as j, h as k, languages as l, U as m, k as n, supportedFields as o, K as p, q, KeyMod as r, se as s, monaco_editor_core_star as t, typescriptDefaults as u, main as v, re as w, x };