@arcgis/coding-components 4.34.0-next.3 → 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.
Files changed (76) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{4UJSQGRR.js → 2YGBBKC6.js} +2 -2
  3. package/dist/cdn/{E4PTTXH5.js → 3P4SHQ4F.js} +2 -2
  4. package/dist/cdn/{GOQNPC4I.js → 4OWQEOVK.js} +2 -2
  5. package/dist/cdn/{CPQVVDWR.js → AADZGDTT.js} +2 -2
  6. package/dist/cdn/{5PZD27HR.js → AJO5MR2D.js} +2 -2
  7. package/dist/cdn/{K3KP6FDP.js → CKQRKFCV.js} +1 -1
  8. package/dist/cdn/{PGN77MRP.js → D7NHVE3F.js} +2 -2
  9. package/dist/cdn/{RKCAAVN6.js → DPJHX5QN.js} +2 -2
  10. package/dist/cdn/{PN27PZAJ.js → F3QQPAID.js} +1 -1
  11. package/dist/cdn/{HD2PUJ4M.js → FL32SFRF.js} +2 -2
  12. package/dist/cdn/{FKQ7SSE6.js → FLTEBLV3.js} +2 -2
  13. package/dist/cdn/{YHNSFDD7.js → G7G2I77O.js} +4 -4
  14. package/dist/cdn/{QD7WBTTH.js → GYNWYL57.js} +2 -2
  15. package/dist/cdn/{IYAABMEA.js → H3SZYPLP.js} +2 -2
  16. package/dist/cdn/{VPRYSGQQ.js → HEXUEJHB.js} +2 -2
  17. package/dist/cdn/{RFV2R57W.js → HI5IRVPS.js} +2 -2
  18. package/dist/cdn/{CCQCZKCC.js → IRHKOOPR.js} +2 -2
  19. package/dist/cdn/{SLKYJBMF.js → ISHOFB3V.js} +1 -1
  20. package/dist/cdn/L4THRZDH.js +4 -0
  21. package/dist/cdn/{Z3HBU3YI.js → LAJHA3QM.js} +2 -2
  22. package/dist/cdn/{3OPZD6HG.js → MJC4S5GE.js} +2 -2
  23. package/dist/cdn/{NUXDGLLB.js → MLALS3HH.js} +2 -2
  24. package/dist/cdn/{XNMOJ2SC.js → MNVZNW5A.js} +2 -2
  25. package/dist/cdn/{SPSZUVWZ.js → MSBFP3SG.js} +2 -2
  26. package/dist/cdn/{IB5UEIFQ.js → P67HCZK6.js} +2 -2
  27. package/dist/cdn/{X52LNMUC.js → PLYBUKIY.js} +2 -2
  28. package/dist/cdn/{F2YRSIVP.js → PNXRGAXI.js} +2 -2
  29. package/dist/cdn/{PULCYE7H.js → PPRDT36L.js} +2 -2
  30. package/dist/cdn/{K7OR2NZQ.js → PRSLFNKW.js} +2 -2
  31. package/dist/cdn/{TUHPJEG5.js → PXUWLZZA.js} +2 -2
  32. package/dist/cdn/{ZBGL3SYO.js → Q7IQOYZI.js} +1 -1
  33. package/dist/cdn/{D4OPUHHF.js → TA7H3XCV.js} +2 -2
  34. package/dist/cdn/{Q4NJDLN3.js → TBNI35J4.js} +2 -2
  35. package/dist/cdn/{Z75HQNTN.js → TP6M53SH.js} +2 -2
  36. package/dist/cdn/{JWPIQMYD.js → U2FESHVZ.js} +2 -2
  37. package/dist/cdn/{6QMJS7YE.js → V3ZGRUMF.js} +2 -2
  38. package/dist/cdn/{D2Q4JNSY.js → VDOOZTDB.js} +2 -2
  39. package/dist/cdn/{J3HINC5N.js → VPMWJICM.js} +2 -2
  40. package/dist/cdn/{NRWICP4W.js → XU6CB7N4.js} +1 -1
  41. package/dist/cdn/{HAL3EXK4.js → YUQSUNTL.js} +2 -2
  42. package/dist/cdn/index.js +2 -2
  43. package/dist/chunks/arcade-defaults.js +1 -1
  44. package/dist/chunks/arcade-executor.js +1 -1
  45. package/dist/chunks/arcade-mode.js +1 -1
  46. package/dist/chunks/arcade-service-accessors.js +1 -1
  47. package/dist/chunks/editor.js +1 -1
  48. package/dist/chunks/fields.js +1 -1
  49. package/dist/chunks/language-defaults-base.js +1 -1
  50. package/dist/chunks/markdown.js +1 -1
  51. package/dist/chunks/monaco-importer.js +1 -1
  52. package/dist/chunks/runtime.js +1 -1
  53. package/dist/chunks/setup-monaco.js +1 -1
  54. package/dist/chunks/sql-expr-contribution.js +1 -1
  55. package/dist/chunks/sql-expr-defaults.js +1 -1
  56. package/dist/chunks/sql-expr-mode.js +1 -1
  57. package/dist/chunks/useT9n.js +1 -1
  58. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +129 -131
  59. package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +7 -2
  60. package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +4 -2
  61. package/dist/components/arcgis-arcade-coding-assistant/index.js +4 -2
  62. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  63. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  64. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  65. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  66. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  67. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  68. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  69. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  70. package/dist/docs/api.json +2 -2
  71. package/dist/docs/docs.json +2 -2
  72. package/dist/docs/web-types.json +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/loader.js +1 -1
  75. package/package.json +5 -5
  76. package/dist/cdn/MX7D2TXJ.js +0 -5
@@ -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.3 */
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.3 */
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.3 */
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.3 */
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.3 */
10
+ v4.34.0-next.5 */
11
11
  let h = new _();
12
12
  class k {
13
13
  constructor(e) {
@@ -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.3 */
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 V } from "../../chunks/runtime.js";
2
- import { html as n } from "lit-html";
3
- import { LitElement as T, safeClassMap as F } from "@arcgis/lumina";
4
- import { ref as I, createRef as D } from "lit/directives/ref.js";
5
- import P from "@arcgis/core/identity/IdentityManager.js";
6
- import { u as j } from "../../chunks/useT9n.js";
7
- import { b as N } from "../../chunks/arcade-defaults.js";
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 R } from "../../chunks/monaco-importer.js";
11
+ import { a as A, e as S } from "../../chunks/monaco-importer.js";
12
12
  import "@arcgis/components-utils";
13
- import _ from "@arcgis/core/layers/FeatureLayer.js";
14
- import z from "@arcgis/core/Graphic.js";
15
- import { unsafeHTML as H } from "lit/directives/unsafe-html.js";
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.3 */
19
- const O = 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 S(i) {
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 Q(i) {
34
- const { baseUrl: e, skillId: t, message: s, authToken: o, previousConversationId: c, context: r } = i, a = t ? `${e}/skills/${t}/chat` : `${e}/chat`, l = [], d = {
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: r
36
+ context: n
37
37
  };
38
- c && (d.conversation_id = c);
38
+ r && (d.conversation_id = r);
39
39
  let f;
40
40
  try {
41
- f = await $(a, {
41
+ f = await $(c, {
42
42
  method: "post",
43
43
  headers: {
44
44
  "Content-Type": "application/json",
45
- token: o
45
+ token: a
46
46
  },
47
47
  body: JSON.stringify(d),
48
48
  responseType: "json"
49
49
  });
50
50
  } catch (h) {
51
- const b = h?.details?.rawResponse || h?.message || String(h), k = S(b), g = new Error(
52
- `Failed to send message: ${s}. Response: ${b}`
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 m = f.data;
57
- if (!m.hasMore)
56
+ const b = f.data;
57
+ if (!b.hasMore)
58
58
  throw new Error("Expected hasMore to be true");
59
- l.push(m);
60
- const E = m.conversationId, M = m.inquiryId;
61
- let y = m.sequenceNumber;
62
- async function q() {
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 b = 25;
65
- for (; h < b; ) {
64
+ const m = 25;
65
+ for (; h < m; ) {
66
66
  await new Promise((u) => setTimeout(u, 1e3));
67
- const k = B(E, y, M);
67
+ const k = W(M, v, q);
68
68
  let g;
69
69
  try {
70
- g = await $(a, {
70
+ g = await $(c, {
71
71
  method: "post",
72
72
  headers: {
73
73
  "Content-Type": "application/json",
74
- token: o
74
+ token: a
75
75
  },
76
76
  body: JSON.stringify(k),
77
77
  responseType: "json"
78
78
  });
79
79
  } catch (u) {
80
- const v = u?.details?.rawResponse || u?.message || String(u), x = S(v), w = new Error(
81
- `Polling failed. Response: ${v}`
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), y = p.sequenceNumber, h++, !p.hasMore)
90
+ if (l.push(p), v = p.sequenceNumber, h++, !p.hasMore)
91
91
  break;
92
92
  }
93
- if (h === b)
93
+ if (h === m)
94
94
  throw new Error("Request timed out");
95
95
  }
96
- return await q(), l;
96
+ return await F(), l;
97
97
  }
98
- function B(i, e, t) {
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 L = (i) => {
106
- const e = i.value.length, t = 72, s = 180, o = i.offsetWidth, r = Math.max(1, Math.floor(o / 8)), a = Math.ceil(e / r), l = t + (a - 2) * 24;
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 W({ messages: i }) {
110
- return n`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta ?? "Beta"}>${i.beta ?? "Beta"}</calcite-chip>`;
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 G({ messages: i }) {
113
- return n`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-tooltip reference-element=legal-disclaimer>${i.legaldisclaimer}</calcite-tooltip>`;
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 J({ errorMessage: i }) {
116
- return n`<calcite-input-message id=error-message status=invalid slot=footer-start icon=exclamation-mark-triangle scale=m>${i}</calcite-input-message>`;
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 Y({ active: i, setActive: e, messages: t }) {
119
- return n`<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>`;
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 K({ isDisabled: i, isReadOnly: e, setQuestion: t, setIsViewingResult: s, textAreaRef: o, question: c, errorMessage: r, setErrorMessage: a, submitQuestion: l, messages: d }) {
122
- return n`<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=${c} @calciteTextAreaInput=${(f) => {
123
- L(f.target), t(f.target.value);
124
- }} ${I(o)}>${r && J({ errorMessage: r }) || ""}</calcite-text-area><div class="response-actions">${e ? n`<calcite-button round appearance=outline-fill icon-start=speech-bubble-plus @click=${() => {
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>` : n`<calcite-button alignment=end round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async () => {
127
- a(c ? "" : d.enteraprompt ?? "Please enter a prompt"), await l();
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 X({ open: i, setOpen: e, messages: t, feedbackValue: s, setFeedbackValue: o, feedbackText: c, setFeedbackText: r, onSubmit: a }) {
131
- return n`<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=${() => o("good")}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${s === "bad"} @click=${() => o("bad")}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${t.describeexperience ?? "Describe your experience"}<calcite-text-area resize=vertical .value=${c} @calciteTextAreaInput=${(l) => r(l.target.value)}></calcite-text-area></calcite-label></div><calcite-button slot=footer width=full @click=${a}>${t.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`;
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
- const Z = "arcade_generation", ee = "ArcadeCodeRequest", te = "visualization", ie = "ArcadeAssistant", se = [
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 C = [];
145
- class ae extends T {
147
+ let E = [];
148
+ class oe extends I {
146
149
  constructor() {
147
- super(...arguments), this.textAreaRef = D(), this.messages = j(), this.feedbackService = void 0, this.handleFeedbackButton = (e) => {
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
- if (this.feedbackValue) {
153
- if (this.feedbackServiceUrl) {
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 = O;
187
+ this.styles = B;
204
188
  }
205
189
  async destroy() {
206
190
  }
207
191
  connectedCallback() {
208
- super.connectedCallback(), this.history = C;
192
+ super.connectedCallback(), this.history = E;
209
193
  }
210
194
  disconnectedCallback() {
211
- super.disconnectedCallback(), C = this.history;
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: o } = await this.getProfileAndMetadata(t.uri), r = (await Q({
221
+ const { profileName: s, metadata: a } = await this.getProfileAndMetadata(t.uri), n = (await L({
224
222
  baseUrl: this.serviceUrl,
225
- skillId: Z,
223
+ skillId: te,
226
224
  message: this.question,
227
225
  authToken: e,
228
226
  context: {
229
- kind: ee,
227
+ kind: ie,
230
228
  context: {
231
229
  profile_name: s,
232
- metadata: o
230
+ metadata: a
233
231
  }
234
232
  }
235
- })).find((a) => a.context?.kind === "ArcadeCodeResponse");
236
- if (!r)
233
+ })).find((c) => c.context?.kind === "ArcadeCodeResponse");
234
+ if (!n)
237
235
  return;
238
- r.context?.kind === "ArcadeCodeResponse" && (this.history.unshift({
239
- script: r?.context?.arcadeCode?.code,
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 P.getCredential(this.orgBaseUrl);
249
+ const { token: e } = await j.getCredential(this.orgBaseUrl);
252
250
  return e;
253
251
  }
254
252
  async getProfileAndMetadata(e) {
255
- let t = te;
256
- const s = N.getEditorProfileForModel(e);
253
+ let t = se;
254
+ const s = O.getEditorProfileForModel(e);
257
255
  s?.loaded || await s?.loadSource();
258
- const o = this.editorRef.profile;
259
- o && "id" in o && (t = o.id);
260
- const c = s?.definition?.variables?.find((a) => a.type === "feature");
261
- let r = [];
262
- return c?.definition && "fields" in c.definition && (r = c.definition.fields.map((a) => ({
263
- name: a.name,
264
- type: a.type,
265
- alias: a.alias
266
- }))), { profileName: t, metadata: r };
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 ? n`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${W({ messages: this.messages })}${G({ messages: this.messages })}${Y({ active: this.confirmationActive, setActive: (e) => this.confirmationActive = e, messages: this.messages })}${K({ 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 && n`<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=${F(this.history[0]?.error ? "type-error" : "type-response")} .label=${A(this.history[0]?.script ?? "") || this.history[0]?.error} @calciteListItemSelect=${() => {
270
- R(this.editorRef.editorInstance, this.history[0]?.script ?? "", this.messages.disclaimercomment ?? "Expression generated by ArcGIS Arcade Assistant (beta)"), this.isViewingResult = !1, this.setQuestion("");
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
- R(this.editorRef.editorInstance, this.history[0]?.script ?? "", this.messages.disclaimercomment ?? "Expression generated by ArcGIS Arcade Assistant (beta)"), this.isViewingResult = !1, this.setQuestion("");
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) => n`<calcite-list-item class="type-history" .label=${e.question} @calciteListItemSelect=${() => {
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 ? n`<calcite-shell>${X({ 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 && n`<span class="result-disclaimer">${this.messages.aigenerated} ${this.messages.seeterms}</span>` || ""}</calcite-flow-item></calcite-flow>` : n`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}><calcite-block label=info slot=content-top expanded><calcite-chip .label=${this.messages.new ?? "new"} kind=brand>${this.messages.new}</calcite-chip><h1 class="info-heading">${this.messages.introducing}</h1><p>${this.messages.capabilities}</p><p>${H(this.messages.useofassistant?.replace("{aiassistants}", `<strong>${this.messages.aiassistants ?? "Ai Assistants"}</strong>`))}</p></calcite-block></calcite-flow-item></calcite-flow>`;
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
- V("arcgis-arcade-coding-assistant", ae);
281
+ T("arcgis-arcade-coding-assistant", oe);
284
282
  export {
285
- ae as ArcgisArcadeCodingAssistant
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({ messages }: {
94
- messages: Partial<ReturnType<typeof strings>>;
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-tooltip";
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-tooltip";
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.3 */
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.3 */
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.3 */
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.3 */
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)