@arcgis/ai-components 5.2.0-next.17 → 5.2.0-next.18
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/agent-utils/index.d.ts +78 -0
- package/dist/agent-utils/index.js +116 -97
- package/dist/agent-utils/types.d.ts +12 -12
- package/dist/cdn/27NEUQN3.js +2 -0
- package/dist/cdn/{VKR2CBLM.js → 2NMR43NW.js} +1 -1
- package/dist/cdn/4I4MCV7V.js +71 -0
- package/dist/cdn/5SBLS4NW.js +2 -0
- package/dist/cdn/{LBSOW7OW.js → C7E7MJSR.js} +1 -1
- package/dist/cdn/{DECSD3LN.js → CIW3QMKV.js} +1 -1
- package/dist/cdn/CVHJMR5X.js +2 -0
- package/dist/cdn/ETD76QRC.js +14 -0
- package/dist/cdn/FC2ZX3SS.js +2 -0
- package/dist/cdn/I64KIZG3.js +2 -0
- package/dist/cdn/{NRMBMWI5.js → I76F57I2.js} +19 -18
- package/dist/cdn/IB4WTK74.js +2 -0
- package/dist/cdn/{LQSZTK26.js → IC5P5NYY.js} +1 -1
- package/dist/cdn/{QZVAGRWA.js → IDZTJLVN.js} +2 -2
- package/dist/cdn/IW43UAIS.js +3 -0
- package/dist/cdn/{6EVF6NFG.js → JBNITHPO.js} +5 -5
- package/dist/cdn/K37GTMOF.js +18 -0
- package/dist/cdn/{NE7E52YR.js → KTK4HNL2.js} +8 -2
- package/dist/cdn/{VV57ZUOI.js → L77BTGXY.js} +1 -1
- package/dist/cdn/LSNMNSYS.js +2 -0
- package/dist/cdn/NNC3UYMR.js +2 -0
- package/dist/cdn/NOJYPREL.js +3 -0
- package/dist/cdn/{FZIT3DLD.js → O3F47IO5.js} +1 -1
- package/dist/cdn/{OLJC5BM3.js → O7TGCM5P.js} +1 -1
- package/dist/cdn/PBTINZTK.js +65 -0
- package/dist/cdn/PSWI3MFB.js +2 -0
- package/dist/cdn/RNLQZV6U.js +36 -0
- package/dist/cdn/RX45PCYB.js +9 -0
- package/dist/cdn/SLNLQG3A.js +2 -0
- package/dist/cdn/{W5DLXSAP.js → SMADRJ67.js} +1 -1
- package/dist/cdn/{C4KITTT5.js → T7CQZ27H.js} +1 -1
- package/dist/cdn/UNFG4ZJ5.js +3 -0
- package/dist/cdn/V6TM3MTN.js +22 -0
- package/dist/cdn/{RUURNLTP.js → W2JAKE2M.js} +1 -1
- package/dist/cdn/{RHF452M7.js → WAVKMZA6.js} +1 -1
- package/dist/cdn/WQQRLD5F.js +2 -0
- package/dist/cdn/XAI6OR2N.js +2 -0
- package/dist/cdn/YJ3QQXF6.js +2 -0
- package/dist/cdn/{X4UZCTIG.js → YYY7HKYX.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +12 -10
- package/dist/chunks/helpGraph.js +8 -8
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/navigationGraph.js +4 -4
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/utils2.js +8 -8
- package/dist/components/arcgis-assistant/customElement.d.ts +7 -0
- package/dist/components/arcgis-assistant/customElement.js +301 -181
- package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +6 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.js +4 -4
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +16 -12
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +8 -4
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cdn/3S7PBYVD.js +0 -2
- package/dist/cdn/5VXRVWAX.js +0 -16
- package/dist/cdn/CE6VDP2D.js +0 -72
- package/dist/cdn/CI3QSFPS.js +0 -2
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/GPYYAQVI.js +0 -2
- package/dist/cdn/K475UT3E.js +0 -2
- package/dist/cdn/KIQUEMI4.js +0 -14
- package/dist/cdn/NTGC53UD.js +0 -36
- package/dist/cdn/PB2ODJC7.js +0 -2
- package/dist/cdn/SBHLUL3Q.js +0 -2
- package/dist/cdn/TR3OKQPQ.js +0 -22
- package/dist/cdn/WIJRNMBG.js +0 -3
- package/dist/cdn/XBW4MWQR.js +0 -2
- package/dist/cdn/Z7UWJ4AI.js +0 -3
- package/dist/orchestrator/registry/agentRegistry.d.ts +0 -33
|
@@ -6,11 +6,15 @@ class n extends s {
|
|
|
6
6
|
static {
|
|
7
7
|
this.properties = { agent: 0, context: 0 };
|
|
8
8
|
}
|
|
9
|
+
#t;
|
|
9
10
|
async getContext() {
|
|
10
11
|
return e(this.context) ? await this.context() : this.context;
|
|
11
12
|
}
|
|
12
13
|
load() {
|
|
13
|
-
i(this);
|
|
14
|
+
this.#t = i(this);
|
|
15
|
+
}
|
|
16
|
+
disconnectedCallback() {
|
|
17
|
+
this.#t?.unregister(this.agent.id), super.disconnectedCallback();
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
t("arcgis-assistant-agent", n);
|
|
@@ -2,44 +2,49 @@
|
|
|
2
2
|
import { c as s } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as e, html as t } from "lit";
|
|
4
4
|
import { LitElement as i } from "@arcgis/lumina";
|
|
5
|
-
import { createRef as a, ref as
|
|
6
|
-
import
|
|
7
|
-
import { watch as
|
|
8
|
-
const
|
|
9
|
-
class
|
|
5
|
+
import { createRef as a, ref as l } from "lit/directives/ref.js";
|
|
6
|
+
import n from "@arcgis/core/core/Collection.js";
|
|
7
|
+
import { when as r, watch as o } from "@arcgis/core/core/reactiveUtils.js";
|
|
8
|
+
const c = e`.messages-container{display:flex;flex:1;flex-direction:column;line-height:var(--calcite-font-line-height-relative-snug)}.messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-xxl);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}.end-ref{margin-top:var(--calcite-spacing-lg)}`;
|
|
9
|
+
class m extends i {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.#
|
|
11
|
+
super(...arguments), this.#e = a(), this.#s = !1, this.loading = !1, this.messages = new n([]), this.interrupt = null;
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { loading: 5, messages: 0, interrupt: 0 };
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.styles =
|
|
17
|
+
this.styles = c;
|
|
18
18
|
}
|
|
19
|
+
#e;
|
|
19
20
|
#s;
|
|
20
21
|
firstUpdated() {
|
|
21
|
-
this
|
|
22
|
+
this.#t();
|
|
22
23
|
}
|
|
23
24
|
loaded() {
|
|
24
25
|
this.manager.onLifecycle(() => [
|
|
25
26
|
this.messages.on("change", () => {
|
|
26
|
-
this
|
|
27
|
+
this.#t();
|
|
27
28
|
}),
|
|
28
|
-
|
|
29
|
-
this
|
|
30
|
-
})
|
|
29
|
+
r(() => !this.loading, () => {
|
|
30
|
+
this.#s = !1;
|
|
31
|
+
}),
|
|
32
|
+
o(() => [this.loading, this.interrupt], () => this.#t())
|
|
31
33
|
]);
|
|
32
34
|
}
|
|
33
|
-
|
|
35
|
+
#t() {
|
|
34
36
|
requestAnimationFrame(() => {
|
|
35
|
-
this.#s.value?.scrollIntoView({ behavior: "smooth" });
|
|
37
|
+
this.#s || this.#e.value?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
36
38
|
});
|
|
37
39
|
}
|
|
40
|
+
#i() {
|
|
41
|
+
this.#s = !0;
|
|
42
|
+
}
|
|
38
43
|
render() {
|
|
39
|
-
return t`<div class="messages-container"><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div ${
|
|
44
|
+
return t`<div class="messages-container" @wheel=${this.#i}><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div class="end-ref" ${l(this.#e)}></div></div>`;
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
|
-
s("arcgis-assistant-chat",
|
|
47
|
+
s("arcgis-assistant-chat", m);
|
|
43
48
|
export {
|
|
44
|
-
|
|
49
|
+
m as ArcgisAssistantChat
|
|
45
50
|
};
|
|
@@ -20,8 +20,8 @@ import "zod";
|
|
|
20
20
|
import { D as r } from "../../chunks/dataExplorationGraph.js";
|
|
21
21
|
import "@arcgis/core/views/LinkChartView.js";
|
|
22
22
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
23
|
-
import { r as
|
|
24
|
-
class
|
|
23
|
+
import { r as a, a as s } from "../../chunks/utils2.js";
|
|
24
|
+
class e extends i {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments), this.agent = r;
|
|
27
27
|
}
|
|
@@ -29,16 +29,20 @@ class s extends i {
|
|
|
29
29
|
this.properties = { referenceElement: 1 };
|
|
30
30
|
}
|
|
31
31
|
#t;
|
|
32
|
+
#i;
|
|
32
33
|
getContext() {
|
|
33
34
|
if (!this.#t)
|
|
34
35
|
throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");
|
|
35
36
|
return { mapView: this.#t };
|
|
36
37
|
}
|
|
37
38
|
load() {
|
|
38
|
-
this.#t =
|
|
39
|
+
this.#t = a(this, "arcgis-assistant-data-exploration-agent"), this.#i = s(this);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
t("arcgis-assistant-data-exploration-agent",
|
|
45
|
+
t("arcgis-assistant-data-exploration-agent", e);
|
|
42
46
|
export {
|
|
43
|
-
|
|
47
|
+
e as ArcgisAssistantDataExplorationAgent
|
|
44
48
|
};
|
|
@@ -23,7 +23,7 @@ import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
|
23
23
|
import { H as r } from "../../chunks/helpGraph.js";
|
|
24
24
|
import "@arcgis/core/views/LinkChartView.js";
|
|
25
25
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
26
|
-
import { r as
|
|
26
|
+
import { r as s, a as e } from "../../chunks/utils2.js";
|
|
27
27
|
class o extends i {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments), this.agent = r;
|
|
@@ -32,13 +32,17 @@ class o extends i {
|
|
|
32
32
|
this.properties = { referenceElement: 1 };
|
|
33
33
|
}
|
|
34
34
|
#t;
|
|
35
|
+
#i;
|
|
35
36
|
getContext() {
|
|
36
37
|
if (!this.#t)
|
|
37
38
|
throw new Error("arcgis-assistant-help-agent requires a mapView");
|
|
38
39
|
return { mapView: this.#t };
|
|
39
40
|
}
|
|
40
41
|
load() {
|
|
41
|
-
this.#t =
|
|
42
|
+
this.#t = s(this, "arcgis-assistant-help-agent"), this.#i = e(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
t("arcgis-assistant-help-agent", o);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as c, html as e } from "lit";
|
|
4
|
-
import { LitElement as l, createEvent as
|
|
4
|
+
import { LitElement as l, createEvent as s } from "@arcgis/lumina";
|
|
5
5
|
import { u as r } from "../../chunks/useT9n.js";
|
|
6
|
-
const n = c`:host{
|
|
6
|
+
const n = c`:host{padding:var(--calcite-spacing-md);background:var(--calcite-panel-background-color, var(--calcite-color-background))}calcite-panel{border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));border:0 solid var(--calcite-color-brand);border-block-start-width:4px;box-shadow:var(--calcite-shadow-md);width:100%;--calcite-panel-border-color: none}.interrupt-content{padding:0 var(--calcite-spacing-md);background:var(--calcite-color-foreground-1)}`;
|
|
7
7
|
class o extends l {
|
|
8
8
|
constructor() {
|
|
9
|
-
super(...arguments), this.#t = [], this._messages = r({ blocking: !0 }), this.arcgisCancel =
|
|
9
|
+
super(...arguments), this.#t = [], this._messages = r({ blocking: !0 }), this.arcgisCancel = s(), this.arcgisSubmit = s();
|
|
10
10
|
}
|
|
11
11
|
static {
|
|
12
12
|
this.properties = { type: 1, message: 1, options: 0 };
|
|
@@ -20,7 +20,7 @@ class o extends l {
|
|
|
20
20
|
case "single-select":
|
|
21
21
|
return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this.#t = t.target.selectedItems[0]?.value}>${this.options?.map((t) => e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
22
22
|
case "multi-select":
|
|
23
|
-
return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this.#t = t.target.selectedItems.map((
|
|
23
|
+
return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this.#t = t.target.selectedItems.map((i) => i.value)}>${this.options?.map((t) => e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
24
24
|
case "boolean-choice":
|
|
25
25
|
return null;
|
|
26
26
|
case "text-input":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { LitElement as
|
|
2
|
+
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
import "@langchain/langgraph/web";
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
@@ -20,24 +20,25 @@ import "zod";
|
|
|
20
20
|
import "@arcgis/core/intl.js";
|
|
21
21
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
22
22
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
23
|
-
import { A as
|
|
24
|
-
import { b as
|
|
23
|
+
import { A as s } from "../../chunks/arcgisKnowledgeGraph.js";
|
|
24
|
+
import { b as o, a as n } from "../../chunks/utils2.js";
|
|
25
25
|
import { fetchKnowledgeGraph as a } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
26
|
-
class
|
|
26
|
+
class c extends r {
|
|
27
27
|
constructor() {
|
|
28
|
-
super(...arguments), this.agent =
|
|
28
|
+
super(...arguments), this.agent = s;
|
|
29
29
|
}
|
|
30
30
|
static {
|
|
31
31
|
this.properties = { referenceElement: 1, serviceUrl: 3, context: 0 };
|
|
32
32
|
}
|
|
33
33
|
#e;
|
|
34
|
-
#
|
|
34
|
+
#i;
|
|
35
35
|
#t;
|
|
36
|
+
#r;
|
|
36
37
|
get serviceUrl() {
|
|
37
|
-
return this.#
|
|
38
|
+
return this.#i;
|
|
38
39
|
}
|
|
39
40
|
set serviceUrl(t) {
|
|
40
|
-
this.#
|
|
41
|
+
this.#i = t;
|
|
41
42
|
}
|
|
42
43
|
async getContext() {
|
|
43
44
|
const t = this.context ? { ...this.context, knowledgeGraph: void 0, view: void 0 } : {};
|
|
@@ -61,10 +62,13 @@ class p extends i {
|
|
|
61
62
|
t.has("serviceUrl") && this.serviceUrl ? this.#t = a(this.serviceUrl) : this.#t = void 0;
|
|
62
63
|
}
|
|
63
64
|
load() {
|
|
64
|
-
this.#e =
|
|
65
|
+
this.#e = o(this) ?? void 0, this.#r = n(this);
|
|
66
|
+
}
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
this.#r?.unregister(this.agent.id), super.disconnectedCallback();
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
|
-
|
|
71
|
+
i("arcgis-assistant-knowledge-agent", c);
|
|
68
72
|
export {
|
|
69
|
-
|
|
73
|
+
c as ArcgisAssistantKnowledgeAgent
|
|
70
74
|
};
|
|
@@ -24,7 +24,7 @@ import { L as r } from "../../chunks/layerStylingGraph.js";
|
|
|
24
24
|
import "@arcgis/core/views/LinkChartView.js";
|
|
25
25
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
26
26
|
import { r as s, a as e } from "../../chunks/utils2.js";
|
|
27
|
-
class
|
|
27
|
+
class a extends i {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments), this.agent = r;
|
|
30
30
|
}
|
|
@@ -32,16 +32,20 @@ class o extends i {
|
|
|
32
32
|
this.properties = { referenceElement: 1 };
|
|
33
33
|
}
|
|
34
34
|
#t;
|
|
35
|
+
#i;
|
|
35
36
|
getContext() {
|
|
36
37
|
if (!this.#t)
|
|
37
38
|
throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");
|
|
38
39
|
return { mapView: this.#t };
|
|
39
40
|
}
|
|
40
41
|
load() {
|
|
41
|
-
this.#t = s(this, "arcgis-assistant-layer-styling-agent"), e(this);
|
|
42
|
+
this.#t = s(this, "arcgis-assistant-layer-styling-agent"), this.#i = e(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
|
-
t("arcgis-assistant-layer-styling-agent",
|
|
48
|
+
t("arcgis-assistant-layer-styling-agent", a);
|
|
45
49
|
export {
|
|
46
|
-
|
|
50
|
+
a as ArcgisAssistantLayerStylingAgent
|
|
47
51
|
};
|
|
@@ -21,7 +21,7 @@ class c extends o {
|
|
|
21
21
|
case "suggested-prompts":
|
|
22
22
|
return this._renderSuggestedPrompts(s);
|
|
23
23
|
case "text":
|
|
24
|
-
return r`<arcgis-assistant-message-text .content=${s.data?.content}></arcgis-assistant-message-text>`;
|
|
24
|
+
return r`<arcgis-assistant-message-text .content=${s.data?.content} .parts=${s.data?.parts}></arcgis-assistant-message-text>`;
|
|
25
25
|
default:
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { unsafeHTML as
|
|
6
|
-
import { p as
|
|
7
|
-
const
|
|
8
|
-
class
|
|
2
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as i, html as t } from "lit";
|
|
4
|
+
import { LitElement as c } from "@arcgis/lumina";
|
|
5
|
+
import { unsafeHTML as a } from "lit/directives/unsafe-html.js";
|
|
6
|
+
import { a as s, p as o } from "../../chunks/converterUtils.js";
|
|
7
|
+
const n = i`.container{color:var(--calcite-color-text-1)}.content>*{margin:0}.content>*+*{margin-block-start:var(--calcite-spacing-sm)}.content :is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}.content>calcite-table{display:block;max-width:100%}.content pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}.content pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}.part{animation:part-reveal calc(3 * var(--calcite-animation-timing)) ease-out}@keyframes part-reveal{0%{opacity:0;transform:translateY(var(--calcite-size-fixed-xxs))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.part{animation:none}}`;
|
|
8
|
+
class l extends c {
|
|
9
9
|
static {
|
|
10
|
-
this.properties = { content: 1 };
|
|
10
|
+
this.properties = { content: 1, parts: 0 };
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.styles =
|
|
13
|
+
this.styles = n;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return
|
|
16
|
+
return t`<div class="container"><div class="content">${this.parts?.map((e) => t`<span class="part">${a(s(e))}</span>`) ?? a(o(this.content))}</div></div>`;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
r("arcgis-assistant-message-text", l);
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
l as ArcgisAssistantMessageText
|
|
22
22
|
};
|
|
@@ -22,8 +22,8 @@ import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
|
22
22
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
23
23
|
import "@arcgis/core/views/LinkChartView.js";
|
|
24
24
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
25
|
-
import { r as
|
|
26
|
-
class
|
|
25
|
+
import { r as s, a } from "../../chunks/utils2.js";
|
|
26
|
+
class e extends i {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments), this.agent = r;
|
|
29
29
|
}
|
|
@@ -31,16 +31,20 @@ class a extends i {
|
|
|
31
31
|
this.properties = { referenceElement: 1 };
|
|
32
32
|
}
|
|
33
33
|
#t;
|
|
34
|
+
#i;
|
|
34
35
|
getContext() {
|
|
35
36
|
if (!this.#t)
|
|
36
37
|
throw new Error("arcgis-assistant-navigation-agent requires a mapView");
|
|
37
38
|
return { mapView: this.#t };
|
|
38
39
|
}
|
|
39
40
|
load() {
|
|
40
|
-
this.#t =
|
|
41
|
+
this.#t = s(this, "arcgis-assistant-navigation-agent"), this.#i = a(this);
|
|
42
|
+
}
|
|
43
|
+
disconnectedCallback() {
|
|
44
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
|
-
t("arcgis-assistant-navigation-agent",
|
|
47
|
+
t("arcgis-assistant-navigation-agent", e);
|
|
44
48
|
export {
|
|
45
|
-
|
|
49
|
+
e as ArcgisAssistantNavigationAgent
|
|
46
50
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { css as a, html as e } from "lit";
|
|
4
|
+
import { LitElement as i } from "@arcgis/lumina";
|
|
5
|
+
import { p as r } from "../../chunks/converterUtils.js";
|
|
6
|
+
import { unsafeHTML as c } from "lit/directives/unsafe-html.js";
|
|
7
|
+
const s = a`:host{overflow:auto}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.avatar{display:flex;align-items:center;justify-content:center}.content{>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`;
|
|
8
|
+
class o extends i {
|
|
7
9
|
static {
|
|
8
10
|
this.properties = { content: 1, user: 1, message: 0 };
|
|
9
11
|
}
|
|
10
12
|
static {
|
|
11
|
-
this.styles =
|
|
13
|
+
this.styles = s;
|
|
12
14
|
}
|
|
13
15
|
_getContent() {
|
|
14
16
|
return this.message?.role === "user" ? this.message.content : this.content;
|
|
15
17
|
}
|
|
16
18
|
render() {
|
|
17
|
-
return
|
|
19
|
+
return e`<div class="container"><div><slot name=content><div class="content">${c(r(this._getContent()))}</div></slot></div><slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot></div>`;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
|
-
t("arcgis-assistant-user-message",
|
|
22
|
+
t("arcgis-assistant-user-message", o);
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
o as ArcgisAssistantUserMessage
|
|
23
25
|
};
|