@arcgis/coding-components 4.32.0-next.82 → 4.32.0-next.84
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/{DWLMIJ63.js → 2PGXQJD2.js} +2 -2
- package/dist/arcgis-coding-components/{CF3HZP3O.js → 34FFTPGY.js} +2 -2
- package/dist/arcgis-coding-components/{JJN23KC2.js → 3ZS345BU.js} +2 -2
- package/dist/arcgis-coding-components/{YLRI6BEO.js → 4PICOR24.js} +2 -2
- package/dist/arcgis-coding-components/{UQUPQSOQ.js → 4QY7CHXX.js} +2 -2
- package/dist/arcgis-coding-components/{3WXPIGGG.js → 4U3HRYKK.js} +1 -1
- package/dist/arcgis-coding-components/{SCCISGRG.js → 55GT7ULQ.js} +2 -2
- package/dist/arcgis-coding-components/{UIMZHCNB.js → 5HQD4SEF.js} +2 -2
- package/dist/arcgis-coding-components/{G2VY7CGM.js → 6LUBBG2N.js} +2 -2
- package/dist/arcgis-coding-components/{4XB363EE.js → 76N7QCJ6.js} +2 -2
- package/dist/arcgis-coding-components/{HLXBRVSG.js → 7CROQMNG.js} +1 -1
- package/dist/arcgis-coding-components/{5BMIP2BK.js → 7QCIBSWF.js} +1 -1
- package/dist/arcgis-coding-components/{5IKBSX4T.js → BYM3DDKJ.js} +2 -2
- package/dist/arcgis-coding-components/{Q2N7N2RH.js → C5N4BJ5X.js} +2 -2
- package/dist/arcgis-coding-components/{UAE6KYHE.js → CDGGUMYZ.js} +2 -2
- package/dist/arcgis-coding-components/{LFRTYDXD.js → DXKIQQFU.js} +2 -2
- package/dist/arcgis-coding-components/{JLYOF467.js → GEHXKKNK.js} +2 -2
- package/dist/arcgis-coding-components/{U5TNOUI2.js → HZ2I4EZ6.js} +2 -2
- package/dist/arcgis-coding-components/{4U6OI5N4.js → I6G5RWRV.js} +2 -2
- package/dist/arcgis-coding-components/{GC2V4FLC.js → IJWZ2C4G.js} +2 -2
- package/dist/arcgis-coding-components/{IIFHBZ2W.js → JVLYMMQM.js} +2 -2
- package/dist/arcgis-coding-components/{3HV4LOKN.js → KDDODFMF.js} +2 -2
- package/dist/arcgis-coding-components/{SHSIJA2S.js → KLE7VSIC.js} +2 -2
- package/dist/arcgis-coding-components/{4LVEFZC3.js → LIHVPH5O.js} +1 -1
- package/dist/arcgis-coding-components/{EJQBRYAZ.js → LZP6K7IC.js} +2 -2
- package/dist/arcgis-coding-components/{2Y5DC7AJ.js → MRKG254N.js} +2 -2
- package/dist/arcgis-coding-components/{QMLGEU5Y.js → RE6RBJJS.js} +2 -2
- package/dist/arcgis-coding-components/UHJELEGL.js +4 -0
- package/dist/arcgis-coding-components/{OUWLOVPP.js → VGL2ZEKS.js} +2 -2
- package/dist/arcgis-coding-components/{F6AWPPXY.js → VM4NS5TR.js} +2 -2
- package/dist/arcgis-coding-components/{T5YUD6EL.js → X44UIUQV.js} +2 -2
- package/dist/arcgis-coding-components/{XNGHHVTY.js → Z2T2GNL7.js} +3 -3
- package/dist/arcgis-coding-components/{GTKG7BKI.js → Z3H2ERUB.js} +2 -2
- package/dist/arcgis-coding-components/{7K3JR3EJ.js → ZGS4LC3Y.js} +2 -2
- package/dist/arcgis-coding-components/{J3HJW37E.js → ZMOE7YCI.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 +1 -1
- 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.js +1 -1
- 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 +1 -1
- 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/custom-panel.d.ts +23 -0
- package/package.json +7 -7
- package/dist/arcgis-coding-components/X6TENK5P.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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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
|
}
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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 @@ 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.84 */
|
|
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",
|
|
@@ -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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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.84 */
|
|
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() {
|
package/dist/docs/api.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-01-
|
|
2
|
+
"timestamp": "2025-01-16T04:57:13",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@arcgis/lumina-compiler",
|
|
5
|
-
"version": "4.32.0-next.
|
|
5
|
+
"version": "4.32.0-next.84",
|
|
6
6
|
"typescriptVersion": "5.6.3"
|
|
7
7
|
},
|
|
8
8
|
"schemaVersion": "1.0.0",
|
|
@@ -55,6 +55,28 @@
|
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "field",
|
|
60
|
+
"name": "customPanels",
|
|
61
|
+
"description": "Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.",
|
|
62
|
+
"type": {
|
|
63
|
+
"text": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n }) => JsxNode;\n}>)",
|
|
64
|
+
"references": [
|
|
65
|
+
{
|
|
66
|
+
"name": "Array",
|
|
67
|
+
"package": "typescript",
|
|
68
|
+
"module": "lib/lib.es5.d.ts",
|
|
69
|
+
"start": 1,
|
|
70
|
+
"end": 6
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"docsTags": [
|
|
75
|
+
{
|
|
76
|
+
"name": "internal"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
58
80
|
{
|
|
59
81
|
"kind": "field",
|
|
60
82
|
"name": "editorOptions",
|
|
@@ -258,28 +280,17 @@
|
|
|
258
280
|
"name": "openedSidePanel",
|
|
259
281
|
"description": "The name of the opened side panel. 'none' means 'no panel opened'.",
|
|
260
282
|
"type": {
|
|
261
|
-
"text": "\"
|
|
262
|
-
"
|
|
263
|
-
{
|
|
264
|
-
"value": "api",
|
|
265
|
-
"type": "string"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"value": "none",
|
|
269
|
-
"type": "string"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"value": "suggestions",
|
|
273
|
-
"type": "string"
|
|
274
|
-
},
|
|
283
|
+
"text": "T extends {\n customPanels: Array<ICustomPanel>;\n} ? \"none\" | \"variables\" | \"suggestions\" | \"api\" : string",
|
|
284
|
+
"references": [
|
|
275
285
|
{
|
|
276
|
-
"
|
|
277
|
-
"
|
|
286
|
+
"name": "T",
|
|
287
|
+
"module": "dist/components/arcgis-arcade-editor/customElement.d.ts",
|
|
288
|
+
"start": 0,
|
|
289
|
+
"end": 1
|
|
278
290
|
}
|
|
279
291
|
]
|
|
280
292
|
},
|
|
281
293
|
"default": "\"none\"",
|
|
282
|
-
"attribute": "opened-side-panel",
|
|
283
294
|
"reflects": true
|
|
284
295
|
},
|
|
285
296
|
{
|
|
@@ -478,33 +489,6 @@
|
|
|
478
489
|
"default": "false",
|
|
479
490
|
"fieldName": "hideSideBar"
|
|
480
491
|
},
|
|
481
|
-
{
|
|
482
|
-
"name": "opened-side-panel",
|
|
483
|
-
"description": "The name of the opened side panel. 'none' means 'no panel opened'.",
|
|
484
|
-
"type": {
|
|
485
|
-
"text": "\"api\" | \"none\" | \"suggestions\" | \"variables\"",
|
|
486
|
-
"values": [
|
|
487
|
-
{
|
|
488
|
-
"value": "api",
|
|
489
|
-
"type": "string"
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
"value": "none",
|
|
493
|
-
"type": "string"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"value": "suggestions",
|
|
497
|
-
"type": "string"
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
"value": "variables",
|
|
501
|
-
"type": "string"
|
|
502
|
-
}
|
|
503
|
-
]
|
|
504
|
-
},
|
|
505
|
-
"default": "\"none\"",
|
|
506
|
-
"fieldName": "openedSidePanel"
|
|
507
|
-
},
|
|
508
492
|
{
|
|
509
493
|
"name": "script",
|
|
510
494
|
"description": "The arcade script. Use this property to define or update the script.",
|