@arcgis/coding-components 4.29.0-beta.113 → 4.29.0-beta.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +113 -113
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +19 -19
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.en.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nb.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +4 -4
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-1d1df020.js → p-6e8b9fe5.js} +2 -2
- package/dist/arcgis-coding-components/{p-e530878b.js → p-7a93bb3b.js} +2 -2
- package/dist/arcgis-coding-components/{p-4b7291cc.js → p-9cb71acd.js} +1 -1
- package/dist/arcgis-coding-components/p-a204229b.entry.js +6 -0
- package/dist/arcgis-coding-components/p-af7e61b6.js +6 -0
- package/dist/arcgis-coding-components/{p-4088f191.js → p-ba6773e0.js} +1 -1
- package/dist/arcgis-coding-components/{p-e1eaafa9.js → p-d8743a57.js} +2 -2
- package/dist/arcgis-coding-components/{p-ed0acf1d.js → p-d96dc356.js} +2 -2
- package/dist/arcgis-coding-components/{p-e4fb8f11.js → p-dfbc8c11.js} +11 -11
- package/dist/arcgis-coding-components/{p-8fa7b6b3.js → p-e67455ae.js} +2 -2
- package/dist/arcgis-coding-components/{p-b2b27bbe.js → p-e8238684.js} +2 -2
- package/dist/arcgis-coding-components/{p-b7f6269a.js → p-f71b9ff8.js} +2 -2
- package/dist/cjs/{arcade-defaults-4a549303.js → arcade-defaults-72ad69bb.js} +34 -30
- package/dist/cjs/{arcade-mode-6c189663.js → arcade-mode-d0e254e7.js} +11 -14
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +100 -135
- package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
- package/dist/cjs/{css-6f7dcd5a.js → css-7e80b850.js} +1 -1
- package/dist/cjs/{cssMode-245d6467.js → cssMode-acc88f93.js} +3 -3
- package/dist/cjs/{html-2774c64f.js → html-c634cfab.js} +3 -3
- package/dist/cjs/{htmlMode-0606c7e3.js → htmlMode-7446fade.js} +3 -3
- package/dist/cjs/{index-b518646d.js → index-135d850f.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-6b11fc9d.js → javascript-7de4f2e5.js} +4 -4
- package/dist/cjs/{jsonMode-11883f07.js → jsonMode-ba23faf1.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tsMode-4de8b5c1.js → tsMode-f95cf2a3.js} +3 -3
- package/dist/cjs/{typescript-96d879a2.js → typescript-fd97c5c9.js} +3 -3
- package/dist/components/arcade-api.js +20 -18
- package/dist/components/arcade-contribution.js +8 -7
- package/dist/components/arcade-defaults.js +9 -9
- package/dist/components/arcade-mode.js +10 -12
- package/dist/components/arcade-results.js +27 -81
- package/dist/components/arcade-suggestions.js +15 -12
- package/dist/components/arcade-variables.js +16 -10
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +16 -12
- 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-code-editor.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +10 -7
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +3 -3
- package/dist/components/markdown.js +10 -1
- package/dist/components/utilities.js +4 -4
- package/dist/esm/{arcade-defaults-1e50716f.js → arcade-defaults-341d3ba2.js} +30 -27
- package/dist/esm/{arcade-mode-95cf5178.js → arcade-mode-c6b62779.js} +11 -14
- package/dist/esm/arcgis-arcade-api_6.entry.js +100 -135
- package/dist/esm/arcgis-coding-components.js +3 -3
- package/dist/esm/{css-e2349c2b.js → css-a5c8eae7.js} +1 -1
- package/dist/esm/{cssMode-3fae4ab5.js → cssMode-2775c361.js} +3 -3
- package/dist/esm/{html-961458b7.js → html-21177d74.js} +3 -3
- package/dist/esm/{htmlMode-33dab68c.js → htmlMode-f07e5f14.js} +3 -3
- package/dist/esm/{index-751e780b.js → index-17ee3129.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-996fdadb.js → javascript-e4b517d9.js} +4 -4
- package/dist/esm/{jsonMode-d3634539.js → jsonMode-ca5b2b48.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{tsMode-e2bb6f87.js → tsMode-fe489f62.js} +3 -3
- package/dist/esm/{typescript-e9a34331.js → typescript-2541a3e5.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/utils/arcade-monaco/arcade-contribution.d.ts +2 -2
- package/dist/types/utils/constants.d.ts +2 -2
- package/dist/types/utils/markdown.d.ts +3 -0
- package/package.json +8 -8
- package/dist/arcgis-coding-components/p-6c13dba0.entry.js +0 -6
- package/dist/arcgis-coding-components/p-d80df481.js +0 -6
- package/dist/components/functional-components.js +0 -15
- package/dist/types/utils/functional-components.d.ts +0 -7
- package/dist/types/utils/json-format.d.ts +0 -1
|
@@ -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.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as importArcade, s as supportedFields } from './fields.js';
|
|
8
|
-
import { B,
|
|
8
|
+
import { B, q, Z, D } from './index2.js';
|
|
9
9
|
import '@esri/calcite-components/dist/components/calcite-tree.js';
|
|
10
10
|
import '@esri/calcite-components/dist/components/calcite-tree-item.js';
|
|
11
11
|
import '@esri/calcite-components/dist/components/calcite-loader.js';
|
|
@@ -175,17 +175,18 @@ function formatArcadeResultDateOnly(dateObject) {
|
|
|
175
175
|
function formatArcadeResultTimeOnly(dateObject) {
|
|
176
176
|
return dateObject.value.toString();
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
async function convertScriptOutputToArcadeResult(scriptOutput, timeZone = "system") {
|
|
179
|
+
const arcadeResult = valueToArcadeResult(scriptOutput);
|
|
180
|
+
if (arcadeResult.type !== "featureSet") {
|
|
181
|
+
return arcadeResult;
|
|
181
182
|
}
|
|
182
183
|
// Feature Set needs to be loaded
|
|
183
|
-
await
|
|
184
|
+
await arcadeResult.value.load();
|
|
184
185
|
// Create the first iterator
|
|
185
|
-
|
|
186
|
+
arcadeResult.iterator = arcadeResult.value.iterator({ aborted: false });
|
|
186
187
|
// Load the first batch of items
|
|
187
|
-
|
|
188
|
-
return
|
|
188
|
+
arcadeResult.features = (await arcadeResult.iterator.nextBatchAsArcadeFeatures(BatchSize, timeZone)) ?? [];
|
|
189
|
+
return arcadeResult;
|
|
189
190
|
}
|
|
190
191
|
async function executeScript(editorProfile, script, testContext, console) {
|
|
191
192
|
//
|
|
@@ -213,12 +214,12 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
213
214
|
// Execute the script
|
|
214
215
|
const scriptOutput = await executor.executeAsync(profileVariableInstances, executeContext);
|
|
215
216
|
// Convert script output to arcade result object and load data if necessary
|
|
216
|
-
const
|
|
217
|
+
const arcadeResult = await convertScriptOutputToArcadeResult(scriptOutput, timeZone);
|
|
217
218
|
// Timestamp and measure cost
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return
|
|
219
|
+
arcadeResult.timeStamp = timeStamp;
|
|
220
|
+
arcadeResult.compilationTime = t1 - t0;
|
|
221
|
+
arcadeResult.executionTime = performance.now() - t1;
|
|
222
|
+
return arcadeResult;
|
|
222
223
|
//
|
|
223
224
|
}
|
|
224
225
|
catch (error) {
|
|
@@ -237,61 +238,6 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
|
|
240
|
-
const indentSpecs = { char: " ", size: 2 };
|
|
241
|
-
const indentType = new Array(indentSpecs.size + 1).join(indentSpecs.char);
|
|
242
|
-
function createPushFunc(p) {
|
|
243
|
-
return (substring) => `\\${p.push(substring)}\\`;
|
|
244
|
-
}
|
|
245
|
-
function createPopFunc(p) {
|
|
246
|
-
return (_, offset) => p[offset - 1] ?? "";
|
|
247
|
-
}
|
|
248
|
-
function indent(index, indentType) {
|
|
249
|
-
return new Array(index + 1).join(indentType);
|
|
250
|
-
}
|
|
251
|
-
function jsonFormat(json) {
|
|
252
|
-
// Convert to string and extract backslashes and strings
|
|
253
|
-
const p = [];
|
|
254
|
-
const pushFunc = createPushFunc(p);
|
|
255
|
-
const jsonString = JSON.stringify(json)
|
|
256
|
-
.replace(/\\./gu, pushFunc)
|
|
257
|
-
.replace(/(".*?"|'.*?')/gu, pushFunc)
|
|
258
|
-
.replace(/\s+/u, "");
|
|
259
|
-
// Indent and insert newlines
|
|
260
|
-
let indentIndex = 0;
|
|
261
|
-
let out = "";
|
|
262
|
-
for (let i = 0; i < jsonString.length; i++) {
|
|
263
|
-
const c = jsonString.charAt(i);
|
|
264
|
-
switch (c) {
|
|
265
|
-
case "{":
|
|
266
|
-
case "[":
|
|
267
|
-
indentIndex += 1;
|
|
268
|
-
out += `${c}\n${indent(indentIndex, indentType)}`;
|
|
269
|
-
break;
|
|
270
|
-
case "}":
|
|
271
|
-
case "]":
|
|
272
|
-
indentIndex -= 1;
|
|
273
|
-
out += `\n${indent(indentIndex, indentType)}${c}`;
|
|
274
|
-
break;
|
|
275
|
-
case ",":
|
|
276
|
-
out += `,\n${indent(indentIndex, indentType)}`;
|
|
277
|
-
break;
|
|
278
|
-
case ":":
|
|
279
|
-
out += ": ";
|
|
280
|
-
break;
|
|
281
|
-
default:
|
|
282
|
-
out += c;
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
// Strip whitespace from numeric arrays and put backslashes
|
|
287
|
-
// and strings back in
|
|
288
|
-
const popFunc = createPopFunc(p);
|
|
289
|
-
return out
|
|
290
|
-
.replace(/\[[\d,\s]+?\]/gu, (m) => m.replace(/\s/gu, ""))
|
|
291
|
-
.replace(/\\(\d+)\\/gu, popFunc) // strings
|
|
292
|
-
.replace(/\\(\d+)\\/gu, popFunc); // backslashes in strings
|
|
293
|
-
}
|
|
294
|
-
|
|
295
241
|
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-half)}:host calcite-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-half)}:host calcite-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}: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-half)}:host .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);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-three-quarter)}:host .console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-three-quarter);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-quarter)}: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)}";
|
|
296
242
|
|
|
297
243
|
//#region Specialized Constants
|
|
@@ -313,10 +259,10 @@ function renderDictionaryProperty(key) {
|
|
|
313
259
|
return (h(Fragment, null, h("span", { class: "dictionary-property" }, key), h("span", null, ":\u00A0")));
|
|
314
260
|
}
|
|
315
261
|
function renderDictionaryAsJsonTree(value, subtree = false) {
|
|
316
|
-
return (h("calcite-tree", { slot: subtree ? "children" : undefined, ...treeProps }, h("calcite-tree-item", { class: "string-value" },
|
|
262
|
+
return (h("calcite-tree", { slot: subtree ? "children" : undefined, ...treeProps }, h("calcite-tree-item", { class: "string-value" }, JSON.stringify(value.castAsJson(), undefined, 2))));
|
|
317
263
|
}
|
|
318
264
|
function renderGeometryTree(value, subtree = false) {
|
|
319
|
-
return (h("calcite-tree", { slot: subtree ? "children" : undefined, ...treeProps }, h("calcite-tree-item", null, h("div", { class: "tree-item-label" }, renderDictionaryProperty("type"), value.type)), h("calcite-tree-item", null, h("div", { class: "tree-item-label" }, renderDictionaryProperty("value"), h("span", { class: "string-value" },
|
|
265
|
+
return (h("calcite-tree", { slot: subtree ? "children" : undefined, ...treeProps }, h("calcite-tree-item", null, h("div", { class: "tree-item-label" }, renderDictionaryProperty("type"), value.type)), h("calcite-tree-item", null, h("div", { class: "tree-item-label" }, renderDictionaryProperty("value"), h("span", { class: "string-value" }, JSON.stringify(value, undefined, 2))))));
|
|
320
266
|
}
|
|
321
267
|
function renderSimpleValue(arcadeResult) {
|
|
322
268
|
switch (arcadeResult.type) {
|
|
@@ -324,7 +270,7 @@ function renderSimpleValue(arcadeResult) {
|
|
|
324
270
|
case "null":
|
|
325
271
|
return h("span", { class: "constant-value" }, arcadeResult.type);
|
|
326
272
|
case "text":
|
|
327
|
-
return h("span", { class: "string-value" },
|
|
273
|
+
return h("span", { class: "string-value" }, D(arcadeResult.value));
|
|
328
274
|
case "number":
|
|
329
275
|
return h("span", { class: "number-value" }, arcadeResult.value.toString());
|
|
330
276
|
case "boolean":
|
|
@@ -332,9 +278,9 @@ function renderSimpleValue(arcadeResult) {
|
|
|
332
278
|
case "date":
|
|
333
279
|
return h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
|
|
334
280
|
case "dateOnly":
|
|
335
|
-
return h("span", { class: "string-value" },
|
|
281
|
+
return h("span", { class: "string-value" }, D(formatArcadeResultDateOnly(arcadeResult)));
|
|
336
282
|
case "time":
|
|
337
|
-
return h("span", { class: "string-value" },
|
|
283
|
+
return h("span", { class: "string-value" }, D(formatArcadeResultTimeOnly(arcadeResult)));
|
|
338
284
|
default:
|
|
339
285
|
return null;
|
|
340
286
|
}
|
|
@@ -383,7 +329,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
383
329
|
await B(this, getAssetPath("./assets"));
|
|
384
330
|
}
|
|
385
331
|
disconnectedCallback() {
|
|
386
|
-
|
|
332
|
+
q(this);
|
|
387
333
|
}
|
|
388
334
|
// #endregion
|
|
389
335
|
//#region Private Methods
|
|
@@ -410,18 +356,18 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
410
356
|
return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
411
357
|
}
|
|
412
358
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
413
|
-
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label:
|
|
359
|
+
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label: Z(this._t9nStrings?.lastexecutionformat, {
|
|
414
360
|
timeStamp: new Intl.DateTimeFormat(this._t9nLocale, {
|
|
415
361
|
dateStyle: "medium",
|
|
416
362
|
timeStyle: "medium"
|
|
417
363
|
}).format(this.result.timeStamp)
|
|
418
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
364
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: Z(this._t9nStrings?.compilationtimeformat, {
|
|
419
365
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
420
366
|
style: "unit",
|
|
421
367
|
unit: "millisecond",
|
|
422
368
|
maximumFractionDigits: 2
|
|
423
369
|
}).format(this.result.compilationTime ?? 0)
|
|
424
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
370
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: Z(this._t9nStrings?.executiontimeformat, {
|
|
425
371
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
426
372
|
style: "unit",
|
|
427
373
|
unit: "millisecond",
|
|
@@ -438,7 +384,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
438
384
|
}
|
|
439
385
|
switch (this.result?.type) {
|
|
440
386
|
case "error":
|
|
441
|
-
return (h("div", { class: "result-value-simple flex-adjustable" },
|
|
387
|
+
return (h("div", { class: "result-value-simple flex-adjustable" }, Z(this._t9nStrings?.executionerrorformat, {
|
|
442
388
|
message: this.result.value
|
|
443
389
|
})));
|
|
444
390
|
case "null":
|
|
@@ -475,7 +421,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
475
421
|
renderArrayHeader(arcadeResult) {
|
|
476
422
|
const items = arcadeResult.value ?? [];
|
|
477
423
|
const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
|
|
478
|
-
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0",
|
|
424
|
+
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0", Z(this._t9nStrings?.showingfirstitemsformat, {
|
|
479
425
|
count: MaxArrayItems.toString()
|
|
480
426
|
}))) : null));
|
|
481
427
|
}
|
|
@@ -521,7 +467,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
521
467
|
}
|
|
522
468
|
}
|
|
523
469
|
renderFeatureSetLabel(arcadeResult) {
|
|
524
|
-
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0",
|
|
470
|
+
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0", Z(this._t9nStrings?.showingfirstitemsformat, {
|
|
525
471
|
count: BatchSize.toString()
|
|
526
472
|
}))) : null));
|
|
527
473
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
8
|
-
import { S as StickyFilterInput } from './functional-components.js';
|
|
9
8
|
import { f as filterCollection } from './utilities.js';
|
|
10
|
-
import { B,
|
|
9
|
+
import { B, q, W } from './index2.js';
|
|
11
10
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
12
11
|
import '@esri/calcite-components/dist/components/calcite-list-item.js';
|
|
13
12
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
@@ -15,6 +14,7 @@ import '@esri/calcite-components/dist/components/calcite-flow-item.js';
|
|
|
15
14
|
import '@esri/calcite-components/dist/components/calcite-button.js';
|
|
16
15
|
import '@esri/calcite-components/dist/components/calcite-block.js';
|
|
17
16
|
import '@esri/calcite-components/dist/components/calcite-flow.js';
|
|
17
|
+
import '@esri/calcite-components/dist/components/calcite-input.js';
|
|
18
18
|
import '@esri/calcite-components/dist/components/calcite-list.js';
|
|
19
19
|
|
|
20
20
|
function isSuggestionGroups(item) {
|
|
@@ -36,10 +36,10 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
36
36
|
this.__attachShadow();
|
|
37
37
|
this.close = createEvent(this, "close", 3);
|
|
38
38
|
this.itemSelected = createEvent(this, "itemSelected", 3);
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
this._updateFilterValue = (e) => {
|
|
40
|
+
this._filterValue = e.target?.value ?? "";
|
|
41
|
+
};
|
|
41
42
|
this._emitItemSelected = (e) => {
|
|
42
|
-
// @ts-expect-error
|
|
43
43
|
const item = e.target?.["data-item"];
|
|
44
44
|
if (!item) {
|
|
45
45
|
return;
|
|
@@ -51,7 +51,6 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
this._showSuggestionDetail = (e) => {
|
|
54
|
-
// @ts-expect-error
|
|
55
54
|
const item = e.target?.["data-item"];
|
|
56
55
|
if (!item) {
|
|
57
56
|
return;
|
|
@@ -59,8 +58,12 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
59
58
|
e.stopPropagation();
|
|
60
59
|
this._selectedSuggestion = item;
|
|
61
60
|
};
|
|
62
|
-
this._emitClose = () =>
|
|
63
|
-
|
|
61
|
+
this._emitClose = () => {
|
|
62
|
+
this.close.emit();
|
|
63
|
+
};
|
|
64
|
+
this._beforeBack = async () => {
|
|
65
|
+
this._selectedSuggestion = undefined;
|
|
66
|
+
};
|
|
64
67
|
this._lang = "";
|
|
65
68
|
this._t9nLocale = "";
|
|
66
69
|
this._t9nStrings = undefined;
|
|
@@ -82,7 +85,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
82
85
|
disconnectedCallback() {
|
|
83
86
|
this._flowObserver?.disconnect();
|
|
84
87
|
this._themeChangedListner?.dispose();
|
|
85
|
-
|
|
88
|
+
q(this);
|
|
86
89
|
}
|
|
87
90
|
// #endregion
|
|
88
91
|
//#region Private Methods
|
|
@@ -100,7 +103,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
100
103
|
// When switching between flow the same reference is reused
|
|
101
104
|
this._flowObserver = new MutationObserver(() => {
|
|
102
105
|
// Get the last panel and try to set focus on the input element
|
|
103
|
-
|
|
106
|
+
W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
104
107
|
});
|
|
105
108
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
106
109
|
}
|
|
@@ -130,7 +133,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
130
133
|
return (h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => void e?.setFocus(), "data-item": suggestion }, this._t9nStrings?.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref: (e) => e === undefined ? undefined : void colorizeCodeElement(e, suggestion.code).catch(console.error) })))));
|
|
131
134
|
}
|
|
132
135
|
render() {
|
|
133
|
-
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h(
|
|
136
|
+
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
|
|
134
137
|
}
|
|
135
138
|
static get assetsDirs() { return ["assets"]; }
|
|
136
139
|
get _hostElement() { return this; }
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h } from '@stencil/core/internal/client';
|
|
7
|
-
import {
|
|
8
|
-
import { B, H, F, D } from './index2.js';
|
|
7
|
+
import { B, q, W, K } from './index2.js';
|
|
9
8
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
10
9
|
import '@esri/calcite-components/dist/components/calcite-flow-item.js';
|
|
11
10
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
11
|
+
import '@esri/calcite-components/dist/components/calcite-input.js';
|
|
12
12
|
import '@esri/calcite-components/dist/components/calcite-loader.js';
|
|
13
13
|
import '@esri/calcite-components/dist/components/calcite-list.js';
|
|
14
14
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
@@ -30,13 +30,19 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
30
30
|
this.__attachShadow();
|
|
31
31
|
this.close = createEvent(this, "close", 3);
|
|
32
32
|
this.itemSelected = createEvent(this, "itemSelected", 3);
|
|
33
|
-
this._updateFilterValue = (e) =>
|
|
33
|
+
this._updateFilterValue = (e) => {
|
|
34
|
+
this._filterValue = e.target.value;
|
|
35
|
+
};
|
|
34
36
|
this._beforeBack = async () => {
|
|
35
37
|
this.removeLastPanelRenderer();
|
|
36
38
|
this._filterValue = "";
|
|
37
39
|
};
|
|
38
|
-
this._emitClose = () =>
|
|
39
|
-
|
|
40
|
+
this._emitClose = () => {
|
|
41
|
+
this.close.emit();
|
|
42
|
+
};
|
|
43
|
+
this._backToTop = () => {
|
|
44
|
+
this._flowItemRenderers = [];
|
|
45
|
+
};
|
|
40
46
|
this._emitItemSelected = (e) => {
|
|
41
47
|
const variable = e.target?.["data-item"];
|
|
42
48
|
if (!variable || variable.nonInteractive) {
|
|
@@ -74,7 +80,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
74
80
|
await B(this, getAssetPath("./assets"));
|
|
75
81
|
}
|
|
76
82
|
disconnectedCallback() {
|
|
77
|
-
|
|
83
|
+
q(this);
|
|
78
84
|
this._flowObserver?.disconnect();
|
|
79
85
|
}
|
|
80
86
|
// #endregion
|
|
@@ -99,7 +105,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
99
105
|
// When switching between flow the same reference is reused
|
|
100
106
|
this._flowObserver = new MutationObserver(() => {
|
|
101
107
|
// Get the last panel and try to set focus on the input element
|
|
102
|
-
|
|
108
|
+
W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
103
109
|
});
|
|
104
110
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
105
111
|
}
|
|
@@ -128,12 +134,12 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
128
134
|
});
|
|
129
135
|
loading = true;
|
|
130
136
|
}
|
|
131
|
-
return (h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this._t9nStrings?.backtotop ?? "Back to top", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h(
|
|
137
|
+
return (h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this._t9nStrings?.backtotop ?? "Back to top", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
|
|
132
138
|
};
|
|
133
139
|
}
|
|
134
140
|
renderEditorVariables(collection) {
|
|
135
141
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
136
|
-
const filterExpression =
|
|
142
|
+
const filterExpression = K(this._filterValue);
|
|
137
143
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
138
144
|
if (!filteredVariables.length) {
|
|
139
145
|
return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { editor, KeyCode } from 'monaco-editor';
|
|
8
8
|
import { e as executeScript, D as DevelopersWebSitePath, d as defineCustomElement$5 } from './arcade-results.js';
|
|
9
|
-
import { h, U, k, B,
|
|
9
|
+
import { h, U, k, B, q } from './index2.js';
|
|
10
10
|
import { s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
|
|
11
11
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
12
12
|
import '@esri/calcite-components/dist/components/calcite-action-bar.js';
|
|
@@ -110,9 +110,13 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
110
110
|
this._executingScript = false;
|
|
111
111
|
})(), 0);
|
|
112
112
|
};
|
|
113
|
-
this._toggleShowExecutionPanel = () =>
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
this._toggleShowExecutionPanel = () => {
|
|
114
|
+
this._showExecutionPanel = !this._showExecutionPanel;
|
|
115
|
+
};
|
|
116
|
+
this._toggleSideActionBarExpanded = () => {
|
|
117
|
+
this.sideActionBarExpanded = !this.sideActionBarExpanded;
|
|
118
|
+
};
|
|
119
|
+
this._toggleSidePanel = (e) => {
|
|
116
120
|
if (!e.target) {
|
|
117
121
|
return;
|
|
118
122
|
}
|
|
@@ -121,7 +125,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
121
125
|
this.openedSidePanel = panelName === this.openedSidePanel ? "none" : panelName;
|
|
122
126
|
if (this.openedSidePanel === "none") {
|
|
123
127
|
// Reset focus on the code editor if no panel displayed
|
|
124
|
-
|
|
128
|
+
this._codeEditorElt?.setFocus().catch(console.error);
|
|
125
129
|
}
|
|
126
130
|
};
|
|
127
131
|
this._openArcadeHelp = () => void window.open(DevelopersWebSitePath, "Arcade Help");
|
|
@@ -129,8 +133,8 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
129
133
|
e.stopPropagation();
|
|
130
134
|
this.scriptChange.emit(e.detail);
|
|
131
135
|
};
|
|
132
|
-
this._insertAsSnippet =
|
|
133
|
-
this._insertAsText =
|
|
136
|
+
this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
|
|
137
|
+
this._insertAsText = (e) => void this._codeEditorElt?.insertText(e.detail).catch(console.error);
|
|
134
138
|
this._onResultPanelChange = (e) => void (this._resultPanel = e.detail);
|
|
135
139
|
this._onExecutionPanelClose = () => void (this._showExecutionPanel = false);
|
|
136
140
|
this._lang = "";
|
|
@@ -277,7 +281,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
277
281
|
await this._codeEditorElt?.setFocus();
|
|
278
282
|
}
|
|
279
283
|
disconnectedCallback() {
|
|
280
|
-
|
|
284
|
+
q(this);
|
|
281
285
|
arcadeDefaults.disposeApiContextForModel(this._modelId);
|
|
282
286
|
arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
283
287
|
while (this._disposables.length) {
|
|
@@ -375,11 +379,11 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
375
379
|
}
|
|
376
380
|
switch (this.openedSidePanel) {
|
|
377
381
|
case "api":
|
|
378
|
-
return (h$1("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected:
|
|
382
|
+
return (h$1("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected: this._insertAsSnippet, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
379
383
|
case "variables":
|
|
380
|
-
return (h$1("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected:
|
|
384
|
+
return (h$1("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
381
385
|
case "suggestions":
|
|
382
|
-
return (h$1("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected:
|
|
386
|
+
return (h$1("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
383
387
|
default:
|
|
384
388
|
return null;
|
|
385
389
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeResults$1, d as defineCustomElement$1 } from './arcade-results.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeSuggestions$1, d as defineCustomElement$1 } from './arcade-suggestions.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeVariables$1, d as defineCustomElement$1 } from './arcade-variables.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisCodeEditor$1, d as defineCustomElement$1 } from './code-editor.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { Range, editor, Uri, KeyMod, KeyCode } from 'monaco-editor';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
|
|
7
|
+
function isDefaultModule(module) {
|
|
8
|
+
return module.default !== undefined;
|
|
9
|
+
}
|
|
7
10
|
async function requireModule(modulePath) {
|
|
8
11
|
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
9
12
|
resolve(moduleDefault);
|
|
@@ -14,14 +17,14 @@ async function importLayersFeatureLayer() {
|
|
|
14
17
|
return await requireModule("esri/layers/FeatureLayer");
|
|
15
18
|
}
|
|
16
19
|
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
17
|
-
return module.default;
|
|
20
|
+
return isDefaultModule(module) ? module.default : module;
|
|
18
21
|
}
|
|
19
22
|
async function importPortalPortalItem() {
|
|
20
23
|
if (amd) {
|
|
21
24
|
return await requireModule("esri/portal/PortalItem");
|
|
22
25
|
}
|
|
23
26
|
const module = await import('@arcgis/core/portal/PortalItem.js');
|
|
24
|
-
return module.default;
|
|
27
|
+
return isDefaultModule(module) ? module.default : module;
|
|
25
28
|
}
|
|
26
29
|
async function newPortalPortalItem(properties) {
|
|
27
30
|
const ModConstructor = await importPortalPortalItem();
|
|
@@ -32,7 +35,7 @@ async function importWebMap() {
|
|
|
32
35
|
return await requireModule("esri/WebMap");
|
|
33
36
|
}
|
|
34
37
|
const module = await import('@arcgis/core/WebMap.js');
|
|
35
|
-
return module.default;
|
|
38
|
+
return isDefaultModule(module) ? module.default : module;
|
|
36
39
|
}
|
|
37
40
|
async function newWebMap(properties) {
|
|
38
41
|
const ModConstructor = await importWebMap();
|
|
@@ -43,7 +46,7 @@ async function importWebScene() {
|
|
|
43
46
|
return await requireModule("esri/WebScene");
|
|
44
47
|
}
|
|
45
48
|
const module = await import('@arcgis/core/WebScene.js');
|
|
46
|
-
return module.default;
|
|
49
|
+
return isDefaultModule(module) ? module.default : module;
|
|
47
50
|
}
|
|
48
51
|
async function newWebScene(properties) {
|
|
49
52
|
const ModConstructor = await importWebScene();
|
|
@@ -54,14 +57,14 @@ async function importArcade() {
|
|
|
54
57
|
return await requireModule("esri/arcade");
|
|
55
58
|
}
|
|
56
59
|
const module = await import('@arcgis/core/arcade.js');
|
|
57
|
-
return module;
|
|
60
|
+
return isDefaultModule(module) ? module.default : module;
|
|
58
61
|
}
|
|
59
62
|
async function importRequest() {
|
|
60
63
|
if (amd) {
|
|
61
64
|
return await requireModule("esri/request");
|
|
62
65
|
}
|
|
63
66
|
const module = await import('@arcgis/core/request.js');
|
|
64
|
-
return module.default;
|
|
67
|
+
return isDefaultModule(module) ? module.default : module;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
6
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0-beta.
|
|
4
|
+
* v4.29.0-beta.115
|
|
5
5
|
*/
|
|
6
|
-
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return setTimeout(()=>e
|
|
6
|
+
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
|
|
7
7
|
|
|
8
|
-
export { B, D, E,
|
|
8
|
+
export { B, D, E, G, K, U, W, Z, ee as e, h, ie as i, k, q, re as r, se as s, te as t, v, x };
|