@arcgis/coding-components 5.0.0-next.93 → 5.0.0-next.95
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 +3 -3
- package/dist/addons.js +26 -25
- package/dist/cdn/{ETMVFEBE.js → 26R4B4SR.js} +2 -2
- package/dist/cdn/{XOQ3RM5Y.js → 54FZPXUP.js} +2 -2
- package/dist/cdn/{ZBXNENKW.js → 5DAT5ZFW.js} +2 -2
- package/dist/cdn/{ITSWV2D2.js → BAKKWJI7.js} +2 -2
- package/dist/cdn/{BYEBULNN.js → CJ6SJGTO.js} +2 -2
- package/dist/cdn/{QONUPJDY.js → CLUG3LC4.js} +1 -1
- package/dist/cdn/{5XCYAKJJ.js → D5OWDVIG.js} +2 -2
- package/dist/cdn/{4P5HZOXS.js → DFLUHXMI.js} +2 -2
- package/dist/cdn/{LBTNX3UD.js → DIFXXFOE.js} +2 -2
- package/dist/cdn/{A323TEFP.js → DNW5A5G6.js} +2 -2
- package/dist/cdn/DPEHWNF4.js +14 -0
- package/dist/cdn/{QDDMGH2B.js → EMLWH6JD.js} +2 -2
- package/dist/cdn/{VAELJETA.js → FDTYASER.js} +2 -2
- package/dist/cdn/{UGVEW6ZQ.js → H44HKSEL.js} +1 -1
- package/dist/cdn/{5CEEVUCZ.js → HQO32HVD.js} +2 -2
- package/dist/cdn/{7FSEYOGD.js → HR7CEM5J.js} +2 -2
- package/dist/cdn/J5JG7YJY.js +4 -0
- package/dist/cdn/KFNUX4NF.js +4 -0
- package/dist/cdn/{I4JO32WF.js → KU2RSLW6.js} +2 -2
- package/dist/cdn/{PGSOHB37.js → KUOOSF2Y.js} +2 -2
- package/dist/cdn/MMTP5K7U.js +6 -0
- package/dist/cdn/{5EBSP7DM.js → NA3DW5WP.js} +2 -2
- package/dist/cdn/{V5FQNTXG.js → P3ADDEIL.js} +2 -2
- package/dist/cdn/{Z4L7OJKT.js → PJE2D7RB.js} +2 -2
- package/dist/cdn/{ZCT5XGMI.js → Q6M3EIWR.js} +1 -1
- package/dist/cdn/QGWBJM2F.js +4 -0
- package/dist/cdn/{GYL2QCR7.js → QNHGH7LN.js} +2 -2
- package/dist/cdn/{CT7TBHUK.js → QSZ5Q2P3.js} +2 -2
- package/dist/cdn/{CY2NIZSQ.js → QXAPL2AZ.js} +1 -1
- package/dist/cdn/{LC7PNNVV.js → R3ZFQ3NB.js} +3 -3
- package/dist/cdn/{N7HNKUKK.js → RTU52FLE.js} +2 -2
- package/dist/cdn/SE7546PF.js +4 -0
- package/dist/cdn/T5QY5OT3.js +4 -0
- package/dist/cdn/TBTRAJ2W.js +4 -0
- package/dist/cdn/{URZFEWH3.js → UEGR62F7.js} +2 -2
- package/dist/cdn/{PO35LCAS.js → UHWI5CWO.js} +2 -2
- package/dist/cdn/UQDJQX5N.js +4 -0
- package/dist/cdn/{K3L3TIEP.js → V5OOACSR.js} +2 -2
- package/dist/cdn/VLKLFWDG.js +4 -0
- package/dist/cdn/{2X52Y4DY.js → VYAAHXIM.js} +1 -1
- package/dist/cdn/W3HRDCHH.js +6 -0
- package/dist/cdn/{P6IUHZNJ.js → W5PCHPTR.js} +2 -2
- package/dist/cdn/{53OPBGH3.js → W6PBVDLA.js} +1 -1
- package/dist/cdn/WDT3UXU3.js +4 -0
- package/dist/cdn/WJOUYKK2.js +4 -0
- package/dist/cdn/{TRILF5XK.js → XLMLAWJH.js} +2 -2
- package/dist/cdn/{UTNSHEMF.js → XQXLHCC5.js} +1 -1
- package/dist/cdn/{2GQYFHB5.js → ZV42HAPL.js} +2 -2
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +759 -757
- 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 +55 -54
- 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 +203 -202
- 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 +67 -66
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +221 -110
- package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +4 -4
- package/dist/components/arcgis-arcade-editor/customElement.js +67 -65
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- 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 +15 -14
- package/dist/components/arcgis-editor-variables/customElement.js +10 -9
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +22 -21
- 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-assistant/aiContext.d.ts +6 -0
- package/dist/utils/arcade-assistant/types.d.ts +39 -0
- package/package.json +5 -5
- package/dist/cdn/3AOVYJDA.js +0 -4
- package/dist/cdn/DGSXN3MJ.js +0 -6
- package/dist/cdn/HNHID2GQ.js +0 -4
- package/dist/cdn/IBBEGZKT.js +0 -4
- package/dist/cdn/MIV62SB5.js +0 -4
- package/dist/cdn/MNSM3SGU.js +0 -4
- package/dist/cdn/PQAIRRA6.js +0 -4
- package/dist/cdn/SYFORY5P.js +0 -4
- package/dist/cdn/UPIRR7NI.js +0 -14
- package/dist/cdn/UVW7RTZM.js +0 -4
- package/dist/cdn/VFIPWTCQ.js +0 -4
- package/dist/cdn/WSQRFXIA.js +0 -4
- package/dist/cdn/YNQH23OP.js +0 -6
package/dist/chunks/markdown.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.95 */
|
|
4
4
|
function D() {
|
|
5
5
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
6
6
|
}
|
|
@@ -5,7 +5,7 @@ import "monaco-editor/esm/vs/platform/hover/browser/hover.js";
|
|
|
5
5
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
6
6
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
7
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
8
|
-
v5.0.0-next.
|
|
8
|
+
v5.0.0-next.95 */
|
|
9
9
|
const r = async () => {
|
|
10
10
|
const { editor: t } = await import("monaco-editor/esm/vs/editor/editor.api.js");
|
|
11
11
|
return t;
|
|
@@ -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.95 */
|
|
4
4
|
const e = {
|
|
5
5
|
"light-theme": { comment: "#606060", constant: "#9809C8", date: "#296389", identifier: "#0000B3", keyword: "#BF4900", number: "#136D3D", string: "#A31515", operator: "#9809C8", predefined: "#0000B3" },
|
|
6
6
|
"dark-theme": { comment: "#BFBFBF", constant: "#CDBAEA", date: "#97A6CE", identifier: "#9FD4F3", keyword: "#EEAA5A", number: "#AAD04B", string: "#F2877B", operator: "#CDBAEA", predefined: "#9FD4F3" }
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
3
3
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.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.95 */
|
|
7
7
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/5.0.0-next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
8
8
|
t.t = s;
|
|
9
9
|
t.o = r;
|
|
@@ -4,7 +4,7 @@ import { fetchT9nStringsBundle as M } from "@arcgis/toolkit/intl";
|
|
|
4
4
|
import { g as b } from "./runtime.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
7
|
-
v5.0.0-next.
|
|
7
|
+
v5.0.0-next.95 */
|
|
8
8
|
const x = (r) => {
|
|
9
9
|
const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
|
|
10
10
|
return {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { Emitter as
|
|
1
|
+
import { Emitter as S, languages as h } from "monaco-editor";
|
|
2
2
|
import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
3
3
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
4
4
|
import "monaco-editor/esm/vs/platform/hover/browser/hover.js";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
6
|
-
import { i as
|
|
7
|
-
import { Deferred as
|
|
6
|
+
import { i as E } from "./monaco-importer.js";
|
|
7
|
+
import { Deferred as m } from "@arcgis/toolkit/promise";
|
|
8
8
|
import { a as d } from "./sql-expr-defaults.js";
|
|
9
|
-
import { debounce as
|
|
10
|
-
import {
|
|
9
|
+
import { debounce as f } from "@arcgis/toolkit/function";
|
|
10
|
+
import { rethrowError as g } from "@arcgis/toolkit/log";
|
|
11
|
+
import { g as N } from "./sql-expr-service-accessors.js";
|
|
11
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
13
|
-
v5.0.0-next.
|
|
14
|
-
let
|
|
15
|
-
class
|
|
14
|
+
v5.0.0-next.95 */
|
|
15
|
+
let p = new m();
|
|
16
|
+
class C {
|
|
16
17
|
constructor(e) {
|
|
17
18
|
this._defaults = e, this._worker = null, this._client = null, this._configChangeListener = this._defaults.onDidChange(() => this.stopWorker());
|
|
18
19
|
}
|
|
@@ -20,17 +21,17 @@ class k {
|
|
|
20
21
|
this._configChangeListener.dispose(), this.stopWorker();
|
|
21
22
|
}
|
|
22
23
|
stopWorker() {
|
|
23
|
-
this._worker && (this._worker.dispose(), this._worker = null,
|
|
24
|
+
this._worker && (this._worker.dispose(), this._worker = null, p = new m()), this._client = null;
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Wait for the worker to be ready.
|
|
27
28
|
* @returns A promise that resolves when the worker is ready.
|
|
28
29
|
*/
|
|
29
30
|
static async waitForWorker() {
|
|
30
|
-
return await
|
|
31
|
+
return await p.promise;
|
|
31
32
|
}
|
|
32
33
|
async _getClientProxy() {
|
|
33
|
-
const e = await
|
|
34
|
+
const e = await E();
|
|
34
35
|
if (!this._client) {
|
|
35
36
|
const { languageId: t } = this._defaults;
|
|
36
37
|
this._worker = e.createWebWorker({
|
|
@@ -38,7 +39,7 @@ class k {
|
|
|
38
39
|
label: t,
|
|
39
40
|
createData: { languageId: t },
|
|
40
41
|
host: this._defaults.workerHost
|
|
41
|
-
}),
|
|
42
|
+
}), p.resolve(this._worker), this._client = this._worker.getProxy();
|
|
42
43
|
}
|
|
43
44
|
return await this._client;
|
|
44
45
|
}
|
|
@@ -47,7 +48,7 @@ class k {
|
|
|
47
48
|
return await this._worker?.withSyncedResources(e), t;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
const
|
|
51
|
+
const A = [
|
|
51
52
|
"AND",
|
|
52
53
|
"AS",
|
|
53
54
|
"BOTH",
|
|
@@ -95,7 +96,7 @@ const S = [
|
|
|
95
96
|
"WITH",
|
|
96
97
|
"YEAR",
|
|
97
98
|
"ZONE"
|
|
98
|
-
],
|
|
99
|
+
], L = [
|
|
99
100
|
// Logical
|
|
100
101
|
"AND",
|
|
101
102
|
"BETWEEN",
|
|
@@ -105,7 +106,7 @@ const S = [
|
|
|
105
106
|
// Predicates
|
|
106
107
|
"IS",
|
|
107
108
|
"NULL"
|
|
108
|
-
],
|
|
109
|
+
], x = [
|
|
109
110
|
// Conversion
|
|
110
111
|
"CAST",
|
|
111
112
|
// Datetime
|
|
@@ -173,9 +174,9 @@ const S = [
|
|
|
173
174
|
{ open: "[", close: "]", token: "delimiter.square" },
|
|
174
175
|
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
175
176
|
],
|
|
176
|
-
keywords:
|
|
177
|
-
operators:
|
|
178
|
-
builtinFunctions:
|
|
177
|
+
keywords: A,
|
|
178
|
+
operators: L,
|
|
179
|
+
builtinFunctions: x,
|
|
179
180
|
builtinVariables: [],
|
|
180
181
|
tokenizer: {
|
|
181
182
|
root: [
|
|
@@ -242,97 +243,97 @@ const S = [
|
|
|
242
243
|
]
|
|
243
244
|
}
|
|
244
245
|
};
|
|
245
|
-
class
|
|
246
|
+
class D {
|
|
246
247
|
constructor(e, t) {
|
|
247
248
|
this._worker = e, this._defaults = t;
|
|
248
249
|
}
|
|
249
250
|
async provideCompletionItems(e, t) {
|
|
250
251
|
try {
|
|
251
|
-
const
|
|
252
|
+
const s = await this._worker(e.uri), n = e.getWordUntilPosition(t), r = {
|
|
252
253
|
startLineNumber: t.lineNumber,
|
|
253
254
|
endLineNumber: t.lineNumber,
|
|
254
255
|
startColumn: n.startColumn,
|
|
255
256
|
endColumn: n.endColumn
|
|
256
257
|
}, c = this._defaults.getApiContextForModel(e.uri);
|
|
257
|
-
return await
|
|
258
|
-
} catch (
|
|
259
|
-
return
|
|
258
|
+
return await s.doComplete(e.uri.toString(), r, t, c);
|
|
259
|
+
} catch (s) {
|
|
260
|
+
return g("SqlExprCompletionProvider")(s), { suggestions: [] };
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
264
|
class b {
|
|
264
265
|
constructor(e, t, {
|
|
265
|
-
defaults:
|
|
266
|
+
defaults: s,
|
|
266
267
|
diagnosticService: n
|
|
267
268
|
}) {
|
|
268
|
-
this._languageId = e, this._worker = t, this._disposables = [], this._modelListeners = /* @__PURE__ */ new Map(), this._diagnosticsService = n, this._defaults =
|
|
269
|
+
this._languageId = e, this._worker = t, this._disposables = [], this._modelListeners = /* @__PURE__ */ new Map(), this._diagnosticsService = n, this._defaults = s, E().then((r) => {
|
|
269
270
|
const c = (o) => {
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
271
|
+
const i = o.getLanguageId();
|
|
272
|
+
if (i !== this._languageId)
|
|
272
273
|
return;
|
|
273
|
-
const l =
|
|
274
|
-
this._doValidate(o,
|
|
275
|
-
throw
|
|
274
|
+
const l = f(() => {
|
|
275
|
+
this._doValidate(o, i).catch((T) => {
|
|
276
|
+
throw T;
|
|
276
277
|
});
|
|
277
|
-
}),
|
|
278
|
-
this._modelListeners.set(o.uri.toString(), [
|
|
279
|
-
},
|
|
280
|
-
const
|
|
278
|
+
}), w = o.onDidChangeContent(l), I = o.onDidChangeAttached(l);
|
|
279
|
+
this._modelListeners.set(o.uri.toString(), [w, I]), this._doValidate(o, i).catch(g("SqlExprDiagnosticsAdapter"));
|
|
280
|
+
}, u = (o) => {
|
|
281
|
+
const i = o.uri.toString();
|
|
281
282
|
r.setModelMarkers(o, this._languageId, []);
|
|
282
|
-
const l = this._modelListeners.get(
|
|
283
|
+
const l = this._modelListeners.get(i);
|
|
283
284
|
if (l) {
|
|
284
285
|
for (; l.length; )
|
|
285
286
|
l.pop()?.dispose();
|
|
286
|
-
this._modelListeners.delete(
|
|
287
|
+
this._modelListeners.delete(i);
|
|
287
288
|
}
|
|
288
289
|
};
|
|
289
|
-
this._disposables.push(r.onDidCreateModel(c)), this._disposables.push(r.onWillDisposeModel((o) =>
|
|
290
|
+
this._disposables.push(r.onDidCreateModel(c)), this._disposables.push(r.onWillDisposeModel((o) => u(o))), this._disposables.push(
|
|
290
291
|
r.onDidChangeModelLanguage((o) => {
|
|
291
|
-
|
|
292
|
+
u(o.model), c(o.model);
|
|
292
293
|
})
|
|
293
294
|
), this._disposables.push(
|
|
294
|
-
|
|
295
|
+
s.onDidChange(() => {
|
|
295
296
|
r.getModels().forEach((o) => {
|
|
296
|
-
o.getLanguageId() === this._languageId && (
|
|
297
|
+
o.getLanguageId() === this._languageId && (u(o), c(o));
|
|
297
298
|
});
|
|
298
299
|
})
|
|
299
300
|
), this._disposables.push(
|
|
300
|
-
|
|
301
|
-
r.getModels().forEach((
|
|
302
|
-
|
|
301
|
+
s.onModelContextDidChange((o) => {
|
|
302
|
+
r.getModels().forEach((i) => {
|
|
303
|
+
i.getLanguageId() === this._languageId && i.uri.toString() === o && this._doValidate(i, this._languageId).catch(g("SqlExprDiagnosticsAdapter"));
|
|
303
304
|
});
|
|
304
305
|
})
|
|
305
306
|
), this._disposables.push({
|
|
306
307
|
dispose: () => {
|
|
307
|
-
this._modelListeners.forEach((o) => o.forEach((
|
|
308
|
+
this._modelListeners.forEach((o) => o.forEach((i) => i.dispose())), this._modelListeners.clear();
|
|
308
309
|
}
|
|
309
310
|
}), r.getModels().forEach(c);
|
|
310
311
|
});
|
|
311
312
|
}
|
|
312
313
|
async _doValidate(e, t) {
|
|
313
|
-
const
|
|
314
|
+
const s = await E();
|
|
314
315
|
if (e.isAttachedToEditor())
|
|
315
316
|
try {
|
|
316
317
|
const n = await this._worker(e.uri), r = this._defaults.getApiContextForModel(e.uri), c = await n.doValidation(e.uri.toString(), r);
|
|
317
|
-
this._diagnosticsService.fireDiagnosticsChange(e.uri, c),
|
|
318
|
+
this._diagnosticsService.fireDiagnosticsChange(e.uri, c), s.setModelMarkers(e, t, c);
|
|
318
319
|
} catch (n) {
|
|
319
|
-
|
|
320
|
+
g("SqlExprDiagnosticsAdapter")(n);
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
}
|
|
323
|
-
let
|
|
324
|
-
async function
|
|
325
|
-
return await
|
|
326
|
-
if (!
|
|
324
|
+
let _;
|
|
325
|
+
async function K(...a) {
|
|
326
|
+
return await C.waitForWorker(), await new Promise((e, t) => {
|
|
327
|
+
if (!_) {
|
|
327
328
|
t(new Error("sql expression worker not registered!"));
|
|
328
329
|
return;
|
|
329
330
|
}
|
|
330
|
-
e(
|
|
331
|
+
e(_(...a));
|
|
331
332
|
});
|
|
332
333
|
}
|
|
333
|
-
class
|
|
334
|
+
class O {
|
|
334
335
|
constructor() {
|
|
335
|
-
this._onDiagnosticsChange = new
|
|
336
|
+
this._onDiagnosticsChange = new S();
|
|
336
337
|
}
|
|
337
338
|
/**
|
|
338
339
|
* An event to signal changes to the diagnostics.
|
|
@@ -350,21 +351,21 @@ class D {
|
|
|
350
351
|
this._onDiagnosticsChange.fire({ uri: e, diagnostics: t });
|
|
351
352
|
}
|
|
352
353
|
}
|
|
353
|
-
const
|
|
354
|
-
async function
|
|
355
|
-
return await
|
|
354
|
+
const k = new O();
|
|
355
|
+
async function Y() {
|
|
356
|
+
return await N(), k;
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
-
const e = new
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
|
|
358
|
+
function Z(a) {
|
|
359
|
+
const e = new C(a), t = async (...n) => await e.getLanguageServiceWorker(...n);
|
|
360
|
+
_ = t, h.setMonarchTokensProvider(d.languageId, M), h.setLanguageConfiguration(d.languageId, R);
|
|
361
|
+
const s = new D(t, d);
|
|
362
|
+
h.registerCompletionItemProvider(d.languageId, s), new b(a.languageId, t, {
|
|
362
363
|
defaults: a,
|
|
363
|
-
diagnosticService:
|
|
364
|
+
diagnosticService: k
|
|
364
365
|
});
|
|
365
366
|
}
|
|
366
367
|
export {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
Y as getSqlExprDiagnosticService,
|
|
369
|
+
K as getSqlExprWorker,
|
|
370
|
+
Z as setupMode
|
|
370
371
|
};
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/lumina/controllers";
|
|
|
2
2
|
import { g as t } from "./runtime.js";
|
|
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.95 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
package/dist/chunks/utilities.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createFilterExpression as d } from "@arcgis/toolkit/string";
|
|
|
2
2
|
import { format as f } from "@arcgis/arcade-languageservice";
|
|
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.95 */
|
|
6
6
|
function b(e, r, s, u) {
|
|
7
7
|
if (!r)
|
|
8
8
|
return [];
|