@arcgis/map-components 5.2.0-next.75 → 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/3MDNGD5N.js +2 -0
- package/dist/cdn/4RYR4YDD.js +2 -0
- package/dist/cdn/{Y52XLS45.js → 4ULHWCEQ.js} +1 -1
- package/dist/cdn/{4IYAEXT6.js → 5AQ2DLHA.js} +1 -1
- package/dist/cdn/5GD232OU.js +2 -0
- package/dist/cdn/6C542P4V.js +2 -0
- package/dist/cdn/6XJLNNXF.js +2 -0
- package/dist/cdn/AQ2V4DTN.js +2 -0
- package/dist/cdn/AYJ4XEW3.js +2 -0
- package/dist/cdn/BZZONX7U.js +2 -0
- package/dist/cdn/C2JQUU2L.js +2 -0
- package/dist/cdn/CNDTQDTD.js +2 -0
- package/dist/cdn/CO4UDHQO.js +5 -0
- package/dist/cdn/DXRIB5HU.js +2 -0
- package/dist/cdn/{AXEUVRDP.js → GYD6SJRD.js} +1 -1
- package/dist/cdn/HSRSC5A3.js +2 -0
- package/dist/cdn/KKN5ZNLH.js +2 -0
- package/dist/cdn/LCWKOR7D.js +2 -0
- package/dist/cdn/LFEMVA6D.js +2 -0
- package/dist/cdn/LSBT72HH.js +2 -0
- package/dist/cdn/LWGNINKF.js +2 -0
- package/dist/cdn/{6T4SNDWL.js → N7YPGWHZ.js} +1 -1
- package/dist/cdn/NAW2XY64.js +2 -0
- package/dist/cdn/{RNUWRSX7.js → NESU6NXH.js} +1 -1
- package/dist/cdn/{YJYUG3DP.js → NR6IHW45.js} +1 -1
- package/dist/cdn/NVYQR4DS.js +2 -0
- package/dist/cdn/{VQG7S23K.js → QD2A52JY.js} +1 -1
- package/dist/cdn/QO6WDURE.js +2 -0
- package/dist/cdn/RIZHD5EC.js +2 -0
- package/dist/cdn/{VJIYYZW3.js → SJOTL7SU.js} +1 -1
- package/dist/cdn/UYF6TF6U.js +2 -0
- package/dist/cdn/WD25DNJL.js +2 -0
- package/dist/cdn/assets/utility-network-aggregated-geometry-result-item/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-results-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item.js +35 -24
- package/dist/chunks/titleUtils.js +40 -0
- package/dist/chunks/utils2.js +36 -71
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +18 -21
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-basemap-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +19 -14
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +26 -26
- package/dist/components/arcgis-catalog-layer-list-next/index.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-layer-list/customElement.js +1 -1
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +1 -1
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-layer-list-next/types.d.ts +4 -4
- package/dist/components/arcgis-legend/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-element/customElement.js +34 -33
- package/dist/components/arcgis-legend-card-univariate-above-and-below-ramp/customElement.js +11 -11
- package/dist/components/arcgis-legend-card-univariate-color-size-ramp/customElement.js +9 -9
- package/dist/components/arcgis-legend-card-view/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +15 -15
- package/dist/components/arcgis-legend-classic-element/customElement.js +39 -35
- package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +5 -4
- package/dist/components/arcgis-legend-classic-univariate-above-and-below-ramp/customElement.js +6 -6
- package/dist/components/arcgis-legend-classic-univariate-color-size-ramp/customElement.js +3 -3
- package/dist/components/arcgis-legend-classic-view/customElement.js +41 -18
- package/dist/components/arcgis-legend-relationship-ramp/customElement.js +8 -8
- package/dist/components/arcgis-legend-spike-ramp/customElement.js +13 -13
- package/dist/components/arcgis-scene/customElement.d.ts +1 -0
- package/dist/components/arcgis-table-list-next/customElement.d.ts +17 -13
- package/dist/components/arcgis-table-list-next/customElement.js +11 -11
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts +105 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.js +125 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/index.js +5 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +6 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +9 -9
- package/dist/components/arcgis-utility-network-trace-analysis-next/types.d.ts +5 -4
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +4 -25
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +86 -86
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -4
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.d.ts +19 -0
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +129 -86
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/loader.js +4 -4
- package/dist/types/lumina.d.ts +7 -6
- package/dist/types/preact.d.ts +8 -7
- package/dist/types/react.d.ts +9 -8
- package/dist/types/stencil.d.ts +7 -6
- package/dist/utils/layer-list-utils.d.ts +6 -6
- package/package.json +5 -5
- package/dist/cdn/2O6GHHUY.js +0 -2
- package/dist/cdn/7THMBHKF.js +0 -2
- package/dist/cdn/A6CH2UFJ.js +0 -2
- package/dist/cdn/AZSWPMSD.js +0 -2
- package/dist/cdn/CQV2TQUQ.js +0 -2
- package/dist/cdn/D6Z3MYCF.js +0 -2
- package/dist/cdn/D75QAAQT.js +0 -5
- package/dist/cdn/GG4ZP72A.js +0 -2
- package/dist/cdn/GOIKNGEI.js +0 -2
- package/dist/cdn/HZR3HENL.js +0 -2
- package/dist/cdn/IIYUVBKU.js +0 -2
- package/dist/cdn/KUR5PBEN.js +0 -2
- package/dist/cdn/LIEZSWE4.js +0 -2
- package/dist/cdn/MOOIQJP4.js +0 -2
- package/dist/cdn/NJ4CBOJN.js +0 -2
- package/dist/cdn/R5ZY52DF.js +0 -2
- package/dist/cdn/SWDOEOEG.js +0 -2
- package/dist/cdn/TKTHZ2GE.js +0 -2
- package/dist/cdn/TZTJY3L5.js +0 -2
- package/dist/cdn/X3TEGOBL.js +0 -2
- package/dist/cdn/XLAW24IV.js +0 -2
- package/dist/cdn/ZMLP2ZB4.js +0 -2
- package/dist/cdn/ZWAOPC3F.js +0 -2
- package/dist/cdn/assets/utility-network-aggregated-geometry-next/t9n/messages.en.json +0 -1
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.d.ts +0 -63
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/customElement.js +0 -109
- package/dist/components/arcgis-utility-network-aggregated-geometry-next/index.js +0 -2
- /package/dist/components/{arcgis-utility-network-aggregated-geometry-next → arcgis-utility-network-aggregated-geometry-result-item}/index.d.ts +0 -0
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
2
|
+
import { c as m } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as y, html as a } from "lit";
|
|
4
|
+
import { LitElement as p, safeClassMap as d } from "@arcgis/lumina";
|
|
5
5
|
import { classes as g } from "@arcgis/toolkit/dom";
|
|
6
|
-
import { H as
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { H as f } from "../../chunks/heading.js";
|
|
7
|
+
import { g as v } from "../../chunks/titleUtils.js";
|
|
8
|
+
const u = y`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}:host{display:block;padding:var(--arcgis-internal-padding)}.layers{display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-gap)}.layers>.layer{position:relative}.layers>.layer:not(:last-child):after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--arcgis-internal-legend-layer-gap) / -2);border-bottom:1px solid var(--calcite-color-border-2)}.layer>.esri-widget__heading{margin:var(--arcgis-internal-legend-heading-margin);font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-semibold)}.layer{word-wrap:break-word}.layer-elements{display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-element-gap);overflow:auto}.layer-children{display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-gap)}.layer-children>.layer{margin-inline-start:var(--arcgis-internal-legend-layer-padding);position:relative}.layer-children>.layer:not(:last-child):after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--arcgis-internal-legend-layer-gap) / -2);border-bottom:1px solid var(--calcite-color-border-2)}.layer-children.layer-children-compact>.layer.layer-child-inline-title{margin-inline-start:0}.layer-children.layer-children-compact>.layer:not(:last-child):after{content:none}.layer-children.layer-children-compact{gap:var(--calcite-space-2xs)}.layer-child{padding:0}.layer-child-title{font-weight:var(--calcite-font-weight-medium)}`;
|
|
9
|
+
function w(r) {
|
|
10
|
+
return "type" in r && !!r.type;
|
|
11
|
+
}
|
|
12
|
+
function h(r, e) {
|
|
13
|
+
const t = r.legendElements?.filter(Boolean);
|
|
14
|
+
if (!r.parent || !r.title || t?.length !== 1)
|
|
15
|
+
return;
|
|
16
|
+
const [i] = t;
|
|
17
|
+
if (i.type !== "symbol-table" || i.infos.length !== 1)
|
|
18
|
+
return;
|
|
19
|
+
const [l] = i.infos;
|
|
20
|
+
if (!l || w(l))
|
|
21
|
+
return;
|
|
22
|
+
const n = "preview" in l && !!l.preview || "src" in l && !!l.src, s = "label" in l ? v(e, l.label, !1) : "";
|
|
23
|
+
return n && !s ? r.title ?? void 0 : void 0;
|
|
24
|
+
}
|
|
25
|
+
class _ extends p {
|
|
9
26
|
constructor() {
|
|
10
27
|
super(...arguments), this.headingLevel = 3, this.type = "classic";
|
|
11
28
|
}
|
|
@@ -13,34 +30,40 @@ class y extends d {
|
|
|
13
30
|
this.properties = { activeLayerInfos: 0, headingLevel: 9, type: 32, messages: 0 };
|
|
14
31
|
}
|
|
15
32
|
static {
|
|
16
|
-
this.styles =
|
|
33
|
+
this.styles = u;
|
|
17
34
|
}
|
|
18
35
|
render() {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
36
|
+
const t = this.activeLayerInfos?.toArray().map((i) => this._renderLegendForLayer(i)).filter(Boolean);
|
|
37
|
+
return t?.length ? a`<section class="layers">${t}</section>` : a`<div class="no-legend">${this.messages.noLegend}</div>`;
|
|
21
38
|
}
|
|
22
39
|
_renderLegendForLayer(e) {
|
|
23
40
|
if (!e.ready)
|
|
24
41
|
return null;
|
|
25
|
-
const
|
|
42
|
+
const t = h(e, this.messages), i = e.title && !t ? f({
|
|
26
43
|
level: this.headingLevel,
|
|
44
|
+
class: e.parent ? "layer-child-title" : void 0,
|
|
27
45
|
children: e.title
|
|
28
46
|
}) : null;
|
|
29
47
|
if (e.children.length) {
|
|
30
|
-
const l = e.children.toArray().map((
|
|
31
|
-
|
|
48
|
+
const l = e.children.toArray(), n = l.length > 0 && l.every((o) => !!h(o, this.messages)), s = l.map((o) => this._renderLegendForLayer(o)), c = g("layer-children", {
|
|
49
|
+
"layer-children-compact": n
|
|
50
|
+
});
|
|
51
|
+
return a`<section class="layer">${i}<div class=${d(c)}>${s}</div></section>`;
|
|
32
52
|
}
|
|
33
|
-
return this._renderLegendElementsForLayer(e,
|
|
53
|
+
return this._renderLegendElementsForLayer(e, i, t);
|
|
34
54
|
}
|
|
35
|
-
_renderLegendElementsForLayer(e,
|
|
55
|
+
_renderLegendElementsForLayer(e, t, i) {
|
|
36
56
|
const l = e.legendElements?.filter(Boolean);
|
|
37
57
|
if (!l?.length)
|
|
38
58
|
return null;
|
|
39
|
-
const
|
|
40
|
-
|
|
59
|
+
const n = l.map((c) => a`<arcgis-legend-classic-element .cssEffectFilter=${e.cssEffectFilter ?? void 0} .inlineLayerTitle=${i} .layer=${e.layer} .legendElement=${c} .messages=${this.messages}></arcgis-legend-classic-element>`), s = {
|
|
60
|
+
"layer-child": !!e.parent,
|
|
61
|
+
"layer-child-inline-title": !!i
|
|
62
|
+
};
|
|
63
|
+
return a`<section class=${d(g("layer", s))}>${t}<div class="layer-elements">${n}</div></section>`;
|
|
41
64
|
}
|
|
42
65
|
}
|
|
43
|
-
|
|
66
|
+
m("arcgis-legend-classic-view", _);
|
|
44
67
|
export {
|
|
45
|
-
|
|
68
|
+
_ as LegendClassicView
|
|
46
69
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { c as F } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as P, html as b, svg as X } from "lit";
|
|
4
4
|
import { getBoundingBox as j, computeBBox as I, getTransformMatrix as A } from "@arcgis/core/applications/Components/svgUtils.js";
|
|
5
|
-
import { LitElement as U, safeStyleMap as h, safeClassMap as c, nothing as
|
|
5
|
+
import { LitElement as U, safeStyleMap as h, safeClassMap as c, nothing as l } from "@arcgis/lumina";
|
|
6
6
|
import { useDirection as N } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { classes as p } from "@arcgis/toolkit/dom";
|
|
8
8
|
import { g as T, a as G, b as J, c as K } from "../../chunks/svgUtils.js";
|
|
9
|
-
const O = P`.diamond-container{display:flex;font-size:var(--calcite-font-size-sm)}.diamond-left-column{align-self:center;padding-
|
|
9
|
+
const O = P`.diamond-container{display:flex;font-size:var(--calcite-font-size-sm)}.diamond-left-column{align-self:center;padding-inline-end:5px;max-width:85px;text-align:right}.diamond-right-column{align-self:center;padding-inline-start:5px;max-width:85px;text-align:left}.diamond-middle-column{display:flex;flex-direction:column;text-align:center}.diamond-middle-column-label{align-self:center;max-width:85px}.diamond-middle-column-ramp{width:85px;height:85px}.square-table{display:table;font-size:var(--calcite-font-size-sm)}.square-table-row{display:table-row}.square-table-cell{display:table-cell}.square-table-label{max-width:95px}.square-table-label-left-bottom{vertical-align:bottom;text-align:left}.square-table-label-right-bottom{vertical-align:bottom;text-align:right}.square-table-label-left-top{vertical-align:top;text-align:left}.square-table-label-right-top{vertical-align:top;text-align:right}`, Q = "http://www.w3.org/2000/svg";
|
|
10
10
|
class V extends U {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this._direction = N(), this.legendElement = null;
|
|
@@ -17,12 +17,12 @@ class V extends U {
|
|
|
17
17
|
static {
|
|
18
18
|
this.styles = O;
|
|
19
19
|
}
|
|
20
|
-
_getLineMarkers(n,
|
|
20
|
+
_getLineMarkers(n, r) {
|
|
21
21
|
const e = "arrowStart", s = "arrowEnd", i = n === "left", t = {
|
|
22
22
|
markerStart: null,
|
|
23
23
|
markerEnd: null
|
|
24
24
|
};
|
|
25
|
-
switch (
|
|
25
|
+
switch (r) {
|
|
26
26
|
case "HL":
|
|
27
27
|
i ? t.markerStart = `url(#${s})` : t.markerEnd = `url(#${e})`;
|
|
28
28
|
break;
|
|
@@ -39,11 +39,11 @@ class V extends U {
|
|
|
39
39
|
return t;
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
const n = this.legendElement, { focus:
|
|
42
|
+
const n = this.legendElement, { focus: r, labels: e } = n, s = !!r, i = this._renderRamp(n), t = { justifyContent: "center" }, a = this._direction === "rtl";
|
|
43
43
|
return s ? b`<div class="diamond-container" style=${h(t)}><div class="diamond-left-column">${a ? e.right : e.left}</div><div class="diamond-middle-column"><div class="diamond-middle-column-label">${e.top}</div>${i}<div class="diamond-middle-column-label">${e.bottom}</div></div><div class="diamond-right-column">${a ? e.left : e.right}</div></div>` : b`<div class="square-table"><div class="square-table-row"><div class=${c(p("square-table-cell", "square-table-label", "square-table-label-right-bottom"))}>${a ? e.top : e.left}</div><div class="square-table-cell"></div><div class=${c(p("square-table-cell", "square-table-label", "square-table-label-left-bottom"))}>${a ? e.left : e.top}</div></div><div class="square-table-row"><div class="square-table-cell"></div>${i}<div class="square-table-cell"></div></div><div class="square-table-row"><div class=${c(p("square-table-cell", "square-table-label", "square-table-label-right-top"))}>${a ? e.right : e.bottom}</div><div class="square-table-cell"></div><div class=${c(p("square-table-cell", "square-table-label", "square-table-label-left-top"))}>${a ? e.bottom : e.right}</div></div></div>`;
|
|
44
44
|
}
|
|
45
45
|
_renderRamp(n) {
|
|
46
|
-
const { focus:
|
|
46
|
+
const { focus: r, numClasses: e, colors: s, rotation: i } = n, t = this.opacity, a = this.messages.previewRelationshipRampAriaLabel, o = 60, m = !!r, d = Math.sqrt(o ** 2 + o ** 2) + (m ? 0 : 5), v = [], $ = [], k = [], u = o / e;
|
|
47
47
|
for (let f = 0; f < e; f++) {
|
|
48
48
|
const H = f * u;
|
|
49
49
|
for (let g = 0; g < e; g++) {
|
|
@@ -62,11 +62,11 @@ class V extends U {
|
|
|
62
62
|
const x = 15, q = 15, w = 10;
|
|
63
63
|
let y;
|
|
64
64
|
m || (y = "margin: -15px -15px -18px -15px");
|
|
65
|
-
const S = this._getLineMarkers("left",
|
|
65
|
+
const S = this._getLineMarkers("left", r), E = this._getLineMarkers("right", r), L = I(k), D = A(L, d, d, 0, !1, i, !1), B = A(L, d, d, 0, !1, m ? -45 : null, !1), C = {
|
|
66
66
|
filter: this.cssEffectFilter,
|
|
67
67
|
opacity: t == null ? "" : `${t}`
|
|
68
68
|
};
|
|
69
|
-
return b`<div class=${c(m ? "diamond-middle-column-ramp" : "square-table-cell")} style=${h(C)}><svg .ariaLabel=${a} height=${d ??
|
|
69
|
+
return b`<div class=${c(m ? "diamond-middle-column-ramp" : "square-table-cell")} style=${h(C)}><svg .ariaLabel=${a} height=${d ?? l} role=img style=${h(y)} width=${d ?? l} xmlns=${Q}>${X`<defs><marker .id=${"arrowStart"} markerHeight=10 markerUnits=strokeWidth markerWidth=10 orient=auto refX=5 refY=5><polyline fill=none points="0,0 5,5 0,10" stroke=#555555 stroke-width=1 /></marker><marker .id=${"arrowEnd"} markerHeight=10 markerUnits=strokeWidth markerWidth=10 orient=auto refX=0 refY=5><polyline fill=none points="5,0 0,5 5,10" stroke=#555555 stroke-width=1 /></marker>${v}</defs><g transform=${D ?? l}>${$}</g><g transform=${B ?? l}><line fill=none marker-end=${S.markerEnd ?? void 0 ?? l} marker-start=${S.markerStart ?? void 0 ?? l} stroke=#555555 stroke-width=1 x1=${-10} x2=${-10} y1=${o - x} y2=${x} /><line fill=none marker-end=${E.markerEnd ?? void 0 ?? l} marker-start=${E.markerStart ?? void 0 ?? l} stroke=#555555 stroke-width=1 x1=${q} x2=${o - q} y1=${o + w} y2=${o + w} /></g>`}</svg></div>`;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
F("arcgis-legend-relationship-ramp", V);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as W } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as X, html as
|
|
3
|
+
import { css as X, html as v } from "lit";
|
|
4
4
|
import { LitElement as Y, safeStyleMap as b } from "@arcgis/lumina";
|
|
5
5
|
import { s as A, g as z, p as k } from "../../chunks/utils2.js";
|
|
6
|
-
const C = X`.spike-ramp-container{display:flex;flex-direction:row;gap:var(--calcite-
|
|
6
|
+
const C = X`.spike-ramp-container{display:flex;flex-direction:row;gap:var(--calcite-space-sm-plus)}.spike-ramp-preview-container{display:flex;position:relative;gap:var(--calcite-space-sm-plus);border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding-inline-end:var(--calcite-space-xl)}.spike-ramp-preview{display:flex;gap:var(--calcite-space-sm-plus);align-items:end}.spike-ramp-symbol-preview{display:flex}.spike-ramp-lines{display:flex;position:absolute;bottom:0}.spike-ramp-labels-container{display:flex;position:relative;top:-5px;flex:1;min-width:120px}.spike-ramp-label{position:relative;padding:0 var(--calcite-space-sm);line-height:1em;word-break:break-all;font-size:var(--calcite-font-size-sm)}.spike-ramp-label:before{display:block;position:absolute;top:.25em;right:100%;border-width:3px 4px 3px 0;border-style:solid;border-color:transparent var(--calcite-color-text-1) transparent transparent;width:0;height:0;content:""}`, I = "#ddd", e = window.devicePixelRatio;
|
|
7
7
|
function u(m) {
|
|
8
|
-
return m.infos.filter((r,
|
|
8
|
+
return m.infos.filter((r, o) => o % 2 === 0);
|
|
9
9
|
}
|
|
10
10
|
function w(m) {
|
|
11
11
|
return !!(m && typeof m == "object");
|
|
@@ -21,35 +21,35 @@ class j extends Y {
|
|
|
21
21
|
this.styles = C;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return this.legendElement.infos.length !== 5 ? null :
|
|
24
|
+
return this.legendElement.infos.length !== 5 ? null : v`<div class="spike-ramp-container"><div class="spike-ramp-preview-container">${this._renderSpikeRampLines()}${this._renderSpikeRampPreview()}</div>${this._renderSpikeRampLabels()}</div>`;
|
|
25
25
|
}
|
|
26
26
|
_renderSpikeRampPreview() {
|
|
27
|
-
const r = this.legendElement, [
|
|
27
|
+
const r = this.legendElement, [o, l, d] = u(r).map(({ preview: p, label: a }) => {
|
|
28
28
|
if (!p)
|
|
29
29
|
return null;
|
|
30
30
|
const i = p.cloneNode(!0);
|
|
31
31
|
return i.classList.add("spike-ramp-symbol-preview"), A(i, z(this.messages, a)), i;
|
|
32
32
|
});
|
|
33
|
-
return !
|
|
33
|
+
return !o || !l || !d ? null : v`<div class="spike-ramp-preview"><div>${d}</div><div>${l}</div><div>${o}</div></div>`;
|
|
34
34
|
}
|
|
35
35
|
_renderSpikeRampLines() {
|
|
36
|
-
const r = this.legendElement, [{ width:
|
|
36
|
+
const r = this.legendElement, [{ width: o, height: l }, { width: d }, { width: p, height: a }] = u(r).map(({ size: g }) => w(g) ? { width: k(g.width), height: k(g.height) } : { width: 0, height: 0 }), i = 10, c = 8, n = o + d + p + i * 3, h = l, s = document.createElement("canvas");
|
|
37
37
|
s.width = (n + i) * e, s.height = h * e, s.style.width = `${s.width / e}px`, s.style.height = `${s.height / e}px`;
|
|
38
38
|
const t = s.getContext("2d");
|
|
39
39
|
t.beginPath();
|
|
40
|
-
const f = n - (
|
|
40
|
+
const f = n - (o / 2 + i), x = 0, y = n + c, $ = 0;
|
|
41
41
|
t.moveTo(f * e, x * e), t.lineTo(y * e, $ * e);
|
|
42
|
-
const R = (n - c) / 2, E = (
|
|
42
|
+
const R = (n - c) / 2, E = (l - a) / 2, S = n + c, L = (l - a) / 2;
|
|
43
43
|
t.moveTo(R * e, E * e), t.lineTo(S * e, L * e);
|
|
44
44
|
const P = p / 2, _ = h - a, H = n + c, T = h - a;
|
|
45
|
-
return t.moveTo(P * e, _ * e), t.lineTo(H * e, T * e), t.strokeStyle = I, t.lineWidth = 0.5 * e, t.stroke(),
|
|
45
|
+
return t.moveTo(P * e, _ * e), t.lineTo(H * e, T * e), t.strokeStyle = I, t.lineWidth = 0.5 * e, t.stroke(), v`<div class="spike-ramp-lines">${s}</div>`;
|
|
46
46
|
}
|
|
47
47
|
_renderSpikeRampLabels() {
|
|
48
|
-
const r = this.legendElement, [{ label:
|
|
48
|
+
const r = this.legendElement, [{ label: o, height: l }, { label: d }, { label: p, height: a }] = u(r).map(({ label: s, size: t }) => ({
|
|
49
49
|
label: s,
|
|
50
50
|
height: w(t) ? k(t.height) : 0
|
|
51
|
-
})), i =
|
|
52
|
-
return
|
|
51
|
+
})), i = l - a, c = { position: "absolute", top: "0" }, n = { position: "absolute", top: `${i / 2}px` }, h = { position: "absolute", top: `${i}px` };
|
|
52
|
+
return v`<div class="spike-ramp-labels-container"><div class="spike-ramp-label" style=${b(c)}>${o}</div><div class="spike-ramp-label" style=${b(n)}>${d}</div><div class="spike-ramp-label" style=${b(h)}>${p}</div></div>`;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
W("arcgis-legend-spike-ramp", j);
|
|
@@ -959,6 +959,7 @@ export abstract class ArcgisScene extends LitElement {
|
|
|
959
959
|
*
|
|
960
960
|
* @param hitTarget
|
|
961
961
|
* @param options
|
|
962
|
+
* @see [Sample - Hit test by screen rectangle in 3D](https://developers.arcgis.com/javascript/latest/sample-code/scene-hittest-screen-rectangle/)
|
|
962
963
|
*/
|
|
963
964
|
hitTest(hitTarget: MouseEvent | ScreenPoint | ScreenRect, options?: HitTestOptions3D): Promise<SceneViewHitTestResult>;
|
|
964
965
|
/**
|
|
@@ -4,19 +4,23 @@ import type Layer from "@arcgis/core/layers/Layer.js";
|
|
|
4
4
|
import type LinkChartView from "@arcgis/core/views/LinkChartView.js";
|
|
5
5
|
import type MapView from "@arcgis/core/views/MapView.js";
|
|
6
6
|
import type SceneView from "@arcgis/core/views/SceneView.js";
|
|
7
|
-
import type
|
|
8
|
-
import type
|
|
7
|
+
import type TableItemCollection from "@arcgis/core/layers/list/TableItemCollection.js";
|
|
8
|
+
import type TableItem from "@arcgis/core/layers/list/TableItem.js";
|
|
9
9
|
import type WebMap from "@arcgis/core/WebMap.js";
|
|
10
10
|
import type WebScene from "@arcgis/core/WebScene.js";
|
|
11
11
|
import type Sublayer from "@arcgis/core/layers/support/Sublayer.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type { TableItemCollectionEvents, TableItemModifier } from "@arcgis/core/layers/list/TableItemCollection.js";
|
|
13
13
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
14
14
|
import type { ArcgisReferenceElement, HeadingLevel, IconName } from "../types.js";
|
|
15
15
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
16
|
-
import type { ListItemModifier } from "@arcgis/core/widgets/TableList/types.js";
|
|
17
16
|
import type { List as List } from "@esri/calcite-components/components/calcite-list";
|
|
18
17
|
import type { ReadonlyCollection } from "@arcgis/core/core/Collection.js";
|
|
19
18
|
|
|
19
|
+
export type TableListOptions = Partial<Pick<ArcgisTableListNext, "collapsed" | "dragEnabled" | "filterPlaceholder" | "filterText" | "headingLevel" | "hideStatusIndicators" | "icon" | "label" | "minFilterItems" | "selectionMode" | "showErrors" | "showFilter" | "showTemporaryTableIndicators">>
|
|
20
|
+
& {
|
|
21
|
+
listItemCreatedFunction?: TableItemCollection["listItemCreatedFunction"];
|
|
22
|
+
};
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
* The Table List (next) component provides a way to display a list of tables associated with a map or table collection.
|
|
22
26
|
* It is the direct component migration of the TableList widget and is provided early for testing and feedback.
|
|
@@ -108,7 +112,7 @@ export abstract class ArcgisTableListNext extends LitElement {
|
|
|
108
112
|
/** @internal */
|
|
109
113
|
accessor listItemCanReceiveFunction: CanSortFunction | undefined;
|
|
110
114
|
/** Specifies a function that accesses each list item as it is created. */
|
|
111
|
-
accessor listItemCreatedFunction:
|
|
115
|
+
accessor listItemCreatedFunction: TableItemModifier | null | undefined;
|
|
112
116
|
/**
|
|
113
117
|
* Specifies whether to ignore the [listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property to display all layers. A common use case for `listModeDisabled` is when you want to use the component to manage and configure a layer's `listMode` value.
|
|
114
118
|
*
|
|
@@ -172,7 +176,7 @@ export abstract class ArcgisTableListNext extends LitElement {
|
|
|
172
176
|
*/
|
|
173
177
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
174
178
|
/** A collection of selected table list items. */
|
|
175
|
-
accessor selectedItems: Collection<
|
|
179
|
+
accessor selectedItems: Collection<TableItem>;
|
|
176
180
|
/**
|
|
177
181
|
* Specifies the selection mode.
|
|
178
182
|
*
|
|
@@ -216,9 +220,9 @@ export abstract class ArcgisTableListNext extends LitElement {
|
|
|
216
220
|
*/
|
|
217
221
|
accessor showTemporaryTableIndicators: boolean;
|
|
218
222
|
/** The current state of the component. */
|
|
219
|
-
get state():
|
|
223
|
+
get state(): TableItemCollection["state"];
|
|
220
224
|
/** The collection of table ListItems displayed within the component. */
|
|
221
|
-
get tableItems(): Collection<
|
|
225
|
+
get tableItems(): Collection<TableItem>;
|
|
222
226
|
/** A collection of tables to display in the component. */
|
|
223
227
|
accessor tables: ReadonlyCollection<Layer | Sublayer> | null | undefined;
|
|
224
228
|
/**
|
|
@@ -241,7 +245,7 @@ export abstract class ArcgisTableListNext extends LitElement {
|
|
|
241
245
|
/** Emits when table items state changes. */
|
|
242
246
|
readonly arcgisTableItemsChanged: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
243
247
|
/** Emitted when an action is triggered on the component. */
|
|
244
|
-
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this,
|
|
248
|
+
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, TableItemCollectionEvents["trigger-action"]>;
|
|
245
249
|
readonly "@eventTypes": {
|
|
246
250
|
arcgisClose: ArcgisTableListNext["arcgisClose"]["detail"];
|
|
247
251
|
arcgisFilterChange: ArcgisTableListNext["arcgisFilterChange"]["detail"];
|
|
@@ -257,10 +261,10 @@ export abstract class ArcgisTableListNext extends LitElement {
|
|
|
257
261
|
export type CanSortFunction = (event: CanSortEvent) => boolean;
|
|
258
262
|
|
|
259
263
|
/** @param item */
|
|
260
|
-
export type FilterPredicate = (item:
|
|
264
|
+
export type FilterPredicate = (item: TableItem) => boolean;
|
|
261
265
|
|
|
262
266
|
export interface CanSortEvent {
|
|
263
|
-
selected: null | undefined |
|
|
264
|
-
from: null | undefined |
|
|
265
|
-
to: null | undefined |
|
|
267
|
+
selected: null | undefined | TableItem;
|
|
268
|
+
from: null | undefined | TableItem;
|
|
269
|
+
to: null | undefined | TableItem;
|
|
266
270
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as C } from "../../chunks/runtime.js";
|
|
3
|
-
import { repeat as
|
|
3
|
+
import { repeat as $ } from "lit/directives/repeat.js";
|
|
4
4
|
import { keyed as _ } from "lit/directives/keyed.js";
|
|
5
|
-
import
|
|
5
|
+
import M from "@arcgis/core/core/Collection.js";
|
|
6
6
|
import { watch as I, on as v } from "@arcgis/core/core/reactiveUtils.js";
|
|
7
|
-
import L from "@arcgis/core/
|
|
8
|
-
import { LitElement as E, createEvent as c, safeClassMap as
|
|
7
|
+
import L from "@arcgis/core/layers/list/TableItemCollection.js";
|
|
8
|
+
import { LitElement as E, createEvent as c, safeClassMap as b, nothing as F } from "@arcgis/lumina";
|
|
9
9
|
import { usePropertyChange as T } from "@arcgis/lumina/controllers";
|
|
10
10
|
import { reEmitEvent as D } from "@arcgis/lumina/controllers/accessor";
|
|
11
11
|
import { classes as P } from "@arcgis/toolkit/dom";
|
|
@@ -20,7 +20,7 @@ import { A as G } from "../../chunks/layer-list-item.js";
|
|
|
20
20
|
import { s as O, a as q } from "../../chunks/layer-list-next.js";
|
|
21
21
|
import { c as H } from "../../chunks/css.js";
|
|
22
22
|
import { m as V } from "../../chunks/useViewModel.js";
|
|
23
|
-
const
|
|
23
|
+
const w = H, y = "nested", j = V(L);
|
|
24
24
|
class z extends E {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments), this._lastDragDetail = null, this._rootGroupUid = `table-${N()}`, this._rootListRef = U(), this._selectedDragItemLayerUid = null, this.messages = x(), this.viewModel = j(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: i }, s) => {
|
|
@@ -35,7 +35,7 @@ class z extends E {
|
|
|
35
35
|
this._selectedDragItemLayerUid = e;
|
|
36
36
|
}, this._onTriggerAction = (e, t) => {
|
|
37
37
|
this.triggerAction(e, t);
|
|
38
|
-
}, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.icon = "table", this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.map = this.viewModel.map, this.minDragEnabledItems = B, this.minFilterItems = R, this.selectedItems = new
|
|
38
|
+
}, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.icon = "table", this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.map = this.viewModel.map, this.minDragEnabledItems = B, this.minFilterItems = R, this.selectedItems = new M(), this.selectionMode = "none", this.tables = this.viewModel.tables, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryTableIndicators = !1, this.arcgisClose = c(), this.arcgisPropertyChange = T()("state"), this.arcgisReady = c(), this.arcgisFilterChange = c(), this.arcgisSelectedItemsChange = c(), this.arcgisTableItemsChanged = c(), this.arcgisTriggerAction = D(() => this.viewModel, "trigger-action");
|
|
39
39
|
}
|
|
40
40
|
static {
|
|
41
41
|
this.properties = { _visibleItems: 16, _openedPanelItems: 16, _dragEnabled: 16, _filterEnabled: 16, view: 0, autoDestroyDisabled: 5, closed: 5, referenceElement: 1, collapsed: 7, dragEnabled: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, icon: 1, label: 1, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listItemCreatedFunction: 0, listModeDisabled: 5, map: 0, minDragEnabledItems: 9, minFilterItems: 9, selectedItems: 0, selectionMode: 1, state: 32, tableItems: 32, tables: 0, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, hideNoFilterResultsNotice: 5, hideNoItemsNotice: 5, showFilter: 5, showHeading: 5, hideStatusIndicators: 5, showTemporaryTableIndicators: 5, messageOverrides: 0 };
|
|
@@ -147,16 +147,16 @@ class z extends E {
|
|
|
147
147
|
[u.hidden]: e === "loading",
|
|
148
148
|
[u.disabled]: e === "disabled"
|
|
149
149
|
};
|
|
150
|
-
return o`<div class=${
|
|
150
|
+
return o`<div class=${b(P(u.widget, u.panel, t))}>${this._renderItems()}</div>`;
|
|
151
151
|
}
|
|
152
152
|
_renderNoItemsMessage() {
|
|
153
153
|
return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
|
|
154
154
|
}
|
|
155
155
|
_renderNoItems() {
|
|
156
|
-
return this.hideNoItemsNotice ? null : o`<div class=${w
|
|
156
|
+
return this.hideNoItemsNotice ? null : o`<div class=${b(w.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`;
|
|
157
157
|
}
|
|
158
158
|
_renderPanelFlowItems() {
|
|
159
|
-
return
|
|
159
|
+
return $(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
|
|
160
160
|
const { panel: i, title: s } = e, l = () => this._handlePanelFlowItemBack(i);
|
|
161
161
|
return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(a) => {
|
|
162
162
|
a.preventDefault(), l();
|
|
@@ -167,13 +167,13 @@ class z extends E {
|
|
|
167
167
|
const { collapsed: e, _visibleItems: t, _filterEnabled: i, _rootGroupUid: s, showCloseButton: l, showCollapseButton: a, showHeading: h, _dragEnabled: d, selectionMode: n, filterText: m, filterPlaceholder: f, messages: g } = this, p = [
|
|
168
168
|
o`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${h ? this.label ?? g.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${() => this._handleFlowItemClose()}>${t?.length ? o`<calcite-list .canPull=${(r) => this._canMove(r, "pull")} .canPut=${(r) => this._canMove(r, "put")} data-layer-type=${s ?? F} .displayMode=${y} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${f} .filterProps=${S} .filterText=${i ? m : ""} .group=${s} .label=${this.label ?? g.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${(r) => this._handleCalciteListDragEnd(r.detail)} @calciteListFilter=${(r) => {
|
|
169
169
|
this.filterText = r.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
|
|
170
|
-
}} @calciteListOrderChange=${(r) => this._onCalciteListOrderChange(r.detail)} ${A(this._rootListRef)}>${t.toArray().map((r) => this._renderItem(r))}${i && !this.hideNoFilterResultsNotice ? o`<div class=${w
|
|
170
|
+
}} @calciteListOrderChange=${(r) => this._onCalciteListOrderChange(r.detail)} ${A(this._rootListRef)}>${t.toArray().map((r) => this._renderItem(r))}${i && !this.hideNoFilterResultsNotice ? o`<div class=${b(w.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>` : null}</calcite-list>` : this._renderNoItems()}</calcite-flow-item>`,
|
|
171
171
|
this._renderPanelFlowItems()
|
|
172
172
|
];
|
|
173
173
|
return this.closed ? null : _("root-flow", o`<calcite-flow>${p}</calcite-flow>`);
|
|
174
174
|
}
|
|
175
175
|
_renderItem(e) {
|
|
176
|
-
return _(e.uid, G({ canMove: this._canMove, css:
|
|
176
|
+
return _(e.uid, G({ canMove: this._canMove, css: w, displayMode: y, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, item: e, itemType: "table", listModeDisabled: this.viewModel.listModeDisabled, messages: this.messages, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.selectionMode, showErrors: this.showErrors, showFilter: this.showFilter, showTemporaryTableIndicators: this.showTemporaryTableIndicators, handleAction: (t, i) => this._onTriggerAction(t, i), handlePanelOpen: this._onPanelOpen, handleSelectedDragItemLayerUidChange: this._onSelectedDragItemLayerUidChange, view: this.view }));
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
C("arcgis-table-list-next", z);
|
package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Color from "@arcgis/core/Color.js";
|
|
3
|
+
import type Graphic from "@arcgis/core/Graphic.js";
|
|
4
|
+
import type GraphicsLayer from "@arcgis/core/layers/GraphicsLayer.js";
|
|
5
|
+
import type TraceResult from "@arcgis/core/rest/networks/support/TraceResult.js";
|
|
6
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
7
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
8
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* * Trace result item for displaying [aggregated geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceResult/#aggregatedGeometry) results from a trace.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
* @since 5.2
|
|
15
|
+
* @see [Result types](https://doc.esri.com/en/arcgis-pro/latest/help/data/utility-network/configure-a-trace.html#DA5)
|
|
16
|
+
*/
|
|
17
|
+
export abstract class ArcgisUtilityNetworkAggregatedGeometryResultItem extends LitElement {
|
|
18
|
+
/** @internal */
|
|
19
|
+
protected _messages: {
|
|
20
|
+
headings: { setColor: string; };
|
|
21
|
+
labels: {
|
|
22
|
+
aggregatedGeometryGraphicsColor: string;
|
|
23
|
+
showGraphicsToggle: string;
|
|
24
|
+
};
|
|
25
|
+
showGraphics: string;
|
|
26
|
+
} & T9nMeta<{
|
|
27
|
+
headings: { setColor: string; };
|
|
28
|
+
labels: {
|
|
29
|
+
aggregatedGeometryGraphicsColor: string;
|
|
30
|
+
showGraphicsToggle: string;
|
|
31
|
+
};
|
|
32
|
+
showGraphics: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* If true, the component will not be destroyed automatically when it is
|
|
36
|
+
* disconnected from the document. This is useful when you want to move the
|
|
37
|
+
* component to a different place on the page, or temporarily hide it. If this
|
|
38
|
+
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-aggregated-geometry-result-item/#destroy) method when you are done to
|
|
39
|
+
* prevent memory leaks.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
accessor autoDestroyDisabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The size of the aggregated geometry graphics to render, in points.
|
|
46
|
+
*
|
|
47
|
+
* @default 12
|
|
48
|
+
*/
|
|
49
|
+
accessor defaultSelectionSize: number;
|
|
50
|
+
/** The graphics which represent the aggregated geometry results from the trace. */
|
|
51
|
+
get geometryGraphics(): Graphic[];
|
|
52
|
+
/**
|
|
53
|
+
* The color used for the aggregated geometry graphics.
|
|
54
|
+
* Default value is #FFFF00.
|
|
55
|
+
*/
|
|
56
|
+
accessor graphicsColor: Color;
|
|
57
|
+
/**
|
|
58
|
+
* The layer used to render the graphics which represent the aggregated geometry result.
|
|
59
|
+
* If this property is not specified, a new layer will be created on the map.
|
|
60
|
+
*/
|
|
61
|
+
accessor graphicsLayer: GraphicsLayer | undefined;
|
|
62
|
+
/** The heading of the result item. */
|
|
63
|
+
accessor heading: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not the aggregated geometry graphics are hidden on the map.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
accessor hideGraphics: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The trace result containing the aggregated geometry result to render graphics for.
|
|
72
|
+
*
|
|
73
|
+
* @required
|
|
74
|
+
*/
|
|
75
|
+
accessor traceResult: TraceResult | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The view associated with the component.
|
|
78
|
+
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-utility-network-aggregated-geometry-result-item component will be associated with a map or scene component rather than using the `view` property.
|
|
79
|
+
*
|
|
80
|
+
* @required
|
|
81
|
+
*/
|
|
82
|
+
accessor view: MapView | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Removes the [layer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-aggregated-geometry-result-item/#graphicsLayer)
|
|
85
|
+
* containing the aggregated geometry graphics from the map.
|
|
86
|
+
*/
|
|
87
|
+
clearResult(): void;
|
|
88
|
+
/** Permanently destroy the component. */
|
|
89
|
+
destroy(): Promise<void>;
|
|
90
|
+
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "defaultSelectionSize" | "geometryGraphics" | "hideGraphics" | "graphicsColor"; }>;
|
|
91
|
+
/**
|
|
92
|
+
* Fires when the component finishes processing the aggrgegated geometry results.
|
|
93
|
+
*
|
|
94
|
+
* If the component has a valid trace result with aggregated geometry results, this fires
|
|
95
|
+
* when the aggregated geometry graphics have been added to the map.
|
|
96
|
+
*
|
|
97
|
+
* If the component does not have a valid map or trace result, this fires when the
|
|
98
|
+
* component has finished loading.
|
|
99
|
+
*/
|
|
100
|
+
readonly arcgisResultReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
101
|
+
readonly "@eventTypes": {
|
|
102
|
+
arcgisPropertyChange: ArcgisUtilityNetworkAggregatedGeometryResultItem["arcgisPropertyChange"]["detail"];
|
|
103
|
+
arcgisResultReady: ArcgisUtilityNetworkAggregatedGeometryResultItem["arcgisResultReady"]["detail"];
|
|
104
|
+
};
|
|
105
|
+
}
|
package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as p } from "../../chunks/runtime.js";
|
|
3
|
+
import l from "@arcgis/core/Color.js";
|
|
4
|
+
import m from "@arcgis/core/Graphic.js";
|
|
5
|
+
import d from "@arcgis/core/layers/GraphicsLayer.js";
|
|
6
|
+
import n from "@arcgis/core/symbols/SimpleFillSymbol.js";
|
|
7
|
+
import y from "@arcgis/core/symbols/SimpleLineSymbol.js";
|
|
8
|
+
import u from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
|
|
9
|
+
import { LitElement as f, createEvent as w, nothing as v } from "@arcgis/lumina";
|
|
10
|
+
import { usePropertyChange as G, bypassReadOnly as b } from "@arcgis/lumina/controllers";
|
|
11
|
+
import { log as s, composeMissingPropertyMessage as o } from "@arcgis/toolkit/log";
|
|
12
|
+
import { css as R, html as g } from "lit";
|
|
13
|
+
import { createRef as L, ref as C } from "lit/directives/ref.js";
|
|
14
|
+
import { u as S } from "../../chunks/useT9n.js";
|
|
15
|
+
import { a as h, i as $ } from "../../chunks/layer-utils.js";
|
|
16
|
+
const k = R`.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-space-md) var(--calcite-space-md)}.geometry-heading{margin:var(--calcite-space-md);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}`;
|
|
17
|
+
class z extends f {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments), this._messages = S({ blocking: !0 }), this.#t = "arcgis-utility-network-aggregated-geometry-result-item-graphics", this.#e = L(), this.defaultSelectionSize = 12, this.geometryGraphics = [], this.hideGraphics = !1, this.graphicsColor = new l([255, 255, 0, 0.6]), this.autoDestroyDisabled = !1, this.arcgisPropertyChange = G()("defaultSelectionSize", "geometryGraphics", "hideGraphics", "graphicsColor"), this.arcgisResultReady = w();
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.properties = { defaultSelectionSize: 9, heading: 1, traceResult: 0, geometryGraphics: 32, hideGraphics: 5, graphicsColor: 0, graphicsLayer: 0, view: 0, autoDestroyDisabled: 5 };
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.styles = k;
|
|
26
|
+
}
|
|
27
|
+
#t;
|
|
28
|
+
#e;
|
|
29
|
+
clearResult() {
|
|
30
|
+
this.view?.map && this.graphicsLayer && this.view.map.remove(this.graphicsLayer);
|
|
31
|
+
}
|
|
32
|
+
async destroy() {
|
|
33
|
+
this.clearResult(), await this.manager.destroy();
|
|
34
|
+
}
|
|
35
|
+
connectedCallback() {
|
|
36
|
+
super.connectedCallback(), this.view && this.graphicsLayer && (h(this.view, this.graphicsLayer), this.arcgisResultReady.emit());
|
|
37
|
+
}
|
|
38
|
+
load() {
|
|
39
|
+
if (!this.traceResult?.aggregatedGeometry || !this.view?.map) {
|
|
40
|
+
this.arcgisResultReady.emit();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.graphicsLayer || this.#a(this.view);
|
|
44
|
+
}
|
|
45
|
+
willUpdate(e) {
|
|
46
|
+
if (e.has("hideGraphics") && this.#s(), e.has("graphicsColor") && this.#h(), e.has("traceResult") && (this.graphicsLayer?.removeAll(), this.traceResult?.aggregatedGeometry && this.view && (this.#i(this.traceResult.aggregatedGeometry), this.arcgisResultReady.emit())), e.has("view")) {
|
|
47
|
+
const t = e.get("view");
|
|
48
|
+
t?.map && this.graphicsLayer && (t.map.remove(this.graphicsLayer), this.traceResult?.aggregatedGeometry && this.view && (h(this.view, this.graphicsLayer), this.#i(this.traceResult.aggregatedGeometry), this.arcgisResultReady.emit()));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
loaded() {
|
|
52
|
+
this.traceResult ? this.traceResult.aggregatedGeometry || s("error", this, o("The property `traceResult` was provided, but `traceResult.aggregatedGeometry` is null. Cannot draw aggregated geometry.")) : s("error", this, o("traceResult")), this.view ? this.view.map || s("error", this, o("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")) : s("error", this, o("view"));
|
|
53
|
+
}
|
|
54
|
+
#i(e) {
|
|
55
|
+
const { line: t, multipoint: i, polygon: r } = e;
|
|
56
|
+
b(() => {
|
|
57
|
+
this.geometryGraphics = [t, i, r].filter((a) => a != null).map((a) => this.#o(a));
|
|
58
|
+
}), this.graphicsLayer?.addMany(this.geometryGraphics);
|
|
59
|
+
}
|
|
60
|
+
#a(e) {
|
|
61
|
+
const t = this.#t, i = e.map?.findLayerById(t);
|
|
62
|
+
if (i && $(i)) {
|
|
63
|
+
this.graphicsLayer = i;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.graphicsLayer = new d({
|
|
67
|
+
id: t,
|
|
68
|
+
listMode: "hide",
|
|
69
|
+
title: t
|
|
70
|
+
}), h(e, this.graphicsLayer);
|
|
71
|
+
}
|
|
72
|
+
#s() {
|
|
73
|
+
this.hideGraphics ? (this.graphicsLayer?.removeAll(), this.#e.value?.open && (this.#e.value.open = !1)) : this.graphicsLayer?.addMany(this.geometryGraphics);
|
|
74
|
+
}
|
|
75
|
+
#o(e) {
|
|
76
|
+
return new m({
|
|
77
|
+
geometry: e,
|
|
78
|
+
symbol: this.#r(e)
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
#r(e) {
|
|
82
|
+
const { defaultSelectionSize: t, graphicsColor: i } = this;
|
|
83
|
+
switch (e.type) {
|
|
84
|
+
case "multipoint":
|
|
85
|
+
return new u({
|
|
86
|
+
color: i,
|
|
87
|
+
size: t,
|
|
88
|
+
outline: {
|
|
89
|
+
color: i,
|
|
90
|
+
width: 0
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
case "polygon":
|
|
94
|
+
return new n({
|
|
95
|
+
color: i,
|
|
96
|
+
outline: {
|
|
97
|
+
color: i,
|
|
98
|
+
width: t
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
case "polyline":
|
|
102
|
+
return new y({
|
|
103
|
+
color: i,
|
|
104
|
+
width: t
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
#h() {
|
|
109
|
+
this.graphicsLayer?.graphics.forEach((e) => {
|
|
110
|
+
const t = e.geometry;
|
|
111
|
+
e.symbol = this.#r(t);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
const { graphicsColor: e, heading: t, hideGraphics: i, _messages: r } = this;
|
|
116
|
+
return g`${t && g`<div class="geometry-heading">${t}</div>` || ""}<div class="aggregated-geometry-container"><calcite-switch .checked=${!i} .label=${r.labels.showGraphicsToggle} label-text-end=${r.showGraphics ?? v} @calciteSwitchChange=${() => this.hideGraphics = !this.hideGraphics}></calcite-switch><calcite-swatch .color=${e.toCss()} .disabled=${i} id=geometry-color-swatch .label=${r.labels.aggregatedGeometryGraphicsColor}></calcite-swatch><calcite-popover closable .heading=${r.headings.setColor} .label=${r.headings.setColor} reference-element=geometry-color-swatch ${C(this.#e)}><calcite-color-picker alpha-channel channels-disabled clearable .disabled=${i} hex-disabled saved-disabled .value=${e.toCss()} @calciteColorPickerChange=${(a) => {
|
|
117
|
+
const c = a.target.value;
|
|
118
|
+
c && (this.graphicsColor = new l(c));
|
|
119
|
+
}}></calcite-color-picker></calcite-popover></div>`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
p("arcgis-utility-network-aggregated-geometry-result-item", z);
|
|
123
|
+
export {
|
|
124
|
+
z as ArcgisUtilityNetworkAggregatedGeometryResultItem
|
|
125
|
+
};
|