@arcgis/coding-components 5.0.0-next.86 → 5.0.0-next.88
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/chat-helper.d.ts +2 -2
- package/dist/addons.js +1 -1
- package/dist/cdn/{CEE3ZJUA.js → 36XPZFOT.js} +2 -2
- package/dist/cdn/{WI4BDXBY.js → 3M7SZYPN.js} +2 -2
- package/dist/cdn/{OVV6WXX7.js → 472G7GZ4.js} +2 -2
- package/dist/cdn/{J2SETKWM.js → 4GT2KL7A.js} +2 -2
- package/dist/cdn/{JPLSYGHT.js → 4RXKRZBZ.js} +2 -2
- package/dist/cdn/{SWSJLICP.js → 57XZ5RMI.js} +3 -3
- package/dist/cdn/{IVXRAZY5.js → 5M26RSF3.js} +1 -1
- package/dist/cdn/{HI5LKY6R.js → 5QVEAJ73.js} +2 -2
- package/dist/cdn/{33X46FFL.js → 5TX2G7XJ.js} +2 -2
- package/dist/cdn/{RZ4DRTSI.js → 64XMCCSN.js} +2 -2
- package/dist/cdn/{XDOANCWB.js → 6NHI3LBU.js} +2 -2
- package/dist/cdn/{5MPQLT5X.js → 7EIT3Q6J.js} +2 -2
- package/dist/cdn/BQ7FHQUX.js +4 -0
- package/dist/cdn/{DD6ZRT43.js → BQLGOZSH.js} +2 -2
- package/dist/cdn/{HNMU72SH.js → C6BD4IBD.js} +2 -2
- package/dist/cdn/{N3MHW6AM.js → C6JXJQWK.js} +2 -2
- package/dist/cdn/{W7DH63B3.js → CIIPVQFF.js} +2 -2
- package/dist/cdn/{KT6E5ZTM.js → DH5FCW7L.js} +2 -2
- package/dist/cdn/{S5A4U67W.js → EF6D3U5O.js} +2 -2
- package/dist/cdn/{5WXTHFB6.js → HD4ON74D.js} +1 -1
- package/dist/cdn/{5JYRNSC3.js → HGZJRTUC.js} +2 -2
- package/dist/cdn/HLGHGJVC.js +6 -0
- package/dist/cdn/{GGKL5FWT.js → HY3ILV5W.js} +1 -1
- package/dist/cdn/{HMWZEC7D.js → I4FXINPB.js} +2 -2
- package/dist/cdn/{MCGQ6KRV.js → J76PBJ7W.js} +1 -1
- package/dist/cdn/{VYCA3AJT.js → JEX3DDG3.js} +1 -1
- package/dist/cdn/{3JQZLQ6X.js → JSKAVLMU.js} +1 -1
- package/dist/cdn/{WHDQGCW7.js → KBNJTYAP.js} +2 -2
- package/dist/cdn/{MDIQFVFA.js → LTLA7NXM.js} +2 -2
- package/dist/cdn/{IC67HR3V.js → LYEKOYZT.js} +2 -2
- package/dist/cdn/{BTHHVPUO.js → MOPDGBIL.js} +2 -2
- package/dist/cdn/{BCHJVYE5.js → NCOVKISH.js} +2 -2
- package/dist/cdn/{ZK3HCKLO.js → ND46SRRX.js} +2 -2
- package/dist/cdn/{FITYHC24.js → OXDUPWIV.js} +2 -2
- package/dist/cdn/{XIOTAEZY.js → Q3EJREP5.js} +2 -2
- package/dist/cdn/{V4TG6GDW.js → QJMI3PBT.js} +2 -2
- package/dist/cdn/{GGTAF434.js → QXMHPMV7.js} +2 -2
- package/dist/cdn/{3DX6HUJZ.js → SNWULMXU.js} +2 -2
- package/dist/cdn/{2LDLCX6R.js → SXRTIYTX.js} +2 -2
- package/dist/cdn/{A7GC2RAP.js → TWLAYRFG.js} +1 -1
- package/dist/cdn/{HMLBWY5X.js → TXYUJLT6.js} +2 -2
- package/dist/cdn/{G2MNT5MH.js → U33ZYSZW.js} +2 -2
- package/dist/cdn/{HUDN4YMY.js → V2VZZXEA.js} +1 -1
- package/dist/cdn/{TTAY72VH.js → V3QTIBFO.js} +2 -2
- package/dist/cdn/{ROG4QBVE.js → V7N4GWXK.js} +2 -2
- package/dist/cdn/{USZ2KUJP.js → WPA27SNO.js} +1 -1
- package/dist/cdn/{7I7EBDPY.js → XCOFPTGU.js} +2 -2
- package/dist/cdn/{SE4PPQQW.js → XQAIHQEQ.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +888 -879
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-contribution.js +1 -1
- package/dist/chunks/arcade-defaults.js +1 -1
- 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/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- 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/sql-expr-defaults.js +1 -1
- 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.d.ts +12 -2
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +42 -42
- package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +2 -2
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/functional.d.ts +2 -2
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-code-viewer/customElement.js +1 -1
- 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.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/monacoStyles.js +1 -1
- package/dist/utils/arcade-executor.d.ts +11 -8
- package/dist/utils/fields.d.ts +7 -6
- package/dist/utils/profile/editor-profile.d.ts +11 -7
- package/dist/utils/profile/types.d.ts +26 -21
- package/dist/utils/profile/utils.d.ts +13 -7
- package/dist/utils/sql-expr-monaco/sql-expr-completion.d.ts +2 -2
- package/dist/utils/sql-expr-monaco/sql-expr-constants.d.ts +14 -13
- package/dist/utils/sql-expr-monaco/sql-expr-defaults.d.ts +3 -3
- package/dist/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +8 -8
- package/dist/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +10 -10
- package/dist/utils/sql-expr-monaco/sql-expr-validation.d.ts +2 -2
- package/dist/utils/sql-expr-monaco/types.d.ts +9 -7
- package/dist/utils/utilities.d.ts +2 -2
- package/package.json +5 -5
- package/dist/cdn/BLVE5YQR.js +0 -6
- package/dist/cdn/QFHNOTXM.js +0 -4
|
@@ -10,7 +10,7 @@ import { load as I } from "@arcgis/lumina/controllers";
|
|
|
10
10
|
import { Range as v, Uri as s, KeyMod as n, KeyCode as r } from "monaco-editor";
|
|
11
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
13
|
-
v5.0.0-next.
|
|
13
|
+
v5.0.0-next.88 */
|
|
14
14
|
const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`, y = {
|
|
15
15
|
autoIndent: "advanced",
|
|
16
16
|
automaticLayout: !0,
|
|
@@ -11,7 +11,7 @@ import { debounce as y } from "@arcgis/toolkit/function";
|
|
|
11
11
|
import { Task as N } from "@lit/task";
|
|
12
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
14
|
-
v5.0.0-next.
|
|
14
|
+
v5.0.0-next.88 */
|
|
15
15
|
const O = E`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`;
|
|
16
16
|
class w extends p {
|
|
17
17
|
constructor() {
|
|
@@ -7,7 +7,7 @@ import { createFilterExpression as f } from "@arcgis/toolkit/string";
|
|
|
7
7
|
import { u as m } from "../../chunks/useT9n.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
10
|
-
v5.0.0-next.
|
|
10
|
+
v5.0.0-next.88 */
|
|
11
11
|
const u = n`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -9,7 +9,7 @@ import { c as n } from "../../chunks/markdown.js";
|
|
|
9
9
|
import { u as f } from "../../chunks/useT9n.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.88 */
|
|
13
13
|
const g = m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
14
|
class b extends h {
|
|
15
15
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { s as f } from "../../chunks/editor.js";
|
|
|
9
9
|
import { getSqlExprDiagnosticService as _ } from "../../chunks/sql-expr-mode.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.88 */
|
|
13
13
|
const u = n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
|
|
14
14
|
class m extends c {
|
|
15
15
|
constructor() {
|
|
@@ -6,7 +6,7 @@ import { a as m } from "../../chunks/sql-expr-defaults.js";
|
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
-
v5.0.0-next.
|
|
9
|
+
v5.0.0-next.88 */
|
|
10
10
|
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
11
|
class g extends n {
|
|
12
12
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "5.0.0-next.
|
|
4
|
+
"version": "5.0.0-next.88",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.88 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as s } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
-
v5.0.0-next.
|
|
5
|
+
v5.0.0-next.88 */
|
|
6
6
|
const a = s(e, {
|
|
7
7
|
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
|
|
8
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
package/dist/monacoStyles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.88 */
|
|
4
4
|
const A = `/*!-----------------------------------------------------------
|
|
5
5
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
6
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { IEditorProfileDefinition } from './profile/types';
|
|
3
|
-
import { ProfileVariableInstances,
|
|
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';
|
|
4
7
|
interface IContextReferences {
|
|
5
8
|
/**
|
|
6
9
|
* Spatial reference object used to define the spatial reference for the arcade runtime.
|
|
7
10
|
* By defaults, the spatial reference is set to Web Mercator (wkid: 3857).
|
|
8
11
|
*/
|
|
9
|
-
spatialReference?:
|
|
12
|
+
spatialReference?: SpatialReference | {
|
|
10
13
|
wkid: number;
|
|
11
14
|
} | null;
|
|
12
15
|
/**
|
|
@@ -17,7 +20,7 @@ interface IContextReferences {
|
|
|
17
20
|
/**
|
|
18
21
|
* Defines the "services" passed to the arcade executor.
|
|
19
22
|
*/
|
|
20
|
-
services?:
|
|
23
|
+
services?: ArcadeServices;
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to
|
|
@@ -40,7 +43,7 @@ export interface IArcadeRuntimeDictionary {
|
|
|
40
43
|
arcadeDeclaredClass?: string;
|
|
41
44
|
keys: () => string[];
|
|
42
45
|
field: (name: string) => unknown;
|
|
43
|
-
geometry?: () =>
|
|
46
|
+
geometry?: () => GeometryUnion;
|
|
44
47
|
castAsJson: () => Record<string, unknown>;
|
|
45
48
|
}
|
|
46
49
|
export interface IAbortSignal {
|
|
@@ -48,7 +51,7 @@ export interface IAbortSignal {
|
|
|
48
51
|
}
|
|
49
52
|
interface IArcadeRuntimeFeatureSet {
|
|
50
53
|
declaredRootClass: string;
|
|
51
|
-
fields:
|
|
54
|
+
fields: Field[] | null;
|
|
52
55
|
load: () => Promise<IArcadeRuntimeFeatureSet>;
|
|
53
56
|
iterator: (abortSignal: IAbortSignal) => IArcadeRuntimeFeatureSetIterator;
|
|
54
57
|
}
|
|
@@ -130,11 +133,11 @@ export interface IArcadeResultDictionary extends IArcadeResultBase {
|
|
|
130
133
|
}
|
|
131
134
|
export interface IArcadeResultGeometry extends IArcadeResultBase {
|
|
132
135
|
type: "geometry";
|
|
133
|
-
value:
|
|
136
|
+
value: GeometryUnion;
|
|
134
137
|
}
|
|
135
138
|
export interface IArcadeResultKnowledgeGraph extends IArcadeResultBase {
|
|
136
139
|
type: "knowledgeGraph";
|
|
137
|
-
value:
|
|
140
|
+
value: KnowledgeGraph;
|
|
138
141
|
}
|
|
139
142
|
export interface IArcadeResultFeature extends IArcadeResultBase {
|
|
140
143
|
type: "feature";
|
package/dist/utils/fields.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { Variable } from '@arcgis/core/arcade';
|
|
2
|
+
import { default as Field } from '@arcgis/core/layers/support/Field';
|
|
2
3
|
import { ApiValueVariableType } from '@arcgis/languages-api-utils';
|
|
3
4
|
/**
|
|
4
5
|
* The set of calcite icons we use in the arcade editor to represent field and variable types.
|
|
@@ -7,13 +8,13 @@ type EditorIcons = "calendar" | "clock" | "cube" | "date-time" | "double-float-s
|
|
|
7
8
|
/**
|
|
8
9
|
* Returns an icon name for the field type
|
|
9
10
|
*/
|
|
10
|
-
export declare function fieldTypeToIconName(field:
|
|
11
|
+
export declare function fieldTypeToIconName(field: Field, members?: Variable[]): EditorIcons;
|
|
11
12
|
/** Returns the icon name for an \@arcgis/core profile variable */
|
|
12
|
-
export declare function memberToIconName(member:
|
|
13
|
+
export declare function memberToIconName(member: Variable): EditorIcons;
|
|
13
14
|
/**
|
|
14
15
|
* Returns the ApiValueVariable type for the given field.
|
|
15
16
|
*/
|
|
16
|
-
export declare function fieldTypeToApiValueVarType(field:
|
|
17
|
-
export declare function supportedFields(fields:
|
|
18
|
-
export declare function fieldAlias(field:
|
|
17
|
+
export declare function fieldTypeToApiValueVarType(field: Field): ApiValueVariableType;
|
|
18
|
+
export declare function supportedFields(fields: Field[] | null | undefined): Field[];
|
|
19
|
+
export declare function fieldAlias(field: Field): string;
|
|
19
20
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { ApiVariableType, ApiValueVariable } from '@arcgis/languages-api-utils';
|
|
2
|
+
import { default as WebMap } from '@arcgis/core/WebMap.js';
|
|
3
|
+
import { default as WebScene } from '@arcgis/core/WebScene.js';
|
|
4
|
+
import { default as Field } from '@arcgis/core/layers/support/Field';
|
|
5
|
+
import { default as Map } from '@arcgis/core/Map';
|
|
6
|
+
import { Variable } from '@arcgis/core/arcade';
|
|
3
7
|
import type * as types from "./types";
|
|
4
8
|
/**
|
|
5
9
|
* FeatureSetCollection interface. Used in Arcade expressions to represent Web Maps
|
|
@@ -20,13 +24,13 @@ interface IFeatureSetCollections {
|
|
|
20
24
|
* If the feature set collection represents a Web Map or a Web Scene then it will contain the instance.
|
|
21
25
|
* If the feature set collection represents a service then it will be its URL.
|
|
22
26
|
*/
|
|
23
|
-
source:
|
|
27
|
+
source: Map | WebMap | WebScene | string;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* converts fields to profile values and calculates the feature completion description all in one iteration
|
|
27
31
|
*/
|
|
28
|
-
export declare function fieldsToProfileValues(fields:
|
|
29
|
-
export declare function membersToProfileValues(members:
|
|
32
|
+
export declare function fieldsToProfileValues(fields: Field[], initialFeatureCompletionDescription: string, includeAliases?: boolean): [ApiValueVariable[], string];
|
|
33
|
+
export declare function membersToProfileValues(members: Variable[], initialCompletionDescription: string): [ApiValueVariable[], string];
|
|
30
34
|
type ProfileItemType = ApiVariableType | "group";
|
|
31
35
|
export type EditorVariable = ArrayVariable | DictionaryVariable | FeatureSetCollectionVariable | FeatureSetVariable | FeatureVariable | PixelVariable | ValueVariable | VoxelVariable;
|
|
32
36
|
interface ConstructorProperties<T> {
|
|
@@ -182,8 +186,8 @@ declare abstract class SourceBasedVariable<SupportedSource = types.SupportedSour
|
|
|
182
186
|
protected abstract _loadSource(): Promise<SupportedSource | null>;
|
|
183
187
|
private _getValueSnippet;
|
|
184
188
|
private _getSubtypeOrDomainNameSnippet;
|
|
185
|
-
protected _getFieldProperty(field:
|
|
186
|
-
protected _getMemberProperty(member:
|
|
189
|
+
protected _getFieldProperty(field: Field, members?: Variable[]): EditorVariable;
|
|
190
|
+
protected _getMemberProperty(member: Variable): EditorVariable;
|
|
187
191
|
private _getDomainDictionary;
|
|
188
192
|
private _getSubtypeDomainDictionary;
|
|
189
193
|
private _getFeatureTypeDomainDictionary;
|
|
@@ -191,7 +195,7 @@ declare abstract class SourceBasedVariable<SupportedSource = types.SupportedSour
|
|
|
191
195
|
private _getTypeOrSubtypeDomainGroup;
|
|
192
196
|
private _getCodedValueDomainGroup;
|
|
193
197
|
private _getDomainValuesGroup;
|
|
194
|
-
protected _createDomainDictionary(field:
|
|
198
|
+
protected _createDomainDictionary(field: Field): DictionaryVariable;
|
|
195
199
|
protected _getRelationshipsProperty(): Promise<GroupOfVariables | null>;
|
|
196
200
|
}
|
|
197
201
|
declare abstract class FeatureLikeVariable<T = types.SupportedSource> extends SourceBasedVariable<T> {
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { BundleType, ApiItem, ApiVariableType, ProfileId } from '@arcgis/languages-api-utils';
|
|
3
2
|
import { default as VoxelLayer } from '@arcgis/core/layers/VoxelLayer';
|
|
4
3
|
import { default as ImageryLayer } from '@arcgis/core/layers/ImageryLayer';
|
|
5
4
|
import { default as ImageryTileLayer } from '@arcgis/core/layers/ImageryTileLayer';
|
|
6
5
|
import { default as FeatureLayer } from '@arcgis/core/layers/FeatureLayer.js';
|
|
6
|
+
import { default as Layer } from '@arcgis/core/layers/Layer';
|
|
7
|
+
import { default as PortalItemResource } from '@arcgis/core/portal/PortalItemResource';
|
|
8
|
+
import { default as WebMap } from '@arcgis/core/WebMap';
|
|
9
|
+
import { default as WebScene } from '@arcgis/core/WebScene';
|
|
10
|
+
import { default as Map } from '@arcgis/core/Map';
|
|
11
|
+
import { default as Domain } from '@arcgis/core/layers/support/Domain.js';
|
|
7
12
|
declare const profileStrings: (value: {
|
|
8
13
|
layer: string;
|
|
9
14
|
featureservice: string;
|
|
@@ -262,12 +267,12 @@ export interface IUrlDefinition {
|
|
|
262
267
|
/**
|
|
263
268
|
* The url of the resource.
|
|
264
269
|
*/
|
|
265
|
-
url:
|
|
270
|
+
url: string | null | undefined;
|
|
266
271
|
}
|
|
267
272
|
/**
|
|
268
273
|
* The most basic way to define a feature or feature set is by passing a collection of fields
|
|
269
274
|
*/
|
|
270
|
-
export type IFieldsDefinition = Pick<
|
|
275
|
+
export type IFieldsDefinition = Pick<FeatureLayer, "fields">;
|
|
271
276
|
/**
|
|
272
277
|
* FeatureDefinition represents various ways a Feature variable could be defined.
|
|
273
278
|
* Layer instance is the most common way to define a feature,
|
|
@@ -281,11 +286,11 @@ export type FeatureDefinition = IFeatureLayerItemDefinition | IFieldsDefinition
|
|
|
281
286
|
/**
|
|
282
287
|
* VoxelDefinition represents various ways a Voxel variable could be defined.
|
|
283
288
|
*/
|
|
284
|
-
export type VoxelDefinition =
|
|
289
|
+
export type VoxelDefinition = IFeatureLayerItemDefinition | IUrlDefinition | VoxelLayer;
|
|
285
290
|
/**
|
|
286
291
|
* PixelDefinition represents various ways a Pixel variable could be defined.
|
|
287
292
|
*/
|
|
288
|
-
export type PixelDefinition =
|
|
293
|
+
export type PixelDefinition = IFeatureLayerItemDefinition | ImageryLayer | ImageryTileLayer | IUrlDefinition;
|
|
289
294
|
/**
|
|
290
295
|
* FeatureSetDefinition represents the various ways a FeatureSet variable could be defined.
|
|
291
296
|
* See FeatureDefinition for more details.
|
|
@@ -295,7 +300,7 @@ export type FeatureSetDefinition = IFeatureLayerItemDefinition | IFieldsDefiniti
|
|
|
295
300
|
* FeatureSetCollectionDefinition represents the various ways a FeatureSetCollection could be defined
|
|
296
301
|
* as a feature service or a web map.
|
|
297
302
|
*/
|
|
298
|
-
export type FeatureSetCollectionDefinition =
|
|
303
|
+
export type FeatureSetCollectionDefinition = IPortalItemDefinition | IUrlDefinition | Map | WebMap | WebScene;
|
|
299
304
|
export type VariableDefinitions = Record<string, FeatureDefinition | FeatureSetCollectionDefinition | FeatureSetDefinition | IProfileVariable[] | undefined>;
|
|
300
305
|
export interface IPredefinedProfile {
|
|
301
306
|
/**
|
|
@@ -331,15 +336,15 @@ export type SupportedVoxelSource = VoxelLayer;
|
|
|
331
336
|
/**
|
|
332
337
|
* Layer that supports title.
|
|
333
338
|
*/
|
|
334
|
-
export type ITitleCapableSource = Pick<
|
|
339
|
+
export type ITitleCapableSource = Pick<Layer, "title">;
|
|
335
340
|
/**
|
|
336
341
|
* Layer that supports url.
|
|
337
342
|
*/
|
|
338
|
-
export type IUrlCapableSource = Pick<
|
|
343
|
+
export type IUrlCapableSource = Pick<FeatureLayer, "url">;
|
|
339
344
|
/**
|
|
340
345
|
* Layer that supports layer id.
|
|
341
346
|
*/
|
|
342
|
-
export type ILayerIdCapableSource = Pick<
|
|
347
|
+
export type ILayerIdCapableSource = Pick<FeatureLayer, "layerId">;
|
|
343
348
|
/**
|
|
344
349
|
* Layer that supports queryFeatures
|
|
345
350
|
*/
|
|
@@ -355,7 +360,7 @@ export interface IFeatureLayerLikeInstance extends IFieldsDefinition, ITitleCapa
|
|
|
355
360
|
/**
|
|
356
361
|
* The layer ID, or layer index, of a Feature Service layer.
|
|
357
362
|
*/
|
|
358
|
-
layerId:
|
|
363
|
+
layerId: number | null | undefined;
|
|
359
364
|
/**
|
|
360
365
|
* Executes a Query against the feature service and returns a Promise to a FeatureSet.
|
|
361
366
|
*/
|
|
@@ -372,48 +377,48 @@ export interface IDomainsCapableSource {
|
|
|
372
377
|
/**
|
|
373
378
|
* Returns the Domain associated with the given field name.
|
|
374
379
|
*/
|
|
375
|
-
getFieldDomain: (fieldName: string) =>
|
|
380
|
+
getFieldDomain: (fieldName: string) => Domain | null;
|
|
376
381
|
}
|
|
377
382
|
/**
|
|
378
383
|
* Layer that implements types
|
|
379
384
|
*/
|
|
380
|
-
export type IFeatureTypesCapableSource = IDomainsCapableSource & Pick<
|
|
385
|
+
export type IFeatureTypesCapableSource = IDomainsCapableSource & Pick<FeatureLayer, "typeIdField" | "types">;
|
|
381
386
|
/**
|
|
382
387
|
* Layer that has a subtype field
|
|
383
388
|
*/
|
|
384
|
-
export type ISubtypeFieldCapableSource = IDomainsCapableSource & Pick<
|
|
389
|
+
export type ISubtypeFieldCapableSource = IDomainsCapableSource & Pick<FeatureLayer, "subtypeField">;
|
|
385
390
|
/**
|
|
386
391
|
* Layer that exposes subtypes.
|
|
387
392
|
*/
|
|
388
|
-
export type ISubtypesCapableSource = ISubtypeFieldCapableSource & Pick<
|
|
393
|
+
export type ISubtypesCapableSource = ISubtypeFieldCapableSource & Pick<FeatureLayer, "subtypes">;
|
|
389
394
|
/**
|
|
390
395
|
* Layer that supports relationships.
|
|
391
396
|
*/
|
|
392
|
-
export type IRelationshipsCapableSource = ILayerIdCapableSource & IUrlCapableSource & Pick<
|
|
397
|
+
export type IRelationshipsCapableSource = ILayerIdCapableSource & IUrlCapableSource & Pick<FeatureLayer, "relationships">;
|
|
393
398
|
/**
|
|
394
399
|
* Layer that is capable of being non-spatial.
|
|
395
400
|
*/
|
|
396
|
-
export type ITableCapableSource = Pick<
|
|
401
|
+
export type ITableCapableSource = Pick<FeatureLayer, "isTable">;
|
|
397
402
|
/** Layer that is capable of having geometry */
|
|
398
|
-
export type IGeometryCapableSource = Pick<
|
|
403
|
+
export type IGeometryCapableSource = Pick<FeatureLayer, "geometryType"> & {
|
|
399
404
|
isTable?: false;
|
|
400
405
|
};
|
|
401
406
|
/**
|
|
402
407
|
* An instance that requires a load operation to be performed.
|
|
403
408
|
*/
|
|
404
|
-
export type ILoadableSource = Pick<
|
|
409
|
+
export type ILoadableSource = Pick<Layer, "load">;
|
|
405
410
|
/**
|
|
406
411
|
* An instance that requires a loadAll operation to be performed.
|
|
407
412
|
*/
|
|
408
|
-
export type ILoadAllCapable = Pick<
|
|
413
|
+
export type ILoadAllCapable = Pick<WebMap | WebScene, "loadAll">;
|
|
409
414
|
/**
|
|
410
415
|
* An instance that is based on a portal item.
|
|
411
416
|
*/
|
|
412
|
-
export type IPortalItemCapable = Pick<
|
|
417
|
+
export type IPortalItemCapable = Pick<PortalItemResource, "portalItem">;
|
|
413
418
|
/**
|
|
414
419
|
* An instance that exposes all layers and tables collections.
|
|
415
420
|
*/
|
|
416
|
-
export type IGroupLayerCapable = Pick<
|
|
421
|
+
export type IGroupLayerCapable = Pick<Map, "allLayers" | "allTables">;
|
|
417
422
|
/**
|
|
418
423
|
* Represents a string that will have to be manufactured from a Intl strings resource.
|
|
419
424
|
*/
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { FeatureDefinition, FeatureSetCollectionDefinition, FeatureSetDefinition, VoxelDefinition, PixelDefinition } from './types';
|
|
3
2
|
import { ArcadeSupportedFeatureSetLayerUnion } from '@arcgis/core/arcade';
|
|
3
|
+
import { default as Map } from '@arcgis/core/Map';
|
|
4
|
+
import { default as ImageryLayer } from '@arcgis/core/layers/ImageryLayer';
|
|
5
|
+
import { default as ImageryTileLayer } from '@arcgis/core/layers/ImageryTileLayer';
|
|
6
|
+
import { default as CodedValueDomain } from '@arcgis/core/layers/support/CodedValueDomain';
|
|
7
|
+
import { default as InheritedDomain } from '@arcgis/core/layers/support/InheritedDomain';
|
|
8
|
+
import { default as Subtype } from '@arcgis/core/layers/support/Subtype';
|
|
9
|
+
import { default as VoxelLayer } from '@arcgis/core/layers/VoxelLayer';
|
|
4
10
|
import type * as types from "./types";
|
|
5
11
|
export declare function isFeatureLayerLikeInstance(item: unknown): item is types.IFeatureLayerLikeInstance;
|
|
6
12
|
export declare function isSupportedLayerInstanceType(item: unknown): item is ArcadeSupportedFeatureSetLayerUnion;
|
|
7
13
|
export declare function isGroupLayerCapable(item: unknown): item is types.IGroupLayerCapable;
|
|
8
|
-
export declare function isMapInstance(item: unknown): item is
|
|
14
|
+
export declare function isMapInstance(item: unknown): item is Map;
|
|
9
15
|
export declare function isLoadAllCapable(item: unknown): item is types.ILoadAllCapable;
|
|
10
16
|
export declare function isPortalItemDefinition(item: unknown): item is types.IPortalItemDefinition;
|
|
11
17
|
export declare function isFeatureLayerItemDefinition(item: unknown): item is types.IFeatureLayerItemDefinition;
|
|
@@ -17,9 +23,9 @@ export declare function isVoxelDefinition(item: unknown): item is VoxelDefinitio
|
|
|
17
23
|
export declare function isPixelDefinition(item: unknown): item is PixelDefinition;
|
|
18
24
|
export declare function isFeatureSetDefinition(item: unknown): item is FeatureSetDefinition;
|
|
19
25
|
export declare function isFeatureSetCollectionDefinition(item: unknown): item is FeatureSetCollectionDefinition;
|
|
20
|
-
export declare function isSubtypeInstance(item: unknown): item is
|
|
21
|
-
export declare function isCodedValueDomainInstance(item: unknown): item is
|
|
22
|
-
export declare function isInheritedDomainInstance(item: unknown): item is
|
|
26
|
+
export declare function isSubtypeInstance(item: unknown): item is Subtype;
|
|
27
|
+
export declare function isCodedValueDomainInstance(item: unknown): item is CodedValueDomain;
|
|
28
|
+
export declare function isInheritedDomainInstance(item: unknown): item is InheritedDomain;
|
|
23
29
|
export declare function isPredefinedProfile(item: unknown): item is types.IPredefinedProfile;
|
|
24
30
|
export declare function isTitleCapableSource(item: unknown): item is types.ITitleCapableSource;
|
|
25
31
|
export declare function isUrlCapableSource(item: unknown): item is types.IUrlCapableSource;
|
|
@@ -36,8 +42,8 @@ export declare function isTableCapableLayer(item: unknown): item is types.ITable
|
|
|
36
42
|
*/
|
|
37
43
|
export declare function isGeometryLikeLayer(item: unknown): item is types.IGeometryCapableSource;
|
|
38
44
|
export declare function isLoadableSource(item: unknown): item is types.ILoadableSource;
|
|
39
|
-
export declare function isVoxelLayer(item: unknown): item is
|
|
40
|
-
export declare function isImageryLayer(item: unknown): item is
|
|
45
|
+
export declare function isVoxelLayer(item: unknown): item is VoxelLayer;
|
|
46
|
+
export declare function isImageryLayer(item: unknown): item is ImageryLayer | ImageryTileLayer;
|
|
41
47
|
export declare function supportedSourceFromDefinition(definition: types.FeatureDefinition | types.FeatureSetDefinition | null | undefined): Promise<types.SupportedSource | null>;
|
|
42
48
|
export declare function serviceMetaData(url: string): Promise<{
|
|
43
49
|
layers: types.LayerInfo[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { IRange, Position, languages } from 'monaco-editor';
|
|
3
2
|
import { ApiDatabase, ApiVariable } from '@arcgis/languages-api-utils';
|
|
4
3
|
import { ICompletionContext } from './types';
|
|
4
|
+
import { SQLNode } from '@arcgis/core/core/sql/types';
|
|
5
5
|
/**
|
|
6
6
|
* Class used for sql expression completion
|
|
7
7
|
*/
|
|
@@ -31,7 +31,7 @@ export declare class SqlExpressionCompletion {
|
|
|
31
31
|
* @param node The current node to traverse
|
|
32
32
|
* @param position The current position
|
|
33
33
|
*/
|
|
34
|
-
traverse(node:
|
|
34
|
+
traverse(node: SQLNode, completionContext: ICompletionContext): void;
|
|
35
35
|
/**
|
|
36
36
|
* gets completions by finding the context of the current node and suggesting completions based on that context
|
|
37
37
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { DataTypeNode } from '@arcgis/core/core/sql/types';
|
|
2
2
|
import { MarkerSeverity, languages } from 'monaco-editor';
|
|
3
3
|
export declare enum ChildBearingProperties {
|
|
4
4
|
ARGS = "args",
|
|
@@ -13,16 +13,17 @@ export declare enum ChildBearingProperties {
|
|
|
13
13
|
START = "start",
|
|
14
14
|
VALUE = "value"
|
|
15
15
|
}
|
|
16
|
-
export declare
|
|
17
|
-
CASE_EXPRESSION
|
|
18
|
-
EXPRESSION_LIST
|
|
19
|
-
FUNCTION
|
|
20
|
-
INTERVAL
|
|
21
|
-
INTERVAL_QUALIFIER
|
|
22
|
-
WHEN_CLAUSE
|
|
23
|
-
UNARY_EXPRESSION
|
|
24
|
-
BINARY_EXPRESSION
|
|
25
|
-
}
|
|
16
|
+
export declare const ChildBearingNodeTypes: {
|
|
17
|
+
readonly CASE_EXPRESSION: "case-expression";
|
|
18
|
+
readonly EXPRESSION_LIST: "expression-list";
|
|
19
|
+
readonly FUNCTION: "function";
|
|
20
|
+
readonly INTERVAL: "interval";
|
|
21
|
+
readonly INTERVAL_QUALIFIER: "interval-qualifier";
|
|
22
|
+
readonly WHEN_CLAUSE: "when-clause";
|
|
23
|
+
readonly UNARY_EXPRESSION: "unary-expression";
|
|
24
|
+
readonly BINARY_EXPRESSION: "binary-expression";
|
|
25
|
+
};
|
|
26
|
+
export type ChildBearingNodeType = (typeof ChildBearingNodeTypes)[keyof typeof ChildBearingNodeTypes];
|
|
26
27
|
export declare const CHILD_BEARING_PROPERTIES: {
|
|
27
28
|
readonly "case-expression": readonly [ChildBearingProperties.CLAUSES, ChildBearingProperties.OPERAND, ChildBearingProperties.ELSE];
|
|
28
29
|
readonly "when-clause": readonly [ChildBearingProperties.OPERAND, ChildBearingProperties.VALUE];
|
|
@@ -51,8 +52,8 @@ export declare const CompletionItemKind: {
|
|
|
51
52
|
Reference: languages.CompletionItemKind.Reference;
|
|
52
53
|
};
|
|
53
54
|
type UppercaseUnion<T extends string> = T extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${UppercaseUnion<Rest>}` : T;
|
|
54
|
-
export declare const castDataTypesDict: Record<
|
|
55
|
-
export declare const castDataTypes: UppercaseUnion<
|
|
55
|
+
export declare const castDataTypesDict: Record<DataTypeNode["value"]["type"], UppercaseUnion<DataTypeNode["value"]["type"]>>;
|
|
56
|
+
export declare const castDataTypes: UppercaseUnion<DataTypeNode["value"]["type"]>[];
|
|
56
57
|
export declare const datePeriods: string[];
|
|
57
58
|
export declare const extractDateParts: string[];
|
|
58
59
|
export declare const dateLiterals: string[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { IEditorProfileDefinition, IPredefinedProfile } from '../profile/types';
|
|
3
2
|
import { Uri } from 'monaco-editor';
|
|
4
3
|
import { LanguageDefaultsBase } from '../language-defaults-base';
|
|
4
|
+
import { default as FeatureLayer } from '@arcgis/core/layers/FeatureLayer';
|
|
5
5
|
declare class SqlExprDefaults extends LanguageDefaultsBase {
|
|
6
6
|
protected _languageId: string;
|
|
7
7
|
private _layerMap;
|
|
8
8
|
constructor();
|
|
9
|
-
updateFeatureLayerForModel(modelId: Uri | string, layer:
|
|
10
|
-
getFeatureLayerForModel(modelId: Uri | string):
|
|
9
|
+
updateFeatureLayerForModel(modelId: Uri | string, layer: FeatureLayer): void;
|
|
10
|
+
getFeatureLayerForModel(modelId: Uri | string): FeatureLayer | undefined;
|
|
11
11
|
setProfileForModel(modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
|
|
12
12
|
locale: string;
|
|
13
13
|
}): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { SQLSyntaxError, SQLNode } from '@arcgis/core/core/sql/types';
|
|
2
2
|
import { ChildBearingProperties } from './sql-expr-constants';
|
|
3
|
-
export declare function isSqlSyntaxError(err: unknown): err is
|
|
4
|
-
export declare function isUnexpectedTokenError(error:
|
|
5
|
-
export declare function getExpectedTokens(error:
|
|
6
|
-
export declare function formatSyntaxError(error:
|
|
3
|
+
export declare function isSqlSyntaxError(err: unknown): err is SQLSyntaxError;
|
|
4
|
+
export declare function isUnexpectedTokenError(error: SQLSyntaxError): boolean;
|
|
5
|
+
export declare function getExpectedTokens(error: SQLSyntaxError): string[] | undefined;
|
|
6
|
+
export declare function formatSyntaxError(error: SQLSyntaxError): string;
|
|
7
7
|
type ExpectedLiteral = {
|
|
8
8
|
category: "functions" | "keywords" | "operators";
|
|
9
9
|
text: string;
|
|
@@ -12,14 +12,14 @@ type ExpectedLiteral = {
|
|
|
12
12
|
* parses the error from the parser and returns the expected literals, used to provide suggestions.
|
|
13
13
|
* it will only return literals that do not contain special characters or numbers.
|
|
14
14
|
*/
|
|
15
|
-
export declare function getExpectedLiterals(error:
|
|
15
|
+
export declare function getExpectedLiterals(error: SQLSyntaxError): ExpectedLiteral[];
|
|
16
16
|
export declare const callerIndexAt = -2;
|
|
17
17
|
/**
|
|
18
18
|
* returns the slot position of the node in the context root
|
|
19
19
|
* @param node the node we want to find the slot position for
|
|
20
20
|
* @param contextRoot the context root of the node, see {@link identifyContextRoot}
|
|
21
21
|
*/
|
|
22
|
-
export declare function getSlotPosition(node:
|
|
22
|
+
export declare function getSlotPosition(node: SQLNode, contextRoot: SQLNode): ChildBearingProperties | number;
|
|
23
23
|
/**
|
|
24
24
|
* Identifies the context root of the searchNode in the searchTree. The context root is the first "non-terminal" node within the node's parent context (searchTree).
|
|
25
25
|
* see {@link terminalTypes} for the list of terminal types.
|
|
@@ -27,7 +27,7 @@ export declare function getSlotPosition(node: __esri.SQLNode, contextRoot: __esr
|
|
|
27
27
|
* @param searchTree all the nodes contained in the searchNode's parent context
|
|
28
28
|
* @returns The context root of the searchNode
|
|
29
29
|
*/
|
|
30
|
-
export declare function identifyContextRoot(searchNode:
|
|
30
|
+
export declare function identifyContextRoot(searchNode: SQLNode, searchTree: SQLNode[]): SQLNode;
|
|
31
31
|
/**
|
|
32
32
|
* Appends the required number of closing parentheses to the model content.
|
|
33
33
|
* This helps when the parsing fails. We try closing the unclosed parentheses, and resubmit the content for parsing.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
1
|
import { IRange, editor } from 'monaco-editor';
|
|
3
2
|
import { ArcGISFieldType, SqlExpressionLiteral } from './types';
|
|
4
3
|
import { ApiVariable } from '@arcgis/languages-api-utils';
|
|
4
|
+
import { SQLSourceLocation, SQLNode } from '@arcgis/core/core/sql/types';
|
|
5
5
|
export interface ValidationSyntaxContext {
|
|
6
6
|
token: string;
|
|
7
7
|
range: IRange;
|
|
@@ -61,22 +61,22 @@ export declare enum CallableExpressionResponse {
|
|
|
61
61
|
NON_CALLABLE = "NON_CALLABLE"
|
|
62
62
|
}
|
|
63
63
|
export declare const isValidIntervalValue: RegExp;
|
|
64
|
-
export declare const relationalTypes:
|
|
64
|
+
export declare const relationalTypes: ReturnType<typeof identifyNodeReturnType>[];
|
|
65
65
|
export declare const qualifiers: TokenType[];
|
|
66
66
|
export declare function convertArcgisTypeToSqlReturnType(arcgisType: ArcGISFieldType): SqlExpressionLiteral;
|
|
67
|
-
export declare const identifyNodeReturnType: (node:
|
|
67
|
+
export declare const identifyNodeReturnType: (node: SQLNode, fields: ApiVariable[]) => SqlExpressionLiteral | "time-only" | "unknown_function";
|
|
68
68
|
/**
|
|
69
69
|
* Helper function to identify if the given type is able to be used in arithmetic operations
|
|
70
70
|
*/
|
|
71
|
-
export declare const isArithmeticType: (type: SqlExpressionLiteral) => boolean;
|
|
71
|
+
export declare const isArithmeticType: (type: SqlExpressionLiteral | "time-only" | "unknown_function") => boolean;
|
|
72
72
|
export declare const isNumericType: (type: SqlExpressionLiteral) => boolean;
|
|
73
73
|
/**
|
|
74
74
|
* SQL allows arithmetic operations on intervals combined with dates or numbers.
|
|
75
75
|
*/
|
|
76
|
-
export declare const isValidIntervalArithmetic: (leftNode:
|
|
77
|
-
export declare const isValidNumericArithmetic: (leftNode:
|
|
78
|
-
export declare const formatListToString: (types:
|
|
76
|
+
export declare const isValidIntervalArithmetic: (leftNode: SQLNode, rightNode: SQLNode, fields: ApiVariable[]) => boolean;
|
|
77
|
+
export declare const isValidNumericArithmetic: (leftNode: SQLNode, rightNode: SQLNode, fields: ApiVariable[]) => boolean;
|
|
78
|
+
export declare const formatListToString: (types: ReturnType<typeof identifyNodeReturnType>[], delimiter: string) => string;
|
|
79
79
|
export declare const formatType: (type: string) => string;
|
|
80
|
-
export declare const getValueFromNode: (node:
|
|
81
|
-
export declare const addNewMarker: (message: string, range:
|
|
82
|
-
export declare const validateTypeMatch: (node:
|
|
80
|
+
export declare const getValueFromNode: (node: SQLNode) => number | string;
|
|
81
|
+
export declare const addNewMarker: (message: string, range: IRange | SQLSourceLocation, markers: editor.IMarkerData[], isNodeFormat?: boolean) => void;
|
|
82
|
+
export declare const validateTypeMatch: (node: SQLNode, expectedType: NodeReturnType, markers: editor.IMarkerData[], fields: ApiVariable[]) => void;
|