@arcgis/coding-components 4.31.0-next.14 → 4.31.0-next.16
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/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +22 -22
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-14a7e4a7.js → p-02b874e8.js} +2 -2
- package/dist/arcgis-coding-components/{p-15035308.js → p-1e2279cc.js} +2 -2
- package/dist/arcgis-coding-components/{p-5edb4dd5.entry.js → p-2b27a086.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-349081dc.js → p-3c74050b.js} +2 -2
- package/dist/arcgis-coding-components/{p-02a3028d.js → p-50e86b46.js} +1 -1
- package/dist/arcgis-coding-components/{p-4e1baf2b.js → p-76006e9c.js} +2 -2
- package/dist/arcgis-coding-components/p-79dcb258.js +6 -0
- package/dist/arcgis-coding-components/{p-56114077.js → p-8966872b.js} +2 -2
- package/dist/arcgis-coding-components/{p-a3f5b077.js → p-8cdd34ef.js} +2 -2
- package/dist/arcgis-coding-components/{p-3194dfce.js → p-8d330c99.js} +1 -1
- package/dist/arcgis-coding-components/{p-ac75f363.js → p-90d805b1.js} +9 -9
- package/dist/arcgis-coding-components/{p-64529cc4.entry.js → p-a32d87a7.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-dbed8024.js → p-b6a71f8c.js} +2 -2
- package/dist/arcgis-coding-components/{p-f5478e14.js → p-b79b8d05.js} +1 -1
- package/dist/arcgis-coding-components/{p-014dd2cb.js → p-bf67decd.js} +2 -2
- package/dist/arcgis-coding-components/{p-4c90e818.js → p-c1e96e20.js} +2 -2
- package/dist/arcgis-coding-components/{p-491f66f0.js → p-c99fd015.js} +2 -2
- package/dist/arcgis-coding-components/{p-d254ce20.js → p-cb51690f.js} +2 -2
- package/dist/arcgis-coding-components/{p-b9abe4b6.entry.js → p-cff33f10.entry.js} +2 -2
- package/dist/cjs/{app-globals-c3a9c6b5.js → app-globals-14a87b68.js} +1 -1
- package/dist/cjs/{arcade-defaults-74a4b002.js → arcade-defaults-42912ee7.js} +4 -4
- package/dist/cjs/{arcade-language-features-1bb16f23.js → arcade-language-features-74cd4206.js} +2 -2
- package/dist/cjs/{arcade-mode-2f03fbdc.js → arcade-mode-b71d8dae.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +5 -5
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-7633e68d.js → css-594f973c.js} +1 -1
- package/dist/cjs/{cssMode-5c521540.js → cssMode-425aeb95.js} +2 -2
- package/dist/cjs/{html-eca36b9c.js → html-24c1de87.js} +2 -2
- package/dist/cjs/{htmlMode-884edc98.js → htmlMode-4c5fbc92.js} +2 -2
- package/dist/cjs/{index-2f8d54a3.js → index-550792e3.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-97857961.js → javascript-f01029cd.js} +3 -3
- package/dist/cjs/{jsonMode-19915981.js → jsonMode-bcac26bd.js} +2 -2
- package/dist/cjs/{language-defaults-base-a485a25f.js → language-defaults-base-3b76c8f8.js} +9 -9
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-a49a3cba.js → sql-expr-defaults-f4f96eff.js} +17 -4
- package/dist/cjs/{sql-expr-mode-846a0a87.js → sql-expr-mode-1940aabc.js} +17 -13
- package/dist/cjs/{tsMode-c396dc6b.js → tsMode-e5306938.js} +2 -2
- package/dist/cjs/{typescript-1a84bd43.js → typescript-45aff197.js} +2 -2
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-language-features.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcade-variables.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- 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.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-2JTWBRMN.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/language-defaults-base.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +14 -2
- package/dist/components/sql-expr-mode.js +14 -10
- package/dist/components/sql-expression-fields.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-ae203c41.js → app-globals-19951ed9.js} +1 -1
- package/dist/esm/{arcade-defaults-7b3d6288.js → arcade-defaults-488898c2.js} +4 -4
- package/dist/esm/{arcade-language-features-2eca78bd.js → arcade-language-features-ce5bcb3f.js} +2 -2
- package/dist/esm/{arcade-mode-3b2440c4.js → arcade-mode-a6cddce1.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +5 -5
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-45d2198d.js → css-961e913d.js} +1 -1
- package/dist/esm/{cssMode-bd462b9a.js → cssMode-b0f996af.js} +2 -2
- package/dist/esm/{html-8ed9cf62.js → html-d6c5dbdf.js} +2 -2
- package/dist/esm/{htmlMode-10b70ba3.js → htmlMode-0e58d960.js} +2 -2
- package/dist/esm/{index-25e55ede.js → index-6ce21710.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-4f75e997.js → javascript-d2ba63d4.js} +3 -3
- package/dist/esm/{jsonMode-86c9aa9c.js → jsonMode-41027f93.js} +2 -2
- package/dist/esm/{language-defaults-base-89690034.js → language-defaults-base-e18def9a.js} +9 -9
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-d07828da.js → sql-expr-defaults-6435e270.js} +17 -5
- package/dist/esm/{sql-expr-mode-0f5995a6.js → sql-expr-mode-dd9d29e1.js} +17 -13
- package/dist/esm/{tsMode-c4e4bef1.js → tsMode-6985d50b.js} +2 -2
- package/dist/esm/{typescript-bcfb687b.js → typescript-d9927631.js} +2 -2
- 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/utils/sql-expr-monaco/sql-expr-completion.d.ts +2 -2
- package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +5 -1
- package/package.json +12 -11
- package/dist/arcgis-coding-components/p-2fb72ae0.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
|
-
import { g as editor, z as languages, m as main, Q as debounce, O as Emitter } from './language-defaults-base-
|
|
7
|
-
import { s as sqlExprDefaults } from './sql-expr-defaults-
|
|
8
|
-
import { t as toCompletionItemKind } from './arcade-language-features-
|
|
9
|
-
import './index-
|
|
6
|
+
import { g as editor, z as languages, m as main, Q as debounce, O as Emitter } from './language-defaults-base-e18def9a.js';
|
|
7
|
+
import { b as getFieldsFromLayerVariable, s as sqlExprDefaults } from './sql-expr-defaults-6435e270.js';
|
|
8
|
+
import { t as toCompletionItemKind } from './arcade-language-features-ce5bcb3f.js';
|
|
9
|
+
import './index-6ce21710.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Manager to create our sql-expression worker and client proxy
|
|
@@ -20375,13 +20375,15 @@ const sortTextValues = {
|
|
|
20375
20375
|
keywords: "c",
|
|
20376
20376
|
dataType: "d",
|
|
20377
20377
|
};
|
|
20378
|
-
function generateCompletionItems(
|
|
20379
|
-
const fieldsCompletion =
|
|
20380
|
-
label: field.name,
|
|
20381
|
-
|
|
20382
|
-
insertText: field.name,
|
|
20383
|
-
range,
|
|
20378
|
+
function generateCompletionItems(fields, range, sdkFunctions) {
|
|
20379
|
+
const fieldsCompletion = fields.map((field) => ({
|
|
20380
|
+
label: field.completion?.label ?? field.name,
|
|
20381
|
+
insertText: field.completion?.insertText ?? field.name,
|
|
20384
20382
|
sortText: `z${sortTextValues.fields}`,
|
|
20383
|
+
detail: field.completion?.detail,
|
|
20384
|
+
range,
|
|
20385
|
+
kind: languages.CompletionItemKind.Variable,
|
|
20386
|
+
documentation: field.completion?.documentation,
|
|
20385
20387
|
}));
|
|
20386
20388
|
// {
|
|
20387
20389
|
// const funcName = func.toLowerCase();
|
|
@@ -20535,7 +20537,6 @@ class SqlExprCompletionProvider {
|
|
|
20535
20537
|
this._sdkFunctions = transposeSdkFunctions([]);
|
|
20536
20538
|
}
|
|
20537
20539
|
async provideCompletionItems(model, position) {
|
|
20538
|
-
const layer = this._defaults.getFeatureLayerForModel(model.uri.toString());
|
|
20539
20540
|
const word = model.getWordUntilPosition(position);
|
|
20540
20541
|
const range = {
|
|
20541
20542
|
startLineNumber: position.lineNumber,
|
|
@@ -20543,10 +20544,13 @@ class SqlExprCompletionProvider {
|
|
|
20543
20544
|
startColumn: word.startColumn,
|
|
20544
20545
|
endColumn: word.endColumn,
|
|
20545
20546
|
};
|
|
20547
|
+
const apiContext = this._defaults.getApiContextForModel(model.uri);
|
|
20548
|
+
// get the fields from the api context
|
|
20549
|
+
const fields = apiContext.profile ? getFieldsFromLayerVariable(apiContext.profile) : [];
|
|
20546
20550
|
const sdkLibrary = await this._defaults.getApiLibrary(model.uri.toString());
|
|
20547
20551
|
this._sdkFunctions = transposeSdkFunctions(sdkLibrary);
|
|
20548
20552
|
const sqlContextCompletion = sqlExpressionCompletion(range, model, position, this._sdkFunctions);
|
|
20549
|
-
const { sqlKeywordsCompletion, sqlBinOpsCompletion, sqlFunctionCompletion, fieldsCompletion, sqlDataTypeCompletion, } = generateCompletionItems(
|
|
20553
|
+
const { sqlKeywordsCompletion, sqlBinOpsCompletion, sqlFunctionCompletion, fieldsCompletion, sqlDataTypeCompletion, } = generateCompletionItems(fields, range, this._sdkFunctions);
|
|
20550
20554
|
/*
|
|
20551
20555
|
Filters our completion items list so that if we happen to have the same label but
|
|
20552
20556
|
different sortText order, we keep the sortText with the lowest ASCII value (i.e.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
|
-
import { N as typescriptDefaults, M as monaco_editor_core_star } from './language-defaults-base-
|
|
6
|
+
import { N as typescriptDefaults, M as monaco_editor_core_star } from './language-defaults-base-e18def9a.js';
|
|
7
7
|
|
|
8
8
|
/*!-----------------------------------------------------------------------------
|
|
9
9
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
|
-
import { M as monaco_editor_core_star } from './language-defaults-base-
|
|
6
|
+
import { M as monaco_editor_core_star } from './language-defaults-base-e18def9a.js';
|
|
7
7
|
|
|
8
8
|
/*!-----------------------------------------------------------------------------
|
|
9
9
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
package/dist/loader/cdn.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
6
|
module.exports = require('../cjs/loader.cjs.js');
|
|
7
7
|
module.exports.applyPolyfills = function() { return Promise.resolve() };
|
package/dist/loader/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
6
|
module.exports = require('../cjs/loader.cjs.js');
|
|
7
7
|
module.exports.applyPolyfills = function() { return Promise.resolve() };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
6
|
export * from '../esm/polyfills/index.js';
|
|
7
7
|
export * from '../esm/loader.js';
|
package/dist/loader/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.16
|
|
5
5
|
*/
|
|
6
6
|
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
7
7
|
export * from '../esm/polyfills/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as monaco from "monaco-editor";
|
|
2
|
-
import type { ApiItem } from "@arcgis/languages-api-utils";
|
|
2
|
+
import type { ApiItem, ApiVariable } from "@arcgis/languages-api-utils";
|
|
3
3
|
export declare function sqlExpressionCompletion(range: monaco.IRange, model: monaco.editor.ITextModel, position: monaco.Position, sdkFunctions: Record<string, ApiItem>): monaco.languages.CompletionItem[];
|
|
4
4
|
/** source */
|
|
5
5
|
export declare const sqlBinOps: string[];
|
|
6
|
-
export declare function generateCompletionItems(
|
|
6
|
+
export declare function generateCompletionItems(fields: ApiVariable[], range: monaco.IRange, sdkFunctions: Record<string, ApiItem>): Record<"fieldsCompletion" | "sqlBinOpsCompletion" | "sqlDataTypeCompletion" | "sqlFunctionCompletion" | "sqlKeywordsCompletion", monaco.languages.CompletionItem[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorProfile } from "../profile/editor-profile";
|
|
2
|
-
import type { ApiProfile } from "@arcgis/languages-api-utils";
|
|
2
|
+
import type { ApiProfile, ApiVariable } from "@arcgis/languages-api-utils";
|
|
3
3
|
import type { IPredefinedProfile, IEditorProfileDefinition } from "../profile/types";
|
|
4
4
|
/**
|
|
5
5
|
* Converts an editor profile to an api profile.
|
|
@@ -7,3 +7,7 @@ import type { IPredefinedProfile, IEditorProfileDefinition } from "../profile/ty
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const sqlExprEditorToApiProfile: (editorProfile: EditorProfile) => ApiProfile;
|
|
9
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[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.31.0-next.
|
|
3
|
+
"version": "4.31.0-next.16",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -49,20 +49,21 @@
|
|
|
49
49
|
"generate": "stencil generate"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@arcgis/arcade-languageservice": "4.31.0-next.
|
|
53
|
-
"@arcgis/components-controllers": "4.31.0-next.
|
|
54
|
-
"@arcgis/components-utils": "4.31.0-next.
|
|
55
|
-
"@arcgis/languages-api-utils": "4.31.0-next.
|
|
52
|
+
"@arcgis/arcade-languageservice": "4.31.0-next.16",
|
|
53
|
+
"@arcgis/components-controllers": "4.31.0-next.16",
|
|
54
|
+
"@arcgis/components-utils": "4.31.0-next.16",
|
|
55
|
+
"@arcgis/languages-api-utils": "4.31.0-next.16",
|
|
56
56
|
"@stencil/core": "4.17.1",
|
|
57
57
|
"monaco-editor": "0.45.0",
|
|
58
58
|
"vscode-languageserver-types": "^3.17.5"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@arcgis/components-
|
|
61
|
+
"@arcgis/components-build-utils": "4.31.0-next.16",
|
|
62
|
+
"@arcgis/components-plugins": "4.31.0-next.16",
|
|
62
63
|
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
63
|
-
"@arcgis/core-adapter": "4.31.0-next.
|
|
64
|
-
"@arcgis/storybook-utils": "4.31.0-next.
|
|
65
|
-
"@arcgis/typescript-config": "4.31.0-next.
|
|
64
|
+
"@arcgis/core-adapter": "4.31.0-next.16",
|
|
65
|
+
"@arcgis/storybook-utils": "4.31.0-next.16",
|
|
66
|
+
"@arcgis/typescript-config": "4.31.0-next.16",
|
|
66
67
|
"@esri/calcite-components": "^2.8.0",
|
|
67
68
|
"@stencil/angular-output-target": "0.8.4",
|
|
68
69
|
"@stencil/react-output-target": "0.5.3",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"eslint": "^8.55.0",
|
|
80
81
|
"jest": "^29.5.0",
|
|
81
82
|
"jest-cli": "^29.5.0",
|
|
82
|
-
"magic-string": "^0.30.
|
|
83
|
+
"magic-string": "^0.30.10",
|
|
83
84
|
"marked": "^5.1.2",
|
|
84
85
|
"peggy": "3.0.2",
|
|
85
86
|
"postcss": ">=8.4.31",
|
|
@@ -102,5 +103,5 @@
|
|
|
102
103
|
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
103
104
|
"@esri/calcite-components": "^2.8.0"
|
|
104
105
|
},
|
|
105
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "6466588cc937b91703f046c7bb7c8d8a42daef59"
|
|
106
107
|
}
|