@arcgis/coding-components 5.2.0-next.76 → 5.2.0-next.77
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/cdn/46SGP3IQ.js +2 -0
- package/dist/cdn/TNE7K4P6.js +2 -0
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +165 -142
- package/dist/components/arcgis-arcade-results/customElement.js +9 -9
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/arcade-executor.d.ts +14 -1
- package/package.json +5 -5
- package/dist/cdn/ADELNDZO.js +0 -2
- package/dist/cdn/CVKAPGDA.js +0 -2
|
@@ -6,7 +6,7 @@ import { setValuesInString as i, uncapitalize as a } from "@arcgis/toolkit/strin
|
|
|
6
6
|
import { M as v } from "../../chunks/arcade-executor.js";
|
|
7
7
|
import { u as b } from "../../chunks/useT9n.js";
|
|
8
8
|
import { F as $, a as x, t as s, D as y, A as R, b as P } from "../../chunks/functional.js";
|
|
9
|
-
import { d as w, g as k, c as m, b as
|
|
9
|
+
import { d as w, g as k, c as m, b as T, G as S, a as C, S as h } from "../../chunks/debugger-value-styles.js";
|
|
10
10
|
import { createRef as r, ref as n } from "lit/directives/ref.js";
|
|
11
11
|
import { observeAncestorsMutation as M, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
|
|
12
12
|
const L = g`: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;min-height:0}.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}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{display:flex;flex-direction:column;min-height:0;.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1)}table{min-width:max-content;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)}}}}`, c = {
|
|
@@ -20,7 +20,7 @@ class F extends f {
|
|
|
20
20
|
super(...arguments), this.messages = b(), this.outputRef = r(), this.consoleRef = r(), this.logRef = r(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel = u({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = u({ bubbles: !1, composed: !1 });
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
|
-
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, hideHeader: 5 };
|
|
23
|
+
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, executionTiming: 0, hideHeader: 5 };
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
26
|
this.styles = [L, k(), w];
|
|
@@ -55,24 +55,24 @@ class F extends f {
|
|
|
55
55
|
return null;
|
|
56
56
|
if (this.loading)
|
|
57
57
|
return e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>`;
|
|
58
|
-
const t = this.result?.type === "error" ? "color-error" : "color-success";
|
|
59
|
-
return e`<calcite-list .label=${this.messages.results ?? "Results"}>${
|
|
58
|
+
const t = this.result?.type === "error" ? "color-error" : "color-success", l = this.executionTiming ?? this.result;
|
|
59
|
+
return e`<calcite-list .label=${this.messages.results ?? "Results"}>${l ? e`<calcite-list-item .label=${i(this.messages.lastexecutionformat, {
|
|
60
60
|
timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
|
|
61
61
|
dateStyle: "medium",
|
|
62
62
|
timeStyle: "medium"
|
|
63
|
-
}).format(
|
|
63
|
+
}).format(l.timeStamp)
|
|
64
64
|
})}><calcite-icon slot=content-start icon=information scale=s class=${o(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${i(this.messages.compilationtimeformat, {
|
|
65
65
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
66
66
|
style: "unit",
|
|
67
67
|
unit: "millisecond",
|
|
68
68
|
maximumFractionDigits: 2
|
|
69
|
-
}).format(
|
|
69
|
+
}).format(l.compilationTime ?? 0)
|
|
70
70
|
})}><calcite-icon slot=content-start icon=information scale=s class=${o(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${i(this.messages.executiontimeformat, {
|
|
71
71
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
72
72
|
style: "unit",
|
|
73
73
|
unit: "millisecond",
|
|
74
74
|
maximumFractionDigits: 2
|
|
75
|
-
}).format(
|
|
75
|
+
}).format(l.executionTime ?? 0)
|
|
76
76
|
})}><calcite-icon slot=content-start icon=information scale=s class=${o(t)}></calcite-icon></calcite-list-item>` : e`<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>`;
|
|
77
77
|
}
|
|
78
78
|
renderOutputPanel() {
|
|
@@ -100,9 +100,9 @@ class F extends f {
|
|
|
100
100
|
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${P({ items: l, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
101
101
|
}
|
|
102
102
|
case "geometry":
|
|
103
|
-
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${
|
|
103
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${S({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
104
104
|
case "attachment":
|
|
105
|
-
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${
|
|
105
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${T({ obj: this.result.value.castAsJson(), subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
106
106
|
case "feature":
|
|
107
107
|
case "dictionary":
|
|
108
108
|
case "portal":
|