@arcgis/coding-components 5.2.0-next.136 → 5.2.0-next.137
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/cdn/7GVCXLAE.js +2 -0
- package/dist/cdn/{WHOYO2EQ.js → BPCBI4SE.js} +3 -3
- package/dist/cdn/EQDKZIAP.js +2 -0
- package/dist/cdn/GDTEFKCP.js +2 -0
- package/dist/cdn/GJ4W3JPG.js +2 -0
- package/dist/cdn/J7TSCCXO.js +6 -0
- package/dist/cdn/JFO2HVZ6.js +2 -0
- package/dist/cdn/JGRWZYW5.js +3 -0
- package/dist/cdn/N56B3UDM.js +2 -0
- package/dist/cdn/{FFLWFFHU.js → OMJLVFHT.js} +1 -1
- package/dist/cdn/{YJ4WRZOI.js → ZJCPZ5ZN.js} +1 -1
- package/dist/cdn/assets/arcade-debugger-output/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +4585 -4421
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcade-defaults.js +95 -102
- package/dist/chunks/setup-monaco-theme.js +34 -67
- package/dist/chunks/sql-expr-mode.js +73 -61
- package/dist/chunks/sql-expr-service-accessors.js +35 -2
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +22 -23
- package/dist/components/arcgis-arcade-debugger-output/customElement.js +8 -8
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +12 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +104 -104
- package/dist/components/arcgis-code-editor/customElement.js +12 -11
- package/dist/components/arcgis-code-viewer/customElement.js +2 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +2 -0
- package/dist/components/arcgis-sql-expression-editor/customElement.js +13 -7
- package/dist/components/types.d.ts +11 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +6 -6
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cdn/DBAL7LSK.js +0 -2
- package/dist/cdn/EDJMOEXG.js +0 -2
- package/dist/cdn/FQWGIGBG.js +0 -2
- package/dist/cdn/M4ASZPOM.js +0 -2
- package/dist/cdn/SQQXRZAR.js +0 -2
- package/dist/cdn/XMKMX4RT.js +0 -2
- package/dist/cdn/XUI74PBQ.js +0 -2
- package/dist/cdn/YCA4A2EF.js +0 -6
|
@@ -6,9 +6,10 @@ import { slotChangeHasContent as _ } from "@arcgis/toolkit/dom/slots";
|
|
|
6
6
|
import { load as v } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { i as b } from "../../chunks/monaco-importer.js";
|
|
8
8
|
import { css as y, html as a } from "lit";
|
|
9
|
-
import { w as l, s as c } from "../../chunks/
|
|
9
|
+
import { w as l, s as c } from "../../chunks/sql-expr-service-accessors.js";
|
|
10
10
|
import { c as S, g as d, o as N } from "../../chunks/colorize.js";
|
|
11
11
|
import { s as E } from "../../chunks/arcade-service-accessors.js";
|
|
12
|
+
import "../../chunks/setup-monaco-theme.js";
|
|
12
13
|
import { debounce as T } from "@arcgis/toolkit/function";
|
|
13
14
|
import { Task as w } from "@lit/task";
|
|
14
15
|
import { rethrowError as C, log as L } from "@arcgis/toolkit/log";
|
|
@@ -72,6 +72,8 @@ export abstract class ArcgisSqlExpressionEditor extends LitElement {
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
accessor script: string;
|
|
75
|
+
/** Formats the current expression */
|
|
76
|
+
formatExpression(): Promise<void>;
|
|
75
77
|
/** Set the focus on the element. */
|
|
76
78
|
setFocus(): Promise<void>;
|
|
77
79
|
/** Emitted when the diagnostics collection has changed. */
|
|
@@ -6,10 +6,11 @@ import { generateGuid as d } from "@arcgis/toolkit/string";
|
|
|
6
6
|
import { a as s } from "../../chunks/sql-expr-defaults.js";
|
|
7
7
|
import { u as h } from "../../chunks/useT9n.js";
|
|
8
8
|
import { createRef as p, ref as g } from "lit/directives/ref.js";
|
|
9
|
-
import { getSqlExprDiagnosticService as
|
|
9
|
+
import { getSqlExprDiagnosticService as f } from "../../chunks/sql-expr-mode.js";
|
|
10
10
|
import { rethrowError as a } from "@arcgis/toolkit/log";
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import { w as _ } from "../../chunks/sql-expr-service-accessors.js";
|
|
12
|
+
const m = c`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`;
|
|
13
|
+
class u extends l {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), this._codeEditorElt = p(), this._disposables = [], this.messages = h(), this._modelId = d(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.hideDescriptionsInFieldsPanel = !1, this.arcgisDiagnosticsChange = o({ bubbles: !1 }), this.arcgisScriptChange = o({ bubbles: !1 });
|
|
15
16
|
}
|
|
@@ -17,11 +18,16 @@ class m extends l {
|
|
|
17
18
|
this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5, messageOverrides: 0, hideDescriptionsInFieldsPanel: 5 };
|
|
18
19
|
}
|
|
19
20
|
static {
|
|
20
|
-
this.styles = [
|
|
21
|
+
this.styles = [m];
|
|
21
22
|
}
|
|
22
23
|
async setFocus() {
|
|
23
24
|
await this._codeEditorElt.value?.setFocus();
|
|
24
25
|
}
|
|
26
|
+
async formatExpression() {
|
|
27
|
+
await _(s.languageId);
|
|
28
|
+
const i = this._codeEditorElt.value?.editorInstance?.getAction("editor.action.formatDocument");
|
|
29
|
+
i && await i.run();
|
|
30
|
+
}
|
|
25
31
|
async load() {
|
|
26
32
|
await this._updateEditorProfile().catch(a(this));
|
|
27
33
|
}
|
|
@@ -29,7 +35,7 @@ class m extends l {
|
|
|
29
35
|
(i.has("messages") || i.has("profile")) && this._updateDataModelDeps();
|
|
30
36
|
}
|
|
31
37
|
async loaded() {
|
|
32
|
-
const i = await
|
|
38
|
+
const i = await f();
|
|
33
39
|
this._disposables.push(i.onDiagnosticsChange((e) => !this._preparing && this.arcgisDiagnosticsChange.emit(e.diagnostics)));
|
|
34
40
|
}
|
|
35
41
|
disconnectedCallback() {
|
|
@@ -85,7 +91,7 @@ class m extends l {
|
|
|
85
91
|
return t`<arcgis-code-editor-shell><arcgis-code-editor slot=editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar && i && t`<arcgis-editor-variables slot=side-panel .variable=${i} .hideDescriptions=${this.hideDescriptionsInFieldsPanel} .closed=${this._activeAction !== "fields"} class=${r(this._activeAction === "fields" ? "" : "hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} data-panel-name=none .messageOverrides=${{ profileempty: this.messages.profileempty }}></arcgis-editor-variables>` || ""}${!this.hideSideBar && t`<arcgis-language-api-panel slot=side-panel class=${r(this._activeAction === "functions" ? "" : "hidden")} .closed=${this._activeAction !== "functions"} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${s.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && t`<calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}>${i && t`<calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${(e) => this._handleActionClick(e)}></calcite-action>` || ""}${i && !this.sideActionBarExpanded && t`<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=${(e) => this._handleActionClick(e)}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</arcgis-code-editor-shell>`;
|
|
86
92
|
}
|
|
87
93
|
}
|
|
88
|
-
n("arcgis-sql-expression-editor",
|
|
94
|
+
n("arcgis-sql-expression-editor", u);
|
|
89
95
|
export {
|
|
90
|
-
|
|
96
|
+
u as ArcgisSqlExpressionEditor
|
|
91
97
|
};
|
|
@@ -528,4 +528,15 @@ export interface IEditorTestContext extends IContextReferences {
|
|
|
528
528
|
* The key's value must be of type ArcGIS core ProfileVariableInstance.
|
|
529
529
|
*/
|
|
530
530
|
profileVariableInstances: ProfileVariableInstances;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/** An object containing overrides of documentation links within the arcade editor. */
|
|
534
|
+
export type ArcadeEditorLinkOverrides = {
|
|
535
|
+
/** URL for the Arcade Assistant help topic. */
|
|
536
|
+
"arcade-assistant-reference-doc"?: string;
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
/** Customizable configuration of documentation links used by the Arcade editor. */
|
|
540
|
+
export interface DocsConfig {
|
|
541
|
+
links: ArcadeEditorLinkOverrides;
|
|
531
542
|
}
|