@arcgis/coding-components 5.2.0-next.5 → 5.2.0-next.7
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/{4G3EYLJY.js → 2YYB74Y3.js} +1 -1
- package/dist/cdn/{WWVPYM5B.js → 4HJRS4I7.js} +1 -1
- package/dist/cdn/DOCWTXKZ.js +12 -0
- package/dist/cdn/HBKQDGYR.js +2 -0
- package/dist/cdn/{QW7OA32G.js → HDEGIRFB.js} +1 -1
- package/dist/cdn/{HRM2JUGO.js → HQPGLNWP.js} +1 -1
- package/dist/cdn/I3XXIRZX.js +2 -0
- package/dist/cdn/ID5LCA7T.js +2 -0
- package/dist/cdn/{LUJKYDO7.js → IL7DUQH7.js} +1 -1
- package/dist/cdn/JEBRK3DP.js +2 -0
- package/dist/cdn/MZMKV7FA.js +2 -0
- package/dist/cdn/{IETP57KJ.js → NKDL6NEF.js} +1 -1
- package/dist/cdn/NL736YG3.js +6 -0
- package/dist/cdn/{3CHKFCKR.js → SFHJYB2X.js} +1 -1
- package/dist/cdn/{O3PQD5N5.js → SYW5WY2N.js} +1 -1
- package/dist/cdn/{CA3GVMWI.js → UDPKHTMC.js} +1 -1
- package/dist/cdn/UQRZDUGL.js +2 -0
- package/dist/cdn/{QGBZYXBS.js → XMXK333I.js} +1 -1
- package/dist/cdn/{QUR4WECO.js → XWUEYP6T.js} +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcade-defaults.js +56 -54
- package/dist/chunks/fields.js +18 -14
- package/dist/chunks/language-defaults-base.js +230 -221
- package/dist/chunks/sql-expr-defaults.js +63 -59
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +6 -6
- package/dist/components/arcgis-arcade-editor/customElement.js +147 -151
- package/dist/components/arcgis-code-editor-shell/customElement.js +5 -5
- package/dist/components/arcgis-editor-variables/customElement.js +12 -6
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cdn/4N67XYKO.js +0 -2
- package/dist/cdn/B5A6XU2C.js +0 -2
- package/dist/cdn/CQTJWVFM.js +0 -6
- package/dist/cdn/G5IXPOCO.js +0 -2
- package/dist/cdn/RMVHO2AH.js +0 -12
- package/dist/cdn/RO6RHW6I.js +0 -2
- package/dist/cdn/TWEJITWD.js +0 -2
- package/dist/cdn/ZTCCL565.js +0 -2
|
@@ -1,50 +1,54 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { i as c, b as
|
|
3
|
-
import { CompletionItemKind as
|
|
4
|
-
import { f as
|
|
5
|
-
import { fetchT9nStringsBundle as
|
|
6
|
-
import { g as
|
|
7
|
-
const
|
|
2
|
+
import { i as c, b as P } from "./utils.js";
|
|
3
|
+
import { CompletionItemKind as h, InsertTextFormat as g, InsertTextMode as F } from "vscode-languageserver-types";
|
|
4
|
+
import { f as b, L as w, E as x } from "./language-defaults-base.js";
|
|
5
|
+
import { fetchT9nStringsBundle as E } from "@arcgis/toolkit/intl";
|
|
6
|
+
import { g as M } from "./runtime.js";
|
|
7
|
+
const A = {
|
|
8
8
|
allowAllRootBinaryOperators: !1,
|
|
9
9
|
requiresPredicateRootNode: !1
|
|
10
10
|
}, d = {
|
|
11
|
-
"field-calculation":
|
|
11
|
+
"field-calculation": A,
|
|
12
12
|
"where-clause": {
|
|
13
13
|
allowAllRootBinaryOperators: !0,
|
|
14
|
-
requiresPredicateRootNode: !0
|
|
14
|
+
requiresPredicateRootNode: !0,
|
|
15
|
+
allowGeometryFields: !0
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
|
-
function
|
|
18
|
+
function v(o) {
|
|
18
19
|
return o && o in d ? d[o] : void 0;
|
|
19
20
|
}
|
|
20
21
|
const q = (o) => {
|
|
21
|
-
const
|
|
22
|
+
const r = o.variables[0], t = r?.type === "featureSet" ? T(r) : void 0, { apiVersion: e, bundles: i, hiddenApiItems: s } = o.toEditorProfileDefinition();
|
|
22
23
|
return {
|
|
23
|
-
apiVersion:
|
|
24
|
-
bundles:
|
|
25
|
-
variables:
|
|
24
|
+
apiVersion: e,
|
|
25
|
+
bundles: i,
|
|
26
|
+
variables: t ? [t] : [],
|
|
26
27
|
hiddenApiItems: s?.map((a) => a.toLowerCase())
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
function T(o) {
|
|
30
|
-
const { name:
|
|
31
|
-
label:
|
|
32
|
-
detail:
|
|
33
|
-
insertText:
|
|
34
|
-
insertTextMode:
|
|
31
|
+
const { name: r } = o, t = o.getDescription(), { definition: e } = o.toProfileVariableDefinition(), i = {
|
|
32
|
+
label: r,
|
|
33
|
+
detail: r,
|
|
34
|
+
insertText: r,
|
|
35
|
+
insertTextMode: F.asIs,
|
|
35
36
|
insertTextFormat: g.PlainText,
|
|
36
|
-
kind:
|
|
37
|
+
kind: h.Field
|
|
37
38
|
}, s = {
|
|
38
|
-
name:
|
|
39
|
-
description:
|
|
39
|
+
name: r,
|
|
40
|
+
description: t,
|
|
40
41
|
type: "dictionary",
|
|
41
42
|
properties: [],
|
|
42
|
-
completion:
|
|
43
|
+
completion: i
|
|
43
44
|
};
|
|
44
|
-
if (!
|
|
45
|
+
if (!e || !("fields" in e))
|
|
45
46
|
return s;
|
|
46
|
-
const [a, l] =
|
|
47
|
-
|
|
47
|
+
const [a, l] = b(e.fields, t, {
|
|
48
|
+
includeAliases: !1,
|
|
49
|
+
supportGeometryFields: !0
|
|
50
|
+
});
|
|
51
|
+
return s.properties = a, i.documentation = { kind: "markdown", value: l }, s;
|
|
48
52
|
}
|
|
49
53
|
const u = [
|
|
50
54
|
{
|
|
@@ -68,27 +72,27 @@ function L(o) {
|
|
|
68
72
|
function S(o) {
|
|
69
73
|
if (!c(o))
|
|
70
74
|
return;
|
|
71
|
-
const
|
|
75
|
+
const r = L(
|
|
72
76
|
o.id
|
|
73
77
|
/*locale*/
|
|
74
78
|
);
|
|
75
|
-
if (!
|
|
79
|
+
if (!r)
|
|
76
80
|
return;
|
|
77
|
-
const
|
|
81
|
+
const t = {
|
|
78
82
|
variables: [],
|
|
79
|
-
hiddenApiItems: o.hiddenApiItems?.map((
|
|
83
|
+
hiddenApiItems: o.hiddenApiItems?.map((e) => e.toLowerCase())
|
|
80
84
|
};
|
|
81
|
-
return
|
|
82
|
-
if (o.disabledVariables?.includes(
|
|
85
|
+
return r.variables.forEach((e) => {
|
|
86
|
+
if (o.disabledVariables?.includes(e.name))
|
|
83
87
|
return;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
87
|
-
throw Error(`sdkVariable type not supported (yet) type: ${
|
|
88
|
-
}),
|
|
88
|
+
const i = o.definitions[e.name];
|
|
89
|
+
if (e.type === "featureSet")
|
|
90
|
+
return P(i) ? t.variables.push({ ...e, type: e.type, definition: i }) : void 0;
|
|
91
|
+
throw Error(`sdkVariable type not supported (yet) type: ${e.type}`);
|
|
92
|
+
}), t;
|
|
89
93
|
}
|
|
90
94
|
const f = "arcgis-sql-expression";
|
|
91
|
-
class _ extends
|
|
95
|
+
class _ extends w {
|
|
92
96
|
constructor() {
|
|
93
97
|
super(f, {
|
|
94
98
|
apiPath: "./assets/sql-language/api",
|
|
@@ -96,42 +100,42 @@ class _ extends F {
|
|
|
96
100
|
}), this._languageId = f, this._layerMap = /* @__PURE__ */ new Map();
|
|
97
101
|
}
|
|
98
102
|
// TODO: try to rely on editor profile instance instead of storing a feature layer
|
|
99
|
-
updateFeatureLayerForModel(
|
|
100
|
-
const
|
|
101
|
-
this._layerMap.set(
|
|
103
|
+
updateFeatureLayerForModel(r, t) {
|
|
104
|
+
const e = this._getApiKey(r);
|
|
105
|
+
this._layerMap.set(e, t);
|
|
102
106
|
}
|
|
103
|
-
getFeatureLayerForModel(
|
|
104
|
-
const
|
|
105
|
-
return this._layerMap.get(
|
|
107
|
+
getFeatureLayerForModel(r) {
|
|
108
|
+
const t = this._getApiKey(r);
|
|
109
|
+
return this._layerMap.get(t);
|
|
106
110
|
}
|
|
107
|
-
async setProfileForModel(
|
|
108
|
-
const
|
|
109
|
-
c(
|
|
110
|
-
const s = await
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
async setProfileForModel(r, t, e = { locale: "en" }) {
|
|
112
|
+
const i = c(t) ? v(t.id) : void 0;
|
|
113
|
+
c(t) && (t = S(t));
|
|
114
|
+
const s = await E(
|
|
115
|
+
e.locale,
|
|
116
|
+
M("./assets/editor-profile/t9n"),
|
|
113
117
|
"messages."
|
|
114
118
|
);
|
|
115
119
|
if (!s)
|
|
116
|
-
throw new Error(`Failed to load the language bundle for ${
|
|
117
|
-
this.disposeForModel(
|
|
118
|
-
const a = this._getApiKey(
|
|
120
|
+
throw new Error(`Failed to load the language bundle for ${e.locale}`);
|
|
121
|
+
this.disposeForModel(r);
|
|
122
|
+
const a = this._getApiKey(r), l = new x(t, s, e.locale, i);
|
|
119
123
|
this._modelToProfileMap.set(a, l);
|
|
120
124
|
const y = q(l);
|
|
121
|
-
this.updateApiContextForModel(
|
|
122
|
-
locale:
|
|
125
|
+
this.updateApiContextForModel(r, {
|
|
126
|
+
locale: e.locale,
|
|
123
127
|
profile: y,
|
|
124
|
-
...
|
|
128
|
+
...i ? { profilePolicy: i } : {}
|
|
125
129
|
});
|
|
126
|
-
const p =
|
|
127
|
-
p && this.updateFeatureLayerForModel(
|
|
130
|
+
const p = t?.variables?.find((m) => m.name === "$layer");
|
|
131
|
+
p && this.updateFeatureLayerForModel(r, p.definition);
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
|
-
const n = new _(),
|
|
134
|
+
const n = new _(), $ = {
|
|
131
135
|
setProfileForModel: n.setProfileForModel.bind(n),
|
|
132
136
|
getApiLibraryForModel: n.getApiLibraryForModel.bind(n)
|
|
133
137
|
};
|
|
134
138
|
export {
|
|
135
139
|
n as a,
|
|
136
|
-
|
|
140
|
+
$ as s
|
|
137
141
|
};
|
|
@@ -7,8 +7,8 @@ import { u as x } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { load as S } from "@arcgis/lumina/controllers";
|
|
8
8
|
import { i as $ } from "../../chunks/monaco-importer.js";
|
|
9
9
|
import { t as l } from "../../chunks/functional.js";
|
|
10
|
-
import { d as k, g as y, c as
|
|
11
|
-
import { i as
|
|
10
|
+
import { d as k, g as y, c as h } from "../../chunks/debugger-value-styles.js";
|
|
11
|
+
import { i as m, a as P, p as T, b as E, c as L, d as C, S as M, D as B, e as V } from "../../chunks/debugger-value-components.js";
|
|
12
12
|
import { observeAncestorsMutation as z, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
|
|
13
13
|
import { generateGuid as A } from "@arcgis/toolkit/string";
|
|
14
14
|
import { d as p } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
|
|
@@ -49,7 +49,7 @@ class N extends f {
|
|
|
49
49
|
return t ? t.getLineContent(e) : "";
|
|
50
50
|
}
|
|
51
51
|
updateTheme() {
|
|
52
|
-
I(this.el) === "dark" ? this.elementInternals.states.add(
|
|
52
|
+
I(this.el) === "dark" ? this.elementInternals.states.add(h) : this.elementInternals.states.delete(h);
|
|
53
53
|
}
|
|
54
54
|
getBreakpointCode(e) {
|
|
55
55
|
return e == null ? this.messages.nocontent ?? "No content" : this.getContentAtLine(e) || (this.messages.nocontent ?? "No content");
|
|
@@ -71,7 +71,7 @@ class N extends f {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
getExpandedDebuggerMap(e) {
|
|
74
|
-
if (e == null || !
|
|
74
|
+
if (e == null || !m(e))
|
|
75
75
|
return null;
|
|
76
76
|
const t = e.expand();
|
|
77
77
|
return Array.isArray(t) ? null : t;
|
|
@@ -83,7 +83,7 @@ class N extends f {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
getExpandedDebuggerChild(e, t) {
|
|
86
|
-
if (!e || !
|
|
86
|
+
if (!e || !m(e))
|
|
87
87
|
return;
|
|
88
88
|
const a = e.expand();
|
|
89
89
|
if (Array.isArray(a)) {
|
|
@@ -208,7 +208,7 @@ class N extends f {
|
|
|
208
208
|
}
|
|
209
209
|
render() {
|
|
210
210
|
const { line: e } = this.debuggerStore?.executionState ?? {}, t = this.breakpoints.find((i) => i.line === e), a = this.breakpoints.findIndex((i) => i.line === e);
|
|
211
|
-
return r`<div class="console-shell"
|
|
211
|
+
return r`<div class="console-shell">${this.breakpoints.length && r`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + (t?.line ?? e ?? 1) - 1)}>${this.getBreakpointCode(t?.line ?? this.breakpoints[0]?.line ?? e ?? 1)}</arcgis-code-viewer>${this.breakpoints.length ? r`<calcite-action id=${this._breakpointPopoverId ?? b} scale=s .text=${this.getBreakpointPositionText(a >= 0 ? a + 1 : 1)} text-enabled icon=chevron-down></calcite-action>` : null}${this.renderBreakpointPopover(t?.line ?? e)}</div>` || ""}<div class="tabs-container">${this.renderTabs()}</div></div>`;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
v("arcgis-arcade-debugger-console", N);
|