@arcgis/coding-components 5.0.0-next.4 → 5.0.0-next.6
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/2NLVIJ6Y.js +4 -0
- package/dist/cdn/{BGIZGLQM.js → 2TB3BSZG.js} +2 -2
- package/dist/cdn/{R7W6KK2H.js → 3SZH7ITA.js} +2 -2
- package/dist/cdn/{K3HLNUN3.js → 5DVLH4XX.js} +2 -2
- package/dist/cdn/{LCZW3B7N.js → 5KKLALEW.js} +2 -2
- package/dist/cdn/{5FSBKVKQ.js → 5QMPRRXS.js} +1 -1
- package/dist/cdn/{3FEZDSNB.js → 6AYAG4HX.js} +2 -2
- package/dist/cdn/{UAZHYUCR.js → 7NAVZZHL.js} +2 -2
- package/dist/cdn/{KB76LTTC.js → AAO7M7EG.js} +2 -2
- package/dist/cdn/{GHIUUIGU.js → ACKXVYCM.js} +2 -2
- package/dist/cdn/{FDQW2JZP.js → AGESTIIU.js} +2 -2
- package/dist/cdn/{FE7N6CDJ.js → AUB7VUJV.js} +2 -2
- package/dist/cdn/BDBKNTZL.js +4 -0
- package/dist/cdn/{RH5UXNWX.js → DPSP57JD.js} +2 -2
- package/dist/cdn/{K37WFKC2.js → F7THRG76.js} +2 -2
- package/dist/cdn/{RZRLO4NG.js → FJHKAWQ4.js} +2 -2
- package/dist/cdn/{JOSF7ZA2.js → FWIY55RI.js} +4 -4
- package/dist/cdn/FZYDSYEO.js +4 -0
- package/dist/cdn/{YC3NBPAQ.js → GND6X3P2.js} +2 -2
- package/dist/cdn/{5OSALQXT.js → HV2LVRPK.js} +2 -2
- package/dist/cdn/{NLGBPZ2P.js → IDEYUZY7.js} +2 -2
- package/dist/cdn/{JOYL5GEI.js → IEYLE4CD.js} +1 -1
- package/dist/cdn/{EQVZCDO3.js → IN6SCSEJ.js} +1 -1
- package/dist/cdn/{URNR5U53.js → JQV6L7RS.js} +2 -2
- package/dist/cdn/{SPLKK6HG.js → KKVDJIZ6.js} +1 -1
- package/dist/cdn/{HDDL5AGR.js → KPPP7SXB.js} +1 -1
- package/dist/cdn/{II6MLFN4.js → M64QLEEQ.js} +2 -2
- package/dist/cdn/{SY4QXYQW.js → MIEFJ3RP.js} +2 -2
- package/dist/cdn/{Q42WMOLY.js → N5JS7BLE.js} +2 -2
- package/dist/cdn/{IHCXEYNW.js → NTSSIWMU.js} +2 -2
- package/dist/cdn/{PBOVRDKU.js → NVMWAEWO.js} +2 -2
- package/dist/cdn/{BD62Y5FD.js → PGWWBNDC.js} +1 -1
- package/dist/cdn/{OQUN2Y44.js → PUXLFKEV.js} +2 -2
- package/dist/cdn/{3PVOFPHA.js → Q4MGAVXA.js} +1 -1
- package/dist/cdn/{CNAVKVQM.js → RYPNU5HE.js} +2 -2
- package/dist/cdn/{TMHCX35V.js → TN5HTCXB.js} +2 -2
- package/dist/cdn/{NPJJJ2XO.js → TSB7MQ4H.js} +2 -2
- package/dist/cdn/{NGJ6NSQ5.js → TVGVG2ZX.js} +2 -2
- package/dist/cdn/{QFJLZUZ7.js → UIU7JMMF.js} +2 -2
- package/dist/cdn/{U2B45KEP.js → VPQVFQVA.js} +2 -2
- package/dist/cdn/{UXJAKAHX.js → VTZ3NPTR.js} +2 -2
- package/dist/cdn/{TD3YMCPG.js → WUQWXHMT.js} +2 -2
- package/dist/cdn/{S2MTGROM.js → ZRQZH7FM.js} +2 -2
- package/dist/cdn/{TNOFJN7L.js → ZX52GAEY.js} +2 -2
- 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 +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +3 -3
- package/dist/components/arcgis-arcade-results/customElement.js +68 -64
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +5 -5
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- 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/dist/monacoStyles.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/2ZOW6ATZ.js +0 -4
- package/dist/cdn/B6Q34BTW.js +0 -4
- package/dist/cdn/PIOVEW3Q.js +0 -4
package/dist/chunks/editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
-
v5.0.0-next.
|
|
4
|
+
v5.0.0-next.6 */
|
|
5
5
|
const i = e`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;
|
|
6
6
|
export {
|
|
7
7
|
i as s
|
package/dist/chunks/fields.js
CHANGED
|
@@ -15,7 +15,7 @@ import { filterApiLibraryForContext as de } from "@arcgis/languages-api-utils";
|
|
|
15
15
|
import { Emitter as G, Uri as E } from "monaco-editor";
|
|
16
16
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
17
17
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
18
|
-
v5.0.0-next.
|
|
18
|
+
v5.0.0-next.6 */
|
|
19
19
|
function k(t) {
|
|
20
20
|
return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && w(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
|
|
21
21
|
}
|
package/dist/chunks/markdown.js
CHANGED
|
@@ -4,7 +4,7 @@ import { IStandaloneThemeService as ie } from "monaco-editor/esm/vs/editor/stand
|
|
|
4
4
|
import { generateTokensCSSForColorMap as we } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
7
|
-
v5.0.0-next.
|
|
7
|
+
v5.0.0-next.6 */
|
|
8
8
|
async function ye(r, e) {
|
|
9
9
|
return await (await me()).colorize(r, e, { tabSize: 2 });
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
-
v5.0.0-next.
|
|
9
|
+
v5.0.0-next.6 */
|
|
10
10
|
function $(e, n, l, i) {
|
|
11
11
|
if (!n)
|
|
12
12
|
return [];
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
3
3
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.6 */
|
|
7
7
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
8
8
|
t.t = s;
|
|
9
9
|
t.o = r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import w from "@arcgis/core/request.js";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
-
v5.0.0-next.
|
|
4
|
+
v5.0.0-next.6 */
|
|
5
5
|
function d() {
|
|
6
6
|
return !!window.MonacoEnvironment?.getWorker;
|
|
7
7
|
}
|
|
@@ -9,7 +9,7 @@ import { a as n } from "./sql-expr-defaults.js";
|
|
|
9
9
|
import { g as m } from "./sql-expr-service-accessors.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.6 */
|
|
13
13
|
const s = /* @__PURE__ */ new Set();
|
|
14
14
|
function g(e, o) {
|
|
15
15
|
return () => {
|
|
@@ -4,7 +4,7 @@ import { fetchT9nStringsBundle as M } from "@arcgis/toolkit/intl";
|
|
|
4
4
|
import { g as b } from "./runtime.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
7
|
-
v5.0.0-next.
|
|
7
|
+
v5.0.0-next.6 */
|
|
8
8
|
const x = (r) => {
|
|
9
9
|
const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
|
|
10
10
|
return {
|
|
@@ -9,7 +9,7 @@ import { debounce as N } from "@arcgis/toolkit/function";
|
|
|
9
9
|
import { g as f } from "./sql-expr-service-accessors.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.6 */
|
|
13
13
|
let h = new _();
|
|
14
14
|
class k {
|
|
15
15
|
constructor(e) {
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/lumina/controllers";
|
|
|
2
2
|
import { g as t } from "./runtime.js";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
-
v5.0.0-next.
|
|
5
|
+
v5.0.0-next.6 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
|
@@ -17,7 +17,7 @@ import Z from "@arcgis/core/Graphic.js";
|
|
|
17
17
|
import { b as ee } from "../../chunks/language-defaults-base.js";
|
|
18
18
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
19
19
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
20
|
-
v5.0.0-next.
|
|
20
|
+
v5.0.0-next.6 */
|
|
21
21
|
const te = Q`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`;
|
|
22
22
|
class y extends Error {
|
|
23
23
|
constructor({
|
|
@@ -17,7 +17,7 @@ import { s as U } from "../../chunks/editor.js";
|
|
|
17
17
|
import j from "@arcgis/core/identity/IdentityManager.js";
|
|
18
18
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
19
19
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
20
|
-
v5.0.0-next.
|
|
20
|
+
v5.0.0-next.6 */
|
|
21
21
|
const z = w`@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}}}`, N = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", O = (s) => {
|
|
22
22
|
const { aiAssistantsEnabled: e } = s;
|
|
23
23
|
return e === void 0 ? (console.warn("areAiAssistantsEnabled is not defined in the organizations settings."), !1) : e;
|
|
@@ -91,10 +91,10 @@ class X extends y {
|
|
|
91
91
|
}
|
|
92
92
|
async load() {
|
|
93
93
|
const e = P("./assets");
|
|
94
|
-
I(e), await this.
|
|
94
|
+
I(e), await this._updateDataModelDeps(), await this._updateArcadeAssistantRemoteState();
|
|
95
95
|
}
|
|
96
96
|
willUpdate(e) {
|
|
97
|
-
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && c.updateApiContextForModel(this._modelId, {
|
|
97
|
+
(e.has("messages") || e.has("profile")) && this.hasUpdated && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && c.updateApiContextForModel(this._modelId, {
|
|
98
98
|
snippets: this.snippets
|
|
99
99
|
}), e.has("arcadeAssistant") && this._updateArcadeAssistantRemoteState();
|
|
100
100
|
}
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { css as
|
|
3
|
-
import { nothing as
|
|
4
|
-
import { setValuesInString as o, quoteString as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { s as
|
|
1
|
+
import { c as C } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as M, html as t } from "lit";
|
|
3
|
+
import { nothing as w, LitElement as F, createEvent as y, safeClassMap as v } from "@arcgis/lumina";
|
|
4
|
+
import { setValuesInString as o, quoteString as h } from "@arcgis/toolkit/string";
|
|
5
|
+
import { B as x, v as b, M as m, f as A, a as I, b as L } from "../../chunks/arcade-executor.js";
|
|
6
|
+
import { u as O } from "../../chunks/useT9n.js";
|
|
7
|
+
import { s as D } from "../../chunks/fields.js";
|
|
8
8
|
import "@arcgis/toolkit/function";
|
|
9
|
+
import { createRef as g, ref as $ } from "lit/directives/ref.js";
|
|
9
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
11
|
-
v5.0.0-next.
|
|
12
|
-
const
|
|
12
|
+
v5.0.0-next.6 */
|
|
13
|
+
const _ = M`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, a = {
|
|
13
14
|
lines: !0,
|
|
14
15
|
selectionMode: "none",
|
|
15
16
|
scale: "s",
|
|
16
|
-
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((
|
|
17
|
+
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((l) => l.selected = !1)
|
|
17
18
|
}, u = {
|
|
18
19
|
onClick: (e) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
20
|
+
const l = e.currentTarget;
|
|
21
|
+
l.expanded = !l.expanded;
|
|
21
22
|
}
|
|
22
|
-
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`,
|
|
23
|
+
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`, S = ({ value: e, subtree: l = !1 }) => t`<calcite-tree slot=${(l ? "children" : void 0) ?? w} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(), void 0, 2)}</calcite-tree-item></calcite-tree>`, k = ({ value: e, subtree: l = !1 }) => t`<calcite-tree slot=${(l ? "children" : void 0) ?? w} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${r({ name: "type" })}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${r({ name: "value" })}<span class="string-value">${JSON.stringify(e, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`, p = ({ arcadeResult: e }) => {
|
|
23
24
|
switch (e.type) {
|
|
24
25
|
case "unknown":
|
|
25
26
|
case "null":
|
|
26
27
|
return t`<span class="constant-value">${e.type}</span>`;
|
|
27
28
|
case "text":
|
|
28
|
-
return t`<span class="string-value">${
|
|
29
|
+
return t`<span class="string-value">${h(e.value)}</span>`;
|
|
29
30
|
case "number":
|
|
30
31
|
return t`<span class="number-value">${e.value.toString()}</span>`;
|
|
31
32
|
case "boolean":
|
|
32
33
|
return t`<span class="constant-value">${e.value.toString()}</span>`;
|
|
33
34
|
case "date":
|
|
34
|
-
return t`<span class="date-value">${
|
|
35
|
+
return t`<span class="date-value">${L(e)}</span>`;
|
|
35
36
|
case "dateOnly":
|
|
36
|
-
return t`<span class="string-value">${
|
|
37
|
+
return t`<span class="string-value">${h(I(e))}</span>`;
|
|
37
38
|
case "time":
|
|
38
|
-
return t`<span class="string-value">${
|
|
39
|
+
return t`<span class="string-value">${h(A(e))}</span>`;
|
|
39
40
|
default:
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
-
const s = e.value ?? [],
|
|
44
|
-
return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${
|
|
43
|
+
}, T = ({ arcadeResult: e, t9nStrings: l }) => {
|
|
44
|
+
const s = e.value ?? [], i = Math.max(s.length - m, 0);
|
|
45
|
+
return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${i > 0 ? t`<span> ${o(l.showingfirstitemsformat, {
|
|
45
46
|
count: m.toString()
|
|
46
47
|
})}</span>` : null}`;
|
|
47
|
-
},
|
|
48
|
-
const
|
|
49
|
-
return t`<calcite-tree slot=${"children"} .lines=${
|
|
50
|
-
const n =
|
|
51
|
-
return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null :
|
|
52
|
-
})}${
|
|
53
|
-
},
|
|
54
|
-
count:
|
|
55
|
-
})}</span>` : null}</div>`,
|
|
56
|
-
const n =
|
|
57
|
-
return
|
|
58
|
-
})}</calcite-tree>`,
|
|
48
|
+
}, P = ({ value: e, subtree: l, t9nStrings: s }) => {
|
|
49
|
+
const i = e.geometry?.();
|
|
50
|
+
return t`<calcite-tree slot=${"children"} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.keys().map((c) => {
|
|
51
|
+
const n = b(e.field(c));
|
|
52
|
+
return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null : f({ arcadeResult: n, name: c, t9nStrings: s });
|
|
53
|
+
})}${i ? f({ arcadeResult: { type: "geometry", value: i }, name: "geometry", t9nStrings: s }) : null}</calcite-tree>`;
|
|
54
|
+
}, z = ({ arcadeResult: e, t9nStrings: l }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= x ? t`<span> ${o(l.showingfirstitemsformat, {
|
|
55
|
+
count: x.toString()
|
|
56
|
+
})}</span>` : null}</div>`, R = ({ items: e, subtree: l, t9nStrings: s }) => t`<calcite-tree slot=${"children"} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.map((i, c) => {
|
|
57
|
+
const n = b(i);
|
|
58
|
+
return f({ arcadeResult: n, name: c, expanded: !l, t9nStrings: s });
|
|
59
|
+
})}</calcite-tree>`, f = ({ arcadeResult: e, name: l, expanded: s, t9nStrings: i }) => {
|
|
59
60
|
switch (e.type) {
|
|
60
61
|
case "null":
|
|
61
62
|
case "unknown":
|
|
@@ -65,85 +66,88 @@ const D = C`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
65
66
|
case "dateOnly":
|
|
66
67
|
case "time":
|
|
67
68
|
case "boolean":
|
|
68
|
-
return t`<calcite-tree-item><div class="tree-item-label">${r({ name:
|
|
69
|
+
return t`<calcite-tree-item><div class="tree-item-label">${r({ name: l })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
|
|
69
70
|
case "array": {
|
|
70
71
|
const n = (e.value ?? []).slice(0, m);
|
|
71
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
72
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}${T({ arcadeResult: e, t9nStrings: i })}</div>${R({ items: n, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
72
73
|
}
|
|
73
74
|
case "geometry":
|
|
74
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
75
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${k({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
75
76
|
case "attachment":
|
|
76
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
77
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${S({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
77
78
|
case "feature":
|
|
78
79
|
case "dictionary":
|
|
79
80
|
case "portal":
|
|
80
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
81
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${P({ value: e.value, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
81
82
|
default:
|
|
82
83
|
return null;
|
|
83
84
|
}
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
return t`<table><thead><tr>${
|
|
85
|
+
}, N = ({ arcadeResult: e }) => {
|
|
86
|
+
const l = D(e.value.fields);
|
|
87
|
+
return t`<table><thead><tr>${l.map((s) => t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map((s) => t`<tr>${l.map((i) => {
|
|
87
88
|
try {
|
|
88
|
-
const
|
|
89
|
-
return t`<td>${p({ arcadeResult:
|
|
89
|
+
const c = b(s.field(i.name));
|
|
90
|
+
return t`<td>${p({ arcadeResult: c })}</td>`;
|
|
90
91
|
} catch {
|
|
91
92
|
return t`<td></td>`;
|
|
92
93
|
}
|
|
93
94
|
})}</tr>`)}</tbody></table>`;
|
|
94
95
|
}, d = {
|
|
95
96
|
onClick: (e) => {
|
|
96
|
-
const
|
|
97
|
-
|
|
97
|
+
const l = e.currentTarget;
|
|
98
|
+
l.expanded = !l.expanded;
|
|
98
99
|
}
|
|
99
100
|
};
|
|
100
|
-
class
|
|
101
|
+
class j extends F {
|
|
101
102
|
constructor() {
|
|
102
|
-
super(...arguments), this.messages =
|
|
103
|
+
super(...arguments), this.messages = O(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.arcgisClose = y({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = y({ bubbles: !1 });
|
|
103
104
|
}
|
|
104
105
|
static {
|
|
105
106
|
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
|
|
106
107
|
}
|
|
107
108
|
static {
|
|
108
|
-
this.styles =
|
|
109
|
+
this.styles = _;
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
this.openedResultPanel
|
|
111
|
+
loaded() {
|
|
112
|
+
this.openedResultPanel && (this.openedResultPanel === "output" && this.outputRef.value ? this.outputRef.value.setFocus() : this.openedResultPanel === "console" && this.consoleRef.value ? this.consoleRef.value.setFocus() : this.openedResultPanel === "log" && this.logRef.value && this.logRef.value.setFocus());
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
updateResultPanel(l) {
|
|
115
|
+
this.openedResultPanel = l, this.arcgisOpenedResultPanelChange.emit(l);
|
|
116
|
+
}
|
|
117
|
+
_switchResultPanel(l) {
|
|
118
|
+
const s = l.currentTarget.dataset.panelName;
|
|
115
119
|
s && this.updateResultPanel(s);
|
|
116
120
|
}
|
|
117
121
|
_emitClose() {
|
|
118
122
|
this.arcgisClose.emit();
|
|
119
123
|
}
|
|
120
124
|
renderConsolePanel() {
|
|
121
|
-
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((
|
|
125
|
+
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((l) => t`<p>${l}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
|
|
122
126
|
}
|
|
123
127
|
renderLogPanel() {
|
|
124
128
|
if (this.openedResultPanel !== "log")
|
|
125
129
|
return null;
|
|
126
130
|
if (this.loading)
|
|
127
131
|
return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
|
|
128
|
-
const
|
|
132
|
+
const l = this.result?.type === "error" ? "color-error" : "color-success";
|
|
129
133
|
return t`<calcite-list label=results>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
|
|
130
134
|
timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
|
|
131
135
|
dateStyle: "medium",
|
|
132
136
|
timeStyle: "medium"
|
|
133
137
|
}).format(this.result.timeStamp)
|
|
134
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${v(
|
|
138
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.compilationtimeformat, {
|
|
135
139
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
136
140
|
style: "unit",
|
|
137
141
|
unit: "millisecond",
|
|
138
142
|
maximumFractionDigits: 2
|
|
139
143
|
}).format(this.result.compilationTime ?? 0)
|
|
140
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${v(
|
|
144
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.executiontimeformat, {
|
|
141
145
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
142
146
|
style: "unit",
|
|
143
147
|
unit: "millisecond",
|
|
144
148
|
maximumFractionDigits: 2
|
|
145
149
|
}).format(this.result.executionTime ?? 0)
|
|
146
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${v(
|
|
150
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item>` : t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`;
|
|
147
151
|
}
|
|
148
152
|
renderOutputPanel() {
|
|
149
153
|
if (this.openedResultPanel !== "output")
|
|
@@ -165,18 +169,18 @@ class z extends M {
|
|
|
165
169
|
return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${p({ arcadeResult: this.result })}</div>`;
|
|
166
170
|
case "array": {
|
|
167
171
|
const s = (this.result.value ?? []).slice(0, m);
|
|
168
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
172
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${T({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${R({ items: s, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
169
173
|
}
|
|
170
174
|
case "geometry":
|
|
171
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
175
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${k({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
172
176
|
case "attachment":
|
|
173
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
177
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${S({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
174
178
|
case "feature":
|
|
175
179
|
case "dictionary":
|
|
176
180
|
case "portal":
|
|
177
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
181
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${P({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
178
182
|
case "featureSet":
|
|
179
|
-
return t`<div class="result-value-table ltr-container">${
|
|
183
|
+
return t`<div class="result-value-table ltr-container">${z({ arcadeResult: this.result, t9nStrings: this.messages })}${N({ arcadeResult: this.result })}</div>`;
|
|
180
184
|
case "knowledgeGraph":
|
|
181
185
|
return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;
|
|
182
186
|
default:
|
|
@@ -184,10 +188,10 @@ class z extends M {
|
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
render() {
|
|
187
|
-
return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
|
|
191
|
+
return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${$(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${$(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${$(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
|
-
|
|
194
|
+
C("arcgis-arcade-results", j);
|
|
191
195
|
export {
|
|
192
|
-
|
|
196
|
+
j as ArcgisArcadeResults
|
|
193
197
|
};
|
|
@@ -8,7 +8,7 @@ import { f as b } from "../../chunks/monaco-importer.js";
|
|
|
8
8
|
import { u as _ } from "../../chunks/useT9n.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
11
|
-
v5.0.0-next.
|
|
11
|
+
v5.0.0-next.6 */
|
|
12
12
|
function v(o) {
|
|
13
13
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as a, c as d } from "../../chunks/runtime.js";
|
|
2
2
|
import { i as c } from "../../chunks/monaco-importer.js";
|
|
3
|
-
import { observeAncestorsMutation as
|
|
3
|
+
import { observeAncestorsMutation as h, unsafeGetCalciteModeName as l } from "@arcgis/toolkit/dom";
|
|
4
4
|
import { generateGuid as u } from "@arcgis/toolkit/string";
|
|
5
5
|
import { Deferred as m } from "@arcgis/toolkit/promise";
|
|
6
6
|
import { LitElement as p, createEvent as o, noShadowRoot as g } from "@arcgis/lumina";
|
|
@@ -11,7 +11,7 @@ import { load as I } from "@arcgis/lumina/controllers";
|
|
|
11
11
|
import { Range as v, Uri as s, KeyMod as n, KeyCode as r } from "monaco-editor";
|
|
12
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
14
|
-
v5.0.0-next.
|
|
14
|
+
v5.0.0-next.6 */
|
|
15
15
|
const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`, b = {
|
|
16
16
|
autoIndent: "advanced",
|
|
17
17
|
automaticLayout: !0,
|
|
@@ -78,7 +78,7 @@ class y extends p {
|
|
|
78
78
|
this.value = this._editorInstance?.getValue() ?? "", this.arcgisValueChange.emit(this.value);
|
|
79
79
|
}), this._editorInstance.onDidChangeCursorSelection((i) => {
|
|
80
80
|
this.arcgisSelectionChange.emit({ selection: i.selection, model: this._editorInstance?.getModel() });
|
|
81
|
-
}), this._themeObserver =
|
|
81
|
+
}), this._themeObserver = h(this.el, ["class"], () => this.updateTheme()), this.updateTheme(), new ResizeObserver(() => this._editorInstance?.layout()).observe(this.el), this.addCommonEditorActions(), () => {
|
|
82
82
|
for (this._editorInstance?.getModel()?.dispose(); this._disposables.length; )
|
|
83
83
|
this._disposables.pop()?.dispose();
|
|
84
84
|
this._themeObserver?.();
|
|
@@ -86,7 +86,7 @@ class y extends p {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
willUpdate(e) {
|
|
89
|
-
e.has("value") && this._updateModelValue(), (e.has("language") || e.has("modelId")) && this._updateModel(), e.has("editorOptions") && this._editorInstance?.updateOptions(this.editorOptions ?? {});
|
|
89
|
+
e.has("value") && this._updateModelValue(), (e.has("language") || e.has("modelId")) && this.hasUpdated && this._updateModel(), e.has("editorOptions") && this._editorInstance?.updateOptions(this.editorOptions ?? {});
|
|
90
90
|
}
|
|
91
91
|
_updateModelValue() {
|
|
92
92
|
if (!this._editorInstance)
|
|
@@ -107,7 +107,7 @@ class y extends p {
|
|
|
107
107
|
return this.modelId ? s.parse(this.modelId) : s.parse("");
|
|
108
108
|
}
|
|
109
109
|
updateTheme() {
|
|
110
|
-
const e =
|
|
110
|
+
const e = l(this.el) === "light" ? "vs" : "vs-dark";
|
|
111
111
|
e !== this._currentTheme && (this._currentTheme = e, this._monacoEditor.setTheme(e));
|
|
112
112
|
}
|
|
113
113
|
addCommonEditorActions() {
|
|
@@ -7,7 +7,7 @@ import { createFilterExpression as f } from "@arcgis/toolkit/string";
|
|
|
7
7
|
import { u as m } from "../../chunks/useT9n.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
10
|
-
v5.0.0-next.
|
|
10
|
+
v5.0.0-next.6 */
|
|
11
11
|
const u = 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
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -10,7 +10,7 @@ import { u as v } from "../../chunks/useT9n.js";
|
|
|
10
10
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
11
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
13
|
-
v5.0.0-next.
|
|
13
|
+
v5.0.0-next.6 */
|
|
14
14
|
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)}}`;
|
|
15
15
|
class I extends p {
|
|
16
16
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { s as f } from "../../chunks/editor.js";
|
|
|
9
9
|
import { getSqlExprDiagnosticService as _ } from "../../chunks/sql-expr-mode.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.6 */
|
|
13
13
|
const u = n`@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%}}`;
|
|
14
14
|
class m extends c {
|
|
15
15
|
constructor() {
|
|
@@ -6,7 +6,7 @@ import { a as m } from "../../chunks/sql-expr-defaults.js";
|
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
-
v5.0.0-next.
|
|
9
|
+
v5.0.0-next.6 */
|
|
10
10
|
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
11
|
class g extends n {
|
|
12
12
|
constructor() {
|
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": "5.0.0-next.
|
|
4
|
+
"version": "5.0.0-next.6",
|
|
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/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.6 */
|
|
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 s } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
-
v5.0.0-next.
|
|
5
|
+
v5.0.0-next.6 */
|
|
6
6
|
const a = s(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"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|