@arcgis/coding-components 4.33.0-next.107 → 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/{XDIOX4GW.js → 3Y2627CP.js} +2 -2
- package/dist/arcgis-coding-components/4A3KCIXJ.js +4 -0
- package/dist/arcgis-coding-components/{3TUUDQHY.js → 4SUM77G6.js} +1 -1
- package/dist/arcgis-coding-components/{C4YL3G53.js → 5GXT7DJI.js} +2 -2
- package/dist/arcgis-coding-components/{T5ULTETY.js → 5OWQWSH2.js} +2 -2
- package/dist/arcgis-coding-components/{GSWETX5W.js → 5RHYT4EO.js} +2 -2
- package/dist/arcgis-coding-components/7FZREYXQ.js +4 -0
- package/dist/arcgis-coding-components/{VKHQY3TH.js → A7YPVNT3.js} +2 -2
- package/dist/arcgis-coding-components/{GY7EJG2G.js → ASUGUWIA.js} +2 -2
- package/dist/arcgis-coding-components/{JJ6GJDDT.js → CAF3USPW.js} +2 -2
- package/dist/arcgis-coding-components/{EISSQJVY.js → CBXJNCJJ.js} +2 -2
- package/dist/arcgis-coding-components/{JQ7VSS7H.js → CHNBIC2D.js} +2 -2
- package/dist/arcgis-coding-components/{PETPJYNV.js → CJPSVHWK.js} +1 -1
- package/dist/arcgis-coding-components/{2BE6FSTL.js → CJUW3OWD.js} +1 -1
- package/dist/arcgis-coding-components/{ZYEZKXQB.js → CQW3LRXV.js} +2 -2
- package/dist/arcgis-coding-components/{T26N7WLN.js → DD7AXDL6.js} +2 -2
- package/dist/arcgis-coding-components/DI6P2I7I.js +4 -0
- package/dist/arcgis-coding-components/{4CRKFUC4.js → DZ4GBFBV.js} +3 -3
- package/dist/arcgis-coding-components/F42UBPX3.js +4 -0
- package/dist/arcgis-coding-components/{CD7HMMHG.js → FIAZXQHO.js} +2 -2
- package/dist/arcgis-coding-components/{O2TMVMMV.js → HN74GEMZ.js} +2 -2
- package/dist/arcgis-coding-components/{7B2PAKIN.js → IGSRT6OY.js} +2 -2
- package/dist/arcgis-coding-components/{22CFXJJM.js.LEGAL.txt → JGYVWIOL.js} +2 -1
- package/dist/arcgis-coding-components/{UNE6OS2T.js → JQZ3ODVW.js} +3 -3
- package/dist/arcgis-coding-components/{N5IQK7RB.js → LCQ5LRWZ.js} +2 -2
- package/dist/arcgis-coding-components/{R65CIUFJ.js → LDIBFNEC.js} +1 -1
- package/dist/arcgis-coding-components/{CO3ZPGMS.js → LIXQY7SR.js} +2 -2
- package/dist/arcgis-coding-components/{KBPOBK72.js → MAMMTDKU.js} +2 -2
- package/dist/arcgis-coding-components/{APQOFW32.js → O7XUDENI.js} +2 -2
- package/dist/arcgis-coding-components/{H2ZLUPXB.js → QCHXYFBQ.js} +2 -2
- package/dist/arcgis-coding-components/{7CPSRGTI.js → QJDMPVG5.js} +2 -2
- package/dist/arcgis-coding-components/{MQTJI42N.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/{QX5I6NKV.js → TRO4CFSW.js} +2 -2
- package/dist/arcgis-coding-components/{SUVWM53R.js → U4U7ILCC.js} +2 -2
- package/dist/arcgis-coding-components/{VEEPHGJL.js → WZOYYLIE.js} +2 -2
- package/dist/arcgis-coding-components/{22CFXJJM.js → XGDCD4ZA.js} +2 -2
- package/dist/arcgis-coding-components/{HBRSHYP6.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/2BE6FSTL.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/3TUUDQHY.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/4CRKFUC4.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/7B2PAKIN.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/7CPSRGTI.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/APQOFW32.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/ARPNRPTX.js +0 -4
- package/dist/arcgis-coding-components/ARPNRPTX.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/C4YL3G53.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/CD7HMMHG.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/CGXSA5HM.js +0 -4
- package/dist/arcgis-coding-components/CGXSA5HM.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/CO3ZPGMS.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/EISSQJVY.js.LEGAL.txt +0 -4
- package/dist/arcgis-coding-components/GSWETX5W.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/GY7EJG2G.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/H2ZLUPXB.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/HBRSHYP6.js.LEGAL.txt +0 -69
- package/dist/arcgis-coding-components/JJ6GJDDT.js.LEGAL.txt +0 -145
- package/dist/arcgis-coding-components/JQ7VSS7H.js.LEGAL.txt +0 -15
- package/dist/arcgis-coding-components/KBPOBK72.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/MQTJI42N.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/N5IQK7RB.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/NSLPKDYP.css.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/O2TMVMMV.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/OPTRUP6P.js +0 -4
- package/dist/arcgis-coding-components/OPTRUP6P.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/PETPJYNV.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/QJN5BRFC.css.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/QX5I6NKV.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/R65CIUFJ.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/R6Z5J4HN.js +0 -4
- package/dist/arcgis-coding-components/R6Z5J4HN.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/SUVWM53R.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/T26N7WLN.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/T5ULTETY.js.LEGAL.txt +0 -12
- package/dist/arcgis-coding-components/UNE6OS2T.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/V7PQEVV2.js +0 -4
- package/dist/arcgis-coding-components/V7PQEVV2.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/VEEPHGJL.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/VKHQY3TH.js.LEGAL.txt +0 -9
- package/dist/arcgis-coding-components/VTPAFXWN.js +0 -4
- package/dist/arcgis-coding-components/VTPAFXWN.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/XDIOX4GW.js.LEGAL.txt +0 -0
- package/dist/arcgis-coding-components/YVACEAOH.js +0 -4
- package/dist/arcgis-coding-components/YVACEAOH.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/ZYEZKXQB.js.LEGAL.txt +0 -3
- 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"
|
|
File without changes
|
|
File without changes
|
|
@@ -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,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/language/typescript/tsMode.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.107 */
|
|
4
|
-
import{b,c as r,d as _,e as v}from"./KBPOBK72.js";import{b as l}from"./JQ7VSS7H.js";import{a as f}from"./HBRSHYP6.js";import"./MQTJI42N.js";import{a as p}from"./22CFXJJM.js";import"./XDIOX4GW.js";import{C as m,a as u,b as s,d as c,l as a,y as h}from"./JJ6GJDDT.js";import{d as g,e as d}from"./PETPJYNV.js";import"./EISSQJVY.js";import"./3TUUDQHY.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=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-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)}}`,n=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{d(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??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(g)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};m("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/basic-languages/javascript/javascript.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/html/htmlMode.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.107 */
|
|
4
|
-
import{a as P}from"./7B2PAKIN.js";import{a as s,b as w}from"./UNE6OS2T.js";import{a as v,h as c}from"./GY7EJG2G.js";import{a as E,b as S}from"./JQ7VSS7H.js";import"./GSWETX5W.js";import"./2BE6FSTL.js";import"./R65CIUFJ.js";import"./HBRSHYP6.js";import"./MQTJI42N.js";import{a as f}from"./22CFXJJM.js";import"./XDIOX4GW.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"./JJ6GJDDT.js";import{a as h,h as p}from"./PETPJYNV.js";import{Hl as b,kk as D}from"./EISSQJVY.js";import"./3TUUDQHY.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};
|
|
@@ -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,4 +0,0 @@
|
|
|
1
|
-
Bundled license information:
|
|
2
|
-
|
|
3
|
-
monaco-editor/esm/vs/base/browser/dompurify/dompurify.js:
|
|
4
|
-
/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */
|
|
@@ -1,69 +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.107 */
|
|
4
|
-
|
|
5
|
-
Bundled license information:
|
|
6
|
-
|
|
7
|
-
monaco-editor/esm/vs/basic-languages/_.contribution.js:
|
|
8
|
-
/*!-----------------------------------------------------------------------------
|
|
9
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
11
|
-
* Released under the MIT license
|
|
12
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
13
|
-
*-----------------------------------------------------------------------------*/
|
|
14
|
-
|
|
15
|
-
monaco-editor/esm/vs/basic-languages/css/css.contribution.js:
|
|
16
|
-
/*!-----------------------------------------------------------------------------
|
|
17
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
19
|
-
* Released under the MIT license
|
|
20
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
21
|
-
*-----------------------------------------------------------------------------*/
|
|
22
|
-
|
|
23
|
-
monaco-editor/esm/vs/basic-languages/html/html.contribution.js:
|
|
24
|
-
/*!-----------------------------------------------------------------------------
|
|
25
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
26
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
27
|
-
* Released under the MIT license
|
|
28
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
29
|
-
*-----------------------------------------------------------------------------*/
|
|
30
|
-
|
|
31
|
-
monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js:
|
|
32
|
-
/*!-----------------------------------------------------------------------------
|
|
33
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
34
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
35
|
-
* Released under the MIT license
|
|
36
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
37
|
-
*-----------------------------------------------------------------------------*/
|
|
38
|
-
|
|
39
|
-
monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js:
|
|
40
|
-
/*!-----------------------------------------------------------------------------
|
|
41
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
43
|
-
* Released under the MIT license
|
|
44
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
45
|
-
*-----------------------------------------------------------------------------*/
|
|
46
|
-
|
|
47
|
-
monaco-editor/esm/vs/language/css/monaco.contribution.js:
|
|
48
|
-
/*!-----------------------------------------------------------------------------
|
|
49
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
50
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
51
|
-
* Released under the MIT license
|
|
52
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
53
|
-
*-----------------------------------------------------------------------------*/
|
|
54
|
-
|
|
55
|
-
monaco-editor/esm/vs/language/html/monaco.contribution.js:
|
|
56
|
-
/*!-----------------------------------------------------------------------------
|
|
57
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
58
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
59
|
-
* Released under the MIT license
|
|
60
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
61
|
-
*-----------------------------------------------------------------------------*/
|
|
62
|
-
|
|
63
|
-
monaco-editor/esm/vs/language/json/monaco.contribution.js:
|
|
64
|
-
/*!-----------------------------------------------------------------------------
|
|
65
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
66
|
-
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
67
|
-
* Released under the MIT license
|
|
68
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
69
|
-
*-----------------------------------------------------------------------------*/
|