@arcgis/coding-components 5.0.0-next.140 → 5.0.0-next.141
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.js +1 -1
- package/dist/cdn/{ONS4ZING.js → 2KPWNHGP.js} +2 -2
- package/dist/cdn/2Q4RC3I2.js +4 -0
- package/dist/cdn/{ESQGKD4N.js → 2WFPKGNS.js} +2 -2
- package/dist/cdn/{AVDFLRTR.js → 2ZFE7VBS.js} +2 -2
- package/dist/cdn/{3FYTZKBP.js → 5BOQ5CDP.js} +1 -1
- package/dist/cdn/{C4EXEFHY.js → 5WHTC46G.js} +1 -1
- package/dist/cdn/{QEWPVXQ4.js → 62XTF2HV.js} +2 -2
- package/dist/cdn/{YYSVEFB6.js → AW57YOFI.js} +2 -2
- package/dist/cdn/BORLI5BL.js +13 -0
- package/dist/cdn/{G5T4EI7D.js → BSOIYFXU.js} +1 -1
- package/dist/cdn/{MO5R3BGP.js → BZCHBOQW.js} +2 -2
- package/dist/cdn/{ZZLSZBHB.js → CTONLFET.js} +2 -2
- package/dist/cdn/{K72FNTFN.js → DD7E4CTD.js} +2 -2
- package/dist/cdn/{YP3EICK5.js → DP5QMA47.js} +1 -1
- package/dist/cdn/DXKTKMXW.js +4 -0
- package/dist/cdn/FYTHJBIB.js +4 -0
- package/dist/cdn/{2ULX4YEB.js → G4IU5ZYX.js} +2 -2
- package/dist/cdn/{FVV4UAL5.js → GDON7RSD.js} +2 -2
- package/dist/cdn/{JTC4R6ZU.js → GE4G4GOF.js} +1 -1
- package/dist/cdn/{57JMNO5L.js → GRFHHJXW.js} +2 -2
- package/dist/cdn/{36M2T4ND.js → GWVYODXM.js} +2 -2
- package/dist/cdn/{62EN7QRE.js → HML5AZXI.js} +2 -2
- package/dist/cdn/{6HNTPPBF.js → J6YY3ZWZ.js} +1 -1
- package/dist/cdn/{7VAC6CMK.js → JZFVKLPE.js} +3 -3
- package/dist/cdn/LATZL6NN.js +4 -0
- package/dist/cdn/{DYMWCNFZ.js → LQHBSD4W.js} +2 -2
- package/dist/cdn/{6IKRQB72.js → N35JT2LB.js} +2 -2
- package/dist/cdn/{XTDTOBWV.js → NICG7HLY.js} +2 -2
- package/dist/cdn/{C7R3BXTS.js → NL6FLTKV.js} +2 -2
- package/dist/cdn/OO7CPYNX.js +4 -0
- package/dist/cdn/{P7JTV3RL.js → Q6SKY4Y3.js} +2 -2
- package/dist/cdn/{LJIVTQAR.js → RFWHUMFC.js} +2 -2
- package/dist/cdn/{VHZ4ET75.js → RGHWTK7O.js} +2 -2
- package/dist/cdn/{DHKHGAIN.js → RKGCVGAS.js} +1 -1
- package/dist/cdn/{2U5KSGDI.js → RVSQPK6O.js} +2 -2
- package/dist/cdn/{OFEE2U6F.js → SRMRL3U2.js} +2 -2
- package/dist/cdn/{DL4FPVPY.js → UCGGLYRZ.js} +2 -2
- package/dist/cdn/{7ZISFGDD.js → V54XUQYT.js} +2 -2
- package/dist/cdn/{IVLAW36F.js → VWEPFRQO.js} +2 -2
- package/dist/cdn/{2OHDWLLP.js → WUPM5AJR.js} +2 -2
- package/dist/cdn/{FNALAI66.js → WXTQR45B.js} +2 -2
- package/dist/cdn/{GZS2QNLW.js → WZNOW6ED.js} +2 -2
- package/dist/cdn/XEUUGRIV.js +4 -0
- package/dist/cdn/{ZU5A2KCX.js → XLJSTTSB.js} +2 -2
- package/dist/cdn/{QJG5IKIQ.js → Y3Q4THV3.js} +2 -2
- package/dist/cdn/{DWCX7EOA.js → ZGLMCIOB.js} +1 -1
- package/dist/cdn/{HAVQXZ3S.js → ZSD2KBQQ.js} +2 -2
- package/dist/cdn/{4SD3AP46.js → ZVQZ4OSA.js} +2 -2
- 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/colorize.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/monaco-theme.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco-theme.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +18 -17
- package/dist/components/arcgis-arcade-results/customElement.js +17 -17
- package/dist/components/arcgis-arcade-suggestions/customElement.js +8 -8
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-code-editor-shell/customElement.js +1 -1
- package/dist/components/arcgis-code-viewer/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +4 -4
- package/dist/components/arcgis-language-api-panel/customElement.js +13 -13
- package/dist/components/arcgis-sql-expression-editor/customElement.js +19 -19
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/5ARRYYLL.js +0 -13
- package/dist/cdn/5DATPYV6.js +0 -4
- package/dist/cdn/66W55DBK.js +0 -4
- package/dist/cdn/FCJTX2NB.js +0 -4
- package/dist/cdn/MCUF3HVR.js +0 -4
- package/dist/cdn/NJ3F2V6N.js +0 -4
- package/dist/cdn/P37FDVCH.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.141 */
|
|
4
4
|
const e = {
|
|
5
5
|
"light-theme": { comment: "#606060", constant: "#9809C8", date: "#296389", identifier: "#0000B3", keyword: "#BF4900", number: "#136D3D", string: "#A31515", operator: "#9809C8", predefined: "#0000B3" },
|
|
6
6
|
"dark-theme": { comment: "#BFBFBF", constant: "#CDBAEA", date: "#97A6CE", identifier: "#9FD4F3", keyword: "#EEAA5A", number: "#AAD04B", string: "#F2877B", operator: "#CDBAEA", predefined: "#9FD4F3" }
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
3
3
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.141 */
|
|
7
7
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/5.0.0-next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
8
8
|
t.t = s;
|
|
9
9
|
t.o = r;
|
|
@@ -14,7 +14,7 @@ import { g as l } from "./sql-expr-service-accessors.js";
|
|
|
14
14
|
import { t as h } from "./monaco-theme.js";
|
|
15
15
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
16
16
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
17
|
-
v5.0.0-next.
|
|
17
|
+
v5.0.0-next.141 */
|
|
18
18
|
const k = ["arcade", "arcgis-sql-expression"], i = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map();
|
|
19
19
|
function c(e) {
|
|
20
20
|
let r = g.get(e);
|
|
@@ -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/5.0/esri/copyright.txt for details.
|
|
7
|
-
v5.0.0-next.
|
|
7
|
+
v5.0.0-next.141 */
|
|
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 {
|
|
@@ -14,7 +14,7 @@ import { rethrowError as g } from "@arcgis/toolkit/log";
|
|
|
14
14
|
import { g as N } from "./sql-expr-service-accessors.js";
|
|
15
15
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
16
16
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
17
|
-
v5.0.0-next.
|
|
17
|
+
v5.0.0-next.141 */
|
|
18
18
|
let h = new m();
|
|
19
19
|
class C {
|
|
20
20
|
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/5.0/esri/copyright.txt for details.
|
|
5
|
-
v5.0.0-next.
|
|
5
|
+
v5.0.0-next.141 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
package/dist/chunks/utilities.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createFilterExpression as d } from "@arcgis/toolkit/string";
|
|
|
2
2
|
import { format as f } from "@arcgis/arcade-languageservice";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
-
v5.0.0-next.
|
|
5
|
+
v5.0.0-next.141 */
|
|
6
6
|
function b(e, r, s, u) {
|
|
7
7
|
if (!r)
|
|
8
8
|
return [];
|
|
@@ -20,7 +20,7 @@ import { getDeclaredVoxelMembers as ce, getDeclaredPixelMembers as ne } from "@a
|
|
|
20
20
|
import { s as le } from "../../chunks/fields.js";
|
|
21
21
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
22
22
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
23
|
-
v5.0.0-next.
|
|
23
|
+
v5.0.0-next.141 */
|
|
24
24
|
const de = Z`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);box-sizing:border-box;.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}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.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)}.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-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}.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}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.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-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=heading] 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}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`;
|
|
25
25
|
class v extends Error {
|
|
26
26
|
constructor({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as R, c as w } from "../../chunks/runtime.js";
|
|
2
|
-
import { css as y, html as i, nothing as
|
|
2
|
+
import { css as y, html as i, nothing as P } from "lit";
|
|
3
3
|
import { KeyCode as D } 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";
|
|
@@ -8,19 +8,19 @@ import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
|
8
8
|
import "monaco-editor/esm/vs/base/browser/dom.js";
|
|
9
9
|
import "monaco-editor/esm/vs/editor/browser/editorDom.js";
|
|
10
10
|
import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
|
|
11
|
-
import { LitElement as C, createEvent as
|
|
12
|
-
import { generateGuid as
|
|
13
|
-
import { Deferred as
|
|
11
|
+
import { LitElement as C, createEvent as b, safeClassMap as c } from "@arcgis/lumina";
|
|
12
|
+
import { generateGuid as I } from "@arcgis/toolkit/string";
|
|
13
|
+
import { Deferred as B } from "@arcgis/toolkit/promise";
|
|
14
14
|
import { D as M, e as v } from "../../chunks/arcade-executor.js";
|
|
15
|
-
import { s as k, g as
|
|
15
|
+
import { s as k, g as T } from "../../chunks/arcade-service-accessors.js";
|
|
16
16
|
import { b as d } from "../../chunks/arcade-defaults.js";
|
|
17
|
-
import { u as
|
|
17
|
+
import { u as L } from "../../chunks/useT9n.js";
|
|
18
18
|
import { createRef as F, ref as U } from "lit/directives/ref.js";
|
|
19
19
|
import N from "@arcgis/core/identity/IdentityManager.js";
|
|
20
20
|
import { log as O, rethrowError as o } from "@arcgis/toolkit/log";
|
|
21
21
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
22
22
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
23
|
-
v5.0.0-next.
|
|
23
|
+
v5.0.0-next.141 */
|
|
24
24
|
const j = y`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group 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)}}`, z = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (s, e) => O(s, "Arcade Assistant", e), H = (s) => {
|
|
25
25
|
const { aiAssistantsEnabled: e } = s;
|
|
26
26
|
return e === void 0 ? (a("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
|
|
@@ -32,9 +32,9 @@ async function X({
|
|
|
32
32
|
if (!V(e))
|
|
33
33
|
return a("warn", "Addon initialization failed. Reason: unsupported profile."), { shouldRender: !1 };
|
|
34
34
|
const t = s.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, ""), n = await G(s), r = `${t}/sharing/rest/portals/self?f=json&token=${n}`, h = `${t}/sharing/rest/portals/self/settings?f=json&token=${n}`, p = `${t}/sharing/rest/portals/self/signinSettings?f=json&token=${n}`, u = await Promise.allSettled([
|
|
35
|
-
fetch(r, { credentials: "include" }).then((
|
|
36
|
-
fetch(h, { credentials: "include" }).then((
|
|
37
|
-
fetch(p, { credentials: "include" }).then((
|
|
35
|
+
fetch(r, { credentials: "include" }).then((l) => l.json()),
|
|
36
|
+
fetch(h, { credentials: "include" }).then((l) => l.json()),
|
|
37
|
+
fetch(p, { credentials: "include" }).then((l) => l.json())
|
|
38
38
|
]), [g, f, _] = u, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), A = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), x = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), $ = m?.helperServices?.aiAssistantServices?.url;
|
|
39
39
|
if (!$)
|
|
40
40
|
return a("warn", "Service URL is not available in the portal self response."), { shouldRender: !1 };
|
|
@@ -55,12 +55,12 @@ async function X({
|
|
|
55
55
|
}
|
|
56
56
|
class q extends C {
|
|
57
57
|
constructor() {
|
|
58
|
-
super(...arguments), this._codeEditorElt = F(), this._componentReadyDefer = new
|
|
58
|
+
super(...arguments), this._codeEditorElt = F(), this._componentReadyDefer = new B(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = L(), this._modelId = I(), this._openArcadeHelp = () => void window.open(M, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
59
59
|
if (!e.target)
|
|
60
60
|
return;
|
|
61
61
|
const t = e.target?.dataset.panelName ?? "none";
|
|
62
62
|
this.openedSidePanel = t === this.openedSidePanel ? "none" : t, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(o(this));
|
|
63
|
-
}, 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 =
|
|
63
|
+
}, 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 = b({ bubbles: !1 }), this.arcgisScriptChange = b({ bubbles: !1 });
|
|
64
64
|
}
|
|
65
65
|
static {
|
|
66
66
|
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: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, arcadeAssistant: 0 };
|
|
@@ -101,7 +101,7 @@ class q extends C {
|
|
|
101
101
|
}
|
|
102
102
|
async loaded() {
|
|
103
103
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
104
|
-
const e = await
|
|
104
|
+
const e = await T();
|
|
105
105
|
this._disposables.push(e.onDiagnosticsChange((t) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(t.diagnostics))), this.testData && this._addExecuteScriptAction();
|
|
106
106
|
}
|
|
107
107
|
disconnectedCallback() {
|
|
@@ -163,7 +163,8 @@ class q extends C {
|
|
|
163
163
|
this._codeEditorElt.value?.insertText(e).catch(o(this));
|
|
164
164
|
}
|
|
165
165
|
_onResultPanelChange(e) {
|
|
166
|
-
|
|
166
|
+
const t = e.currentTarget;
|
|
167
|
+
this._resultPanel = t.openedResultPanel;
|
|
167
168
|
}
|
|
168
169
|
_onExecutionPanelClose() {
|
|
169
170
|
this._showExecutionPanel = !1;
|
|
@@ -199,7 +200,7 @@ class q extends C {
|
|
|
199
200
|
return i`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${d.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${U(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
200
201
|
}
|
|
201
202
|
renderAction({ id: e, label: t, icon: n, active: r, panelName: h, iconFlipRtl: p = !1, onClick: u = this._toggleSidePanel }) {
|
|
202
|
-
return i`<calcite-action id=${e ??
|
|
203
|
+
return i`<calcite-action id=${e ?? P} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${n} .active=${r} @click=${u} data-panel-name=${h ?? P} .iconFlipRtl=${p}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
|
|
203
204
|
}
|
|
204
205
|
renderSideActionBar() {
|
|
205
206
|
return this.hideSideBar ? null : i`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
@@ -246,7 +247,7 @@ class q extends C {
|
|
|
246
247
|
if (this.hideSideBar)
|
|
247
248
|
return null;
|
|
248
249
|
const { openedSidePanel: e } = this;
|
|
249
|
-
return i`<arcgis-language-api-panel slot=side-panel class=${
|
|
250
|
+
return i`<arcgis-language-api-panel slot=side-panel class=${c(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${c(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"}></arcgis-editor-variables>${this.suggestions?.length && i`<arcgis-arcade-suggestions slot=side-panel class=${c(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${this.arcadeAssistant && this._arcadeAssistantRemoteState.shouldRender && i`<arcgis-arcade-coding-assistant slot=side-panel class=${c(e === "arcade-assistant" ? "" : "hidden")} .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) => i`<calcite-flow slot=side-panel class=${c(e === t.id ? "" : "hidden")}>${t?.useFlows ? t.renderer?.({
|
|
250
251
|
closePanel: this._toggleSidePanel,
|
|
251
252
|
insertText: this._insertText.bind(this),
|
|
252
253
|
closed: e !== t.id,
|
|
@@ -261,7 +262,7 @@ class q extends C {
|
|
|
261
262
|
})}</calcite-flow-item>`}</calcite-flow>`)}`;
|
|
262
263
|
}
|
|
263
264
|
renderResultsPanel() {
|
|
264
|
-
return this._showExecutionPanel ? i`<arcgis-arcade-results slot=results-panel .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @
|
|
265
|
+
return this._showExecutionPanel ? i`<arcgis-arcade-results slot=results-panel .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange} @arcgisInternalClosePanel=${this._onExecutionPanelClose}></arcgis-arcade-results>` : null;
|
|
265
266
|
}
|
|
266
267
|
render() {
|
|
267
268
|
return i`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { css as
|
|
3
|
-
import { nothing as
|
|
1
|
+
import { c as I } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as T, html as t, unsafeCSS as D } from "lit";
|
|
3
|
+
import { nothing as w, LitElement as O, createEvent as y, safeClassMap as h } from "@arcgis/lumina";
|
|
4
4
|
import { setValuesInString as o, quoteString as v } from "@arcgis/toolkit/string";
|
|
5
|
-
import { B as x, v as b, M as m, f as
|
|
5
|
+
import { B as x, v as b, M as m, f as A, a as F, b as L } from "../../chunks/arcade-executor.js";
|
|
6
6
|
import { u as _ } from "../../chunks/useT9n.js";
|
|
7
7
|
import { s as j } from "../../chunks/fields.js";
|
|
8
8
|
import "@arcgis/toolkit/function";
|
|
@@ -11,8 +11,8 @@ import { t as k } from "../../chunks/monaco-theme.js";
|
|
|
11
11
|
import { observeAncestorsMutation as z, unsafeGetCalciteModeName as N } from "@arcgis/toolkit/dom";
|
|
12
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
14
|
-
v5.0.0-next.
|
|
15
|
-
const E =
|
|
14
|
+
v5.0.0-next.141 */
|
|
15
|
+
const E = T`: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 = {
|
|
16
16
|
lines: !0,
|
|
17
17
|
selectionMode: "none",
|
|
18
18
|
scale: "s",
|
|
@@ -22,7 +22,7 @@ const E = w`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
22
22
|
const a = e.currentTarget;
|
|
23
23
|
a.expanded = !a.expanded;
|
|
24
24
|
}
|
|
25
|
-
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`, S = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ??
|
|
25
|
+
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`, S = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? w} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(), void 0, 2)}</calcite-tree-item></calcite-tree>`, P = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? w} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${r({ name: "type" })}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${r({ name: "value" })}<span class="string-value">${JSON.stringify(e, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`, p = ({ arcadeResult: e }) => {
|
|
26
26
|
switch (e.type) {
|
|
27
27
|
case "unknown":
|
|
28
28
|
case "null":
|
|
@@ -34,11 +34,11 @@ const E = w`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
34
34
|
case "boolean":
|
|
35
35
|
return t`<span class="constant-value">${e.value.toString()}</span>`;
|
|
36
36
|
case "date":
|
|
37
|
-
return t`<span class="date-value">${
|
|
37
|
+
return t`<span class="date-value">${L(e)}</span>`;
|
|
38
38
|
case "dateOnly":
|
|
39
|
-
return t`<span class="string-value">${v(L(e))}</span>`;
|
|
40
|
-
case "time":
|
|
41
39
|
return t`<span class="string-value">${v(F(e))}</span>`;
|
|
40
|
+
case "time":
|
|
41
|
+
return t`<span class="string-value">${v(A(e))}</span>`;
|
|
42
42
|
default:
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
@@ -111,8 +111,8 @@ function G() {
|
|
|
111
111
|
--arcgis-editor-${i}: ${c};`;
|
|
112
112
|
}), e += `
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
115
|
-
${
|
|
114
|
+
`, T`
|
|
115
|
+
${D(e)}
|
|
116
116
|
`;
|
|
117
117
|
}
|
|
118
118
|
const d = {
|
|
@@ -121,9 +121,9 @@ const d = {
|
|
|
121
121
|
a.expanded = !a.expanded;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
class B extends
|
|
124
|
+
class B extends O {
|
|
125
125
|
constructor() {
|
|
126
|
-
super(...arguments), this.messages = _(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.calciteModeDark = !1, this.
|
|
126
|
+
super(...arguments), this.messages = _(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.calciteModeDark = !1, this.arcgisInternalClosePanel = y({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = y({ bubbles: !1, composed: !1 });
|
|
127
127
|
}
|
|
128
128
|
static {
|
|
129
129
|
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, calciteModeDark: 7 };
|
|
@@ -141,14 +141,14 @@ class B extends A {
|
|
|
141
141
|
this.openedResultPanel && (this.openedResultPanel === "output" && this.outputRef.value ? this.outputRef.value.setFocus() : this.openedResultPanel === "console" && this.consoleRef.value ? this.consoleRef.value.setFocus() : this.openedResultPanel === "log" && this.logRef.value && this.logRef.value.setFocus());
|
|
142
142
|
}
|
|
143
143
|
updateResultPanel(a) {
|
|
144
|
-
this.openedResultPanel = a, this.
|
|
144
|
+
this.openedResultPanel = a, this.arcgisInternalOpenedResultPanelChange.emit();
|
|
145
145
|
}
|
|
146
146
|
_switchResultPanel(a) {
|
|
147
147
|
const s = a.currentTarget.dataset.panelName;
|
|
148
148
|
s && this.updateResultPanel(s);
|
|
149
149
|
}
|
|
150
150
|
_emitClose() {
|
|
151
|
-
this.
|
|
151
|
+
this.arcgisInternalClosePanel.emit();
|
|
152
152
|
}
|
|
153
153
|
updateTheme() {
|
|
154
154
|
this.calciteModeDark = N(this.el) === "dark";
|
|
@@ -224,7 +224,7 @@ class B extends A {
|
|
|
224
224
|
return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${f(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${f(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${f(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
I("arcgis-arcade-results", B);
|
|
228
228
|
export {
|
|
229
229
|
B as ArcgisArcadeResults
|
|
230
230
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { c as n } from "../../chunks/runtime.js";
|
|
2
2
|
import { ref as l } from "lit/directives/ref.js";
|
|
3
|
-
import { css as d, html as s, nothing as
|
|
3
|
+
import { css as d, html as s, nothing as r } from "lit";
|
|
4
4
|
import { setFocusOnElement as g, focusElement as u } from "@arcgis/toolkit/dom";
|
|
5
|
-
import { LitElement as h, createEvent as
|
|
5
|
+
import { LitElement as h, createEvent as c } from "@arcgis/lumina";
|
|
6
6
|
import { g as a, o as m, a as f } from "../../chunks/colorize.js";
|
|
7
7
|
import { f as p } from "../../chunks/utilities.js";
|
|
8
8
|
import { c as b } from "../../chunks/markdown.js";
|
|
9
9
|
import { u as _ } from "../../chunks/useT9n.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.141 */
|
|
13
13
|
function v(o) {
|
|
14
14
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
15
|
}
|
|
@@ -18,7 +18,7 @@ class w extends h {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this._beforeBack = async () => {
|
|
20
20
|
this._selectedSuggestion = void 0;
|
|
21
|
-
}, this.messages = _(), this._colorizeStyle = "", this._filterValue = "", this.closed = !1, this.
|
|
21
|
+
}, this.messages = _(), this._colorizeStyle = "", this._filterValue = "", this.closed = !1, this.arcgisInternalClosePanel = c({ bubbles: !1, composed: !1 }), this.arcgisInternalItemSelected = c({ bubbles: !1, composed: !1 });
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
24
|
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedSuggestion: 16, suggestions: 0, closed: 5 };
|
|
@@ -52,13 +52,13 @@ class w extends h {
|
|
|
52
52
|
}
|
|
53
53
|
_emitItemSelected(e, t) {
|
|
54
54
|
const i = e;
|
|
55
|
-
(!i.key || i.key === "Enter") && (e.preventDefault(), this.
|
|
55
|
+
(!i.key || i.key === "Enter") && (e.preventDefault(), this.arcgisInternalItemSelected.emit(t.code));
|
|
56
56
|
}
|
|
57
57
|
_showSuggestionDetail(e, t) {
|
|
58
58
|
e.stopPropagation(), this._selectedSuggestion = t;
|
|
59
59
|
}
|
|
60
60
|
_emitClose() {
|
|
61
|
-
this.
|
|
61
|
+
this.arcgisInternalClosePanel.emit();
|
|
62
62
|
}
|
|
63
63
|
_colorizeCode(e) {
|
|
64
64
|
e !== void 0 && f(e, this._selectedSuggestion.code, "arcade");
|
|
@@ -67,11 +67,11 @@ class w extends h {
|
|
|
67
67
|
return this.suggestions === void 0 ? null : v(this.suggestions) ? this.suggestions.map((e) => s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`) : this.renderSuggestionListItems(this.suggestions);
|
|
68
68
|
}
|
|
69
69
|
renderSuggestionListItems(e) {
|
|
70
|
-
return e = p(e, "label", this._filterValue), e.length ? e.map((t) => s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${(i) => this._emitItemSelected(i, t)} @keydown=${(i) => this._emitItemSelected(i, t)} data-item=${t ??
|
|
70
|
+
return e = p(e, "label", this._filterValue), e.length ? e.map((t) => s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${(i) => this._emitItemSelected(i, t)} @keydown=${(i) => this._emitItemSelected(i, t)} data-item=${t ?? r}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} scale=s icon=chevron-right icon-flip-rtl @click=${(i) => this._showSuggestionDetail(i, t)} data-item=${t ?? r}></calcite-action></calcite-list-item>`) : s`<div class="notice-container">${this.messages.noitems}</div>`;
|
|
71
71
|
}
|
|
72
72
|
renderSuggestionFlowItem() {
|
|
73
73
|
const e = this._selectedSuggestion;
|
|
74
|
-
return e ? s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(t) => this._emitItemSelected(t, e)} data-item=${e ??
|
|
74
|
+
return e ? s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(t) => this._emitItemSelected(t, e)} data-item=${e ?? r} ${l(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${b(e.documentation) ?? ""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>` : null;
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
77
|
return this.closed ? null : s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
|
|
@@ -19,7 +19,7 @@ import { EditorMouseEventFactory as x, EditorMouseEvent as I } from "monaco-edit
|
|
|
19
19
|
import { MouseTargetFactory as T } from "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
|
|
20
20
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
21
21
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
22
|
-
v5.0.0-next.
|
|
22
|
+
v5.0.0-next.141 */
|
|
23
23
|
const L = v`/*!-----------------------------------------------------------
|
|
24
24
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
25
25
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -3,7 +3,7 @@ import { css as e, html as n } from "lit";
|
|
|
3
3
|
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.141 */
|
|
7
7
|
const i = e`:host{--arcgis-coding-components-internal-border: var( --arcgis-coding-components-border, 1px solid var(--calcite-color-border-3) );--arcgis-coding-components-internal-background-color: var( --arcgis-coding-components-background-color, var(--calcite-color-foreground-1) );--arcgis-coding-components-internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--arcgis-coding-components-internal-code-editor-side-panel-w: var( --arcgis-coding-components-code-editor-side-panel-w, 600px );--arcgis-coding-components-internal-code-editor-side-panel-max-w: var( --arcgis-coding-components-code-editor-side-panel-max-w, 45% );--arcgis-coding-components-internal-code-editor-results-panel-max-h: var( --arcgis-coding-components-code-editor-results-panel-max-h, 50% );--arcgis-coding-components-internal-code-editor-results-panel-h: var( --arcgis-coding-components-code-editor-results-panel-h, 50% );display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-internal-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-internal-background-color);height:100%;.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}}slot[name=top-action-bar]::slotted(*){border-bottom:var(--arcgis-coding-components-internal-border);flex:0 0 auto}slot[name=side-panel]::slotted(*){max-width:var(--arcgis-coding-components-internal-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-internal-code-editor-side-panel-w);border-inline-start:var(--arcgis-coding-components-internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:1 1 auto;overflow:hidden}slot[name=results-panel]::slotted(*){flex:0 0 var(--arcgis-coding-components-internal-code-editor-results-panel-h);overflow:hidden;border-top:var(--arcgis-coding-components-internal-border);box-sizing:border-box;max-height:var(--arcgis-coding-components-internal-code-editor-results-panel-max-h);margin-bottom:-1px}slot[name=side-action-bar]::slotted(*){max-width:var(--arcgis-coding-components-internal-side-action-bar-max-w);border-inline-start:var(--arcgis-coding-components-internal-border)}`;
|
|
8
8
|
class t extends r {
|
|
9
9
|
static {
|
|
@@ -12,7 +12,7 @@ import { Task as N } from "@lit/task";
|
|
|
12
12
|
import { rethrowError as O, log as w } from "@arcgis/toolkit/log";
|
|
13
13
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
14
14
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
15
|
-
v5.0.0-next.
|
|
15
|
+
v5.0.0-next.141 */
|
|
16
16
|
const z = E`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`;
|
|
17
17
|
class L extends p {
|
|
18
18
|
constructor() {
|
|
@@ -8,7 +8,7 @@ import { u as m } from "../../chunks/useT9n.js";
|
|
|
8
8
|
import { log as u } from "@arcgis/toolkit/log";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
11
|
-
v5.0.0-next.
|
|
11
|
+
v5.0.0-next.141 */
|
|
12
12
|
const g = 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}}`;
|
|
13
13
|
function p(l) {
|
|
14
14
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -17,7 +17,7 @@ class b extends d {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments), this._beforeBack = async () => {
|
|
19
19
|
this.removeLastPanelRenderer(), this._filterValue = "";
|
|
20
|
-
}, this.messages = m(), this._filterValue = "", this._flowItemRenderers = [], this._mode = "profile", this._mutationCounter = 1, this.loading = !1, this.closed = !1, this.
|
|
20
|
+
}, this.messages = m(), this._filterValue = "", this._flowItemRenderers = [], this._mode = "profile", this._mutationCounter = 1, this.loading = !1, this.closed = !1, this.arcgisInternalClosePanel = a({ bubbles: !1, composed: !1 }), this.arcgisInternalItemSelected = a({ bubbles: !1 });
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.properties = { _filterValue: 16, _flowItemRenderers: 16, _mode: 16, _mutationCounter: 16, loading: 5, modelId: 1, closed: 5, variable: 0 };
|
|
@@ -59,7 +59,7 @@ class b extends d {
|
|
|
59
59
|
this._filterValue = e.currentTarget.value;
|
|
60
60
|
}
|
|
61
61
|
_emitClose() {
|
|
62
|
-
this.
|
|
62
|
+
this.arcgisInternalClosePanel.emit();
|
|
63
63
|
}
|
|
64
64
|
_backToTop() {
|
|
65
65
|
this._flowItemRenderers = [];
|
|
@@ -68,7 +68,7 @@ class b extends d {
|
|
|
68
68
|
if (t.nonInteractive)
|
|
69
69
|
return;
|
|
70
70
|
const i = e;
|
|
71
|
-
(!i.key || i.key === "Enter") && (e.preventDefault(), this.
|
|
71
|
+
(!i.key || i.key === "Enter") && (e.preventDefault(), this.arcgisInternalItemSelected.emit(t.snippet));
|
|
72
72
|
}
|
|
73
73
|
_showCollectionPanel(e, t) {
|
|
74
74
|
e.stopPropagation(), this.addPanelRenderer(
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
2
2
|
import { ref as c } from "lit/directives/ref.js";
|
|
3
|
-
import { css as m, html as
|
|
3
|
+
import { css as m, html as l } from "lit";
|
|
4
4
|
import { setFocusOnElement as d, focusElement as u } from "@arcgis/toolkit/dom";
|
|
5
5
|
import { addLtrMark as a } from "@arcgis/toolkit/string";
|
|
6
6
|
import { LitElement as h, createEvent as o } from "@arcgis/lumina";
|
|
7
7
|
import { f } from "../../chunks/utilities.js";
|
|
8
|
-
import { c as
|
|
8
|
+
import { c as n } from "../../chunks/markdown.js";
|
|
9
9
|
import { u as p } from "../../chunks/useT9n.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.141 */
|
|
13
13
|
const g = m`: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}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`;
|
|
14
14
|
class b extends h {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments), this.messages = p(), this._unselectItem = async () => {
|
|
17
17
|
this._selectedApiItem = void 0;
|
|
18
|
-
}, this._filterValue = "", this.languageId = "arcade", this.hideDocumentationActions = !1, this.loading = !1, this.closed = !1, this.
|
|
18
|
+
}, this._filterValue = "", this.languageId = "arcade", this.hideDocumentationActions = !1, this.loading = !1, this.closed = !1, this.arcgisInternalClosePanel = o({ bubbles: !1, composed: !1 }), this.arcgisInternalItemSelected = o({ bubbles: !1, composed: !1 });
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
21
|
this.properties = { _filterValue: 16, _selectedApiItem: 16, languageId: 1, apiLibrary: 0, hideDocumentationActions: 5, loading: 5, closed: 5 };
|
|
@@ -52,14 +52,14 @@ class b extends h {
|
|
|
52
52
|
if (!i)
|
|
53
53
|
return;
|
|
54
54
|
const t = e;
|
|
55
|
-
(!t.key || t.key === "Enter") && (e.preventDefault(), this.
|
|
55
|
+
(!t.key || t.key === "Enter") && (e.preventDefault(), this.arcgisInternalItemSelected.emit(i.completion.insertText ?? ""));
|
|
56
56
|
}
|
|
57
57
|
_emitClose() {
|
|
58
|
-
this.
|
|
58
|
+
this.arcgisInternalClosePanel.emit();
|
|
59
59
|
}
|
|
60
60
|
_emitItemSelectedAndClose(e, i) {
|
|
61
61
|
const t = e;
|
|
62
|
-
(!t.key || t.key === "Enter") && (e.preventDefault(), this.
|
|
62
|
+
(!t.key || t.key === "Enter") && (e.preventDefault(), this.arcgisInternalItemSelected.emit(i.completion.insertText ?? ""));
|
|
63
63
|
}
|
|
64
64
|
_selectItem(e, i) {
|
|
65
65
|
e.stopPropagation(), this._selectedApiItem = i;
|
|
@@ -68,24 +68,24 @@ class b extends h {
|
|
|
68
68
|
this._filterValue = e.currentTarget.value ?? "";
|
|
69
69
|
}
|
|
70
70
|
_elementToMarkdown(e) {
|
|
71
|
-
e !== void 0 && (e.innerHTML =
|
|
71
|
+
e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples));
|
|
72
72
|
}
|
|
73
73
|
renderApiCategory(e) {
|
|
74
74
|
const i = f(e.items, "name", this._filterValue);
|
|
75
|
-
return i.length ?
|
|
75
|
+
return i.length ? l`<calcite-list-item-group .heading=${e.title}>${i.map((t) => l`<calcite-list-item .label=${a(t.completion.detail)} @calciteListItemSelect=${(s) => this._emitItemSelected(s, t)} @keydown=${(s) => this._emitItemSelected(s, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(s) => this._selectItem(s, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
|
|
76
76
|
}
|
|
77
77
|
renderApiItemFlowItem() {
|
|
78
78
|
const e = this._selectedApiItem;
|
|
79
|
-
return e ?
|
|
79
|
+
return e ? l`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : l`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${c(u)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? l`<div ${c(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
82
|
if (this.closed)
|
|
83
83
|
return null;
|
|
84
84
|
const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
|
|
85
|
-
return
|
|
85
|
+
return l`<calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading ? l`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : l`<calcite-list label="arcade api">${i ? l`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
r("arcgis-language-api-panel", b);
|
|
89
89
|
export {
|
|
90
90
|
b as ArcgisLanguageApiPanel
|
|
91
91
|
};
|