@arcgis/coding-components 5.1.0-next.54 → 5.1.0-next.56
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/cdn/{PKG2K3V2.js → 23B5EVBR.js} +1 -1
- package/dist/cdn/2RXM4OOZ.js +2 -0
- package/dist/cdn/2XTHR2WZ.js +2 -0
- package/dist/cdn/5PWITOEV.js +2 -0
- package/dist/cdn/A53COIII.js +6 -0
- package/dist/cdn/AESP7B22.js +2 -0
- package/dist/cdn/AHN2NEBT.js +2 -0
- package/dist/cdn/{54ZOADNQ.js → BXUVVQLE.js} +1 -1
- package/dist/cdn/BYHBHJML.js +2 -0
- package/dist/cdn/CLBLJN2Z.js +7 -0
- package/dist/cdn/CZ2DJPO4.js +2 -0
- package/dist/cdn/DGFH2WPL.js +2 -0
- package/dist/cdn/{RJRCBNNO.js → DJYSIOXC.js} +1 -1
- package/dist/cdn/FLNLMLTL.js +2 -0
- package/dist/cdn/ITDFOKJG.js +2 -0
- package/dist/cdn/MH4UADDE.js +2 -0
- package/dist/cdn/{UZJHWA6T.js → ODKUCLFB.js} +1 -1
- package/dist/cdn/{PVL67WGX.js → PD5NEK47.js} +1 -1
- package/dist/cdn/PRB6IWVU.js +2 -0
- package/dist/cdn/{4A2CLADY.js → QCARFVF7.js} +1 -1
- package/dist/cdn/{6YD47X7H.js → QF6ON7LK.js} +1 -1
- package/dist/cdn/QRDRCFJZ.js +2 -0
- package/dist/cdn/SV4IPD4A.js +2 -0
- package/dist/cdn/UH44LJA7.js +4 -0
- package/dist/cdn/VF7TALAI.js +12 -0
- package/dist/cdn/VPP77CFW.js +2 -0
- package/dist/cdn/YPMKBMXS.js +2 -0
- package/dist/cdn/ZHZFKZA7.js +2 -0
- package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +120 -117
- package/dist/cdn/assets/code-editor/sql-layer.worker.js +10087 -0
- package/dist/cdn/assets/editor-variables/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/sql-expression-editor/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/sql-layer-editor/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/arcade-defaults.js +98 -96
- package/dist/chunks/arcade-service-accessors.js +40 -28
- package/dist/chunks/bigquery.js +186 -0
- package/dist/chunks/colorize.js +1 -1
- package/dist/chunks/fields.js +2 -2
- package/dist/chunks/language-defaults-base.js +733 -464
- package/dist/chunks/postgres.js +209 -0
- package/dist/chunks/setup-monaco-theme.js +28 -20
- package/dist/chunks/sql-expr-defaults.js +11 -10
- package/dist/chunks/sql-layer-defaults.js +231 -0
- package/dist/chunks/sql-layer-mode.js +301 -0
- package/dist/chunks/sqlServer.js +288 -0
- package/dist/chunks/utils.js +184 -0
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +134 -123
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +17 -0
- package/dist/components/arcgis-arcade-editor/customElement.js +22 -22
- package/dist/components/arcgis-code-editor/customElement.d.ts +2 -1
- package/dist/components/arcgis-code-editor/customElement.js +91 -71
- package/dist/components/arcgis-editor-variables/customElement.js +50 -47
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +12 -0
- package/dist/components/arcgis-sql-expression-editor/customElement.js +17 -17
- package/dist/components/arcgis-sql-layer-editor/customElement.d.ts +50 -0
- package/dist/components/arcgis-sql-layer-editor/customElement.js +92 -0
- package/dist/components/arcgis-sql-layer-editor/index.d.ts +1 -0
- package/dist/components/arcgis-sql-layer-editor/index.js +7 -0
- package/dist/components/types.d.ts +79 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/loader.js +6 -5
- package/dist/types/lumina.d.ts +9 -2
- package/dist/types/preact.d.ts +10 -2
- package/dist/types/react.d.ts +11 -2
- package/dist/types/stencil.d.ts +9 -2
- package/dist/utils/data-catalog-datastore.d.ts +170 -0
- package/package.json +5 -5
- package/dist/cdn/5CO7XWOT.js +0 -2
- package/dist/cdn/5FXY5U3T.js +0 -2
- package/dist/cdn/CYC4AWZE.js +0 -2
- package/dist/cdn/GVO3LEFV.js +0 -2
- package/dist/cdn/J5X2KSYD.js +0 -2
- package/dist/cdn/QHJAF7L3.js +0 -6
- package/dist/cdn/T7GEIGWF.js +0 -2
- package/dist/cdn/TAXRVBJC.js +0 -2
- package/dist/cdn/VR5CATAW.js +0 -2
- package/dist/cdn/WTNM2NCZ.js +0 -2
- package/dist/cdn/XEUG3X2W.js +0 -2
- package/dist/cdn/ZJCI6LP6.js +0 -12
- package/dist/cdn/ZSVJAJND.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"backtotop":"Back to top","expand":"Expand","loading":"Loading","profilevariables":"Profile variables","noitems":"No items","
|
|
1
|
+
{"backtotop":"Back to top","expand":"Expand","loading":"Loading","profilevariables":"Profile variables","noitems":"No items","profileempty":"This profile does not have any variables.","fields":"Fields","tables":"Tables","filterthevariablesbyname":"Filter the variables by name"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fields":"Fields","functions":"Functions"}
|
|
1
|
+
{"fields":"Fields","functions":"Functions","profileempty":"No fields available."}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"loading":"Loading","profileempty":"No datastore tables available.","tables":"Tables"}
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{I as s,u as e}from"./4BNI5KJQ.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./
|
|
2
|
+
import{I as s,u as e}from"./4BNI5KJQ.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./UH44LJA7.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./BYHBHJML.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./23B5EVBR.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./QF6ON7LK.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./PRB6IWVU.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./EMXJL3XV.js")],"arcgis-code-viewer":[()=>import("./AESP7B22.js"),"language,round"],"arcgis-editor-variables":[()=>import("./ITDFOKJG.js"),"closed,heading,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./PD5NEK47.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./2RXM4OOZ.js"),"hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./QRDRCFJZ.js"),"hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
|
package/dist/cdn/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}
|
|
1
|
+
@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}
|
|
@@ -1,97 +1,98 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { g as v, f as F, m as M, L as S, E as L } from "./language-defaults-base.js";
|
|
3
|
+
import { i as h, a as A, b as k, c as E, d as I, e as C, f as P } from "./utils.js";
|
|
4
|
+
import { supportedLocales as j, fetchT9nStringsBundle as $ } from "@arcgis/toolkit/intl";
|
|
5
|
+
import { g as T } from "./runtime.js";
|
|
6
|
+
import { CompletionItemKind as w, InsertTextFormat as u, InsertTextMode as f } from "vscode-languageserver-types";
|
|
7
|
+
import { getDeclaredPixelMembers as B } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
|
|
7
8
|
import "@arcgis/toolkit/type";
|
|
8
|
-
async function
|
|
9
|
-
const { apiVersion: i, bundles: t, hiddenApiItems:
|
|
10
|
-
return { apiVersion: i, bundles: t, variables:
|
|
9
|
+
async function K(e) {
|
|
10
|
+
const { apiVersion: i, bundles: t, hiddenApiItems: o } = e.toEditorProfileDefinition(), s = await b(e.dictionaryVariables.filter(P));
|
|
11
|
+
return { apiVersion: i, bundles: t, variables: s, hiddenApiItems: o?.map((a) => a.toLowerCase()) };
|
|
11
12
|
}
|
|
12
|
-
async function
|
|
13
|
+
async function b(e, i = w.Variable) {
|
|
13
14
|
return await Promise.all(
|
|
14
15
|
e.map(async (t) => {
|
|
15
16
|
switch (t.type) {
|
|
16
17
|
case "dictionary":
|
|
17
|
-
return await
|
|
18
|
+
return await O(t, i);
|
|
18
19
|
case "pixel":
|
|
19
|
-
return await
|
|
20
|
+
return await z(t, i);
|
|
20
21
|
// Voxel is equivalent to features in regards to the languageservice.
|
|
21
22
|
// They both have equivalent fields, but some voxel fields are different types (arrays)
|
|
22
23
|
// than what is reported in .fields, so in the sidebar we treat a bit differently.
|
|
23
24
|
// In autocomplete we don't differentiate types, so we can use the same logic as features.
|
|
24
25
|
case "voxel":
|
|
25
26
|
case "feature":
|
|
26
|
-
return await
|
|
27
|
+
return await q(t, i);
|
|
27
28
|
default:
|
|
28
|
-
return
|
|
29
|
+
return _(t, i);
|
|
29
30
|
}
|
|
30
31
|
})
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
const { name: t, type:
|
|
34
|
+
function _(e, i) {
|
|
35
|
+
const { name: t, type: o } = e, s = e.getDescription(), a = i === w.Field ? v(t, !1) : t;
|
|
35
36
|
return {
|
|
36
37
|
name: t,
|
|
37
|
-
description:
|
|
38
|
-
type:
|
|
38
|
+
description: s,
|
|
39
|
+
type: o,
|
|
39
40
|
completion: {
|
|
40
41
|
label: t,
|
|
41
42
|
detail: t,
|
|
42
43
|
insertText: a,
|
|
43
44
|
insertTextMode: f.asIs,
|
|
44
|
-
insertTextFormat:
|
|
45
|
+
insertTextFormat: u.PlainText,
|
|
45
46
|
kind: i,
|
|
46
|
-
documentation: { kind: "markdown", value:
|
|
47
|
+
documentation: { kind: "markdown", value: s }
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
async function
|
|
51
|
-
const t = await e.loadSource(), { name:
|
|
52
|
-
label:
|
|
53
|
-
detail:
|
|
54
|
-
insertText:
|
|
51
|
+
async function q(e, i) {
|
|
52
|
+
const t = await e.loadSource(), { name: o } = e, s = e.getDescription(), a = {
|
|
53
|
+
label: o,
|
|
54
|
+
detail: o,
|
|
55
|
+
insertText: o,
|
|
55
56
|
insertTextMode: f.asIs,
|
|
56
|
-
insertTextFormat:
|
|
57
|
+
insertTextFormat: u.PlainText,
|
|
57
58
|
kind: i
|
|
58
59
|
}, n = {
|
|
59
|
-
name:
|
|
60
|
-
description:
|
|
60
|
+
name: o,
|
|
61
|
+
description: s,
|
|
61
62
|
type: "dictionary",
|
|
62
63
|
properties: [],
|
|
63
64
|
completion: a
|
|
64
65
|
};
|
|
65
66
|
if (!t)
|
|
66
67
|
return n;
|
|
67
|
-
const [r, c] =
|
|
68
|
+
const [r, c] = F(t.fields, s, !0);
|
|
68
69
|
return n.properties = r, a.documentation = { kind: "markdown", value: c }, n;
|
|
69
70
|
}
|
|
70
|
-
async function
|
|
71
|
-
const t = await e.loadSource(),
|
|
72
|
-
if (
|
|
71
|
+
async function z(e, i) {
|
|
72
|
+
const t = await e.loadSource(), o = e.toProfileVariableDefinition();
|
|
73
|
+
if (o.type !== "pixel")
|
|
73
74
|
throw new Error("Incorrect definition passed to pixel variable");
|
|
74
|
-
const { name:
|
|
75
|
-
label:
|
|
76
|
-
detail:
|
|
77
|
-
insertText:
|
|
75
|
+
const { name: s } = e, a = e.getDescription(), n = {
|
|
76
|
+
label: s,
|
|
77
|
+
detail: s,
|
|
78
|
+
insertText: s,
|
|
78
79
|
insertTextMode: f.asIs,
|
|
79
|
-
insertTextFormat:
|
|
80
|
+
insertTextFormat: u.PlainText,
|
|
80
81
|
kind: i
|
|
81
82
|
}, r = {
|
|
82
|
-
name:
|
|
83
|
+
name: s,
|
|
83
84
|
description: a,
|
|
84
85
|
type: "dictionary",
|
|
85
86
|
properties: [],
|
|
86
87
|
completion: n
|
|
87
88
|
};
|
|
88
|
-
if (!t || !
|
|
89
|
+
if (!t || !o.definition)
|
|
89
90
|
return r;
|
|
90
|
-
const c = await
|
|
91
|
+
const c = await B(t), [d, l] = M(c, a);
|
|
91
92
|
return r.properties = d, n.documentation = { kind: "markdown", value: l }, r;
|
|
92
93
|
}
|
|
93
|
-
async function
|
|
94
|
-
const { name: t, dictionaryVariables:
|
|
94
|
+
async function O(e, i) {
|
|
95
|
+
const { name: t, dictionaryVariables: o } = e, s = e.getDescription(), a = o.reduce((n, r) => {
|
|
95
96
|
n !== "" && (n += `
|
|
96
97
|
|
|
97
98
|
`), n += `**${r.name}**
|
|
@@ -99,50 +100,51 @@ ${r.type}`;
|
|
|
99
100
|
const c = r.getDescription();
|
|
100
101
|
return c && (n += `
|
|
101
102
|
${c}`), n;
|
|
102
|
-
},
|
|
103
|
+
}, s);
|
|
103
104
|
return {
|
|
104
105
|
name: t,
|
|
105
|
-
description:
|
|
106
|
+
description: s,
|
|
106
107
|
type: "dictionary",
|
|
107
|
-
|
|
108
|
+
// TODO(editor-profile): remove filter once we have a arcade-specific editor profile type that doesn't include SQL-layer-specific variables.
|
|
109
|
+
properties: await b(o.filter(P), w.Field),
|
|
108
110
|
completion: {
|
|
109
111
|
label: t,
|
|
110
112
|
detail: t,
|
|
111
113
|
insertText: t,
|
|
112
114
|
insertTextMode: f.asIs,
|
|
113
|
-
insertTextFormat:
|
|
115
|
+
insertTextFormat: u.PlainText,
|
|
114
116
|
kind: i,
|
|
115
117
|
documentation: { kind: "markdown", value: a }
|
|
116
118
|
}
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
121
|
async function y(e = "en") {
|
|
120
|
-
const i =
|
|
122
|
+
const i = x.get(e);
|
|
121
123
|
if (i)
|
|
122
124
|
return i;
|
|
123
|
-
if (!
|
|
125
|
+
if (!j.has(e))
|
|
124
126
|
return await y("en");
|
|
125
127
|
try {
|
|
126
|
-
const t = await fetch(
|
|
127
|
-
return t.ok ?
|
|
128
|
+
const t = await fetch(T(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
|
|
129
|
+
return t.ok ? Q(e, await t.json()) : e === "en" ? null : await y("en");
|
|
128
130
|
} catch {
|
|
129
131
|
return null;
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
|
-
const
|
|
133
|
-
function
|
|
134
|
+
const x = /* @__PURE__ */ new Map();
|
|
135
|
+
function Q(e, i) {
|
|
134
136
|
const t = /* @__PURE__ */ new Map();
|
|
135
|
-
return i.forEach((
|
|
136
|
-
t.set(
|
|
137
|
-
}),
|
|
137
|
+
return i.forEach((o) => {
|
|
138
|
+
t.set(o.id, o);
|
|
139
|
+
}), x.set(e, t), t;
|
|
138
140
|
}
|
|
139
|
-
async function
|
|
141
|
+
async function U(e, i = "en") {
|
|
140
142
|
return (await y(i))?.get(e) ?? null;
|
|
141
143
|
}
|
|
142
|
-
function
|
|
144
|
+
function G(e) {
|
|
143
145
|
return !!e && typeof e == "object" && "additionalVariables" in e && Array.isArray(e.additionalVariables);
|
|
144
146
|
}
|
|
145
|
-
function
|
|
147
|
+
function H(e) {
|
|
146
148
|
return e?.map(m);
|
|
147
149
|
}
|
|
148
150
|
function m(e) {
|
|
@@ -151,7 +153,7 @@ function m(e) {
|
|
|
151
153
|
return {
|
|
152
154
|
...e,
|
|
153
155
|
type: e.type,
|
|
154
|
-
properties:
|
|
156
|
+
properties: H(e.properties)
|
|
155
157
|
};
|
|
156
158
|
case "array":
|
|
157
159
|
return {
|
|
@@ -163,14 +165,14 @@ function m(e) {
|
|
|
163
165
|
return { ...e, type: e.type };
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
|
-
async function
|
|
168
|
+
async function J(e, i = "en") {
|
|
167
169
|
if (!h(e))
|
|
168
170
|
return;
|
|
169
|
-
const t = await
|
|
171
|
+
const t = await U(e.id, i);
|
|
170
172
|
if (!t)
|
|
171
173
|
return;
|
|
172
|
-
const
|
|
173
|
-
Object.entries(
|
|
174
|
+
const o = e.definitions, s = new Map(
|
|
175
|
+
Object.entries(o).map(([n, r]) => [n.toLowerCase(), r])
|
|
174
176
|
), a = {
|
|
175
177
|
bundles: [...t.bundles],
|
|
176
178
|
variables: [],
|
|
@@ -179,7 +181,7 @@ async function H(e, i = "en") {
|
|
|
179
181
|
return t.variables.forEach((n) => {
|
|
180
182
|
if (e.disabledVariables?.includes(n.name))
|
|
181
183
|
return;
|
|
182
|
-
const r =
|
|
184
|
+
const r = s.get(n.name.toLowerCase());
|
|
183
185
|
switch (n.type) {
|
|
184
186
|
case "dictionary":
|
|
185
187
|
return a.variables.push(
|
|
@@ -190,21 +192,21 @@ async function H(e, i = "en") {
|
|
|
190
192
|
})
|
|
191
193
|
);
|
|
192
194
|
case "feature":
|
|
193
|
-
return
|
|
195
|
+
return C(r) ? a.variables.push({ ...n, type: "feature", definition: r }) : void 0;
|
|
194
196
|
case "pixel":
|
|
195
|
-
return
|
|
197
|
+
return I(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
196
198
|
case "voxel":
|
|
197
|
-
return
|
|
199
|
+
return E(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
198
200
|
case "featureSet":
|
|
199
|
-
return
|
|
201
|
+
return k(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
200
202
|
case "featureSetCollection":
|
|
201
|
-
return
|
|
203
|
+
return A(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
202
204
|
default:
|
|
203
205
|
return a.variables.push(m(n));
|
|
204
206
|
}
|
|
205
|
-
}),
|
|
207
|
+
}), G(e) && a.variables.push(...e.additionalVariables ?? []), a;
|
|
206
208
|
}
|
|
207
|
-
const
|
|
209
|
+
const N = [
|
|
208
210
|
"catalog-footprint",
|
|
209
211
|
"catalog",
|
|
210
212
|
"csv",
|
|
@@ -216,16 +218,16 @@ const J = [
|
|
|
216
218
|
"subtype-sublayer",
|
|
217
219
|
"wfs"
|
|
218
220
|
];
|
|
219
|
-
function
|
|
220
|
-
return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" &&
|
|
221
|
+
function R(e) {
|
|
222
|
+
return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" && N.includes(e.type);
|
|
221
223
|
}
|
|
222
|
-
const
|
|
224
|
+
const W = {
|
|
223
225
|
filterFsCollectionLayersFromMap: (e) => (
|
|
224
226
|
// only some layers are supported in arcade feature sets, one example: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715
|
|
225
|
-
|
|
227
|
+
R(e)
|
|
226
228
|
)
|
|
227
229
|
};
|
|
228
|
-
class
|
|
230
|
+
class X extends S {
|
|
229
231
|
/**
|
|
230
232
|
* Per-model update chaining to serialize profile updates.
|
|
231
233
|
*
|
|
@@ -256,40 +258,40 @@ class W extends E {
|
|
|
256
258
|
* @param locale The locale to use for the model context.
|
|
257
259
|
* @returns The EditorProfile for the model.
|
|
258
260
|
*/
|
|
259
|
-
async setProfileForModel(i, t,
|
|
260
|
-
const
|
|
261
|
-
const c = t, d = h(c) ? await
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
async setProfileForModel(i, t, o = { locale: "en" }) {
|
|
262
|
+
const s = this._getApiKey(i), n = (this.#e.get(s) || Promise.resolve()).then(async () => {
|
|
263
|
+
const c = t, d = h(c) ? await J(c, o.locale) : c, l = await $(
|
|
264
|
+
o.locale,
|
|
265
|
+
T("./assets/editor-profile/t9n"),
|
|
264
266
|
"messages."
|
|
265
267
|
);
|
|
266
268
|
if (!l)
|
|
267
|
-
throw new Error(`Failed to load the language bundle for ${
|
|
269
|
+
throw new Error(`Failed to load the language bundle for ${o.locale}`);
|
|
268
270
|
this.disposeForModel(i);
|
|
269
|
-
const g = new
|
|
271
|
+
const g = new L(
|
|
270
272
|
d,
|
|
271
273
|
l,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
o.locale,
|
|
275
|
+
W
|
|
274
276
|
);
|
|
275
|
-
this._modelToProfileMap.set(
|
|
276
|
-
const
|
|
277
|
+
this._modelToProfileMap.set(s, g);
|
|
278
|
+
const D = await K(g);
|
|
277
279
|
this.updateApiContextForModel(i, {
|
|
278
|
-
locale:
|
|
279
|
-
profile:
|
|
280
|
-
snippets:
|
|
280
|
+
locale: o.locale,
|
|
281
|
+
profile: D,
|
|
282
|
+
snippets: o.snippets
|
|
281
283
|
});
|
|
282
284
|
}), r = n.finally(() => {
|
|
283
|
-
this.#e.get(
|
|
285
|
+
this.#e.get(s) === r && this.#e.delete(s);
|
|
284
286
|
});
|
|
285
|
-
return this.#e.set(
|
|
287
|
+
return this.#e.set(s, r), await n;
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
|
-
const
|
|
289
|
-
setProfileForModel:
|
|
290
|
-
getApiLibraryForModel:
|
|
290
|
+
const p = new X(), re = {
|
|
291
|
+
setProfileForModel: p.setProfileForModel.bind(p),
|
|
292
|
+
getApiLibraryForModel: p.getApiLibraryForModel.bind(p)
|
|
291
293
|
};
|
|
292
294
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
re as a,
|
|
296
|
+
p as b
|
|
295
297
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import d from "@arcgis/core/request.js";
|
|
3
3
|
import "monaco-editor";
|
|
4
4
|
import { StandaloneServices as w } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
6
|
-
import { IHoverService as
|
|
6
|
+
import { IHoverService as y } from "monaco-editor/esm/vs/platform/hover/browser/hover.js";
|
|
7
7
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
8
8
|
import "monaco-editor/esm/vs/base/browser/dom.js";
|
|
9
9
|
import "monaco-editor/esm/vs/editor/browser/editorDom.js";
|
|
@@ -11,41 +11,53 @@ import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
|
|
|
11
11
|
function g() {
|
|
12
12
|
return !!window.MonacoEnvironment?.getWorker;
|
|
13
13
|
}
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
async function
|
|
14
|
+
let n = "";
|
|
15
|
+
const m = /* @__PURE__ */ new Map(), i = !1;
|
|
16
|
+
async function l(s, e, r) {
|
|
17
17
|
if (r)
|
|
18
|
-
return e ? e() : new Worker(
|
|
19
|
-
const
|
|
20
|
-
if (new URL(
|
|
21
|
-
const
|
|
22
|
-
return new Worker(URL.createObjectURL(new Blob([
|
|
18
|
+
return e ? e() : new Worker(s);
|
|
19
|
+
const t = window.location.origin;
|
|
20
|
+
if (new URL(s, window.location.href).origin !== t) {
|
|
21
|
+
const o = await d(s, { responseType: "text" });
|
|
22
|
+
return new Worker(URL.createObjectURL(new Blob([o.data], { type: "text/javascript" })), {
|
|
23
23
|
type: "module"
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
return new Worker(
|
|
26
|
+
return new Worker(s, {
|
|
27
27
|
type: "module"
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function U(s) {
|
|
31
31
|
if (g())
|
|
32
32
|
return;
|
|
33
|
-
|
|
34
|
-
const e = `${
|
|
33
|
+
q(), n = s;
|
|
34
|
+
const e = `${n}/code-editor`, r = {
|
|
35
35
|
arcade: `${e}/arcade.worker.js`,
|
|
36
36
|
"arcgis-sql-expression": `${e}/sql-expr.worker.js`,
|
|
37
|
+
"sql-layer-sql-server": `${e}/sql-layer.worker.js`,
|
|
38
|
+
"sql-layer-postgres": `${e}/sql-layer.worker.js`,
|
|
39
|
+
"sql-layer-bigquery": `${e}/sql-layer.worker.js`,
|
|
37
40
|
html: `${e}/html.worker.js`,
|
|
38
41
|
css: `${e}/css.worker.js`,
|
|
39
42
|
typescript: `${e}/ts.worker.js`,
|
|
40
43
|
json: `${e}/json.worker.js`,
|
|
41
44
|
default: `${e}/editor.worker.js`
|
|
42
|
-
},
|
|
45
|
+
}, t = {
|
|
43
46
|
arcade: {
|
|
44
47
|
url: r.arcade
|
|
45
48
|
},
|
|
46
49
|
"arcgis-sql-expression": {
|
|
47
50
|
url: r["arcgis-sql-expression"]
|
|
48
51
|
},
|
|
52
|
+
"sql-layer-sql-server": {
|
|
53
|
+
url: r["sql-layer-sql-server"]
|
|
54
|
+
},
|
|
55
|
+
"sql-layer-postgres": {
|
|
56
|
+
url: r["sql-layer-postgres"]
|
|
57
|
+
},
|
|
58
|
+
"sql-layer-bigquery": {
|
|
59
|
+
url: r["sql-layer-bigquery"]
|
|
60
|
+
},
|
|
49
61
|
html: {
|
|
50
62
|
url: r.html
|
|
51
63
|
},
|
|
@@ -66,27 +78,27 @@ function b(t) {
|
|
|
66
78
|
}
|
|
67
79
|
};
|
|
68
80
|
window.MonacoEnvironment = {
|
|
69
|
-
getWorker: async (
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
return await
|
|
73
|
-
const { url:
|
|
74
|
-
return await
|
|
81
|
+
getWorker: async (u, o) => {
|
|
82
|
+
const a = m.get(o);
|
|
83
|
+
if (a)
|
|
84
|
+
return await l(a, void 0, i);
|
|
85
|
+
const { url: p, localWorker: f } = t[o] || t.default;
|
|
86
|
+
return await l(p, f, i);
|
|
75
87
|
}
|
|
76
88
|
};
|
|
77
89
|
}
|
|
78
|
-
let
|
|
79
|
-
function
|
|
80
|
-
|
|
90
|
+
let c = !1;
|
|
91
|
+
function q() {
|
|
92
|
+
c || (w.get(y), c = !0);
|
|
81
93
|
}
|
|
82
94
|
async function E() {
|
|
83
|
-
return (await
|
|
95
|
+
return (await k()).getArcadeDiagnosticService();
|
|
84
96
|
}
|
|
85
|
-
async function
|
|
97
|
+
async function k() {
|
|
86
98
|
return await import("./arcade-mode.js");
|
|
87
99
|
}
|
|
88
100
|
export {
|
|
89
|
-
|
|
101
|
+
k as a,
|
|
90
102
|
E as g,
|
|
91
|
-
|
|
103
|
+
U as s
|
|
92
104
|
};
|