@arcgis/coding-components 4.34.0-next.2 → 4.34.0-next.21

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 (82) hide show
  1. package/dist/addons/arcade-coding-assistant/temporary-strings.d.ts +25 -0
  2. package/dist/addons/arcade-coding-assistant/useArcadeAssistant.d.ts +8 -0
  3. package/dist/addons.js +32 -24
  4. package/dist/cdn/{5MJ6OCXW.js → 2MBS54CP.js} +2 -2
  5. package/dist/cdn/{DTQI2YNL.js → 2OY2OOHB.js} +2 -2
  6. package/dist/cdn/{HZ736LSE.js → 3D4I7ZIH.js} +2 -2
  7. package/dist/cdn/4DWQHJO3.js +4 -0
  8. package/dist/cdn/{ETGXYFDH.js → 4FGPQQ2A.js} +2 -2
  9. package/dist/cdn/{GEPPK2KM.js → 4I55HTRW.js} +2 -2
  10. package/dist/cdn/{SV2I7E4T.js → 4RVJX5WW.js} +2 -2
  11. package/dist/cdn/{K772MGDL.js → 7BH6A67O.js} +1 -1
  12. package/dist/cdn/{4KPG4EZR.js → 7OW3V2VS.js} +2 -2
  13. package/dist/cdn/{ZY3GSTCF.js → AD6BSLAM.js} +1 -1
  14. package/dist/cdn/{EPRGELI2.js → AMWSSI6Z.js} +2 -2
  15. package/dist/cdn/{63BBC3VB.js → APPIAUW3.js} +2 -2
  16. package/dist/cdn/AWIFVV3B.js +4 -0
  17. package/dist/cdn/{HYB234PM.js → AXYFA76H.js} +2 -2
  18. package/dist/cdn/{IMTR2WF4.js → CK4ZO3NV.js} +2 -2
  19. package/dist/cdn/{COFAYLCM.js → D2XTCFJF.js} +4 -4
  20. package/dist/cdn/{MJ6BGN2Z.js → D6HEWBPW.js} +1 -1
  21. package/dist/cdn/{OYQNFJYV.js → DES4FCYE.js} +2 -2
  22. package/dist/cdn/{B6WGMTJM.js → FT3O4I6P.js} +2 -2
  23. package/dist/cdn/{HQCDMOT4.js → GCKT6QGO.js} +2 -2
  24. package/dist/cdn/{HW3L5Z2O.js → GSBW6FVS.js} +1 -1
  25. package/dist/cdn/{DPUOX5U2.js → HXOGCC2Y.js} +2 -2
  26. package/dist/cdn/{B675FOE5.js → JUPBFVGO.js} +2 -2
  27. package/dist/cdn/{LDNGUQKH.js → JZ3AKIKL.js} +2 -2
  28. package/dist/cdn/{3VTVCVWK.js → LFWH37K6.js} +2 -2
  29. package/dist/cdn/{EQ263JIA.js → MHHNM6IR.js} +2 -2
  30. package/dist/cdn/{35MNEKXS.js → MWPPYTAZ.js} +2 -2
  31. package/dist/cdn/{PHSJYUKP.js → N3TJ3VAW.js} +2 -2
  32. package/dist/cdn/{EBAB6Z7D.js → OO6NPCQP.js} +2 -2
  33. package/dist/cdn/{DYVV7BMI.js → P7WXJALE.js} +2 -2
  34. package/dist/cdn/{H3AOOCUQ.js → PML43ZG4.js} +2 -2
  35. package/dist/cdn/{SJCBFNAF.js → RK2DRTIK.js} +2 -2
  36. package/dist/cdn/{LVTZL6CJ.js → RUQSKYNM.js} +2 -2
  37. package/dist/cdn/{66HHSXAC.js → S22HBPCN.js} +2 -2
  38. package/dist/cdn/{FECUZT65.js → T6QGH7YS.js} +2 -2
  39. package/dist/cdn/{ZP7HITSD.js → T7TBIZIA.js} +2 -2
  40. package/dist/cdn/UPGWCEYX.js +4 -0
  41. package/dist/cdn/{53T47RFW.js → V4Y6OY32.js} +1 -1
  42. package/dist/cdn/{JVRARS6T.js → W7IU44PK.js} +2 -2
  43. package/dist/cdn/{AJEAVY5R.js → WQI5U62H.js} +2 -2
  44. package/dist/cdn/{BR6G5324.js → ZM4PE572.js} +2 -2
  45. package/dist/cdn/assets/code-editor/sql-expr.worker.js +58147 -57403
  46. package/dist/cdn/index.js +2 -2
  47. package/dist/chunks/arcade-defaults.js +1 -1
  48. package/dist/chunks/arcade-executor.js +1 -1
  49. package/dist/chunks/arcade-mode.js +1 -1
  50. package/dist/chunks/arcade-service-accessors.js +1 -1
  51. package/dist/chunks/editor.js +1 -1
  52. package/dist/chunks/fields.js +1 -1
  53. package/dist/chunks/language-defaults-base.js +1 -1
  54. package/dist/chunks/markdown.js +1 -1
  55. package/dist/chunks/monaco-importer.js +1 -1
  56. package/dist/chunks/runtime.js +1 -1
  57. package/dist/chunks/setup-monaco.js +1 -1
  58. package/dist/chunks/sql-expr-contribution.js +1 -1
  59. package/dist/chunks/sql-expr-defaults.js +1 -1
  60. package/dist/chunks/sql-expr-mode.js +1 -1
  61. package/dist/chunks/useT9n.js +1 -1
  62. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +2 -0
  63. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +212 -156
  64. package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +46 -4
  65. package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +10 -5
  66. package/dist/components/arcgis-arcade-coding-assistant/index.js +10 -5
  67. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  69. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  70. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  71. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  72. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  73. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  74. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  75. package/dist/docs/api.json +5 -5
  76. package/dist/docs/docs.json +5 -5
  77. package/dist/docs/web-types.json +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/loader.js +1 -1
  80. package/package.json +5 -5
  81. package/dist/cdn/LWNFDMZO.js +0 -4
  82. package/dist/cdn/R4LX2QTT.js +0 -5
@@ -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,16 @@ 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";
15
+ import "@esri/calcite-components/components/calcite-scrim";
16
+ import "@esri/calcite-components/components/calcite-dialog";
17
+ import "@esri/calcite-components/components/calcite-notice";
18
+ import "@esri/calcite-components/components/calcite-chip-group";
19
+ import "@esri/calcite-components/components/calcite-card-group";
20
+ import "@esri/calcite-components/components/calcite-card";
13
21
  import "@esri/calcite-components/components/calcite-flow";
14
22
  import "@esri/calcite-components/components/calcite-flow-item";
15
- import "@esri/calcite-components/components/calcite-block";
16
- import "@esri/calcite-components/components/calcite-list";
17
- import "@esri/calcite-components/components/calcite-list-item";
18
- import "@esri/calcite-components/components/calcite-icon";
19
23
  import "@esri/calcite-components/components/calcite-shell";
24
+ import "@esri/calcite-components/components/calcite-block-group";
20
25
  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,16 @@ 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";
15
+ import "@esri/calcite-components/components/calcite-scrim";
16
+ import "@esri/calcite-components/components/calcite-dialog";
17
+ import "@esri/calcite-components/components/calcite-notice";
18
+ import "@esri/calcite-components/components/calcite-chip-group";
19
+ import "@esri/calcite-components/components/calcite-card-group";
20
+ import "@esri/calcite-components/components/calcite-card";
13
21
  import "@esri/calcite-components/components/calcite-flow";
14
22
  import "@esri/calcite-components/components/calcite-flow-item";
15
- import "@esri/calcite-components/components/calcite-block";
16
- import "@esri/calcite-components/components/calcite-list";
17
- import "@esri/calcite-components/components/calcite-list-item";
18
- import "@esri/calcite-components/components/calcite-icon";
19
23
  import "@esri/calcite-components/components/calcite-shell";
24
+ import "@esri/calcite-components/components/calcite-block-group";
20
25
  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.2 */
19
+ v4.34.0-next.21 */
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.2 */
11
+ v4.34.0-next.21 */
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.2 */
12
+ v4.34.0-next.21 */
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.2 */
12
+ v4.34.0-next.21 */
13
13
  const x = m`@layer{/*!-----------------------------------------------------------
14
14
  * Copyright (c) Microsoft Corporation. All rights reserved.
15
15
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -7,7 +7,7 @@ import { u as f } from "../../chunks/useT9n.js";
7
7
  import { css as u } from "@lit/reactive-element/css-tag.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.2 */
10
+ v4.34.0-next.21 */
11
11
  const m = u`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
12
12
  function g(l) {
13
13
  l.key === "Enter" && l.stopPropagation();
@@ -10,7 +10,7 @@ import { css as v } from "@lit/reactive-element/css-tag.js";
10
10
  import { s as d } from "../../chunks/sql-expr-contribution.js";
11
11
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
12
12
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
13
- v4.34.0-next.2 */
13
+ v4.34.0-next.21 */
14
14
  const y = v`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
15
15
  class I extends f {
16
16
  constructor() {
@@ -9,7 +9,7 @@ import { css as g } from "@lit/reactive-element/css-tag.js";
9
9
  import { s as f } from "../../chunks/editor.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.2 */
12
+ v4.34.0-next.21 */
13
13
  const _ = g`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
14
14
  class m extends r {
15
15
  constructor() {
@@ -7,7 +7,7 @@ import { u as m } from "../../chunks/useT9n.js";
7
7
  import { css as d } from "@lit/reactive-element/css-tag.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.2 */
10
+ v4.34.0-next.21 */
11
11
  const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
12
12
  class f extends r {
13
13
  constructor() {
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-05-24T05:00:28",
2
+ "timestamp": "2025-06-10T04:47:34",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "4.34.0-next.2",
5
+ "version": "4.34.0-next.21",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "schemaVersion": "1.0.0",
@@ -62,7 +62,7 @@
62
62
  "docsTags": [
63
63
  {
64
64
  "name": "example",
65
- "text": "const arcgisArcadeEditor = document.createElement(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\narcgisArcadeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-arcade-editor is ready to go!\");\n});"
65
+ "text": "```js\nconst arcgisArcadeEditor = document.createElement(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\narcgisArcadeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-arcade-editor is ready to go!\");\n});\n```"
66
66
  }
67
67
  ]
68
68
  },
@@ -636,7 +636,7 @@
636
636
  "docsTags": [
637
637
  {
638
638
  "name": "example",
639
- "text": "const arcgisCodeEditor = document.createElement(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\narcgisCodeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-code-editor is ready to go!\");\n});"
639
+ "text": "```js\nconst arcgisCodeEditor = document.createElement(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\narcgisCodeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-code-editor is ready to go!\");\n});\n```"
640
640
  }
641
641
  ]
642
642
  },
@@ -1044,7 +1044,7 @@
1044
1044
  "docsTags": [
1045
1045
  {
1046
1046
  "name": "example",
1047
- "text": "const arcgisSqlExpressionEditor = document.createElement(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\narcgisSqlExpressionEditor.componentOnReady().then(() => {\n console.log(\"arcgis-sql-expression-editor is ready to go!\");\n});"
1047
+ "text": "```js\nconst arcgisSqlExpressionEditor = document.createElement(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\narcgisSqlExpressionEditor.componentOnReady().then(() => {\n console.log(\"arcgis-sql-expression-editor is ready to go!\");\n});\n```"
1048
1048
  }
1049
1049
  ]
1050
1050
  },
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-05-24T05:00:28",
2
+ "timestamp": "2025-06-10T04:47:34",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "4.34.0-next.2",
5
+ "version": "4.34.0-next.21",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "components": [
@@ -336,7 +336,7 @@
336
336
  "docsTags": [
337
337
  {
338
338
  "name": "example",
339
- "text": "const arcgisArcadeEditor = document.createElement(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\narcgisArcadeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-arcade-editor is ready to go!\");\n});"
339
+ "text": "```js\nconst arcgisArcadeEditor = document.createElement(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\narcgisArcadeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-arcade-editor is ready to go!\");\n});\n```"
340
340
  },
341
341
  {
342
342
  "name": "inheritedFrom",
@@ -711,7 +711,7 @@
711
711
  "docsTags": [
712
712
  {
713
713
  "name": "example",
714
- "text": "const arcgisCodeEditor = document.createElement(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\narcgisCodeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-code-editor is ready to go!\");\n});"
714
+ "text": "```js\nconst arcgisCodeEditor = document.createElement(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\narcgisCodeEditor.componentOnReady().then(() => {\n console.log(\"arcgis-code-editor is ready to go!\");\n});\n```"
715
715
  },
716
716
  {
717
717
  "name": "inheritedFrom",
@@ -1056,7 +1056,7 @@
1056
1056
  "docsTags": [
1057
1057
  {
1058
1058
  "name": "example",
1059
- "text": "const arcgisSqlExpressionEditor = document.createElement(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\narcgisSqlExpressionEditor.componentOnReady().then(() => {\n console.log(\"arcgis-sql-expression-editor is ready to go!\");\n});"
1059
+ "text": "```js\nconst arcgisSqlExpressionEditor = document.createElement(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\narcgisSqlExpressionEditor.componentOnReady().then(() => {\n console.log(\"arcgis-sql-expression-editor is ready to go!\");\n});\n```"
1060
1060
  },
1061
1061
  {
1062
1062
  "name": "inheritedFrom",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@arcgis/coding-components",
4
- "version": "4.34.0-next.2",
4
+ "version": "4.34.0-next.21",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
3
3
  import { s as p } from "./chunks/sql-expr-defaults.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
6
- v4.34.0-next.2 */
6
+ v4.34.0-next.21 */
7
7
  const a = s, r = t;
8
8
  export {
9
9
  c as arcade,
package/dist/loader.js CHANGED
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
2
2
  import { makeDefineCustomElements as i } from "@arcgis/lumina";
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.2 */
5
+ v4.34.0-next.21 */
6
6
  const o = i(e, {
7
7
  "arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,insertText:,layer,orgBaseUrl,serviceUrl;destroy"],
8
8
  "arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "4.34.0-next.2",
3
+ "version": "4.34.0-next.21",
4
4
  "description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -39,10 +39,10 @@
39
39
  ],
40
40
  "license": "SEE LICENSE IN LICENSE.md",
41
41
  "dependencies": {
42
- "@arcgis/arcade-languageservice": "4.34.0-next.2",
43
- "@arcgis/components-utils": "4.34.0-next.2",
44
- "@arcgis/languages-api-utils": "4.34.0-next.2",
45
- "@arcgis/lumina": "4.34.0-next.2",
42
+ "@arcgis/arcade-languageservice": "4.34.0-next.21",
43
+ "@arcgis/components-utils": "4.34.0-next.21",
44
+ "@arcgis/languages-api-utils": "4.34.0-next.21",
45
+ "@arcgis/lumina": "4.34.0-next.21",
46
46
  "monaco-editor": "^0.52.0",
47
47
  "tslib": "^2.8.1",
48
48
  "vscode-languageserver-types": "^3.17.5"
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.2 */
4
- import{a as D}from"./66HHSXAC.js";import"./DPUOX5U2.js";import b from"./5MJ6OCXW.js";import a from"./EBAB6Z7D.js";import"./HW3L5Z2O.js";import"./COFAYLCM.js";import"./B675FOE5.js";import{C as P,a as y,b as p,c as x,l as $,p as F,q as S,r as R,t as g,u,v as V,w as E,x as v,y as L}from"./ZP7HITSD.js";import"./53T47RFW.js";import"./LVTZL6CJ.js";import"./K772MGDL.js";export default $arcgis.t(([,M])=>{var q=(a,i,t)=>{let d=new Map;for(let e=i;e<=t;e++)d.set(a[e],e);return d},_=S(class extends R{constructor(a){if(super(a),a.type!==F.CHILD)throw Error("repeat() can only be used in text expressions")}dt(a,i,t){let d;t===void 0?t=i:i!==void 0&&(d=i);let e=[],n=[],o=0;for(let m of a)e[o]=d?d(m,o):o,n[o]=t(m,o),o++;return{values:n,keys:e}}render(a,i,t){return this.dt(a,i,t).values}update(a,[i,t,d]){let e=E(a),{values:n,keys:o}=this.dt(i,t,d);if(!Array.isArray(e))return this.ut=o,n;let m=this.ut??=[],h=[],b,k,s=0,c=e.length-1,l=0,r=n.length-1;for(;s<=c&&l<=r;)if(e[s]===null)s++;else if(e[c]===null)c--;else if(m[s]===o[l])h[l]=u(e[s],n[l]),s++,l++;else if(m[c]===o[r])h[r]=u(e[c],n[r]),c--,r--;else if(m[s]===o[r])h[r]=u(e[s],n[r]),g(a,h[r+1],e[s]),s++,r--;else if(m[c]===o[l])h[l]=u(e[c],n[l]),g(a,e[s],e[c]),c--,l++;else if(b===void 0&&(b=q(o,l,r),k=q(m,s,c)),b.has(m[s]))if(b.has(m[c])){let f=k.get(o[l]),w=f!==void 0?e[f]:null;if(w===null){let I=g(a,e[s]);u(I,n[l]),h[l]=I}else h[l]=u(w,n[l]),g(a,e[s],w),e[f]=null;l++}else v(e[c]),c--;else v(e[s]),s++;for(;l<=r;){let f=g(a,h[r+1]);u(f,n[l]),h[l++]=f}for(;s<=c;){let f=e[s++];f!==null&&v(f)}return this.ut=o,V(a,h),x}});var A=y`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,C=class extends L{constructor(){super(...arguments),this.messages=D(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=$({bubbles:!1}),this.arcgisFieldSelected=$({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=A}willUpdate(i){i.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(i){if(i.target instanceof HTMLElement)switch(i.target.tagName.toLowerCase()){case"calcite-list-item":{let t=i.target.value;this.arcgisFieldSelected.emit(t??"");break}case"calcite-action":i.stopPropagation();break}}_handleSelectDomain(i){let t=i.target.value;this.arcgisFieldSelected.emit(t?`'${t}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let i=M.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!i?p`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:p`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${_(i.fields,t=>t.name,t=>p`<calcite-list-item @click=${this._handleSelectField} .label=${t.name} .description=${t.alias??""} .value=${t.name}>${t.domain&&p`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let d=t.domain;d?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>p`<calcite-flow-item closable .heading=${this.messages.domainvalues??""} .description=${t.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${_(d.codedValues,e=>e.code,e=>p`<calcite-list-item @click=${this._handleSelectDomain} .label=${e.name} .description=${String(e.code)} .value=${String(e.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(t=>t())}</calcite-flow>`}};P("arcgis-sql-expression-fields",C);return C},a,b)
@@ -1,5 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.2 */
4
- import b from"./3VTVCVWK.js";import{a as P,b as N}from"./B6WGMTJM.js";import{a as _}from"./66HHSXAC.js";import"./DPUOX5U2.js";import a from"./EBAB6Z7D.js";import"./HW3L5Z2O.js";import{i as x,j as w}from"./COFAYLCM.js";import"./B675FOE5.js";import{C as D,a as T,b as n,c as V,d as y,p as C,q as E,r as q,y as I,z as F}from"./ZP7HITSD.js";import"./53T47RFW.js";import"./LVTZL6CJ.js";import"./K772MGDL.js";export default $arcgis.t(([G,U,J,W,,O])=>{var k=class extends q{constructor(e){if(super(e),this.it=y,e.type!==C.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===y||e==null)return this._t=void 0,this.it=e;if(e===V)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};k.directiveName="unsafeHTML",k.resultType=1;var Q=E(k);var Y=T`: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)}`;function j(s){if(!s)return;let e=s.indexOf('{"error":');if(e!==-1)try{let t=s.slice(e),a=JSON.parse(t);if(a&&typeof a=="object"&&a.error)return a.error}catch{return}}async function K(s){let{baseUrl:e,skillId:t,message:a,authToken:o,previousConversationId:i,context:r}=s,c=t?`${e}/skills/${t}/chat`:`${e}/chat`,l=[],d={message:a,context:r};i&&(d.conversation_id=i);let p;try{p=await U(c,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(d),responseType:"json"})}catch(h){let b=h?.details?.rawResponse||h?.message||String(h),v=j(b),f=new Error(`Failed to send message: ${a}. Response: ${b}`);throw v&&(f.arcadeAssistantError=v),f}let m=p.data;if(!m.hasMore)throw new Error("Expected hasMore to be true");l.push(m);let L=m.conversationId,B=m.inquiryId,A=m.sequenceNumber;async function H(){let h=0,b=25;for(;h<b;){await new Promise(g=>setTimeout(g,1e3));let v=X(L,A,B),f;try{f=await U(c,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(v),responseType:"json"})}catch(g){let R=g?.details?.rawResponse||g?.message||String(g),S=j(R),M=new Error(`Polling failed. Response: ${R}`);throw S&&(M.arcadeAssistantError=S),M}let u=f.data;if(u.context&&u.context.kind==="ArcgisErrorAsContext"&&u.context.error)throw new Error(u.context.error.message||"ArcGIS Assistant error");if(l.push(u),A=u.sequenceNumber,h++,!u.hasMore)break}if(h===b)throw new Error("Request timed out")}return await H(),l}function X(s,e,t){return{conversationId:s,inquiryId:t,ackSequenceNumber:e}}var Z=s=>{let e=s.value.length,t=72,a=180,o=s.offsetWidth,i=Math.max(1,Math.floor(o/8)),r=Math.ceil(e/i),c=t+(r-2)*24;s.style.setProperty("--calcite-text-area-min-height",`${Math.min(c,a)}px`)};function ee({messages:s}){return n`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${s.beta??"Beta"}>${s.beta??"Beta"}</calcite-chip>`}function te({messages:s}){return n`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-tooltip reference-element=legal-disclaimer>${s.legaldisclaimer}</calcite-tooltip>`}function se({errorMessage:s}){return n`<calcite-input-message id=error-message status=invalid slot=footer-start icon=exclamation-mark-triangle scale=m>${s}</calcite-input-message>`}function ie({active:s,setActive:e,messages:t}){return n`<calcite-alert slot=alerts .open=${s} 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>`}function ae({isDisabled:s,isReadOnly:e,setQuestion:t,setIsViewingResult:a,textAreaRef:o,question:i,errorMessage:r,setErrorMessage:c,submitQuestion:l,messages:d}){return n`<div class="text-area-wrapper"><calcite-text-area resize=none .readOnly=${s||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=${i} @calciteTextAreaInput=${p=>{Z(p.target),t(p.target.value)}} ${N(o)}>${r&&se({errorMessage:r})||""}</calcite-text-area><div class="response-actions">${e?n`<calcite-button round appearance=outline-fill icon-start=speech-bubble-plus @click=${()=>{t(""),a(!1)}}>${d.askagain||"Ask again"}</calcite-button>`:n`<calcite-button alignment=end round icon-end=effects appearance=solid .loading=${s} .disabled=${s} @click=${async()=>{c(i?"":d.enteraprompt??"Please enter a prompt"),await l()}}>${d.ask||"Ask"}</calcite-button>`}</div></div>`}function ce({open:s,setOpen:e,messages:t,feedbackValue:a,setFeedbackValue:o,feedbackText:i,setFeedbackText:r,onSubmit:c}){return n`<calcite-sheet class="feedback-sheet" .label=${t.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${s} @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=${a==="good"} @click=${()=>o("good")}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${a==="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=${i} @calciteTextAreaInput=${l=>r(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>`}var oe="arcade_generation",re="ArcadeCodeRequest",ne="visualization",le="ArcadeAssistant",de=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],z=[],$=class extends I{constructor(){super(...arguments),this.textAreaRef=P(),this.messages=_(),this.feedbackService=void 0,this.handleFeedbackButton=e=>{this.feedbackValue===e&&this.feedbackActive?(this.feedbackActive=!1,this.feedbackValue=void 0,this.feedbackText=""):(this.feedbackValue=e,this.feedbackActive=!0)},this.handleFeedbackSheetClose=()=>{this.feedbackActive=!1,this.feedbackValue=void 0,this.feedbackText=""},this.handleFeedbackSubmit=async()=>{if(this.feedbackValue){if(this.feedbackServiceUrl){if(!this.feedbackService){let i=new J({url:this.feedbackServiceUrl});await i.load();let r=i.fields,c=[];if(de.forEach(l=>{r.some(d=>d.name===l)||c.push(l)}),c.length>0){console.error(`Missing the following fields in feedback service: ${c.join(", ")}.
5
- Feedback will not be logged.`),this.handleFeedbackSheetClose();return}this.feedbackService=i}let e=this.getModel(),t=e?await this.getProfileAndMetadata(e.uri):void 0,a={user_evaluation:this.feedbackValue,your_comments:this.feedbackText,question:this.question,answer:this.history[0]?.script??"",useragent:navigator.userAgent,_source:le,version:this.appVersion??"",context:t?JSON.stringify(t):"",extras:t?.profileName??""},o=new W({attributes:a});try{await this.feedbackService?.applyEdits({addFeatures:[o]})}catch(i){console.error("Error submitting feedback:",i)}}this.handleFeedbackSheetClose()}},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.isViewingResult=!1,this.confirmationActive=!1,this.isDisabled=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedbackActive=!1,this.feedbackValue=void 0,this.feedbackText="",this.copySuccess=!1,this.assistantsEnabled=!1,this.closed=!1}static{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}}static{this.styles=Y}async destroy(){}connectedCallback(){super.connectedCallback(),this.history=z}disconnectedCallback(){super.disconnectedCallback(),z=this.history}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.question){this.isDisabled=!0;try{let e=await this.getToken(),t=this.getModel();if(!t)return;let{profileName:a,metadata:o}=await this.getProfileAndMetadata(t.uri),i=(await K({baseUrl:this.serviceUrl,skillId:oe,message:this.question,authToken:e,context:{kind:re,context:{profile_name:a,metadata:o}}})).find(r=>r.context?.kind==="ArcadeCodeResponse");if(!i)return;i.context?.kind==="ArcadeCodeResponse"&&(this.history.unshift({script:i?.context?.arcadeCode?.code,error:void 0,question:this.question}),this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){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)}finally{this.isDisabled=!1}}}async getToken(){let{token:e}=await G.getCredential(this.orgBaseUrl);return e}async getProfileAndMetadata(e){let t=ne,a=O.getEditorProfileForModel(e);a?.loaded||await a?.loadSource();let o=this.editorRef.profile;o&&"id"in o&&(t=o.id);let i=a?.definition?.variables?.find(c=>c.type==="feature"),r=[];return i?.definition&&"fields"in i.definition&&(r=i.definition.fields.map(c=>({name:c.name,type:c.type,alias:c.alias}))),{profileName:t,metadata:r}}render(){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}>${ee({messages:this.messages})}${te({messages:this.messages})}${ie({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${ae({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=${w(this.history[0]?.script??"")||this.history[0]?.error} @calciteListItemSelect=${()=>{x(this.editorRef.editorInstance,this.history[0]?.script??"",this.messages.disclaimercomment??"Expression generated by ArcGIS Arcade Assistant (beta)"),this.isViewingResult=!1,this.setQuestion("")}}><code slot=content><pre class="break-spaces">${w(this.history[0]?.script??"")}</pre></code></calcite-list-item></calcite-list><div class="response-actions"><calcite-button icon-start=plus round kind=brand @click=${()=>{x(this.editorRef.editorInstance,this.history[0]?.script??"",this.messages.disclaimercomment??"Expression generated by ArcGIS Arcade Assistant (beta)"),this.isViewingResult=!1,this.setQuestion("")}}>${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()=>{let e=this.history[0]?.script??"";e&&(await navigator.clipboard.writeText(e),this.copySuccess=!0,setTimeout(()=>{this.copySuccess=!1},1500))}}>${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=${()=>{this.errorMessage="",this.setQuestion(e.question),this.textAreaRef.value?.setFocus()}}><calcite-icon icon=recent scale=s slot=content-end></calcite-icon></calcite-list-item>`)}</calcite-list></calcite-block>${this.feedbackActive?n`<calcite-shell>${ce({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>${Q(this.messages.useofassistant?.replace("{aiassistants}",`<strong>${this.messages.aiassistants??"Ai Assistants"}</strong>`))}</p></calcite-block></calcite-flow-item></calcite-flow>`}};D("arcgis-arcade-coding-assistant",$);return $},"identity/IdentityManager","request","layers/FeatureLayer","Graphic",a,b)