@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,87 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
featureservice: string;
|
|
15
|
-
mapservice: string;
|
|
16
|
-
map: string;
|
|
17
|
-
webmap: string;
|
|
18
|
-
webscene: string;
|
|
19
|
-
webmapformat: string;
|
|
20
|
-
item: string;
|
|
21
|
-
invoking: string;
|
|
22
|
-
fields: string;
|
|
23
|
-
values: string;
|
|
24
|
-
relationships: string;
|
|
25
|
-
layers: string;
|
|
26
|
-
tables: string;
|
|
27
|
-
geometry: string;
|
|
28
|
-
dictionary: string;
|
|
29
|
-
feature: string;
|
|
30
|
-
featureset: string;
|
|
31
|
-
featuresetcollection: string;
|
|
32
|
-
oid: string;
|
|
33
|
-
number: string;
|
|
34
|
-
string: string;
|
|
35
|
-
date: string;
|
|
36
|
-
blob: string;
|
|
37
|
-
raster: string;
|
|
38
|
-
guid: string;
|
|
39
|
-
"global-id": string;
|
|
40
|
-
xml: string;
|
|
41
|
-
function: string;
|
|
42
|
-
domainvalues: string;
|
|
43
|
-
subtypes: string;
|
|
44
|
-
domainvaluesfortypeformat: string;
|
|
45
|
-
domainvaluesbysubtypes: string;
|
|
46
|
-
}) => {
|
|
47
|
-
layer: string;
|
|
48
|
-
featureservice: string;
|
|
49
|
-
mapservice: string;
|
|
50
|
-
map: string;
|
|
51
|
-
webmap: string;
|
|
52
|
-
webscene: string;
|
|
53
|
-
webmapformat: string;
|
|
54
|
-
item: string;
|
|
55
|
-
invoking: string;
|
|
56
|
-
fields: string;
|
|
57
|
-
values: string;
|
|
58
|
-
relationships: string;
|
|
59
|
-
layers: string;
|
|
60
|
-
tables: string;
|
|
61
|
-
geometry: string;
|
|
62
|
-
dictionary: string;
|
|
63
|
-
feature: string;
|
|
64
|
-
featureset: string;
|
|
65
|
-
featuresetcollection: string;
|
|
66
|
-
oid: string;
|
|
67
|
-
number: string;
|
|
68
|
-
string: string;
|
|
69
|
-
date: string;
|
|
70
|
-
blob: string;
|
|
71
|
-
raster: string;
|
|
72
|
-
guid: string;
|
|
73
|
-
"global-id": string;
|
|
74
|
-
xml: string;
|
|
75
|
-
function: string;
|
|
76
|
-
domainvalues: string;
|
|
77
|
-
subtypes: string;
|
|
78
|
-
domainvaluesfortypeformat: string;
|
|
79
|
-
domainvaluesbysubtypes: string;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* The editor profile strings.
|
|
83
|
-
*/
|
|
1
|
+
import type VoxelLayer from "@arcgis/core/layers/VoxelLayer";
|
|
2
|
+
import type ImageryLayer from "@arcgis/core/layers/ImageryLayer";
|
|
3
|
+
import type ImageryTileLayer from "@arcgis/core/layers/ImageryTileLayer";
|
|
4
|
+
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
|
|
5
|
+
import type Layer from "@arcgis/core/layers/Layer";
|
|
6
|
+
import type PortalItemResource from "@arcgis/core/portal/PortalItemResource";
|
|
7
|
+
import type WebMap from "@arcgis/core/WebMap";
|
|
8
|
+
import type WebScene from "@arcgis/core/WebScene";
|
|
9
|
+
import type Map from "@arcgis/core/Map";
|
|
10
|
+
import type Domain from "@arcgis/core/layers/support/Domain.js";
|
|
11
|
+
import type { BundleType, ApiItem, ApiVariableType, ProfileId } from "@arcgis/languages-api-utils";
|
|
12
|
+
|
|
13
|
+
/** The editor profile strings. */
|
|
84
14
|
export type ProfileStrings = ReturnType<typeof profileStrings>;
|
|
15
|
+
|
|
85
16
|
/**
|
|
86
17
|
* Editor Profile definition used for configuring the editor:
|
|
87
18
|
* - presenting to the user the Arcade API
|
|
@@ -90,189 +21,146 @@ export type ProfileStrings = ReturnType<typeof profileStrings>;
|
|
|
90
21
|
* - formatting code
|
|
91
22
|
*/
|
|
92
23
|
export interface IEditorProfileDefinition {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*/
|
|
109
|
-
bundles?: BundleType[];
|
|
110
|
-
/**
|
|
111
|
-
* A collection of additional Arcade API items that will be provided at runtime.
|
|
112
|
-
*/
|
|
113
|
-
additionalApiItems?: ApiItem[];
|
|
114
|
-
/**
|
|
115
|
-
* A collection of api item names to hide.
|
|
116
|
-
*/
|
|
117
|
-
hiddenApiItems?: string[];
|
|
24
|
+
/** Optional label for the profile. Used in the editor when displaying the variables panel. */
|
|
25
|
+
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The collection of variables that will be passed to the expression at execution time.
|
|
28
|
+
* The variable declarations are used to help the editor provide validation and completion.
|
|
29
|
+
*/
|
|
30
|
+
variables: IProfileVariable[];
|
|
31
|
+
/** The version of the Arcade API that the editor should use during validation and completion. */
|
|
32
|
+
apiVersion?: string;
|
|
33
|
+
/** The Arcade API bundles that the editor should use during validation and completion. */
|
|
34
|
+
bundles?: BundleType[];
|
|
35
|
+
/** A collection of additional Arcade API items that will be provided at runtime. */
|
|
36
|
+
additionalApiItems?: ApiItem[];
|
|
37
|
+
/** A collection of api item names to hide. */
|
|
38
|
+
hiddenApiItems?: string[];
|
|
118
39
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*/
|
|
40
|
+
|
|
41
|
+
/** The type of variables supported. */
|
|
122
42
|
export type ProfileVariableType = ApiVariableType;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
*/
|
|
43
|
+
|
|
44
|
+
/** The type of value variables supported. */
|
|
126
45
|
export type ProfileVariableValueType = "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time";
|
|
46
|
+
|
|
127
47
|
/**
|
|
128
48
|
* The supported profile variable types.
|
|
129
|
-
* TODO: hopefully align with
|
|
49
|
+
* TODO: hopefully align with \@arcgis/core's Variable type in the future.
|
|
130
50
|
*/
|
|
131
51
|
export type IProfileVariable = IProfileArray | IProfileDictionary | IProfileFeature | IProfileFeatureSet | IProfileFeatureSetCollection | IProfilePixel | IProfileValue | IProfileVoxel;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*/
|
|
52
|
+
|
|
53
|
+
/** Properties common to all profile variables. */
|
|
135
54
|
export interface IProfileVariableBase {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Description for the variable
|
|
142
|
-
*/
|
|
143
|
-
description?: string;
|
|
55
|
+
/** Name of the variable */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Description for the variable */
|
|
58
|
+
description?: string;
|
|
144
59
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*/
|
|
60
|
+
|
|
61
|
+
/** Single value profile variable declaration. */
|
|
148
62
|
export interface IProfileValue extends IProfileVariableBase {
|
|
149
|
-
|
|
63
|
+
readonly type: "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time";
|
|
150
64
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
*/
|
|
65
|
+
|
|
66
|
+
/** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
|
|
154
67
|
export interface IProfileDictionary extends IProfileVariableBase {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*/
|
|
159
|
-
properties?: IProfileVariable[];
|
|
68
|
+
readonly type: "dictionary";
|
|
69
|
+
/** The dictionary properties. Properties are variables as well. */
|
|
70
|
+
properties?: IProfileVariable[];
|
|
160
71
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
*/
|
|
72
|
+
|
|
73
|
+
/** Dictionary profile variable declaration. Properties of a dictionary are profile variables. */
|
|
164
74
|
export interface IProfileArray extends IProfileVariableBase {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
*/
|
|
169
|
-
elementType?: IProfileVariable;
|
|
75
|
+
readonly type: "array";
|
|
76
|
+
/** The type for the array elements. */
|
|
77
|
+
elementType?: IProfileVariable;
|
|
170
78
|
}
|
|
79
|
+
|
|
171
80
|
/**
|
|
172
81
|
* Feature profile variable declaration.
|
|
173
82
|
* Features contains values that can be accessed by a name (aka field name or attribute name).
|
|
174
83
|
* Optionally features can have a geometry that can be accessed by a specialized Arcade function.
|
|
175
84
|
*/
|
|
176
85
|
export interface IProfileFeature extends IProfileVariableBase {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
*/
|
|
181
|
-
definition?: FeatureDefinition;
|
|
86
|
+
readonly type: "feature";
|
|
87
|
+
/** Describes how the editor will find the definition for the feature. */
|
|
88
|
+
definition?: FeatureDefinition;
|
|
182
89
|
}
|
|
90
|
+
|
|
183
91
|
/**
|
|
184
92
|
* FeatureSet profile variable declaration.
|
|
185
93
|
* FeatureSet represents a collection of Features.
|
|
186
94
|
* Individual feature or subset of features can be accessed by using specialized Arcade functions.
|
|
187
95
|
*/
|
|
188
96
|
export interface IProfileFeatureSet extends IProfileVariableBase {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
*/
|
|
193
|
-
definition?: FeatureSetDefinition;
|
|
97
|
+
readonly type: "featureSet";
|
|
98
|
+
/** Describes how the editor will find the definition for the feature set. */
|
|
99
|
+
definition?: FeatureSetDefinition;
|
|
194
100
|
}
|
|
101
|
+
|
|
195
102
|
/**
|
|
196
103
|
* FeatureSetCollection profile variable declaration.
|
|
197
104
|
* FeatureSetCollections are used to represent Feature Services or Web Maps in Arcade expressions.
|
|
198
105
|
* FeatureSetCollections expose two collections of Layers and Tables.
|
|
199
106
|
*/
|
|
200
107
|
export interface IProfileFeatureSetCollection extends IProfileVariableBase {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
*/
|
|
205
|
-
definition?: FeatureSetCollectionDefinition;
|
|
108
|
+
readonly type: "featureSetCollection";
|
|
109
|
+
/** Describes how the featureSetCollection will find its definition. */
|
|
110
|
+
definition?: FeatureSetCollectionDefinition;
|
|
206
111
|
}
|
|
112
|
+
|
|
207
113
|
/**
|
|
208
114
|
* Voxel profile variable declaration.
|
|
209
115
|
* Voxel contains values that can be accessed by a name (aka field name or attribute name).
|
|
210
116
|
*/
|
|
211
117
|
export interface IProfileVoxel extends IProfileVariableBase {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
*/
|
|
216
|
-
definition?: VoxelDefinition;
|
|
118
|
+
readonly type: "voxel";
|
|
119
|
+
/** Describes how the editor will find the definition for the feature. */
|
|
120
|
+
definition?: VoxelDefinition;
|
|
217
121
|
}
|
|
122
|
+
|
|
218
123
|
/**
|
|
219
124
|
* Pixel profile variable declaration.
|
|
220
125
|
* Pixel contains values that can be accessed by a name (aka field name or attribute name).
|
|
221
126
|
*/
|
|
222
127
|
export interface IProfilePixel extends IProfileVariableBase {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
*/
|
|
227
|
-
definition?: PixelDefinition;
|
|
128
|
+
readonly type: "pixel";
|
|
129
|
+
/** Describes how the editor will find the definition for the feature. */
|
|
130
|
+
definition?: PixelDefinition;
|
|
228
131
|
}
|
|
132
|
+
|
|
229
133
|
export type IFeatureLikeProfile = IProfileFeature | IProfilePixel | IProfileVoxel;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
*/
|
|
134
|
+
|
|
135
|
+
/** Describes a portal item. */
|
|
233
136
|
export interface IPortalItemProperties {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* The optional portal url. Default: www.arcgis.com.
|
|
240
|
-
*/
|
|
241
|
-
portal?: {
|
|
242
|
-
url: string;
|
|
243
|
-
};
|
|
137
|
+
/** The unique portal item id. */
|
|
138
|
+
id: string;
|
|
139
|
+
/** The optional portal url. Default: www.arcgis.com. */
|
|
140
|
+
portal?: { url: string; };
|
|
244
141
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
*/
|
|
142
|
+
|
|
143
|
+
/** WebMap and Service FeatureSetCollection can be defined by a portal item. */
|
|
248
144
|
export interface IPortalItemDefinition {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
*/
|
|
252
|
-
portalItem: IPortalItemProperties;
|
|
145
|
+
/** Describes a portal item. */
|
|
146
|
+
portalItem: IPortalItemProperties;
|
|
253
147
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
*/
|
|
148
|
+
|
|
149
|
+
/** FeatureLayer can be defined from a Feature Layer portal item. */
|
|
257
150
|
export interface IFeatureLayerItemDefinition extends IPortalItemDefinition {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*/
|
|
261
|
-
layerId?: number;
|
|
151
|
+
/** The layer id in the feature layer portal item. Default to 0. */
|
|
152
|
+
layerId?: number;
|
|
262
153
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
*/
|
|
154
|
+
|
|
155
|
+
/** FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service. */
|
|
266
156
|
export interface IUrlDefinition {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
*/
|
|
270
|
-
url: string | null | undefined;
|
|
157
|
+
/** The url of the resource. */
|
|
158
|
+
url?: string | null;
|
|
271
159
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
*/
|
|
160
|
+
|
|
161
|
+
/** The most basic way to define a feature or feature set is by passing a collection of fields */
|
|
275
162
|
export type IFieldsDefinition = Pick<FeatureLayer, "fields">;
|
|
163
|
+
|
|
276
164
|
/**
|
|
277
165
|
* FeatureDefinition represents various ways a Feature variable could be defined.
|
|
278
166
|
* Layer instance is the most common way to define a feature,
|
|
@@ -283,184 +171,224 @@ export type IFieldsDefinition = Pick<FeatureLayer, "fields">;
|
|
|
283
171
|
* For the last two options, a feature layer instance will be created by the editor profile.
|
|
284
172
|
*/
|
|
285
173
|
export type FeatureDefinition = IFeatureLayerItemDefinition | IFieldsDefinition | IUrlDefinition;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
*/
|
|
174
|
+
|
|
175
|
+
/** VoxelDefinition represents various ways a Voxel variable could be defined. */
|
|
289
176
|
export type VoxelDefinition = IFeatureLayerItemDefinition | IUrlDefinition | VoxelLayer;
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
*/
|
|
177
|
+
|
|
178
|
+
/** PixelDefinition represents various ways a Pixel variable could be defined. */
|
|
293
179
|
export type PixelDefinition = IFeatureLayerItemDefinition | ImageryLayer | ImageryTileLayer | IUrlDefinition;
|
|
180
|
+
|
|
294
181
|
/**
|
|
295
182
|
* FeatureSetDefinition represents the various ways a FeatureSet variable could be defined.
|
|
296
183
|
* See FeatureDefinition for more details.
|
|
297
184
|
*/
|
|
298
185
|
export type FeatureSetDefinition = IFeatureLayerItemDefinition | IFieldsDefinition | IUrlDefinition;
|
|
186
|
+
|
|
299
187
|
/**
|
|
300
188
|
* FeatureSetCollectionDefinition represents the various ways a FeatureSetCollection could be defined
|
|
301
189
|
* as a feature service or a web map.
|
|
302
190
|
*/
|
|
303
191
|
export type FeatureSetCollectionDefinition = IPortalItemDefinition | IUrlDefinition | Map | WebMap | WebScene;
|
|
192
|
+
|
|
304
193
|
export type VariableDefinitions = Record<string, FeatureDefinition | FeatureSetCollectionDefinition | FeatureSetDefinition | IProfileVariable[] | undefined>;
|
|
194
|
+
|
|
305
195
|
export interface IPredefinedProfile {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).
|
|
316
|
-
*/
|
|
317
|
-
definitions: VariableDefinitions;
|
|
318
|
-
/**
|
|
319
|
-
* A collection of api item names to hide.
|
|
320
|
-
*/
|
|
321
|
-
hiddenApiItems?: string[];
|
|
196
|
+
/** The well known profile ID. */
|
|
197
|
+
id: ProfileId;
|
|
198
|
+
/** The variables that should be disabled for the profile. */
|
|
199
|
+
disabledVariables?: string[];
|
|
200
|
+
/** Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection). */
|
|
201
|
+
definitions: VariableDefinitions;
|
|
202
|
+
/** A collection of api item names to hide. */
|
|
203
|
+
hiddenApiItems?: string[];
|
|
322
204
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
205
|
+
|
|
206
|
+
export type IndexedProfileStrings = ProfileStrings
|
|
207
|
+
& Record<string, string | undefined>;
|
|
208
|
+
|
|
209
|
+
/** Describe the support source for some of the editor variables. */
|
|
327
210
|
export type SupportedSource = IFieldsDefinition;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
*/
|
|
211
|
+
|
|
212
|
+
/** Describe the supported source for pixel variables */
|
|
331
213
|
export type SupportedPixelSource = ImageryLayer | ImageryTileLayer;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
*/
|
|
214
|
+
|
|
215
|
+
/** Describe the supported source for voxel variables */
|
|
335
216
|
export type SupportedVoxelSource = VoxelLayer;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
*/
|
|
217
|
+
|
|
218
|
+
/** Layer that supports title. */
|
|
339
219
|
export type ITitleCapableSource = Pick<Layer, "title">;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
*/
|
|
220
|
+
|
|
221
|
+
/** Layer that supports url. */
|
|
343
222
|
export type IUrlCapableSource = Pick<FeatureLayer, "url">;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
*/
|
|
223
|
+
|
|
224
|
+
/** Layer that supports layer id. */
|
|
347
225
|
export type ILayerIdCapableSource = Pick<FeatureLayer, "layerId">;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
*/
|
|
226
|
+
|
|
227
|
+
/** Layer that supports queryFeatures */
|
|
351
228
|
export interface IFeatureLayerLikeInstance extends IFieldsDefinition, ITitleCapableSource {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
*/
|
|
363
|
-
layerId: number | null | undefined;
|
|
364
|
-
/**
|
|
365
|
-
* Executes a Query against the feature service and returns a Promise to a FeatureSet.
|
|
366
|
-
*/
|
|
367
|
-
queryFeatures: FeatureLayer["queryFeatures"];
|
|
368
|
-
/**
|
|
369
|
-
* The service's metadata JSON exposed by the ArcGIS REST API.
|
|
370
|
-
*/
|
|
371
|
-
sourceJSON?: unknown;
|
|
229
|
+
/** The declared class of the layer. */
|
|
230
|
+
declaredClass: string;
|
|
231
|
+
/** The unique ID assigned to the layer. */
|
|
232
|
+
id: string;
|
|
233
|
+
/** The layer ID, or layer index, of a Feature Service layer. */
|
|
234
|
+
layerId?: number | null;
|
|
235
|
+
/** Executes a Query against the feature service and returns a Promise to a FeatureSet. */
|
|
236
|
+
queryFeatures: FeatureLayer["queryFeatures"];
|
|
237
|
+
/** The service's metadata JSON exposed by the ArcGIS REST API. */
|
|
238
|
+
sourceJSON?: unknown;
|
|
372
239
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
*/
|
|
240
|
+
|
|
241
|
+
/** Layer that supports field domains. */
|
|
376
242
|
export interface IDomainsCapableSource {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
*/
|
|
380
|
-
getFieldDomain: (fieldName: string) => Domain | null;
|
|
243
|
+
/** Returns the Domain associated with the given field name. */
|
|
244
|
+
getFieldDomain: (fieldName: string) => Domain | null;
|
|
381
245
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
*/
|
|
246
|
+
|
|
247
|
+
/** Layer that implements types */
|
|
248
|
+
export type IFeatureTypesCapableSource = IDomainsCapableSource
|
|
249
|
+
& Pick<FeatureLayer, "typeIdField" | "types">;
|
|
250
|
+
|
|
251
|
+
/** Layer that has a subtype field */
|
|
252
|
+
export type ISubtypeFieldCapableSource = IDomainsCapableSource
|
|
253
|
+
& Pick<FeatureLayer, "subtypeField">;
|
|
254
|
+
|
|
255
|
+
/** Layer that exposes subtypes. */
|
|
256
|
+
export type ISubtypesCapableSource = ISubtypeFieldCapableSource
|
|
257
|
+
& Pick<FeatureLayer, "subtypes">;
|
|
258
|
+
|
|
259
|
+
/** Layer that supports relationships. */
|
|
260
|
+
export type IRelationshipsCapableSource = ILayerIdCapableSource
|
|
261
|
+
& IUrlCapableSource
|
|
262
|
+
& Pick<FeatureLayer, "relationships">;
|
|
263
|
+
|
|
264
|
+
/** Layer that is capable of being non-spatial. */
|
|
401
265
|
export type ITableCapableSource = Pick<FeatureLayer, "isTable">;
|
|
266
|
+
|
|
402
267
|
/** Layer that is capable of having geometry */
|
|
403
|
-
export type IGeometryCapableSource = Pick<FeatureLayer, "geometryType">
|
|
404
|
-
|
|
268
|
+
export type IGeometryCapableSource = Pick<FeatureLayer, "geometryType">
|
|
269
|
+
& {
|
|
270
|
+
isTable?: false;
|
|
405
271
|
};
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
*/
|
|
272
|
+
|
|
273
|
+
/** An instance that requires a load operation to be performed. */
|
|
409
274
|
export type ILoadableSource = Pick<Layer, "load">;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
*/
|
|
275
|
+
|
|
276
|
+
/** An instance that requires a loadAll operation to be performed. */
|
|
413
277
|
export type ILoadAllCapable = Pick<WebMap | WebScene, "loadAll">;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
*/
|
|
278
|
+
|
|
279
|
+
/** An instance that is based on a portal item. */
|
|
417
280
|
export type IPortalItemCapable = Pick<PortalItemResource, "portalItem">;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
*/
|
|
281
|
+
|
|
282
|
+
/** An instance that exposes all layers and tables collections. */
|
|
421
283
|
export type IGroupLayerCapable = Pick<Map, "allLayers" | "allTables">;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
*/
|
|
284
|
+
|
|
285
|
+
/** Represents a string that will have to be manufactured from a Intl strings resource. */
|
|
425
286
|
export interface IIntlString {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
*/
|
|
436
|
-
formatValues?: Record<string, string>;
|
|
287
|
+
/** The intl code in the Intl strings resource. */
|
|
288
|
+
code: string;
|
|
289
|
+
/**
|
|
290
|
+
* The properties that the Intl string may leverage during the composition of the string.
|
|
291
|
+
* Example:
|
|
292
|
+
* - the intl string is defined as: "webmaptitle": "Web Map - {title}"
|
|
293
|
+
* - the formatValues should be an object `{title: "California Fires"}`
|
|
294
|
+
*/
|
|
295
|
+
formatValues?: Record<string, string>;
|
|
437
296
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
*/
|
|
297
|
+
|
|
298
|
+
/** The bare minimum interface for layer information coming from the rest API. */
|
|
441
299
|
export interface LayerInfo {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
300
|
+
id: number;
|
|
301
|
+
type: string;
|
|
302
|
+
capabilities?: string;
|
|
445
303
|
}
|
|
304
|
+
|
|
446
305
|
export interface IExtendedPredefinedProfile extends IPredefinedProfile {
|
|
447
|
-
|
|
306
|
+
additionalVariables?: IProfileVariable[];
|
|
448
307
|
}
|
|
308
|
+
|
|
449
309
|
/**
|
|
450
310
|
* Represents the policy for an editor profile. The policy can influence specific configuration and loading behavior of the editor profile.
|
|
451
311
|
*
|
|
452
|
-
* @privateremarks
|
|
453
|
-
* Currently we use this to ignore specific layers in feature set variables for arcade profiles, but the concept is extensible to other configuration and loading behavior in the future.
|
|
312
|
+
* @privateremarks Currently we use this to ignore specific layers in feature set variables for arcade profiles, but the concept is extensible to other configuration and loading behavior in the future.
|
|
454
313
|
*/
|
|
455
314
|
export interface IProfilePolicy {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
315
|
+
/**
|
|
316
|
+
* A hook to filter layers to be included in a feature set collection
|
|
317
|
+
* that source from a map
|
|
318
|
+
*
|
|
319
|
+
* @privateremarks
|
|
320
|
+
* see https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715 for a use case.
|
|
321
|
+
* In arcade we don't want to include certain layer types in the $map variable.
|
|
322
|
+
*/
|
|
323
|
+
filterFsCollectionLayersFromMap?: (layer: Layer) => boolean;
|
|
465
324
|
}
|
|
466
|
-
|
|
325
|
+
|
|
326
|
+
export const profileStrings: (value: {
|
|
327
|
+
layer: string;
|
|
328
|
+
featureservice: string;
|
|
329
|
+
mapservice: string;
|
|
330
|
+
map: string;
|
|
331
|
+
webmap: string;
|
|
332
|
+
webscene: string;
|
|
333
|
+
webmapformat: string;
|
|
334
|
+
item: string;
|
|
335
|
+
invoking: string;
|
|
336
|
+
fields: string;
|
|
337
|
+
values: string;
|
|
338
|
+
relationships: string;
|
|
339
|
+
layers: string;
|
|
340
|
+
tables: string;
|
|
341
|
+
geometry: string;
|
|
342
|
+
dictionary: string;
|
|
343
|
+
feature: string;
|
|
344
|
+
featureset: string;
|
|
345
|
+
featuresetcollection: string;
|
|
346
|
+
oid: string;
|
|
347
|
+
number: string;
|
|
348
|
+
string: string;
|
|
349
|
+
date: string;
|
|
350
|
+
blob: string;
|
|
351
|
+
raster: string;
|
|
352
|
+
guid: string;
|
|
353
|
+
"global-id": string;
|
|
354
|
+
xml: string;
|
|
355
|
+
function: string;
|
|
356
|
+
domainvalues: string;
|
|
357
|
+
subtypes: string;
|
|
358
|
+
domainvaluesfortypeformat: string;
|
|
359
|
+
domainvaluesbysubtypes: string;
|
|
360
|
+
}) => {
|
|
361
|
+
layer: string;
|
|
362
|
+
featureservice: string;
|
|
363
|
+
mapservice: string;
|
|
364
|
+
map: string;
|
|
365
|
+
webmap: string;
|
|
366
|
+
webscene: string;
|
|
367
|
+
webmapformat: string;
|
|
368
|
+
item: string;
|
|
369
|
+
invoking: string;
|
|
370
|
+
fields: string;
|
|
371
|
+
values: string;
|
|
372
|
+
relationships: string;
|
|
373
|
+
layers: string;
|
|
374
|
+
tables: string;
|
|
375
|
+
geometry: string;
|
|
376
|
+
dictionary: string;
|
|
377
|
+
feature: string;
|
|
378
|
+
featureset: string;
|
|
379
|
+
featuresetcollection: string;
|
|
380
|
+
oid: string;
|
|
381
|
+
number: string;
|
|
382
|
+
string: string;
|
|
383
|
+
date: string;
|
|
384
|
+
blob: string;
|
|
385
|
+
raster: string;
|
|
386
|
+
guid: string;
|
|
387
|
+
"global-id": string;
|
|
388
|
+
xml: string;
|
|
389
|
+
function: string;
|
|
390
|
+
domainvalues: string;
|
|
391
|
+
subtypes: string;
|
|
392
|
+
domainvaluesfortypeformat: string;
|
|
393
|
+
domainvaluesbysubtypes: string;
|
|
394
|
+
};
|