@arcgis/coding-components 5.0.0-next.136 → 5.0.0-next.138

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 (176) hide show
  1. package/dist/addons/arcade-coding-assistant/useArcadeAssistant.d.ts +7 -17
  2. package/dist/addons/index.d.ts +2 -2
  3. package/dist/addons.js +1 -1
  4. package/dist/cdn/{UCG4NPRP.js → 2263YYN4.js} +2 -2
  5. package/dist/cdn/{FV6JUYSW.js → 2BB3QRVG.js} +2 -2
  6. package/dist/cdn/{Q4UHUY3T.js → 2E4AQ7LP.js} +2 -2
  7. package/dist/cdn/{EZGAUSIF.js → 46IOYPYQ.js} +2 -2
  8. package/dist/cdn/{DSHANUYF.js → 4FUSZCAD.js} +2 -2
  9. package/dist/cdn/{22DCBJ5F.js → 7EGGU2CS.js} +2 -2
  10. package/dist/cdn/{J2DLUEJO.js → 7F5ICS2R.js} +2 -2
  11. package/dist/cdn/{UI5EVXFU.js → 7YIS622N.js} +2 -2
  12. package/dist/cdn/{36Y75YKB.js → AU6VAVFX.js} +2 -2
  13. package/dist/cdn/{TZYBHRPS.js → B6MSWJY2.js} +2 -2
  14. package/dist/cdn/{U77BQSD4.js → BMKVGGGT.js} +2 -2
  15. package/dist/cdn/{MEXDPC7D.js → BTLRRKDQ.js} +1 -1
  16. package/dist/cdn/{HSBLYEZV.js → CP4WW3L6.js} +2 -2
  17. package/dist/cdn/{RIEACZTY.js → DQ2MOHDK.js} +2 -2
  18. package/dist/cdn/{UMHPBSPW.js → EFNX7T2R.js} +1 -1
  19. package/dist/cdn/{TV544T2R.js → EQV3M2CA.js} +2 -2
  20. package/dist/cdn/{PP7BAX5L.js → EZ5XJTDZ.js} +2 -2
  21. package/dist/cdn/{TGBYUAUR.js → GAJRGYGF.js} +2 -2
  22. package/dist/cdn/{XLQLW2QL.js → HHKNAKMH.js} +2 -2
  23. package/dist/cdn/{H3N4UPAY.js → IAOEXBRW.js} +3 -3
  24. package/dist/cdn/{UZMYMIUN.js → ICT2QXVB.js} +2 -2
  25. package/dist/cdn/{PWTWO4LQ.js → IL3ODH4Q.js} +2 -2
  26. package/dist/cdn/{RFPCEKOB.js → J5BB2DTX.js} +2 -2
  27. package/dist/cdn/{ZWJAHBIF.js → JGRG3RTL.js} +2 -2
  28. package/dist/cdn/{YTFTM7FZ.js → KCG4J2TQ.js} +1 -1
  29. package/dist/cdn/{5N7BLQUC.js → KY2A6GJX.js} +1 -1
  30. package/dist/cdn/{CUWBQ6DE.js → LZEK7RTW.js} +2 -2
  31. package/dist/cdn/M2XE3C7T.js +6 -0
  32. package/dist/cdn/{VDMEGRHB.js → MBTVAM7I.js} +2 -2
  33. package/dist/cdn/N3P4PLZT.js +4 -0
  34. package/dist/cdn/{JYHLAFWX.js → NB4EJVRJ.js} +2 -2
  35. package/dist/cdn/{ZBKMCGR7.js → NGXPOKHF.js} +2 -2
  36. package/dist/cdn/{PR666JT5.js → NM7YCIBL.js} +2 -2
  37. package/dist/cdn/{A7BGWNLB.js → OAY75OXY.js} +2 -2
  38. package/dist/cdn/{MMSAWKPK.js → OHULNXEE.js} +2 -2
  39. package/dist/cdn/{OZZYHIPM.js → QN4HJ3GS.js} +1 -1
  40. package/dist/cdn/{ZB3AQDM2.js → RVGC5EOD.js} +2 -2
  41. package/dist/cdn/{Q6ERATMA.js → TBZNDJPR.js} +2 -2
  42. package/dist/cdn/{OCXFKC66.js → TFP62745.js} +1 -1
  43. package/dist/cdn/{ZLUCSP73.js → TXSPPN6R.js} +2 -2
  44. package/dist/cdn/{4RJPAWSA.js → UV5OY4GJ.js} +2 -2
  45. package/dist/cdn/W5PHIIDU.js +4 -0
  46. package/dist/cdn/{Q54H2UGW.js → X6STFO7U.js} +2 -2
  47. package/dist/cdn/{MGX5UEEJ.js → Y3CNVWXF.js} +3 -3
  48. package/dist/cdn/{HEOVDTIB.js → YOZZJZW5.js} +2 -2
  49. package/dist/cdn/{OAJKP3TF.js → Z2EROYP7.js} +1 -1
  50. package/dist/cdn/{224QUA5Z.js → Z45QIMDD.js} +2 -2
  51. package/dist/cdn/{OCZIBXWV.js → ZEXTPWCM.js} +1 -1
  52. package/dist/cdn/index.js +2 -2
  53. package/dist/chunks/arcade-defaults.js +2 -2
  54. package/dist/chunks/arcade-executor.js +1 -1
  55. package/dist/chunks/arcade-mode.js +1 -1
  56. package/dist/chunks/arcade-service-accessors.js +1 -1
  57. package/dist/chunks/colorize.js +1 -1
  58. package/dist/chunks/fields.js +1 -1
  59. package/dist/chunks/language-defaults-base.js +3 -3
  60. package/dist/chunks/markdown.js +1 -1
  61. package/dist/chunks/monaco-importer.js +1 -1
  62. package/dist/chunks/monaco-theme.js +1 -1
  63. package/dist/chunks/runtime.js +1 -1
  64. package/dist/chunks/{arcade-contribution.js → setup-monaco-theme.js} +40 -40
  65. package/dist/chunks/sql-expr-defaults.js +2 -2
  66. package/dist/chunks/sql-expr-mode.js +1 -1
  67. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  68. package/dist/chunks/useT9n.js +1 -1
  69. package/dist/chunks/utilities.js +1 -1
  70. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  71. package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +3 -48
  72. package/dist/components/arcgis-arcade-editor/customElement.d.ts +123 -112
  73. package/dist/components/arcgis-arcade-editor/customElement.js +2 -2
  74. package/dist/components/arcgis-arcade-editor/index.d.ts +0 -13
  75. package/dist/components/arcgis-arcade-results/customElement.js +7 -7
  76. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  77. package/dist/components/arcgis-code-editor/customElement.d.ts +74 -81
  78. package/dist/components/arcgis-code-editor/customElement.js +3 -3
  79. package/dist/components/arcgis-code-editor-shell/customElement.d.ts +9 -5
  80. package/dist/components/arcgis-code-editor-shell/customElement.js +1 -1
  81. package/dist/components/arcgis-code-viewer/customElement.d.ts +23 -37
  82. package/dist/components/arcgis-code-viewer/customElement.js +2 -2
  83. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  84. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  85. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +53 -49
  86. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  87. package/dist/components/arcgis-sql-expression-editor/index.d.ts +0 -7
  88. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  89. package/dist/docs/api.json +1 -1470
  90. package/dist/docs/docs.json +1 -1381
  91. package/dist/docs/vscode.css-custom-data.json +1 -35
  92. package/dist/docs/vscode.html-custom-data.json +1 -119
  93. package/dist/docs/web-types.json +1 -385
  94. package/dist/index.d.ts +34 -21
  95. package/dist/index.js +1 -1
  96. package/dist/loader.js +7 -7
  97. package/dist/types/lumina.d.ts +11 -11
  98. package/dist/types/preact.d.ts +11 -11
  99. package/dist/types/react.d.ts +11 -11
  100. package/dist/types/stencil.d.ts +11 -11
  101. package/dist/utils/arcade-assistant/types.d.ts +8 -72
  102. package/dist/utils/arcade-executor.d.ts +158 -126
  103. package/dist/utils/arcade-monaco/arcade-defaults.d.ts +9 -49
  104. package/dist/utils/custom-panel.d.ts +35 -30
  105. package/dist/utils/editor-suggestions.d.ts +17 -28
  106. package/dist/utils/index.d.ts +4 -6
  107. package/dist/utils/profile/types.d.ts +273 -345
  108. package/dist/utils/sql-expr-monaco/sql-expr-defaults.d.ts +8 -22
  109. package/package.json +6 -6
  110. package/dist/addons/arcade-coding-assistant/chat-helper.d.ts +0 -78
  111. package/dist/addons/arcade-coding-assistant/index.d.ts +0 -2
  112. package/dist/addons/arcade-coding-assistant/temporary-strings.d.ts +0 -47
  113. package/dist/cdn/2WNWZ6AD.js +0 -4
  114. package/dist/cdn/EGURZWSY.js +0 -4
  115. package/dist/cdn/TIR4RXVC.js +0 -6
  116. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +0 -45
  117. package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +0 -235
  118. package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +0 -27
  119. package/dist/components/arcgis-arcade-results/customElement.d.ts +0 -32
  120. package/dist/components/arcgis-arcade-results/functional.d.ts +0 -73
  121. package/dist/components/arcgis-arcade-results/index.d.ts +0 -10
  122. package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +0 -24
  123. package/dist/components/arcgis-arcade-suggestions/index.d.ts +0 -10
  124. package/dist/components/arcgis-editor-variables/customElement.d.ts +0 -40
  125. package/dist/components/arcgis-editor-variables/index.d.ts +0 -10
  126. package/dist/components/arcgis-language-api-panel/customElement.d.ts +0 -42
  127. package/dist/components/arcgis-language-api-panel/index.d.ts +0 -11
  128. package/dist/components/arcgis-sql-expression-fields/customElement.d.ts +0 -23
  129. package/dist/components/arcgis-sql-expression-fields/index.d.ts +0 -7
  130. package/dist/controllers/useT9n.d.ts +0 -1
  131. package/dist/runtime.d.ts +0 -6
  132. package/dist/utils/arcade-assistant/aiContext.d.ts +0 -6
  133. package/dist/utils/arcade-assistant/constants.d.ts +0 -2
  134. package/dist/utils/arcade-assistant/utils.d.ts +0 -9
  135. package/dist/utils/arcade-monaco/arcade-contribution.d.ts +0 -1
  136. package/dist/utils/arcade-monaco/arcade-language-features.d.ts +0 -35
  137. package/dist/utils/arcade-monaco/arcade-language-syntax.d.ts +0 -3
  138. package/dist/utils/arcade-monaco/arcade-mode.d.ts +0 -29
  139. package/dist/utils/arcade-monaco/arcade-profile-strategy.d.ts +0 -12
  140. package/dist/utils/arcade-monaco/arcade-service-accessors.d.ts +0 -31
  141. package/dist/utils/arcade-monaco/arcade-worker-manager.d.ts +0 -22
  142. package/dist/utils/arcade-monaco/arcade.worker.d.ts +0 -23
  143. package/dist/utils/arcade-monaco/types.d.ts +0 -9
  144. package/dist/utils/colorize.d.ts +0 -5
  145. package/dist/utils/constants.d.ts +0 -3
  146. package/dist/utils/css-vars.d.ts +0 -7
  147. package/dist/utils/fields.d.ts +0 -20
  148. package/dist/utils/internal-monaco-apis.d.ts +0 -67
  149. package/dist/utils/language-defaults-base.d.ts +0 -76
  150. package/dist/utils/markdown.d.ts +0 -6
  151. package/dist/utils/monaco-importer.d.ts +0 -28
  152. package/dist/utils/monaco-languages.d.ts +0 -17
  153. package/dist/utils/monaco-theme.json.d.ts +0 -27
  154. package/dist/utils/monaco-typings.d.ts +0 -8
  155. package/dist/utils/patch-monaco.d.ts +0 -16
  156. package/dist/utils/profile/editor-profile.d.ts +0 -278
  157. package/dist/utils/profile/utils.d.ts +0 -49
  158. package/dist/utils/setup-monaco-theme.d.ts +0 -1
  159. package/dist/utils/setup-monaco.d.ts +0 -31
  160. package/dist/utils/sql-expr-monaco/sql-expr-completion.d.ts +0 -74
  161. package/dist/utils/sql-expr-monaco/sql-expr-constants.d.ts +0 -67
  162. package/dist/utils/sql-expr-monaco/sql-expr-contribution.d.ts +0 -1
  163. package/dist/utils/sql-expr-monaco/sql-expr-language-features.d.ts +0 -23
  164. package/dist/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +0 -3
  165. package/dist/utils/sql-expr-monaco/sql-expr-mode.d.ts +0 -43
  166. package/dist/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +0 -36
  167. package/dist/utils/sql-expr-monaco/sql-expr-profile-utils.d.ts +0 -5
  168. package/dist/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +0 -19
  169. package/dist/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -33
  170. package/dist/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +0 -82
  171. package/dist/utils/sql-expr-monaco/sql-expr-validation.d.ts +0 -41
  172. package/dist/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +0 -22
  173. package/dist/utils/sql-expr-monaco/sql-expr.worker.d.ts +0 -22
  174. package/dist/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +0 -13
  175. package/dist/utils/sql-expr-monaco/types.d.ts +0 -96
  176. package/dist/utils/utilities.d.ts +0 -16
@@ -1,174 +1,206 @@
1
- import { IEditorProfileDefinition } from './profile/types';
2
- import { ProfileVariableInstances, ArcadeServices } from '@arcgis/core/arcade';
3
- import { GeometryUnion } from '@arcgis/core/unionTypes';
4
- import { default as Field } from '@arcgis/core/layers/support/Field';
5
- import { default as KnowledgeGraph } from '@arcgis/core/rest/knowledgeGraph/KnowledgeGraph';
6
- import { default as SpatialReference } from '@arcgis/core/geometry/SpatialReference';
7
- interface IContextReferences {
8
- /**
9
- * Spatial reference object used to define the spatial reference for the arcade runtime.
10
- * By defaults, the spatial reference is set to Web Mercator (wkid: 3857).
11
- */
12
- spatialReference?: SpatialReference | {
13
- wkid: number;
14
- } | null;
15
- /**
16
- * Defines the default time zone in which to create and display Arcade date types.
17
- * By default, the time zone is set to "system".
18
- */
19
- timeZone?: string;
20
- /**
21
- * Defines the "services" passed to the arcade executor.
22
- */
23
- services?: ArcadeServices;
24
- }
1
+ import type Field from "@arcgis/core/layers/support/Field";
2
+ import type KnowledgeGraph from "@arcgis/core/rest/knowledgeGraph/KnowledgeGraph";
3
+ import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
4
+ import type { IEditorProfileDefinition } from "./profile/types.js";
5
+ import type { ProfileVariableInstances, ArcadeServices } from "@arcgis/core/arcade";
6
+ import type { GeometryUnion } from "@arcgis/core/unionTypes";
7
+
25
8
  /**
26
9
  * If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to
27
10
  * wkid: 3857.
28
11
  * The test context objects allows to set the execution spatial reference for such scenario.
29
12
  */
30
13
  export interface IEditorTestContext extends IContextReferences {
31
- /**
32
- * An object of key/value pairs where the key is the name of a profile variable.
33
- * The key's value must be of type ArcGIS core ProfileVariableInstance.
34
- */
35
- profileVariableInstances: ProfileVariableInstances;
36
- }
37
- /**
38
- * @deprecated Use IEditorTestContext instead.
39
- */
14
+ /**
15
+ * An object of key/value pairs where the key is the name of a profile variable.
16
+ * The key's value must be of type ArcGIS core ProfileVariableInstance.
17
+ */
18
+ profileVariableInstances: ProfileVariableInstances;
19
+ }
20
+
21
+ /** @deprecated Use IEditorTestContext instead. */
40
22
  export type EditorTestContext = IEditorTestContext;
23
+
41
24
  export interface IArcadeRuntimeDictionary {
42
- declaredClass?: string;
43
- arcadeDeclaredClass?: string;
44
- keys: () => string[];
45
- field: (name: string) => unknown;
46
- geometry?: () => GeometryUnion;
47
- castAsJson: () => Record<string, unknown>;
48
- }
25
+ declaredClass?: string;
26
+ arcadeDeclaredClass?: string;
27
+ keys: () => string[];
28
+ field: (name: string) => unknown;
29
+ geometry?: () => GeometryUnion;
30
+ castAsJson: () => Record<string, unknown>;
31
+ }
32
+
49
33
  export interface IAbortSignal {
50
- aborted: boolean;
51
- }
52
- interface IArcadeRuntimeFeatureSet {
53
- declaredRootClass: string;
54
- fields: Field[] | null;
55
- load: () => Promise<IArcadeRuntimeFeatureSet>;
56
- iterator: (abortSignal: IAbortSignal) => IArcadeRuntimeFeatureSetIterator;
57
- }
58
- interface IArcadeRuntimeFeatureSetIterator {
59
- nextBatchAsArcadeFeatures: (bsize: number, timeZone: string) => Promise<IArcadeRuntimeDictionary[] | null>;
60
- }
61
- interface IArcadeRuntimeDate {
62
- declaredRootClass: string;
63
- toDateTime: () => {
64
- setLocale: (locale: string) => {
65
- toFormat: (format: string) => string;
66
- };
67
- };
68
- isUnknownTimeZone: boolean;
69
- }
70
- interface IArcadeRuntimeDateOnly {
71
- declaredRootClass: string;
72
- /**
73
- * To ISO Date format
74
- */
75
- toString: () => string;
76
- }
77
- interface IArcadeRuntimeTimeOnly {
78
- declaredRootClass: string;
79
- /**
80
- * To ISO Time format
81
- */
82
- toString: () => string;
34
+ aborted: boolean;
83
35
  }
36
+
84
37
  export type ResultType = "array" | "attachment" | "boolean" | "date" | "dateOnly" | "dictionary" | "error" | "feature" | "featureSet" | "geometry" | "knowledgeGraph" | "null" | "number" | "pixel" | "portal" | "text" | "time" | "unknown";
85
- interface IArcadeResultBase {
86
- type: ResultType;
87
- timeStamp?: Date;
88
- compilationTime?: number;
89
- executionTime?: number;
90
- }
38
+
91
39
  export interface IArcadeResultUnknown extends IArcadeResultBase {
92
- type: "unknown";
40
+ type: "unknown";
93
41
  }
42
+
94
43
  export interface IArcadeResultNull extends IArcadeResultBase {
95
- type: "null";
44
+ type: "null";
96
45
  }
46
+
97
47
  export interface IArcadeResultError extends IArcadeResultBase {
98
- type: "error";
99
- value: string;
100
- error: unknown;
48
+ type: "error";
49
+ value: string;
50
+ error: unknown;
101
51
  }
52
+
102
53
  export interface IArcadeResultArray extends IArcadeResultBase {
103
- type: "array";
104
- value: unknown[];
54
+ type: "array";
55
+ value: unknown[];
105
56
  }
57
+
106
58
  export interface IArcadeResultDate extends IArcadeResultBase {
107
- type: "date";
108
- value: Date | IArcadeRuntimeDate;
59
+ type: "date";
60
+ value: Date | IArcadeRuntimeDate;
109
61
  }
62
+
110
63
  export interface IArcadeResultDateOnly extends IArcadeResultBase {
111
- type: "dateOnly";
112
- value: IArcadeRuntimeDateOnly;
64
+ type: "dateOnly";
65
+ value: IArcadeRuntimeDateOnly;
113
66
  }
67
+
114
68
  export interface IArcadeResultTimeOnly extends IArcadeResultBase {
115
- type: "time";
116
- value: IArcadeRuntimeTimeOnly;
69
+ type: "time";
70
+ value: IArcadeRuntimeTimeOnly;
117
71
  }
72
+
118
73
  export interface IArcadeResultString extends IArcadeResultBase {
119
- type: "text";
120
- value: string;
74
+ type: "text";
75
+ value: string;
121
76
  }
77
+
122
78
  export interface IArcadeResultNumber extends IArcadeResultBase {
123
- type: "number";
124
- value: number;
79
+ type: "number";
80
+ value: number;
125
81
  }
82
+
126
83
  export interface IArcadeResultBoolean extends IArcadeResultBase {
127
- type: "boolean";
128
- value: boolean;
84
+ type: "boolean";
85
+ value: boolean;
129
86
  }
87
+
130
88
  export interface IArcadeResultDictionary extends IArcadeResultBase {
131
- type: "dictionary";
132
- value: IArcadeRuntimeDictionary;
89
+ type: "dictionary";
90
+ value: IArcadeRuntimeDictionary;
133
91
  }
92
+
134
93
  export interface IArcadeResultGeometry extends IArcadeResultBase {
135
- type: "geometry";
136
- value: GeometryUnion;
94
+ type: "geometry";
95
+ value: GeometryUnion;
137
96
  }
97
+
138
98
  export interface IArcadeResultKnowledgeGraph extends IArcadeResultBase {
139
- type: "knowledgeGraph";
140
- value: KnowledgeGraph;
99
+ type: "knowledgeGraph";
100
+ value: KnowledgeGraph;
141
101
  }
102
+
142
103
  export interface IArcadeResultFeature extends IArcadeResultBase {
143
- type: "feature";
144
- value: IArcadeRuntimeDictionary;
104
+ type: "feature";
105
+ value: IArcadeRuntimeDictionary;
145
106
  }
107
+
146
108
  export interface IArcadeResultPixel extends IArcadeResultBase {
147
- type: "pixel";
148
- value: IArcadeRuntimeDictionary;
109
+ type: "pixel";
110
+ value: IArcadeRuntimeDictionary;
149
111
  }
112
+
150
113
  export interface IArcadeResultFeatureSet extends IArcadeResultBase {
151
- type: "featureSet";
152
- value: IArcadeRuntimeFeatureSet;
153
- iterator: IArcadeRuntimeFeatureSetIterator | null;
154
- features: IArcadeRuntimeDictionary[];
114
+ type: "featureSet";
115
+ value: IArcadeRuntimeFeatureSet;
116
+ iterator: IArcadeRuntimeFeatureSetIterator | null;
117
+ features: IArcadeRuntimeDictionary[];
155
118
  }
119
+
156
120
  export interface IArcadeResultPortal extends IArcadeResultBase {
157
- type: "portal";
158
- value: IArcadeRuntimeDictionary;
121
+ type: "portal";
122
+ value: IArcadeRuntimeDictionary;
159
123
  }
124
+
160
125
  export interface IArcadeResultAttachment extends IArcadeResultBase {
161
- type: "attachment";
162
- value: IArcadeRuntimeDictionary;
126
+ type: "attachment";
127
+ value: IArcadeRuntimeDictionary;
163
128
  }
129
+
164
130
  export type ArcadeResult = IArcadeResultArray | IArcadeResultAttachment | IArcadeResultBoolean | IArcadeResultDate | IArcadeResultDateOnly | IArcadeResultDictionary | IArcadeResultError | IArcadeResultFeature | IArcadeResultFeatureSet | IArcadeResultGeometry | IArcadeResultKnowledgeGraph | IArcadeResultNull | IArcadeResultNumber | IArcadeResultPixel | IArcadeResultPortal | IArcadeResultString | IArcadeResultTimeOnly | IArcadeResultUnknown;
165
- export declare function valueToArcadeResult(value: unknown): ArcadeResult;
166
- export declare function formatArcadeResultDate(dateObject: IArcadeResultDate, lang?: string): string;
167
- export declare function formatArcadeResultDateOnly(dateObject: IArcadeResultDateOnly): string;
168
- export declare function formatArcadeResultTimeOnly(dateObject: IArcadeResultTimeOnly): string;
169
- declare function convertScriptOutputToArcadeResult(scriptOutput: unknown, timeZone?: string): Promise<ArcadeResult>;
170
- export declare function executeScript(editorProfile: IEditorProfileDefinition | undefined, script: string | undefined, testContext: IEditorTestContext, console?: (log: string) => void): Promise<ArcadeResult>;
171
- export declare const exportsForTests: {
172
- convertScriptOutputToArcadeResult: typeof convertScriptOutputToArcadeResult;
173
- };
174
- export {};
131
+
132
+ /** @param value */
133
+ export function valueToArcadeResult(value: unknown): ArcadeResult;
134
+
135
+ /**
136
+ * @param dateObject
137
+ * @param lang
138
+ */
139
+ export function formatArcadeResultDate(dateObject: IArcadeResultDate, lang?: string): string;
140
+
141
+ /** @param dateObject */
142
+ export function formatArcadeResultDateOnly(dateObject: IArcadeResultDateOnly): string;
143
+
144
+ /** @param dateObject */
145
+ export function formatArcadeResultTimeOnly(dateObject: IArcadeResultTimeOnly): string;
146
+
147
+ /**
148
+ * @param editorProfile
149
+ * @param script
150
+ * @param testContext
151
+ * @param console
152
+ */
153
+ export function executeScript(editorProfile: IEditorProfileDefinition | undefined, script: string | undefined, testContext: IEditorTestContext, console?: (log: string) => void): Promise<ArcadeResult>;
154
+
155
+ export const exportsForTests: { convertScriptOutputToArcadeResult: (scriptOutput: unknown, timeZone?: string) => Promise<ArcadeResult>; };
156
+
157
+ export interface IContextReferences {
158
+ /**
159
+ * Spatial reference object used to define the spatial reference for the arcade runtime.
160
+ * By defaults, the spatial reference is set to Web Mercator (wkid: 3857).
161
+ */
162
+ spatialReference?: SpatialReference | { wkid: number; } | null;
163
+ /**
164
+ * Defines the default time zone in which to create and display Arcade date types.
165
+ * By default, the time zone is set to "system".
166
+ */
167
+ timeZone?: string;
168
+ /** Defines the "services" passed to the arcade executor. */
169
+ services?: ArcadeServices;
170
+ }
171
+
172
+ export interface IArcadeRuntimeFeatureSet {
173
+ declaredRootClass: string;
174
+ fields: Field[] | null;
175
+ load: () => Promise<IArcadeRuntimeFeatureSet>;
176
+ iterator: (abortSignal: IAbortSignal) => IArcadeRuntimeFeatureSetIterator;
177
+ }
178
+
179
+ export interface IArcadeRuntimeFeatureSetIterator {
180
+ nextBatchAsArcadeFeatures: (bsize: number, timeZone: string) => Promise<IArcadeRuntimeDictionary[] | null>;
181
+ }
182
+
183
+ export interface IArcadeRuntimeDate {
184
+ declaredRootClass: string;
185
+ toDateTime: () => { setLocale: (locale: string) => { toFormat: (format: string) => string; }; };
186
+ isUnknownTimeZone: boolean;
187
+ }
188
+
189
+ export interface IArcadeRuntimeDateOnly {
190
+ declaredRootClass: string;
191
+ /** To ISO Date format */
192
+ toString: () => string;
193
+ }
194
+
195
+ export interface IArcadeRuntimeTimeOnly {
196
+ declaredRootClass: string;
197
+ /** To ISO Time format */
198
+ toString: () => string;
199
+ }
200
+
201
+ export interface IArcadeResultBase {
202
+ type: ResultType;
203
+ timeStamp?: Date;
204
+ compilationTime?: number;
205
+ executionTime?: number;
206
+ }
@@ -1,51 +1,11 @@
1
- import { ArcadeApiContext } from '@arcgis/arcade-languageservice';
2
- import { ApiSnippet } from '@arcgis/languages-api-utils';
3
- import { Uri } from 'monaco-editor';
4
- import { IEditorProfileDefinition, IPredefinedProfile } from '../profile/types';
5
- import { LanguageDefaultsBase } from '../language-defaults-base';
6
- /**
7
- * Provides default configuration and per-model state management for the Arcade language service.
8
- *
9
- * In addition to the base language defaults, this class manages an {@link EditorProfile} and the
10
- * corresponding API context for each Monaco model. It serializes profile updates on a per-model basis
11
- * to prevent race conditions when multiple asynchronous profile changes are requested in quick succession.
12
- *
13
- * @remarks
14
- * Profile updates are queued per model key because `setProfileForModel` performs multiple asynchronous steps
15
- * (e.g., loading localized strings, converting predefined profiles, converting editor profiles to API profiles,
16
- * and disposing/reinitializing per-model state). Without serialization, an older request could complete after a
17
- * newer request and overwrite the latest context.
18
- *
19
- * @example
20
- * ```ts
21
- * await defaults.setProfileForModel(model.uri, predefinedProfile, { locale: "en" });
22
- * await defaults.setProfileForModel(model.uri, editorProfileDefinition, { locale: "fr", snippets });
23
- * ```
24
- */
25
- declare class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase<ArcadeApiContext> {
26
- #private;
27
- constructor();
28
- /**
29
- * Create an EditorProfile for the given model id using the given definition and locale.
30
- * The EditorProfile is used by the the Arcade Language service as well by the coding components.
31
- * The definition can be a pre-defined profile or an editor profile definition.
32
- * If the locale is not provided then the 'en' locale is used.
33
- * @param modelId The model id for which to create the context.
34
- * @param definition The definition to use for the model context.
35
- * @param locale The locale to use for the model context.
36
- * @returns The EditorProfile for the model.
37
- */
38
- setProfileForModel(modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
1
+ import type { IEditorProfileDefinition, IPredefinedProfile } from "../profile/types.js";
2
+ import type { Uri as Uri2 } from "monaco-editor/esm/vs/editor/editor.api.js";
3
+ import type { ApiSnippet as ApiSnippet2, ApiCategory } from "@arcgis/languages-api-utils/dist/types.js";
4
+
5
+ export const arcade: {
6
+ setProfileForModel: (modelId: string | Uri2, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
39
7
  locale: string;
40
- snippets?: ApiSnippet[];
41
- }): Promise<void>;
42
- }
43
- export declare const arcadeDefaults: ArcadeLanguageServiceDefaults;
44
- export declare const arcade: {
45
- setProfileForModel: (modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
46
- locale: string;
47
- snippets?: ApiSnippet[];
8
+ snippets?: Array<ApiSnippet2> | undefined;
48
9
  }) => Promise<void>;
49
- getApiLibraryForModel: (modelId: string) => Promise<import('@arcgis/languages-api-utils').ApiCategory[]>;
50
- };
51
- export type { ArcadeLanguageServiceDefaults };
10
+ getApiLibraryForModel: (modelId: string) => Promise<Array<ApiCategory>>;
11
+ };
@@ -1,31 +1,36 @@
1
- import { JsxNode } from '@arcgis/lumina';
2
- import { ArcgisArcadeEditor } from '../components/arcgis-arcade-editor/customElement.js';
3
- import { IconName } from '../components/arcgis-arcade-coding-assistant/types';
4
- type IBaseCustomPanel = {
5
- /** Unique ID */
6
- id: string;
7
- name: string;
8
- location: "sidebar";
9
- renderer: ({ closePanel, insertText, closed, editorRef, }: {
10
- closePanel: (e: Event) => void;
11
- insertText: (text: string) => void;
12
- closed: boolean;
13
- editorRef: ArcgisArcadeEditor;
14
- }) => JsxNode;
15
- };
16
- type ICustomSidePanel = IBaseCustomPanel & {
17
- /** Calcite icon */
18
- icon: IconName;
19
- /** Optional description */
20
- description?: string;
21
- /** Optional flag to indicate that the user is providing custom flow items
22
- * @deprecated - this is not used in the codebase and will be removed in the future.
23
- */
24
- useFlows?: boolean;
25
- /** Optional flag to tell the editor if the panel is enabled, defaults to true */
26
- enabled?: boolean;
27
- /** location */
28
- location: "sidebar";
29
- };
1
+ import type { JsxNode } from "@arcgis/lumina";
2
+ import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/customElement.js";
3
+ import type { IconName } from "../components/arcgis-arcade-coding-assistant/types.js";
4
+
30
5
  export type ICustomPanel = ICustomSidePanel;
31
- export {};
6
+
7
+ export type ICustomSidePanel = IBaseCustomPanel
8
+ & {
9
+ /** Calcite icon */
10
+ icon: IconName;
11
+ /** Optional description */
12
+ description?: string;
13
+ /**
14
+ * Optional flag to indicate that the user is providing custom flow items
15
+ *
16
+ * @deprecated - this is not used in the codebase and will be removed in the future.
17
+ */
18
+ useFlows?: boolean;
19
+ /** Optional flag to tell the editor if the panel is enabled, defaults to true */
20
+ enabled?: boolean;
21
+ /** location */
22
+ location: "sidebar";
23
+ };
24
+
25
+ export type IBaseCustomPanel = {
26
+ /** Unique ID */
27
+ id: string;
28
+ name: string;
29
+ location: "sidebar";
30
+ renderer: ({ closePanel, insertText, closed, editorRef, }: {
31
+ closePanel: (e: Event) => void;
32
+ insertText: (text: string) => void;
33
+ closed: boolean;
34
+ editorRef: ArcgisArcadeEditor;
35
+ }) => JsxNode;
36
+ };
@@ -1,32 +1,21 @@
1
1
  export interface IEditorCodeSuggestionGroup {
2
- /**
3
- * Label for the suggestion group
4
- */
5
- label: string;
6
- /**
7
- * List of suggestions for the group
8
- */
9
- suggestions: IEditorCodeSuggestion[];
2
+ /** Label for the suggestion group */
3
+ label: string;
4
+ /** List of suggestions for the group */
5
+ suggestions: IEditorCodeSuggestion[];
10
6
  }
11
- /**
12
- * Defines a code suggestion
13
- */
7
+
8
+ /** Defines a code suggestion */
14
9
  export interface IEditorCodeSuggestion {
15
- /**
16
- * A short label for the suggestion. Can be thought as a title
17
- */
18
- label: string;
19
- /**
20
- * A short description that will be showed below the label in the list of suggestions panel
21
- */
22
- description?: string;
23
- /**
24
- * Markdown string that will be rendered along with the code in the detail panel
25
- */
26
- documentation?: string;
27
- /**
28
- * The code for the suggestion. Will be injected in the editor is selected
29
- */
30
- code: string;
10
+ /** A short label for the suggestion. Can be thought as a title */
11
+ label: string;
12
+ /** A short description that will be showed below the label in the list of suggestions panel */
13
+ description?: string;
14
+ /** Markdown string that will be rendered along with the code in the detail panel */
15
+ documentation?: string;
16
+ /** The code for the suggestion. Will be injected in the editor is selected */
17
+ code: string;
31
18
  }
32
- export declare function isSuggestionGroups(item: unknown): item is IEditorCodeSuggestionGroup[];
19
+
20
+ /** @param item */
21
+ export function isSuggestionGroups(item: unknown): item is IEditorCodeSuggestionGroup[];
@@ -1,6 +1,4 @@
1
- /** @public */
2
- export * from './arcade-executor';
3
- /** @public */
4
- export type * from './profile/types';
5
- /** @public */
6
- export * from './editor-suggestions';
1
+ export * from "./arcade-executor";
2
+ export type * from "./profile/types";
3
+ export * from "./editor-suggestions";
4
+