@arcgis/coding-components 5.2.0-next.3 → 5.2.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/cdn/{IETP57KJ.js → 35PM76LN.js} +1 -1
  2. package/dist/cdn/46DUY6LF.js +6 -0
  3. package/dist/cdn/5RWI53UM.js +2 -0
  4. package/dist/cdn/6R2FXATY.js +2 -0
  5. package/dist/cdn/76VHPECE.js +2 -0
  6. package/dist/cdn/{Q2EZ6DGG.js → 7RQSIZ7E.js} +1 -1
  7. package/dist/cdn/7UTCJERR.js +2 -0
  8. package/dist/cdn/7Z6G332Z.js +2 -0
  9. package/dist/cdn/{CC4XBW6V.js → B73HLERI.js} +1 -1
  10. package/dist/cdn/BCXSPP2P.js +2 -0
  11. package/dist/cdn/{3PBQ47BB.js → BGTP5CFY.js} +1 -1
  12. package/dist/cdn/{OLNYBWUC.js → BZWB7A55.js} +1 -1
  13. package/dist/cdn/{PUY5G6AF.js → CKBZZB5E.js} +1 -1
  14. package/dist/cdn/DD277QPZ.js +2 -0
  15. package/dist/cdn/{O5XRLNCX.js → DTRK3XAL.js} +1 -1
  16. package/dist/cdn/{HRM2JUGO.js → EYE5UNR2.js} +1 -1
  17. package/dist/cdn/GTE3KXNK.js +2 -0
  18. package/dist/cdn/{QUR4WECO.js → H46YVJ4O.js} +1 -1
  19. package/dist/cdn/JF5ISPMG.js +2 -0
  20. package/dist/cdn/{LZ2JU5WD.js → JLYAOSQM.js} +1 -1
  21. package/dist/cdn/{QW7OA32G.js → L7T34NYP.js} +1 -1
  22. package/dist/cdn/{2WVAYBDV.js → MFDNJU3K.js} +1 -1
  23. package/dist/cdn/MZMKV7FA.js +2 -0
  24. package/dist/cdn/{LUJKYDO7.js → NCMXRX7O.js} +1 -1
  25. package/dist/cdn/NP37C536.js +2 -0
  26. package/dist/cdn/NVWQE3SF.js +2 -0
  27. package/dist/cdn/O6L3YJ7J.js +68 -0
  28. package/dist/cdn/P22DALGG.js +2 -0
  29. package/dist/cdn/{XU7YAUUX.js → PJBI5XFD.js} +1 -1
  30. package/dist/cdn/S4UOB65K.js +2 -0
  31. package/dist/cdn/{O3PQD5N5.js → TUQ7FMSM.js} +2 -2
  32. package/dist/cdn/{2DNHMHBF.js → VEOKKZ5A.js} +1 -1
  33. package/dist/cdn/{WWVPYM5B.js → XSXVHUIH.js} +1 -1
  34. package/dist/cdn/{CPITVSFM.js → YTISJUMJ.js} +1 -1
  35. package/dist/cdn/YYX73IRV.js +4 -0
  36. package/dist/cdn/ZJADYRM6.js +12 -0
  37. package/dist/cdn/assets/arcade-language/api/arcade-api.t9n.en.json +1 -1
  38. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +1 -1
  39. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +1 -1
  40. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +1 -1
  41. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +1 -1
  42. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +1 -1
  43. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +1 -1
  44. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +1 -1
  45. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +1 -1
  46. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +1 -1
  47. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +1 -1
  48. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +1 -1
  49. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +1 -1
  50. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +1 -1
  51. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +1 -1
  52. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +1 -1
  53. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +1 -1
  54. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +1 -1
  55. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +1 -1
  56. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +1 -1
  57. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +1 -1
  58. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +1 -1
  59. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +1 -1
  60. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.no.json +1 -1
  61. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +1 -1
  62. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +1 -1
  63. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +1 -1
  64. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +1 -1
  65. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +1 -1
  66. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +1 -1
  67. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +1 -1
  68. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +1 -1
  69. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +1 -1
  70. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +1 -1
  71. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +1 -1
  72. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +1 -1
  73. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +1 -1
  74. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +1 -1
  75. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +1 -1
  76. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +1 -1
  77. package/dist/cdn/assets/code-editor/arcade.worker.js +1 -1
  78. package/dist/cdn/assets/code-editor/sql-expr.worker.js +2613 -2588
  79. package/dist/cdn/index.js +1 -1
  80. package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +1 -1
  81. package/dist/chunks/arcade-defaults.js +66 -63
  82. package/dist/chunks/debugger-value-components.js +51 -47
  83. package/dist/chunks/debugger-value-styles.js +8 -8
  84. package/dist/chunks/fields.js +18 -14
  85. package/dist/chunks/functional.js +34 -34
  86. package/dist/chunks/language-defaults-base.js +230 -221
  87. package/dist/chunks/sql-expr-defaults.js +63 -59
  88. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +5 -6
  89. package/dist/components/arcgis-arcade-debugger-console/customElement.js +7 -7
  90. package/dist/components/arcgis-arcade-debugger-output/customElement.js +21 -18
  91. package/dist/components/arcgis-arcade-editor/customElement.d.ts +38 -3
  92. package/dist/components/arcgis-arcade-editor/customElement.js +226 -205
  93. package/dist/components/arcgis-arcade-results/customElement.js +19 -18
  94. package/dist/components/arcgis-code-editor-shell/customElement.js +70 -65
  95. package/dist/components/arcgis-editor-variables/customElement.js +16 -10
  96. package/dist/components/arcgis-language-api-panel/customElement.js +9 -9
  97. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
  98. package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
  99. package/dist/components/arcgis-sql-layer-editor/customElement.js +10 -10
  100. package/dist/components/types.d.ts +139 -22
  101. package/dist/docs/api.json +1 -1
  102. package/dist/docs/docs.json +1 -1
  103. package/dist/docs/vscode.html-custom-data.json +1 -1
  104. package/dist/docs/web-types.json +1 -1
  105. package/dist/index.d.ts +3 -3
  106. package/dist/loader.js +3 -3
  107. package/dist/types/lumina.d.ts +1 -1
  108. package/dist/types/preact.d.ts +1 -1
  109. package/dist/types/react.d.ts +1 -1
  110. package/dist/types/stencil.d.ts +1 -1
  111. package/package.json +8 -8
  112. package/dist/cdn/3CHKFCKR.js +0 -2
  113. package/dist/cdn/3UD4JSPW.js +0 -2
  114. package/dist/cdn/4G3EYLJY.js +0 -2
  115. package/dist/cdn/4N67XYKO.js +0 -2
  116. package/dist/cdn/6QMGBWXM.js +0 -2
  117. package/dist/cdn/72E5GBWN.js +0 -68
  118. package/dist/cdn/B5A6XU2C.js +0 -2
  119. package/dist/cdn/BXEZA6TW.js +0 -2
  120. package/dist/cdn/CA3GVMWI.js +0 -2
  121. package/dist/cdn/CQTJWVFM.js +0 -6
  122. package/dist/cdn/G5IXPOCO.js +0 -2
  123. package/dist/cdn/P3LG4UGD.js +0 -2
  124. package/dist/cdn/QGBZYXBS.js +0 -4
  125. package/dist/cdn/RMVHO2AH.js +0 -12
  126. package/dist/cdn/RO6RHW6I.js +0 -2
  127. package/dist/cdn/TQDN6SR5.js +0 -2
  128. package/dist/cdn/TWEJITWD.js +0 -2
  129. package/dist/cdn/ZTCCL565.js +0 -2
@@ -1,10 +1,10 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as p } from "../../chunks/runtime.js";
3
- import { css as h, html as r } from "lit";
3
+ import { css as h, html as o } from "lit";
4
4
  import { LitElement as g, createEvent as l, safeClassMap as m } from "@arcgis/lumina";
5
5
  import { generateGuid as u } from "@arcgis/toolkit/string";
6
6
  import { u as f } from "../../chunks/useT9n.js";
7
- import { createRef as _, ref as b } from "lit/directives/ref.js";
7
+ import { createRef as b, ref as _ } from "lit/directives/ref.js";
8
8
  import { k as d } from "../../chunks/utils.js";
9
9
  import { e as E } from "../../chunks/utilities.js";
10
10
  import "@arcgis/core/portal/PortalItem.js";
@@ -14,7 +14,7 @@ import "@arcgis/core/layers/FeatureLayer.js";
14
14
  import "@arcgis/core/applications/Components/arcadeEditorUtils.js";
15
15
  import "@arcgis/toolkit/predicate";
16
16
  import "vscode-languageserver-types";
17
- import { rethrowError as o } from "@arcgis/toolkit/log";
17
+ import { rethrowError as r } from "@arcgis/toolkit/log";
18
18
  import "@arcgis/core/core/Error.js";
19
19
  import { d as n } from "../../chunks/language-defaults-base.js";
20
20
  import "@arcgis/core/portal/Portal.js";
@@ -23,7 +23,7 @@ import { getSqlLayerDiagnosticService as x } from "../../chunks/sql-layer-mode.j
23
23
  const I = h`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`;
24
24
  class L extends g {
25
25
  constructor() {
26
- super(...arguments), this._codeEditorElt = _(), this._disposables = [], this._modelId = u(), this.messages = f(), this._preparing = !1, this._resolvedLanguage = n, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.openedSidePanel = "none", this.arcgisDiagnosticsChange = l({ bubbles: !1 }), this.arcgisScriptChange = l({ bubbles: !1 });
26
+ super(...arguments), this._codeEditorElt = b(), this._disposables = [], this._modelId = u(), this.messages = f(), this._preparing = !1, this._resolvedLanguage = n, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.openedSidePanel = "none", this.arcgisDiagnosticsChange = l({ bubbles: !1 }), this.arcgisScriptChange = l({ bubbles: !1 });
27
27
  }
28
28
  static {
29
29
  this.properties = { _editorProfile: 16, _preparing: 16, _resolvedLanguage: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5, messageOverrides: 0, openedSidePanel: 3, editorOptions: 0, editorInstance: 32 };
@@ -38,10 +38,10 @@ class L extends g {
38
38
  await this._codeEditorElt.value?.setFocus();
39
39
  }
40
40
  async load() {
41
- await this._updateDataModelDeps().catch(o(this));
41
+ await this._updateDataModelDeps().catch(r(this));
42
42
  }
43
43
  willUpdate(e) {
44
- e.has("profile") && this._updateDataModelDeps().catch(o(this));
44
+ e.has("profile") && this._updateDataModelDeps().catch(r(this));
45
45
  }
46
46
  async loaded() {
47
47
  const e = x();
@@ -71,7 +71,7 @@ class L extends g {
71
71
  this.sideActionBarExpanded = !this.sideActionBarExpanded;
72
72
  }
73
73
  _toggleSidePanel(e) {
74
- this.openedSidePanel = this.openedSidePanel === e ? "none" : e, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(o(this));
74
+ this.openedSidePanel = this.openedSidePanel === e ? "none" : e;
75
75
  }
76
76
  _onCodeEditorValueChange(e) {
77
77
  e.stopPropagation(), this.script = e.detail, this.arcgisScriptChange.emit(e.detail);
@@ -80,7 +80,7 @@ class L extends g {
80
80
  e.stopPropagation();
81
81
  const t = this._getSelectedTableVariable(e.detail);
82
82
  if (!t) {
83
- this._codeEditorElt.value?.insertText(e.detail).catch(o(this));
83
+ this._codeEditorElt.value?.insertText(e.detail).catch(r(this));
84
84
  return;
85
85
  }
86
86
  await t.loadSource();
@@ -99,9 +99,9 @@ class L extends g {
99
99
  render() {
100
100
  const e = this._getTablesVariable(), i = String(this.messages.placeholderexample ?? "Example: {sqlQueryExample}").replace("{sqlQueryExample}", "select field1, field2 from db.dataset"), s = `${this.messages.placeholder ?? "Start filtering data using SQL query syntax"}
101
101
  ${i}`;
102
- return r`<arcgis-code-editor-shell><arcgis-code-editor slot=editor .language=${this._resolvedLanguage} .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} .editorOptions=${{ placeholder: s, ...this.editorOptions }} ${b(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar && r`<arcgis-editor-variables slot=side-panel .variable=${e} .heading=${this.messages.tables ?? "Tables"} .messageOverrides=${{ profileempty: this.messages.profileempty }} .closed=${this.openedSidePanel !== "variables"} class=${m(this.openedSidePanel === "variables" ? "" : "hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._onItemSelected} @arcgisInternalClosePanel=${() => {
102
+ return o`<arcgis-code-editor-shell><arcgis-code-editor slot=editor .language=${this._resolvedLanguage} .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} .editorOptions=${{ placeholder: s, ...this.editorOptions }} ${_(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar && o`<arcgis-editor-variables slot=side-panel .variable=${e} .heading=${this.messages.tables ?? "Tables"} .messageOverrides=${{ profileempty: this.messages.profileempty }} .closed=${this.openedSidePanel !== "variables"} class=${m(this.openedSidePanel === "variables" ? "" : "hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._onItemSelected} @arcgisInternalClosePanel=${() => {
103
103
  this.openedSidePanel = "none";
104
- }} data-panel-name=none></arcgis-editor-variables><calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=tables-action .text=${this.messages.tables ?? "Tables"} icon=table .active=${this.openedSidePanel === "variables"} data-panel-name=variables @click=${() => this._toggleSidePanel("variables")}></calcite-action>${!this.sideActionBarExpanded && r`<calcite-tooltip reference-element=tables-action><span>${this.messages.tables ?? "Tables"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</arcgis-code-editor-shell>`;
104
+ }} data-panel-name=none></arcgis-editor-variables><calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=tables-action .text=${this.messages.tables ?? "Tables"} icon=table .active=${this.openedSidePanel === "variables"} data-panel-name=variables @click=${() => this._toggleSidePanel("variables")}></calcite-action>${!this.sideActionBarExpanded && o`<calcite-tooltip reference-element=tables-action><span>${this.messages.tables ?? "Tables"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</arcgis-code-editor-shell>`;
105
105
  }
106
106
  }
107
107
  p("arcgis-sql-layer-editor", L);
@@ -6,6 +6,7 @@ import type WebMap from "@arcgis/core/WebMap.js";
6
6
  import type WebScene from "@arcgis/core/WebScene.js";
7
7
  import type Map from "@arcgis/core/Map.js";
8
8
  import type SpatialReference from "@arcgis/core/geometry/SpatialReference.js";
9
+ import type Layer from "@arcgis/core/layers/Layer.js";
9
10
  import type { Diagnostic as ArcadeLanguageServiceDiagnostic } from "@arcgis/arcade-languageservice";
10
11
  import type { ApiItem, BundleType, ProfileId } from "@arcgis/languages-api-utils";
11
12
  import type { ProfileVariableInstances, ArcadeServices } from "@arcgis/core/arcade.js";
@@ -39,7 +40,23 @@ export interface EditorProfileDefinition {
39
40
  }
40
41
 
41
42
  /** @deprecated since 5.1. Use EditorProfileDefinition instead. */
42
- export interface IEditorProfileDefinition extends EditorProfileDefinition {}
43
+ export interface IEditorProfileDefinition {
44
+ /** Optional label for the profile. Used in the editor when displaying the variables panel. */
45
+ label?: string;
46
+ /**
47
+ * The collection of variables that will be passed to the expression at execution time.
48
+ * The variable declarations are used to help the editor provide validation and completion.
49
+ */
50
+ variables: ProfileVariable[];
51
+ /** The version of the Arcade API that the editor should use during validation and completion. */
52
+ apiVersion?: string;
53
+ /** The Arcade API bundles that the editor should use during validation and completion. */
54
+ bundles?: BundleType[];
55
+ /** A collection of additional Arcade API items that will be provided at runtime. */
56
+ additionalApiItems?: ApiItem[];
57
+ /** A collection of api item names to hide. */
58
+ hiddenApiItems?: string[];
59
+ }
43
60
 
44
61
  export interface PredefinedProfile {
45
62
  /** The well known profile ID. */
@@ -53,7 +70,16 @@ export interface PredefinedProfile {
53
70
  }
54
71
 
55
72
  /** @deprecated since 5.1. Use PredefinedProfile instead. */
56
- export interface IPredefinedProfile extends PredefinedProfile {}
73
+ export interface IPredefinedProfile {
74
+ /** The well known profile ID. */
75
+ id: ProfileId;
76
+ /** The variables that should be disabled for the profile. */
77
+ disabledVariables?: string[];
78
+ /** Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection). */
79
+ definitions: VariableDefinitions;
80
+ /** A collection of api item names to hide. */
81
+ hiddenApiItems?: string[];
82
+ }
57
83
 
58
84
  /** The type of value variables supported. */
59
85
  export type ProfileVariableValueType = "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time";
@@ -77,7 +103,12 @@ export interface ProfileVariableBase {
77
103
  }
78
104
 
79
105
  /** @deprecated since 5.1. Use ProfileVariableBase instead. */
80
- export interface IProfileVariableBase extends ProfileVariableBase {}
106
+ export interface IProfileVariableBase {
107
+ /** Name of the variable */
108
+ name: string;
109
+ /** Description for the variable */
110
+ description?: string;
111
+ }
81
112
 
82
113
  /** Single value profile variable declaration. */
83
114
  export interface ProfileValue extends ProfileVariableBase {
@@ -85,7 +116,9 @@ export interface ProfileValue extends ProfileVariableBase {
85
116
  }
86
117
 
87
118
  /** @deprecated since 5.1. Use ProfileValue instead. */
88
- export interface IProfileValue extends ProfileValue {}
119
+ export interface IProfileValue extends IProfileVariableBase {
120
+ readonly type: ProfileVariableValueType;
121
+ }
89
122
 
90
123
  /** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
91
124
  export interface ProfileDictionary extends ProfileVariableBase {
@@ -95,7 +128,11 @@ export interface ProfileDictionary extends ProfileVariableBase {
95
128
  }
96
129
 
97
130
  /** @deprecated since 5.1. Use ProfileDictionary instead. */
98
- export interface IProfileDictionary extends ProfileDictionary {}
131
+ export interface IProfileDictionary extends IProfileVariableBase {
132
+ readonly type: "dictionary";
133
+ /** The dictionary properties. Properties are variables as well. */
134
+ properties?: ProfileVariable[];
135
+ }
99
136
 
100
137
  /** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
101
138
  export interface ProfileArray extends ProfileVariableBase {
@@ -105,7 +142,11 @@ export interface ProfileArray extends ProfileVariableBase {
105
142
  }
106
143
 
107
144
  /** @deprecated since 5.1. Use ProfileArray instead. */
108
- export interface IProfileArray extends ProfileArray {}
145
+ export interface IProfileArray extends IProfileVariableBase {
146
+ readonly type: "array";
147
+ /** The type for the array elements. */
148
+ elementType?: ProfileVariable;
149
+ }
109
150
 
110
151
  /**
111
152
  * Feature profile variable declaration.
@@ -119,7 +160,11 @@ export interface ProfileFeature extends ProfileVariableBase {
119
160
  }
120
161
 
121
162
  /** @deprecated since 5.1. Use ProfileFeature instead. */
122
- export interface IProfileFeature extends ProfileFeature {}
163
+ export interface IProfileFeature extends IProfileVariableBase {
164
+ readonly type: "feature";
165
+ /** Describes how the editor will find the definition for the feature. */
166
+ definition?: FeatureDefinition;
167
+ }
123
168
 
124
169
  /**
125
170
  * FeatureSet profile variable declaration.
@@ -133,7 +178,11 @@ export interface ProfileFeatureSet extends ProfileVariableBase {
133
178
  }
134
179
 
135
180
  /** @deprecated since 5.1. Use ProfileFeatureSet instead. */
136
- export interface IProfileFeatureSet extends ProfileFeatureSet {}
181
+ export interface IProfileFeatureSet extends IProfileVariableBase {
182
+ readonly type: "featureSet";
183
+ /** Describes how the editor will find the definition for the feature set. */
184
+ definition?: FeatureSetDefinition;
185
+ }
137
186
 
138
187
  /**
139
188
  * FeatureSetCollection profile variable declaration.
@@ -147,7 +196,11 @@ export interface ProfileFeatureSetCollection extends ProfileVariableBase {
147
196
  }
148
197
 
149
198
  /** @deprecated since 5.1. Use ProfileFeatureSetCollection instead. */
150
- export interface IProfileFeatureSetCollection extends ProfileFeatureSetCollection {}
199
+ export interface IProfileFeatureSetCollection extends IProfileVariableBase {
200
+ readonly type: "featureSetCollection";
201
+ /** Describes how the featureSetCollection will find its definition. */
202
+ definition?: FeatureSetCollectionDefinition;
203
+ }
151
204
 
152
205
  /** Voxel profile variable declaration. */
153
206
  export interface ProfileVoxel extends ProfileVariableBase {
@@ -157,7 +210,11 @@ export interface ProfileVoxel extends ProfileVariableBase {
157
210
  }
158
211
 
159
212
  /** @deprecated since 5.1. Use ProfileVoxel instead. */
160
- export interface IProfileVoxel extends ProfileVoxel {}
213
+ export interface IProfileVoxel extends IProfileVariableBase {
214
+ readonly type: "voxel";
215
+ /** Describes how the editor will find the definition for the voxel. */
216
+ definition?: VoxelDefinition;
217
+ }
161
218
 
162
219
  /** Pixel profile variable declaration. */
163
220
  export interface ProfilePixel extends ProfileVariableBase {
@@ -167,12 +224,16 @@ export interface ProfilePixel extends ProfileVariableBase {
167
224
  }
168
225
 
169
226
  /** @deprecated since 5.1. Use ProfilePixel instead. */
170
- export interface IProfilePixel extends ProfilePixel {}
227
+ export interface IProfilePixel extends IProfileVariableBase {
228
+ readonly type: "pixel";
229
+ /** Describes how the editor will find the definition for the pixel. */
230
+ definition?: PixelDefinition;
231
+ }
171
232
 
172
233
  export type FeatureLikeProfile = ProfileFeature | ProfilePixel | ProfileVoxel;
173
234
 
174
235
  /** @deprecated since 5.1. Use FeatureLikeProfile instead. */
175
- export type IFeatureLikeProfile = FeatureLikeProfile;
236
+ export type IFeatureLikeProfile = IProfileFeature | IProfilePixel | IProfileVoxel;
176
237
 
177
238
  /**
178
239
  * Data catalog datastore profile variable declaration.
@@ -275,7 +336,12 @@ export interface PortalItemProperties {
275
336
  }
276
337
 
277
338
  /** @deprecated since 5.1. Use PortalItemProperties instead. */
278
- export interface IPortalItemProperties extends PortalItemProperties {}
339
+ export interface IPortalItemProperties {
340
+ /** The unique portal item id. */
341
+ id: string;
342
+ /** The optional portal url. Default: www.arcgis.com. */
343
+ portal?: { url: string; };
344
+ }
279
345
 
280
346
  /** WebMap and Service FeatureSetCollection can be defined by a portal item. */
281
347
  export interface PortalItemDefinition {
@@ -284,7 +350,10 @@ export interface PortalItemDefinition {
284
350
  }
285
351
 
286
352
  /** @deprecated since 5.1. Use PortalItemDefinition instead. */
287
- export interface IPortalItemDefinition extends PortalItemDefinition {}
353
+ export interface IPortalItemDefinition {
354
+ /** Describes a portal item. */
355
+ portalItem: PortalItemProperties;
356
+ }
288
357
 
289
358
  /** FeatureLayer can be defined from a Feature Layer portal item. */
290
359
  export interface FeatureLayerItemDefinition extends PortalItemDefinition {
@@ -293,7 +362,10 @@ export interface FeatureLayerItemDefinition extends PortalItemDefinition {
293
362
  }
294
363
 
295
364
  /** @deprecated since 5.1. Use FeatureLayerItemDefinition instead. */
296
- export interface IFeatureLayerItemDefinition extends FeatureLayerItemDefinition {}
365
+ export interface IFeatureLayerItemDefinition extends IPortalItemDefinition {
366
+ /** The layer id in the feature layer portal item. Default to 0. */
367
+ layerId?: number;
368
+ }
297
369
 
298
370
  /** FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service. */
299
371
  export interface UrlDefinition {
@@ -302,10 +374,20 @@ export interface UrlDefinition {
302
374
  }
303
375
 
304
376
  /** @deprecated since 5.1. Use UrlDefinition instead. */
305
- export interface IUrlDefinition extends UrlDefinition {}
377
+ export interface IUrlDefinition {
378
+ /** The url of the resource. */
379
+ url?: string | null;
380
+ }
381
+
382
+ /** Optional metadata for a FieldsDefinition. This metadata is used by the editor to provide a better user experience. */
383
+ export interface FieldsDefinitionMetadata {
384
+ /** The title that will be used within the variables panel. */
385
+ title?: Layer["title"];
386
+ }
306
387
 
307
388
  /** The most basic way to define a feature or feature set is by passing a collection of fields */
308
- export type FieldsDefinition = Pick<FeatureLayer, "fields">;
389
+ export type FieldsDefinition = FieldsDefinitionMetadata
390
+ & Pick<FeatureLayer, "fields">;
309
391
 
310
392
  /** @deprecated since 5.1. Use FieldsDefinition instead. */
311
393
  export type IFieldsDefinition = FieldsDefinition;
@@ -350,7 +432,9 @@ export interface ExtendedPredefinedProfile extends PredefinedProfile {
350
432
  }
351
433
 
352
434
  /** @deprecated since 5.1. Use ExtendedPredefinedProfile instead. */
353
- export interface IExtendedPredefinedProfile extends ExtendedPredefinedProfile {}
435
+ export interface IExtendedPredefinedProfile extends IPredefinedProfile {
436
+ additionalVariables?: ProfileVariable[];
437
+ }
354
438
 
355
439
  export interface EditorCodeSuggestionGroup {
356
440
  /** Label for the suggestion group */
@@ -360,7 +444,12 @@ export interface EditorCodeSuggestionGroup {
360
444
  }
361
445
 
362
446
  /** @deprecated since 5.1. Use EditorCodeSuggestionGroup instead. */
363
- export interface IEditorCodeSuggestionGroup extends EditorCodeSuggestionGroup {}
447
+ export interface IEditorCodeSuggestionGroup {
448
+ /** Label for the suggestion group */
449
+ label: string;
450
+ /** List of suggestions for the group */
451
+ suggestions: EditorCodeSuggestion[];
452
+ }
364
453
 
365
454
  export interface EditorCodeSuggestion {
366
455
  /** A short label for the suggestion. Can be thought as a title */
@@ -374,7 +463,16 @@ export interface EditorCodeSuggestion {
374
463
  }
375
464
 
376
465
  /** @deprecated since 5.1. Use EditorCodeSuggestion instead. */
377
- export interface IEditorCodeSuggestion extends EditorCodeSuggestion {}
466
+ export interface IEditorCodeSuggestion {
467
+ /** A short label for the suggestion. Can be thought as a title */
468
+ label: string;
469
+ /** A short description that will be showed below the label in the list of suggestions panel */
470
+ description?: string;
471
+ /** Markdown string that will be rendered along with the code in the detail panel */
472
+ documentation?: string;
473
+ /** The code for the suggestion. Will be injected in the editor is selected */
474
+ code: string;
475
+ }
378
476
 
379
477
  export type SidePanelName = "api" | "none" | "suggestions" | "variables";
380
478
 
@@ -394,7 +492,20 @@ export interface ContextReferences {
394
492
  }
395
493
 
396
494
  /** @deprecated since 5.1. Use ContextReferences instead. */
397
- export interface IContextReferences extends ContextReferences {}
495
+ export interface IContextReferences {
496
+ /**
497
+ * Spatial reference object used to define the spatial reference for the arcade runtime.
498
+ * By defaults, the spatial reference is set to Web Mercator (wkid: 3857).
499
+ */
500
+ spatialReference?: SpatialReference | { wkid: number; } | null;
501
+ /**
502
+ * Defines the default time zone in which to create and display Arcade date types.
503
+ * By default, the time zone is set to "system".
504
+ */
505
+ timeZone?: string;
506
+ /** Defines the "services" passed to the arcade executor. */
507
+ services?: ArcadeServices;
508
+ }
398
509
 
399
510
  /**
400
511
  * If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to
@@ -410,4 +521,10 @@ export interface EditorTestContext extends ContextReferences {
410
521
  }
411
522
 
412
523
  /** @deprecated since 5.1. Use EditorTestContext instead. */
413
- export interface IEditorTestContext extends EditorTestContext {}
524
+ export interface IEditorTestContext extends IContextReferences {
525
+ /**
526
+ * An object of key/value pairs where the key is the name of a profile variable.
527
+ * The key's value must be of type ArcGIS core ProfileVariableInstance.
528
+ */
529
+ profileVariableInstances: ProfileVariableInstances;
530
+ }