@arcgis/coding-components 4.34.0-next.86 → 4.34.0-next.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addons/arcade-coding-assistant/useArcadeAssistant.d.ts +2 -0
- package/dist/addons.js +1 -1
- package/dist/cdn/{ZUBNBNKD.js → 46X6DKSW.js} +2 -2
- package/dist/cdn/{BCYG5NPA.js → 5ASGKW2Q.js} +2 -2
- package/dist/cdn/{OAPYIJ47.js → 5CEHE7OX.js} +2 -2
- package/dist/cdn/{RIP6VEEO.js → 6DR574NK.js} +2 -2
- package/dist/cdn/{5L2I6U32.js → 6GX5LQIF.js} +2 -2
- package/dist/cdn/{3WNLVJHE.js → 724OIPXG.js} +2 -2
- package/dist/cdn/{QXCWBWGD.js → 7GX2UMDB.js} +1 -1
- package/dist/cdn/{4D4OM3XG.js → AVKRRXAK.js} +2 -2
- package/dist/cdn/{IKMFNK6J.js → BD3LAZNE.js} +1 -1
- package/dist/cdn/{A2Y6UL5A.js → CRC22CVG.js} +2 -2
- package/dist/cdn/{7YDVVJVD.js → CTZVWSJI.js} +2 -2
- package/dist/cdn/{ZDT6IM7U.js → EEMQ6RUL.js} +2 -2
- package/dist/cdn/{MVR5JLC6.js → FFFNSLUR.js} +2 -2
- package/dist/cdn/{UUABYQVD.js → H42F6W5P.js} +2 -2
- package/dist/cdn/{5YL5E5KF.js → HELRDASG.js} +4 -4
- package/dist/cdn/IDUQVEZQ.js +4 -0
- package/dist/cdn/{TLZNAJL6.js → KEN6GSMM.js} +2 -2
- package/dist/cdn/{FCJP5BTI.js → KIM3FVRF.js} +2 -2
- package/dist/cdn/{3B7VB2X6.js → LA243ISC.js} +2 -2
- package/dist/cdn/{5YLMMOBI.js → MUCENPYA.js} +2 -2
- package/dist/cdn/{DA2MGOPY.js → NGWEI2LJ.js} +2 -2
- package/dist/cdn/{CGEASYVQ.js → PDGHBGJ6.js} +2 -2
- package/dist/cdn/{BZZ3OLKH.js → RAU6AX5V.js} +2 -2
- package/dist/cdn/RLHJNQYP.js +4 -0
- package/dist/cdn/{FQUTR3T7.js → RS5DHEHM.js} +2 -2
- package/dist/cdn/{G4HQYD75.js → SXJ2RQDM.js} +1 -1
- package/dist/cdn/{GJYTYZLT.js → T24URE6R.js} +2 -2
- package/dist/cdn/{TKSDZ3NF.js → UEEUOAEU.js} +2 -2
- package/dist/cdn/{UK22SX7M.js → UV3N7P4M.js} +2 -2
- package/dist/cdn/{IFU7L5YA.js → V4W2R5WW.js} +2 -2
- package/dist/cdn/{2FUDGVYP.js → VQ6YNL4O.js} +3 -3
- package/dist/cdn/{SKE3PFKL.js → VUUQOK6T.js} +2 -2
- package/dist/cdn/{RFKVHUDC.js → WIJC5S4J.js} +1 -1
- package/dist/cdn/{KSSRE3XQ.js → WS62I5BN.js} +1 -1
- package/dist/cdn/{6762YOZL.js → X5DDICZX.js} +1 -1
- package/dist/cdn/{ZZCOJ5X5.js → XDJPVDBO.js} +2 -2
- package/dist/cdn/{NJOA4SBB.js → YDZLBNDU.js} +2 -2
- package/dist/cdn/{FN2DWHGZ.js → YFWZ6SNQ.js} +2 -2
- package/dist/cdn/{IPSQP7FX.js → YGZRXWQL.js} +2 -2
- package/dist/cdn/{IJ2G4YOX.js → ZE4LWW3K.js} +2 -2
- package/dist/cdn/{A6I4PFMU.js → ZK7YHYIO.js} +2 -2
- package/dist/cdn/{267VXT7C.js → ZQCOEBQ5.js} +2 -2
- package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +45096 -44897
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +4 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +108 -56
- package/dist/components/arcgis-arcade-editor/index.d.ts +1 -0
- package/dist/components/arcgis-arcade-editor/index.js +1 -0
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.d.ts +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +13 -24
- package/dist/docs/docs.json +23 -12
- package/dist/docs/vscode.html-custom-data.json +0 -5
- package/dist/docs/web-types.json +8 -10
- package/dist/index.js +1 -1
- package/dist/loader.js +6 -6
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/dist/utils/arcade-assistant/types.d.ts +28 -0
- package/dist/utils/arcade-assistant/utils.d.ts +9 -0
- package/package.json +5 -5
- package/dist/cdn/AWUIHID7.js +0 -4
- package/dist/cdn/LJKRENXI.js +0 -4
package/dist/cdn/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import{C as i,o as e}from"./
|
|
3
|
+
v4.34.0-next.89 */
|
|
4
|
+
import{C as i,o as e}from"./V4W2R5WW.js";import"./IDUQVEZQ.js";import"./X5DDICZX.js";var r=e(i,{"arcgis-arcade-coding-assistant":[()=>import("./T24URE6R.js"),"appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./RLHJNQYP.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./ZK7YHYIO.js"),"consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./AVKRRXAK.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./VQ6YNL4O.js"),"editorInstance:,editorOptions:,language,modelId:,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],"arcgis-editor-variables":[()=>import("./5CEHE7OX.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./46X6DKSW.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./UV3N7P4M.js"),"hideSideBar,profile:,script"],"arcgis-sql-expression-fields":[()=>import("./YFWZ6SNQ.js"),"loading,modelId"]});r({resourcesUrl:import.meta.url});var o=new CSSStyleSheet;o.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-sql-expression-editor){visibility:hidden}:root{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-side-panel-w: 600px;--arcgis-coding-components-side-panel-max-w: 45%;--arcgis-editor-comment: #606060;--arcgis-editor-constant: #9809C8;--arcgis-editor-date: #296389;--arcgis-editor-identifier: #0000B3;--arcgis-editor-keyword: #BF4900;--arcgis-editor-number: #136D3D;--arcgis-editor-string: #A31515}.calcite-mode-dark{--arcgis-editor-comment: #BFBFBF;--arcgis-editor-constant: #CDBAEA;--arcgis-editor-date: #97A6CE;--arcgis-editor-identifier: #9FD4F3;--arcgis-editor-keyword: #EEAA5A;--arcgis-editor-number: #AAD04B;--arcgis-editor-string: #F2877B}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,o];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,i)
|
|
@@ -4,7 +4,7 @@ import { g as m } from "./runtime.js";
|
|
|
4
4
|
import { CompletionItemKind as w, InsertTextFormat as f, InsertTextMode as d } from "vscode-languageserver-types";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
7
|
-
v4.34.0-next.
|
|
7
|
+
v4.34.0-next.89 */
|
|
8
8
|
async function S(e) {
|
|
9
9
|
const { apiVersion: i, bundles: t, hiddenApiItems: n } = e.toEditorProfileDefinition(), r = await h(e.dictionaryVariables);
|
|
10
10
|
return { apiVersion: i, bundles: t, variables: r, hiddenApiItems: n?.map((s) => s.toLowerCase()) };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createArcadeExecutor as C } from "@arcgis/core/arcade.js";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
-
v4.34.0-next.
|
|
4
|
+
v4.34.0-next.89 */
|
|
5
5
|
const G = "https://developers.arcgis.com/arcade/", O = 100, A = 100;
|
|
6
6
|
function u(t) {
|
|
7
7
|
return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.arcade.featureset.support.FeatureSet";
|
|
@@ -9,7 +9,7 @@ import { debounce as F } from "@arcgis/toolkit/function";
|
|
|
9
9
|
import { Deferred as _ } from "@arcgis/toolkit/promise";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
12
|
+
v4.34.0-next.89 */
|
|
13
13
|
const S = [
|
|
14
14
|
"<=",
|
|
15
15
|
">=",
|
package/dist/chunks/editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
-
v4.34.0-next.
|
|
4
|
+
v4.34.0-next.89 */
|
|
5
5
|
const o = e`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w)}.side-panel calcite-flow{height:100%}}}`;
|
|
6
6
|
export {
|
|
7
7
|
o as s
|
package/dist/chunks/fields.js
CHANGED
|
@@ -14,7 +14,7 @@ import { filterApiLibraryForContext as le } from "@arcgis/languages-api-utils";
|
|
|
14
14
|
import { Emitter as x, Uri as $ } from "monaco-editor";
|
|
15
15
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
16
16
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
17
|
-
v4.34.0-next.
|
|
17
|
+
v4.34.0-next.89 */
|
|
18
18
|
function B(t) {
|
|
19
19
|
return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && g(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
|
|
20
20
|
}
|
package/dist/chunks/markdown.js
CHANGED
|
@@ -4,7 +4,7 @@ import { IStandaloneThemeService as ie } from "monaco-editor/esm/vs/editor/stand
|
|
|
4
4
|
import { generateTokensCSSForColorMap as we } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
7
|
-
v4.34.0-next.
|
|
7
|
+
v4.34.0-next.89 */
|
|
8
8
|
async function ye(r, e) {
|
|
9
9
|
return await (await me()).colorize(r, e, { tabSize: 2 });
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
9
|
-
v4.34.0-next.
|
|
9
|
+
v4.34.0-next.89 */
|
|
10
10
|
function $(e, n, l, i) {
|
|
11
11
|
if (!n)
|
|
12
12
|
return [];
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
2
2
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
5
|
+
v4.34.0-next.89 */
|
|
6
6
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
7
7
|
t.t = s;
|
|
8
8
|
t.o = r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i from "@arcgis/core/request.js";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
-
v4.34.0-next.
|
|
4
|
+
v4.34.0-next.89 */
|
|
5
5
|
function p() {
|
|
6
6
|
return !!window.MonacoEnvironment?.getWorkerUrl;
|
|
7
7
|
}
|
|
@@ -8,7 +8,7 @@ import { g as c } from "./arcade-service-accessors.js";
|
|
|
8
8
|
import { a as n } from "./sql-expr-defaults.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.89 */
|
|
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/toolkit/intl";
|
|
|
4
4
|
import { g as b } from "./runtime.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
7
|
-
v4.34.0-next.
|
|
7
|
+
v4.34.0-next.89 */
|
|
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 {
|
|
@@ -8,7 +8,7 @@ import { a as d } from "./sql-expr-defaults.js";
|
|
|
8
8
|
import { debounce as N } from "@arcgis/toolkit/function";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.89 */
|
|
12
12
|
let h = new _();
|
|
13
13
|
class k {
|
|
14
14
|
constructor(e) {
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/lumina/controllers";
|
|
|
2
2
|
import { g as t } from "./runtime.js";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
5
|
+
v4.34.0-next.89 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
|
@@ -16,7 +16,7 @@ import K from "@arcgis/core/Graphic.js";
|
|
|
16
16
|
import { b as X } from "../../chunks/language-defaults-base.js";
|
|
17
17
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
18
18
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
19
|
-
v4.34.0-next.
|
|
19
|
+
v4.34.0-next.89 */
|
|
20
20
|
const Z = W`:host(:not([closed])){--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.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;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-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;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-background-color: white;--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}}:host([closed]){display:none}`;
|
|
21
21
|
class y extends Error {
|
|
22
22
|
constructor({
|
|
@@ -10,6 +10,7 @@ import { EditorProfile } from '../../utils/profile/editor-profile';
|
|
|
10
10
|
import { ArcadeResult, IEditorTestContext } from '../../utils/arcade-executor';
|
|
11
11
|
import { ResultPanelName } from '../arcgis-arcade-results/customElement.js';
|
|
12
12
|
import { ICustomPanel } from '../../utils/custom-panel';
|
|
13
|
+
import { ArcadeAssistantConfig, ArcadeAssistantRemoteState } from '../../utils/arcade-assistant/types';
|
|
13
14
|
|
|
14
15
|
type SidePanelName = "api" | "none" | "suggestions" | "variables";
|
|
15
16
|
type WithCustomPanels = {
|
|
@@ -73,7 +74,7 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
|
|
|
73
74
|
* Example:
|
|
74
75
|
* ```
|
|
75
76
|
* {
|
|
76
|
-
* bundles: ["core", "dataAccess", "geometry", "portal"],
|
|
77
|
+
* bundles: ["core", "dataAccess", "geometry", "portal-access"],
|
|
77
78
|
* variables: [
|
|
78
79
|
* {
|
|
79
80
|
* name: "$feature",
|
|
@@ -110,6 +111,8 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
|
|
|
110
111
|
* @internal
|
|
111
112
|
*/
|
|
112
113
|
customPanels?: ICustomPanel[];
|
|
114
|
+
/** enables and configures the arcade assistant */
|
|
115
|
+
arcadeAssistant?: ArcadeAssistantConfig;
|
|
113
116
|
/** @deprecated **Deprecated** since 4.30. Use `script` property instead. */
|
|
114
117
|
getScript(): Promise<string | undefined>;
|
|
115
118
|
/** Returns the Arcade result for the script for the provided test data. */
|
|
@@ -1,40 +1,80 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { css as
|
|
3
|
-
import { KeyCode as
|
|
1
|
+
import { g as b, c as x } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as A, html as i, nothing as u } from "lit";
|
|
3
|
+
import { KeyCode as v } from "monaco-editor";
|
|
4
4
|
import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { generateGuid as
|
|
9
|
-
import { Deferred as
|
|
10
|
-
import { D as
|
|
11
|
-
import { s as
|
|
12
|
-
import { b as
|
|
13
|
-
import { a as
|
|
14
|
-
import { u as
|
|
15
|
-
import { createRef as
|
|
16
|
-
import { s as
|
|
7
|
+
import { LitElement as S, createEvent as g, noShadowRoot as $, safeClassMap as r } from "@arcgis/lumina";
|
|
8
|
+
import { generateGuid as P } from "@arcgis/toolkit/string";
|
|
9
|
+
import { Deferred as E } from "@arcgis/toolkit/promise";
|
|
10
|
+
import { D as w, e as f } from "../../chunks/arcade-executor.js";
|
|
11
|
+
import { s as y } from "../../chunks/setup-monaco.js";
|
|
12
|
+
import { b as c } from "../../chunks/arcade-defaults.js";
|
|
13
|
+
import { a as R } from "../../chunks/arcade-service-accessors.js";
|
|
14
|
+
import { u as D } from "../../chunks/useT9n.js";
|
|
15
|
+
import { createRef as C, ref as B } from "lit-html/directives/ref.js";
|
|
16
|
+
import { s as k } from "../../chunks/editor.js";
|
|
17
|
+
import I from "@arcgis/core/identity/IdentityManager.js";
|
|
17
18
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
18
19
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
19
|
-
v4.34.0-next.
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
v4.34.0-next.89 */
|
|
21
|
+
const M = A`@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}}}`, L = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", T = [
|
|
22
|
+
"popup",
|
|
23
|
+
"popup-element",
|
|
24
|
+
"visualization",
|
|
25
|
+
"labeling",
|
|
26
|
+
"aggregate-field",
|
|
27
|
+
"popup-feature-reduction",
|
|
28
|
+
"popup-voxel"
|
|
29
|
+
], F = (s) => {
|
|
30
|
+
const e = T.includes(s);
|
|
31
|
+
return e || console.warn(`Profile "${s}" is not supported by the Arcade Coding Assistant.`), e;
|
|
32
|
+
}, U = (s) => {
|
|
33
|
+
const { aiAssistantsEnabled: e } = s;
|
|
34
|
+
return e === void 0 ? (console.warn("areAiAssistantsEnabled is not defined in the organizations settings."), !1) : e;
|
|
35
|
+
}, j = async (s) => (await I.getCredential(s)).token;
|
|
36
|
+
async function N({
|
|
37
|
+
portalUrl: s,
|
|
38
|
+
profile: e
|
|
39
|
+
}) {
|
|
40
|
+
let t;
|
|
41
|
+
if (e && "id" in e && (t = e.id), t === void 0 || !F(t))
|
|
42
|
+
return console.error("Arcade assistant addon initialization failed: unsupported profile."), { shouldRender: !1 };
|
|
43
|
+
const a = await j(s), n = `${s}/sharing/rest/portals/self?f=json&token=${a}`, h = `${s}/sharing/rest/portals/self/settings?f=json&token=${a}`, [l, d] = await Promise.all([
|
|
44
|
+
fetch(n, { credentials: "include" }).then((o) => o.json()),
|
|
45
|
+
fetch(h, { credentials: "include" }).then((o) => o.json())
|
|
46
|
+
]).catch((o) => (console.error("Error fetching portal self or settings response:", o), [{}, {}])), p = l?.helperServices?.aiAssistantServices?.url;
|
|
47
|
+
if (!p)
|
|
48
|
+
return console.warn("Arcade Assistant service URL is not available in the portal self response."), { shouldRender: !1 };
|
|
49
|
+
const _ = l.helpBase || "";
|
|
50
|
+
if (!d)
|
|
51
|
+
return console.warn("Arcade Assistant settings response is not available."), { shouldRender: !1 };
|
|
52
|
+
const m = U(d);
|
|
53
|
+
return {
|
|
54
|
+
shouldRender: !0,
|
|
55
|
+
serviceUrl: p,
|
|
56
|
+
helpBase: _,
|
|
57
|
+
assistantsEnabled: m,
|
|
58
|
+
feedbackServiceUrl: L
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
class O extends S {
|
|
22
62
|
constructor() {
|
|
23
|
-
super(...arguments), this._codeEditorElt =
|
|
63
|
+
super(...arguments), this._codeEditorElt = C(), this._componentReadyDefer = new E(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = D(), this._modelId = P(), this._openArcadeHelp = () => void window.open(w, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
24
64
|
if (!e.target)
|
|
25
65
|
return;
|
|
26
|
-
const
|
|
27
|
-
this.openedSidePanel =
|
|
28
|
-
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange =
|
|
66
|
+
const t = e.target?.dataset.panelName ?? "none";
|
|
67
|
+
this.openedSidePanel = t === this.openedSidePanel ? "none" : t, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(console.error);
|
|
68
|
+
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = g({ bubbles: !1 }), this.arcgisScriptChange = g({ bubbles: !1 });
|
|
29
69
|
}
|
|
30
70
|
static {
|
|
31
|
-
this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 2, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0 };
|
|
71
|
+
this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, _arcadeAssistantRemoteState: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 2, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, arcadeAssistant: 0 };
|
|
32
72
|
}
|
|
33
73
|
static {
|
|
34
|
-
this.shadowRootOptions =
|
|
74
|
+
this.shadowRootOptions = $;
|
|
35
75
|
}
|
|
36
76
|
static {
|
|
37
|
-
this.styles = [
|
|
77
|
+
this.styles = [M, k];
|
|
38
78
|
}
|
|
39
79
|
get editorInstance() {
|
|
40
80
|
return this._codeEditorElt.value?.editorInstance;
|
|
@@ -52,25 +92,25 @@ class C extends f {
|
|
|
52
92
|
if (!e)
|
|
53
93
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
54
94
|
await this._componentReadyDefer.promise;
|
|
55
|
-
const
|
|
56
|
-
return await
|
|
95
|
+
const t = this._codeEditorElt.value?.value;
|
|
96
|
+
return await f(e.definition, t, this.testData);
|
|
57
97
|
}
|
|
58
98
|
async setFocus() {
|
|
59
99
|
await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
|
|
60
100
|
}
|
|
61
101
|
async load() {
|
|
62
|
-
const e =
|
|
63
|
-
|
|
102
|
+
const e = b("./assets");
|
|
103
|
+
y(e), await this._updateEditorProfile(), await this._updateArcadeAssistantRemoteState();
|
|
64
104
|
}
|
|
65
105
|
willUpdate(e) {
|
|
66
|
-
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") &&
|
|
106
|
+
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && c.updateApiContextForModel(this._modelId, {
|
|
67
107
|
snippets: this.snippets
|
|
68
|
-
});
|
|
108
|
+
}), e.has("arcadeAssistant") && this._updateArcadeAssistantRemoteState();
|
|
69
109
|
}
|
|
70
110
|
async loaded() {
|
|
71
111
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
72
|
-
const e = await
|
|
73
|
-
this._disposables.push(e.onDiagnosticsChange((
|
|
112
|
+
const e = await R();
|
|
113
|
+
this._disposables.push(e.onDiagnosticsChange((t) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(t.diagnostics))), this.testData && this._addExecuteScriptAction(), await this._codeEditorElt.value?.setFocus();
|
|
74
114
|
}
|
|
75
115
|
disconnectedCallback() {
|
|
76
116
|
for (super.disconnectedCallback(); this._disposables.length; )
|
|
@@ -85,10 +125,10 @@ class C extends f {
|
|
|
85
125
|
async _updateEditorProfile() {
|
|
86
126
|
this._preparingArcade = !0;
|
|
87
127
|
try {
|
|
88
|
-
await
|
|
128
|
+
await c.setProfileForModel(this._modelId, this.profile, {
|
|
89
129
|
locale: this.messages._t9nLocale,
|
|
90
130
|
snippets: this.snippets
|
|
91
|
-
}), this._editorProfile =
|
|
131
|
+
}), this._editorProfile = c.getEditorProfileForModel(this._modelId);
|
|
92
132
|
} catch {
|
|
93
133
|
this._editorProfile = void 0;
|
|
94
134
|
} finally {
|
|
@@ -96,20 +136,20 @@ class C extends f {
|
|
|
96
136
|
}
|
|
97
137
|
}
|
|
98
138
|
async _updateApiLibrary() {
|
|
99
|
-
this._apiLibrary = await
|
|
139
|
+
this._apiLibrary = await c.getApiLibraryForModel(this._modelId);
|
|
100
140
|
}
|
|
101
141
|
async _executeScript() {
|
|
102
142
|
const e = this.testData;
|
|
103
143
|
if (!this._codeEditorElt.value || !e)
|
|
104
144
|
return;
|
|
105
|
-
const
|
|
106
|
-
if (!
|
|
145
|
+
const t = await this._editorProfilePromise;
|
|
146
|
+
if (!t) {
|
|
107
147
|
this._executionResult = { type: "error", value: "Missing editor profile", error: null };
|
|
108
148
|
return;
|
|
109
149
|
}
|
|
110
150
|
this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => void (async () => {
|
|
111
|
-
const
|
|
112
|
-
this._executionResult = await
|
|
151
|
+
const a = this._codeEditorElt.value?.value;
|
|
152
|
+
this._executionResult = await f(t.definition, a, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
|
|
113
153
|
})(), 0);
|
|
114
154
|
}
|
|
115
155
|
_toggleShowExecutionPanel() {
|
|
@@ -141,7 +181,7 @@ class C extends f {
|
|
|
141
181
|
// An unique identifier for the action.
|
|
142
182
|
id: "run-script",
|
|
143
183
|
label: "Run Arcade Expression",
|
|
144
|
-
keybindings: [
|
|
184
|
+
keybindings: [v.F5],
|
|
145
185
|
contextMenuGroupId: "code",
|
|
146
186
|
contextMenuOrder: 1,
|
|
147
187
|
run: () => {
|
|
@@ -151,20 +191,26 @@ class C extends f {
|
|
|
151
191
|
e && (this._executeScriptAction = e, this._disposables.push(e));
|
|
152
192
|
}
|
|
153
193
|
_disposeSafely(e) {
|
|
154
|
-
const
|
|
155
|
-
|
|
194
|
+
const t = this._disposables.indexOf(e);
|
|
195
|
+
t !== -1 && this._disposables.splice(t, 1), e.dispose();
|
|
196
|
+
}
|
|
197
|
+
async _updateArcadeAssistantRemoteState() {
|
|
198
|
+
this.arcadeAssistant && (this._arcadeAssistantRemoteState = await N({
|
|
199
|
+
...this.arcadeAssistant,
|
|
200
|
+
profile: this.profile
|
|
201
|
+
}));
|
|
156
202
|
}
|
|
157
203
|
renderMainActionBar() {
|
|
158
|
-
return this.testData ?
|
|
204
|
+
return this.testData ? i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
|
|
159
205
|
}
|
|
160
206
|
renderMainPanel() {
|
|
161
|
-
return
|
|
207
|
+
return i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${c.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${B(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
162
208
|
}
|
|
163
|
-
renderAction({ id: e, label:
|
|
164
|
-
return
|
|
209
|
+
renderAction({ id: e, label: t, icon: a, active: n, panelName: h, iconFlipRtl: l = !1, onClick: d = this._toggleSidePanel }) {
|
|
210
|
+
return i`<calcite-action id=${e ?? u} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${n} @click=${d} data-panel-name=${h ?? u} .iconFlipRtl=${l}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
|
|
165
211
|
}
|
|
166
212
|
renderSideActionBar() {
|
|
167
|
-
return this.hideSideBar ? null :
|
|
213
|
+
return this.hideSideBar ? null : i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
168
214
|
id: "profile-variables-action",
|
|
169
215
|
label: this.messages.profilevariables ?? "",
|
|
170
216
|
icon: "profile-variables",
|
|
@@ -182,7 +228,13 @@ class C extends f {
|
|
|
182
228
|
icon: "lightbulb",
|
|
183
229
|
active: this.openedSidePanel === "suggestions",
|
|
184
230
|
panelName: "suggestions"
|
|
185
|
-
}) : null}${this.
|
|
231
|
+
}) : null}${this._arcadeAssistantRemoteState.shouldRender && this.renderAction({
|
|
232
|
+
id: "arcade-assistant-action",
|
|
233
|
+
label: this.messages.arcadeassistant ?? "Arcade assistant",
|
|
234
|
+
icon: "effects",
|
|
235
|
+
active: this.openedSidePanel === "arcade-assistant",
|
|
236
|
+
panelName: "arcade-assistant"
|
|
237
|
+
}) || ""}${this.customPanels?.map((e) => e.enabled ? this.renderAction({
|
|
186
238
|
id: e.id,
|
|
187
239
|
label: e.name,
|
|
188
240
|
icon: e.icon,
|
|
@@ -202,31 +254,31 @@ class C extends f {
|
|
|
202
254
|
if (this.hideSideBar)
|
|
203
255
|
return null;
|
|
204
256
|
const { openedSidePanel: e } = this;
|
|
205
|
-
return
|
|
257
|
+
return i`<arcgis-language-api-panel class=${r(e === "api" && "side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables class=${r(e === "variables" && "side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"}></arcgis-editor-variables>${this.suggestions?.length && i`<arcgis-arcade-suggestions class=${r(e === "suggestions" && "side-panel flex-panel border-inline-start")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${this.arcadeAssistant && this._arcadeAssistantRemoteState.shouldRender && i`<arcgis-arcade-coding-assistant class=${r(e === "arcade-assistant" && "side-panel flex-panel border-inline-start")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((t) => (
|
|
206
258
|
/** If useFlows is true, we check to make sure the input starts with calcite-flow-item, and if so, we allow them to render custom flow items */
|
|
207
|
-
|
|
259
|
+
t?.useFlows ? t.renderer?.({
|
|
208
260
|
closePanel: this._toggleSidePanel,
|
|
209
261
|
insertText: this._insertText.bind(this),
|
|
210
|
-
closed: e !==
|
|
262
|
+
closed: e !== t.id,
|
|
211
263
|
/** pass this.el instead of "this" as it is what actually gets attached to the dom */
|
|
212
264
|
editorRef: this.el
|
|
213
|
-
}) :
|
|
265
|
+
}) : i`<calcite-flow class=${r(e === t.id ? "side-panel flex-panel border-inline-start" : "hidden")}><calcite-flow-item .heading=${t.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({
|
|
214
266
|
closePanel: this._toggleSidePanel,
|
|
215
267
|
insertText: this._insertText.bind(this),
|
|
216
|
-
closed: e !==
|
|
268
|
+
closed: e !== t.id,
|
|
217
269
|
/** pass this.el instead of "this" as it is what actually gets attached to the dom */
|
|
218
270
|
editorRef: this.el
|
|
219
271
|
})}</calcite-flow-item></calcite-flow>`
|
|
220
272
|
))}`;
|
|
221
273
|
}
|
|
222
274
|
renderResultsPanel() {
|
|
223
|
-
return this._showExecutionPanel ?
|
|
275
|
+
return this._showExecutionPanel ? i`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>` : null;
|
|
224
276
|
}
|
|
225
277
|
render() {
|
|
226
|
-
return
|
|
278
|
+
return i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`;
|
|
227
279
|
}
|
|
228
280
|
}
|
|
229
|
-
|
|
281
|
+
x("arcgis-arcade-editor", O);
|
|
230
282
|
export {
|
|
231
|
-
|
|
283
|
+
O as ArcgisArcadeEditor
|
|
232
284
|
};
|
|
@@ -6,6 +6,7 @@ import "@esri/calcite-components/components/calcite-tooltip";
|
|
|
6
6
|
import "../arcgis-language-api-panel/index.js";
|
|
7
7
|
import "../arcgis-editor-variables/index.js";
|
|
8
8
|
import "../arcgis-arcade-suggestions/index.js";
|
|
9
|
+
import "../arcgis-arcade-coding-assistant/index.js";
|
|
9
10
|
import "@esri/calcite-components/components/calcite-flow";
|
|
10
11
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
11
12
|
import "../arcgis-arcade-results/index.js";
|
|
@@ -6,6 +6,7 @@ import "@esri/calcite-components/components/calcite-tooltip";
|
|
|
6
6
|
import "../arcgis-language-api-panel/index.js";
|
|
7
7
|
import "../arcgis-editor-variables/index.js";
|
|
8
8
|
import "../arcgis-arcade-suggestions/index.js";
|
|
9
|
+
import "../arcgis-arcade-coding-assistant/index.js";
|
|
9
10
|
import "@esri/calcite-components/components/calcite-flow";
|
|
10
11
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
11
12
|
import "../arcgis-arcade-results/index.js";
|
|
@@ -8,7 +8,7 @@ import { s as O } from "../../chunks/fields.js";
|
|
|
8
8
|
import "@arcgis/toolkit/function";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.89 */
|
|
12
12
|
const D = C`: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",
|
|
@@ -8,7 +8,7 @@ import { f as b } from "../../chunks/monaco-importer.js";
|
|
|
8
8
|
import { u as _ } from "../../chunks/useT9n.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.89 */
|
|
12
12
|
function v(o) {
|
|
13
13
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
14
14
|
}
|
|
@@ -38,7 +38,7 @@ export declare class ArcgisCodeEditor extends LitElement {
|
|
|
38
38
|
* For example, with arcade, the model id is used to store the arcade profile and other metadata.
|
|
39
39
|
* The unique identifier is especially useful when there are multiple editors on the same page.
|
|
40
40
|
*/
|
|
41
|
-
modelId: string
|
|
41
|
+
modelId: `${string}-${string}-${string}-${string}-${string}`;
|
|
42
42
|
/**
|
|
43
43
|
* The initial value for the editor.
|
|
44
44
|
* The value is the script, code, css, json, etc.
|
|
@@ -11,7 +11,7 @@ import { load as h } from "@arcgis/lumina/controllers";
|
|
|
11
11
|
import { Range as M, Uri as c, KeyMod as n, KeyCode as t } from "monaco-editor";
|
|
12
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
13
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
14
|
-
v4.34.0-next.
|
|
14
|
+
v4.34.0-next.89 */
|
|
15
15
|
const x = m`@layer{/*!-----------------------------------------------------------
|
|
16
16
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
17
17
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -36,7 +36,7 @@ class I extends w {
|
|
|
36
36
|
super(...arguments), this._componentReadyDefer = new l(), this._disposables = [], this._monacoEditor = h(d), this.modelId = B(), this.value = "", this.arcgisSelectionChange = i({ bubbles: !1 }), this.arcgisValueChange = i({ bubbles: !1 });
|
|
37
37
|
}
|
|
38
38
|
static {
|
|
39
|
-
this.properties = { editorInstance: 32, editorOptions: 0, language: 1, modelId:
|
|
39
|
+
this.properties = { editorInstance: 32, editorOptions: 0, language: 1, modelId: 0, value: 1 };
|
|
40
40
|
}
|
|
41
41
|
static {
|
|
42
42
|
this.shadowRootOptions = E;
|
|
@@ -7,7 +7,7 @@ import { createFilterExpression as f } from "@arcgis/toolkit/string";
|
|
|
7
7
|
import { u } from "../../chunks/useT9n.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
10
|
+
v4.34.0-next.89 */
|
|
11
11
|
const m = n`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -10,7 +10,7 @@ import { u as v } from "../../chunks/useT9n.js";
|
|
|
10
10
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
11
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
13
|
-
v4.34.0-next.
|
|
13
|
+
v4.34.0-next.89 */
|
|
14
14
|
const y = h`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
15
15
|
class I extends p {
|
|
16
16
|
constructor() {
|