@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.
- package/dist/addons/arcade-coding-assistant/useArcadeAssistant.d.ts +7 -17
- package/dist/addons/index.d.ts +2 -2
- package/dist/addons.js +1 -1
- package/dist/cdn/{UCG4NPRP.js → 2263YYN4.js} +2 -2
- package/dist/cdn/{FV6JUYSW.js → 2BB3QRVG.js} +2 -2
- package/dist/cdn/{Q4UHUY3T.js → 2E4AQ7LP.js} +2 -2
- package/dist/cdn/{EZGAUSIF.js → 46IOYPYQ.js} +2 -2
- package/dist/cdn/{DSHANUYF.js → 4FUSZCAD.js} +2 -2
- package/dist/cdn/{22DCBJ5F.js → 7EGGU2CS.js} +2 -2
- package/dist/cdn/{J2DLUEJO.js → 7F5ICS2R.js} +2 -2
- package/dist/cdn/{UI5EVXFU.js → 7YIS622N.js} +2 -2
- package/dist/cdn/{36Y75YKB.js → AU6VAVFX.js} +2 -2
- package/dist/cdn/{TZYBHRPS.js → B6MSWJY2.js} +2 -2
- package/dist/cdn/{U77BQSD4.js → BMKVGGGT.js} +2 -2
- package/dist/cdn/{MEXDPC7D.js → BTLRRKDQ.js} +1 -1
- package/dist/cdn/{HSBLYEZV.js → CP4WW3L6.js} +2 -2
- package/dist/cdn/{RIEACZTY.js → DQ2MOHDK.js} +2 -2
- package/dist/cdn/{UMHPBSPW.js → EFNX7T2R.js} +1 -1
- package/dist/cdn/{TV544T2R.js → EQV3M2CA.js} +2 -2
- package/dist/cdn/{PP7BAX5L.js → EZ5XJTDZ.js} +2 -2
- package/dist/cdn/{TGBYUAUR.js → GAJRGYGF.js} +2 -2
- package/dist/cdn/{XLQLW2QL.js → HHKNAKMH.js} +2 -2
- package/dist/cdn/{H3N4UPAY.js → IAOEXBRW.js} +3 -3
- package/dist/cdn/{UZMYMIUN.js → ICT2QXVB.js} +2 -2
- package/dist/cdn/{PWTWO4LQ.js → IL3ODH4Q.js} +2 -2
- package/dist/cdn/{RFPCEKOB.js → J5BB2DTX.js} +2 -2
- package/dist/cdn/{ZWJAHBIF.js → JGRG3RTL.js} +2 -2
- package/dist/cdn/{YTFTM7FZ.js → KCG4J2TQ.js} +1 -1
- package/dist/cdn/{5N7BLQUC.js → KY2A6GJX.js} +1 -1
- package/dist/cdn/{CUWBQ6DE.js → LZEK7RTW.js} +2 -2
- package/dist/cdn/M2XE3C7T.js +6 -0
- package/dist/cdn/{VDMEGRHB.js → MBTVAM7I.js} +2 -2
- package/dist/cdn/N3P4PLZT.js +4 -0
- package/dist/cdn/{JYHLAFWX.js → NB4EJVRJ.js} +2 -2
- package/dist/cdn/{ZBKMCGR7.js → NGXPOKHF.js} +2 -2
- package/dist/cdn/{PR666JT5.js → NM7YCIBL.js} +2 -2
- package/dist/cdn/{A7BGWNLB.js → OAY75OXY.js} +2 -2
- package/dist/cdn/{MMSAWKPK.js → OHULNXEE.js} +2 -2
- package/dist/cdn/{OZZYHIPM.js → QN4HJ3GS.js} +1 -1
- package/dist/cdn/{ZB3AQDM2.js → RVGC5EOD.js} +2 -2
- package/dist/cdn/{Q6ERATMA.js → TBZNDJPR.js} +2 -2
- package/dist/cdn/{OCXFKC66.js → TFP62745.js} +1 -1
- package/dist/cdn/{ZLUCSP73.js → TXSPPN6R.js} +2 -2
- package/dist/cdn/{4RJPAWSA.js → UV5OY4GJ.js} +2 -2
- package/dist/cdn/W5PHIIDU.js +4 -0
- package/dist/cdn/{Q54H2UGW.js → X6STFO7U.js} +2 -2
- package/dist/cdn/{MGX5UEEJ.js → Y3CNVWXF.js} +3 -3
- package/dist/cdn/{HEOVDTIB.js → YOZZJZW5.js} +2 -2
- package/dist/cdn/{OAJKP3TF.js → Z2EROYP7.js} +1 -1
- package/dist/cdn/{224QUA5Z.js → Z45QIMDD.js} +2 -2
- package/dist/cdn/{OCZIBXWV.js → ZEXTPWCM.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +2 -2
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/colorize.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +3 -3
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/monaco-theme.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/{arcade-contribution.js → setup-monaco-theme.js} +40 -40
- package/dist/chunks/sql-expr-defaults.js +2 -2
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +3 -48
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +123 -112
- package/dist/components/arcgis-arcade-editor/customElement.js +2 -2
- package/dist/components/arcgis-arcade-editor/index.d.ts +0 -13
- package/dist/components/arcgis-arcade-results/customElement.js +7 -7
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.d.ts +74 -81
- package/dist/components/arcgis-code-editor/customElement.js +3 -3
- package/dist/components/arcgis-code-editor-shell/customElement.d.ts +9 -5
- package/dist/components/arcgis-code-editor-shell/customElement.js +1 -1
- package/dist/components/arcgis-code-viewer/customElement.d.ts +23 -37
- package/dist/components/arcgis-code-viewer/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +53 -49
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/index.d.ts +0 -7
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +1 -1470
- package/dist/docs/docs.json +1 -1381
- package/dist/docs/vscode.css-custom-data.json +1 -35
- package/dist/docs/vscode.html-custom-data.json +1 -119
- package/dist/docs/web-types.json +1 -385
- package/dist/index.d.ts +34 -21
- package/dist/index.js +1 -1
- package/dist/loader.js +7 -7
- package/dist/types/lumina.d.ts +11 -11
- package/dist/types/preact.d.ts +11 -11
- package/dist/types/react.d.ts +11 -11
- package/dist/types/stencil.d.ts +11 -11
- package/dist/utils/arcade-assistant/types.d.ts +8 -72
- package/dist/utils/arcade-executor.d.ts +158 -126
- package/dist/utils/arcade-monaco/arcade-defaults.d.ts +9 -49
- package/dist/utils/custom-panel.d.ts +35 -30
- package/dist/utils/editor-suggestions.d.ts +17 -28
- package/dist/utils/index.d.ts +4 -6
- package/dist/utils/profile/types.d.ts +273 -345
- package/dist/utils/sql-expr-monaco/sql-expr-defaults.d.ts +8 -22
- package/package.json +6 -6
- package/dist/addons/arcade-coding-assistant/chat-helper.d.ts +0 -78
- package/dist/addons/arcade-coding-assistant/index.d.ts +0 -2
- package/dist/addons/arcade-coding-assistant/temporary-strings.d.ts +0 -47
- package/dist/cdn/2WNWZ6AD.js +0 -4
- package/dist/cdn/EGURZWSY.js +0 -4
- package/dist/cdn/TIR4RXVC.js +0 -6
- package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +0 -45
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +0 -235
- package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +0 -27
- package/dist/components/arcgis-arcade-results/customElement.d.ts +0 -32
- package/dist/components/arcgis-arcade-results/functional.d.ts +0 -73
- package/dist/components/arcgis-arcade-results/index.d.ts +0 -10
- package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +0 -24
- package/dist/components/arcgis-arcade-suggestions/index.d.ts +0 -10
- package/dist/components/arcgis-editor-variables/customElement.d.ts +0 -40
- package/dist/components/arcgis-editor-variables/index.d.ts +0 -10
- package/dist/components/arcgis-language-api-panel/customElement.d.ts +0 -42
- package/dist/components/arcgis-language-api-panel/index.d.ts +0 -11
- package/dist/components/arcgis-sql-expression-fields/customElement.d.ts +0 -23
- package/dist/components/arcgis-sql-expression-fields/index.d.ts +0 -7
- package/dist/controllers/useT9n.d.ts +0 -1
- package/dist/runtime.d.ts +0 -6
- package/dist/utils/arcade-assistant/aiContext.d.ts +0 -6
- package/dist/utils/arcade-assistant/constants.d.ts +0 -2
- package/dist/utils/arcade-assistant/utils.d.ts +0 -9
- package/dist/utils/arcade-monaco/arcade-contribution.d.ts +0 -1
- package/dist/utils/arcade-monaco/arcade-language-features.d.ts +0 -35
- package/dist/utils/arcade-monaco/arcade-language-syntax.d.ts +0 -3
- package/dist/utils/arcade-monaco/arcade-mode.d.ts +0 -29
- package/dist/utils/arcade-monaco/arcade-profile-strategy.d.ts +0 -12
- package/dist/utils/arcade-monaco/arcade-service-accessors.d.ts +0 -31
- package/dist/utils/arcade-monaco/arcade-worker-manager.d.ts +0 -22
- package/dist/utils/arcade-monaco/arcade.worker.d.ts +0 -23
- package/dist/utils/arcade-monaco/types.d.ts +0 -9
- package/dist/utils/colorize.d.ts +0 -5
- package/dist/utils/constants.d.ts +0 -3
- package/dist/utils/css-vars.d.ts +0 -7
- package/dist/utils/fields.d.ts +0 -20
- package/dist/utils/internal-monaco-apis.d.ts +0 -67
- package/dist/utils/language-defaults-base.d.ts +0 -76
- package/dist/utils/markdown.d.ts +0 -6
- package/dist/utils/monaco-importer.d.ts +0 -28
- package/dist/utils/monaco-languages.d.ts +0 -17
- package/dist/utils/monaco-theme.json.d.ts +0 -27
- package/dist/utils/monaco-typings.d.ts +0 -8
- package/dist/utils/patch-monaco.d.ts +0 -16
- package/dist/utils/profile/editor-profile.d.ts +0 -278
- package/dist/utils/profile/utils.d.ts +0 -49
- package/dist/utils/setup-monaco-theme.d.ts +0 -1
- package/dist/utils/setup-monaco.d.ts +0 -31
- package/dist/utils/sql-expr-monaco/sql-expr-completion.d.ts +0 -74
- package/dist/utils/sql-expr-monaco/sql-expr-constants.d.ts +0 -67
- package/dist/utils/sql-expr-monaco/sql-expr-contribution.d.ts +0 -1
- package/dist/utils/sql-expr-monaco/sql-expr-language-features.d.ts +0 -23
- package/dist/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +0 -3
- package/dist/utils/sql-expr-monaco/sql-expr-mode.d.ts +0 -43
- package/dist/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +0 -36
- package/dist/utils/sql-expr-monaco/sql-expr-profile-utils.d.ts +0 -5
- package/dist/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +0 -19
- package/dist/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -33
- package/dist/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +0 -82
- package/dist/utils/sql-expr-monaco/sql-expr-validation.d.ts +0 -41
- package/dist/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +0 -22
- package/dist/utils/sql-expr-monaco/sql-expr.worker.d.ts +0 -22
- package/dist/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +0 -13
- package/dist/utils/sql-expr-monaco/types.d.ts +0 -96
- package/dist/utils/utilities.d.ts +0 -16
|
@@ -1,174 +1,206 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
86
|
-
type: ResultType;
|
|
87
|
-
timeStamp?: Date;
|
|
88
|
-
compilationTime?: number;
|
|
89
|
-
executionTime?: number;
|
|
90
|
-
}
|
|
38
|
+
|
|
91
39
|
export interface IArcadeResultUnknown extends IArcadeResultBase {
|
|
92
|
-
|
|
40
|
+
type: "unknown";
|
|
93
41
|
}
|
|
42
|
+
|
|
94
43
|
export interface IArcadeResultNull extends IArcadeResultBase {
|
|
95
|
-
|
|
44
|
+
type: "null";
|
|
96
45
|
}
|
|
46
|
+
|
|
97
47
|
export interface IArcadeResultError extends IArcadeResultBase {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
48
|
+
type: "error";
|
|
49
|
+
value: string;
|
|
50
|
+
error: unknown;
|
|
101
51
|
}
|
|
52
|
+
|
|
102
53
|
export interface IArcadeResultArray extends IArcadeResultBase {
|
|
103
|
-
|
|
104
|
-
|
|
54
|
+
type: "array";
|
|
55
|
+
value: unknown[];
|
|
105
56
|
}
|
|
57
|
+
|
|
106
58
|
export interface IArcadeResultDate extends IArcadeResultBase {
|
|
107
|
-
|
|
108
|
-
|
|
59
|
+
type: "date";
|
|
60
|
+
value: Date | IArcadeRuntimeDate;
|
|
109
61
|
}
|
|
62
|
+
|
|
110
63
|
export interface IArcadeResultDateOnly extends IArcadeResultBase {
|
|
111
|
-
|
|
112
|
-
|
|
64
|
+
type: "dateOnly";
|
|
65
|
+
value: IArcadeRuntimeDateOnly;
|
|
113
66
|
}
|
|
67
|
+
|
|
114
68
|
export interface IArcadeResultTimeOnly extends IArcadeResultBase {
|
|
115
|
-
|
|
116
|
-
|
|
69
|
+
type: "time";
|
|
70
|
+
value: IArcadeRuntimeTimeOnly;
|
|
117
71
|
}
|
|
72
|
+
|
|
118
73
|
export interface IArcadeResultString extends IArcadeResultBase {
|
|
119
|
-
|
|
120
|
-
|
|
74
|
+
type: "text";
|
|
75
|
+
value: string;
|
|
121
76
|
}
|
|
77
|
+
|
|
122
78
|
export interface IArcadeResultNumber extends IArcadeResultBase {
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
type: "number";
|
|
80
|
+
value: number;
|
|
125
81
|
}
|
|
82
|
+
|
|
126
83
|
export interface IArcadeResultBoolean extends IArcadeResultBase {
|
|
127
|
-
|
|
128
|
-
|
|
84
|
+
type: "boolean";
|
|
85
|
+
value: boolean;
|
|
129
86
|
}
|
|
87
|
+
|
|
130
88
|
export interface IArcadeResultDictionary extends IArcadeResultBase {
|
|
131
|
-
|
|
132
|
-
|
|
89
|
+
type: "dictionary";
|
|
90
|
+
value: IArcadeRuntimeDictionary;
|
|
133
91
|
}
|
|
92
|
+
|
|
134
93
|
export interface IArcadeResultGeometry extends IArcadeResultBase {
|
|
135
|
-
|
|
136
|
-
|
|
94
|
+
type: "geometry";
|
|
95
|
+
value: GeometryUnion;
|
|
137
96
|
}
|
|
97
|
+
|
|
138
98
|
export interface IArcadeResultKnowledgeGraph extends IArcadeResultBase {
|
|
139
|
-
|
|
140
|
-
|
|
99
|
+
type: "knowledgeGraph";
|
|
100
|
+
value: KnowledgeGraph;
|
|
141
101
|
}
|
|
102
|
+
|
|
142
103
|
export interface IArcadeResultFeature extends IArcadeResultBase {
|
|
143
|
-
|
|
144
|
-
|
|
104
|
+
type: "feature";
|
|
105
|
+
value: IArcadeRuntimeDictionary;
|
|
145
106
|
}
|
|
107
|
+
|
|
146
108
|
export interface IArcadeResultPixel extends IArcadeResultBase {
|
|
147
|
-
|
|
148
|
-
|
|
109
|
+
type: "pixel";
|
|
110
|
+
value: IArcadeRuntimeDictionary;
|
|
149
111
|
}
|
|
112
|
+
|
|
150
113
|
export interface IArcadeResultFeatureSet extends IArcadeResultBase {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
114
|
+
type: "featureSet";
|
|
115
|
+
value: IArcadeRuntimeFeatureSet;
|
|
116
|
+
iterator: IArcadeRuntimeFeatureSetIterator | null;
|
|
117
|
+
features: IArcadeRuntimeDictionary[];
|
|
155
118
|
}
|
|
119
|
+
|
|
156
120
|
export interface IArcadeResultPortal extends IArcadeResultBase {
|
|
157
|
-
|
|
158
|
-
|
|
121
|
+
type: "portal";
|
|
122
|
+
value: IArcadeRuntimeDictionary;
|
|
159
123
|
}
|
|
124
|
+
|
|
160
125
|
export interface IArcadeResultAttachment extends IArcadeResultBase {
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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?:
|
|
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<
|
|
50
|
-
};
|
|
51
|
-
export type { ArcadeLanguageServiceDefaults };
|
|
10
|
+
getApiLibraryForModel: (modelId: string) => Promise<Array<ApiCategory>>;
|
|
11
|
+
};
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import { JsxNode } from
|
|
2
|
-
import { ArcgisArcadeEditor } from
|
|
3
|
-
import { IconName } from
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
13
|
-
*/
|
|
7
|
+
|
|
8
|
+
/** Defines a code suggestion */
|
|
14
9
|
export interface IEditorCodeSuggestion {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
19
|
+
|
|
20
|
+
/** @param item */
|
|
21
|
+
export function isSuggestionGroups(item: unknown): item is IEditorCodeSuggestionGroup[];
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export * from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** @public */
|
|
6
|
-
export * from './editor-suggestions';
|
|
1
|
+
export * from "./arcade-executor";
|
|
2
|
+
export type * from "./profile/types";
|
|
3
|
+
export * from "./editor-suggestions";
|
|
4
|
+
|