@arcgis/coding-components 5.2.0-next.16 → 5.2.0-next.18

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.
@@ -39,7 +39,23 @@ export interface EditorProfileDefinition {
39
39
  }
40
40
 
41
41
  /** @deprecated since 5.1. Use EditorProfileDefinition instead. */
42
- export interface IEditorProfileDefinition extends EditorProfileDefinition {}
42
+ export interface IEditorProfileDefinition {
43
+ /** Optional label for the profile. Used in the editor when displaying the variables panel. */
44
+ label?: string;
45
+ /**
46
+ * The collection of variables that will be passed to the expression at execution time.
47
+ * The variable declarations are used to help the editor provide validation and completion.
48
+ */
49
+ variables: ProfileVariable[];
50
+ /** The version of the Arcade API that the editor should use during validation and completion. */
51
+ apiVersion?: string;
52
+ /** The Arcade API bundles that the editor should use during validation and completion. */
53
+ bundles?: BundleType[];
54
+ /** A collection of additional Arcade API items that will be provided at runtime. */
55
+ additionalApiItems?: ApiItem[];
56
+ /** A collection of api item names to hide. */
57
+ hiddenApiItems?: string[];
58
+ }
43
59
 
44
60
  export interface PredefinedProfile {
45
61
  /** The well known profile ID. */
@@ -53,7 +69,16 @@ export interface PredefinedProfile {
53
69
  }
54
70
 
55
71
  /** @deprecated since 5.1. Use PredefinedProfile instead. */
56
- export interface IPredefinedProfile extends PredefinedProfile {}
72
+ export interface IPredefinedProfile {
73
+ /** The well known profile ID. */
74
+ id: ProfileId;
75
+ /** The variables that should be disabled for the profile. */
76
+ disabledVariables?: string[];
77
+ /** Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection). */
78
+ definitions: VariableDefinitions;
79
+ /** A collection of api item names to hide. */
80
+ hiddenApiItems?: string[];
81
+ }
57
82
 
58
83
  /** The type of value variables supported. */
59
84
  export type ProfileVariableValueType = "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time";
@@ -77,7 +102,12 @@ export interface ProfileVariableBase {
77
102
  }
78
103
 
79
104
  /** @deprecated since 5.1. Use ProfileVariableBase instead. */
80
- export interface IProfileVariableBase extends ProfileVariableBase {}
105
+ export interface IProfileVariableBase {
106
+ /** Name of the variable */
107
+ name: string;
108
+ /** Description for the variable */
109
+ description?: string;
110
+ }
81
111
 
82
112
  /** Single value profile variable declaration. */
83
113
  export interface ProfileValue extends ProfileVariableBase {
@@ -85,7 +115,9 @@ export interface ProfileValue extends ProfileVariableBase {
85
115
  }
86
116
 
87
117
  /** @deprecated since 5.1. Use ProfileValue instead. */
88
- export interface IProfileValue extends ProfileValue {}
118
+ export interface IProfileValue extends IProfileVariableBase {
119
+ readonly type: ProfileVariableValueType;
120
+ }
89
121
 
90
122
  /** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
91
123
  export interface ProfileDictionary extends ProfileVariableBase {
@@ -95,7 +127,11 @@ export interface ProfileDictionary extends ProfileVariableBase {
95
127
  }
96
128
 
97
129
  /** @deprecated since 5.1. Use ProfileDictionary instead. */
98
- export interface IProfileDictionary extends ProfileDictionary {}
130
+ export interface IProfileDictionary extends IProfileVariableBase {
131
+ readonly type: "dictionary";
132
+ /** The dictionary properties. Properties are variables as well. */
133
+ properties?: ProfileVariable[];
134
+ }
99
135
 
100
136
  /** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
101
137
  export interface ProfileArray extends ProfileVariableBase {
@@ -105,7 +141,11 @@ export interface ProfileArray extends ProfileVariableBase {
105
141
  }
106
142
 
107
143
  /** @deprecated since 5.1. Use ProfileArray instead. */
108
- export interface IProfileArray extends ProfileArray {}
144
+ export interface IProfileArray extends IProfileVariableBase {
145
+ readonly type: "array";
146
+ /** The type for the array elements. */
147
+ elementType?: ProfileVariable;
148
+ }
109
149
 
110
150
  /**
111
151
  * Feature profile variable declaration.
@@ -119,7 +159,11 @@ export interface ProfileFeature extends ProfileVariableBase {
119
159
  }
120
160
 
121
161
  /** @deprecated since 5.1. Use ProfileFeature instead. */
122
- export interface IProfileFeature extends ProfileFeature {}
162
+ export interface IProfileFeature extends IProfileVariableBase {
163
+ readonly type: "feature";
164
+ /** Describes how the editor will find the definition for the feature. */
165
+ definition?: FeatureDefinition;
166
+ }
123
167
 
124
168
  /**
125
169
  * FeatureSet profile variable declaration.
@@ -133,7 +177,11 @@ export interface ProfileFeatureSet extends ProfileVariableBase {
133
177
  }
134
178
 
135
179
  /** @deprecated since 5.1. Use ProfileFeatureSet instead. */
136
- export interface IProfileFeatureSet extends ProfileFeatureSet {}
180
+ export interface IProfileFeatureSet extends IProfileVariableBase {
181
+ readonly type: "featureSet";
182
+ /** Describes how the editor will find the definition for the feature set. */
183
+ definition?: FeatureSetDefinition;
184
+ }
137
185
 
138
186
  /**
139
187
  * FeatureSetCollection profile variable declaration.
@@ -147,7 +195,11 @@ export interface ProfileFeatureSetCollection extends ProfileVariableBase {
147
195
  }
148
196
 
149
197
  /** @deprecated since 5.1. Use ProfileFeatureSetCollection instead. */
150
- export interface IProfileFeatureSetCollection extends ProfileFeatureSetCollection {}
198
+ export interface IProfileFeatureSetCollection extends IProfileVariableBase {
199
+ readonly type: "featureSetCollection";
200
+ /** Describes how the featureSetCollection will find its definition. */
201
+ definition?: FeatureSetCollectionDefinition;
202
+ }
151
203
 
152
204
  /** Voxel profile variable declaration. */
153
205
  export interface ProfileVoxel extends ProfileVariableBase {
@@ -157,7 +209,11 @@ export interface ProfileVoxel extends ProfileVariableBase {
157
209
  }
158
210
 
159
211
  /** @deprecated since 5.1. Use ProfileVoxel instead. */
160
- export interface IProfileVoxel extends ProfileVoxel {}
212
+ export interface IProfileVoxel extends IProfileVariableBase {
213
+ readonly type: "voxel";
214
+ /** Describes how the editor will find the definition for the voxel. */
215
+ definition?: VoxelDefinition;
216
+ }
161
217
 
162
218
  /** Pixel profile variable declaration. */
163
219
  export interface ProfilePixel extends ProfileVariableBase {
@@ -167,12 +223,16 @@ export interface ProfilePixel extends ProfileVariableBase {
167
223
  }
168
224
 
169
225
  /** @deprecated since 5.1. Use ProfilePixel instead. */
170
- export interface IProfilePixel extends ProfilePixel {}
226
+ export interface IProfilePixel extends IProfileVariableBase {
227
+ readonly type: "pixel";
228
+ /** Describes how the editor will find the definition for the pixel. */
229
+ definition?: PixelDefinition;
230
+ }
171
231
 
172
232
  export type FeatureLikeProfile = ProfileFeature | ProfilePixel | ProfileVoxel;
173
233
 
174
234
  /** @deprecated since 5.1. Use FeatureLikeProfile instead. */
175
- export type IFeatureLikeProfile = FeatureLikeProfile;
235
+ export type IFeatureLikeProfile = IProfileFeature | IProfilePixel | IProfileVoxel;
176
236
 
177
237
  /**
178
238
  * Data catalog datastore profile variable declaration.
@@ -275,7 +335,12 @@ export interface PortalItemProperties {
275
335
  }
276
336
 
277
337
  /** @deprecated since 5.1. Use PortalItemProperties instead. */
278
- export interface IPortalItemProperties extends PortalItemProperties {}
338
+ export interface IPortalItemProperties {
339
+ /** The unique portal item id. */
340
+ id: string;
341
+ /** The optional portal url. Default: www.arcgis.com. */
342
+ portal?: { url: string; };
343
+ }
279
344
 
280
345
  /** WebMap and Service FeatureSetCollection can be defined by a portal item. */
281
346
  export interface PortalItemDefinition {
@@ -284,7 +349,10 @@ export interface PortalItemDefinition {
284
349
  }
285
350
 
286
351
  /** @deprecated since 5.1. Use PortalItemDefinition instead. */
287
- export interface IPortalItemDefinition extends PortalItemDefinition {}
352
+ export interface IPortalItemDefinition {
353
+ /** Describes a portal item. */
354
+ portalItem: PortalItemProperties;
355
+ }
288
356
 
289
357
  /** FeatureLayer can be defined from a Feature Layer portal item. */
290
358
  export interface FeatureLayerItemDefinition extends PortalItemDefinition {
@@ -293,7 +361,10 @@ export interface FeatureLayerItemDefinition extends PortalItemDefinition {
293
361
  }
294
362
 
295
363
  /** @deprecated since 5.1. Use FeatureLayerItemDefinition instead. */
296
- export interface IFeatureLayerItemDefinition extends FeatureLayerItemDefinition {}
364
+ export interface IFeatureLayerItemDefinition extends IPortalItemDefinition {
365
+ /** The layer id in the feature layer portal item. Default to 0. */
366
+ layerId?: number;
367
+ }
297
368
 
298
369
  /** FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service. */
299
370
  export interface UrlDefinition {
@@ -302,7 +373,10 @@ export interface UrlDefinition {
302
373
  }
303
374
 
304
375
  /** @deprecated since 5.1. Use UrlDefinition instead. */
305
- export interface IUrlDefinition extends UrlDefinition {}
376
+ export interface IUrlDefinition {
377
+ /** The url of the resource. */
378
+ url?: string | null;
379
+ }
306
380
 
307
381
  /** The most basic way to define a feature or feature set is by passing a collection of fields */
308
382
  export type FieldsDefinition = Pick<FeatureLayer, "fields">;
@@ -350,7 +424,9 @@ export interface ExtendedPredefinedProfile extends PredefinedProfile {
350
424
  }
351
425
 
352
426
  /** @deprecated since 5.1. Use ExtendedPredefinedProfile instead. */
353
- export interface IExtendedPredefinedProfile extends ExtendedPredefinedProfile {}
427
+ export interface IExtendedPredefinedProfile extends IPredefinedProfile {
428
+ additionalVariables?: ProfileVariable[];
429
+ }
354
430
 
355
431
  export interface EditorCodeSuggestionGroup {
356
432
  /** Label for the suggestion group */
@@ -360,7 +436,12 @@ export interface EditorCodeSuggestionGroup {
360
436
  }
361
437
 
362
438
  /** @deprecated since 5.1. Use EditorCodeSuggestionGroup instead. */
363
- export interface IEditorCodeSuggestionGroup extends EditorCodeSuggestionGroup {}
439
+ export interface IEditorCodeSuggestionGroup {
440
+ /** Label for the suggestion group */
441
+ label: string;
442
+ /** List of suggestions for the group */
443
+ suggestions: EditorCodeSuggestion[];
444
+ }
364
445
 
365
446
  export interface EditorCodeSuggestion {
366
447
  /** A short label for the suggestion. Can be thought as a title */
@@ -374,7 +455,16 @@ export interface EditorCodeSuggestion {
374
455
  }
375
456
 
376
457
  /** @deprecated since 5.1. Use EditorCodeSuggestion instead. */
377
- export interface IEditorCodeSuggestion extends EditorCodeSuggestion {}
458
+ export interface IEditorCodeSuggestion {
459
+ /** A short label for the suggestion. Can be thought as a title */
460
+ label: string;
461
+ /** A short description that will be showed below the label in the list of suggestions panel */
462
+ description?: string;
463
+ /** Markdown string that will be rendered along with the code in the detail panel */
464
+ documentation?: string;
465
+ /** The code for the suggestion. Will be injected in the editor is selected */
466
+ code: string;
467
+ }
378
468
 
379
469
  export type SidePanelName = "api" | "none" | "suggestions" | "variables";
380
470
 
@@ -394,7 +484,20 @@ export interface ContextReferences {
394
484
  }
395
485
 
396
486
  /** @deprecated since 5.1. Use ContextReferences instead. */
397
- export interface IContextReferences extends ContextReferences {}
487
+ export interface IContextReferences {
488
+ /**
489
+ * Spatial reference object used to define the spatial reference for the arcade runtime.
490
+ * By defaults, the spatial reference is set to Web Mercator (wkid: 3857).
491
+ */
492
+ spatialReference?: SpatialReference | { wkid: number; } | null;
493
+ /**
494
+ * Defines the default time zone in which to create and display Arcade date types.
495
+ * By default, the time zone is set to "system".
496
+ */
497
+ timeZone?: string;
498
+ /** Defines the "services" passed to the arcade executor. */
499
+ services?: ArcadeServices;
500
+ }
398
501
 
399
502
  /**
400
503
  * If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to
@@ -410,4 +513,10 @@ export interface EditorTestContext extends ContextReferences {
410
513
  }
411
514
 
412
515
  /** @deprecated since 5.1. Use EditorTestContext instead. */
413
- export interface IEditorTestContext extends EditorTestContext {}
516
+ export interface IEditorTestContext extends IContextReferences {
517
+ /**
518
+ * An object of key/value pairs where the key is the name of a profile variable.
519
+ * The key's value must be of type ArcGIS core ProfileVariableInstance.
520
+ */
521
+ profileVariableInstances: ProfileVariableInstances;
522
+ }