@arcgis/coding-components 4.32.0-next.83 → 4.32.0-next.85
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/{EOMSLJPL.js → 22HCDU3J.js} +1 -1
- package/dist/arcgis-coding-components/{ORNMMSBL.js → 2JCVLTGE.js} +2 -2
- package/dist/arcgis-coding-components/{LZXHELU4.js → 2WF7EDB6.js} +2 -2
- package/dist/arcgis-coding-components/{4VB23NUX.js → 3P3LPZXG.js} +2 -2
- package/dist/arcgis-coding-components/{Z6AJHTW4.js → 47OYLO7S.js} +2 -2
- package/dist/arcgis-coding-components/{FBVEF5NR.js → 5H27BQS4.js} +2 -2
- package/dist/arcgis-coding-components/{PRR5KOS4.js → 5U52XBHT.js} +2 -2
- package/dist/arcgis-coding-components/{WRMFW3PU.js → 6T2C3ZJS.js} +2 -2
- package/dist/arcgis-coding-components/{ESXQSD7A.js → BFGXKNTD.js} +3 -3
- package/dist/arcgis-coding-components/{V6XSS2WT.js → C4EIUFD4.js} +1 -1
- package/dist/arcgis-coding-components/{7NSF3PXP.js → CIC2MBYO.js} +2 -2
- package/dist/arcgis-coding-components/{WG4LIQ47.js → CPRH4MPV.js} +2 -2
- package/dist/arcgis-coding-components/{7252MA7S.js → EC76AJSP.js} +2 -2
- package/dist/arcgis-coding-components/{DC4CHF7W.js → EHBDOUTY.js} +2 -2
- package/dist/arcgis-coding-components/{VB6ORQZM.js → HBRPFDQK.js} +2 -2
- package/dist/arcgis-coding-components/{7ACPV5V2.js → IDVUO4XM.js} +2 -2
- package/dist/arcgis-coding-components/{SVC6J2DE.js → K6YNBPJU.js} +2 -2
- package/dist/arcgis-coding-components/{LWVJU2TB.js → L2MTURYK.js} +2 -2
- package/dist/arcgis-coding-components/{UDC3ATPR.js → LAMJDK53.js} +2 -2
- package/dist/arcgis-coding-components/LHZBG4RV.js +12 -0
- package/dist/arcgis-coding-components/{P6HD6APH.js → LKT7BADP.js} +1 -1
- package/dist/arcgis-coding-components/{77MY6AMZ.js → N7QVVK5X.js} +2 -2
- package/dist/arcgis-coding-components/{WGWENSFB.js → OSZTQ4K2.js} +2 -2
- package/dist/arcgis-coding-components/{C6XW2MT3.js → PDBJIWAH.js} +2 -2
- package/dist/arcgis-coding-components/PTRPND27.js +4 -0
- package/dist/arcgis-coding-components/{W3GFC524.js → R7TFWFWR.js} +2 -2
- package/dist/arcgis-coding-components/{KRSQQ5UL.js → RJQTOKGP.js} +2 -2
- package/dist/arcgis-coding-components/{V3N4TSTX.js → RWK4UVJJ.js} +2 -2
- package/dist/arcgis-coding-components/{TNFDDZLL.js → TSPXGECV.js} +2 -2
- package/dist/arcgis-coding-components/{26D2TEEA.js → UM4BQLXE.js} +1 -1
- package/dist/arcgis-coding-components/{BUX5A6M5.js → UUNHT6KS.js} +2 -2
- package/dist/arcgis-coding-components/{5QRWOYYV.js → WUK44TUN.js} +2 -2
- package/dist/arcgis-coding-components/XGQTZBOU.js +4 -0
- package/dist/arcgis-coding-components/{QR6WVNQI.js → Y3CXHFPS.js} +2 -2
- package/dist/arcgis-coding-components/{JTRK76CP.js → ZHVG5D5W.js} +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +29 -29
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +9 -9
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +14 -3
- package/dist/components/arcgis-arcade-editor/customElement.js +49 -30
- package/dist/components/arcgis-arcade-editor/index.d.ts +2 -0
- package/dist/components/arcgis-arcade-editor/index.js +2 -0
- package/dist/components/arcgis-arcade-results/customElement.d.ts +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +2 -2
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +3 -3
- package/dist/docs/api.json +30 -46
- package/dist/docs/docs.json +39 -25
- package/dist/docs/vscode.html-custom-data.json +0 -18
- package/dist/docs/web-types.json +7 -15
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +8 -7
- package/dist/types/stencil.d.ts +1 -1
- package/dist/utils/arcade-executor.d.ts +1 -1
- package/dist/utils/custom-panel.d.ts +23 -0
- package/dist/utils/profile/editor-profile.d.ts +3 -3
- package/dist/utils/profile/types.d.ts +2 -2
- package/package.json +7 -7
- package/dist/arcgis-coding-components/4HUHKO2F.js +0 -12
- package/dist/arcgis-coding-components/5KLMJERZ.js +0 -4
- package/dist/arcgis-coding-components/DITB2IHG.js +0 -4
|
@@ -4,7 +4,7 @@ import { g as m } from "./runtime.js";
|
|
|
4
4
|
import { CompletionItemKind as w, InsertTextMode as f, InsertTextFormat as d } from "vscode-languageserver-types";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
7
|
-
v4.32.0-next.
|
|
7
|
+
v4.32.0-next.85 */
|
|
8
8
|
async function S(e) {
|
|
9
9
|
const { apiVersion: s, bundles: t, hiddenApiItems: r } = e.toEditorProfileDefinition(), n = await g(e.dictionaryVariables);
|
|
10
10
|
return { apiVersion: s, bundles: t, variables: n, hiddenApiItems: r?.map((i) => i.toLowerCase()) };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { importArcade as C } from "@arcgis/core-adapter";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
v4.32.0-next.
|
|
4
|
+
v4.32.0-next.85 */
|
|
5
5
|
const G = "https://developers.arcgis.com/arcade/", O = 100, A = 100;
|
|
6
6
|
function u(t) {
|
|
7
7
|
return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.arcade.featureset.support.FeatureSet";
|
|
@@ -8,7 +8,7 @@ import { InsertTextFormat as y, DiagnosticSeverity as m, CompletionItemKind as o
|
|
|
8
8
|
import { debounce as F, Deferred as _ } from "@arcgis/components-utils";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
v4.32.0-next.
|
|
11
|
+
v4.32.0-next.85 */
|
|
12
12
|
const S = [
|
|
13
13
|
"<=",
|
|
14
14
|
">=",
|
|
@@ -2,7 +2,7 @@ import { importRequest as n } from "@arcgis/core-adapter";
|
|
|
2
2
|
import { isURL as i, hasSameOrigin as c } from "@arcgis/components-utils";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
5
|
-
v4.32.0-next.
|
|
5
|
+
v4.32.0-next.85 */
|
|
6
6
|
function a() {
|
|
7
7
|
return !!window.MonacoEnvironment?.getWorkerUrl;
|
|
8
8
|
}
|
package/dist/chunks/fields.js
CHANGED
|
@@ -8,7 +8,7 @@ import { filterApiLibraryForContext as le } from "@arcgis/languages-api-utils";
|
|
|
8
8
|
import { Emitter as x, Uri as $ } from "monaco-editor";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
v4.32.0-next.
|
|
11
|
+
v4.32.0-next.85 */
|
|
12
12
|
function W(t) {
|
|
13
13
|
return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && g(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
|
|
14
14
|
}
|
|
@@ -34,7 +34,7 @@ function w(t) {
|
|
|
34
34
|
return !!t && typeof t == "object" && "url" in t && typeof t.url == "string";
|
|
35
35
|
}
|
|
36
36
|
function pe(t) {
|
|
37
|
-
return w(t) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url);
|
|
37
|
+
return w(t) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url ?? "");
|
|
38
38
|
}
|
|
39
39
|
function Le(t) {
|
|
40
40
|
return w(t) || g(t) || O(t);
|
|
@@ -357,10 +357,10 @@ class J extends v {
|
|
|
357
357
|
super(e, i), this.relationshipsProperties = r, this._source = null, this._loaded = !1, this._definition = i.declaration?.definition;
|
|
358
358
|
}
|
|
359
359
|
get title() {
|
|
360
|
-
return m(this._source) ? this._source.title : "";
|
|
360
|
+
return m(this._source) ? this._source.title ?? "" : "";
|
|
361
361
|
}
|
|
362
362
|
get url() {
|
|
363
|
-
return fe(this._source) ? this._source.url : "";
|
|
363
|
+
return fe(this._source) ? this._source.url ?? "" : "";
|
|
364
364
|
}
|
|
365
365
|
get informationUrl() {
|
|
366
366
|
return !this.loaded || !this.url ? null : R(this._source) ? `${this.url}/${this._source.layerId}` : this.url;
|
|
@@ -519,7 +519,7 @@ class J extends v {
|
|
|
519
519
|
if (!_e(e))
|
|
520
520
|
return null;
|
|
521
521
|
const i = new l(this._profile, { code: "relationships" }), r = await Promise.all(
|
|
522
|
-
e.relationships
|
|
522
|
+
e.relationships?.map(async (s) => {
|
|
523
523
|
const n = await we(e, s);
|
|
524
524
|
if (!W(n) || s.relatedTableId === this.relationshipsProperties?.sourceTableId)
|
|
525
525
|
return null;
|
|
@@ -536,7 +536,7 @@ class J extends v {
|
|
|
536
536
|
[new a({ profile: this._profile, label: u, description: "", snippet: u })],
|
|
537
537
|
{ exposeRelationships: !0, sourceTableId: e.layerId }
|
|
538
538
|
);
|
|
539
|
-
})
|
|
539
|
+
}) ?? []
|
|
540
540
|
);
|
|
541
541
|
return i.variables = r.filter(C), i.variables.length ? i : null;
|
|
542
542
|
}
|
|
@@ -702,8 +702,8 @@ class Fe extends v {
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
async _featureSetCollectionFromUrl(e) {
|
|
705
|
-
let i = e
|
|
706
|
-
if (i = i
|
|
705
|
+
let i = e?.replace(/\/featureserver\/[0-9]*/iu, "/FeatureServer");
|
|
706
|
+
if (i = i?.replace(/\/mapserver\/[0-9]*/iu, "/MapServer"), i = i?.split("?")[0], !i)
|
|
707
707
|
return null;
|
|
708
708
|
const r = await ge(i), s = Promise.all(
|
|
709
709
|
r.layers.map(async (p) => {
|
|
@@ -736,7 +736,7 @@ class Fe extends v {
|
|
|
736
736
|
this,
|
|
737
737
|
{
|
|
738
738
|
profile: this._profile,
|
|
739
|
-
declaration: { name: e.title, definition: e },
|
|
739
|
+
declaration: { name: e.title ?? "", definition: e },
|
|
740
740
|
label: i ? e.title : e.sourceJSON.name ?? e.title,
|
|
741
741
|
description: "",
|
|
742
742
|
nonInteractive: !0
|
package/dist/chunks/markdown.js
CHANGED
|
@@ -4,7 +4,7 @@ import { IStandaloneThemeService as G } from "monaco-editor/esm/vs/editor/standa
|
|
|
4
4
|
import { generateTokensCSSForColorMap as te } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
7
|
-
v4.32.0-next.
|
|
7
|
+
v4.32.0-next.85 */
|
|
8
8
|
async function ne(l) {
|
|
9
9
|
return await (await ee()).colorize(l, "arcade", { tabSize: 2 });
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme";
|
|
|
5
5
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
|
|
6
6
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
7
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
8
|
-
v4.32.0-next.
|
|
8
|
+
v4.32.0-next.85 */
|
|
9
9
|
function g(r, t, n, m) {
|
|
10
10
|
if (!t)
|
|
11
11
|
return [];
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeRuntime as t } from "@arcgis/lumina";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
v4.32.0-next.
|
|
4
|
+
v4.32.0-next.85 */
|
|
5
5
|
const s = t({ defaultAssetPath: "https://jsdev.arcgis.com/coding-components/next/", hydratedAttribute: "hydrated" }), { customElement: a, getAssetPath: o, setAssetPath: m } = s;
|
|
6
6
|
export {
|
|
7
7
|
a as c,
|
|
@@ -4,7 +4,7 @@ import { fetchT9nStringsBundle as M } from "@arcgis/components-utils";
|
|
|
4
4
|
import { g as b } from "./runtime.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
7
|
-
v4.32.0-next.
|
|
7
|
+
v4.32.0-next.85 */
|
|
8
8
|
const x = (r) => {
|
|
9
9
|
const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
|
|
10
10
|
return {
|
|
@@ -7,7 +7,7 @@ import { Deferred as _, debounce as N } from "@arcgis/components-utils";
|
|
|
7
7
|
import { a as d } from "./sql-expr-defaults.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
10
|
-
v4.32.0-next.
|
|
10
|
+
v4.32.0-next.85 */
|
|
11
11
|
let h = new _();
|
|
12
12
|
class k {
|
|
13
13
|
constructor(e) {
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/components-controllers";
|
|
|
2
2
|
import { g as t } from "./runtime.js";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
5
|
-
v4.32.0-next.
|
|
5
|
+
v4.32.0-next.85 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
|
@@ -9,9 +9,13 @@ import { IEditorProfileDefinition, IPredefinedProfile } from '../../utils/profil
|
|
|
9
9
|
import { EditorProfile } from '../../utils/profile/editor-profile';
|
|
10
10
|
import { ArcadeResult, IEditorTestContext } from '../../utils/arcade-executor';
|
|
11
11
|
import { ResultPanelName } from '../arcgis-arcade-results/customElement.js';
|
|
12
|
+
import { ICustomPanel } from '../../utils/custom-panel';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type SidePanelName = "api" | "none" | "suggestions" | "variables";
|
|
15
|
+
type WithCustomPanels = {
|
|
16
|
+
customPanels?: ICustomPanel[];
|
|
17
|
+
};
|
|
18
|
+
export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> extends LitElement {
|
|
15
19
|
/**
|
|
16
20
|
* Options to update on the editor.
|
|
17
21
|
* For example:
|
|
@@ -29,7 +33,7 @@ export declare class ArcgisArcadeEditor extends LitElement {
|
|
|
29
33
|
/** If true, it will hide the side actions bar. The editor will be in a minimalistic UX. */
|
|
30
34
|
hideSideBar: boolean;
|
|
31
35
|
/** The name of the opened side panel. 'none' means 'no panel opened'. */
|
|
32
|
-
openedSidePanel: SidePanelName;
|
|
36
|
+
openedSidePanel: T extends Required<WithCustomPanels> ? SidePanelName : string;
|
|
33
37
|
/**
|
|
34
38
|
* The profile contains metadata used by the editor for editing context and help.
|
|
35
39
|
* Example:
|
|
@@ -57,6 +61,12 @@ export declare class ArcgisArcadeEditor extends LitElement {
|
|
|
57
61
|
suggestions: IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined;
|
|
58
62
|
/** Test data used to execute the script in the editor. If undefined the execute script UX will be hidden. */
|
|
59
63
|
testData: IEditorTestContext | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Custom panels to be displayed in the side panel.
|
|
66
|
+
* Will be placed below the default panels but above the help panel.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
customPanels: ICustomPanel[] | undefined;
|
|
60
70
|
/** @deprecated Use `script` property instead. */
|
|
61
71
|
getScript(): Promise<string | undefined>;
|
|
62
72
|
/** Returns the Arcade result for the script for the provided test data. */
|
|
@@ -68,3 +78,4 @@ export declare class ArcgisArcadeEditor extends LitElement {
|
|
|
68
78
|
/** Emitted when the script string has changed. */
|
|
69
79
|
readonly arcgisScriptChange: TargetedEvent<this, string>;
|
|
70
80
|
}
|
|
81
|
+
export {};
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { html as t, nothing as
|
|
3
|
-
import { KeyCode as
|
|
1
|
+
import { g as u, c as g } from "../../chunks/runtime.js";
|
|
2
|
+
import { html as t, nothing as r } from "lit";
|
|
3
|
+
import { KeyCode as _ } from "monaco-editor";
|
|
4
4
|
import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme";
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { Deferred as
|
|
9
|
-
import { D as
|
|
10
|
-
import { s as
|
|
7
|
+
import { LitElement as m, createEvent as c, noShadowRoot as f } from "@arcgis/lumina";
|
|
8
|
+
import { Deferred as x, generateGuid as b } from "@arcgis/components-utils";
|
|
9
|
+
import { D as v, e as l } from "../../chunks/arcade-executor.js";
|
|
10
|
+
import { s as P, a as w } from "../../chunks/arcade-service-accessors.js";
|
|
11
11
|
import { b as s } from "../../chunks/arcade-defaults.js";
|
|
12
|
-
import { u as
|
|
13
|
-
import { createRef as
|
|
14
|
-
import { css as
|
|
12
|
+
import { u as S } from "../../chunks/useT9n.js";
|
|
13
|
+
import { createRef as E, ref as A } from "lit-html/directives/ref.js";
|
|
14
|
+
import { css as $ } from "@lit/reactive-element/css-tag.js";
|
|
15
15
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
16
16
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
17
|
-
v4.32.0-next.
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
v4.32.0-next.85 */
|
|
18
|
+
const y = (n) => {
|
|
19
|
+
if (!n.toString().includes("calcite-flow-item"))
|
|
20
|
+
throw new Error("Renderer must return a JSX node that starts with <calcite-flow-item>");
|
|
21
|
+
return !0;
|
|
22
|
+
}, D = $`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`;
|
|
23
|
+
class C extends m {
|
|
20
24
|
constructor() {
|
|
21
|
-
super(...arguments), this._codeEditorElt =
|
|
25
|
+
super(...arguments), this._codeEditorElt = E(), this._componentReadyDefer = new x(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = S(), this._modelId = b(), this._openArcadeHelp = () => void window.open(v, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
22
26
|
if (!e.target)
|
|
23
27
|
return;
|
|
24
28
|
const i = e.target?.dataset.panelName ?? "none";
|
|
25
29
|
this.openedSidePanel = i === this.openedSidePanel ? "none" : i, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(console.error);
|
|
26
|
-
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange =
|
|
30
|
+
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = c({ bubbles: !1 }), this.arcgisScriptChange = c({ bubbles: !1 });
|
|
27
31
|
}
|
|
28
32
|
static {
|
|
29
|
-
this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel:
|
|
33
|
+
this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 2, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0 };
|
|
30
34
|
}
|
|
31
35
|
static {
|
|
32
36
|
this.shadowRootOptions = f;
|
|
33
37
|
}
|
|
34
38
|
static {
|
|
35
|
-
this.styles =
|
|
39
|
+
this.styles = D;
|
|
36
40
|
}
|
|
37
41
|
// #endregion
|
|
38
42
|
// #region Public Properties
|
|
@@ -69,7 +73,7 @@ class y extends _ {
|
|
|
69
73
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
70
74
|
await this._componentReadyDefer.promise;
|
|
71
75
|
const i = this._codeEditorElt.value?.value;
|
|
72
|
-
return await
|
|
76
|
+
return await l(e.definition, i, this.testData);
|
|
73
77
|
}
|
|
74
78
|
/** Set the focus on the element. */
|
|
75
79
|
async setFocus() {
|
|
@@ -78,8 +82,8 @@ class y extends _ {
|
|
|
78
82
|
// #endregion
|
|
79
83
|
// #region Lifecycle
|
|
80
84
|
async load() {
|
|
81
|
-
const e =
|
|
82
|
-
|
|
85
|
+
const e = u("./assets");
|
|
86
|
+
P(e), await this._updateEditorProfile();
|
|
83
87
|
}
|
|
84
88
|
willUpdate(e) {
|
|
85
89
|
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && s.updateApiContextForModel(this._modelId, {
|
|
@@ -89,7 +93,7 @@ class y extends _ {
|
|
|
89
93
|
/** This lifecycle method is not expected to return a promise. The returned promise will be ignored by Lit rather than awaited. */
|
|
90
94
|
async loaded() {
|
|
91
95
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
92
|
-
const e = await
|
|
96
|
+
const e = await w();
|
|
93
97
|
this._disposables.push(e.onDiagnosticsChange((i) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(i.diagnostics))), this.testData && this._addExecuteScriptAction(), await this._codeEditorElt.value?.setFocus();
|
|
94
98
|
}
|
|
95
99
|
disconnectedCallback() {
|
|
@@ -131,7 +135,7 @@ class y extends _ {
|
|
|
131
135
|
}
|
|
132
136
|
this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => void (async () => {
|
|
133
137
|
const a = this._codeEditorElt.value?.value;
|
|
134
|
-
this._executionResult = await
|
|
138
|
+
this._executionResult = await l(i.definition, a, e, (o) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, o], 0)), this._executingScript = !1;
|
|
135
139
|
})(), 0);
|
|
136
140
|
}
|
|
137
141
|
_toggleShowExecutionPanel() {
|
|
@@ -147,7 +151,10 @@ class y extends _ {
|
|
|
147
151
|
this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error);
|
|
148
152
|
}
|
|
149
153
|
_insertAsText(e) {
|
|
150
|
-
this.
|
|
154
|
+
this._insertText(e.detail);
|
|
155
|
+
}
|
|
156
|
+
_insertText(e) {
|
|
157
|
+
this._codeEditorElt.value?.insertText(e).catch(console.error);
|
|
151
158
|
}
|
|
152
159
|
_onResultPanelChange(e) {
|
|
153
160
|
this._resultPanel = e.detail;
|
|
@@ -160,7 +167,7 @@ class y extends _ {
|
|
|
160
167
|
// An unique identifier for the action.
|
|
161
168
|
id: "run-script",
|
|
162
169
|
label: "Run Arcade Expression",
|
|
163
|
-
keybindings: [
|
|
170
|
+
keybindings: [_.F5],
|
|
164
171
|
contextMenuGroupId: "code",
|
|
165
172
|
contextMenuOrder: 1,
|
|
166
173
|
run: () => {
|
|
@@ -182,8 +189,8 @@ class y extends _ {
|
|
|
182
189
|
renderMainPanel() {
|
|
183
190
|
return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${A(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
184
191
|
}
|
|
185
|
-
renderAction({ id: e, label: i, icon: a, active: o, panelName:
|
|
186
|
-
return t`<calcite-action id=${e ??
|
|
192
|
+
renderAction({ id: e, label: i, icon: a, active: o, panelName: d, iconFlipRtl: h = !1, onClick: p = this._toggleSidePanel }) {
|
|
193
|
+
return t`<calcite-action id=${e ?? r} .text=${i} .icon=${a} .active=${o} @click=${p} data-panel-name=${d ?? r} .iconFlipRtl=${h}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>` || ""}`;
|
|
187
194
|
}
|
|
188
195
|
renderSideActionBar() {
|
|
189
196
|
return this.hideSideBar ? null : t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
@@ -204,7 +211,13 @@ class y extends _ {
|
|
|
204
211
|
icon: "lightbulb",
|
|
205
212
|
active: this.openedSidePanel === "suggestions",
|
|
206
213
|
panelName: "suggestions"
|
|
207
|
-
}) : null}${this.
|
|
214
|
+
}) : null}${this.customPanels?.map((e) => this.renderAction({
|
|
215
|
+
id: e.id,
|
|
216
|
+
label: e.name,
|
|
217
|
+
icon: e.icon,
|
|
218
|
+
active: this.openedSidePanel === e.id,
|
|
219
|
+
panelName: e.id
|
|
220
|
+
}))}${this.hideDocumentationActions ? null : this.renderAction({
|
|
208
221
|
id: "developer-website-action",
|
|
209
222
|
label: this.messages.help ?? "",
|
|
210
223
|
icon: "question",
|
|
@@ -224,9 +237,15 @@ class y extends _ {
|
|
|
224
237
|
return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;
|
|
225
238
|
case "suggestions":
|
|
226
239
|
return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;
|
|
227
|
-
|
|
240
|
+
case "none":
|
|
228
241
|
return null;
|
|
229
242
|
}
|
|
243
|
+
const e = this.customPanels?.find((i) => i.id === this.openedSidePanel);
|
|
244
|
+
if (e) {
|
|
245
|
+
const i = !!e?.useFlows;
|
|
246
|
+
return t`<calcite-flow class="side-panel flex-panel border-inline-start">${i && y(e.renderer) ? e.renderer({ closePanel: this._toggleSidePanel, insertText: this._insertText.bind(this) }) : t`<calcite-flow-item .heading=${e.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${e.description}>${e.renderer({ closePanel: this._toggleSidePanel, insertText: this._insertText.bind(this) })}</calcite-flow-item>`}</calcite-flow>`;
|
|
247
|
+
}
|
|
248
|
+
return null;
|
|
230
249
|
}
|
|
231
250
|
renderResultsPanel() {
|
|
232
251
|
return this._showExecutionPanel ? t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>` : null;
|
|
@@ -235,7 +254,7 @@ class y extends _ {
|
|
|
235
254
|
return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`;
|
|
236
255
|
}
|
|
237
256
|
}
|
|
238
|
-
|
|
257
|
+
g("arcgis-arcade-editor", C);
|
|
239
258
|
export {
|
|
240
|
-
|
|
259
|
+
C as ArcgisArcadeEditor
|
|
241
260
|
};
|
|
@@ -6,5 +6,7 @@ import "@esri/calcite-components/components/calcite-tooltip";
|
|
|
6
6
|
import "../arcgis-language-api-panel/index.js";
|
|
7
7
|
import "../arcgis-editor-variables/index.js";
|
|
8
8
|
import "../arcgis-arcade-suggestions/index.js";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-flow";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-flow-item";
|
|
9
11
|
import "../arcgis-arcade-results/index.js";
|
|
10
12
|
export * from "./customElement.js";
|
|
@@ -6,5 +6,7 @@ import "@esri/calcite-components/components/calcite-tooltip";
|
|
|
6
6
|
import "../arcgis-language-api-panel/index.js";
|
|
7
7
|
import "../arcgis-editor-variables/index.js";
|
|
8
8
|
import "../arcgis-arcade-suggestions/index.js";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-flow";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-flow-item";
|
|
9
11
|
import "../arcgis-arcade-results/index.js";
|
|
10
12
|
export * from "./customElement.js";
|
|
@@ -8,7 +8,7 @@ export declare class ArcgisArcadeResults extends LitElement {
|
|
|
8
8
|
/** The console logs from the execution of an Arcade expression */
|
|
9
9
|
consoleLogs: string[] | undefined;
|
|
10
10
|
/** Loading state */
|
|
11
|
-
loading
|
|
11
|
+
loading?: boolean;
|
|
12
12
|
/** The result panel displayed */
|
|
13
13
|
openedResultPanel: ResultPanelName;
|
|
14
14
|
/** The results from the execution of an Arcade expression */
|
|
@@ -8,7 +8,7 @@ import { u as M } from "../../chunks/useT9n.js";
|
|
|
8
8
|
import { css as C } from "@lit/reactive-element/css-tag.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
v4.32.0-next.
|
|
11
|
+
v4.32.0-next.85 */
|
|
12
12
|
const A = C`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[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)}.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)}.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;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,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);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, a = {
|
|
13
13
|
lines: !0,
|
|
14
14
|
selectionMode: "none",
|
|
@@ -63,7 +63,7 @@ function I(l) {
|
|
|
63
63
|
}
|
|
64
64
|
class L extends w {
|
|
65
65
|
constructor() {
|
|
66
|
-
super(...arguments), this.messages = M(), this.
|
|
66
|
+
super(...arguments), this.messages = M(), this.openedResultPanel = "output", this.arcgisClose = $({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = $({ bubbles: !1 });
|
|
67
67
|
}
|
|
68
68
|
static {
|
|
69
69
|
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
|
|
@@ -9,7 +9,7 @@ import { u as b } from "../../chunks/useT9n.js";
|
|
|
9
9
|
import { css as _ } from "@lit/reactive-element/css-tag.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
v4.32.0-next.
|
|
12
|
+
v4.32.0-next.85 */
|
|
13
13
|
function v(o) {
|
|
14
14
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
15
|
}
|
|
@@ -13,7 +13,7 @@ import { css as C } from "@lit/reactive-element/css-tag.js";
|
|
|
13
13
|
import { load as b } from "@arcgis/components-controllers";
|
|
14
14
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
15
15
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
16
|
-
v4.32.0-next.
|
|
16
|
+
v4.32.0-next.85 */
|
|
17
17
|
c.register({
|
|
18
18
|
id: n.languageId,
|
|
19
19
|
aliases: ["Arcade", "arcade"],
|
|
@@ -7,7 +7,7 @@ import { u as f } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as m } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
10
|
-
v4.32.0-next.
|
|
10
|
+
v4.32.0-next.85 */
|
|
11
11
|
const u = m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -9,7 +9,7 @@ import { u as _ } from "../../chunks/useT9n.js";
|
|
|
9
9
|
import { css as b } from "@lit/reactive-element/css-tag.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
v4.32.0-next.
|
|
12
|
+
v4.32.0-next.85 */
|
|
13
13
|
const v = b`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
14
|
class y extends u {
|
|
15
15
|
constructor() {
|
|
@@ -8,7 +8,7 @@ import { createRef as l, ref as p } from "lit-html/directives/ref.js";
|
|
|
8
8
|
import { css as h } from "@lit/reactive-element/css-tag.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
v4.32.0-next.
|
|
11
|
+
v4.32.0-next.85 */
|
|
12
12
|
const g = h`arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}`;
|
|
13
13
|
class f extends s {
|
|
14
14
|
constructor() {
|
|
@@ -7,7 +7,7 @@ import { u as m } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
10
|
-
v4.32.0-next.
|
|
10
|
+
v4.32.0-next.85 */
|
|
11
11
|
const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
12
12
|
class f extends r {
|
|
13
13
|
constructor() {
|
|
@@ -53,9 +53,9 @@ class f extends r {
|
|
|
53
53
|
// #region Rendering
|
|
54
54
|
render() {
|
|
55
55
|
const t = n.getFeatureLayerForModel(this.modelId ?? "");
|
|
56
|
-
return this.loading || !this.modelId || !t ? i`<calcite-block .heading=${this.messages.availablefields ?? ""}></calcite-block>` : i`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields ?? ""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields, (e) => e.name, (e) => i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias} .value=${e.name}>${e.domain && i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${() => {
|
|
56
|
+
return this.loading || !this.modelId || !t ? i`<calcite-block .heading=${this.messages.availablefields ?? ""}></calcite-block>` : i`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields ?? ""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields, (e) => e.name, (e) => i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias ?? ""} .value=${e.name}>${e.domain && i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${() => {
|
|
57
57
|
const s = e.domain;
|
|
58
|
-
s
|
|
58
|
+
s?.type === "coded-value" && (this._flowItemRenderers = [
|
|
59
59
|
...this._flowItemRenderers,
|
|
60
60
|
() => i`<calcite-flow-item closable .heading=${this.messages.domainvalues ?? ""} .description=${e.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${a(s.codedValues, (l) => l.code, (l) => i`<calcite-list-item @click=${this._handleSelectDomain} .label=${l.name} .description=${String(l.code)} .value=${String(l.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`
|
|
61
61
|
]);
|