@arcgis/coding-components 4.34.0-next.45 → 4.34.0-next.47
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/addons.js +1 -1
- package/dist/cdn/3XLMLFOA.js +4 -0
- package/dist/cdn/{FLIBYULR.js → 5HCZZLVW.js} +2 -2
- package/dist/cdn/{G5ZJJ5HJ.js → 5QNSPDPZ.js} +2 -2
- package/dist/cdn/{UR656G6Q.js → 5ROKA75S.js} +2 -2
- package/dist/cdn/{OV7QCRJM.js → 6CKTEK6H.js} +2 -2
- package/dist/cdn/{VMFR2UM7.js → 7EMBMB7O.js} +2 -2
- package/dist/cdn/{RDINNFXG.js → 7LPK7GXX.js} +2 -2
- package/dist/cdn/{AC7CXSLG.js → AMKC3KCF.js} +2 -2
- package/dist/cdn/{WP35YULQ.js → B4IV3BPD.js} +2 -2
- package/dist/cdn/{TKB26H6G.js → CFCB3LAG.js} +1 -1
- package/dist/cdn/DN47ZLQ7.js +4 -0
- package/dist/cdn/E2UU2CSX.js +6 -0
- package/dist/cdn/{DLWMCS3I.js → F76JFZUC.js} +2 -2
- package/dist/cdn/{LFOJWKJS.js → FBFR4GH7.js} +2 -2
- package/dist/cdn/{YHVVQWGS.js → FKZCYMYX.js} +2 -2
- package/dist/cdn/{J626PAJC.js → FSO6AN5U.js} +2 -2
- package/dist/cdn/{OLOYINUO.js → FXNTMV4Q.js} +2 -2
- package/dist/cdn/{VP3BLC7O.js → FZW6DCZ2.js} +1 -1
- package/dist/cdn/{JXGM3JD6.js → GV5QCCFN.js} +2 -2
- package/dist/cdn/H72A7LBB.js +4 -0
- package/dist/cdn/{G5GNFSKG.js → JDLLCRU2.js} +2 -2
- package/dist/cdn/{CTE2KALO.js → K2DJMWVS.js} +2 -2
- package/dist/cdn/{OYHPMKU2.js → K6NZA5IZ.js} +2 -2
- package/dist/cdn/{KCZEGMLB.js → KNC4XW2C.js} +2 -2
- package/dist/cdn/{TXEBWUJB.js → L5URIWGX.js} +1 -1
- package/dist/cdn/{BYFGLAKM.js → LEJQLPNW.js} +2 -2
- package/dist/cdn/{GRJD3YSJ.js → LR4OGK7T.js} +4 -4
- package/dist/cdn/MTGKPNFZ.js +6 -0
- package/dist/cdn/{IP2NP65N.js → NL7H7DW7.js} +2 -2
- package/dist/cdn/{WDTMSDTN.js → RHAFOSNH.js} +2 -2
- package/dist/cdn/SJFMTHCW.js +4 -0
- package/dist/cdn/{Y24RGSPQ.js → T4YQRA3M.js} +2 -2
- package/dist/cdn/{F2RY2VBB.js → TO5QFM35.js} +1 -1
- package/dist/cdn/{L37TRTOT.js → UILSUACV.js} +2 -2
- package/dist/cdn/{WO45MG6K.js → VLYPIC5F.js} +2 -2
- package/dist/cdn/{ANIBK6R6.js → VT5FD66I.js} +1 -1
- package/dist/cdn/{SLSD32VB.js → WET4WXIG.js} +2 -2
- package/dist/cdn/{GKDDSRJD.js → WTZCOTVD.js} +2 -2
- package/dist/cdn/{HKCNMLZL.js → WUD7KHQF.js} +2 -2
- package/dist/cdn/{7HAX2DYJ.js → Y4VFZN7B.js} +2 -2
- package/dist/cdn/{MQFRXQA7.js → YINWQZ6P.js} +2 -2
- package/dist/cdn/ZU5UPJRZ.js +3 -0
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +61827 -60995
- package/dist/cdn/index.js +2 -2
- 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/editor.js +2 -2
- 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 +113 -115
- package/dist/components/arcgis-arcade-editor/customElement.js +18 -19
- package/dist/components/arcgis-arcade-results/customElement.js +12 -13
- package/dist/components/arcgis-arcade-suggestions/customElement.js +16 -17
- package/dist/components/arcgis-code-editor/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.js +11 -12
- package/dist/components/arcgis-language-api-panel/customElement.js +18 -19
- package/dist/components/arcgis-sql-expression-editor/customElement.js +13 -14
- package/dist/components/arcgis-sql-expression-fields/customElement.js +10 -11
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +6 -5
- package/dist/cdn/FJHYM2AU.js +0 -4
- package/dist/cdn/LMGUIARR.js +0 -4
- package/dist/cdn/M2KCTBHI.js +0 -6
- package/dist/cdn/MLVPFCHF.js +0 -4
- package/dist/cdn/ONYNCDWF.js +0 -4
- package/dist/cdn/TOKFJNMD.js +0 -6
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { g as u, c as g } from "../../chunks/runtime.js";
|
|
2
|
-
import { html as t, nothing as r } from "lit";
|
|
3
|
-
import { KeyCode as
|
|
2
|
+
import { css as _, html as t, nothing as r } from "lit";
|
|
3
|
+
import { KeyCode as m } from "monaco-editor";
|
|
4
4
|
import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { Deferred as
|
|
9
|
-
import { D as
|
|
10
|
-
import { s as
|
|
7
|
+
import { LitElement as f, createEvent as c, noShadowRoot as x, safeClassMap as a } from "@arcgis/lumina";
|
|
8
|
+
import { Deferred as b, generateGuid as P } from "@arcgis/components-utils";
|
|
9
|
+
import { D as v, e as l } from "../../chunks/arcade-executor.js";
|
|
10
|
+
import { s as $ } from "../../chunks/setup-monaco.js";
|
|
11
11
|
import { b as s } from "../../chunks/arcade-defaults.js";
|
|
12
|
-
import { a as
|
|
13
|
-
import { u as
|
|
14
|
-
import { createRef as
|
|
15
|
-
import { css as w } from "@lit/reactive-element/css-tag.js";
|
|
12
|
+
import { a as E } from "../../chunks/arcade-service-accessors.js";
|
|
13
|
+
import { u as S } from "../../chunks/useT9n.js";
|
|
14
|
+
import { createRef as A, ref as w } from "lit-html/directives/ref.js";
|
|
16
15
|
import { s as y } from "../../chunks/editor.js";
|
|
17
16
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
18
17
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
19
|
-
v4.34.0-next.
|
|
20
|
-
const D =
|
|
21
|
-
class C extends
|
|
18
|
+
v4.34.0-next.47 */
|
|
19
|
+
const D = _`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.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}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;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)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`;
|
|
20
|
+
class C extends f {
|
|
22
21
|
constructor() {
|
|
23
|
-
super(...arguments), this._codeEditorElt =
|
|
22
|
+
super(...arguments), this._codeEditorElt = A(), this._componentReadyDefer = new b(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = S(), this._modelId = P(), this._openArcadeHelp = () => void window.open(v, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
24
23
|
if (!e.target)
|
|
25
24
|
return;
|
|
26
25
|
const i = e.target?.dataset.panelName ?? "none";
|
|
@@ -31,7 +30,7 @@ class C extends m {
|
|
|
31
30
|
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 };
|
|
32
31
|
}
|
|
33
32
|
static {
|
|
34
|
-
this.shadowRootOptions =
|
|
33
|
+
this.shadowRootOptions = x;
|
|
35
34
|
}
|
|
36
35
|
static {
|
|
37
36
|
this.styles = [D, y];
|
|
@@ -60,7 +59,7 @@ class C extends m {
|
|
|
60
59
|
}
|
|
61
60
|
async load() {
|
|
62
61
|
const e = u("./assets");
|
|
63
|
-
|
|
62
|
+
$(e), await this._updateEditorProfile();
|
|
64
63
|
}
|
|
65
64
|
willUpdate(e) {
|
|
66
65
|
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && s.updateApiContextForModel(this._modelId, {
|
|
@@ -69,7 +68,7 @@ class C extends m {
|
|
|
69
68
|
}
|
|
70
69
|
async loaded() {
|
|
71
70
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
72
|
-
const e = await
|
|
71
|
+
const e = await E();
|
|
73
72
|
this._disposables.push(e.onDiagnosticsChange((i) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(i.diagnostics))), this.testData && this._addExecuteScriptAction(), await this._codeEditorElt.value?.setFocus();
|
|
74
73
|
}
|
|
75
74
|
disconnectedCallback() {
|
|
@@ -141,7 +140,7 @@ class C extends m {
|
|
|
141
140
|
// An unique identifier for the action.
|
|
142
141
|
id: "run-script",
|
|
143
142
|
label: "Run Arcade Expression",
|
|
144
|
-
keybindings: [
|
|
143
|
+
keybindings: [m.F5],
|
|
145
144
|
contextMenuGroupId: "code",
|
|
146
145
|
contextMenuOrder: 1,
|
|
147
146
|
run: () => {
|
|
@@ -158,7 +157,7 @@ class C extends m {
|
|
|
158
157
|
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;
|
|
159
158
|
}
|
|
160
159
|
renderMainPanel() {
|
|
161
|
-
return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${
|
|
160
|
+
return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${w(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
162
161
|
}
|
|
163
162
|
renderAction({ id: e, label: i, icon: o, active: n, panelName: d, iconFlipRtl: h = !1, onClick: p = this._toggleSidePanel }) {
|
|
164
163
|
return t`<calcite-action id=${e ?? r} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${o} .active=${n} @click=${p} data-panel-name=${d ?? r} .iconFlipRtl=${h}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>` || ""}`;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { c as P } from "../../chunks/runtime.js";
|
|
2
|
-
import { html as t } from "lit
|
|
3
|
-
import { nothing as y, LitElement as
|
|
2
|
+
import { css as C, html as t } from "lit";
|
|
3
|
+
import { nothing as y, LitElement as M, createEvent as f, safeClassMap as v } from "@arcgis/lumina";
|
|
4
4
|
import { setValuesInString as o, quoteString as g } from "@arcgis/components-utils";
|
|
5
|
-
import { B as b, v as h, M as m, f as
|
|
6
|
-
import { u as
|
|
7
|
-
import { css as L } from "@lit/reactive-element/css-tag.js";
|
|
5
|
+
import { B as b, v as h, M as m, f as R, a as A, b as I } from "../../chunks/arcade-executor.js";
|
|
6
|
+
import { u as L } from "../../chunks/useT9n.js";
|
|
8
7
|
import { s as O } from "../../chunks/fields.js";
|
|
9
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
12
|
-
const D =
|
|
10
|
+
v4.34.0-next.47 */
|
|
11
|
+
const D = C`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, l = {
|
|
13
12
|
lines: !0,
|
|
14
13
|
selectionMode: "none",
|
|
15
14
|
scale: "s",
|
|
@@ -31,11 +30,11 @@ const D = L`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
31
30
|
case "boolean":
|
|
32
31
|
return t`<span class="constant-value">${e.value.toString()}</span>`;
|
|
33
32
|
case "date":
|
|
34
|
-
return t`<span class="date-value">${
|
|
33
|
+
return t`<span class="date-value">${I(e)}</span>`;
|
|
35
34
|
case "dateOnly":
|
|
36
|
-
return t`<span class="string-value">${g(
|
|
35
|
+
return t`<span class="string-value">${g(A(e))}</span>`;
|
|
37
36
|
case "time":
|
|
38
|
-
return t`<span class="string-value">${g(
|
|
37
|
+
return t`<span class="string-value">${g(R(e))}</span>`;
|
|
39
38
|
default:
|
|
40
39
|
return null;
|
|
41
40
|
}
|
|
@@ -54,7 +53,7 @@ const D = L`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
54
53
|
count: b.toString()
|
|
55
54
|
})}</span>` : null}</div>`, T = ({ items: e, subtree: a, t9nStrings: s }) => t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c, i) => {
|
|
56
55
|
const n = h(c);
|
|
57
|
-
return $({ arcadeResult: n, name: i, expanded: !
|
|
56
|
+
return $({ arcadeResult: n, name: i, expanded: !a, t9nStrings: s });
|
|
58
57
|
})}</calcite-tree>`, $ = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: c }) => {
|
|
59
58
|
switch (e.type) {
|
|
60
59
|
case "null":
|
|
@@ -97,9 +96,9 @@ const D = L`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
97
96
|
a.expanded = !a.expanded;
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
|
-
class z extends
|
|
99
|
+
class z extends M {
|
|
101
100
|
constructor() {
|
|
102
|
-
super(...arguments), this.messages =
|
|
101
|
+
super(...arguments), this.messages = L(), this.openedResultPanel = "output", this.arcgisClose = f({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = f({ bubbles: !1 });
|
|
103
102
|
}
|
|
104
103
|
static {
|
|
105
104
|
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { c as n } from "../../chunks/runtime.js";
|
|
2
|
-
import { ref as l } from "lit
|
|
3
|
-
import { html as s, nothing as c } from "lit";
|
|
4
|
-
import { setFocusOnElement as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { g as a, o as
|
|
7
|
-
import { f as
|
|
8
|
-
import { u as
|
|
9
|
-
import { css as _ } from "@lit/reactive-element/css-tag.js";
|
|
2
|
+
import { ref as l } from "lit/directives/ref.js";
|
|
3
|
+
import { css as d, html as s, nothing as c } from "lit";
|
|
4
|
+
import { setFocusOnElement as g, focusElement as u } from "@arcgis/components-utils";
|
|
5
|
+
import { LitElement as h, createEvent as r } from "@arcgis/lumina";
|
|
6
|
+
import { g as a, o as m, b as f, c as p } from "../../chunks/markdown.js";
|
|
7
|
+
import { f as b } from "../../chunks/monaco-importer.js";
|
|
8
|
+
import { u as _ } from "../../chunks/useT9n.js";
|
|
10
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.47 */
|
|
13
12
|
function v(o) {
|
|
14
13
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
14
|
}
|
|
16
|
-
const S =
|
|
17
|
-
class $ extends
|
|
15
|
+
const S = 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-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)}}`;
|
|
16
|
+
class $ extends h {
|
|
18
17
|
constructor() {
|
|
19
18
|
super(...arguments), this._beforeBack = async () => {
|
|
20
19
|
this._selectedSuggestion = void 0;
|
|
21
|
-
}, this.messages =
|
|
20
|
+
}, this.messages = _(), this._colorizeStyle = "", this._filterValue = "", this.closed = !1, this.arcgisClose = r({ bubbles: !1 }), this.arcgisItemSelected = r({ bubbles: !1 });
|
|
22
21
|
}
|
|
23
22
|
static {
|
|
24
23
|
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedSuggestion: 16, suggestions: 0, closed: 5 };
|
|
@@ -27,7 +26,7 @@ class $ extends u {
|
|
|
27
26
|
this.styles = S;
|
|
28
27
|
}
|
|
29
28
|
load() {
|
|
30
|
-
this._colorizeStyle = a(), this._themeChangedListener =
|
|
29
|
+
this._colorizeStyle = a(), this._themeChangedListener = m(() => this._colorizeStyle = a());
|
|
31
30
|
}
|
|
32
31
|
willUpdate(e) {
|
|
33
32
|
e.has("suggestions") && this.suggestionsPropChanged();
|
|
@@ -44,7 +43,7 @@ class $ extends u {
|
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
45
|
this._flowObserver || (this._flowObserver = new MutationObserver(() => {
|
|
47
|
-
|
|
46
|
+
g(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
48
47
|
}), this._flowObserver.observe(e, { attributes: !0, attributeFilter: ["id"], childList: !0 }));
|
|
49
48
|
}
|
|
50
49
|
_updateFilterValue(e) {
|
|
@@ -61,17 +60,17 @@ class $ extends u {
|
|
|
61
60
|
this.arcgisClose.emit();
|
|
62
61
|
}
|
|
63
62
|
_colorizeCode(e) {
|
|
64
|
-
e !== void 0 &&
|
|
63
|
+
e !== void 0 && f(e, this._selectedSuggestion.code, "arcade");
|
|
65
64
|
}
|
|
66
65
|
renderSuggestionGroups() {
|
|
67
66
|
return this.suggestions === void 0 ? null : v(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);
|
|
68
67
|
}
|
|
69
68
|
renderSuggestionListItems(e) {
|
|
70
|
-
return e =
|
|
69
|
+
return e = b(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>`;
|
|
71
70
|
}
|
|
72
71
|
renderSuggestionFlowItem() {
|
|
73
72
|
const e = this._selectedSuggestion;
|
|
74
|
-
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(
|
|
73
|
+
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(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${p(e.documentation) ?? ""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>` : null;
|
|
75
74
|
}
|
|
76
75
|
render() {
|
|
77
76
|
return this.closed ? null : 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>`;
|
|
@@ -4,12 +4,12 @@ import { Deferred as g, generateGuid as s, observeAncestorsMutation as B, getEle
|
|
|
4
4
|
import { LitElement as w, createEvent as i, noShadowRoot as E } from "@arcgis/lumina";
|
|
5
5
|
import { s as Q } from "../../chunks/setup-monaco.js";
|
|
6
6
|
import "../../chunks/sql-expr-contribution.js";
|
|
7
|
-
import { css as m } from "
|
|
7
|
+
import { css as m } from "lit";
|
|
8
8
|
import { load as h } from "@arcgis/lumina/controllers";
|
|
9
9
|
import { Range as M, Uri as c, KeyMod as n, KeyCode as t } from "monaco-editor";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
12
|
+
v4.34.0-next.47 */
|
|
13
13
|
const x = m`@layer{/*!-----------------------------------------------------------
|
|
14
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15
15
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { c as o } from "../../chunks/runtime.js";
|
|
2
|
-
import { ref as c } from "lit
|
|
3
|
-
import { html as s } from "lit";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { setFocusOnElement as
|
|
6
|
-
import { u
|
|
7
|
-
import { css as u } from "@lit/reactive-element/css-tag.js";
|
|
2
|
+
import { ref as c } from "lit/directives/ref.js";
|
|
3
|
+
import { css as n, html as s } from "lit";
|
|
4
|
+
import { LitElement as d, createEvent as a } from "@arcgis/lumina";
|
|
5
|
+
import { setFocusOnElement as h, createFilterExpression as f } from "@arcgis/components-utils";
|
|
6
|
+
import { u } from "../../chunks/useT9n.js";
|
|
8
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
8
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
11
|
-
const m =
|
|
9
|
+
v4.34.0-next.47 */
|
|
10
|
+
const m = n`: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
11
|
function g(l) {
|
|
13
12
|
l.key === "Enter" && l.stopPropagation();
|
|
14
13
|
}
|
|
15
|
-
class p extends
|
|
14
|
+
class p extends d {
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments), this._beforeBack = async () => {
|
|
18
17
|
this.removeLastPanelRenderer(), this._filterValue = "";
|
|
19
|
-
}, this.messages =
|
|
18
|
+
}, this.messages = u(), 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
19
|
}
|
|
21
20
|
static {
|
|
22
21
|
this.properties = { _filterValue: 16, _flowItemRenderers: 16, _mode: 16, _mutationCounter: 16, loading: 5, modelId: 1, closed: 5, variable: 0 };
|
|
@@ -51,7 +50,7 @@ class p extends n {
|
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
52
|
this._flowObserver || (this._flowObserver = new MutationObserver(() => {
|
|
54
|
-
|
|
53
|
+
h(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
55
54
|
}), this._flowObserver.observe(e, { attributes: !0, attributeFilter: ["id"], childList: !0 }));
|
|
56
55
|
}
|
|
57
56
|
_updateFilterValue(e) {
|
|
@@ -106,7 +105,7 @@ class p extends n {
|
|
|
106
105
|
}), r = !0), s`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${i}><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 ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader>` : s`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`;
|
|
107
106
|
}
|
|
108
107
|
renderEditorVariables(e) {
|
|
109
|
-
const t =
|
|
108
|
+
const t = f(this._filterValue), i = e.variables.filter((r) => r.passFilter(t));
|
|
110
109
|
return i.length ? i.map((r) => this.renderEditorVariable(r)) : s`<div class="notice-container">${this.messages.noitems}</div>`;
|
|
111
110
|
}
|
|
112
111
|
renderEditorVariable(e) {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { c as m } from "../../chunks/runtime.js";
|
|
2
|
-
import { ref as
|
|
3
|
-
import { html as s } from "lit";
|
|
4
|
-
import { setFocusOnElement as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { g as r, o as
|
|
7
|
-
import { f as
|
|
8
|
-
import { u as
|
|
9
|
-
import { css as v } from "@lit/reactive-element/css-tag.js";
|
|
2
|
+
import { ref as c } from "lit/directives/ref.js";
|
|
3
|
+
import { css as h, html as s } from "lit";
|
|
4
|
+
import { setFocusOnElement as u, addLTRMark as o, focusElement as f } from "@arcgis/components-utils";
|
|
5
|
+
import { LitElement as p, createEvent as a } from "@arcgis/lumina";
|
|
6
|
+
import { g as r, o as g, c as n, a as _ } from "../../chunks/markdown.js";
|
|
7
|
+
import { f as b } from "../../chunks/monaco-importer.js";
|
|
8
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
10
9
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
11
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
11
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
13
|
-
v4.34.0-next.
|
|
14
|
-
const y =
|
|
15
|
-
class I extends
|
|
12
|
+
v4.34.0-next.47 */
|
|
13
|
+
const y = h`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
|
+
class I extends p {
|
|
16
15
|
constructor() {
|
|
17
|
-
super(...arguments), this.messages =
|
|
16
|
+
super(...arguments), this.messages = v(), this._unselectItem = async () => {
|
|
18
17
|
this._selectedApiItem = void 0;
|
|
19
18
|
}, 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
19
|
}
|
|
@@ -25,7 +24,7 @@ class I extends f {
|
|
|
25
24
|
this.styles = y;
|
|
26
25
|
}
|
|
27
26
|
async load() {
|
|
28
|
-
await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener =
|
|
27
|
+
await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener = g(() => this._colorizeStyle = r());
|
|
29
28
|
}
|
|
30
29
|
willUpdate(e) {
|
|
31
30
|
if (e.has("languageId") && d(this.languageId), e.has("apiLibrary")) {
|
|
@@ -49,7 +48,7 @@ class I extends f {
|
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
50
|
this._flowObserver || (this._flowObserver = new MutationObserver(() => {
|
|
52
|
-
|
|
51
|
+
u(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
53
52
|
}), this._flowObserver.observe(e, { attributes: !0, attributeFilter: ["id"], childList: !0 }));
|
|
54
53
|
}
|
|
55
54
|
_emitItemSelected(e, i) {
|
|
@@ -72,21 +71,21 @@ class I extends f {
|
|
|
72
71
|
this._filterValue = e.currentTarget.value ?? "";
|
|
73
72
|
}
|
|
74
73
|
_elementToMarkdown(e) {
|
|
75
|
-
e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples),
|
|
74
|
+
e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples), _(e, this.languageId).catch(console.error));
|
|
76
75
|
}
|
|
77
76
|
renderApiCategory(e) {
|
|
78
|
-
const i =
|
|
79
|
-
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${
|
|
77
|
+
const i = b(e.items, "name", this._filterValue);
|
|
78
|
+
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${o(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;
|
|
80
79
|
}
|
|
81
80
|
renderApiItemFlowItem() {
|
|
82
81
|
const e = this._selectedApiItem;
|
|
83
|
-
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)} ${
|
|
82
|
+
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)} ${c(f)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? s`<div ${c(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
|
|
84
83
|
}
|
|
85
84
|
render() {
|
|
86
85
|
if (this.closed)
|
|
87
86
|
return null;
|
|
88
87
|
const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
|
|
89
|
-
return s`<style>${this._colorizeStyle}</style><calcite-flow ${
|
|
88
|
+
return s`<style>${this._colorizeStyle}</style><calcite-flow ${c(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>`;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
m("arcgis-language-api-panel", I);
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { c as o } from "../../chunks/runtime.js";
|
|
2
|
-
import { html as i } from "lit";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { generateGuid as
|
|
2
|
+
import { css as r, html as i } from "lit";
|
|
3
|
+
import { LitElement as n, createEvent as c, noShadowRoot as l, safeClassMap as s } from "@arcgis/lumina";
|
|
4
|
+
import { generateGuid as d } from "@arcgis/components-utils";
|
|
5
5
|
import { a } from "../../chunks/sql-expr-defaults.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import { css as g } from "@lit/reactive-element/css-tag.js";
|
|
6
|
+
import { u as p } from "../../chunks/useT9n.js";
|
|
7
|
+
import { createRef as h, ref as g } from "lit-html/directives/ref.js";
|
|
9
8
|
import { s as f } from "../../chunks/editor.js";
|
|
10
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
13
|
-
const _ =
|
|
14
|
-
class
|
|
11
|
+
v4.34.0-next.47 */
|
|
12
|
+
const _ = r`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
|
|
13
|
+
class u extends n {
|
|
15
14
|
constructor() {
|
|
16
|
-
super(...arguments), this._codeEditorElt =
|
|
15
|
+
super(...arguments), this._codeEditorElt = h(), this.messages = p(), this._modelId = d(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.arcgisScriptChange = c({ bubbles: !1 });
|
|
17
16
|
}
|
|
18
17
|
static {
|
|
19
18
|
this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5 };
|
|
20
19
|
}
|
|
21
20
|
static {
|
|
22
|
-
this.shadowRootOptions =
|
|
21
|
+
this.shadowRootOptions = l;
|
|
23
22
|
}
|
|
24
23
|
static {
|
|
25
24
|
this.styles = [_, f];
|
|
@@ -76,10 +75,10 @@ class m extends r {
|
|
|
76
75
|
}
|
|
77
76
|
render() {
|
|
78
77
|
const e = this._getFeatureSetVariable();
|
|
79
|
-
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} ${
|
|
78
|
+
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} ${g(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>`;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
o("arcgis-sql-expression-editor",
|
|
81
|
+
o("arcgis-sql-expression-editor", u);
|
|
83
82
|
export {
|
|
84
|
-
|
|
83
|
+
u as ArcgisSqlExpressionEditor
|
|
85
84
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { c as o } from "../../chunks/runtime.js";
|
|
2
|
-
import { repeat as a } from "lit
|
|
3
|
-
import { html as i } from "lit";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { a as
|
|
6
|
-
import { u as
|
|
7
|
-
import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
2
|
+
import { repeat as a } from "lit/directives/repeat.js";
|
|
3
|
+
import { css as r, html as i } from "lit";
|
|
4
|
+
import { LitElement as n, createEvent as c } from "@arcgis/lumina";
|
|
5
|
+
import { a as m } from "../../chunks/sql-expr-defaults.js";
|
|
6
|
+
import { u as d } from "../../chunks/useT9n.js";
|
|
8
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
8
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
11
|
-
const h =
|
|
12
|
-
class f extends
|
|
9
|
+
v4.34.0-next.47 */
|
|
10
|
+
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
|
+
class f extends n {
|
|
13
12
|
constructor() {
|
|
14
|
-
super(...arguments), this.messages =
|
|
13
|
+
super(...arguments), this.messages = d(), this._filterValue = "", this._flowItemRenderers = [], this._mutationCounter = 1, this.loading = !1, this.arcgisClose = c({ bubbles: !1 }), this.arcgisFieldSelected = c({ bubbles: !1 });
|
|
15
14
|
}
|
|
16
15
|
static {
|
|
17
16
|
this.properties = { _filterValue: 16, _flowItemRenderers: 16, _mutationCounter: 16, loading: 5, modelId: 1 };
|
|
@@ -46,7 +45,7 @@ class f extends r {
|
|
|
46
45
|
this.arcgisClose.emit();
|
|
47
46
|
}
|
|
48
47
|
render() {
|
|
49
|
-
const t =
|
|
48
|
+
const t = m.getFeatureLayerForModel(this.modelId ?? "");
|
|
50
49
|
return this.loading || !this.modelId || !t ? i`<calcite-block .heading=${this.messages.availablefields ?? ""}></calcite-block>` : i`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields ?? ""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields, (e) => e.name, (e) => i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias ?? ""} .value=${e.name}>${e.domain && i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${() => {
|
|
51
50
|
const s = e.domain;
|
|
52
51
|
s?.type === "coded-value" && (this._flowItemRenderers = [
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
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.34.0-next.
|
|
4
|
+
"version": "4.34.0-next.47",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
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.34/esri/copyright.txt for details.
|
|
6
|
-
v4.34.0-next.
|
|
6
|
+
v4.34.0-next.47 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@ 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.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
5
|
+
v4.34.0-next.47 */
|
|
6
6
|
const o = i(e, {
|
|
7
7
|
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
|
|
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"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.47",
|
|
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",
|
|
@@ -39,10 +39,11 @@
|
|
|
39
39
|
],
|
|
40
40
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcgis/arcade-languageservice": "4.34.0-next.
|
|
43
|
-
"@arcgis/components-utils": "4.34.0-next.
|
|
44
|
-
"@arcgis/languages-api-utils": "4.34.0-next.
|
|
45
|
-
"@arcgis/lumina": "4.34.0-next.
|
|
42
|
+
"@arcgis/arcade-languageservice": "4.34.0-next.47",
|
|
43
|
+
"@arcgis/components-utils": "4.34.0-next.47",
|
|
44
|
+
"@arcgis/languages-api-utils": "4.34.0-next.47",
|
|
45
|
+
"@arcgis/lumina": "4.34.0-next.47",
|
|
46
|
+
"lit": "^3.3.0",
|
|
46
47
|
"monaco-editor": "^0.52.0",
|
|
47
48
|
"tslib": "^2.8.1",
|
|
48
49
|
"vscode-languageserver-types": "^3.17.5"
|
package/dist/cdn/FJHYM2AU.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.45 */
|
|
4
|
-
import j from"./FLIBYULR.js";import"./JXGM3JD6.js";import i from"./SLSD32VB.js";import{a as v,c as r,d as I,e as n}from"./IP2NP65N.js";import{b as a}from"./VMFR2UM7.js";import{a as _}from"./GKDDSRJD.js";import"./LFOJWKJS.js";import e from"./WDTMSDTN.js";import d from"./CTE2KALO.js";import"./ANIBK6R6.js";import{g as b}from"./GRJD3YSJ.js";import"./7HAX2DYJ.js";import{C as f,g as p,h as s,l as o,y as g}from"./TOKFJNMD.js";import{d as h,e as u,q as c}from"./TKB26H6G.js";import"./OLOYINUO.js";import"./TXEBWUJB.js";export default $arcgis.t(([,,,d])=>{var $=p`: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)}}`,m=class extends g{constructor(){super(...arguments),this.messages=_(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._colorizeStyle="",this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=o({bubbles:!1}),this.arcgisItemSelected=o({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=$}async load(){await d(this.languageId),this._colorizeStyle=r(),this._themeChangedListener=I(()=>this._colorizeStyle=r())}willUpdate(e){if(e.has("languageId")&&d(this.languageId),e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples),v(e,this.languageId).catch(console.error))}renderApiCategory(e){let i=b(e.items,"name",this._filterValue);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}renderApiItemFlowItem(){let e=this._selectedApiItem;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)} ${a(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${c(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${a(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<style>${this._colorizeStyle}</style><calcite-flow ${a(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>`}};f("arcgis-language-api-panel",m);return m},d,e,i,j)
|
package/dist/cdn/LMGUIARR.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.45 */
|
|
4
|
-
import{b,c as r,d as _,e as v}from"./IP2NP65N.js";import{b as l}from"./VMFR2UM7.js";import{a as p}from"./GKDDSRJD.js";import"./LFOJWKJS.js";import{g as f}from"./GRJD3YSJ.js";import"./7HAX2DYJ.js";import{C as m,g as u,h as s,j as c,l as a,y as h}from"./TOKFJNMD.js";import{d as g,e as d}from"./TKB26H6G.js";import"./OLOYINUO.js";import"./TXEBWUJB.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.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}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 this.closed?null: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};
|