@arcgis/coding-components 4.34.0-next.4 → 4.34.0-next.5
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/{5W5U53FB.js → 2YGBBKC6.js} +2 -2
- package/dist/cdn/{Q3JWFB47.js → 3P4SHQ4F.js} +2 -2
- package/dist/cdn/{RTPQ63T7.js → 4OWQEOVK.js} +2 -2
- package/dist/cdn/{LWATQ4SL.js → AADZGDTT.js} +2 -2
- package/dist/cdn/{L4H7IVWJ.js → AJO5MR2D.js} +2 -2
- package/dist/cdn/{UEPVWCWQ.js → CKQRKFCV.js} +1 -1
- package/dist/cdn/{ZB3QMM6Z.js → D7NHVE3F.js} +2 -2
- package/dist/cdn/{RGJGHR4B.js → DPJHX5QN.js} +2 -2
- package/dist/cdn/{LP5TBEVL.js → F3QQPAID.js} +1 -1
- package/dist/cdn/{7GKZUSUT.js → FL32SFRF.js} +2 -2
- package/dist/cdn/{BS7L4PFY.js → FLTEBLV3.js} +2 -2
- package/dist/cdn/{DC6AP4ZI.js → G7G2I77O.js} +4 -4
- package/dist/cdn/{O3SBRZL6.js → GYNWYL57.js} +2 -2
- package/dist/cdn/{POHSJQCF.js → H3SZYPLP.js} +2 -2
- package/dist/cdn/{PJX2MXZB.js → HEXUEJHB.js} +2 -2
- package/dist/cdn/{UHHP3BIV.js → HI5IRVPS.js} +2 -2
- package/dist/cdn/{ARM44GXS.js → IRHKOOPR.js} +2 -2
- package/dist/cdn/{54OCYIGS.js → ISHOFB3V.js} +1 -1
- package/dist/cdn/L4THRZDH.js +4 -0
- package/dist/cdn/{FYYRTZD6.js → LAJHA3QM.js} +2 -2
- package/dist/cdn/{E2QHGSDM.js → MJC4S5GE.js} +2 -2
- package/dist/cdn/{UKTZ6PS3.js → MLALS3HH.js} +2 -2
- package/dist/cdn/{N5CO2N5G.js → MNVZNW5A.js} +2 -2
- package/dist/cdn/{THSDKZAV.js → MSBFP3SG.js} +2 -2
- package/dist/cdn/{CX635E4R.js → P67HCZK6.js} +2 -2
- package/dist/cdn/{RJ5463RF.js → PLYBUKIY.js} +2 -2
- package/dist/cdn/{JETLFAWJ.js → PNXRGAXI.js} +2 -2
- package/dist/cdn/{OKNQSCLO.js → PPRDT36L.js} +2 -2
- package/dist/cdn/{RQ23YX4Y.js → PRSLFNKW.js} +2 -2
- package/dist/cdn/{JQOKZ66I.js → PXUWLZZA.js} +2 -2
- package/dist/cdn/{O74DGU7J.js → Q7IQOYZI.js} +1 -1
- package/dist/cdn/{WBN37U56.js → TA7H3XCV.js} +2 -2
- package/dist/cdn/{Z6JHW4EV.js → TBNI35J4.js} +2 -2
- package/dist/cdn/{FZSEXKIS.js → TP6M53SH.js} +2 -2
- package/dist/cdn/{EQJHFXEJ.js → U2FESHVZ.js} +2 -2
- package/dist/cdn/{APTPPRWK.js → V3ZGRUMF.js} +2 -2
- package/dist/cdn/{XFA77AWY.js → VDOOZTDB.js} +2 -2
- package/dist/cdn/{N2KHVO5S.js → VPMWJICM.js} +2 -2
- package/dist/cdn/{XJLYTCL5.js → XU6CB7N4.js} +1 -1
- package/dist/cdn/{GGHNFJSP.js → YUQSUNTL.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/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +129 -131
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +7 -2
- package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +4 -2
- package/dist/components/arcgis-arcade-coding-assistant/index.js +4 -2
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- 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/package.json +5 -5
- package/dist/cdn/B5WKU3A7.js +0 -5
package/dist/chunks/runtime.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
2
2
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
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.5 */
|
|
6
6
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
7
7
|
t.t = s;
|
|
8
8
|
t.o = r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i from "@arcgis/core/request.js";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
-
v4.34.0-next.
|
|
4
|
+
v4.34.0-next.5 */
|
|
5
5
|
function p() {
|
|
6
6
|
return !!window.MonacoEnvironment?.getWorkerUrl;
|
|
7
7
|
}
|
|
@@ -8,7 +8,7 @@ import { g as c } from "./arcade-service-accessors.js";
|
|
|
8
8
|
import { a as n } from "./sql-expr-defaults.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.5 */
|
|
12
12
|
const s = /* @__PURE__ */ new Set();
|
|
13
13
|
function g(e, o) {
|
|
14
14
|
return () => {
|
|
@@ -4,7 +4,7 @@ import { fetchT9nStringsBundle as M } from "@arcgis/components-utils";
|
|
|
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/4.34/esri/copyright.txt for details.
|
|
7
|
-
v4.34.0-next.
|
|
7
|
+
v4.34.0-next.5 */
|
|
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 {
|
|
@@ -7,7 +7,7 @@ import { Deferred as _, debounce as N } from "@arcgis/components-utils";
|
|
|
7
7
|
import { a as d } from "./sql-expr-defaults.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
10
|
+
v4.34.0-next.5 */
|
|
11
11
|
let h = new _();
|
|
12
12
|
class k {
|
|
13
13
|
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/4.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
5
|
+
v4.34.0-next.5 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { html as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { ref as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import { b as
|
|
1
|
+
import { c as T } from "../../chunks/runtime.js";
|
|
2
|
+
import { html as o } from "lit-html";
|
|
3
|
+
import { nothing as V, LitElement as I, safeClassMap as D } from "@arcgis/lumina";
|
|
4
|
+
import { ref as P, createRef as _ } from "lit/directives/ref.js";
|
|
5
|
+
import j from "@arcgis/core/identity/IdentityManager.js";
|
|
6
|
+
import { u as N } from "../../chunks/useT9n.js";
|
|
7
|
+
import { b as O } from "../../chunks/arcade-defaults.js";
|
|
8
8
|
import { css as U } from "@lit/reactive-element/css-tag.js";
|
|
9
9
|
import "lit";
|
|
10
10
|
import $ from "@arcgis/core/request.js";
|
|
11
|
-
import { a as A, e as
|
|
11
|
+
import { a as A, e as S } from "../../chunks/monaco-importer.js";
|
|
12
12
|
import "@arcgis/components-utils";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import { unsafeHTML as z } from "lit/directives/unsafe-html.js";
|
|
14
|
+
import H from "@arcgis/core/layers/FeatureLayer.js";
|
|
15
|
+
import Q from "@arcgis/core/Graphic.js";
|
|
16
16
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
17
17
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
18
|
-
v4.34.0-next.
|
|
19
|
-
const
|
|
20
|
-
function
|
|
18
|
+
v4.34.0-next.5 */
|
|
19
|
+
const B = U`:host(:not([closed])){flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w)}:host([closed]){display:none}.response-actions{display:flex;align-items:center;padding:.5rem;gap:.5rem}.response-actions>div{display:flex;gap:.5rem}.prompt-list calcite-list-item{margin-block-end:.5rem;border-radius:var(--calcite-corner-radius-round);--calcite-color-border-3: transparent;overflow:hidden}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: auto;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-list-item:focus calcite-button{position:relative;top:-2px}.prompt-list calcite-list-item:last-of-type{margin-block-end:0}calcite-list{--calcite-color-foreground-1: transparent;background-color:transparent}calcite-list-item{--calcite-color-foreground-1: white}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent}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;flex-direction:column;background:#fff;border-radius:4px;margin:.75rem;width:calc(100% - 1.5rem);overflow:hidden;max-width:calc(100% - 1.5rem);--calcite-color-border-input: transparent;--calcite-text-area-divider-color: transparent;position:sticky;align-self:flex-end;box-shadow:var(--calcite-shadow-sm);flex:none}.text-area-wrapper calcite-button:last-of-type{margin-inline-start:auto;align-self:flex-end}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:4px 4px 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:2rem auto .25rem;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)}`;
|
|
20
|
+
function R(i) {
|
|
21
21
|
if (!i)
|
|
22
22
|
return;
|
|
23
23
|
const e = i.indexOf('{"error":');
|
|
@@ -30,55 +30,55 @@ function S(i) {
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
async function
|
|
34
|
-
const { baseUrl: e, skillId: t, message: s, authToken:
|
|
33
|
+
async function L(i) {
|
|
34
|
+
const { baseUrl: e, skillId: t, message: s, authToken: a, previousConversationId: r, context: n } = i, c = t ? `${e}/skills/${t}/chat` : `${e}/chat`, l = [], d = {
|
|
35
35
|
message: s,
|
|
36
|
-
context:
|
|
36
|
+
context: n
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
r && (d.conversation_id = r);
|
|
39
39
|
let f;
|
|
40
40
|
try {
|
|
41
|
-
f = await $(
|
|
41
|
+
f = await $(c, {
|
|
42
42
|
method: "post",
|
|
43
43
|
headers: {
|
|
44
44
|
"Content-Type": "application/json",
|
|
45
|
-
token:
|
|
45
|
+
token: a
|
|
46
46
|
},
|
|
47
47
|
body: JSON.stringify(d),
|
|
48
48
|
responseType: "json"
|
|
49
49
|
});
|
|
50
50
|
} catch (h) {
|
|
51
|
-
const
|
|
52
|
-
`Failed to send message: ${s}. Response: ${
|
|
51
|
+
const m = h?.details?.rawResponse || h?.message || String(h), k = R(m), g = new Error(
|
|
52
|
+
`Failed to send message: ${s}. Response: ${m}`
|
|
53
53
|
);
|
|
54
54
|
throw k && (g.arcadeAssistantError = k), g;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
56
|
+
const b = f.data;
|
|
57
|
+
if (!b.hasMore)
|
|
58
58
|
throw new Error("Expected hasMore to be true");
|
|
59
|
-
l.push(
|
|
60
|
-
const
|
|
61
|
-
let
|
|
62
|
-
async function
|
|
59
|
+
l.push(b);
|
|
60
|
+
const M = b.conversationId, q = b.inquiryId;
|
|
61
|
+
let v = b.sequenceNumber;
|
|
62
|
+
async function F() {
|
|
63
63
|
let h = 0;
|
|
64
|
-
const
|
|
65
|
-
for (; h <
|
|
64
|
+
const m = 25;
|
|
65
|
+
for (; h < m; ) {
|
|
66
66
|
await new Promise((u) => setTimeout(u, 1e3));
|
|
67
|
-
const k =
|
|
67
|
+
const k = W(M, v, q);
|
|
68
68
|
let g;
|
|
69
69
|
try {
|
|
70
|
-
g = await $(
|
|
70
|
+
g = await $(c, {
|
|
71
71
|
method: "post",
|
|
72
72
|
headers: {
|
|
73
73
|
"Content-Type": "application/json",
|
|
74
|
-
token:
|
|
74
|
+
token: a
|
|
75
75
|
},
|
|
76
76
|
body: JSON.stringify(k),
|
|
77
77
|
responseType: "json"
|
|
78
78
|
});
|
|
79
79
|
} catch (u) {
|
|
80
|
-
const
|
|
81
|
-
`Polling failed. Response: ${
|
|
80
|
+
const y = u?.details?.rawResponse || u?.message || String(u), x = R(y), w = new Error(
|
|
81
|
+
`Polling failed. Response: ${y}`
|
|
82
82
|
);
|
|
83
83
|
throw x && (w.arcadeAssistantError = x), w;
|
|
84
84
|
}
|
|
@@ -87,50 +87,53 @@ async function Q(i) {
|
|
|
87
87
|
throw new Error(
|
|
88
88
|
p.context.error.message || "ArcGIS Assistant error"
|
|
89
89
|
);
|
|
90
|
-
if (l.push(p),
|
|
90
|
+
if (l.push(p), v = p.sequenceNumber, h++, !p.hasMore)
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
|
-
if (h ===
|
|
93
|
+
if (h === m)
|
|
94
94
|
throw new Error("Request timed out");
|
|
95
95
|
}
|
|
96
|
-
return await
|
|
96
|
+
return await F(), l;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function W(i, e, t) {
|
|
99
99
|
return {
|
|
100
100
|
conversationId: i,
|
|
101
101
|
inquiryId: t,
|
|
102
102
|
ackSequenceNumber: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
const e = i.value.length, t = 72, s = 180,
|
|
105
|
+
const G = (i) => {
|
|
106
|
+
const e = i.value.length, t = 72, s = 180, a = i.offsetWidth, n = Math.max(1, Math.floor(a / 8)), c = Math.ceil(e / n), l = t + (c - 2) * 24;
|
|
107
107
|
i.style.setProperty("--calcite-text-area-min-height", `${Math.min(l, s)}px`);
|
|
108
108
|
};
|
|
109
|
-
function
|
|
110
|
-
return
|
|
109
|
+
function J({ messages: i }) {
|
|
110
|
+
return o`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta ?? "Beta"}>${i.beta ?? "Beta"}</calcite-chip>`;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return
|
|
112
|
+
function Y({ popoverContent: i }) {
|
|
113
|
+
return o`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer overlay-positioning=fixed label=legal-disclaimer placement=bottom auto-close>${i}</calcite-popover>`;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
115
|
+
function K({ errorMessage: i }) {
|
|
116
|
+
return o`<calcite-input-message id=error-message status=invalid slot=footer-start icon=exclamation-mark-triangle scale=m>${i}</calcite-input-message>`;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
return
|
|
118
|
+
function X({ active: i, setActive: e, messages: t }) {
|
|
119
|
+
return o`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${() => e(!1)} label=confirmation-alert><div slot=message>${t.expressionapplied ?? "Expression applied to editor."}</div></calcite-alert>`;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
}} ${
|
|
121
|
+
function Z({ isDisabled: i, isReadOnly: e, setQuestion: t, setIsViewingResult: s, textAreaRef: a, question: r, errorMessage: n, setErrorMessage: c, submitQuestion: l, messages: d }) {
|
|
122
|
+
return o`<div class="text-area-wrapper"><calcite-text-area resize=none .readOnly=${i || e} class="styled-text-area" .placeholder=${d.askaquestion ?? `Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${r} @calciteTextAreaInput=${(f) => {
|
|
123
|
+
G(f.target), t(f.target.value);
|
|
124
|
+
}} ${P(a)}>${n && K({ errorMessage: n }) || ""}</calcite-text-area><div class="response-actions">${e ? o`<calcite-button round appearance=outline-fill icon-start=speech-bubble-plus @click=${() => {
|
|
125
125
|
t(""), s(!1);
|
|
126
|
-
}}>${d.askagain || "Ask again"}</calcite-button>` :
|
|
127
|
-
|
|
126
|
+
}}>${d.askagain || "Ask again"}</calcite-button>` : o`<calcite-button alignment=end round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async () => {
|
|
127
|
+
c(r ? "" : d.enteraprompt ?? "Please enter a prompt"), await l();
|
|
128
128
|
}}>${d.ask || "Ask"}</calcite-button>`}</div></div>`;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
function ee({ open: i, setOpen: e, messages: t, feedbackValue: s, setFeedbackValue: a, feedbackText: r, setFeedbackText: n, onSubmit: c }) {
|
|
131
|
+
return o`<calcite-sheet class="feedback-sheet" .label=${t.feedback ?? "Feedback"} slot=sheets display-mode=float position=block-end .open=${i} @calciteSheetClose=${() => e(!1)}><calcite-panel .heading=${t.providefeedback ?? "Provide feedback"} .description=${t.experiencehelps ?? "Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${t.experiencehelpful ?? "Was the assistant helpful?"}<calcite-segmented-control scale=l><calcite-segmented-control-item icon-start=thumbs-up .checked=${s === "good"} @click=${() => a("good")}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${s === "bad"} @click=${() => a("bad")}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${t.describeexperience ?? "Describe your experience"}<calcite-text-area resize=vertical .value=${r} @calciteTextAreaInput=${(l) => n(l.target.value)}></calcite-text-area></calcite-label></div><calcite-button slot=footer width=full @click=${c}>${t.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`;
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
function C({ assistantsEnabled: i, messages: e, slot: t }) {
|
|
134
|
+
return o`<calcite-block label=info slot=${t ?? V} expanded><calcite-chip .label=${e.new ?? "new"} kind=brand>${e.new}</calcite-chip><h1 class="info-heading">${e.introducing}</h1><p>${e.capabilities}</p>${!i && o`<p>${z(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link href=https://doc.arcgis.com/en/arcgis-online/administer/configure-assistants.htm target=_blank icon-end=launch-2>${e.opensettings ?? "Open Settings"}</calcite-link></p>` || ""}</calcite-block>`;
|
|
135
|
+
}
|
|
136
|
+
const te = "arcade_generation", ie = "ArcadeCodeRequest", se = "visualization", ae = "ArcadeAssistant", ce = [
|
|
134
137
|
"your_comments",
|
|
135
138
|
"user_evaluation",
|
|
136
139
|
"question",
|
|
@@ -141,55 +144,36 @@ const Z = "arcade_generation", ee = "ArcadeCodeRequest", te = "visualization", i
|
|
|
141
144
|
"context",
|
|
142
145
|
"extras"
|
|
143
146
|
];
|
|
144
|
-
let
|
|
145
|
-
class
|
|
147
|
+
let E = [];
|
|
148
|
+
class oe extends I {
|
|
146
149
|
constructor() {
|
|
147
|
-
super(...arguments), this.textAreaRef =
|
|
150
|
+
super(...arguments), this.textAreaRef = _(), this.messages = N(), this._feedbackService = void 0, this.handleFeedbackButton = (e) => {
|
|
148
151
|
this.feedbackValue === e && this.feedbackActive ? (this.feedbackActive = !1, this.feedbackValue = void 0, this.feedbackText = "") : (this.feedbackValue = e, this.feedbackActive = !0);
|
|
149
152
|
}, this.handleFeedbackSheetClose = () => {
|
|
150
153
|
this.feedbackActive = !1, this.feedbackValue = void 0, this.feedbackText = "";
|
|
151
154
|
}, this.handleFeedbackSubmit = async () => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (!this.feedbackService) {
|
|
155
|
-
const c = new _({
|
|
156
|
-
url: this.feedbackServiceUrl
|
|
157
|
-
});
|
|
158
|
-
await c.load();
|
|
159
|
-
const r = c.fields, a = [];
|
|
160
|
-
if (se.forEach((l) => {
|
|
161
|
-
r.some((d) => d.name === l) || a.push(l);
|
|
162
|
-
}), a.length > 0) {
|
|
163
|
-
console.error(`Missing the following fields in feedback service: ${a.join(", ")}.
|
|
164
|
-
Feedback will not be logged.`), this.handleFeedbackSheetClose();
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
this.feedbackService = c;
|
|
168
|
-
}
|
|
169
|
-
const e = this.getModel(), t = e ? await this.getProfileAndMetadata(e.uri) : void 0, s = {
|
|
170
|
-
user_evaluation: this.feedbackValue,
|
|
171
|
-
your_comments: this.feedbackText,
|
|
172
|
-
question: this.question,
|
|
173
|
-
answer: this.history[0]?.script ?? "",
|
|
174
|
-
useragent: navigator.userAgent,
|
|
175
|
-
_source: ie,
|
|
176
|
-
version: this.appVersion ?? "",
|
|
177
|
-
// TODO: this comes from app
|
|
178
|
-
context: t ? JSON.stringify(t) : "",
|
|
179
|
-
extras: t?.profileName ?? ""
|
|
180
|
-
}, o = new z({
|
|
181
|
-
attributes: s
|
|
182
|
-
});
|
|
183
|
-
try {
|
|
184
|
-
await this.feedbackService?.applyEdits({
|
|
185
|
-
addFeatures: [o]
|
|
186
|
-
});
|
|
187
|
-
} catch (c) {
|
|
188
|
-
console.error("Error submitting feedback:", c);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
155
|
+
const e = await this.ensureFeedbackService();
|
|
156
|
+
if (!e) {
|
|
191
157
|
this.handleFeedbackSheetClose();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const t = this.getModel(), s = t ? await this.getProfileAndMetadata(t.uri) : void 0, a = {
|
|
161
|
+
user_evaluation: this.feedbackValue,
|
|
162
|
+
your_comments: this.feedbackText || void 0,
|
|
163
|
+
question: this.question,
|
|
164
|
+
answer: this.history[0]?.script ?? "",
|
|
165
|
+
useragent: navigator.userAgent,
|
|
166
|
+
_source: ae,
|
|
167
|
+
version: this.appVersion ?? "",
|
|
168
|
+
context: s ? JSON.stringify(s) : "",
|
|
169
|
+
extras: s?.profileName ?? ""
|
|
170
|
+
};
|
|
171
|
+
try {
|
|
172
|
+
await e.applyEdits({ addFeatures: [new Q({ attributes: a })] });
|
|
173
|
+
} catch (r) {
|
|
174
|
+
console.error("Error submitting feedback:", r);
|
|
192
175
|
}
|
|
176
|
+
this.handleFeedbackSheetClose();
|
|
193
177
|
}, this.handleClose = (e) => {
|
|
194
178
|
this.closed = !0, this.closePanel?.(e);
|
|
195
179
|
}, this.setQuestion = (e) => {
|
|
@@ -200,15 +184,29 @@ class ae extends T {
|
|
|
200
184
|
this.properties = { isViewingResult: 16, confirmationActive: 16, isDisabled: 16, errorMessage: 16, question: 16, history: 16, feedbackActive: 16, feedbackValue: 16, feedbackText: 16, copySuccess: 16, closePanel: 0, insertText: 0, assistantsEnabled: 5, layer: [1, { type: Object }], orgBaseUrl: 1, serviceUrl: 1, closed: 7, editorRef: 0, feedbackServiceUrl: 1, appVersion: 1 };
|
|
201
185
|
}
|
|
202
186
|
static {
|
|
203
|
-
this.styles =
|
|
187
|
+
this.styles = B;
|
|
204
188
|
}
|
|
205
189
|
async destroy() {
|
|
206
190
|
}
|
|
207
191
|
connectedCallback() {
|
|
208
|
-
super.connectedCallback(), this.history =
|
|
192
|
+
super.connectedCallback(), this.history = E;
|
|
209
193
|
}
|
|
210
194
|
disconnectedCallback() {
|
|
211
|
-
super.disconnectedCallback(),
|
|
195
|
+
super.disconnectedCallback(), E = this.history;
|
|
196
|
+
}
|
|
197
|
+
async ensureFeedbackService() {
|
|
198
|
+
if (this._feedbackService)
|
|
199
|
+
return this._feedbackService;
|
|
200
|
+
if (!this.feedbackServiceUrl)
|
|
201
|
+
return;
|
|
202
|
+
const e = new H({ url: this.feedbackServiceUrl });
|
|
203
|
+
await e.load();
|
|
204
|
+
const t = ce.filter((s) => !e.fields.some((a) => a.name === s));
|
|
205
|
+
if (t.length > 0) {
|
|
206
|
+
console.error(`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
return this._feedbackService = e, e;
|
|
212
210
|
}
|
|
213
211
|
getModel() {
|
|
214
212
|
return this.editorRef.editorInstance?.getModel();
|
|
@@ -220,26 +218,26 @@ class ae extends T {
|
|
|
220
218
|
const e = await this.getToken(), t = this.getModel();
|
|
221
219
|
if (!t)
|
|
222
220
|
return;
|
|
223
|
-
const { profileName: s, metadata:
|
|
221
|
+
const { profileName: s, metadata: a } = await this.getProfileAndMetadata(t.uri), n = (await L({
|
|
224
222
|
baseUrl: this.serviceUrl,
|
|
225
|
-
skillId:
|
|
223
|
+
skillId: te,
|
|
226
224
|
message: this.question,
|
|
227
225
|
authToken: e,
|
|
228
226
|
context: {
|
|
229
|
-
kind:
|
|
227
|
+
kind: ie,
|
|
230
228
|
context: {
|
|
231
229
|
profile_name: s,
|
|
232
|
-
metadata:
|
|
230
|
+
metadata: a
|
|
233
231
|
}
|
|
234
232
|
}
|
|
235
|
-
})).find((
|
|
236
|
-
if (!
|
|
233
|
+
})).find((c) => c.context?.kind === "ArcadeCodeResponse");
|
|
234
|
+
if (!n)
|
|
237
235
|
return;
|
|
238
|
-
|
|
239
|
-
script:
|
|
236
|
+
n.context?.kind === "ArcadeCodeResponse" && (this.history.unshift({
|
|
237
|
+
script: n?.context?.arcadeCode?.code,
|
|
240
238
|
error: void 0,
|
|
241
239
|
question: this.question
|
|
242
|
-
}), this.isViewingResult = !0, this.errorMessage = void 0);
|
|
240
|
+
}), this.isViewingResult = !0, this.errorMessage = void 0), this.handleFeedbackSubmit();
|
|
243
241
|
} catch (e) {
|
|
244
242
|
typeof e == "object" && e && "arcadeAssistantError" in e ? this.errorMessage = e.arcadeAssistantError.message || this.messages.erroroccurred || "An error occurred." : e instanceof Error ? this.errorMessage = this.messages.erroroccurred ?? "An error occurred." : this.errorMessage = this.messages.erroroccurred || "An error occurred.", console.error("Error in Arcade Assistant:", e);
|
|
245
243
|
} finally {
|
|
@@ -248,39 +246,39 @@ class ae extends T {
|
|
|
248
246
|
}
|
|
249
247
|
}
|
|
250
248
|
async getToken() {
|
|
251
|
-
const { token: e } = await
|
|
249
|
+
const { token: e } = await j.getCredential(this.orgBaseUrl);
|
|
252
250
|
return e;
|
|
253
251
|
}
|
|
254
252
|
async getProfileAndMetadata(e) {
|
|
255
|
-
let t =
|
|
256
|
-
const s =
|
|
253
|
+
let t = se;
|
|
254
|
+
const s = O.getEditorProfileForModel(e);
|
|
257
255
|
s?.loaded || await s?.loadSource();
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
const
|
|
261
|
-
let
|
|
262
|
-
return
|
|
263
|
-
name:
|
|
264
|
-
type:
|
|
265
|
-
alias:
|
|
266
|
-
}))), { profileName: t, metadata:
|
|
256
|
+
const a = this.editorRef.profile;
|
|
257
|
+
a && "id" in a && (t = a.id);
|
|
258
|
+
const r = s?.definition?.variables?.find((c) => c.type === "feature");
|
|
259
|
+
let n = [];
|
|
260
|
+
return r?.definition && "fields" in r.definition && (n = r.definition.fields.map((c) => ({
|
|
261
|
+
name: c.name,
|
|
262
|
+
type: c.type,
|
|
263
|
+
alias: c.alias
|
|
264
|
+
}))), { profileName: t, metadata: n };
|
|
267
265
|
}
|
|
268
266
|
render() {
|
|
269
|
-
return this.closed ? null : this.assistantsEnabled ?
|
|
270
|
-
|
|
267
|
+
return this.closed ? null : this.assistantsEnabled ? o`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${J({ messages: this.messages })}${Y({ popoverContent: C({ assistantsEnabled: this.assistantsEnabled, messages: this.messages }) })}${X({ active: this.confirmationActive, setActive: (e) => this.confirmationActive = e, messages: this.messages })}${Z({ isDisabled: this.isDisabled, isReadOnly: this.isViewingResult, setQuestion: this.setQuestion, setIsViewingResult: (e) => this.isViewingResult = e, textAreaRef: this.textAreaRef, question: this.question, errorMessage: this.errorMessage, setErrorMessage: (e) => this.errorMessage = e, submitQuestion: this.submitQuestion.bind(this), messages: this.messages })}<calcite-block .hidden=${!this.isDisabled} .heading=${this.messages.generatingresponse ?? "Generating response..."}></calcite-block>${this.isViewingResult && o`<calcite-block class="block-response" icon-start=effects .heading=${this.messages.besteffort ?? "Here's the assistant's best effort"} expanded><calcite-list class="prompt-list" .label=${this.messages.promptlist ?? "Prompt list"}><calcite-list-item expanded class=${D(this.history[0]?.error ? "type-error" : "type-response")} .label=${A(this.history[0]?.script ?? "") || this.history[0]?.error} @calciteListItemSelect=${() => {
|
|
268
|
+
S(this.editorRef.editorInstance, this.history[0]?.script ?? "", this.messages.disclaimercomment ?? "Expression generated by ArcGIS Arcade Assistant (beta)"), this.isViewingResult = !1, this.setQuestion("");
|
|
271
269
|
}}><code slot=content><pre class="break-spaces">${A(this.history[0]?.script ?? "")}</pre></code></calcite-list-item></calcite-list><div class="response-actions"><calcite-button icon-start=plus round kind=brand @click=${() => {
|
|
272
|
-
|
|
270
|
+
S(this.editorRef.editorInstance, this.history[0]?.script ?? "", this.messages.disclaimercomment ?? "Expression generated by ArcGIS Arcade Assistant (beta)"), this.isViewingResult = !1, this.setQuestion("");
|
|
273
271
|
}}>${this.messages.addtoeditor ?? "Add to editor"}</calcite-button><calcite-button id=copy-to-clipboard icon-start=${this.copySuccess ? "check" : "copy-to-clipboard"} round kind=neutral @click=${async () => {
|
|
274
272
|
const e = this.history[0]?.script ?? "";
|
|
275
273
|
e && (await navigator.clipboard.writeText(e), this.copySuccess = !0, setTimeout(() => {
|
|
276
274
|
this.copySuccess = !1;
|
|
277
275
|
}, 1500));
|
|
278
|
-
}}>${this.copySuccess ? this.messages.copied ?? "Copied!" : ""}</calcite-button><div class="feedback-button-container" id=feedback-buttons><calcite-button id=thumbs-up icon-start=thumbs-up appearance=transparent @click=${() => this.handleFeedbackButton("good")}></calcite-button><calcite-button id=thumbs-down appearance=transparent icon-start=thumbs-down @click=${() => this.handleFeedbackButton("bad")}></calcite-button><calcite-tooltip reference-element=feedback-buttons>${this.messages.providefeedback ?? "Provide feedback"}</calcite-tooltip></div></div><span class="result-disclaimer">${this.messages.reviewcodedisclaimer ?? "Review AI-generated code for accuracy, coherence, and relevance before using it."}</span></calcite-block>` || ""}<calcite-block .hidden=${this.isViewingResult || this.isDisabled || this.history.length < 1} .disabled=${this.isViewingResult || this.isDisabled || this.history.length < 1} class="no-space-block" collapsible .expanded=${this.history.length > 0} .heading=${this.messages.recentprompts ?? "Recent prompts"}><calcite-list class="prompt-list" .label=${this.messages.historylist ?? "History list"}>${this.history.map((e) =>
|
|
276
|
+
}}>${this.copySuccess ? this.messages.copied ?? "Copied!" : ""}</calcite-button><div class="feedback-button-container" id=feedback-buttons><calcite-button id=thumbs-up icon-start=thumbs-up appearance=transparent @click=${() => this.handleFeedbackButton("good")}></calcite-button><calcite-button id=thumbs-down appearance=transparent icon-start=thumbs-down @click=${() => this.handleFeedbackButton("bad")}></calcite-button><calcite-tooltip reference-element=feedback-buttons>${this.messages.providefeedback ?? "Provide feedback"}</calcite-tooltip></div></div><span class="result-disclaimer">${this.messages.reviewcodedisclaimer ?? "Review AI-generated code for accuracy, coherence, and relevance before using it."}</span></calcite-block>` || ""}<calcite-block .hidden=${this.isViewingResult || this.isDisabled || this.history.length < 1} .disabled=${this.isViewingResult || this.isDisabled || this.history.length < 1} class="no-space-block" collapsible .expanded=${this.history.length > 0} .heading=${this.messages.recentprompts ?? "Recent prompts"}><calcite-list class="prompt-list" .label=${this.messages.historylist ?? "History list"}>${this.history.map((e) => o`<calcite-list-item class="type-history" .label=${e.question} @calciteListItemSelect=${() => {
|
|
279
277
|
this.errorMessage = "", this.setQuestion(e.question), this.textAreaRef.value?.setFocus();
|
|
280
|
-
}}><calcite-icon icon=recent scale=s slot=content-end></calcite-icon></calcite-list-item>`)}</calcite-list></calcite-block>${this.feedbackActive ?
|
|
278
|
+
}}><calcite-icon icon=recent scale=s slot=content-end></calcite-icon></calcite-list-item>`)}</calcite-list></calcite-block>${this.feedbackActive ? o`<calcite-shell>${ee({ open: this.feedbackActive, setOpen: this.handleFeedbackSheetClose, messages: this.messages, feedbackValue: this.feedbackValue ?? "good", setFeedbackValue: (e) => this.feedbackValue = e, feedbackText: this.feedbackText ?? "", setFeedbackText: (e) => this.feedbackText = e, onSubmit: this.handleFeedbackSubmit })}</calcite-shell>` : null}${!this.isViewingResult && o`<span class="result-disclaimer">${this.messages.aigenerated} ${this.messages.seeterms}</span>` || ""}</calcite-flow-item></calcite-flow>` : o`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${C({ slot: "content-top", messages: this.messages, assistantsEnabled: this.assistantsEnabled })}</calcite-flow-item></calcite-flow>`;
|
|
281
279
|
}
|
|
282
280
|
}
|
|
283
|
-
|
|
281
|
+
T("arcgis-arcade-coding-assistant", oe);
|
|
284
282
|
export {
|
|
285
|
-
|
|
283
|
+
oe as ArcgisArcadeCodingAssistant
|
|
286
284
|
};
|
|
@@ -90,8 +90,8 @@ declare const strings: (value: {
|
|
|
90
90
|
export declare function AboutDisplay({ messages }: {
|
|
91
91
|
messages: Partial<ReturnType<typeof strings>>;
|
|
92
92
|
}): JsxNode;
|
|
93
|
-
export declare function DisclaimerDisplay({
|
|
94
|
-
|
|
93
|
+
export declare function DisclaimerDisplay({ popoverContent }: {
|
|
94
|
+
popoverContent: JsxNode;
|
|
95
95
|
}): JsxNode;
|
|
96
96
|
export declare function ErrorDisplay({ errorMessage }: {
|
|
97
97
|
errorMessage?: string;
|
|
@@ -123,4 +123,9 @@ export declare function FeedbackSheetDisplay({ open, setOpen, messages, feedback
|
|
|
123
123
|
setFeedbackText: (val: string) => void;
|
|
124
124
|
onSubmit: () => void;
|
|
125
125
|
}): JsxNode;
|
|
126
|
+
export declare function InfoDisplay({ assistantsEnabled, messages, slot, }: {
|
|
127
|
+
assistantsEnabled: boolean;
|
|
128
|
+
messages: Partial<ReturnType<typeof strings>>;
|
|
129
|
+
slot?: HTMLCalciteBlockElement["slot"];
|
|
130
|
+
}): JsxNode;
|
|
126
131
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-chip";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-action";
|
|
3
|
-
import "@esri/calcite-components/components/calcite-
|
|
3
|
+
import "@esri/calcite-components/components/calcite-popover";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-input-message";
|
|
5
5
|
import "@esri/calcite-components/components/calcite-alert";
|
|
6
6
|
import "@esri/calcite-components/components/calcite-text-area";
|
|
@@ -10,11 +10,13 @@ import "@esri/calcite-components/components/calcite-panel";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-label";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-segmented-control";
|
|
12
12
|
import "@esri/calcite-components/components/calcite-segmented-control-item";
|
|
13
|
+
import "@esri/calcite-components/components/calcite-block";
|
|
14
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
13
15
|
import "@esri/calcite-components/components/calcite-flow";
|
|
14
16
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
15
|
-
import "@esri/calcite-components/components/calcite-block";
|
|
16
17
|
import "@esri/calcite-components/components/calcite-list";
|
|
17
18
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
19
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
18
20
|
import "@esri/calcite-components/components/calcite-icon";
|
|
19
21
|
import "@esri/calcite-components/components/calcite-shell";
|
|
20
22
|
export * from "./customElement.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-chip";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-action";
|
|
3
|
-
import "@esri/calcite-components/components/calcite-
|
|
3
|
+
import "@esri/calcite-components/components/calcite-popover";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-input-message";
|
|
5
5
|
import "@esri/calcite-components/components/calcite-alert";
|
|
6
6
|
import "@esri/calcite-components/components/calcite-text-area";
|
|
@@ -10,11 +10,13 @@ import "@esri/calcite-components/components/calcite-panel";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-label";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-segmented-control";
|
|
12
12
|
import "@esri/calcite-components/components/calcite-segmented-control-item";
|
|
13
|
+
import "@esri/calcite-components/components/calcite-block";
|
|
14
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
13
15
|
import "@esri/calcite-components/components/calcite-flow";
|
|
14
16
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
15
|
-
import "@esri/calcite-components/components/calcite-block";
|
|
16
17
|
import "@esri/calcite-components/components/calcite-list";
|
|
17
18
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
19
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
18
20
|
import "@esri/calcite-components/components/calcite-icon";
|
|
19
21
|
import "@esri/calcite-components/components/calcite-shell";
|
|
20
22
|
export * from "./customElement.js";
|
|
@@ -16,7 +16,7 @@ import { css as w } from "@lit/reactive-element/css-tag.js";
|
|
|
16
16
|
import { s as y } from "../../chunks/editor.js";
|
|
17
17
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
18
18
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
19
|
-
v4.34.0-next.
|
|
19
|
+
v4.34.0-next.5 */
|
|
20
20
|
const D = 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}}}`;
|
|
21
21
|
class C extends m {
|
|
22
22
|
constructor() {
|
|
@@ -8,7 +8,7 @@ import { css as L } from "@lit/reactive-element/css-tag.js";
|
|
|
8
8
|
import { s as O } from "../../chunks/fields.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.5 */
|
|
12
12
|
const D = L`: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
13
|
lines: !0,
|
|
14
14
|
selectionMode: "none",
|
|
@@ -9,7 +9,7 @@ import { u as b } from "../../chunks/useT9n.js";
|
|
|
9
9
|
import { css as _ } from "@lit/reactive-element/css-tag.js";
|
|
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.5 */
|
|
13
13
|
function v(o) {
|
|
14
14
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
15
|
}
|
|
@@ -9,7 +9,7 @@ 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.5 */
|
|
13
13
|
const x = m`@layer{/*!-----------------------------------------------------------
|
|
14
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15
15
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|