@arcgis/coding-components 4.30.0-next.4 → 4.30.0-next.41
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.css +1 -1
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/editor.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/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-25023832.js → p-1f57b2c8.js} +3 -3
- package/dist/arcgis-coding-components/{p-e88c0d1d.js → p-2656babc.js} +1 -1
- package/dist/arcgis-coding-components/p-41c0f095.js +7 -0
- package/dist/arcgis-coding-components/{p-08f272e7.js → p-4e83c7d9.js} +3 -3
- package/dist/arcgis-coding-components/p-55dffc4c.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-78220a75.js → p-68167d79.js} +3 -3
- package/dist/arcgis-coding-components/{p-4d158786.js → p-6e9ee8e1.js} +2 -2
- package/dist/arcgis-coding-components/{p-b63557ba.js → p-7600673f.js} +2 -2
- package/dist/arcgis-coding-components/{p-73e2476b.js → p-8741dfa4.js} +2 -2
- package/dist/arcgis-coding-components/{p-cd9e95f9.js → p-9acb23cc.js} +2 -2
- package/dist/arcgis-coding-components/p-b3a3ab63.js +68 -0
- package/dist/arcgis-coding-components/{p-c7bb7c6a.js → p-ea30709a.js} +2 -2
- package/dist/cjs/{arcade-defaults-d41420df.js → arcade-defaults-acc3b5ac.js} +498 -172
- package/dist/cjs/{arcade-mode-55360f90.js → arcade-mode-af4f0fdf.js} +45 -51
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1660 -234
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-9a006c1a.js → css-c1dec897.js} +1 -1
- package/dist/cjs/{cssMode-c9458ea4.js → cssMode-8a51d0ec.js} +3 -3
- package/dist/cjs/{html-45d9defe.js → html-a26829c5.js} +3 -3
- package/dist/cjs/{htmlMode-1716753f.js → htmlMode-d59290f4.js} +3 -3
- package/dist/cjs/{index-25b044b5.js → index-f070b08e.js} +42 -4
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-9ce57501.js → javascript-836a3c78.js} +4 -4
- package/dist/cjs/{jsonMode-3945e8f7.js → jsonMode-2600ca0a.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-7eaeb36b.js → tsMode-b10eb9a7.js} +3 -3
- package/dist/cjs/{typescript-ec5da0c4.js → typescript-07dfd341.js} +3 -3
- package/dist/components/arcade-api.js +19 -31
- package/dist/components/arcade-contribution.js +71 -13
- package/dist/components/arcade-defaults.js +79 -74
- package/dist/components/arcade-mode.js +44 -50
- package/dist/components/arcade-results.js +46 -60
- package/dist/components/arcade-suggestions.js +19 -30
- package/dist/components/arcade-variables.js +20 -35
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +48 -140
- 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/chunk-HXHHCYA6.js +1460 -0
- package/dist/components/code-editor.js +21 -18
- package/dist/components/fields.js +2 -66
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +388 -3
- package/dist/components/markdown.js +9 -11
- package/dist/components/utilities.js +3 -3
- package/dist/esm/{arcade-defaults-0bce2095.js → arcade-defaults-1f9c1af0.js} +485 -159
- package/dist/esm/{arcade-mode-57782d19.js → arcade-mode-c0bd49f2.js} +45 -51
- package/dist/esm/arcgis-arcade-api_6.entry.js +1660 -234
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-70f18054.js → css-1e20a73b.js} +1 -1
- package/dist/esm/{cssMode-488c3e86.js → cssMode-31dc7377.js} +3 -3
- package/dist/esm/{html-59102be0.js → html-f8a0ecfe.js} +3 -3
- package/dist/esm/{htmlMode-cfdd852e.js → htmlMode-71570d38.js} +3 -3
- package/dist/esm/{index-78a96626.js → index-0030b0f4.js} +42 -5
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-8ee5b791.js → javascript-bd547f0f.js} +4 -4
- package/dist/esm/{jsonMode-771e71b0.js → jsonMode-fc11c3fd.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-f95b693f.js → tsMode-201c99e8.js} +3 -3
- package/dist/esm/{typescript-055e39ac.js → typescript-51b03c89.js} +3 -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-api/arcade-api.d.ts +6 -7
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +9 -6
- package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +6 -7
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
- package/dist/types/components/code-editor/code-editor.d.ts +9 -1
- package/dist/types/components.d.ts +35 -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 +37 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +1 -1
- package/package.json +20 -19
- package/dist/arcgis-coding-components/p-04561935.entry.js +0 -6
- package/dist/arcgis-coding-components/p-871217d9.js +0 -68
- package/dist/arcgis-coding-components/p-c23d1605.js +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.41
|
|
5
5
|
*/
|
|
6
6
|
import { editor, MarkerSeverity, Range, languages, Emitter } from 'monaco-editor';
|
|
7
7
|
import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat } from 'vscode-languageserver-types';
|
|
8
|
-
import {
|
|
8
|
+
import { w as debounce } from './index2.js';
|
|
9
9
|
|
|
10
10
|
var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:CompletionItemKind.Keyword}));
|
|
11
11
|
|
|
@@ -37,19 +37,19 @@ const operators = [
|
|
|
37
37
|
"*=",
|
|
38
38
|
"**=",
|
|
39
39
|
"/=",
|
|
40
|
-
"%="
|
|
40
|
+
"%=",
|
|
41
41
|
];
|
|
42
42
|
const arcadeLanguageConfiguration = {
|
|
43
43
|
// the default separators except `@$`
|
|
44
44
|
wordPattern: /(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,
|
|
45
45
|
comments: {
|
|
46
46
|
lineComment: "//",
|
|
47
|
-
blockComment: ["/*", "*/"]
|
|
47
|
+
blockComment: ["/*", "*/"],
|
|
48
48
|
},
|
|
49
49
|
brackets: [
|
|
50
50
|
["{", "}"],
|
|
51
51
|
["[", "]"],
|
|
52
|
-
["(", ")"]
|
|
52
|
+
["(", ")"],
|
|
53
53
|
],
|
|
54
54
|
autoClosingPairs: [
|
|
55
55
|
{ open: "{", close: "}" },
|
|
@@ -57,21 +57,21 @@ const arcadeLanguageConfiguration = {
|
|
|
57
57
|
{ open: "(", close: ")" },
|
|
58
58
|
{ open: '"', close: '"', notIn: ["string"] },
|
|
59
59
|
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
60
|
-
{ open: "`", close: "`", notIn: ["string", "comment"] }
|
|
60
|
+
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
|
61
61
|
],
|
|
62
62
|
autoCloseBefore: ";:.,=}])` \n\t",
|
|
63
63
|
folding: {
|
|
64
64
|
markers: {
|
|
65
65
|
start: /^\s*\/\/\s*#?region\b/u,
|
|
66
|
-
end: /^\s*\/\/\s*#?endregion\b/u
|
|
67
|
-
}
|
|
66
|
+
end: /^\s*\/\/\s*#?endregion\b/u,
|
|
67
|
+
},
|
|
68
68
|
},
|
|
69
69
|
indentationRules: {
|
|
70
70
|
// ^(.*\*/)?\s*\}.*$
|
|
71
71
|
decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,
|
|
72
72
|
// ^.*\{[^}"']*$
|
|
73
|
-
increaseIndentPattern: /^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u
|
|
74
|
-
}
|
|
73
|
+
increaseIndentPattern: /^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u,
|
|
74
|
+
},
|
|
75
75
|
};
|
|
76
76
|
const arcadeMonarchLanguage = {
|
|
77
77
|
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
@@ -107,16 +107,16 @@ const arcadeMonarchLanguage = {
|
|
|
107
107
|
cases: {
|
|
108
108
|
"@constants": "constant",
|
|
109
109
|
"@keywords": "keyword",
|
|
110
|
-
"@default": "identifier"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
110
|
+
"@default": "identifier",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
113
|
],
|
|
114
114
|
// whitespace
|
|
115
115
|
{ include: "@whitespace" },
|
|
116
116
|
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
|
117
117
|
[
|
|
118
118
|
/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,
|
|
119
|
-
{ token: "regexp", bracket: "@open", next: "@regexp" }
|
|
119
|
+
{ token: "regexp", bracket: "@open", next: "@regexp" },
|
|
120
120
|
],
|
|
121
121
|
// delimiters and operators
|
|
122
122
|
[/[()\[\]]/u, "@brackets"],
|
|
@@ -126,9 +126,9 @@ const arcadeMonarchLanguage = {
|
|
|
126
126
|
{
|
|
127
127
|
cases: {
|
|
128
128
|
"@operators": "delimiter",
|
|
129
|
-
"@default": ""
|
|
130
|
-
}
|
|
131
|
-
}
|
|
129
|
+
"@default": "",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
132
|
],
|
|
133
133
|
// numbers
|
|
134
134
|
[/(@digits)[eE]([\-+]?(@digits))?/u, "number"],
|
|
@@ -144,7 +144,7 @@ const arcadeMonarchLanguage = {
|
|
|
144
144
|
[/'([^'\\]|\\.)*$/u, "string.invalid"],
|
|
145
145
|
[/"/u, "string", "@string_double"],
|
|
146
146
|
[/'/u, "string", "@string_single"],
|
|
147
|
-
[/`/u, "string", "@string_backtick"]
|
|
147
|
+
[/`/u, "string", "@string_backtick"],
|
|
148
148
|
],
|
|
149
149
|
import: [
|
|
150
150
|
// import keyword
|
|
@@ -156,24 +156,24 @@ const arcadeMonarchLanguage = {
|
|
|
156
156
|
// whitespace
|
|
157
157
|
{ include: "@whitespace" },
|
|
158
158
|
// from keyword
|
|
159
|
-
[/from/u, { token: "keyword", next: "@popall" }]
|
|
159
|
+
[/from/u, { token: "keyword", next: "@popall" }],
|
|
160
160
|
],
|
|
161
161
|
whitespace: [
|
|
162
162
|
[/[ \t\r\n]+/u, ""],
|
|
163
163
|
[/\/\*/u, "comment", "@comment"],
|
|
164
|
-
[/\/\/.*$/u, "comment"]
|
|
164
|
+
[/\/\/.*$/u, "comment"],
|
|
165
165
|
],
|
|
166
166
|
comment: [
|
|
167
167
|
[/[^\/*]+/u, "comment"],
|
|
168
168
|
[/\*\//u, "comment", "@pop"],
|
|
169
|
-
[/[\/*]/u, "comment"]
|
|
169
|
+
[/[\/*]/u, "comment"],
|
|
170
170
|
],
|
|
171
171
|
// We match regular expression quite precisely
|
|
172
172
|
regexp: [
|
|
173
173
|
[/(\{)(\d+(?:,\d*)?)(\})/u, ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]],
|
|
174
174
|
[
|
|
175
175
|
/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,
|
|
176
|
-
["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
|
|
176
|
+
["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }],
|
|
177
177
|
],
|
|
178
178
|
[/(\()(\?:|\?=|\?!)/u, ["regexp.escape.control", "regexp.escape.control"]],
|
|
179
179
|
[/[()]/u, "regexp.escape.control"],
|
|
@@ -181,45 +181,45 @@ const arcadeMonarchLanguage = {
|
|
|
181
181
|
[/[^\\\/]/u, "regexp"],
|
|
182
182
|
[/@regexpesc/u, "regexp.escape"],
|
|
183
183
|
[/\\\./u, "regexp.invalid"],
|
|
184
|
-
[/(\/)([gimsuy]*)/u, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
|
|
184
|
+
[/(\/)([gimsuy]*)/u, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]],
|
|
185
185
|
],
|
|
186
186
|
regexrange: [
|
|
187
187
|
[/-/u, "regexp.escape.control"],
|
|
188
188
|
[/\^/u, "regexp.invalid"],
|
|
189
189
|
[/@regexpesc/u, "regexp.escape"],
|
|
190
190
|
[/[^\]]/u, "regexp"],
|
|
191
|
-
[/\]/u, { token: "regexp.escape.control", next: "@pop", bracket: "@close" }]
|
|
191
|
+
[/\]/u, { token: "regexp.escape.control", next: "@pop", bracket: "@close" }],
|
|
192
192
|
],
|
|
193
193
|
string_double: [
|
|
194
194
|
[/[^\\"]+/u, "string"],
|
|
195
195
|
[/@escapes/u, "string.escape"],
|
|
196
196
|
[/\\./u, "string.escape.invalid"],
|
|
197
|
-
[/"/u, "string", "@pop"]
|
|
197
|
+
[/"/u, "string", "@pop"],
|
|
198
198
|
],
|
|
199
199
|
string_single: [
|
|
200
200
|
[/[^\\']+/u, "string"],
|
|
201
201
|
[/@escapes/u, "string.escape"],
|
|
202
202
|
[/\\./u, "string.escape.invalid"],
|
|
203
|
-
[/'/u, "string", "@pop"]
|
|
203
|
+
[/'/u, "string", "@pop"],
|
|
204
204
|
],
|
|
205
205
|
string_backtick: [
|
|
206
206
|
[/\$\{/u, { token: "delimiter.bracket", next: "@bracketCounting" }],
|
|
207
207
|
[/[^\\`$]+/u, "string"],
|
|
208
208
|
[/@escapes/u, "string.escape"],
|
|
209
209
|
[/\\./u, "string.escape.invalid"],
|
|
210
|
-
[/`/u, "string", "@pop"]
|
|
210
|
+
[/`/u, "string", "@pop"],
|
|
211
211
|
],
|
|
212
212
|
bracketCounting: [
|
|
213
213
|
[/\{/u, "delimiter.bracket", "@bracketCounting"],
|
|
214
214
|
[/\}/u, "delimiter.bracket", "@pop"],
|
|
215
|
-
{ include: "common" }
|
|
216
|
-
]
|
|
217
|
-
}
|
|
215
|
+
{ include: "common" },
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
218
|
};
|
|
219
219
|
|
|
220
220
|
//#region Diagnostic
|
|
221
221
|
class DiagnosticsAdapter {
|
|
222
|
-
constructor(_languageId, _worker, { defaults, diagnosticsService }) {
|
|
222
|
+
constructor(_languageId, _worker, { defaults, diagnosticsService, }) {
|
|
223
223
|
this._languageId = _languageId;
|
|
224
224
|
this._worker = _worker;
|
|
225
225
|
this._disposables = [];
|
|
@@ -231,7 +231,7 @@ class DiagnosticsAdapter {
|
|
|
231
231
|
if (languageId !== this._languageId) {
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
const debouncedValidate =
|
|
234
|
+
const debouncedValidate = debounce(() => {
|
|
235
235
|
this._doValidate(model, languageId).catch((err) => {
|
|
236
236
|
throw err;
|
|
237
237
|
});
|
|
@@ -275,7 +275,7 @@ class DiagnosticsAdapter {
|
|
|
275
275
|
dispose: () => {
|
|
276
276
|
this._listener.forEach((value) => value.dispose());
|
|
277
277
|
this._listener.clear();
|
|
278
|
-
}
|
|
278
|
+
},
|
|
279
279
|
});
|
|
280
280
|
editor.getModels().forEach(onModelAdd);
|
|
281
281
|
}
|
|
@@ -322,7 +322,7 @@ function toMarker(_resource, diag) {
|
|
|
322
322
|
startColumn: diag.range.start.character + 1,
|
|
323
323
|
endLineNumber: diag.range.end.line + 1,
|
|
324
324
|
endColumn: diag.range.end.character + 1,
|
|
325
|
-
message: diag.message
|
|
325
|
+
message: diag.message,
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
//#endregion
|
|
@@ -337,7 +337,7 @@ function toRange(range) {
|
|
|
337
337
|
function toTextEdit(textEdit) {
|
|
338
338
|
return {
|
|
339
339
|
range: toRange(textEdit.range),
|
|
340
|
-
text: textEdit.newText
|
|
340
|
+
text: textEdit.newText,
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
function isInsertReplaceEdit(edit) {
|
|
@@ -407,10 +407,7 @@ class CompletionProvider {
|
|
|
407
407
|
this._defaults = _defaults;
|
|
408
408
|
this.triggerCharacters = [".", "("];
|
|
409
409
|
}
|
|
410
|
-
async provideCompletionItems(model, position
|
|
411
|
-
// _context: languages.CompletionContext,
|
|
412
|
-
// _token: CancellationToken,
|
|
413
|
-
) {
|
|
410
|
+
async provideCompletionItems(model, position) {
|
|
414
411
|
const worker = await this._worker(model.uri);
|
|
415
412
|
const context = this._defaults.getApiContextForModel(model.uri);
|
|
416
413
|
const completionList = await worker.doComplete(model.uri.toString(), fromPosition(position), context);
|
|
@@ -424,13 +421,13 @@ class CompletionProvider {
|
|
|
424
421
|
filterText: entry.filterText,
|
|
425
422
|
detail: entry.detail,
|
|
426
423
|
range: wordRange,
|
|
427
|
-
kind: toCompletionItemKind(entry.kind)
|
|
424
|
+
kind: toCompletionItemKind(entry.kind),
|
|
428
425
|
};
|
|
429
426
|
if (entry.textEdit) {
|
|
430
427
|
if (isInsertReplaceEdit(entry.textEdit)) {
|
|
431
428
|
item.range = {
|
|
432
429
|
insert: toRange(entry.textEdit.insert),
|
|
433
|
-
replace: toRange(entry.textEdit.replace)
|
|
430
|
+
replace: toRange(entry.textEdit.replace),
|
|
434
431
|
};
|
|
435
432
|
}
|
|
436
433
|
else {
|
|
@@ -452,7 +449,7 @@ class CompletionProvider {
|
|
|
452
449
|
item.documentation = {
|
|
453
450
|
supportThemeIcons: false,
|
|
454
451
|
value: entry.documentation.value,
|
|
455
|
-
supportHtml: true
|
|
452
|
+
supportHtml: true,
|
|
456
453
|
};
|
|
457
454
|
}
|
|
458
455
|
}
|
|
@@ -460,7 +457,7 @@ class CompletionProvider {
|
|
|
460
457
|
});
|
|
461
458
|
return {
|
|
462
459
|
incomplete: completionList.isIncomplete,
|
|
463
|
-
suggestions: items
|
|
460
|
+
suggestions: items,
|
|
464
461
|
};
|
|
465
462
|
}
|
|
466
463
|
}
|
|
@@ -471,10 +468,7 @@ class FormattingProvider {
|
|
|
471
468
|
this._worker = _worker;
|
|
472
469
|
this._defaults = _defaults;
|
|
473
470
|
}
|
|
474
|
-
async provideDocumentFormattingEdits(model
|
|
475
|
-
// _options: languages.FormattingOptions,
|
|
476
|
-
// _token: CancellationToken,
|
|
477
|
-
) {
|
|
471
|
+
async provideDocumentFormattingEdits(model) {
|
|
478
472
|
const worker = await this._worker(model.uri);
|
|
479
473
|
const context = this._defaults.getApiContextForModel(model.uri.toString());
|
|
480
474
|
const edits = await worker.doFormat(model.uri.toString(), context);
|
|
@@ -515,8 +509,8 @@ class WorkerManager {
|
|
|
515
509
|
label: languageId,
|
|
516
510
|
createData: {
|
|
517
511
|
languageId,
|
|
518
|
-
languageOptions
|
|
519
|
-
}
|
|
512
|
+
languageOptions,
|
|
513
|
+
},
|
|
520
514
|
});
|
|
521
515
|
this._client = this._worker.getProxy();
|
|
522
516
|
}
|
|
@@ -591,7 +585,7 @@ function setupMode(arcadeDefaults) {
|
|
|
591
585
|
// eslint-disable-next-line no-new
|
|
592
586
|
new DiagnosticsAdapter(arcadeDefaults.languageId, workerAccessor, {
|
|
593
587
|
defaults: arcadeDefaults,
|
|
594
|
-
diagnosticsService: arcadeDiagnosticService
|
|
588
|
+
diagnosticsService: arcadeDiagnosticService,
|
|
595
589
|
});
|
|
596
590
|
}
|
|
597
591
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.41
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { t as importArcade, s as setValuesInString, u as quoteString } from './index2.js';
|
|
8
|
+
import { u as useControllerManager, a as useT9n } from './chunk-HXHHCYA6.js';
|
|
9
|
+
import { s as supportedFields } from './fields.js';
|
|
9
10
|
import "@esri/calcite-components/dist/components/calcite-tree.js";
|
|
10
11
|
import "@esri/calcite-components/dist/components/calcite-tree-item.js";
|
|
11
12
|
import "@esri/calcite-components/dist/components/calcite-loader.js";
|
|
@@ -15,7 +16,6 @@ import "@esri/calcite-components/dist/components/calcite-icon.js";
|
|
|
15
16
|
import "@esri/calcite-components/dist/components/calcite-action-bar.js";
|
|
16
17
|
import "@esri/calcite-components/dist/components/calcite-action-group.js";
|
|
17
18
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
18
|
-
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
19
19
|
|
|
20
20
|
const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
|
|
21
21
|
const MaxArrayItems = 100;
|
|
@@ -200,7 +200,7 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
200
200
|
// Setup an executor with the script
|
|
201
201
|
const arcade = await importArcade();
|
|
202
202
|
const executor = await arcade.createArcadeExecutor(script ?? "", {
|
|
203
|
-
variables: editorProfile?.variables ?? []
|
|
203
|
+
variables: editorProfile?.variables ?? [],
|
|
204
204
|
});
|
|
205
205
|
// We want to measure the execution time
|
|
206
206
|
const t1 = performance.now();
|
|
@@ -210,7 +210,7 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
210
210
|
spatialReference,
|
|
211
211
|
timeZone,
|
|
212
212
|
rawOutput: true,
|
|
213
|
-
console
|
|
213
|
+
console,
|
|
214
214
|
};
|
|
215
215
|
// Execute the script
|
|
216
216
|
const scriptOutput = await executor.executeAsync(profileVariableInstances, executeContext);
|
|
@@ -234,25 +234,25 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
234
234
|
error,
|
|
235
235
|
timeStamp,
|
|
236
236
|
compilationTime: 0,
|
|
237
|
-
executionTime: 0
|
|
237
|
+
executionTime: 0,
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
const arcadeResultsCss = ":host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2)}:host .flex-adjustable{flex:1 1 auto;overflow:hidden}:host .flex-row{display:flex;flex-direction:row;overflow:hidden}:host .flex-column{display:flex;flex-direction:column;overflow:hidden}:host .y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}:host header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}:host .ltr-container{direction:ltr}:host calcite-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-
|
|
242
|
+
const arcadeResultsCss = ":host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2)}:host .flex-adjustable{flex:1 1 auto;overflow:hidden}:host .flex-row{display:flex;flex-direction:row;overflow:hidden}:host .flex-column{display:flex;flex-direction:column;overflow:hidden}:host .y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}:host header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}:host .ltr-container{direction:ltr}:host calcite-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group:last-child{border-inline-end-width:0px}:host calcite-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .color-info{color:var(--calcite-color-status-info)}:host .color-error{color:var(--calcite-color-status-danger)}:host .color-success{color:var(--calcite-color-status-success)}:host [class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}:host .console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}:host .result-value-table table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap}:host .result-value-table table thead{background-color:var(--calcite-color-foreground-2)}:host .result-value-table table tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}:host .result-value-table table th,:host .result-value-table table td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs)}:host .result-value-table table th .string-value,:host .result-value-table table td .string-value{white-space:pre}:host .result-value-table table th{font-weight:var(--calcite-font-weight-medium)}:host .tree-item-label,:host .number-value,:host .string-value,:host .boolean-value{font-family:var(--calcite-code-family)}:host .tree-item-label,:host .value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}:host .dictionary-property{color:var(--arcgis-arcade-editor-identifier)}:host .number-value{color:var(--arcgis-arcade-editor-number)}:host .string-value{color:var(--arcgis-arcade-editor-string);white-space:pre-wrap}:host .constant-value{color:var(--arcgis-arcade-editor-constant)}:host .date-value{color:var(--arcgis-arcade-editor-date)}";
|
|
243
243
|
|
|
244
244
|
//#region Specialized Constants
|
|
245
245
|
const treeProps = {
|
|
246
246
|
lines: true,
|
|
247
247
|
selectionMode: "none",
|
|
248
248
|
scale: "s",
|
|
249
|
-
onCalciteTreeSelect: (e) => e.target.selectedItems.forEach((itemElt) => (itemElt.selected = false))
|
|
249
|
+
onCalciteTreeSelect: (e) => e.target.selectedItems.forEach((itemElt) => (itemElt.selected = false)),
|
|
250
250
|
};
|
|
251
251
|
const expandableTreeItemProps = {
|
|
252
252
|
onClick: (e) => {
|
|
253
253
|
const item = e.currentTarget;
|
|
254
254
|
item.expanded = !item.expanded;
|
|
255
|
-
}
|
|
255
|
+
},
|
|
256
256
|
};
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region Helper Functions
|
|
@@ -271,7 +271,7 @@ function renderSimpleValue(arcadeResult) {
|
|
|
271
271
|
case "null":
|
|
272
272
|
return h("span", { class: "constant-value" }, arcadeResult.type);
|
|
273
273
|
case "text":
|
|
274
|
-
return h("span", { class: "string-value" },
|
|
274
|
+
return h("span", { class: "string-value" }, quoteString(arcadeResult.value));
|
|
275
275
|
case "number":
|
|
276
276
|
return h("span", { class: "number-value" }, arcadeResult.value.toString());
|
|
277
277
|
case "boolean":
|
|
@@ -279,9 +279,9 @@ function renderSimpleValue(arcadeResult) {
|
|
|
279
279
|
case "date":
|
|
280
280
|
return h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
|
|
281
281
|
case "dateOnly":
|
|
282
|
-
return h("span", { class: "string-value" },
|
|
282
|
+
return h("span", { class: "string-value" }, quoteString(formatArcadeResultDateOnly(arcadeResult)));
|
|
283
283
|
case "time":
|
|
284
|
-
return h("span", { class: "string-value" },
|
|
284
|
+
return h("span", { class: "string-value" }, quoteString(formatArcadeResultTimeOnly(arcadeResult)));
|
|
285
285
|
default:
|
|
286
286
|
return null;
|
|
287
287
|
}
|
|
@@ -298,13 +298,18 @@ function renderFeatureSetTable(arcadeResult) {
|
|
|
298
298
|
}
|
|
299
299
|
})))))));
|
|
300
300
|
}
|
|
301
|
+
const __cmpMeta = [1,"arcgis-arcade-results",{"loading":[1028],"openedResultPanel":[1537,"opened-result-panel"],"result":[1040],"consoleLogs":[1040]}];
|
|
301
302
|
const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeResults extends HTMLElement {
|
|
302
303
|
constructor() {
|
|
303
304
|
super();
|
|
304
305
|
this.__registerHost();
|
|
306
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
305
307
|
this.__attachShadow();
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
308
|
+
this.arcgisOpenedResultPanelChange = createEvent(this, "arcgisOpenedResultPanelChange", 3);
|
|
309
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
310
|
+
this.manager = useControllerManager(this);
|
|
311
|
+
//#region Private Properties
|
|
312
|
+
this.messages = useT9n();
|
|
308
313
|
this._switchResultPanel = (e) => {
|
|
309
314
|
if (!e.target) {
|
|
310
315
|
return;
|
|
@@ -315,28 +320,17 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
315
320
|
}
|
|
316
321
|
this.updateResultPanel(panelName);
|
|
317
322
|
};
|
|
318
|
-
this._emitClose = () => this.
|
|
319
|
-
this._lang = "";
|
|
320
|
-
this._t9nLocale = "";
|
|
321
|
-
this._t9nStrings = undefined;
|
|
323
|
+
this._emitClose = () => this.arcgisClose.emit();
|
|
322
324
|
this.loading = true;
|
|
323
325
|
this.openedResultPanel = "output";
|
|
324
326
|
this.result = undefined;
|
|
325
327
|
this.consoleLogs = undefined;
|
|
326
328
|
}
|
|
327
329
|
//#endregion
|
|
328
|
-
// #region Component lifecycle events
|
|
329
|
-
async componentWillLoad() {
|
|
330
|
-
await B(this, getAssetPath("./assets"));
|
|
331
|
-
}
|
|
332
|
-
disconnectedCallback() {
|
|
333
|
-
q(this);
|
|
334
|
-
}
|
|
335
|
-
// #endregion
|
|
336
330
|
//#region Private Methods
|
|
337
331
|
updateResultPanel(resultPanelType) {
|
|
338
332
|
this.openedResultPanel = resultPanelType;
|
|
339
|
-
this.
|
|
333
|
+
this.arcgisOpenedResultPanelChange.emit(resultPanelType);
|
|
340
334
|
}
|
|
341
335
|
//#endregion
|
|
342
336
|
//#region Rendering
|
|
@@ -347,7 +341,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
347
341
|
if (this.loading && !this.consoleLogs?.length) {
|
|
348
342
|
return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
349
343
|
}
|
|
350
|
-
return (h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ?
|
|
344
|
+
return (h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ? this.consoleLogs.map((log) => h("p", null, log)) : h("p", null, this.messages.consolemessage)));
|
|
351
345
|
}
|
|
352
346
|
renderLogPanel() {
|
|
353
347
|
if (this.openedResultPanel !== "log") {
|
|
@@ -357,24 +351,24 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
357
351
|
return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
358
352
|
}
|
|
359
353
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
360
|
-
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label:
|
|
361
|
-
timeStamp: new Intl.DateTimeFormat(this._t9nLocale, {
|
|
354
|
+
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label: setValuesInString(this.messages.lastexecutionformat, {
|
|
355
|
+
timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
|
|
362
356
|
dateStyle: "medium",
|
|
363
|
-
timeStyle: "medium"
|
|
364
|
-
}).format(this.result.timeStamp)
|
|
365
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
366
|
-
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
357
|
+
timeStyle: "medium",
|
|
358
|
+
}).format(this.result.timeStamp),
|
|
359
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: setValuesInString(this.messages.compilationtimeformat, {
|
|
360
|
+
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
367
361
|
style: "unit",
|
|
368
362
|
unit: "millisecond",
|
|
369
|
-
maximumFractionDigits: 2
|
|
370
|
-
}).format(this.result.compilationTime ?? 0)
|
|
371
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
372
|
-
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
363
|
+
maximumFractionDigits: 2,
|
|
364
|
+
}).format(this.result.compilationTime ?? 0),
|
|
365
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: setValuesInString(this.messages.executiontimeformat, {
|
|
366
|
+
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
373
367
|
style: "unit",
|
|
374
368
|
unit: "millisecond",
|
|
375
|
-
maximumFractionDigits: 2
|
|
376
|
-
}).format(this.result.executionTime ?? 0)
|
|
377
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })))) : (h("calcite-list-item", { label: this.
|
|
369
|
+
maximumFractionDigits: 2,
|
|
370
|
+
}).format(this.result.executionTime ?? 0),
|
|
371
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })))) : (h("calcite-list-item", { label: this.messages.runscriptmessage ?? "No output, run the script once." }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: "color-info" })))));
|
|
378
372
|
}
|
|
379
373
|
renderOutputPanel() {
|
|
380
374
|
if (this.openedResultPanel !== "output") {
|
|
@@ -385,8 +379,8 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
385
379
|
}
|
|
386
380
|
switch (this.result?.type) {
|
|
387
381
|
case "error":
|
|
388
|
-
return (h("div", { class: "result-value-simple flex-adjustable" },
|
|
389
|
-
message: this.result.value
|
|
382
|
+
return (h("div", { class: "result-value-simple flex-adjustable" }, setValuesInString(this.messages.executionerrorformat, {
|
|
383
|
+
message: this.result.value,
|
|
390
384
|
})));
|
|
391
385
|
case "null":
|
|
392
386
|
case "unknown":
|
|
@@ -416,14 +410,14 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
416
410
|
case "knowledgeGraph":
|
|
417
411
|
return (h("div", { class: "result-value-simple ltr-container" }, h("span", { class: "value-type" }, this.result.type, ":\u00A0"), h("span", { class: "string-value" }, this.result.value.url)));
|
|
418
412
|
default:
|
|
419
|
-
return
|
|
413
|
+
return h("div", { class: "result-value-simple flex-adjustable ltr-container" }, this.messages.runscriptmessage);
|
|
420
414
|
}
|
|
421
415
|
}
|
|
422
416
|
renderArrayHeader(arcadeResult) {
|
|
423
417
|
const items = arcadeResult.value ?? [];
|
|
424
418
|
const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
|
|
425
|
-
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0",
|
|
426
|
-
count: MaxArrayItems.toString()
|
|
419
|
+
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0", setValuesInString(this.messages.showingfirstitemsformat, {
|
|
420
|
+
count: MaxArrayItems.toString(),
|
|
427
421
|
}))) : null));
|
|
428
422
|
}
|
|
429
423
|
renderArrayTree(items, subtree = false) {
|
|
@@ -468,25 +462,17 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
468
462
|
}
|
|
469
463
|
}
|
|
470
464
|
renderFeatureSetLabel(arcadeResult) {
|
|
471
|
-
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0",
|
|
472
|
-
count: BatchSize.toString()
|
|
465
|
+
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0", setValuesInString(this.messages.showingfirstitemsformat, {
|
|
466
|
+
count: BatchSize.toString(),
|
|
473
467
|
}))) : null));
|
|
474
468
|
}
|
|
475
469
|
render() {
|
|
476
|
-
return (h(Host, null, h("header", { class: "flex-row" }, h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { active: this.openedResultPanel === "output", text: this.
|
|
470
|
+
return (h(Host, null, h("header", { class: "flex-row" }, h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { active: this.openedResultPanel === "output", text: this.messages.output ?? "Output", "text-enabled": true, scale: "s", icon: "list-show-all", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "output" }), h("calcite-action", { active: this.openedResultPanel === "console", text: this.messages.console ?? "Console", "text-enabled": true, scale: "s", icon: "console", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "console" }), h("calcite-action", { active: this.openedResultPanel === "log", text: this.messages.log ?? "Log", "text-enabled": true, scale: "s", icon: "list", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "log" }))), h("calcite-action", { scale: "s", icon: "x", text: this.messages.close ?? "", onClick: this._emitClose })), h("article", { class: "flex-adjustable" }, this.loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: "" })) : (h("div", { class: "flex-column y-scrollable-container" }, this.renderOutputPanel(), this.renderConsolePanel(), this.renderLogPanel())))));
|
|
477
471
|
}
|
|
478
472
|
static get assetsDirs() { return ["assets"]; }
|
|
479
|
-
get
|
|
473
|
+
get el() { return this; }
|
|
480
474
|
static get style() { return arcadeResultsCss; }
|
|
481
|
-
},
|
|
482
|
-
"loading": [4],
|
|
483
|
-
"openedResultPanel": [1537, "opened-result-panel"],
|
|
484
|
-
"result": [16],
|
|
485
|
-
"consoleLogs": [16],
|
|
486
|
-
"_lang": [32],
|
|
487
|
-
"_t9nLocale": [32],
|
|
488
|
-
"_t9nStrings": [32]
|
|
489
|
-
}]);
|
|
475
|
+
}, __cmpMeta);
|
|
490
476
|
function defineCustomElement() {
|
|
491
477
|
if (typeof customElements === "undefined") {
|
|
492
478
|
return;
|