@arcgis/coding-components 4.33.0-next.108 → 4.33.0-next.109
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/{O3S3BNYB.js → 3Y2627CP.js} +2 -2
- package/dist/arcgis-coding-components/4A3KCIXJ.js +4 -0
- package/dist/arcgis-coding-components/{XL6KMO7X.js → 4SUM77G6.js} +1 -1
- package/dist/arcgis-coding-components/{ZYARY2JU.js → 5GXT7DJI.js} +2 -2
- package/dist/arcgis-coding-components/{NCKJQ3U6.js → 5OWQWSH2.js} +2 -2
- package/dist/arcgis-coding-components/{MBVDHIQ4.js → 5RHYT4EO.js} +2 -2
- package/dist/arcgis-coding-components/7FZREYXQ.js +4 -0
- package/dist/arcgis-coding-components/{KYH6EKEI.js → A7YPVNT3.js} +2 -2
- package/dist/arcgis-coding-components/{EZSWCZ3M.js → ASUGUWIA.js} +2 -2
- package/dist/arcgis-coding-components/{OIMKTO3K.js → CAF3USPW.js} +2 -2
- package/dist/arcgis-coding-components/{XDDYJJ22.js → CBXJNCJJ.js} +2 -2
- package/dist/arcgis-coding-components/{UDCDJQAM.js → CHNBIC2D.js} +2 -2
- package/dist/arcgis-coding-components/{M4EZ4JBR.js → CJPSVHWK.js} +1 -1
- package/dist/arcgis-coding-components/{H3GUZYV5.js → CJUW3OWD.js} +1 -1
- package/dist/arcgis-coding-components/{4VFAHLL6.js → CQW3LRXV.js} +2 -2
- package/dist/arcgis-coding-components/{KIIOI5RF.js → DD7AXDL6.js} +2 -2
- package/dist/arcgis-coding-components/DI6P2I7I.js +4 -0
- package/dist/arcgis-coding-components/{V4MOUEGT.js → DZ4GBFBV.js} +3 -3
- package/dist/arcgis-coding-components/F42UBPX3.js +4 -0
- package/dist/arcgis-coding-components/{QY4F3GGW.js → FIAZXQHO.js} +2 -2
- package/dist/arcgis-coding-components/{BNO6Z3AS.js → HN74GEMZ.js} +2 -2
- package/dist/arcgis-coding-components/{XD72XLNN.js → IGSRT6OY.js} +2 -2
- package/dist/arcgis-coding-components/{4VFAHLL6.js.LEGAL.txt → JGYVWIOL.js} +2 -1
- package/dist/arcgis-coding-components/{UZXS4UBU.js → JQZ3ODVW.js} +3 -3
- package/dist/arcgis-coding-components/{MZZB4GLZ.js → LCQ5LRWZ.js} +2 -2
- package/dist/arcgis-coding-components/{E3FMA3ES.js → LDIBFNEC.js} +1 -1
- package/dist/arcgis-coding-components/{5G4YG4SD.js → LIXQY7SR.js} +2 -2
- package/dist/arcgis-coding-components/{EBVJNGWI.js → MAMMTDKU.js} +2 -2
- package/dist/arcgis-coding-components/{XOFMPNEM.js → O7XUDENI.js} +2 -2
- package/dist/arcgis-coding-components/{CZALMTK7.js → QCHXYFBQ.js} +2 -2
- package/dist/arcgis-coding-components/{2WBROC2A.js → QJDMPVG5.js} +2 -2
- package/dist/arcgis-coding-components/{L5V4S637.js → RFKIPQPL.js} +2 -2
- package/dist/arcgis-coding-components/SZRBHPBE.js +4 -0
- package/dist/arcgis-coding-components/TQ5ZBIWK.js +4 -0
- package/dist/arcgis-coding-components/{J4TFTQXK.js → TRO4CFSW.js} +2 -2
- package/dist/arcgis-coding-components/{OQK7HGGS.js → U4U7ILCC.js} +2 -2
- package/dist/arcgis-coding-components/{7C6SE75I.js → WZOYYLIE.js} +2 -2
- package/dist/arcgis-coding-components/{INEHEWNR.js → XGDCD4ZA.js} +2 -2
- package/dist/arcgis-coding-components/{OGBCV7X3.js → YGTVYPV4.js} +3 -3
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +39 -39
- 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/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.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-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +39 -45
- package/dist/components/arcgis-arcade-results/customElement.js +109 -120
- package/dist/components/arcgis-arcade-results/functional.d.ts +73 -0
- package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +2 -0
- package/dist/components/arcgis-arcade-suggestions/customElement.js +4 -4
- package/dist/components/arcgis-code-editor/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.d.ts +2 -0
- package/dist/components/arcgis-editor-variables/customElement.js +7 -7
- package/dist/components/arcgis-language-api-panel/customElement.d.ts +2 -0
- package/dist/components/arcgis-language-api-panel/customElement.js +12 -10
- package/dist/components/arcgis-sql-expression-editor/customElement.js +12 -12
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +3 -3
- package/dist/docs/docs.json +5 -5
- package/dist/docs/web-types.json +2 -2
- package/dist/index.js +1 -1
- package/dist/loader.js +4 -4
- package/dist/utils/arcade-executor.d.ts +4 -0
- package/dist/utils/custom-panel.d.ts +2 -1
- package/package.json +6 -6
- package/dist/arcgis-coding-components/2WBROC2A.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/36MPUWKL.js +0 -4
- package/dist/arcgis-coding-components/36MPUWKL.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/5G4YG4SD.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/7C6SE75I.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/BNO6Z3AS.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/BRYLGLUS.js +0 -4
- package/dist/arcgis-coding-components/BRYLGLUS.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/CZALMTK7.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/E3FMA3ES.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/EBVJNGWI.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/EZSWCZ3M.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/H3GUZYV5.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/INEHEWNR.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/J4TFTQXK.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/JMRXL5TG.js +0 -4
- package/dist/arcgis-coding-components/JMRXL5TG.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/KIIOI5RF.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/KYH6EKEI.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/L5V4S637.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/LOKYTCK6.js +0 -4
- package/dist/arcgis-coding-components/LOKYTCK6.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/M4EZ4JBR.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/MBVDHIQ4.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/MZZB4GLZ.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/NCKJQ3U6.js.LEGAL.txt +0 -12
- package/dist/arcgis-coding-components/NSLPKDYP.css.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/O3S3BNYB.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/OGBCV7X3.js.LEGAL.txt +0 -69
- package/dist/arcgis-coding-components/OIMKTO3K.js.LEGAL.txt +0 -145
- package/dist/arcgis-coding-components/OQK7HGGS.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/QJN5BRFC.css.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/QY4F3GGW.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/UCWD5VM4.js +0 -4
- package/dist/arcgis-coding-components/UCWD5VM4.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/UDCDJQAM.js.LEGAL.txt +0 -15
- package/dist/arcgis-coding-components/ULAJILIL.js +0 -4
- package/dist/arcgis-coding-components/ULAJILIL.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/UZXS4UBU.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/V4MOUEGT.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/XD72XLNN.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/XDDYJJ22.js.LEGAL.txt +0 -4
- package/dist/arcgis-coding-components/XL6KMO7X.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/XOFMPNEM.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/ZCXD6M3C.js +0 -4
- package/dist/arcgis-coding-components/ZCXD6M3C.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/ZYARY2JU.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.css.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +0 -3
- /package/dist/arcgis-coding-components/{arcgis-coding-components.esm.css → stdin.css} +0 -0
|
@@ -11,6 +11,8 @@ export declare class ArcgisEditorVariables extends LitElement {
|
|
|
11
11
|
loading: boolean;
|
|
12
12
|
/** The model id */
|
|
13
13
|
modelId: string | undefined;
|
|
14
|
+
/** When true, the component will be hidden. */
|
|
15
|
+
closed?: boolean | undefined;
|
|
14
16
|
/**
|
|
15
17
|
* The variable to display.
|
|
16
18
|
* Currently supports EditorProfile and FeatureSetVariable
|
|
@@ -4,11 +4,11 @@ import { html as s } from "lit";
|
|
|
4
4
|
import { LitElement as n, createEvent as a } from "@arcgis/lumina";
|
|
5
5
|
import { setFocusOnElement as d, createFilterExpression as h } from "@arcgis/components-utils";
|
|
6
6
|
import { u as f } from "../../chunks/useT9n.js";
|
|
7
|
-
import { css as
|
|
7
|
+
import { css as u } 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.33/esri/copyright.txt for details.
|
|
10
|
-
v4.33.0-next.
|
|
11
|
-
const
|
|
10
|
+
v4.33.0-next.109 */
|
|
11
|
+
const m = u`: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);word-break:break-word}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
14
14
|
}
|
|
@@ -16,13 +16,13 @@ class p extends n {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this._beforeBack = async () => {
|
|
18
18
|
this.removeLastPanelRenderer(), this._filterValue = "";
|
|
19
|
-
}, this.messages = f(), this._filterValue = "", this._flowItemRenderers = [], this._mode = "profile", this._mutationCounter = 1, this.loading = !1, this.arcgisClose = a({ bubbles: !1 }), this.arcgisItemSelected = a({ bubbles: !1 });
|
|
19
|
+
}, this.messages = f(), this._filterValue = "", this._flowItemRenderers = [], this._mode = "profile", this._mutationCounter = 1, this.loading = !1, this.closed = !1, this.arcgisClose = a({ bubbles: !1 }), this.arcgisItemSelected = a({ bubbles: !1 });
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
|
-
this.properties = { _filterValue: 16, _flowItemRenderers: 16, _mode: 16, _mutationCounter: 16, loading: 5, modelId: 1, variable: 0 };
|
|
22
|
+
this.properties = { _filterValue: 16, _flowItemRenderers: 16, _mode: 16, _mutationCounter: 16, loading: 5, modelId: 1, closed: 5, variable: 0 };
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
|
-
this.styles =
|
|
25
|
+
this.styles = m;
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region Lifecycle
|
|
@@ -124,7 +124,7 @@ class p extends n {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
render() {
|
|
127
|
-
return !this.loading && this.variable?.loaded && !this.variable?.variables.length ? s`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>` : s`<calcite-flow ${c(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable, !0, this._flowItemRenderers.length === 0)}${this._flowItemRenderers.map((e, t, i) => (
|
|
127
|
+
return this.closed ? null : !this.loading && this.variable?.loaded && !this.variable?.variables.length ? s`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>` : s`<calcite-flow ${c(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable, !0, this._flowItemRenderers.length === 0)}${this._flowItemRenderers.map((e, t, i) => (
|
|
128
128
|
// check if the current flow item is the last one, if so, renderer will set selected = true
|
|
129
129
|
e(t === i.length - 1)
|
|
130
130
|
))}</calcite-flow>`;
|
|
@@ -13,6 +13,8 @@ export declare class ArcgisLanguageApiPanel extends LitElement {
|
|
|
13
13
|
hideDocumentationActions: boolean;
|
|
14
14
|
/** When true, a busy indicator is displayed */
|
|
15
15
|
loading: boolean;
|
|
16
|
+
/** When true, the component will be hidden. */
|
|
17
|
+
closed?: boolean | undefined;
|
|
16
18
|
/** Raised when the close action has been requested */
|
|
17
19
|
readonly arcgisClose: TargetedEvent<this, void>;
|
|
18
20
|
/** Raised when an item has been selected */
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { c as m } from "../../chunks/runtime.js";
|
|
2
2
|
import { ref as o } from "lit-html/directives/ref.js";
|
|
3
3
|
import { html as s } from "lit";
|
|
4
|
-
import { setFocusOnElement as h, addLTRMark as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { g as r, o as
|
|
4
|
+
import { setFocusOnElement as h, addLTRMark as c, focusElement as u } from "@arcgis/components-utils";
|
|
5
|
+
import { LitElement as f, createEvent as a } from "@arcgis/lumina";
|
|
6
|
+
import { g as r, o as p, c as n, a as g } from "../../chunks/markdown.js";
|
|
7
7
|
import { f as _ } from "../../chunks/monaco-importer.js";
|
|
8
8
|
import { u as b } from "../../chunks/useT9n.js";
|
|
9
9
|
import { css as v } from "@lit/reactive-element/css-tag.js";
|
|
10
10
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
11
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
13
|
-
v4.33.0-next.
|
|
13
|
+
v4.33.0-next.109 */
|
|
14
14
|
const y = v`: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)}}`;
|
|
15
|
-
class I extends
|
|
15
|
+
class I extends f {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this.messages = b(), this._unselectItem = async () => {
|
|
18
18
|
this._selectedApiItem = void 0;
|
|
19
|
-
}, this._colorizeStyle = "", this._filterValue = "", this.languageId = "arcade", this.hideDocumentationActions = !1, this.loading = !1, this.arcgisClose =
|
|
19
|
+
}, this._colorizeStyle = "", this._filterValue = "", this.languageId = "arcade", this.hideDocumentationActions = !1, this.loading = !1, this.closed = !1, this.arcgisClose = a({ bubbles: !1 }), this.arcgisItemSelected = a({ bubbles: !1 });
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
|
-
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedApiItem: 16, languageId: 1, apiLibrary: 0, hideDocumentationActions: 5, loading: 5 };
|
|
22
|
+
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedApiItem: 16, languageId: 1, apiLibrary: 0, hideDocumentationActions: 5, loading: 5, closed: 5 };
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
25
|
this.styles = y;
|
|
@@ -27,7 +27,7 @@ class I extends p {
|
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region Lifecycle
|
|
29
29
|
async load() {
|
|
30
|
-
await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener =
|
|
30
|
+
await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener = p(() => this._colorizeStyle = r());
|
|
31
31
|
}
|
|
32
32
|
willUpdate(e) {
|
|
33
33
|
if (e.has("languageId") && d(this.languageId), e.has("apiLibrary")) {
|
|
@@ -82,13 +82,15 @@ class I extends p {
|
|
|
82
82
|
//#region Rendering
|
|
83
83
|
renderApiCategory(e) {
|
|
84
84
|
const i = _(e.items, "name", this._filterValue);
|
|
85
|
-
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${
|
|
85
|
+
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${(l) => this._emitItemSelected(l, t)} @keydown=${(l) => this._emitItemSelected(l, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(l) => this._selectItem(l, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
|
|
86
86
|
}
|
|
87
87
|
renderApiItemFlowItem() {
|
|
88
88
|
const e = this._selectedApiItem;
|
|
89
|
-
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${o(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${
|
|
89
|
+
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${o(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${c(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? s`<div ${o(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
+
if (this.closed)
|
|
93
|
+
return null;
|
|
92
94
|
const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
|
|
93
95
|
return s`<style>${this._colorizeStyle}</style><calcite-flow ${o(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : s`<calcite-list label="arcade api">${i ? s`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
|
|
94
96
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { c as o } from "../../chunks/runtime.js";
|
|
2
2
|
import { html as i } from "lit";
|
|
3
|
-
import { LitElement as
|
|
3
|
+
import { LitElement as r, createEvent as n, noShadowRoot as c, safeClassMap as s } from "@arcgis/lumina";
|
|
4
4
|
import { generateGuid as l } from "@arcgis/components-utils";
|
|
5
5
|
import { a } from "../../chunks/sql-expr-defaults.js";
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.js";
|
|
7
|
-
import { createRef as
|
|
8
|
-
import { css as
|
|
7
|
+
import { createRef as p, ref as h } from "lit-html/directives/ref.js";
|
|
8
|
+
import { css as g } 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.33/esri/copyright.txt for details.
|
|
11
|
-
v4.33.0-next.
|
|
12
|
-
const
|
|
13
|
-
class
|
|
11
|
+
v4.33.0-next.109 */
|
|
12
|
+
const f = g`@layer{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
|
+
class m extends r {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this._codeEditorElt =
|
|
15
|
+
super(...arguments), this._codeEditorElt = p(), this.messages = d(), this._modelId = l(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.arcgisScriptChange = n({ bubbles: !1 });
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5 };
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
|
-
this.shadowRootOptions =
|
|
21
|
+
this.shadowRootOptions = c;
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
|
-
this.styles =
|
|
24
|
+
this.styles = f;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region Lifecycle
|
|
@@ -85,10 +85,10 @@ class f extends s {
|
|
|
85
85
|
//#region Rendering
|
|
86
86
|
render() {
|
|
87
87
|
const e = this._getFeatureSetVariable();
|
|
88
|
-
return i`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${
|
|
88
|
+
return i`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${h(this._codeEditorElt)}></arcgis-code-editor></div>${!this.hideSideBar && i`<arcgis-editor-variables .variable=${e} .closed=${this._activeAction !== "fields"} class=${s(this._activeAction === "fields" && "side-panel flex-panel border-inline-start")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${() => this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>` || ""}${!this.hideSideBar && i`<arcgis-language-api-panel class=${s(this._activeAction === "functions" && "side-panel flex-panel border-inline-start")} .closed=${this._activeAction !== "functions"} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${a.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</div>`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
o("arcgis-sql-expression-editor",
|
|
91
|
+
o("arcgis-sql-expression-editor", m);
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
m as ArcgisSqlExpressionEditor
|
|
94
94
|
};
|
|
@@ -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.33/esri/copyright.txt for details.
|
|
10
|
-
v4.33.0-next.
|
|
10
|
+
v4.33.0-next.109 */
|
|
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-05-
|
|
2
|
+
"timestamp": "2025-05-03T05:06:36",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@arcgis/lumina-compiler",
|
|
5
|
-
"version": "4.33.0-next.
|
|
5
|
+
"version": "4.33.0-next.109",
|
|
6
6
|
"typescriptVersion": "5.6.3"
|
|
7
7
|
},
|
|
8
8
|
"schemaVersion": "1.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"name": "customPanels",
|
|
72
72
|
"description": "Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.",
|
|
73
73
|
"type": {
|
|
74
|
-
"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}>)",
|
|
74
|
+
"text": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, closed, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n closed: boolean;\n }) => JsxNode;\n}>)",
|
|
75
75
|
"references": [
|
|
76
76
|
{
|
|
77
77
|
"name": "Array",
|
package/dist/docs/docs.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-05-
|
|
2
|
+
"timestamp": "2025-05-03T05:06:36",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@arcgis/lumina-compiler",
|
|
5
|
-
"version": "4.33.0-next.
|
|
5
|
+
"version": "4.33.0-next.109",
|
|
6
6
|
"typescriptVersion": "5.6.3"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"props": [
|
|
27
27
|
{
|
|
28
28
|
"name": "customPanels",
|
|
29
|
-
"type": "(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}>)",
|
|
29
|
+
"type": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, closed, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n closed: boolean;\n }) => JsxNode;\n}>)",
|
|
30
30
|
"complexType": {
|
|
31
|
-
"original": "(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}>)",
|
|
32
|
-
"resolved": "(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}>)",
|
|
31
|
+
"original": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, closed, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n closed: boolean;\n }) => JsxNode;\n}>)",
|
|
32
|
+
"resolved": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, closed, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n closed: boolean;\n }) => JsxNode;\n}>)",
|
|
33
33
|
"references": {
|
|
34
34
|
"Array": {
|
|
35
35
|
"location": "import",
|
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.33.0-next.
|
|
4
|
+
"version": "4.33.0-next.109",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{
|
|
62
62
|
"name": "customPanels",
|
|
63
63
|
"description": "Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.",
|
|
64
|
-
"type": "(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
|
+
"type": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, closed, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n closed: boolean;\n }) => JsxNode;\n}>)"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"name": "editorOptions",
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
6
|
-
v4.33.0-next.
|
|
6
|
+
v4.33.0-next.109 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,15 +2,15 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
5
|
-
v4.33.0-next.
|
|
5
|
+
v4.33.0-next.109 */
|
|
6
6
|
const o = i(e, {
|
|
7
7
|
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js")],
|
|
8
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
|
9
9
|
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
|
|
10
|
-
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "suggestions:"],
|
|
10
|
+
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "closed,suggestions:"],
|
|
11
11
|
"arcgis-code-editor": [() => import("./components/arcgis-code-editor/customElement.js"), "editorInstance:,editorOptions:,language,modelId,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],
|
|
12
|
-
"arcgis-editor-variables": [() => import("./components/arcgis-editor-variables/customElement.js"), "loading,modelId,variable:"],
|
|
13
|
-
"arcgis-language-api-panel": [() => import("./components/arcgis-language-api-panel/customElement.js"), "apiLibrary:,hideDocumentationActions,languageId,loading"],
|
|
12
|
+
"arcgis-editor-variables": [() => import("./components/arcgis-editor-variables/customElement.js"), "closed,loading,modelId,variable:"],
|
|
13
|
+
"arcgis-language-api-panel": [() => import("./components/arcgis-language-api-panel/customElement.js"), "apiLibrary:,closed,hideDocumentationActions,languageId,loading"],
|
|
14
14
|
"arcgis-sql-expression-editor": [() => import("./components/arcgis-sql-expression-editor/customElement.js"), "hideSideBar,profile:,script"],
|
|
15
15
|
"arcgis-sql-expression-fields": [() => import("./components/arcgis-sql-expression-fields/customElement.js"), "loading,modelId"]
|
|
16
16
|
});
|
|
@@ -159,5 +159,9 @@ export declare function valueToArcadeResult(value: unknown): ArcadeResult;
|
|
|
159
159
|
export declare function formatArcadeResultDate(dateObject: IArcadeResultDate, lang?: string): string;
|
|
160
160
|
export declare function formatArcadeResultDateOnly(dateObject: IArcadeResultDateOnly): string;
|
|
161
161
|
export declare function formatArcadeResultTimeOnly(dateObject: IArcadeResultTimeOnly): string;
|
|
162
|
+
declare function convertScriptOutputToArcadeResult(scriptOutput: unknown, timeZone?: string): Promise<ArcadeResult>;
|
|
162
163
|
export declare function executeScript(editorProfile: IEditorProfileDefinition | undefined, script: string | undefined, testContext: IEditorTestContext, console?: (log: string) => void): Promise<ArcadeResult>;
|
|
164
|
+
export declare const exportsForTests: {
|
|
165
|
+
convertScriptOutputToArcadeResult: typeof convertScriptOutputToArcadeResult;
|
|
166
|
+
};
|
|
163
167
|
export {};
|
|
@@ -11,9 +11,10 @@ export type ICustomPanel = {
|
|
|
11
11
|
/** Optional flag to indicate that the user is providing custom flow items */
|
|
12
12
|
useFlows?: boolean;
|
|
13
13
|
/** Renderer function that returns a JSX node */
|
|
14
|
-
renderer: ({ closePanel, insertText, }: {
|
|
14
|
+
renderer: ({ closePanel, insertText, closed, }: {
|
|
15
15
|
closePanel: (e: Event) => void;
|
|
16
16
|
insertText: (text: string) => void;
|
|
17
|
+
closed: boolean;
|
|
17
18
|
}) => JsxNode;
|
|
18
19
|
};
|
|
19
20
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.109",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
],
|
|
38
38
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcgis/arcade-languageservice": "4.33.0-next.
|
|
41
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
42
|
-
"@arcgis/core-adapter": "4.33.0-next.
|
|
43
|
-
"@arcgis/languages-api-utils": "4.33.0-next.
|
|
44
|
-
"@arcgis/lumina": "4.33.0-next.
|
|
40
|
+
"@arcgis/arcade-languageservice": "4.33.0-next.109",
|
|
41
|
+
"@arcgis/components-utils": "4.33.0-next.109",
|
|
42
|
+
"@arcgis/core-adapter": "4.33.0-next.109",
|
|
43
|
+
"@arcgis/languages-api-utils": "4.33.0-next.109",
|
|
44
|
+
"@arcgis/lumina": "4.33.0-next.109",
|
|
45
45
|
"monaco-editor": "^0.52.0",
|
|
46
46
|
"tslib": "^2.7.0",
|
|
47
47
|
"vscode-languageserver-types": "^3.17.5"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/basic-languages/html/html.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.108 */
|
|
4
|
-
import{b as u,c as f,d as h,e as T,f as S,g as P}from"./EZSWCZ3M.js";import{i as M}from"./E3FMA3ES.js";import{a as k}from"./INEHEWNR.js";import"./O3S3BNYB.js";import{A as d,C as w,a as y,b as e,l as $,y as x,z as v}from"./OIMKTO3K.js";import{n as p,p as n}from"./M4EZ4JBR.js";import"./XL6KMO7X.js";var L=y`: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={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:l=>l.currentTarget.selectedItems.forEach(t=>t.selected=!1)},r={onClick:l=>{let t=l.currentTarget;t.expanded=!t.expanded}};function o(l){return e`<span class="dictionary-property">${l}</span><span>: </span>`}function C(l,t=!1){return e`<calcite-tree slot=${(t?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(l.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`}function R(l,t=!1){return e`<calcite-tree slot=${(t?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${o("type")}${l.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${o("value")}<span class="string-value">${JSON.stringify(l,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`}function g(l){switch(l.type){case"unknown":case"null":return e`<span class="constant-value">${l.type}</span>`;case"text":return e`<span class="string-value">${p(l.value)}</span>`;case"number":return e`<span class="number-value">${l.value.toString()}</span>`;case"boolean":return e`<span class="constant-value">${l.value.toString()}</span>`;case"date":return e`<span class="date-value">${T(l)}</span>`;case"dateOnly":return e`<span class="string-value">${p(S(l))}</span>`;case"time":return e`<span class="string-value">${p(P(l))}</span>`;default:return null}}function A(l){let t=M(l.value.fields);return e`<table><thead><tr>${t.map(c=>e`<th>${c.name}</th>`)}</tr></thead><tbody>${l.features.map(c=>e`<tr>${t.map(i=>{try{let s=h(c.field(i.name));return e`<td>${g(s)}</td>`}catch{return e`<td></td>`}})}</tr>`)}</tbody></table>`}var b=class extends x{constructor(){super(...arguments),this.messages=k(),this.openedResultPanel="output",this.arcgisClose=$({bubbles:!1}),this.arcgisOpenedResultPanelChange=$({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=L}updateResultPanel(t){this.openedResultPanel=t,this.arcgisOpenedResultPanelChange.emit(t)}_switchResultPanel(t){let c=t.currentTarget.dataset.panelName;c&&this.updateResultPanel(c)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:e`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(t=>e`<p>${t}</p>`):e`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let t=this.result?.type==="error"?"color-error":"color-success";return e`<calcite-list label=results>${this.result?e`<calcite-list-item .label=${n(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item>`:e`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return e`<div class="result-value-simple flex-adjustable">${n(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return e`<div class="result-value-simple ltr-container">${g(this.result)}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return e`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${g(this.result)}</div>`;case"array":{let t=(this.result.value??[]).slice(0,u);return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.renderArrayHeader(this.result)}</div>${this.renderArrayTree(t,!0)}</calcite-tree-item></calcite-tree></div>`}case"geometry":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${R(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"attachment":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${C(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${this.renderDictionaryTree(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return e`<div class="result-value-table ltr-container">${this.renderFeatureSetLabel(this.result)}${A(this.result)}</div>`;case"knowledgeGraph":return e`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;default:return e`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}renderArrayHeader(t){let c=t.value??[],i=Math.max(c.length-u,0);return e`<span>${`${t.type}(${c.length??0})`}</span>${i>0?e`<span> ${n(this.messages.showingfirstitemsformat,{count:u.toString()})}</span>`:null}`}renderArrayTree(t,c=!1){return e`<calcite-tree slot=${(c?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.map((i,s)=>{let m=h(i);return this.renderTreeItem(m,s,!c)})}</calcite-tree>`}renderDictionaryTree(t,c=!1){let i=t.geometry?.();return e`<calcite-tree slot=${(c?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.keys().map(s=>{let m=h(t.field(s));return t.arcadeDeclaredClass==="esri.arcade.Feature"&&m.type==="geometry"?null:this.renderTreeItem(m,s)})}${i?this.renderTreeItem({type:"geometry",value:i},"geometry"):null}</calcite-tree>`}renderTreeItem(t,c,i=!1){switch(t.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return e`<calcite-tree-item><div class="tree-item-label">${o(c)}${g(t)}</div></calcite-tree-item>`;case"array":{let s=(t.value??[]).slice(0,u);return e`<calcite-tree-item .expanded=${i} @click=${r.onClick}><div class="tree-item-label">${o(c)}${this.renderArrayHeader(t)}</div>${this.renderArrayTree(s,!0)}</calcite-tree-item>`}case"geometry":return e`<calcite-tree-item .expanded=${i} @click=${r.onClick}><div class="tree-item-label">${o(c)}<span>${t.type}</span></div>${R(t.value,!0)}</calcite-tree-item>`;case"attachment":return e`<calcite-tree-item .expanded=${i} @click=${r.onClick}><div class="tree-item-label">${o(c)}<span>${t.type}</span></div>${C(t.value,!0)}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return e`<calcite-tree-item .expanded=${i} @click=${r.onClick}><div class="tree-item-label">${o(c)}<span>${t.type}</span></div>${this.renderDictionaryTree(t.value,!0)}</calcite-tree-item>`;default:return null}}renderFeatureSetLabel(t){return e`<div class="value-type"><span>${t.type}:</span>${t.features.length>=f?e`<span> ${n(this.messages.showingfirstitemsformat,{count:f.toString()})}</span>`:null}</div>`}render(){return e`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:e`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};w("arcgis-arcade-results",b);export{b as ArcgisArcadeResults};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/language/json/jsonMode.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/basic-languages/typescript/typescript.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
File without changes
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.108 */
|
|
4
|
-
import{a as P}from"./XD72XLNN.js";import{a as s,b as w}from"./UZXS4UBU.js";import{a as v,h as c}from"./EZSWCZ3M.js";import{a as E,b as S}from"./UDCDJQAM.js";import"./MBVDHIQ4.js";import"./H3GUZYV5.js";import"./E3FMA3ES.js";import"./OGBCV7X3.js";import"./L5V4S637.js";import{a as f}from"./INEHEWNR.js";import"./O3S3BNYB.js";import{C as m,D as x,a as g,b as t,d as n,l as r,o as u,y as _}from"./OIMKTO3K.js";import{a as h,h as p}from"./M4EZ4JBR.js";import{Hl as b,kk as D}from"./XDDYJJ22.js";import"./XL6KMO7X.js";D();var C=d=>{if(!d.toString().includes("calcite-flow-item"))throw new Error("Renderer must return a JSX node that starts with <calcite-flow-item>");return!0},R=g`@layer{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}}}}`,l=class extends _{constructor(){super(...arguments),this._codeEditorElt=E(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=f(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(v,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},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=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{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}}static{this.shadowRootOptions=u}static{this.styles=R}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");P(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await w();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[b.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${S(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:$,iconFlipRtl:A=!1,onClick:y=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${o} @click=${y} data-panel-name=${$??n} .iconFlipRtl=${A}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){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({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":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>`;case"suggestions":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>`;case"none":return null}let e=this.customPanels?.find(i=>i.id===this.openedSidePanel);if(e){let i=!!e?.useFlows;return t`<calcite-flow class="side-panel flex-panel border-inline-start">${i&&C(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>`}return null}renderResultsPanel(){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}render(){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>`}};m("arcgis-arcade-editor",l);export{l as ArcgisArcadeEditor};
|
|
File without changes
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.108 */
|
|
4
|
-
import{a as h,b as g}from"./UDCDJQAM.js";import{a as t}from"./4VFAHLL6.js";import"./MBVDHIQ4.js";import"./H3GUZYV5.js";import"./E3FMA3ES.js";import"./OGBCV7X3.js";import"./L5V4S637.js";import{a as p}from"./INEHEWNR.js";import"./O3S3BNYB.js";import{C as l,a as r,b as e,l as n,o as c,y as d}from"./OIMKTO3K.js";import{h as s}from"./M4EZ4JBR.js";import"./XDDYJJ22.js";import"./XL6KMO7X.js";var f=r`@layer{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%}}}}`,o=class extends d{constructor(){super(...arguments),this._codeEditorElt=h(),this.messages=p(),this._modelId=s(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisScriptChange=n({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=c}static{this.styles=f}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await t.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=t.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let a=i.target;this._setActiveAction(a.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await t.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,a=t.getEditorProfileForModel(this._modelId);return a?.variables?.length&&a?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=a?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor></div>${this._activeAction==="fields"&&!this.hideSideBar&&e`<arcgis-editor-variables .variable=${i} class="side-panel flex-panel border-inline-start" .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${this._activeAction==="functions"&&!this.hideSideBar&&e`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${t.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};l("arcgis-sql-expression-editor",o);export{o as ArcgisSqlExpressionEditor};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/language/css/cssMode.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/basic-languages/css/css.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/language/typescript/monaco.contribution.js:
|
|
4
|
-
/*!-----------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
7
|
-
* Released under the MIT license
|
|
8
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
9
|
-
*-----------------------------------------------------------------------------*/
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.108 */
|
|
4
|
-
import{b as f}from"./UDCDJQAM.js";import{a as u}from"./INEHEWNR.js";import"./O3S3BNYB.js";import{C as m,a as d,b as i,l,y as h}from"./OIMKTO3K.js";import{e as c,o as n}from"./M4EZ4JBR.js";import"./XL6KMO7X.js";var g=d`: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);word-break:break-word}}`;function b(a){a.key==="Enter"&&a.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=u(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.arcgisClose=l({bubbles:!1}),this.arcgisItemSelected=l({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let r=this.loading;return!r&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),r=!1}),r=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${r?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(r=>r.passFilter(t));return s.length?s.map(r=>this.renderEditorVariable(r)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${f(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
|
File without changes
|