@arcgis/coding-components 4.31.0-next.2 → 4.31.0-next.21
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/README.md +22 -3
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +6 -6
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +5 -5
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +33 -0
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/language-api-panel/t9n/language-api-panel.t9n.ca.json +1 -1
- package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +735 -0
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-7984ea8e.js → p-1b799777.js} +2 -2
- package/dist/arcgis-coding-components/p-4d5cf512.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-60c2a820.js → p-56266a64.js} +2 -2
- package/dist/arcgis-coding-components/{p-e8211ffe.js → p-57b8bcd7.js} +1 -1
- package/dist/arcgis-coding-components/{p-9eced6fc.js → p-5b67b62b.js} +2 -2
- package/dist/arcgis-coding-components/{p-93a97573.js → p-64137fec.js} +3 -3
- package/dist/arcgis-coding-components/{p-e7ee4d64.js → p-6621a80f.js} +3 -3
- package/dist/arcgis-coding-components/p-77dd5521.js +6 -0
- package/dist/arcgis-coding-components/p-8eb7e694.js +6 -0
- package/dist/arcgis-coding-components/p-a2341e0c.js +6 -0
- package/dist/arcgis-coding-components/{p-bb7e832e.js → p-b715834b.js} +3 -3
- package/dist/arcgis-coding-components/p-cbee273f.js +6 -0
- package/dist/arcgis-coding-components/{p-5ef7cce5.js → p-cdc52d2f.js} +1 -1
- package/dist/arcgis-coding-components/{p-36fedc23.js → p-d7d1f130.js} +12 -12
- package/dist/arcgis-coding-components/p-e1f9b463.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-62ee6251.js → p-e5a924a1.js} +1 -1
- package/dist/arcgis-coding-components/p-f2d64a9d.js +6 -0
- package/dist/arcgis-coding-components/{p-03ea6cd7.js → p-ff62d134.js} +3 -3
- package/dist/arcgis-coding-components/p-ffce0588.entry.js +6 -0
- package/dist/cjs/{app-globals-aee5f4b5.js → app-globals-a9ef3ca8.js} +1 -1
- package/dist/cjs/arcade-defaults-f5241680.js +349 -0
- package/dist/cjs/arcade-language-features-0b9f3947.js +274 -0
- package/dist/cjs/arcade-mode-cc08d9cd.js +335 -0
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +181 -1501
- package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +81 -0
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +80 -0
- package/dist/cjs/{css-7cc05f76.js → css-bb6a49ec.js} +1 -1
- package/dist/cjs/{cssMode-2b0daeae.js → cssMode-e7fac7d7.js} +3 -4
- package/dist/cjs/{html-f56911e1.js → html-7ff4071d.js} +3 -4
- package/dist/cjs/{htmlMode-43eed674.js → htmlMode-c89193ec.js} +3 -4
- package/dist/cjs/{index-b34238a6.js → index-4b7880ab.js} +9 -1
- package/dist/cjs/index.cjs.js +4 -3
- package/dist/cjs/{javascript-5115cb76.js → javascript-864c0220.js} +3 -4
- package/dist/cjs/{jsonMode-550dda36.js → jsonMode-ac4a7be7.js} +3 -4
- package/dist/cjs/{arcade-defaults-a8d8f8e2.js → language-defaults-base-57b37f9f.js} +842 -1183
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/sql-expr-defaults-245b036d.js +1347 -0
- package/dist/cjs/sql-expr-mode-304f5ce2.js +20844 -0
- package/dist/cjs/{tsMode-336306a9.js → tsMode-d30d4ab1.js} +4 -5
- package/dist/cjs/{typescript-b395242f.js → typescript-6c87ddb3.js} +3 -4
- package/dist/components/arcade-defaults.js +54 -1369
- package/dist/components/arcade-language-features.js +271 -0
- package/dist/components/arcade-mode.js +4 -264
- package/dist/components/arcade-results.js +7 -5
- package/dist/components/arcade-suggestions.js +7 -5
- package/dist/components/arcade-variables.js +8 -6
- package/dist/components/arcgis-arcade-editor.js +37 -35
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-editor.js +120 -0
- package/dist/components/arcgis-sql-expression-fields.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-fields.js +11 -0
- package/dist/components/chunk-2JTWBRMN.js +1154 -0
- package/dist/components/code-editor.js +40 -13
- package/dist/components/fields.js +5 -5
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +30 -22
- package/dist/components/language-api-panel.js +13 -40
- package/dist/components/language-defaults-base.js +1309 -0
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +196 -0
- package/dist/components/sql-expr-mode.js +20842 -0
- package/dist/components/sql-expression-fields.js +102 -0
- package/dist/components/useT9n.js +45 -8
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-59faaf33.js → app-globals-6d0ca11d.js} +1 -1
- package/dist/esm/arcade-defaults-066445c4.js +344 -0
- package/dist/esm/arcade-language-features-0e00c199.js +269 -0
- package/dist/esm/{arcade-mode-5d46035e.js → arcade-mode-abf1e1cf.js} +3 -263
- package/dist/esm/arcgis-arcade-editor_6.entry.js +127 -1447
- package/dist/esm/arcgis-coding-components.js +5 -5
- package/dist/esm/arcgis-sql-expression-editor.entry.js +77 -0
- package/dist/esm/arcgis-sql-expression-fields.entry.js +76 -0
- package/dist/esm/{css-e257dc49.js → css-c6dae12d.js} +1 -1
- package/dist/esm/{cssMode-c11f7f40.js → cssMode-052bb603.js} +2 -3
- package/dist/esm/{html-a6c37a99.js → html-572696a1.js} +2 -3
- package/dist/esm/{htmlMode-1270bc7d.js → htmlMode-fc184f2d.js} +2 -3
- package/dist/esm/{index-a970952c.js → index-0edd9846.js} +9 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/{javascript-ee179624.js → javascript-8bfc0096.js} +3 -4
- package/dist/esm/{jsonMode-07502ccb.js → jsonMode-7adf94ff.js} +2 -3
- package/dist/esm/{arcade-defaults-9eb28407.js → language-defaults-base-85a7f476.js} +833 -1179
- package/dist/esm/loader.js +5 -5
- package/dist/esm/sql-expr-defaults-be84ec7f.js +1339 -0
- package/dist/esm/sql-expr-mode-a4413e5c.js +20840 -0
- package/dist/esm/{tsMode-96749a12.js → tsMode-d10773c8.js} +2 -3
- package/dist/esm/{typescript-a3cf9881.js → typescript-9491f23e.js} +2 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +45 -10
- package/dist/types/components/arcade-results/arcade-results.d.ts +43 -1
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +22 -1
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +28 -1
- package/dist/types/components/code-editor/code-editor.d.ts +16 -5
- package/dist/types/components/language-api-panel/language-api-panel.d.ts +34 -8
- package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +24 -0
- package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +32 -0
- package/dist/types/components.d.ts +98 -24
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +8 -1
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +5 -1
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +13 -0
- package/dist/types/dependencies.d.ts +6 -10
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
- package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
- package/dist/types/utils/fields.d.ts +2 -2
- package/dist/types/utils/language-defaults-base.d.ts +2 -9
- package/dist/types/utils/profile/editor-profile.d.ts +7 -6
- package/dist/types/utils/profile/types.d.ts +53 -65
- package/dist/types/utils/profile/utils.d.ts +9 -8
- package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +41 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +16 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +26 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +37 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +11 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +122 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +5 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +18 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +6 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +156 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +150 -0
- package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +1397 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +6 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +45 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +21 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +39 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +8 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +43 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +34 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +100 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +41 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +17 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +24 -0
- package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +13 -0
- package/dist/types/utils/sql-expr-monaco/types.d.ts +89 -0
- package/package.json +27 -21
- package/dist/arcgis-coding-components/p-0c6de9b3.js +0 -6
- package/dist/arcgis-coding-components/p-81c37dab.entry.js +0 -6
- package/dist/cjs/arcade-mode-b85ae7d4.js +0 -595
- package/dist/components/chunk-IHYYRFLQ.js +0 -1363
- package/dist/types/components/arcade-editor/t9n-types.d.ts +0 -8
- package/dist/types/components/arcade-results/t9n-types.d.ts +0 -13
- package/dist/types/components/arcade-suggestions/t9n-types.d.ts +0 -6
- package/dist/types/components/arcade-variables/t9n-types.d.ts +0 -8
- package/dist/types/components/language-api-panel/t9n-types.d.ts +0 -8
- package/dist/types/utils/profile/predefined-profile.d.ts +0 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as monaco from "monaco-editor";
|
|
2
|
+
import type { ApiItem, ApiVariable } from "@arcgis/languages-api-utils";
|
|
3
|
+
export declare function sqlExpressionCompletion(range: monaco.IRange, model: monaco.editor.ITextModel, position: monaco.Position, sdkFunctions: Record<string, ApiItem>): monaco.languages.CompletionItem[];
|
|
4
|
+
/** source */
|
|
5
|
+
export declare const sqlBinOps: string[];
|
|
6
|
+
export declare function generateCompletionItems(fields: ApiVariable[], range: monaco.IRange, sdkFunctions: Record<string, ApiItem>): Record<"fieldsCompletion" | "sqlBinOpsCompletion" | "sqlDataTypeCompletion" | "sqlFunctionCompletion" | "sqlKeywordsCompletion", monaco.languages.CompletionItem[]>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { MarkerSeverity } from "monaco-editor";
|
|
2
|
+
export declare enum ChildBearingProperties {
|
|
3
|
+
ARGS = "args",
|
|
4
|
+
CLAUSES = "clauses",
|
|
5
|
+
ELSE = "else",
|
|
6
|
+
END = "end",
|
|
7
|
+
EXPR = "expr",
|
|
8
|
+
LEFT = "left",
|
|
9
|
+
OPERAND = "operand",
|
|
10
|
+
QUALIFIER = "qualifier",
|
|
11
|
+
RIGHT = "right",
|
|
12
|
+
START = "start",
|
|
13
|
+
VALUE = "value"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ChildBearingNodeTypes {
|
|
16
|
+
CASE_EXPRESSION = "case-expression",
|
|
17
|
+
EXPRESSION_LIST = "expression-list",
|
|
18
|
+
FUNCTION = "function",
|
|
19
|
+
INTERVAL = "interval",
|
|
20
|
+
INTERVAL_QUALIFIER = "interval-qualifier",
|
|
21
|
+
WHEN_CLAUSE = "when-clause",
|
|
22
|
+
UNARY_EXPRESSION = "unary-expression",
|
|
23
|
+
BINARY_EXPRESSION = "binary-expression"
|
|
24
|
+
}
|
|
25
|
+
export declare const CHILD_BEARING_PROPERTIES: {
|
|
26
|
+
readonly "case-expression": readonly [ChildBearingProperties.CLAUSES, ChildBearingProperties.OPERAND, ChildBearingProperties.ELSE];
|
|
27
|
+
readonly "when-clause": readonly [ChildBearingProperties.OPERAND, ChildBearingProperties.VALUE];
|
|
28
|
+
readonly "expression-list": readonly [ChildBearingProperties.VALUE];
|
|
29
|
+
readonly "unary-expression": readonly [ChildBearingProperties.EXPR];
|
|
30
|
+
readonly "binary-expression": readonly [ChildBearingProperties.LEFT, ChildBearingProperties.RIGHT];
|
|
31
|
+
readonly function: readonly [ChildBearingProperties.ARGS];
|
|
32
|
+
readonly interval: readonly [ChildBearingProperties.VALUE, ChildBearingProperties.QUALIFIER];
|
|
33
|
+
readonly "interval-qualifier": readonly [ChildBearingProperties.START, ChildBearingProperties.END];
|
|
34
|
+
};
|
|
35
|
+
export declare const sqlFunctionParamKeywords: {
|
|
36
|
+
CAST: string[];
|
|
37
|
+
EXTRACT: string[];
|
|
38
|
+
TRIM: string[];
|
|
39
|
+
};
|
|
40
|
+
export declare const MarkerType: {
|
|
41
|
+
Hint: MarkerSeverity.Hint;
|
|
42
|
+
Info: MarkerSeverity.Info;
|
|
43
|
+
Warning: MarkerSeverity.Warning;
|
|
44
|
+
Error: MarkerSeverity.Error;
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
|
|
2
|
+
import type { IEditorProfileDefinition, IPredefinedProfile } from "../profile/types";
|
|
3
|
+
import { Uri } from "monaco-editor";
|
|
4
|
+
import { LanguageDefaultsBase } from "../language-defaults-base";
|
|
5
|
+
import type { ApiCategory } from "@arcgis/languages-api-utils";
|
|
6
|
+
declare class SqlExprDefaults extends LanguageDefaultsBase {
|
|
7
|
+
protected _languageId: string;
|
|
8
|
+
protected _languageOptions: {};
|
|
9
|
+
private _layerMap;
|
|
10
|
+
updateFeatureLayerForModel(modelId: Uri | string, layer: FeatureLayer): void;
|
|
11
|
+
setLanguageOptions(languageOptions: {
|
|
12
|
+
assetsPath?: string | undefined;
|
|
13
|
+
}): void;
|
|
14
|
+
getFeatureLayerForModel(modelId: Uri | string): FeatureLayer | undefined;
|
|
15
|
+
setProfileForModel(modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
|
|
16
|
+
locale: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
getApiLibrary(modelId: string): Promise<ApiCategory[]>;
|
|
19
|
+
}
|
|
20
|
+
export type { SqlExprDefaults };
|
|
21
|
+
export declare const sqlExprDefaults: SqlExprDefaults;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { editor } from "monaco-editor";
|
|
2
|
+
import type { IRange, Position, languages } from "monaco-editor";
|
|
3
|
+
import type { SqlExprDefaults } from "./sql-expr-defaults";
|
|
4
|
+
import type { ISqlExprWorkerAccessor } from "./types";
|
|
5
|
+
import type { SqlExprDiagnosticService } from "./sql-expr-mode";
|
|
6
|
+
export declare class SqlExprCompletionProvider implements languages.CompletionItemProvider {
|
|
7
|
+
private _defaults;
|
|
8
|
+
private _sdkFunctions;
|
|
9
|
+
constructor(_defaults: SqlExprDefaults);
|
|
10
|
+
provideCompletionItems(model: editor.ITextModel, position: Position): Promise<languages.CompletionList | undefined>;
|
|
11
|
+
}
|
|
12
|
+
export declare class SqlExprDiagnosticsAdapter {
|
|
13
|
+
private _languageId;
|
|
14
|
+
private _worker;
|
|
15
|
+
private _disposables;
|
|
16
|
+
private _listener;
|
|
17
|
+
private _diagnosticsService;
|
|
18
|
+
private _defaults;
|
|
19
|
+
constructor(_languageId: string, _worker: ISqlExprWorkerAccessor, { defaults, diagnosticService, }: {
|
|
20
|
+
defaults: SqlExprDefaults;
|
|
21
|
+
diagnosticService: SqlExprDiagnosticService;
|
|
22
|
+
});
|
|
23
|
+
private _doValidate;
|
|
24
|
+
}
|
|
25
|
+
export declare const sqlParenLessFunctions: string[];
|
|
26
|
+
export declare const dataTypes: string[];
|
|
27
|
+
export declare const getKeywords: (identifier: string) => string[] | undefined;
|
|
28
|
+
export declare const getDelimiterPosition: (index: number, node: any, model: editor.ITextModel, lastIndex: number) => IRange;
|
|
29
|
+
export declare const isSqlParenLessFunction: (word: string) => boolean;
|
|
30
|
+
export declare const getCursorWithinRange: (position: Position, startPos: IRange, endPos: IRange) => boolean[];
|
|
31
|
+
export declare const generateTypeDescription: (name: string, parameters: {
|
|
32
|
+
description: string;
|
|
33
|
+
name: string;
|
|
34
|
+
type: string[] | string;
|
|
35
|
+
}[], returnType: string[] | string) => string;
|
|
36
|
+
export declare const generateCompletionDocumentation: (description: string, examples: {
|
|
37
|
+
code: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[]) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as monaco from "monaco-editor";
|
|
2
|
+
/**
|
|
3
|
+
* This file is mostly ported from https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/sql/sql.ts
|
|
4
|
+
*/
|
|
5
|
+
import IMonarchLanguage = monaco.languages.IMonarchLanguage;
|
|
6
|
+
import LanguageConfiguration = monaco.languages.LanguageConfiguration;
|
|
7
|
+
export declare const sqlExprLanguageConfig: LanguageConfiguration;
|
|
8
|
+
export declare const sqlExprLanguageSyntax: IMonarchLanguage;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IEvent, Uri, editor } from "monaco-editor";
|
|
2
|
+
import type { ISqlExprWorker } from "./types";
|
|
3
|
+
import { type SqlExprDefaults } from "./sql-expr-defaults";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the sql-expression worker for the model uris.
|
|
6
|
+
* @param uris The model uris for which to get the worker.
|
|
7
|
+
* @returns The sql-expression worker.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSqlExprWorker(...uris: Uri[]): Promise<ISqlExprWorker>;
|
|
10
|
+
export interface ISqlExprDiagnosticEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The uri of the model for which the diagnostics changed.
|
|
13
|
+
*/
|
|
14
|
+
uri: Uri;
|
|
15
|
+
/**
|
|
16
|
+
* The diagnostics for the model.
|
|
17
|
+
*/
|
|
18
|
+
diagnostics: editor.IMarkerData[];
|
|
19
|
+
}
|
|
20
|
+
export interface ISqlExprDiagnosticService {
|
|
21
|
+
onDiagnosticsChange: IEvent<ISqlExprDiagnosticEvent>;
|
|
22
|
+
}
|
|
23
|
+
declare class SqlExprDiagnosticService implements ISqlExprDiagnosticService {
|
|
24
|
+
private _onDiagnosticsChange;
|
|
25
|
+
/**
|
|
26
|
+
* An event to signal changes to the diagnostics.
|
|
27
|
+
* The event value is the uri string and the diagnostics.
|
|
28
|
+
*/
|
|
29
|
+
get onDiagnosticsChange(): IEvent<ISqlExprDiagnosticEvent>;
|
|
30
|
+
/**
|
|
31
|
+
* Fires the diagnostics change event.
|
|
32
|
+
* @param uri The uri of the model for which the diagnostics changed.
|
|
33
|
+
* @param diagnostics The diagnostics for the model.
|
|
34
|
+
*/
|
|
35
|
+
fireDiagnosticsChange(uri: Uri, diagnostics: editor.IMarkerData[]): void;
|
|
36
|
+
}
|
|
37
|
+
export type { SqlExprDiagnosticService };
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @returns The Sql Expression Diagnostic Service.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSqlExprDiagnosticService(): ISqlExprDiagnosticService;
|
|
43
|
+
export declare function setupMode(defaults: SqlExprDefaults): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as sqlExprModeModule from "./sql-expr-mode";
|
|
2
|
+
import type { ISqlExprWorker } from "./types";
|
|
3
|
+
import type { Uri } from "monaco-editor";
|
|
4
|
+
type SqlExprModeType = typeof sqlExprModeModule;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the sql-expression worker for the model.
|
|
7
|
+
* Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* const sqlExpressionWorker = await getSqlExpressionWorker(model.uri);
|
|
10
|
+
* ```
|
|
11
|
+
* @returns sql-expression worker
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSqlExprWorker(uri: Uri): Promise<ISqlExprWorker>;
|
|
14
|
+
/**
|
|
15
|
+
* Request the sql-expression mode
|
|
16
|
+
* @returns sql-expression mode module
|
|
17
|
+
*/
|
|
18
|
+
export declare function getMode(): Promise<SqlExprModeType>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum ValidationDiagnosticCodes {
|
|
2
|
+
ExpectedDateTimeValue = "ExpectedDateTimeValue",
|
|
3
|
+
ExpectedNumericalLiteral = "ExpectedNumericalLiteral",
|
|
4
|
+
ExpectedToken = "ExpectedToken",
|
|
5
|
+
FunctionNotSupported = "FunctionNotSupported",
|
|
6
|
+
IncompatibleListDataType = "IncompatibleListDataType",
|
|
7
|
+
IncorrectArgumentLength = "IncorrectArgumentLength",
|
|
8
|
+
IncorrectCastParameters = "IncorrectCastParameters",
|
|
9
|
+
IncorrectExtractParameters = "IncorrectExtractParameters",
|
|
10
|
+
IncorrectSubstringParameters = "IncorrectSubstringParameters",
|
|
11
|
+
IncorrectTrimParameters = "IncorrectTrimParameters",
|
|
12
|
+
InvalidElseClause = "InvalidElseClause",
|
|
13
|
+
InvalidThenClause = "InvalidThenClause",
|
|
14
|
+
InvalidEndOnWhen = "InvalidEndOnWhen",
|
|
15
|
+
InvalidTrimCharacter = "InvalidTrimCharacter",
|
|
16
|
+
MismatchedTypes = "MismatchedTypes",
|
|
17
|
+
MissingValueInCaseClause = "MissingValueInCaseClause",
|
|
18
|
+
NotCallable = "NotCallable",
|
|
19
|
+
TypeNotAssignable = "TypeNotAssignable",
|
|
20
|
+
UnexpectedEnd = "UnexpectedEnd.",
|
|
21
|
+
UnexpectedIdentifier = "UnexpectedIdentifier",
|
|
22
|
+
UnexpectedNumber = "UnexpectedNumber",
|
|
23
|
+
UnexpectedTextLiteral = "UnexpectedTextLiteral",
|
|
24
|
+
UnexpectedToken = "UnexpectedToken",
|
|
25
|
+
UnknownField = "UnknownField",
|
|
26
|
+
UnsupportedOperator = "UnsupportedOperator",
|
|
27
|
+
UnsupportedSyntax = "UnsupportedSyntax",
|
|
28
|
+
InvalidIntervalQualifier = "InvalidIntervalQualifier",
|
|
29
|
+
EmptyCaseExpression = "EmptyCaseExpression"
|
|
30
|
+
}
|
|
31
|
+
export declare const DiagnosticMessages: {
|
|
32
|
+
[key in ValidationDiagnosticCodes]: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const getDiagnosticMessage: (diagnosticCode: ValidationDiagnosticCodes, replacements?: Record<string, number | string>) => string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { IRange, editor } from "monaco-editor";
|
|
2
|
+
import type { SQLNode } from "./DependentFiles/WhereGrammar";
|
|
3
|
+
import type { ArcGISFieldType, PeggyError, SqlExpressionLiteral, PeggyLocation } from "./types";
|
|
4
|
+
import type { ApiVariable } from "@arcgis/languages-api-utils";
|
|
5
|
+
export interface ValidationSyntaxContext {
|
|
6
|
+
token: string;
|
|
7
|
+
range: IRange;
|
|
8
|
+
startDelimiter?: boolean;
|
|
9
|
+
content?: ValidationSyntaxContext[];
|
|
10
|
+
}
|
|
11
|
+
export declare enum TokenType {
|
|
12
|
+
Single = "SINGLE",
|
|
13
|
+
EmptyField = "EMPTY_FIELD",
|
|
14
|
+
Error = "ERROR",
|
|
15
|
+
Field = "FIELD",
|
|
16
|
+
KeywordIn = "IN",
|
|
17
|
+
KeywordNotIn = "NOT IN",
|
|
18
|
+
KeywordBetween = "BETWEEN",
|
|
19
|
+
KeywordNotBetween = "NOT BETWEEN",
|
|
20
|
+
List = "LIST",
|
|
21
|
+
Negation = "NOT",
|
|
22
|
+
Number = "NUMBER",
|
|
23
|
+
Operator = "OPERATOR",
|
|
24
|
+
Parentheses = "PARENTHESES",
|
|
25
|
+
String = "STRING",
|
|
26
|
+
Unknown = "UNKNOWN"
|
|
27
|
+
}
|
|
28
|
+
export declare enum Token {
|
|
29
|
+
Case = "CASE",
|
|
30
|
+
CaseElse = "ELSE",
|
|
31
|
+
CaseThen = "THEN",
|
|
32
|
+
CaseWhen = "WHEN",
|
|
33
|
+
Comma = ",",
|
|
34
|
+
DoubleQuote = "\"",
|
|
35
|
+
Empty = "",
|
|
36
|
+
End = "END",
|
|
37
|
+
Interval = "INTERVAL",
|
|
38
|
+
LeftParentheses = "(",
|
|
39
|
+
NewLine = "\n",
|
|
40
|
+
RightParentheses = ")",
|
|
41
|
+
SingleQuote = "'",
|
|
42
|
+
WhiteSpace = " "
|
|
43
|
+
}
|
|
44
|
+
export declare enum BinaryOperator {
|
|
45
|
+
And = "AND",
|
|
46
|
+
Or = "OR",
|
|
47
|
+
Is = "IS",
|
|
48
|
+
IsNot = "ISNOT",
|
|
49
|
+
In = "IN",
|
|
50
|
+
NotIn = "NOT IN",
|
|
51
|
+
Between = "BETWEEN",
|
|
52
|
+
NotBetween = "NOTBETWEEN",
|
|
53
|
+
Like = "LIKE",
|
|
54
|
+
NotLike = "NOT LIKE",
|
|
55
|
+
NotEquals = "<>",
|
|
56
|
+
LessThan = "<",
|
|
57
|
+
GreaterThan = ">",
|
|
58
|
+
GreaterThanEqual = ">=",
|
|
59
|
+
LessThanEqual = "<=",
|
|
60
|
+
Equal = "=",
|
|
61
|
+
Multiply = "*",
|
|
62
|
+
Subtract = "-",
|
|
63
|
+
Add = "+",
|
|
64
|
+
Divide = "/",
|
|
65
|
+
Concatenate = "||"
|
|
66
|
+
}
|
|
67
|
+
export declare enum NodeReturnType {
|
|
68
|
+
Boolean = "BOOLEAN",
|
|
69
|
+
Double = "DOUBLE",
|
|
70
|
+
ExpressionList = "EXPRESSION-LIST",
|
|
71
|
+
Float = "FLOAT",
|
|
72
|
+
Integer = "INTEGER",
|
|
73
|
+
Null = "NULL",
|
|
74
|
+
Number = "NUMBER",
|
|
75
|
+
Real = "REAL",
|
|
76
|
+
String = "STRING",
|
|
77
|
+
SmallInt = "SMALLINT",
|
|
78
|
+
UnknownFunction = "UNKNOWN_FUNCTION"
|
|
79
|
+
}
|
|
80
|
+
export declare enum CallableExpressionResponse {
|
|
81
|
+
Function = "FUNCTION",
|
|
82
|
+
ExpressionList = "EXPRESSION_LIST",
|
|
83
|
+
Success = "SUCCESS",
|
|
84
|
+
NonCallable = "NON_CALLABLE"
|
|
85
|
+
}
|
|
86
|
+
export declare const tokenizationRegex: RegExp;
|
|
87
|
+
export declare const isValidIntervalValue: RegExp;
|
|
88
|
+
export declare const validOps: string[];
|
|
89
|
+
export declare const relationalTypes: SqlExpressionLiteral[];
|
|
90
|
+
export declare const qualifiers: TokenType[];
|
|
91
|
+
export declare function convertArcgisTypeToSqlReturnType(arcgisType: ArcGISFieldType): SqlExpressionLiteral;
|
|
92
|
+
export declare const identifyNodeReturnType: (node: SQLNode, fields: ApiVariable[]) => SqlExpressionLiteral | "time-only" | "unknown_function";
|
|
93
|
+
export declare const isNumericType: (type: SqlExpressionLiteral) => boolean;
|
|
94
|
+
export declare const formatListToString: (types: SqlExpressionLiteral[], delimiter: string) => string;
|
|
95
|
+
export declare const formatType: (type: string) => string;
|
|
96
|
+
export declare const getValueFromNode: (node: SQLNode) => number | string;
|
|
97
|
+
export declare const addNewMarker: (message: string, range: IRange | PeggyLocation, markers: editor.IMarkerData[], isNodeFormat?: boolean) => void;
|
|
98
|
+
export declare const validateTypeMatch: (node: SQLNode, expectedType: NodeReturnType, markers: editor.IMarkerData[], fields: ApiVariable[]) => void;
|
|
99
|
+
export declare function isSyntaxError(error: PeggyError): boolean;
|
|
100
|
+
export declare function formatSyntaxError(error: PeggyError): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SQLNode } from "./DependentFiles/WhereGrammar";
|
|
2
|
+
import type { editor } from "monaco-editor";
|
|
3
|
+
import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
|
|
4
|
+
export declare class SQLExpressionValidation {
|
|
5
|
+
private callStack;
|
|
6
|
+
private _sdkFunctions;
|
|
7
|
+
private _fields;
|
|
8
|
+
markers: editor.IMarkerData[];
|
|
9
|
+
constructor(sdkLibrary: ApiCategory[], _apiContext: ApiContext);
|
|
10
|
+
/**
|
|
11
|
+
* validates the SQL Expression by generating an AST and traversing it
|
|
12
|
+
* @param modelContent The SQL Expression to validate
|
|
13
|
+
*/
|
|
14
|
+
validateModel(modelContent: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* a DFS traversal of the SQL Expression AST
|
|
17
|
+
* @param node The node to traverse, start with the root node
|
|
18
|
+
*/
|
|
19
|
+
traverse(node: SQLNode): void;
|
|
20
|
+
/**
|
|
21
|
+
* Validates a nodes syntax and types
|
|
22
|
+
* @param node The node to validate
|
|
23
|
+
*/
|
|
24
|
+
private _validateNode;
|
|
25
|
+
private _handleParserFailure;
|
|
26
|
+
/**
|
|
27
|
+
* Formats a node's range into a Monaco IRange object.
|
|
28
|
+
* @param node
|
|
29
|
+
*/
|
|
30
|
+
private _getRange;
|
|
31
|
+
/**
|
|
32
|
+
* finds the function in the SDK library.
|
|
33
|
+
* @param name name of the function
|
|
34
|
+
*/
|
|
35
|
+
private _getFunction;
|
|
36
|
+
/**
|
|
37
|
+
* looks at the node and finds any children attached to it. If there are children, it will traverse them.
|
|
38
|
+
* @param node The current node to traverse
|
|
39
|
+
*/
|
|
40
|
+
private _traverseChildren;
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Uri } from "monaco-editor";
|
|
2
|
+
import type { ISqlExprWorker } from "./types";
|
|
3
|
+
import type { SqlExprDefaults } from "./sql-expr-defaults";
|
|
4
|
+
/**
|
|
5
|
+
* Manager to create our sql-expression worker and client proxy
|
|
6
|
+
*/
|
|
7
|
+
export declare class SqlExprWorkerManager {
|
|
8
|
+
private _defaults;
|
|
9
|
+
private _worker;
|
|
10
|
+
private _client;
|
|
11
|
+
private _configChangeListener;
|
|
12
|
+
constructor(_defaults: SqlExprDefaults);
|
|
13
|
+
dispose(): void;
|
|
14
|
+
stopWorker(): void;
|
|
15
|
+
private _getClientProxy;
|
|
16
|
+
getLanguageServiceWorker(...resources: Uri[]): Promise<ISqlExprWorker>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { languages, worker, editor } from "monaco-editor";
|
|
2
|
+
import type { ISqlExprWorker } from "./types";
|
|
3
|
+
import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
|
|
4
|
+
interface IWorkerData {
|
|
5
|
+
languageId: string;
|
|
6
|
+
languageOptions?: {
|
|
7
|
+
assetsPath?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The ArcGIS SQL Expression Web Worker is leveraging the Arcade Language Service to provide the editor functionalities.
|
|
12
|
+
* The ArcGIS SQL Expression Web Worker is proxied by the Monaco worker server.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SqlExprWorker implements ISqlExprWorker {
|
|
15
|
+
private _ctx;
|
|
16
|
+
private _languageId;
|
|
17
|
+
private _apiService;
|
|
18
|
+
constructor(_ctx: worker.IWorkerContext, { languageId, languageOptions }: IWorkerData);
|
|
19
|
+
doValidation(modelId: string, context: ApiContext): Promise<editor.IMarkerData[]>;
|
|
20
|
+
doComplete(modelId: string): Promise<languages.CompletionList>;
|
|
21
|
+
getApiLibrary(context: ApiContext): Promise<ApiCategory[]>;
|
|
22
|
+
private _getTextDocument;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EditorProfile } from "../profile/editor-profile";
|
|
2
|
+
import type { ApiProfile, ApiVariable } from "@arcgis/languages-api-utils";
|
|
3
|
+
import type { IPredefinedProfile, IEditorProfileDefinition } from "../profile/types";
|
|
4
|
+
/**
|
|
5
|
+
* Converts an editor profile to an api profile.
|
|
6
|
+
* The api profile is an optimized version of the editor profile designed for minimal data transfer between the main thread and the worker.
|
|
7
|
+
*/
|
|
8
|
+
export declare const sqlExprEditorToApiProfile: (editorProfile: EditorProfile) => ApiProfile;
|
|
9
|
+
export declare function convertToEditorProfileDefinition(predefinedProfile: IPredefinedProfile, locale?: string): Promise<IEditorProfileDefinition | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* util to retrieve fields from the $layer variable in the api context.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getFieldsFromLayerVariable: (profile: ApiProfile) => ApiVariable[];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Thenable, Uri, languages, editor } from "monaco-editor";
|
|
2
|
+
import type { Position } from "vscode-languageserver-types";
|
|
3
|
+
import type { PeggySyntaxError, FileRange } from "./PeggyGrammar/sql92grammar";
|
|
4
|
+
import type { DataTypeNode, SQLNode } from "./DependentFiles/WhereGrammar";
|
|
5
|
+
import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
|
|
6
|
+
export interface ISqlExprWorker {
|
|
7
|
+
doValidation: (modelId: string, context: ApiContext) => Thenable<editor.IMarkerData[]>;
|
|
8
|
+
doComplete: (modelId: string, position: Position) => Thenable<languages.CompletionList>;
|
|
9
|
+
getApiLibrary: (context: ApiContext) => Thenable<ApiCategory[]>;
|
|
10
|
+
}
|
|
11
|
+
export type ISqlExprWorkerAccessor = (...more: Uri[]) => Thenable<ISqlExprWorker>;
|
|
12
|
+
export interface ApiContextType {
|
|
13
|
+
description: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
name: string;
|
|
16
|
+
type: string[] | string;
|
|
17
|
+
description: string;
|
|
18
|
+
}[];
|
|
19
|
+
returnValue: string[] | string;
|
|
20
|
+
examples: {
|
|
21
|
+
code: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}[];
|
|
24
|
+
snippet: string[] | string;
|
|
25
|
+
name: string;
|
|
26
|
+
bundle: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* SQL Expression Literal. These are the types that occur within nodes of the AST generated by the peggy parser.
|
|
30
|
+
**/
|
|
31
|
+
export type SqlExpressionLiteral =
|
|
32
|
+
/**
|
|
33
|
+
* "date"
|
|
34
|
+
* "float"
|
|
35
|
+
* "integer"
|
|
36
|
+
* "real"
|
|
37
|
+
* "smallint"
|
|
38
|
+
* "time"
|
|
39
|
+
* "timestamp"
|
|
40
|
+
* "varchar"
|
|
41
|
+
*/
|
|
42
|
+
DataTypeNode["value"]["type"]
|
|
43
|
+
/**
|
|
44
|
+
* "case-expression"
|
|
45
|
+
* "when-clause"
|
|
46
|
+
* "parameter"
|
|
47
|
+
* "expression-list"
|
|
48
|
+
* "unary-expression"
|
|
49
|
+
* "binary-expression"
|
|
50
|
+
* "null"
|
|
51
|
+
* "boolean"
|
|
52
|
+
* "string"
|
|
53
|
+
* "number"
|
|
54
|
+
* "date"
|
|
55
|
+
* "time"
|
|
56
|
+
* "timestamp"
|
|
57
|
+
* "column-reference"
|
|
58
|
+
* "current-time"
|
|
59
|
+
* "interval"
|
|
60
|
+
* "interval-qualifier"
|
|
61
|
+
* "interval-period"
|
|
62
|
+
* "function"
|
|
63
|
+
* "data-type"
|
|
64
|
+
*/
|
|
65
|
+
| SQLNode["type"];
|
|
66
|
+
export type ArcGISFieldType =
|
|
67
|
+
/**
|
|
68
|
+
* "string"
|
|
69
|
+
* "date"
|
|
70
|
+
* "integer"
|
|
71
|
+
* "small-integer"
|
|
72
|
+
* "big-integer"
|
|
73
|
+
* "single"
|
|
74
|
+
* "double"
|
|
75
|
+
* "long"
|
|
76
|
+
* "date-only"
|
|
77
|
+
* "time-only"
|
|
78
|
+
* "timestamp-offset"
|
|
79
|
+
* "oid"
|
|
80
|
+
* "geometry"
|
|
81
|
+
* "blob"
|
|
82
|
+
* "raster"
|
|
83
|
+
* "guid"
|
|
84
|
+
* "global-id"
|
|
85
|
+
* "xml"
|
|
86
|
+
*/
|
|
87
|
+
__esri.Field["type"];
|
|
88
|
+
export type PeggyError = PeggySyntaxError;
|
|
89
|
+
export type PeggyLocation = FileRange;
|
package/package.json
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
+
"version": "4.31.0-next.21",
|
|
3
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
4
|
-
"homepage": "https://developers.arcgis.com/javascript/latest/",
|
|
5
|
-
"version": "4.31.0-next.2",
|
|
6
|
-
"module": "dist/components/index.js",
|
|
7
|
-
"main": "dist/index.cjs.js",
|
|
8
|
-
"types": "dist/types/index.d.ts",
|
|
9
5
|
"keywords": [
|
|
10
6
|
"ArcGIS",
|
|
11
7
|
"javascript",
|
|
@@ -17,6 +13,10 @@
|
|
|
17
13
|
"web-components",
|
|
18
14
|
"Esri"
|
|
19
15
|
],
|
|
16
|
+
"homepage": "https://developers.arcgis.com/javascript/latest/",
|
|
17
|
+
"main": "dist/index.cjs.js",
|
|
18
|
+
"module": "dist/components/index.js",
|
|
19
|
+
"types": "dist/types/index.d.ts",
|
|
20
20
|
"files": [
|
|
21
21
|
"dist/"
|
|
22
22
|
],
|
|
@@ -37,65 +37,71 @@
|
|
|
37
37
|
"build:components": "stencil build",
|
|
38
38
|
"build:components:dev": "stencil build --dev",
|
|
39
39
|
"build:monaco-workers": "tsx ./scripts/build-monaco-workers.ts",
|
|
40
|
+
"build:peggy": "peggy --plugin ../../../node_modules/ts-pegjs/dist/tspegjs -o ./src/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.ts ./src/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.peggy",
|
|
40
41
|
"test": "stencil test --spec --no-build",
|
|
41
42
|
"test:e2e": "stencil test --e2e",
|
|
42
43
|
"test:spec": "stencil test --spec",
|
|
43
44
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
44
45
|
"clean": "rimraf ./node_modules ./storybook-static ./storybook-static-external ./turbo ./dist ./www",
|
|
45
|
-
"pre": "rimraf ./dist ./www && yarn
|
|
46
|
+
"pre": "rimraf ./dist ./www && yarn build:monaco-workers",
|
|
46
47
|
"pre:dev": "yarn pre --sourcemap && yarn awc create-mock-doc",
|
|
47
48
|
"update:storybook": "npx storybook@latest upgrade",
|
|
48
49
|
"generate": "stencil generate"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@arcgis/arcade-languageservice": "4.31.0-next.
|
|
52
|
-
"@arcgis/components-controllers": "4.31.0-next.
|
|
53
|
-
"@arcgis/components-utils": "4.31.0-next.
|
|
52
|
+
"@arcgis/arcade-languageservice": "4.31.0-next.21",
|
|
53
|
+
"@arcgis/components-controllers": "4.31.0-next.21",
|
|
54
|
+
"@arcgis/components-utils": "4.31.0-next.21",
|
|
55
|
+
"@arcgis/languages-api-utils": "4.31.0-next.21",
|
|
54
56
|
"@stencil/core": "4.17.1",
|
|
55
57
|
"monaco-editor": "0.45.0",
|
|
56
58
|
"vscode-languageserver-types": "^3.17.5"
|
|
57
59
|
},
|
|
58
60
|
"devDependencies": {
|
|
59
|
-
"@arcgis/components-
|
|
60
|
-
"@arcgis/
|
|
61
|
-
"@arcgis/core
|
|
62
|
-
"@arcgis/
|
|
63
|
-
"@arcgis/
|
|
61
|
+
"@arcgis/components-build-utils": "4.31.0-next.21",
|
|
62
|
+
"@arcgis/components-plugins": "4.31.0-next.21",
|
|
63
|
+
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
64
|
+
"@arcgis/core-adapter": "4.31.0-next.21",
|
|
65
|
+
"@arcgis/storybook-utils": "4.31.0-next.21",
|
|
66
|
+
"@arcgis/typescript-config": "4.31.0-next.21",
|
|
64
67
|
"@esri/calcite-components": "^2.8.0",
|
|
65
68
|
"@stencil/angular-output-target": "0.8.4",
|
|
66
69
|
"@stencil/react-output-target": "0.5.3",
|
|
67
70
|
"@stencil/sass": "^3.0.0",
|
|
68
71
|
"@types/estree": "^1.0.0",
|
|
69
72
|
"@types/jest": "^29.5.0",
|
|
73
|
+
"@types/luxon": "^3",
|
|
70
74
|
"@types/marked": "^5.0.2",
|
|
71
75
|
"@types/node": "^20.2.5",
|
|
72
76
|
"@types/postcss-url": "^10.0.0",
|
|
73
77
|
"@types/resize-observer-browser": "^0.1.7",
|
|
74
78
|
"chromatic": "^11.3.0",
|
|
75
|
-
"esbuild": "^0.
|
|
79
|
+
"esbuild": "^0.21.4",
|
|
76
80
|
"eslint": "^8.55.0",
|
|
77
81
|
"jest": "^29.5.0",
|
|
78
82
|
"jest-cli": "^29.5.0",
|
|
79
|
-
"magic-string": "^0.30.
|
|
83
|
+
"magic-string": "^0.30.10",
|
|
80
84
|
"marked": "^5.1.2",
|
|
85
|
+
"peggy": "3.0.2",
|
|
81
86
|
"postcss": ">=8.4.31",
|
|
82
87
|
"postcss-discard-comments": "^5.1.2",
|
|
83
88
|
"postcss-url": "^10.1.3",
|
|
84
89
|
"puppeteer": "^21.9.0",
|
|
85
90
|
"resolve-pkg": "^2.0.0",
|
|
86
91
|
"rimraf": "^5.0.0",
|
|
87
|
-
"rollup": "^
|
|
92
|
+
"rollup": "^4.13.0",
|
|
88
93
|
"rollup-plugin-import-css": "^3.1.0",
|
|
89
94
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
90
|
-
"storybook": "^8.
|
|
95
|
+
"storybook": "^8.1.10",
|
|
96
|
+
"ts-pegjs": "^4.2.1",
|
|
91
97
|
"tsx": "^4.7.0",
|
|
92
|
-
"typescript": "~5.
|
|
98
|
+
"typescript": "~5.4.0",
|
|
93
99
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
94
100
|
"yargs": "^17.1.1"
|
|
95
101
|
},
|
|
96
102
|
"peerDependencies": {
|
|
97
|
-
"@arcgis/core": ">=4.
|
|
103
|
+
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
98
104
|
"@esri/calcite-components": "^2.8.0"
|
|
99
105
|
},
|
|
100
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "c366e874dab93d7398c3dd548a3afa9c19301e22"
|
|
101
107
|
}
|