@arcgis/coding-components 5.0.0-next.74 → 5.0.0-next.76
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/{LHZIBQNR.js → 25JJW5BT.js} +2 -2
- package/dist/cdn/{CDK64JKY.js → 27PULLKM.js} +2 -2
- package/dist/cdn/36VPDNSG.js +4 -0
- package/dist/cdn/{4PKXJNCH.js → 5LBWZ2NU.js} +2 -2
- package/dist/cdn/{6BIKHTZA.js → 6YHTSTQF.js} +1 -1
- package/dist/cdn/{OJTBIFG3.js → 76WBTUVY.js} +1 -1
- package/dist/cdn/77C54T2E.js +4 -0
- package/dist/cdn/7S5MGMHB.js +4 -0
- package/dist/cdn/{4T5UGMCN.js → A3CFWPUG.js} +1 -1
- package/dist/cdn/AIJ23UG5.js +4 -0
- package/dist/cdn/{VLNKP4PM.js → ATSKVXCU.js} +2 -2
- package/dist/cdn/{WWVXM2CA.js → AVNP7EZM.js} +1 -1
- package/dist/cdn/{LGIXRQ6Y.js → AWYDQU7O.js} +2 -2
- package/dist/cdn/{6PEJ4IEF.js → BEOTUOJI.js} +2 -2
- package/dist/cdn/{O2Y2VOFY.js → BMCPU7ZH.js} +1 -1
- package/dist/cdn/ENS24DUA.js +4 -0
- package/dist/cdn/{BPCXSUFH.js → ERFUWKCY.js} +2 -2
- package/dist/cdn/{TKMYHJSL.js → ETK53YIX.js} +2 -2
- package/dist/cdn/{KU4NOA4B.js → FV43FNKH.js} +2 -2
- package/dist/cdn/{ICTH4F6X.js → G4WH52CR.js} +2 -2
- package/dist/cdn/GRG6F6DA.js +13 -0
- package/dist/cdn/{OZV6YEBL.js → HWIO2KSU.js} +2 -2
- package/dist/cdn/{PUFC7EMC.js → IXXMBSPM.js} +2 -2
- package/dist/cdn/IY362XQH.js +4 -0
- package/dist/cdn/J44Q7D6P.js +4 -0
- package/dist/cdn/{BYVDNVDN.js → KE3CPWDE.js} +2 -2
- package/dist/cdn/{RADKGJJY.js → KEFVHOTO.js} +1 -1
- package/dist/cdn/{DBHBFPY6.js → KF44RRZQ.js} +2 -2
- package/dist/cdn/{LTCMTO6T.js → KY243XH7.js} +2 -2
- package/dist/cdn/{22EGWYBW.js → L47J66NY.js} +2 -2
- package/dist/cdn/{42GJKJIL.js → MOHV2V4S.js} +2 -2
- package/dist/cdn/{ZIA2WLMN.js → NXWETHNO.js} +2 -2
- package/dist/cdn/NYMMPEW3.js +4 -0
- package/dist/cdn/{U7BHYR7H.js → PCWS4VVG.js} +2 -2
- package/dist/cdn/{ZXAK3REF.js → Q5MSSYJC.js} +1 -1
- package/dist/cdn/{FMFM4XC5.js → QDQGGJ2T.js} +2 -2
- package/dist/cdn/R4SNNMO4.js +4 -0
- package/dist/cdn/R7SK5GPP.js +4 -0
- package/dist/cdn/{GZF2SZMK.js → SOROJJPY.js} +3 -3
- package/dist/cdn/{4E36FJM2.js → SUU4KCDI.js} +2 -2
- package/dist/cdn/{N72DIDJI.js → UEBKIHJ2.js} +2 -2
- package/dist/cdn/VMZO5MCZ.js +4 -0
- package/dist/cdn/{F5VB5PTX.js → W5HKMSOV.js} +2 -2
- package/dist/cdn/{FRITQHFC.js → W6KFCTJW.js} +1 -1
- package/dist/cdn/WCRBXQU2.js +4 -0
- package/dist/cdn/YQLCZ7IR.js +4 -0
- package/dist/cdn/YYLHG3VE.js +6 -0
- package/dist/cdn/{E73LWEKI.js → ZENKI77J.js} +2 -2
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +3009 -2984
- package/dist/cdn/assets/editor-variables/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/editor-variables/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +3 -3
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/arcade-contribution.js +19 -21
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +8 -7
- package/dist/chunks/arcade-service-accessors.js +30 -21
- package/dist/chunks/colorize.js +1 -1
- package/dist/chunks/editor.js +3 -3
- 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 +2 -1
- package/dist/chunks/monaco-theme.js +10 -0
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +8 -7
- 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 +2 -1
- package/dist/components/arcgis-arcade-results/customElement.js +88 -56
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +28 -23
- package/dist/components/arcgis-code-viewer/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 +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +4 -4
- package/dist/monacoStyles.js +1 -1
- package/dist/utils/arcade-executor.d.ts +13 -2
- package/dist/utils/css-vars.d.ts +7 -0
- package/dist/utils/monaco-importer.d.ts +1 -0
- package/dist/utils/monaco-typings.d.ts +1 -0
- package/dist/utils/profile/types.d.ts +1 -0
- package/dist/utils/setup-monaco.d.ts +1 -0
- package/package.json +5 -5
- package/dist/cdn/33DUWXM4.js +0 -4
- package/dist/cdn/4MXHAQUW.js +0 -4
- package/dist/cdn/5GY2ZPTQ.js +0 -4
- package/dist/cdn/7FLP36VI.js +0 -4
- package/dist/cdn/A6F4A4JY.js +0 -4
- package/dist/cdn/EAT7ELYY.js +0 -4
- package/dist/cdn/ENPVXJFW.js +0 -6
- package/dist/cdn/EUYWGYSO.js +0 -4
- package/dist/cdn/GCAINZP2.js +0 -4
- package/dist/cdn/KKSDD2XB.js +0 -4
- package/dist/cdn/OGAJT3TL.js +0 -4
- package/dist/cdn/QPBJBFQB.js +0 -4
- package/dist/cdn/URJ6F46P.js +0 -4
- package/dist/cdn/ZITRCEQM.js +0 -4
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { css as
|
|
3
|
-
import { nothing as
|
|
4
|
-
import { setValuesInString as o, quoteString as
|
|
5
|
-
import { B as x, v as b, M as m, f as
|
|
6
|
-
import { u as
|
|
7
|
-
import { s as
|
|
1
|
+
import { c as D } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as w, html as t, unsafeCSS as O } from "lit";
|
|
3
|
+
import { nothing as T, LitElement as A, createEvent as y, safeClassMap as h } from "@arcgis/lumina";
|
|
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 F, a as L, b as I } from "../../chunks/arcade-executor.js";
|
|
6
|
+
import { u as _ } from "../../chunks/useT9n.js";
|
|
7
|
+
import { s as j } from "../../chunks/fields.js";
|
|
8
8
|
import "@arcgis/toolkit/function";
|
|
9
9
|
import { createRef as g, ref as $ } from "lit/directives/ref.js";
|
|
10
|
+
import { t as k } from "../../chunks/monaco-theme.js";
|
|
11
|
+
import { observeAncestorsMutation as z, unsafeGetCalciteModeName as N } from "@arcgis/toolkit/dom";
|
|
10
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
13
|
-
const
|
|
14
|
+
v5.0.0-next.76 */
|
|
15
|
+
const E = w`: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 = {
|
|
14
16
|
lines: !0,
|
|
15
17
|
selectionMode: "none",
|
|
16
18
|
scale: "s",
|
|
17
|
-
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((
|
|
19
|
+
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((a) => a.selected = !1)
|
|
18
20
|
}, u = {
|
|
19
21
|
onClick: (e) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
+
const a = e.currentTarget;
|
|
23
|
+
a.expanded = !a.expanded;
|
|
22
24
|
}
|
|
23
|
-
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`, S = ({ value: e, subtree:
|
|
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) ?? T} .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) ?? T} .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 }) => {
|
|
24
26
|
switch (e.type) {
|
|
25
27
|
case "unknown":
|
|
26
28
|
case "null":
|
|
27
29
|
return t`<span class="constant-value">${e.type}</span>`;
|
|
28
30
|
case "text":
|
|
29
|
-
return t`<span class="string-value">${
|
|
31
|
+
return t`<span class="string-value">${v(e.value)}</span>`;
|
|
30
32
|
case "number":
|
|
31
33
|
return t`<span class="number-value">${e.value.toString()}</span>`;
|
|
32
34
|
case "boolean":
|
|
33
35
|
return t`<span class="constant-value">${e.value.toString()}</span>`;
|
|
34
36
|
case "date":
|
|
35
|
-
return t`<span class="date-value">${
|
|
37
|
+
return t`<span class="date-value">${I(e)}</span>`;
|
|
36
38
|
case "dateOnly":
|
|
37
|
-
return t`<span class="string-value">${
|
|
39
|
+
return t`<span class="string-value">${v(L(e))}</span>`;
|
|
38
40
|
case "time":
|
|
39
|
-
return t`<span class="string-value">${
|
|
41
|
+
return t`<span class="string-value">${v(F(e))}</span>`;
|
|
40
42
|
default:
|
|
41
43
|
return null;
|
|
42
44
|
}
|
|
43
|
-
},
|
|
45
|
+
}, R = ({ arcadeResult: e, t9nStrings: a }) => {
|
|
44
46
|
const s = e.value ?? [], i = Math.max(s.length - m, 0);
|
|
45
|
-
return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${i > 0 ? t`<span> ${o(
|
|
47
|
+
return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${i > 0 ? t`<span> ${o(a.showingfirstitemsformat, {
|
|
46
48
|
count: m.toString()
|
|
47
49
|
})}</span>` : null}`;
|
|
48
|
-
},
|
|
50
|
+
}, C = ({ value: e, subtree: a, t9nStrings: s }) => {
|
|
49
51
|
const i = e.geometry?.();
|
|
50
|
-
return t`<calcite-tree slot=${"children"} .lines=${
|
|
52
|
+
return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map((c) => {
|
|
51
53
|
const n = b(e.field(c));
|
|
52
54
|
return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null : f({ arcadeResult: n, name: c, t9nStrings: s });
|
|
53
55
|
})}${i ? f({ arcadeResult: { type: "geometry", value: i }, name: "geometry", t9nStrings: s }) : null}</calcite-tree>`;
|
|
54
|
-
},
|
|
56
|
+
}, V = ({ arcadeResult: e, t9nStrings: a }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= x ? t`<span> ${o(a.showingfirstitemsformat, {
|
|
55
57
|
count: x.toString()
|
|
56
|
-
})}</span>` : null}</div>`,
|
|
58
|
+
})}</span>` : null}</div>`, M = ({ items: e, subtree: a, t9nStrings: s }) => t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((i, c) => {
|
|
57
59
|
const n = b(i);
|
|
58
|
-
return f({ arcadeResult: n, name: c, expanded: !
|
|
59
|
-
})}</calcite-tree>`, f = ({ arcadeResult: e, name:
|
|
60
|
+
return f({ arcadeResult: n, name: c, expanded: !a, t9nStrings: s });
|
|
61
|
+
})}</calcite-tree>`, f = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: i }) => {
|
|
60
62
|
switch (e.type) {
|
|
61
63
|
case "null":
|
|
62
64
|
case "unknown":
|
|
@@ -66,25 +68,25 @@ const _ = M`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
66
68
|
case "dateOnly":
|
|
67
69
|
case "time":
|
|
68
70
|
case "boolean":
|
|
69
|
-
return t`<calcite-tree-item><div class="tree-item-label">${r({ name:
|
|
71
|
+
return t`<calcite-tree-item><div class="tree-item-label">${r({ name: a })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
|
|
70
72
|
case "array": {
|
|
71
73
|
const n = (e.value ?? []).slice(0, m);
|
|
72
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
74
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}${R({ arcadeResult: e, t9nStrings: i })}</div>${M({ items: n, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
73
75
|
}
|
|
74
76
|
case "geometry":
|
|
75
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
77
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${P({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
76
78
|
case "attachment":
|
|
77
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
79
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${S({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
78
80
|
case "feature":
|
|
79
81
|
case "dictionary":
|
|
80
82
|
case "portal":
|
|
81
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name:
|
|
83
|
+
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${C({ value: e.value, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
82
84
|
default:
|
|
83
85
|
return null;
|
|
84
86
|
}
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
return t`<table><thead><tr>${
|
|
87
|
+
}, J = ({ arcadeResult: e }) => {
|
|
88
|
+
const a = j(e.value.fields);
|
|
89
|
+
return t`<table><thead><tr>${a.map((s) => t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map((s) => t`<tr>${a.map((i) => {
|
|
88
90
|
try {
|
|
89
91
|
const c = b(s.field(i.name));
|
|
90
92
|
return t`<td>${p({ arcadeResult: c })}</td>`;
|
|
@@ -92,62 +94,92 @@ const _ = M`:host{display:flex;flex-direction:column;width:100%;background-color
|
|
|
92
94
|
return t`<td></td>`;
|
|
93
95
|
}
|
|
94
96
|
})}</tr>`)}</tbody></table>`;
|
|
95
|
-
}
|
|
97
|
+
};
|
|
98
|
+
function G() {
|
|
99
|
+
let e = `:host {
|
|
100
|
+
`;
|
|
101
|
+
const a = k["light-theme"];
|
|
102
|
+
Object.entries(a).forEach(([i, c]) => {
|
|
103
|
+
e += ` --arcgis-editor-${i}: ${c};
|
|
104
|
+
`;
|
|
105
|
+
}), e += `}
|
|
106
|
+
`, e += `:host([calcite-mode-dark]) {
|
|
107
|
+
`;
|
|
108
|
+
const s = k["dark-theme"];
|
|
109
|
+
return Object.entries(s).forEach(([i, c]) => {
|
|
110
|
+
e += `
|
|
111
|
+
--arcgis-editor-${i}: ${c};`;
|
|
112
|
+
}), e += `
|
|
113
|
+
}
|
|
114
|
+
`, w`
|
|
115
|
+
${O(e)}
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
const d = {
|
|
96
119
|
onClick: (e) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
120
|
+
const a = e.currentTarget;
|
|
121
|
+
a.expanded = !a.expanded;
|
|
99
122
|
}
|
|
100
123
|
};
|
|
101
|
-
class
|
|
124
|
+
class B extends A {
|
|
102
125
|
constructor() {
|
|
103
|
-
super(...arguments), this.messages =
|
|
126
|
+
super(...arguments), this.messages = _(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.calciteModeDark = !1, this.arcgisClose = y({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = y({ bubbles: !1 });
|
|
104
127
|
}
|
|
105
128
|
static {
|
|
106
|
-
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
|
|
129
|
+
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, calciteModeDark: 7 };
|
|
107
130
|
}
|
|
108
131
|
static {
|
|
109
|
-
this.styles =
|
|
132
|
+
this.styles = [E, G()];
|
|
133
|
+
}
|
|
134
|
+
load() {
|
|
135
|
+
this.manager.onLifecycle(() => {
|
|
136
|
+
const a = z(this.el, ["class"], this.updateTheme.bind(this));
|
|
137
|
+
return this.updateTheme(), () => a();
|
|
138
|
+
});
|
|
110
139
|
}
|
|
111
140
|
loaded() {
|
|
112
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());
|
|
113
142
|
}
|
|
114
|
-
updateResultPanel(
|
|
115
|
-
this.openedResultPanel =
|
|
143
|
+
updateResultPanel(a) {
|
|
144
|
+
this.openedResultPanel = a, this.arcgisOpenedResultPanelChange.emit(a);
|
|
116
145
|
}
|
|
117
|
-
_switchResultPanel(
|
|
118
|
-
const s =
|
|
146
|
+
_switchResultPanel(a) {
|
|
147
|
+
const s = a.currentTarget.dataset.panelName;
|
|
119
148
|
s && this.updateResultPanel(s);
|
|
120
149
|
}
|
|
121
150
|
_emitClose() {
|
|
122
151
|
this.arcgisClose.emit();
|
|
123
152
|
}
|
|
153
|
+
updateTheme() {
|
|
154
|
+
this.calciteModeDark = N(this.el) === "dark";
|
|
155
|
+
}
|
|
124
156
|
renderConsolePanel() {
|
|
125
|
-
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((
|
|
157
|
+
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((a) => t`<p>${a}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
|
|
126
158
|
}
|
|
127
159
|
renderLogPanel() {
|
|
128
160
|
if (this.openedResultPanel !== "log")
|
|
129
161
|
return null;
|
|
130
162
|
if (this.loading)
|
|
131
163
|
return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
|
|
132
|
-
const
|
|
164
|
+
const a = this.result?.type === "error" ? "color-error" : "color-success";
|
|
133
165
|
return t`<calcite-list label=results>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
|
|
134
166
|
timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
|
|
135
167
|
dateStyle: "medium",
|
|
136
168
|
timeStyle: "medium"
|
|
137
169
|
}).format(this.result.timeStamp)
|
|
138
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
170
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${h(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.compilationtimeformat, {
|
|
139
171
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
140
172
|
style: "unit",
|
|
141
173
|
unit: "millisecond",
|
|
142
174
|
maximumFractionDigits: 2
|
|
143
175
|
}).format(this.result.compilationTime ?? 0)
|
|
144
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
176
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${h(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.executiontimeformat, {
|
|
145
177
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
146
178
|
style: "unit",
|
|
147
179
|
unit: "millisecond",
|
|
148
180
|
maximumFractionDigits: 2
|
|
149
181
|
}).format(this.result.executionTime ?? 0)
|
|
150
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
182
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${h(a)}></calcite-icon></calcite-list-item>` : t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`;
|
|
151
183
|
}
|
|
152
184
|
renderOutputPanel() {
|
|
153
185
|
if (this.openedResultPanel !== "output")
|
|
@@ -169,18 +201,18 @@ class j extends F {
|
|
|
169
201
|
return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${p({ arcadeResult: this.result })}</div>`;
|
|
170
202
|
case "array": {
|
|
171
203
|
const s = (this.result.value ?? []).slice(0, m);
|
|
172
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
204
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${M({ items: s, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
173
205
|
}
|
|
174
206
|
case "geometry":
|
|
175
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
207
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${P({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
176
208
|
case "attachment":
|
|
177
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
209
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${S({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
178
210
|
case "feature":
|
|
179
211
|
case "dictionary":
|
|
180
212
|
case "portal":
|
|
181
|
-
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${
|
|
213
|
+
return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${C({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
182
214
|
case "featureSet":
|
|
183
|
-
return t`<div class="result-value-table ltr-container">${
|
|
215
|
+
return t`<div class="result-value-table ltr-container">${V({ arcadeResult: this.result, t9nStrings: this.messages })}${J({ arcadeResult: this.result })}</div>`;
|
|
184
216
|
case "knowledgeGraph":
|
|
185
217
|
return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;
|
|
186
218
|
default:
|
|
@@ -191,7 +223,7 @@ class j extends F {
|
|
|
191
223
|
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 ${$(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 ${$(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 ${$(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>`;
|
|
192
224
|
}
|
|
193
225
|
}
|
|
194
|
-
|
|
226
|
+
D("arcgis-arcade-results", B);
|
|
195
227
|
export {
|
|
196
|
-
|
|
228
|
+
B as ArcgisArcadeResults
|
|
197
229
|
};
|
|
@@ -9,7 +9,7 @@ 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.76 */
|
|
13
13
|
function v(o) {
|
|
14
14
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
15
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { i as
|
|
3
|
-
import { observeAncestorsMutation as h, unsafeGetCalciteModeName as
|
|
4
|
-
import { generateGuid as
|
|
5
|
-
import { Deferred as m } from "@arcgis/toolkit/promise";
|
|
1
|
+
import { g as d, c } from "../../chunks/runtime.js";
|
|
2
|
+
import { i as l } from "../../chunks/monaco-importer.js";
|
|
3
|
+
import { observeAncestorsMutation as h, unsafeGetCalciteModeName as u } from "@arcgis/toolkit/dom";
|
|
4
|
+
import { generateGuid as m } from "@arcgis/toolkit/string";
|
|
6
5
|
import { LitElement as p, createEvent as o, noShadowRoot as g } from "@arcgis/lumina";
|
|
7
6
|
import { s as _ } from "../../chunks/arcade-service-accessors.js";
|
|
8
7
|
import "../../chunks/arcade-contribution.js";
|
|
@@ -11,8 +10,8 @@ import { load as I } from "@arcgis/lumina/controllers";
|
|
|
11
10
|
import { Range as v, Uri as s, KeyMod as n, KeyCode as r } from "monaco-editor";
|
|
12
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
12
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
14
|
-
v5.0.0-next.
|
|
15
|
-
const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`,
|
|
13
|
+
v5.0.0-next.76 */
|
|
14
|
+
const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`, y = {
|
|
16
15
|
autoIndent: "advanced",
|
|
17
16
|
automaticLayout: !0,
|
|
18
17
|
bracketPairColorization: { enabled: !0 },
|
|
@@ -26,9 +25,9 @@ const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-d
|
|
|
26
25
|
tabSize: 2,
|
|
27
26
|
useShadowDOM: !0
|
|
28
27
|
};
|
|
29
|
-
class
|
|
28
|
+
class b extends p {
|
|
30
29
|
constructor() {
|
|
31
|
-
super(...arguments), this._componentReadyDefer =
|
|
30
|
+
super(...arguments), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._monacoEditor = I(l), this.modelId = m(), this.value = "", this.arcgisSelectionChange = o({ bubbles: !1 }), this.arcgisValueChange = o({ bubbles: !1 });
|
|
32
31
|
}
|
|
33
32
|
static {
|
|
34
33
|
this.properties = { editorInstance: 32, editorOptions: 0, language: 1, modelId: 0, value: 1 };
|
|
@@ -66,22 +65,26 @@ class y extends p {
|
|
|
66
65
|
await this._componentReadyDefer.promise, this.value = e ?? "";
|
|
67
66
|
}
|
|
68
67
|
load() {
|
|
69
|
-
_(
|
|
68
|
+
_(d("./assets")), this.manager.onLifecycle(() => {
|
|
70
69
|
this._monacoEditor.getModel(this.getUri())?.dispose();
|
|
71
70
|
const e = this._monacoEditor.createModel(this.value, this.language, this.getUri());
|
|
72
|
-
|
|
73
|
-
...
|
|
71
|
+
this._editorInstance = this._monacoEditor.create(this.el, {
|
|
72
|
+
...y,
|
|
74
73
|
...this.editorOptions ?? {},
|
|
75
74
|
model: e,
|
|
76
75
|
fixedOverflowWidgets: !0
|
|
77
76
|
}), this._disposables.push(this._editorInstance), this._componentReadyDefer.resolve(), this._editorInstance.onDidChangeModelContent(() => {
|
|
78
77
|
this.value = this._editorInstance?.getValue() ?? "", this.arcgisValueChange.emit(this.value);
|
|
79
|
-
}), this._editorInstance.onDidChangeCursorSelection((
|
|
80
|
-
this.arcgisSelectionChange.emit({ selection:
|
|
81
|
-
})
|
|
78
|
+
}), this._editorInstance.onDidChangeCursorSelection((a) => {
|
|
79
|
+
this.arcgisSelectionChange.emit({ selection: a.selection, model: this._editorInstance?.getModel() });
|
|
80
|
+
});
|
|
81
|
+
const t = h(this.el, ["class"], () => this.updateTheme());
|
|
82
|
+
this.updateTheme();
|
|
83
|
+
const i = new ResizeObserver(() => this._editorInstance?.layout());
|
|
84
|
+
return i.observe(this.el), this.addCommonEditorActions(), () => {
|
|
82
85
|
for (this._editorInstance?.getModel()?.dispose(); this._disposables.length; )
|
|
83
86
|
this._disposables.pop()?.dispose();
|
|
84
|
-
|
|
87
|
+
t?.(), i.disconnect();
|
|
85
88
|
};
|
|
86
89
|
});
|
|
87
90
|
}
|
|
@@ -107,12 +110,14 @@ class y extends p {
|
|
|
107
110
|
return this.modelId ? s.parse(this.modelId) : s.parse("");
|
|
108
111
|
}
|
|
109
112
|
updateTheme() {
|
|
110
|
-
const e =
|
|
113
|
+
const e = u(this.el) === "light" ? "vs" : "vs-dark";
|
|
111
114
|
e !== this._currentTheme && (this._currentTheme = e, this._monacoEditor.setTheme(e));
|
|
112
115
|
}
|
|
113
116
|
addCommonEditorActions() {
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
if (!this._editorInstance)
|
|
118
|
+
return;
|
|
119
|
+
const e = this._editorInstance.getAction("editor.action.fontZoomIn"), t = this._editorInstance.getAction("editor.action.fontZoomOut");
|
|
120
|
+
this._disposables.push(this._editorInstance.addAction({
|
|
116
121
|
// Use an existing action's ID to override it
|
|
117
122
|
id: "editor.action.fontZoomIn",
|
|
118
123
|
// A label of the action that will be presented to the user.
|
|
@@ -124,17 +129,17 @@ class y extends p {
|
|
|
124
129
|
// Method that will be executed when the action is triggered.
|
|
125
130
|
// @param editor The editor instance is passed in as a convenience
|
|
126
131
|
run: async () => await e?.run()
|
|
127
|
-
}), this._editorInstance
|
|
132
|
+
}), this._editorInstance.addAction({
|
|
128
133
|
id: "editor.action.fontZoomOut",
|
|
129
134
|
label: "Editor Font Zoom Out",
|
|
130
135
|
keybindings: [n.CtrlCmd | r.Minus],
|
|
131
136
|
contextMenuGroupId: "zooming",
|
|
132
137
|
contextMenuOrder: 2,
|
|
133
138
|
run: async () => await t?.run()
|
|
134
|
-
});
|
|
139
|
+
}));
|
|
135
140
|
}
|
|
136
141
|
}
|
|
137
|
-
|
|
142
|
+
c("arcgis-code-editor", b);
|
|
138
143
|
export {
|
|
139
|
-
|
|
144
|
+
b as ArcgisCodeEditor
|
|
140
145
|
};
|
|
@@ -11,7 +11,7 @@ import { debounce as y } from "@arcgis/toolkit/function";
|
|
|
11
11
|
import { Task as N } from "@lit/task";
|
|
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.
|
|
14
|
+
v5.0.0-next.76 */
|
|
15
15
|
const O = 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)}}`;
|
|
16
16
|
class w extends p {
|
|
17
17
|
constructor() {
|
|
@@ -7,7 +7,7 @@ import { createFilterExpression as f } from "@arcgis/toolkit/string";
|
|
|
7
7
|
import { u as m } from "../../chunks/useT9n.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
10
|
-
v5.0.0-next.
|
|
10
|
+
v5.0.0-next.76 */
|
|
11
11
|
const u = 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();
|
|
@@ -9,7 +9,7 @@ import { c as n } from "../../chunks/markdown.js";
|
|
|
9
9
|
import { u as f } 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.76 */
|
|
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)}}`;
|
|
14
14
|
class b extends h {
|
|
15
15
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { s as f } from "../../chunks/editor.js";
|
|
|
9
9
|
import { getSqlExprDiagnosticService as _ } from "../../chunks/sql-expr-mode.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.76 */
|
|
13
13
|
const u = n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
|
|
14
14
|
class m extends c {
|
|
15
15
|
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/5.0/esri/copyright.txt for details.
|
|
9
|
-
v5.0.0-next.
|
|
9
|
+
v5.0.0-next.76 */
|
|
10
10
|
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
11
|
class g extends n {
|
|
12
12
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "5.0.0-next.
|
|
4
|
+
"version": "5.0.0-next.76",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.76 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,11 +2,11 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as s } from "@arcgis/lumina";
|
|
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.
|
|
6
|
-
const
|
|
5
|
+
v5.0.0-next.76 */
|
|
6
|
+
const a = s(e, {
|
|
7
7
|
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
|
|
8
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
|
9
|
-
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
|
|
9
|
+
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],
|
|
10
10
|
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "closed,suggestions:"],
|
|
11
11
|
"arcgis-code-editor": [() => import("./components/arcgis-code-editor/customElement.js"), "editorInstance:,editorOptions:,language,modelId:,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],
|
|
12
12
|
"arcgis-code-viewer": [() => import("./components/arcgis-code-viewer/customElement.js"), "language,round"],
|
|
@@ -16,5 +16,5 @@ const o = s(e, {
|
|
|
16
16
|
"arcgis-sql-expression-fields": [() => import("./components/arcgis-sql-expression-fields/customElement.js"), "loading,modelId"]
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
a as defineCustomElements
|
|
20
20
|
};
|
package/dist/monacoStyles.js
CHANGED
|
@@ -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.76 */
|
|
4
4
|
const A = `/*!-----------------------------------------------------------
|
|
5
5
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
6
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
|
-
import { IEditorProfileDefinition } from './profile/types';
|
|
2
|
+
import { IEditorProfileDefinition, IFeatureLayerLikeInstance } from './profile/types';
|
|
3
|
+
import { VariableInstanceType } from '@arcgis/core/arcade';
|
|
4
|
+
import { SupportedLayer } from '@arcgis/core/arcade/featureset/support/shared';
|
|
5
|
+
type ViewProfileVariableInstance = {
|
|
6
|
+
scale?: number;
|
|
7
|
+
timeProperties?: {
|
|
8
|
+
currentEnd?: Date | nullish;
|
|
9
|
+
currentStart?: Date | nullish;
|
|
10
|
+
endIncluded?: nullish | boolean;
|
|
11
|
+
startIncluded?: nullish | boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
3
14
|
/**
|
|
4
15
|
* An object of key/value pairs where the key is the name of a profile variable.
|
|
5
16
|
* The key's value must be of type ArcGIS core ProfileVariableInstanceType.
|
|
6
17
|
*/
|
|
7
|
-
export type ProfileVariableInstances = Record<string,
|
|
18
|
+
export type ProfileVariableInstances = Record<string, IFeatureLayerLikeInstance | nullish | SupportedLayer | VariableInstanceType | ViewProfileVariableInstance>;
|
|
8
19
|
interface IContextReferences {
|
|
9
20
|
/**
|
|
10
21
|
* Spatial reference object used to define the spatial reference for the arcade runtime.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* monaco-theme.json is used to generate the monaco themes in [setupTheme]({@link ./setup-monaco-theme.ts})
|
|
4
|
+
* as well as define css variables used in [arcade-results]({@link ../components/arcade-results/arcade-results.tsx})
|
|
5
|
+
* Thus, we need to dynamically generate css variables from the json file.
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateCssVars(): CSSResult;
|
|
@@ -20,5 +20,6 @@ export { KeyCode, KeyMod, Range, Uri, Emitter, languages, MarkerSeverity } from
|
|
|
20
20
|
*/
|
|
21
21
|
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
22
22
|
export { IStandaloneThemeService } from 'monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js';
|
|
23
|
+
export { IHoverService } from 'monaco-editor/esm/vs/platform/hover/browser/hover.js';
|
|
23
24
|
export { generateTokensCSSForColorMap } from 'monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js';
|
|
24
25
|
export declare function importMonacoEditor(): Promise<typeof editor>;
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
declare module "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
3
3
|
declare module "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
4
4
|
declare module "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
5
|
+
declare module "monaco-editor/esm/vs/platform/hover/browser/hover.js";
|
|
@@ -121,6 +121,7 @@ export type ProfileVariableType = ApiVariableType;
|
|
|
121
121
|
export type ProfileVariableValueType = "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time";
|
|
122
122
|
/**
|
|
123
123
|
* The supported profile variable types.
|
|
124
|
+
* TODO: hopefully align with @arcgis/core's Variable type in the future.
|
|
124
125
|
*/
|
|
125
126
|
export type IProfileVariable = IProfileArray | IProfileDictionary | IProfileFeature | IProfileFeatureSet | IProfileFeatureSetCollection | IProfilePixel | IProfileValue | IProfileVoxel;
|
|
126
127
|
/**
|
|
@@ -24,6 +24,7 @@ export declare const isViteDevMode: boolean;
|
|
|
24
24
|
*/
|
|
25
25
|
declare function createWorker(url: string, localWorker?: () => Worker, isViteDev?: boolean): Promise<Worker>;
|
|
26
26
|
export declare function setupMonacoEnvironment(assetsPath: string): void;
|
|
27
|
+
export declare function ensureHoverServiceInitialized(): void;
|
|
27
28
|
export declare const exportsForTests: {
|
|
28
29
|
createWorker: typeof createWorker;
|
|
29
30
|
};
|