@arcgis/coding-components 4.34.0-next.90 → 4.34.0-next.91
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/LICENSE.md +9 -5
- package/README.md +12 -7
- package/dist/addons.js +1 -1
- package/dist/cdn/{CP3U4YSF.js → 24EJ4273.js} +1 -1
- package/dist/cdn/{VXKZUNKA.js → 2HTXXB6X.js} +2 -2
- package/dist/cdn/{OFRDE6E3.js → 56VFOTBU.js} +2 -2
- package/dist/cdn/{IEEN44HX.js → 5F7UENEM.js} +2 -2
- package/dist/cdn/{ZM2K2MAS.js → 652BZNLY.js} +2 -2
- package/dist/cdn/{6O3VJWHR.js → 6B574AGS.js} +1 -1
- package/dist/cdn/{5EXE2HMV.js → 6SBMERKF.js} +2 -2
- package/dist/cdn/{6PTMZNYA.js → 7WN5EUPW.js} +2 -2
- package/dist/cdn/{LQP7DLO6.js → ADDKG7MS.js} +2 -2
- package/dist/cdn/{75CRYGXW.js → B2SVEE4S.js} +2 -2
- package/dist/cdn/{R2EDVX7R.js → BFBTNCHL.js} +2 -2
- package/dist/cdn/{SVY7IBYD.js → BT4UGZBN.js} +1 -1
- package/dist/cdn/{LW6DI2T3.js → D6ZCVT2F.js} +2 -2
- package/dist/cdn/{DKEOKCG7.js → DZE46YLN.js} +2 -2
- package/dist/cdn/{XNRMM53M.js → ECQSE4U2.js} +2 -2
- package/dist/cdn/{SADEE4KJ.js → EVOHTUHM.js} +2 -2
- package/dist/cdn/{AWHOOZ3U.js → FPQVTMSR.js} +1 -1
- package/dist/cdn/{HLVDPSQX.js → FZRVWCWR.js} +2 -2
- package/dist/cdn/{PI3CRHSZ.js → GEAMYBFB.js} +2 -2
- package/dist/cdn/{FZXUF36A.js → HZXFVWUQ.js} +2 -2
- package/dist/cdn/{6JYGI5BH.js → IKQBPW2E.js} +2 -2
- package/dist/cdn/{XLNV7SRF.js → IOBFY5A5.js} +2 -2
- package/dist/cdn/{JH4DZ5RV.js → K32YUUN7.js} +2 -2
- package/dist/cdn/{GA62VHUT.js → K4DQWQ6M.js} +2 -2
- package/dist/cdn/{TYGU4CQ4.js → KER6WUOE.js} +4 -4
- package/dist/cdn/{WQYLWTFB.js → LAHYT6QF.js} +2 -2
- package/dist/cdn/{RKPPFZ4I.js → M532OB6T.js} +2 -2
- package/dist/cdn/{EU7O7GMR.js → NTB5333P.js} +2 -2
- package/dist/cdn/{TJ5A5OJ5.js → OHW5AAUW.js} +2 -2
- package/dist/cdn/{3WJWNRUS.js → P3R5YCB2.js} +2 -2
- package/dist/cdn/{IYYHP37Q.js → PKUFLQ7N.js} +1 -1
- package/dist/cdn/{4DSO2BU7.js → RWERUZ7R.js} +1 -1
- package/dist/cdn/{V5AOVWMA.js → S6MHOFTF.js} +2 -2
- package/dist/cdn/{NSQFCFHM.js → SUNN7BUJ.js} +2 -2
- package/dist/cdn/{Q3PBVC3T.js → SZJUDLSQ.js} +2 -2
- package/dist/cdn/{EXOH7SDX.js → TIOOUZPS.js} +2 -2
- package/dist/cdn/UXUERONT.js +4 -0
- package/dist/cdn/{F7NK4YUQ.js → W7BJDJ5G.js} +2 -2
- package/dist/cdn/{PWFOQQCB.js → WH4PUX2D.js} +2 -2
- package/dist/cdn/{5QETOA5A.js → WKF2HQKA.js} +2 -2
- package/dist/cdn/{YW2W772X.js → XV4W4VKG.js} +1 -1
- package/dist/cdn/{EYKCTFR2.js → ZEFE2OVM.js} +2 -2
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +24830 -24762
- 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 +2 -2
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +2 -2
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +5 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +64 -73
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +8 -3
- package/dist/docs/docs.json +7 -3
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/arcade-assistant/constants.d.ts +2 -0
- package/dist/utils/arcade-assistant/types.d.ts +7 -0
- package/package.json +5 -5
- package/dist/cdn/MRWNMXNR.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.91 */
|
|
4
|
+
import{C as i,o as e}from"./6SBMERKF.js";import"./RWERUZ7R.js";import"./PKUFLQ7N.js";var r=e(i,{"arcgis-arcade-coding-assistant":[()=>import("./SZJUDLSQ.js"),"appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./UXUERONT.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./S6MHOFTF.js"),"consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./IOBFY5A5.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./TIOOUZPS.js"),"editorInstance:,editorOptions:,language,modelId:,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],"arcgis-editor-variables":[()=>import("./DZE46YLN.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./W7BJDJ5G.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./ADDKG7MS.js"),"hideSideBar,profile:,script"],"arcgis-sql-expression-fields":[()=>import("./652BZNLY.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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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.91 */
|
|
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({
|
|
@@ -169,7 +169,7 @@ function pe({ setOpen: i, messages: e, feedback: t, setFeedback: o, onSubmit: r
|
|
|
169
169
|
}}></calcite-checkbox><span>${$((e.agreement ?? "I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}", `<calcite-link href=${le} target="_blank">${e.esriprivacystatement ?? "Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}", `<calcite-link href=${de} target="_blank">${e.supplement ?? "Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${r} .disabled=${!t.termsAccepted || t.submitting} .loading=${t.submitting}>${e.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>` : null;
|
|
170
170
|
}
|
|
171
171
|
function E({ assistantsEnabled: i, messages: e, slot: t, assistantHelpUrl: o, helpTopicUrl: r }) {
|
|
172
|
-
return c`<calcite-block .label=${e.assistantinformation ?? "Assistant information"} slot=${t ?? w} expanded class="info-block"><calcite-chip .label=${e.new ?? "New"} kind=brand>${e.new ?? "New"}</calcite-chip><h1 class="info-heading">${e.introducing ?? "Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities ?? "The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i ? c`<p>${e.keepinmind ?? "Keep in mind the following:"}<ul><li>${e.beconsise ?? "Be concise, but also clear in your request"}</li><li>${e.avoidambiguity ?? "Avoid ambiguity and vagueness"}</li><li>${e.moredetails ?? "you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${$((e.seedocumentation ?? "Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}", `<calcite-link href=${r} target="_blank">${e.documentation ?? "documentation"}</calcite-link>`))}</p>` : c`<p>${$(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link .href=${o} target=_blank icon-end=launch-2>${e.
|
|
172
|
+
return c`<calcite-block .label=${e.assistantinformation ?? "Assistant information"} slot=${t ?? w} expanded class="info-block"><calcite-chip .label=${e.new ?? "New"} kind=brand>${e.new ?? "New"}</calcite-chip><h1 class="info-heading">${e.introducing ?? "Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities ?? "The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i ? c`<p>${e.keepinmind ?? "Keep in mind the following:"}<ul><li>${e.beconsise ?? "Be concise, but also clear in your request"}</li><li>${e.avoidambiguity ?? "Avoid ambiguity and vagueness"}</li><li>${e.moredetails ?? "you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${$((e.seedocumentation ?? "Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}", `<calcite-link href=${r} target="_blank">${e.documentation ?? "documentation"}</calcite-link>`))}</p>` : c`<p>${$(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link .href=${o} target=_blank icon-end=launch-2>${e.configureassistants ?? "Configure Assistants"}</calcite-link></p>`}</calcite-block>`;
|
|
173
173
|
}
|
|
174
174
|
function ue({ messages: i, onProceed: e, onExit: t, helpTopicUrl: o }) {
|
|
175
175
|
return c`<calcite-dialog close-disabled placement=top .heading=${i.welcome ?? "Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted ?? "Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect ?? "AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${$((i.pleasereadhelp ?? "Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}", `<calcite-link href=${o} target="_blank">${i.helptopic ?? "help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed ?? "Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit ?? "Exit"}</calcite-button></calcite-dialog>`;
|
|
@@ -25,7 +25,7 @@ declare const strings: (value: {
|
|
|
25
25
|
capabilities: string;
|
|
26
26
|
aiassistants: string;
|
|
27
27
|
useofassistant: string;
|
|
28
|
-
|
|
28
|
+
configureassistants: string;
|
|
29
29
|
settings: string;
|
|
30
30
|
new: string;
|
|
31
31
|
learnmore: string;
|
|
@@ -93,7 +93,7 @@ declare const strings: (value: {
|
|
|
93
93
|
capabilities: string;
|
|
94
94
|
aiassistants: string;
|
|
95
95
|
useofassistant: string;
|
|
96
|
-
|
|
96
|
+
configureassistants: string;
|
|
97
97
|
settings: string;
|
|
98
98
|
new: string;
|
|
99
99
|
learnmore: string;
|
|
@@ -111,7 +111,11 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
|
|
|
111
111
|
* @internal
|
|
112
112
|
*/
|
|
113
113
|
customPanels?: ICustomPanel[];
|
|
114
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* enables and configures the arcade assistant
|
|
116
|
+
*
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
115
119
|
arcadeAssistant?: ArcadeAssistantConfig;
|
|
116
120
|
/** @deprecated **Deprecated** since 4.30. Use `script` property instead. */
|
|
117
121
|
getScript(): Promise<string | undefined>;
|
|
@@ -1,80 +1,71 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { css as
|
|
3
|
-
import { KeyCode as
|
|
1
|
+
import { g as $, c as P } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as E, html as s, nothing as b } from "lit";
|
|
3
|
+
import { KeyCode as w } 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
|
|
17
|
-
import
|
|
7
|
+
import { LitElement as R, createEvent as A, noShadowRoot as y, safeClassMap as c } from "@arcgis/lumina";
|
|
8
|
+
import { generateGuid as D } from "@arcgis/toolkit/string";
|
|
9
|
+
import { Deferred as C } from "@arcgis/toolkit/promise";
|
|
10
|
+
import { D as k, e as x } from "../../chunks/arcade-executor.js";
|
|
11
|
+
import { s as B } from "../../chunks/setup-monaco.js";
|
|
12
|
+
import { b as l } from "../../chunks/arcade-defaults.js";
|
|
13
|
+
import { a as I } from "../../chunks/arcade-service-accessors.js";
|
|
14
|
+
import { u as M } from "../../chunks/useT9n.js";
|
|
15
|
+
import { createRef as L, ref as T } from "lit-html/directives/ref.js";
|
|
16
|
+
import { s as F } from "../../chunks/editor.js";
|
|
17
|
+
import U from "@arcgis/core/identity/IdentityManager.js";
|
|
18
18
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
19
19
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
20
|
-
v4.34.0-next.
|
|
21
|
-
const
|
|
22
|
-
|
|
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;
|
|
20
|
+
v4.34.0-next.91 */
|
|
21
|
+
const j = E`@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}}}`, z = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", N = (i) => {
|
|
22
|
+
const { aiAssistantsEnabled: e } = i;
|
|
34
23
|
return e === void 0 ? (console.warn("areAiAssistantsEnabled is not defined in the organizations settings."), !1) : e;
|
|
35
|
-
},
|
|
36
|
-
async function
|
|
37
|
-
portalUrl:
|
|
24
|
+
}, O = (i) => !(!i || !("id" in i)), H = async (i) => (await U.getCredential(i)).token;
|
|
25
|
+
async function V({
|
|
26
|
+
portalUrl: i,
|
|
38
27
|
profile: e
|
|
39
28
|
}) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
fetch(n, { credentials: "include" }).then((
|
|
45
|
-
fetch(
|
|
46
|
-
]).
|
|
47
|
-
if (!
|
|
29
|
+
if (!O(e))
|
|
30
|
+
return console.warn("Arcade assistant addon initialization failed: unsupported profile."), { shouldRender: !1 };
|
|
31
|
+
const t = await H(i), a = `${i}/sharing/rest/portals/self?f=json&token=${t}`, n = `${i}/sharing/rest/portals/self/settings?f=json&token=${t}`, d = `${i}/sharing/rest/portals/self/signinSettings?f=json&token=${t}`, h = await Promise.allSettled([
|
|
32
|
+
fetch(a, { credentials: "include" }).then((r) => r.json()),
|
|
33
|
+
fetch(n, { credentials: "include" }).then((r) => r.json()),
|
|
34
|
+
fetch(d, { credentials: "include" }).then((r) => r.json())
|
|
35
|
+
]), [o, p, u] = h, g = o.status === "fulfilled" ? o.value : (console.warn("Failed to fetch selfUrl", o.reason), {}), f = p.status === "fulfilled" ? p.value : (console.warn("Failed to fetch settingsUrl", p.reason), {}), v = u.status === "fulfilled" ? u.value : (console.warn("Failed to fetch signinSettingsUrl", u.reason), {}), _ = g?.helperServices?.aiAssistantServices?.url;
|
|
36
|
+
if (!_)
|
|
48
37
|
return console.warn("Arcade Assistant service URL is not available in the portal self response."), { shouldRender: !1 };
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
38
|
+
const S = g.helpBase || "";
|
|
39
|
+
if (!f)
|
|
51
40
|
return console.warn("Arcade Assistant settings response is not available."), { shouldRender: !1 };
|
|
52
|
-
|
|
53
|
-
return
|
|
41
|
+
let m = N(f);
|
|
42
|
+
return v.blockBetaApps === !0 && (console.warn(
|
|
43
|
+
"Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
|
|
44
|
+
), m = !1), {
|
|
54
45
|
shouldRender: !0,
|
|
55
|
-
serviceUrl:
|
|
56
|
-
helpBase:
|
|
46
|
+
serviceUrl: _,
|
|
47
|
+
helpBase: S,
|
|
57
48
|
assistantsEnabled: m,
|
|
58
|
-
feedbackServiceUrl:
|
|
49
|
+
feedbackServiceUrl: z
|
|
59
50
|
};
|
|
60
51
|
}
|
|
61
|
-
class
|
|
52
|
+
class G extends R {
|
|
62
53
|
constructor() {
|
|
63
|
-
super(...arguments), this._codeEditorElt =
|
|
54
|
+
super(...arguments), this._codeEditorElt = L(), this._componentReadyDefer = new C(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = M(), this._modelId = D(), this._openArcadeHelp = () => void window.open(k, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
64
55
|
if (!e.target)
|
|
65
56
|
return;
|
|
66
57
|
const t = e.target?.dataset.panelName ?? "none";
|
|
67
58
|
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 =
|
|
59
|
+
}, 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 = A({ bubbles: !1 }), this.arcgisScriptChange = A({ bubbles: !1 });
|
|
69
60
|
}
|
|
70
61
|
static {
|
|
71
62
|
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 };
|
|
72
63
|
}
|
|
73
64
|
static {
|
|
74
|
-
this.shadowRootOptions =
|
|
65
|
+
this.shadowRootOptions = y;
|
|
75
66
|
}
|
|
76
67
|
static {
|
|
77
|
-
this.styles = [
|
|
68
|
+
this.styles = [j, F];
|
|
78
69
|
}
|
|
79
70
|
get editorInstance() {
|
|
80
71
|
return this._codeEditorElt.value?.editorInstance;
|
|
@@ -93,23 +84,23 @@ class O extends S {
|
|
|
93
84
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
94
85
|
await this._componentReadyDefer.promise;
|
|
95
86
|
const t = this._codeEditorElt.value?.value;
|
|
96
|
-
return await
|
|
87
|
+
return await x(e.definition, t, this.testData);
|
|
97
88
|
}
|
|
98
89
|
async setFocus() {
|
|
99
90
|
await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
|
|
100
91
|
}
|
|
101
92
|
async load() {
|
|
102
|
-
const e =
|
|
103
|
-
|
|
93
|
+
const e = $("./assets");
|
|
94
|
+
B(e), await this._updateEditorProfile(), await this._updateArcadeAssistantRemoteState();
|
|
104
95
|
}
|
|
105
96
|
willUpdate(e) {
|
|
106
|
-
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") &&
|
|
97
|
+
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && l.updateApiContextForModel(this._modelId, {
|
|
107
98
|
snippets: this.snippets
|
|
108
99
|
}), e.has("arcadeAssistant") && this._updateArcadeAssistantRemoteState();
|
|
109
100
|
}
|
|
110
101
|
async loaded() {
|
|
111
102
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
112
|
-
const e = await
|
|
103
|
+
const e = await I();
|
|
113
104
|
this._disposables.push(e.onDiagnosticsChange((t) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(t.diagnostics))), this.testData && this._addExecuteScriptAction(), await this._codeEditorElt.value?.setFocus();
|
|
114
105
|
}
|
|
115
106
|
disconnectedCallback() {
|
|
@@ -125,10 +116,10 @@ class O extends S {
|
|
|
125
116
|
async _updateEditorProfile() {
|
|
126
117
|
this._preparingArcade = !0;
|
|
127
118
|
try {
|
|
128
|
-
await
|
|
119
|
+
await l.setProfileForModel(this._modelId, this.profile, {
|
|
129
120
|
locale: this.messages._t9nLocale,
|
|
130
121
|
snippets: this.snippets
|
|
131
|
-
}), this._editorProfile =
|
|
122
|
+
}), this._editorProfile = l.getEditorProfileForModel(this._modelId);
|
|
132
123
|
} catch {
|
|
133
124
|
this._editorProfile = void 0;
|
|
134
125
|
} finally {
|
|
@@ -136,7 +127,7 @@ class O extends S {
|
|
|
136
127
|
}
|
|
137
128
|
}
|
|
138
129
|
async _updateApiLibrary() {
|
|
139
|
-
this._apiLibrary = await
|
|
130
|
+
this._apiLibrary = await l.getApiLibraryForModel(this._modelId);
|
|
140
131
|
}
|
|
141
132
|
async _executeScript() {
|
|
142
133
|
const e = this.testData;
|
|
@@ -149,7 +140,7 @@ class O extends S {
|
|
|
149
140
|
}
|
|
150
141
|
this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => void (async () => {
|
|
151
142
|
const a = this._codeEditorElt.value?.value;
|
|
152
|
-
this._executionResult = await
|
|
143
|
+
this._executionResult = await x(t.definition, a, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
|
|
153
144
|
})(), 0);
|
|
154
145
|
}
|
|
155
146
|
_toggleShowExecutionPanel() {
|
|
@@ -181,7 +172,7 @@ class O extends S {
|
|
|
181
172
|
// An unique identifier for the action.
|
|
182
173
|
id: "run-script",
|
|
183
174
|
label: "Run Arcade Expression",
|
|
184
|
-
keybindings: [
|
|
175
|
+
keybindings: [w.F5],
|
|
185
176
|
contextMenuGroupId: "code",
|
|
186
177
|
contextMenuOrder: 1,
|
|
187
178
|
run: () => {
|
|
@@ -195,22 +186,22 @@ class O extends S {
|
|
|
195
186
|
t !== -1 && this._disposables.splice(t, 1), e.dispose();
|
|
196
187
|
}
|
|
197
188
|
async _updateArcadeAssistantRemoteState() {
|
|
198
|
-
this.arcadeAssistant && (this._arcadeAssistantRemoteState = await
|
|
189
|
+
this.arcadeAssistant && (this._arcadeAssistantRemoteState = await V({
|
|
199
190
|
...this.arcadeAssistant,
|
|
200
191
|
profile: this.profile
|
|
201
192
|
}));
|
|
202
193
|
}
|
|
203
194
|
renderMainActionBar() {
|
|
204
|
-
return this.testData ?
|
|
195
|
+
return this.testData ? s`<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 ? s`<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;
|
|
205
196
|
}
|
|
206
197
|
renderMainPanel() {
|
|
207
|
-
return
|
|
198
|
+
return s`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${l.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${T(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
208
199
|
}
|
|
209
|
-
renderAction({ id: e, label: t, icon: a, active: n, panelName:
|
|
210
|
-
return
|
|
200
|
+
renderAction({ id: e, label: t, icon: a, active: n, panelName: d, iconFlipRtl: h = !1, onClick: o = this._toggleSidePanel }) {
|
|
201
|
+
return s`<calcite-action id=${e ?? b} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${n} @click=${o} data-panel-name=${d ?? b} .iconFlipRtl=${h}></calcite-action>${!this.sideActionBarExpanded && s`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
|
|
211
202
|
}
|
|
212
203
|
renderSideActionBar() {
|
|
213
|
-
return this.hideSideBar ? null :
|
|
204
|
+
return this.hideSideBar ? null : s`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
214
205
|
id: "profile-variables-action",
|
|
215
206
|
label: this.messages.profilevariables ?? "",
|
|
216
207
|
icon: "profile-variables",
|
|
@@ -254,7 +245,7 @@ class O extends S {
|
|
|
254
245
|
if (this.hideSideBar)
|
|
255
246
|
return null;
|
|
256
247
|
const { openedSidePanel: e } = this;
|
|
257
|
-
return
|
|
248
|
+
return s`<arcgis-language-api-panel class=${c(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=${c(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 && s`<arcgis-arcade-suggestions class=${c(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 && s`<arcgis-arcade-coding-assistant class=${c(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) => (
|
|
258
249
|
/** 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 */
|
|
259
250
|
t?.useFlows ? t.renderer?.({
|
|
260
251
|
closePanel: this._toggleSidePanel,
|
|
@@ -262,7 +253,7 @@ class O extends S {
|
|
|
262
253
|
closed: e !== t.id,
|
|
263
254
|
/** pass this.el instead of "this" as it is what actually gets attached to the dom */
|
|
264
255
|
editorRef: this.el
|
|
265
|
-
}) :
|
|
256
|
+
}) : s`<calcite-flow class=${c(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?.({
|
|
266
257
|
closePanel: this._toggleSidePanel,
|
|
267
258
|
insertText: this._insertText.bind(this),
|
|
268
259
|
closed: e !== t.id,
|
|
@@ -272,13 +263,13 @@ class O extends S {
|
|
|
272
263
|
))}`;
|
|
273
264
|
}
|
|
274
265
|
renderResultsPanel() {
|
|
275
|
-
return this._showExecutionPanel ?
|
|
266
|
+
return this._showExecutionPanel ? s`<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;
|
|
276
267
|
}
|
|
277
268
|
render() {
|
|
278
|
-
return
|
|
269
|
+
return s`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`;
|
|
279
270
|
}
|
|
280
271
|
}
|
|
281
|
-
|
|
272
|
+
P("arcgis-arcade-editor", G);
|
|
282
273
|
export {
|
|
283
|
-
|
|
274
|
+
G as ArcgisArcadeEditor
|
|
284
275
|
};
|
|
@@ -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.91 */
|
|
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.91 */
|
|
12
12
|
function v(o) {
|
|
13
13
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
14
14
|
}
|
|
@@ -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.91 */
|
|
15
15
|
const x = m`@layer{/*!-----------------------------------------------------------
|
|
16
16
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
17
17
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -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.91 */
|
|
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.91 */
|
|
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() {
|
|
@@ -8,7 +8,7 @@ import { createRef as h, ref as g } from "lit-html/directives/ref.js";
|
|
|
8
8
|
import { s as f } from "../../chunks/editor.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.91 */
|
|
12
12
|
const _ = r`@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%}}`;
|
|
13
13
|
class u extends n {
|
|
14
14
|
constructor() {
|
|
@@ -6,7 +6,7 @@ import { a as m } from "../../chunks/sql-expr-defaults.js";
|
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.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.91 */
|
|
10
10
|
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
11
|
class f extends n {
|
|
12
12
|
constructor() {
|