@arcgis/coding-components 4.29.0-beta.61 → 4.29.0-beta.63
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/arcgis-coding-components.esm.js +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +3 -3
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +23 -23
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +30 -30
- package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +7 -7
- package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +18 -18
- package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +20 -20
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +77 -77
- package/dist/arcgis-coding-components/index.esm.js +1 -1
- package/dist/arcgis-coding-components/{p-cfff9500.js → p-009eaccf.js} +1 -1
- package/dist/arcgis-coding-components/{p-2bd81bb5.js → p-2a665136.js} +2 -2
- package/dist/arcgis-coding-components/p-3ba4deea.js +1 -0
- package/dist/arcgis-coding-components/{p-4dce7d14.js → p-595d9a06.js} +2 -2
- package/dist/arcgis-coding-components/{p-665d75bc.js → p-7b6af57c.js} +2 -2
- package/dist/arcgis-coding-components/p-7d5fcf2e.js +63 -0
- package/dist/arcgis-coding-components/{p-e26e9f42.js → p-989439a0.js} +2 -2
- package/dist/arcgis-coding-components/{p-4e2e25e0.js → p-9b4a0643.js} +2 -2
- package/dist/arcgis-coding-components/{p-2e47d2b1.js → p-d7ca1083.js} +2 -2
- package/dist/arcgis-coding-components/p-e4efcbd0.entry.js +1 -0
- package/dist/arcgis-coding-components/{p-f7369d73.js → p-fcdd0366.js} +2 -2
- package/dist/cjs/{arcade-defaults-a0f45ab1.js → arcade-defaults-5c2ff166.js} +11507 -9772
- package/dist/cjs/{arcade-mode-579b4052.js → arcade-mode-23925c8d.js} +10 -9
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +47 -51
- package/dist/cjs/{css-7229b372.js → css-eb1c8e5c.js} +1 -1
- package/dist/cjs/{cssMode-c3cf6180.js → cssMode-2e878b70.js} +2 -2
- package/dist/cjs/{html-0017e4c9.js → html-847c7e39.js} +2 -2
- package/dist/cjs/{htmlMode-17c8c42c.js → htmlMode-7a36db6d.js} +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{javascript-8270accf.js → javascript-f5ca9a1a.js} +3 -3
- package/dist/cjs/{jsonMode-31e5160f.js → jsonMode-0d326a6e.js} +2 -2
- package/dist/cjs/{tsMode-db6b702f.js → tsMode-e4abe99d.js} +2 -2
- package/dist/cjs/{typescript-b962205d.js → typescript-c43b7258.js} +2 -2
- package/dist/components/arcade-api.js +6 -6
- package/dist/components/arcade-contribution.js +5 -5
- package/dist/components/arcade-defaults.js +35 -35
- package/dist/components/arcade-mode.js +9 -8
- package/dist/components/arcade-results.js +12 -12
- package/dist/components/arcade-suggestions.js +6 -6
- package/dist/components/arcade-variables.js +5 -5
- package/dist/components/arcgis-arcade-editor.js +20 -20
- package/dist/components/code-editor.js +9 -13
- package/dist/components/fields.js +2 -2
- package/dist/components/index2.js +2 -2
- package/dist/components/markdown.js +1 -1
- package/dist/components/utilities.js +2 -2
- package/dist/esm/{arcade-defaults-d96f16cd.js → arcade-defaults-7525fe7a.js} +11500 -9765
- package/dist/esm/{arcade-mode-8662cb42.js → arcade-mode-312bbd22.js} +10 -9
- package/dist/esm/arcgis-arcade-api_6.entry.js +47 -51
- package/dist/esm/{css-ff1e9f8c.js → css-aade9167.js} +1 -1
- package/dist/esm/{cssMode-eb4872e0.js → cssMode-71ce0374.js} +2 -2
- package/dist/esm/{html-074ac87c.js → html-37ae4460.js} +2 -2
- package/dist/esm/{htmlMode-3a5d257f.js → htmlMode-ae5b0f39.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{javascript-edca9928.js → javascript-ad435a4b.js} +3 -3
- package/dist/esm/{jsonMode-e7283fe9.js → jsonMode-b8bb4df0.js} +2 -2
- package/dist/esm/{tsMode-1dba46bc.js → tsMode-b967128d.js} +2 -2
- package/dist/esm/{typescript-21a54a2f.js → typescript-a9a22ab3.js} +2 -2
- package/dist/types/components/arcade-api/arcade-api.d.ts +3 -3
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +8 -8
- package/dist/types/components/arcade-results/arcade-results.d.ts +4 -4
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +5 -5
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +3 -3
- package/dist/types/components/code-editor/code-editor.d.ts +2 -2
- package/dist/types/components.d.ts +7 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/arcade-executor.d.ts +14 -14
- package/dist/types/utils/arcade-monaco/arcade-contribution.d.ts +1 -1
- package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +11 -10
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +5 -4
- package/dist/types/utils/arcade-monaco/arcade-mode.d.ts +1 -1
- package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +1 -1
- package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +2 -2
- package/dist/types/utils/arcade-monaco/arcade.worker.d.ts +2 -2
- package/dist/types/utils/arcade-monaco/types.d.ts +8 -10
- package/dist/types/utils/colorize.d.ts +1 -1
- package/dist/types/utils/functional-components.d.ts +1 -1
- package/dist/types/utils/profile/editor-profile.d.ts +16 -18
- package/dist/types/utils/profile/types.d.ts +14 -14
- package/dist/types/utils/profile/utils.d.ts +1 -1
- package/dist/types/utils/utilities.d.ts +1 -1
- package/package.json +7 -7
- package/dist/arcgis-coding-components/p-0e589f27.entry.js +0 -1
- package/dist/arcgis-coding-components/p-15c465b1.js +0 -1
- package/dist/arcgis-coding-components/p-abb70533.js +0 -62
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Host } f
|
|
|
2
2
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
3
3
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
4
4
|
import { f as filterCollection } from './utilities.js';
|
|
5
|
-
import {
|
|
5
|
+
import { W, B, j } from './index2.js';
|
|
6
6
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
7
7
|
import '@esri/calcite-components/dist/components/calcite-list-item.js';
|
|
8
8
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
@@ -19,7 +19,7 @@ function isSuggestionGroups(item) {
|
|
|
19
19
|
if (!item.length) {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
return Array.isArray(item[0]
|
|
22
|
+
return Array.isArray(item[0].suggestions);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const arcadeSuggestionsCss = ":host{background-color:var(--calcite-ui-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-ui-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-ui-foreground-2);padding:var(--calcite-spacing-half)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}";
|
|
@@ -72,12 +72,12 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
72
72
|
async componentWillLoad() {
|
|
73
73
|
this._colorizeStyle = generateColorizeStyles();
|
|
74
74
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
75
|
-
await
|
|
75
|
+
await W(this, getAssetPath("./assets"));
|
|
76
76
|
}
|
|
77
77
|
disconnectedCallback() {
|
|
78
78
|
this._flowObserver?.disconnect();
|
|
79
79
|
this._themeChangedListner?.dispose();
|
|
80
|
-
|
|
80
|
+
B(this);
|
|
81
81
|
}
|
|
82
82
|
// #endregion
|
|
83
83
|
//#region Private Methods
|
|
@@ -95,7 +95,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
95
95
|
// When switching between flow the same reference is reused
|
|
96
96
|
this._flowObserver = new MutationObserver(() => {
|
|
97
97
|
// Get the last panel and try to set focus on the input element
|
|
98
|
-
|
|
98
|
+
j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
99
99
|
});
|
|
100
100
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
101
101
|
}
|
|
@@ -122,7 +122,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
122
122
|
if (!suggestion) {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
|
-
return (h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => e?.setFocus(), "data-item": suggestion }, this._t9nStrings?.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref:
|
|
125
|
+
return (h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => void e?.setFocus(), "data-item": suggestion }, this._t9nStrings?.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref: (e) => e === undefined ? undefined : void colorizeCodeElement(e, suggestion.code).catch(console.error) })))));
|
|
126
126
|
}
|
|
127
127
|
render() {
|
|
128
128
|
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h(StickyFilterInput, { filterValue: this._filterValue, onCalciteInputInput: this._updateFilterValue }), h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
3
|
-
import {
|
|
3
|
+
import { W, B, j, Q } from './index2.js';
|
|
4
4
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
5
5
|
import '@esri/calcite-components/dist/components/calcite-flow-item.js';
|
|
6
6
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
@@ -69,10 +69,10 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
69
69
|
//#endregion
|
|
70
70
|
// #region Component lifecycle events
|
|
71
71
|
async componentWillLoad() {
|
|
72
|
-
await
|
|
72
|
+
await W(this, getAssetPath("./assets"));
|
|
73
73
|
}
|
|
74
74
|
disconnectedCallback() {
|
|
75
|
-
|
|
75
|
+
B(this);
|
|
76
76
|
this._flowObserver?.disconnect();
|
|
77
77
|
}
|
|
78
78
|
// #endregion
|
|
@@ -97,7 +97,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
97
97
|
// When switching between flow the same reference is reused
|
|
98
98
|
this._flowObserver = new MutationObserver(() => {
|
|
99
99
|
// Get the last panel and try to set focus on the input element
|
|
100
|
-
|
|
100
|
+
j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
101
101
|
});
|
|
102
102
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
103
103
|
}
|
|
@@ -125,7 +125,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
125
125
|
}
|
|
126
126
|
renderEditorVariables(collection) {
|
|
127
127
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
128
|
-
const filterExpression =
|
|
128
|
+
const filterExpression = Q(this._filterValue);
|
|
129
129
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
130
130
|
if (!filteredVariables.length) {
|
|
131
131
|
return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Fragment, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { editor, KeyCode } from 'monaco-editor';
|
|
3
3
|
import { e as executeScript, D as DevelopersWebSitePath, d as defineCustomElement$5 } from './arcade-results.js';
|
|
4
|
-
import {
|
|
4
|
+
import { h, F, $, W, B } from './index2.js';
|
|
5
5
|
import { s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
|
|
6
6
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
7
7
|
import '@esri/calcite-components/dist/components/calcite-action-bar.js';
|
|
@@ -80,8 +80,8 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
80
80
|
this.__registerHost();
|
|
81
81
|
this.scriptChange = createEvent(this, "scriptChange", 3);
|
|
82
82
|
this.diagnosticsChange = createEvent(this, "diagnosticsChange", 3);
|
|
83
|
-
this._componentReadyDefer = new
|
|
84
|
-
this._modelId =
|
|
83
|
+
this._componentReadyDefer = new h();
|
|
84
|
+
this._modelId = F();
|
|
85
85
|
this._editorProfilePromise = Promise.resolve(undefined);
|
|
86
86
|
this._disposables = [];
|
|
87
87
|
this._executeScript = async () => {
|
|
@@ -122,8 +122,8 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
122
122
|
e.stopPropagation();
|
|
123
123
|
this.scriptChange.emit(e.detail);
|
|
124
124
|
};
|
|
125
|
-
this._insertAsSnippet = (e) => this._codeEditorElt?.insertSnippet(e.detail);
|
|
126
|
-
this._insertAsText = (e) => this._codeEditorElt?.insertText(e.detail);
|
|
125
|
+
this._insertAsSnippet = async (e) => await this._codeEditorElt?.insertSnippet(e.detail);
|
|
126
|
+
this._insertAsText = async (e) => await this._codeEditorElt?.insertText(e.detail);
|
|
127
127
|
this._onResultPanelChange = (e) => (this._resultPanel = e.detail);
|
|
128
128
|
this._onExecutionPanelClose = () => (this._showExecutionPanel = false);
|
|
129
129
|
this._lang = "";
|
|
@@ -176,7 +176,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
176
176
|
*/
|
|
177
177
|
async getScript() {
|
|
178
178
|
await this._componentReadyDefer.promise;
|
|
179
|
-
return this._codeEditorElt?.getValue();
|
|
179
|
+
return await this._codeEditorElt?.getValue();
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Set the focus on the element.
|
|
@@ -192,7 +192,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
192
192
|
*/
|
|
193
193
|
async getEditorInstance() {
|
|
194
194
|
await this._componentReadyDefer.promise;
|
|
195
|
-
return this._codeEditorElt?.getEditorInstance();
|
|
195
|
+
return await this._codeEditorElt?.getEditorInstance();
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
* Returns the Arcade result for the script for the provided test data.
|
|
@@ -207,7 +207,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
207
207
|
}
|
|
208
208
|
await this._componentReadyDefer.promise;
|
|
209
209
|
const script = await this._codeEditorElt?.getValue();
|
|
210
|
-
return executeScript(editorProfile.definition, script, this.testData);
|
|
210
|
+
return await executeScript(editorProfile.definition, script, this.testData);
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* Returns the Arcade output type for the script.
|
|
@@ -222,7 +222,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
222
222
|
* @internal
|
|
223
223
|
*/
|
|
224
224
|
async updateThemeColors(colorRules) {
|
|
225
|
-
const theme =
|
|
225
|
+
const theme = $(this._hostElement);
|
|
226
226
|
updateThemeColors(theme, colorRules);
|
|
227
227
|
if (colorRules === undefined) {
|
|
228
228
|
["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
|
|
@@ -251,7 +251,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
251
251
|
// Starts a locale observer. It will load the correct t9n strings for the component
|
|
252
252
|
// when the locale changes. We also pass updateEditorProfile. It will be invoked the first
|
|
253
253
|
// and on each locale change. The profile has to be refreshed on locale change as well.
|
|
254
|
-
await
|
|
254
|
+
await W(this, assetsPath, async () => await this._updateEditorProfile());
|
|
255
255
|
}
|
|
256
256
|
async componentDidLoad() {
|
|
257
257
|
// Mark on component as ready.
|
|
@@ -279,7 +279,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
279
279
|
await this._codeEditorElt?.setFocus();
|
|
280
280
|
}
|
|
281
281
|
disconnectedCallback() {
|
|
282
|
-
|
|
282
|
+
B(this);
|
|
283
283
|
arcadeDefaults.disposeApiContextForModel(this._modelId);
|
|
284
284
|
arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
285
285
|
while (this._disposables.length) {
|
|
@@ -317,14 +317,14 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
317
317
|
if (!this.testData) {
|
|
318
318
|
return null;
|
|
319
319
|
}
|
|
320
|
-
return (h("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { text: this._t9nStrings?.run ?? "Run", "text-enabled": true, icon: "play", scale: "s", loading: this._preparingProfile, onClick: this._executeScript }), this._executionResult ? (h("calcite-action", { text: this._t9nStrings?.lastresults ?? "Last results", active: this._showExecutionPanel, "text-enabled": true, icon: "access-string-results", iconFlipRtl: true, scale: "s", onClick: this._toggleShowExecutionPanel })) : null)));
|
|
320
|
+
return (h$1("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h$1("calcite-action-group", { scale: "s" }, h$1("calcite-action", { text: this._t9nStrings?.run ?? "Run", "text-enabled": true, icon: "play", scale: "s", loading: this._preparingProfile, onClick: this._executeScript }), this._executionResult ? (h$1("calcite-action", { text: this._t9nStrings?.lastresults ?? "Last results", active: this._showExecutionPanel, "text-enabled": true, icon: "access-string-results", iconFlipRtl: true, scale: "s", onClick: this._toggleShowExecutionPanel })) : null)));
|
|
321
321
|
}
|
|
322
322
|
//#endregion
|
|
323
323
|
//#region Render Main Panel
|
|
324
324
|
renderMainPanel() {
|
|
325
325
|
return (
|
|
326
326
|
// <div class="flex-adjustable">
|
|
327
|
-
h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, onValueChange: this._emitScriptChange, ref: (e) => (this._codeEditorElt = e) })
|
|
327
|
+
h$1("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, onValueChange: this._emitScriptChange, ref: (e) => (this._codeEditorElt = e) })
|
|
328
328
|
// </div>
|
|
329
329
|
);
|
|
330
330
|
}
|
|
@@ -334,7 +334,7 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
334
334
|
if (this.hideSideBar) {
|
|
335
335
|
return null;
|
|
336
336
|
}
|
|
337
|
-
return (h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h("calcite-action-group", null, h("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), h("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (h(Fragment, null, h("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (h(Fragment, null, h("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this._t9nLocale === "ar", onClick: this._openArcadeHelp }))))));
|
|
337
|
+
return (h$1("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h$1("calcite-action-group", null, h$1("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), h$1("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (h$1(Fragment, null, h$1("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (h$1(Fragment, null, h$1("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this._t9nLocale === "ar", onClick: this._openArcadeHelp }))))));
|
|
338
338
|
}
|
|
339
339
|
// private renderTooltip(id: string, label: string | undefined): VNode | null {
|
|
340
340
|
// if (this.sideActionBarExpanded || !label) {
|
|
@@ -354,11 +354,11 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
354
354
|
}
|
|
355
355
|
switch (this.openedSidePanel) {
|
|
356
356
|
case "api":
|
|
357
|
-
return (h("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected: this._insertAsSnippet, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
357
|
+
return (h$1("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected: this._insertAsSnippet, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
358
358
|
case "variables":
|
|
359
|
-
return (h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
359
|
+
return (h$1("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
360
360
|
case "suggestions":
|
|
361
|
-
return (h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
361
|
+
return (h$1("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
362
362
|
default:
|
|
363
363
|
return null;
|
|
364
364
|
}
|
|
@@ -369,12 +369,12 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
369
369
|
if (!this._showExecutionPanel) {
|
|
370
370
|
return null;
|
|
371
371
|
}
|
|
372
|
-
return (h("arcgis-arcade-results", { class: "flex-adjustable", openedResultPanel: this._resultPanel, loading: this._executingScript, result: this._executionResult, consoleLogs: this._consoleLogs, onOpenedResultPanelChange: this._onResultPanelChange, onClose: this._onExecutionPanelClose }));
|
|
372
|
+
return (h$1("arcgis-arcade-results", { class: "flex-adjustable", openedResultPanel: this._resultPanel, loading: this._executingScript, result: this._executionResult, consoleLogs: this._consoleLogs, onOpenedResultPanelChange: this._onResultPanelChange, onClose: this._onExecutionPanelClose }));
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region Render
|
|
376
376
|
render() {
|
|
377
|
-
return (h(Host, null, this.renderMainActionBar(), h("div", { class: "flex-row flex-adjustable" }, h("div", { class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
377
|
+
return (h$1(Host, null, this.renderMainActionBar(), h$1("div", { class: "flex-row flex-adjustable" }, h$1("div", { class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
378
378
|
}
|
|
379
379
|
static get assetsDirs() { return ["assets"]; }
|
|
380
380
|
get _hostElement() { return this; }
|