@arcgis/map-components 5.1.0-next.12 → 5.1.0-next.13
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/24A3PRKY.js +2 -0
- package/dist/cdn/{VU3SJK5Z.js → 2KDBYYCF.js} +1 -1
- package/dist/cdn/{63P5VYGP.js → 4QKKEYOT.js} +1 -1
- package/dist/cdn/{6CGPJGIB.js → 57NR3THC.js} +1 -1
- package/dist/cdn/{HB3W3CO5.js → 5TQ4ESJT.js} +1 -1
- package/dist/cdn/{KY2UAUNI.js → 7MD3GFV6.js} +1 -1
- package/dist/cdn/BQRJK2MF.js +2 -0
- package/dist/cdn/DDFVZ5WZ.js +2 -0
- package/dist/cdn/{2MTWUJIA.js → DEJGWX76.js} +1 -1
- package/dist/cdn/{NRBM3YR6.js → P6UY3ICC.js} +1 -1
- package/dist/cdn/{KHM3S4Q6.js → RP2MWWN5.js} +1 -1
- package/dist/cdn/RWQYK5BX.js +2 -0
- package/dist/cdn/SXS6AFSU.js +2 -0
- package/dist/cdn/{VNOZYJLP.js → SYMDMOKL.js} +1 -1
- package/dist/cdn/{FB6YQKF2.js → U37ZXVJO.js} +1 -1
- package/dist/cdn/XFDR4YDM.js +2 -0
- package/dist/cdn/XOPJ7VX2.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +3 -3
- package/dist/components/arcgis-basemap-gallery/customElement.d.ts +1 -1
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +5 -7
- package/dist/components/arcgis-basemap-toggle/customElement.d.ts +3 -3
- package/dist/components/arcgis-bookmarks/customElement.d.ts +2 -2
- package/dist/components/arcgis-bookmarks/types.d.ts +1 -1
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +4 -6
- package/dist/components/arcgis-clipboard/customElement.d.ts +2 -2
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +3 -3
- package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
- package/dist/components/arcgis-directions/customElement.d.ts +4 -5
- package/dist/components/arcgis-directions/customElement.js +5 -5
- package/dist/components/arcgis-editor/customElement.d.ts +2 -3
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +1 -1
- package/dist/components/arcgis-feature/customElement.js +6 -6
- package/dist/components/arcgis-feature-form/customElement.d.ts +1 -2
- package/dist/components/arcgis-feature-image/customElement.d.ts +5 -5
- package/dist/components/arcgis-feature-table/customElement.d.ts +72 -24
- package/dist/components/arcgis-feature-table/customElement.js +28 -13
- package/dist/components/arcgis-feature-templates/customElement.d.ts +4 -6
- package/dist/components/arcgis-feature-title/customElement.d.ts +3 -3
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +60 -60
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +55 -55
- package/dist/components/arcgis-features/customElement.js +25 -31
- package/dist/components/arcgis-floor-filter/customElement.d.ts +2 -2
- package/dist/components/arcgis-histogram-range-slider/customElement.d.ts +1 -1
- package/dist/components/arcgis-home/customElement.d.ts +2 -2
- package/dist/components/arcgis-layer-list/customElement.d.ts +9 -11
- package/dist/components/arcgis-legend/customElement.d.ts +3 -3
- package/dist/components/arcgis-legend-classic-element/customElement.js +22 -24
- package/dist/components/arcgis-link-chart/customElement.d.ts +15 -17
- package/dist/components/arcgis-link-chart/customElement.js +10 -15
- package/dist/components/arcgis-link-chart-nonspatial-visibility-toggle/customElement.d.ts +1 -1
- package/dist/components/arcgis-map/customElement.d.ts +16 -18
- package/dist/components/arcgis-map/customElement.js +1 -6
- package/dist/components/arcgis-multi-feature-form/customElement.d.ts +7 -9
- package/dist/components/arcgis-navigation-toggle/customElement.d.ts +1 -1
- package/dist/components/arcgis-paste/ClipboardMove.d.ts +3 -3
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +9 -9
- package/dist/components/arcgis-paste/commands/PasteCommand.d.ts +3 -3
- package/dist/components/arcgis-paste/commands/PasteCustomCommand.d.ts +2 -2
- package/dist/components/arcgis-paste/customElement.d.ts +4 -4
- package/dist/components/arcgis-popup/customElement.js +4 -4
- package/dist/components/arcgis-print/customElement.d.ts +16 -7
- package/dist/components/arcgis-print/customElement.js +7 -7
- package/dist/components/arcgis-print-layout-advanced-options/customElement.js +12 -12
- package/dist/components/arcgis-print-layout-panel/customElement.js +6 -6
- package/dist/components/arcgis-print-main-panel/customElement.js +7 -7
- package/dist/components/arcgis-scene/customElement.d.ts +21 -23
- package/dist/components/arcgis-scene/customElement.js +8 -13
- package/dist/components/arcgis-search/customElement.d.ts +10 -12
- package/dist/components/arcgis-search/customElement.js +8 -9
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +1 -1
- 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/loader.js +7 -7
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/CWJ5OA5A.js +0 -2
- package/dist/cdn/IDDSHZVB.js +0 -2
- package/dist/cdn/JRPIJ24K.js +0 -2
- package/dist/cdn/LHEP4QSS.js +0 -2
- package/dist/cdn/S6G6XXTM.js +0 -2
- package/dist/cdn/TM5C2P2F.js +0 -2
- package/dist/cdn/Z4F6DHBB.js +0 -2
|
@@ -2,120 +2,120 @@
|
|
|
2
2
|
import { c as m } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as f, html as n } from "lit";
|
|
4
4
|
import { keyed as d } from "lit/directives/keyed.js";
|
|
5
|
-
import { ArcgisUtilityNetworkAssociationList as
|
|
5
|
+
import { ArcgisUtilityNetworkAssociationList as g } from "../arcgis-utility-network-association-list/customElement.js";
|
|
6
6
|
import { stripHTML as u } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
7
|
-
import { renderElement as p, safeClassMap as
|
|
7
|
+
import { renderElement as p, safeClassMap as y } from "@arcgis/lumina";
|
|
8
8
|
import { formatNumber as w, substitute as $ } from "@arcgis/core/intl.js";
|
|
9
9
|
const b = f`:host{position:relative;flex:1 1 auto}.list-item--hidden{display:none}.feature-observer{bottom:var(--calcite-spacing-xxl);position:relative;text-align:center;z-index:2}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.notice-container{margin-bottom:var(--calcite-spacing-xs)}`, _ = "nested";
|
|
10
|
-
class A extends
|
|
10
|
+
class A extends g {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.autoDestroyDisabled = !1, this.displayCount = 3, this.flowType = "feature-utility-network-association-type";
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
|
-
this.properties = { autoDestroyDisabled: 5, description: 1, displayCount: 9, endIndex: 32, flowItems: 0, flowType: 1, heading: 1, map: 0, spatialReference: 0, timeZone: 1, view: 0 };
|
|
15
|
+
this.properties = { autoDestroyDisabled: 5, description: 1, displayCount: 9, endIndex: 32, flowItems: 0, flowType: 1, heading: 1, map: 0, referenceElement: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.styles = b;
|
|
19
19
|
}
|
|
20
20
|
get endIndex() {
|
|
21
|
-
const { currentFeaturePage:
|
|
22
|
-
return Math.min(
|
|
21
|
+
const { currentFeaturePage: e, featuresPerPage: t, maxFeatureCount: s } = this;
|
|
22
|
+
return Math.min(e * t, s);
|
|
23
23
|
}
|
|
24
24
|
async destroy() {
|
|
25
25
|
await this.manager.destroy();
|
|
26
26
|
}
|
|
27
|
-
_featureViewModelMatch(
|
|
28
|
-
const s =
|
|
27
|
+
_featureViewModelMatch(e, t) {
|
|
28
|
+
const s = e.graphic, i = s?.layer;
|
|
29
29
|
let o = null;
|
|
30
30
|
i?.type === "subtype-sublayer" && i.parent ? o = i.parent.globalIdField ?? null : i && "globalIdField" in i && (o = i.globalIdField);
|
|
31
|
-
const l = o ? s?.
|
|
31
|
+
const l = o ? s?.getAttribute(o) : null, r = t.graphic, a = r?.layer;
|
|
32
32
|
let c = null;
|
|
33
33
|
a?.type === "subtype-sublayer" && a.parent ? c = a.parent.globalIdField ?? null : a && "globalIdField" in a && (c = a.globalIdField);
|
|
34
|
-
const h = c ? r?.
|
|
35
|
-
return l && h && l === h;
|
|
34
|
+
const h = c ? r?.getAttribute(c) : null;
|
|
35
|
+
return !!(l && h && l === h);
|
|
36
36
|
}
|
|
37
|
-
_findFlowItem(
|
|
38
|
-
return this.flowItems?.findIndex((
|
|
39
|
-
if (
|
|
37
|
+
_findFlowItem(e) {
|
|
38
|
+
return this.flowItems?.findIndex((t) => {
|
|
39
|
+
if (t.flowType !== "feature-association")
|
|
40
40
|
return !1;
|
|
41
|
-
const s =
|
|
42
|
-
return this._featureViewModelMatch(s,
|
|
41
|
+
const s = t.viewModel;
|
|
42
|
+
return this._featureViewModelMatch(s, e);
|
|
43
43
|
}) ?? -1;
|
|
44
44
|
}
|
|
45
|
-
_formatPercentAlong(
|
|
46
|
-
const { percentAlong:
|
|
47
|
-
return
|
|
45
|
+
_formatPercentAlong(e) {
|
|
46
|
+
const { percentAlong: t } = e;
|
|
47
|
+
return t == null ? "" : w(t, {
|
|
48
48
|
style: "percent",
|
|
49
49
|
maximumFractionDigits: 2
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
async _handleFeatureClick(
|
|
52
|
+
async _handleFeatureClick(e, t, s) {
|
|
53
53
|
const { flowItems: i } = this;
|
|
54
|
-
if (
|
|
54
|
+
if (e) {
|
|
55
55
|
i?.destroyAll();
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
58
|
+
if (t < 0 || !i) {
|
|
59
59
|
await this._selectAssociation(s);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
for (; i.length >
|
|
62
|
+
for (; i.length > t + 1; )
|
|
63
63
|
i.pop();
|
|
64
64
|
}
|
|
65
|
-
_isConnectivityAssociation(
|
|
66
|
-
const { associationType:
|
|
67
|
-
return
|
|
65
|
+
_isConnectivityAssociation(e) {
|
|
66
|
+
const { associationType: t } = e;
|
|
67
|
+
return t === "connectivity" || t === "junction-junction-connectivity" || t === "junction-edge-from-connectivity" || t === "junction-edge-midspan-connectivity" || t === "junction-edge-to-connectivity";
|
|
68
68
|
}
|
|
69
|
-
_isConnectivityMidspanAssociation(
|
|
70
|
-
return
|
|
69
|
+
_isConnectivityMidspanAssociation(e) {
|
|
70
|
+
return e.associationType === "junction-edge-midspan-connectivity";
|
|
71
71
|
}
|
|
72
|
-
_isParentFeature(
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
72
|
+
_isParentFeature(e) {
|
|
73
|
+
const t = this.flowItems?.getItemAt(0);
|
|
74
|
+
if (!t)
|
|
75
75
|
return !1;
|
|
76
|
-
const s =
|
|
77
|
-
return this._featureViewModelMatch(s,
|
|
76
|
+
const s = t.parentFeatureViewModel;
|
|
77
|
+
return this._featureViewModelMatch(s, e);
|
|
78
78
|
}
|
|
79
|
-
async _selectAssociation(
|
|
80
|
-
const { flowItems:
|
|
81
|
-
|
|
79
|
+
async _selectAssociation(e) {
|
|
80
|
+
const { flowItems: t } = this;
|
|
81
|
+
t && t.push(p(d(this.parentFeatureViewModel, n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .map=${this.map} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)));
|
|
82
82
|
}
|
|
83
|
-
_showAllAssociations(
|
|
84
|
-
const { flowItems:
|
|
85
|
-
if (!
|
|
83
|
+
_showAllAssociations(e) {
|
|
84
|
+
const { flowItems: t, description: s } = this;
|
|
85
|
+
if (!t || !e)
|
|
86
86
|
return;
|
|
87
87
|
this.showAllEnabled = !0;
|
|
88
|
-
const i =
|
|
89
|
-
|
|
88
|
+
const i = e?.title ?? "";
|
|
89
|
+
t.push(p(n`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this.associationViewModels} .description=${s} .flowItems=${t} .flowType=${this.flowType} .heading=${i} .messages=${this.messages} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .selectedLayer=${e} .showAllEnabled=${this.showAllEnabled}></arcgis-feature-utility-network-association-list>`));
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
const { associationViewModels:
|
|
93
|
-
return n`<div class="root">${
|
|
92
|
+
const { associationViewModels: e, state: t } = this, s = this.selectedLayer?.title ?? this.messages?.noTitle ?? "";
|
|
93
|
+
return n`<div class="root">${t === "loading" || t === "querying" ? this._renderLoading() : n`<calcite-list .displayMode=${_} .filterEnabled=${this.showAllEnabled && !!this.selectedLayer} .filterLabel=${this.messages?.associationFilterPlaceholder} .filterPlaceholder=${this.messages?.associationFilterPlaceholder} .label=${s}>${this.showAllEnabled && this.selectedLayer ? n`${this._renderFeatureCountWarning()}${this._renderAssociatedFeatureListPage()}${this._renderFeatureObserver()}` : Array.from(e.keys(), (i) => this._renderTypeList(i))}</calcite-list>`}</div>`;
|
|
94
94
|
}
|
|
95
|
-
_renderAssociatedFeature(
|
|
96
|
-
const { featureViewModel:
|
|
97
|
-
return n`<calcite-list-item class=${
|
|
95
|
+
_renderAssociatedFeature(e) {
|
|
96
|
+
const { featureViewModel: t, title: s } = e, i = this.state === "loading", o = this._findFlowItem(t), l = o < 0 && this._isParentFeature(t), r = l || o >= 0, a = `associated-feature-${e.association.globalId}`;
|
|
97
|
+
return n`<calcite-list-item class=${y(i ? "list-item--hidden" : "")} .description=${u(e.terminalName ?? "")} .label=${u(s)} @calciteListItemSelect=${async () => await this._handleFeatureClick(l, o, t)}>${this._isConnectivityAssociation(e.association) ? this._renderConnectivityIcon(e.association.associationType, a) : null}${this._isConnectivityMidspanAssociation(e.association) ? n`<calcite-chip .label=${this._formatPercentAlong(e.association)} scale=s slot=content-end>${this._formatPercentAlong(e.association)}</calcite-chip>` : null}${this._renderChevronIconNode(r)}</calcite-list-item>`;
|
|
98
98
|
}
|
|
99
|
-
_renderAssociatedFeatureList(
|
|
100
|
-
return
|
|
99
|
+
_renderAssociatedFeatureList(e) {
|
|
100
|
+
return e.toArray().map((t) => this._renderAssociatedFeature(t));
|
|
101
101
|
}
|
|
102
102
|
_renderAssociatedFeatureListPage() {
|
|
103
|
-
const
|
|
104
|
-
return [...this._renderTooltips(
|
|
103
|
+
const e = this.associationViewModels.get(this.selectedLayer).slice(0, this.endIndex);
|
|
104
|
+
return [...this._renderTooltips(e), ...this._renderAssociatedFeatureList(e)];
|
|
105
105
|
}
|
|
106
|
-
_renderChevronIconNode(
|
|
107
|
-
return n`<calcite-icon flip-rtl .icon=${
|
|
106
|
+
_renderChevronIconNode(e) {
|
|
107
|
+
return n`<calcite-icon flip-rtl .icon=${e ? "move-up" : "chevron-right"} scale=s slot=content-end></calcite-icon>`;
|
|
108
108
|
}
|
|
109
|
-
_renderItemTooltip(
|
|
110
|
-
const { tooltipReferenceMap:
|
|
111
|
-
return this._isConnectivityAssociation(
|
|
109
|
+
_renderItemTooltip(e) {
|
|
110
|
+
const { tooltipReferenceMap: t } = this, s = `associated-feature-${e.association.globalId}`;
|
|
111
|
+
return this._isConnectivityAssociation(e.association) ? n`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(s)}>${this.getConnectivityTooltip(e.association.associationType)}</calcite-tooltip>` : null;
|
|
112
112
|
}
|
|
113
|
-
_renderTypeList(
|
|
114
|
-
const { messages:
|
|
115
|
-
return d("show-all", n`<calcite-list-item expanded .label=${
|
|
113
|
+
_renderTypeList(e) {
|
|
114
|
+
const { messages: t } = this, { displayCount: s } = this, i = this.associationViewModels.get(e), o = i.slice(0, s), l = o.length < i.length, r = $(t?.numberRecords ?? "", { number: i.length.toString() }), a = t?.showAll ?? "";
|
|
115
|
+
return d("show-all", n`<calcite-list-item expanded .label=${e.title} .value=${e.id}><calcite-chip .label=${String(i.length)} scale=s slot=content-end>${i.length}</calcite-chip><calcite-list .group=${e.id} .label=${e.title ?? ""}>${[this._renderTooltips(o), this._renderAssociatedFeatureList(o)]}${l ? d("show-all-item", n`<calcite-list-item .description=${r} .label=${a} @calciteListItemSelect=${() => this._showAllAssociations(e)}><calcite-icon icon=list scale=s slot=content-end></calcite-icon></calcite-list-item>`) : null}</calcite-list></calcite-list-item>`);
|
|
116
116
|
}
|
|
117
|
-
_renderTooltips(
|
|
118
|
-
return
|
|
117
|
+
_renderTooltips(e) {
|
|
118
|
+
return e.toArray().map((t) => this._renderItemTooltip(t));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
m("arcgis-feature-utility-network-association-list", A);
|
|
@@ -15,7 +15,7 @@ import P from "@arcgis/core/rest/support/Query.js";
|
|
|
15
15
|
import G from "@arcgis/core/widgets/Feature/FeatureViewModel.js";
|
|
16
16
|
import { LitElement as Q, renderElement as B } from "@arcgis/lumina";
|
|
17
17
|
import { debounce as L } from "@arcgis/toolkit/function";
|
|
18
|
-
const O = N`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,
|
|
18
|
+
const O = N`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`, E = 100, q = {
|
|
19
19
|
assetGroup: "assetgroup",
|
|
20
20
|
assetType: "assettype"
|
|
21
21
|
}, S = "{00000000-0000-0000-0000-000000000000}";
|
|
@@ -43,12 +43,12 @@ class R extends Q {
|
|
|
43
43
|
this._loaded = !1, this._cancelQueryFeatureCount();
|
|
44
44
|
const t = new AbortController();
|
|
45
45
|
this._queryFeatureCountAbortController = t, await v(this._queryFeatureCount()), this._queryFeatureCountAbortController === t && (this._queryFeatureCountAbortController = null), this._loaded = !0;
|
|
46
|
-
}, this._queryDebounced = L(this._queryController,
|
|
46
|
+
}, this._queryDebounced = L(this._queryController, E), this._queryFeatureCountDebounced = L(this._queryFeatureCountController, E), this._structureAssociations = new w(), this._structureFeatureCount = 0, this._queryAssociationType = async () => {
|
|
47
47
|
this._activeAssociationType && this._queryDebounced(this._activeAssociationType);
|
|
48
48
|
}, this._associationFeatures = I(), this._associationViewModels = I(), this._featureCount = 0, this._loaded = !1, this._queryAbortController = null, this._queryFeatureCountAbortController = null, this._queryPageAbortController = null, this.associationTypes = null, this.autoDestroyDisabled = !1, this.flowType = "feature-utility-network-associations", this.headingLevel = 2, this.source = "popup";
|
|
49
49
|
}
|
|
50
50
|
static {
|
|
51
|
-
this.properties = { _activeAssociationType: 16, _associationFeatures: 16, _associationViewModels: 16, _canLoad: 16, _canQuery: 16, _featureCount: 16, _loaded: 16, _queryAbortController: 16, _queryFeatureCountAbortController: 16, _queryPageAbortController: 16, _state: 16, associationTypes: 0, autoDestroyDisabled: 5, description: 1, flowItems: 0, flowType: 1, graphic: 0, heading: 1, headingLevel: 9, layer: 0, map: 0, messages: 0, parentFeatureViewModel: 0, source: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
51
|
+
this.properties = { _activeAssociationType: 16, _associationFeatures: 16, _associationViewModels: 16, _canLoad: 16, _canQuery: 16, _featureCount: 16, _loaded: 16, _queryAbortController: 16, _queryFeatureCountAbortController: 16, _queryPageAbortController: 16, _state: 16, associationTypes: 0, autoDestroyDisabled: 5, description: 1, flowItems: 0, flowType: 1, graphic: 0, heading: 1, headingLevel: 9, layer: 0, map: 0, messages: 0, parentFeatureViewModel: 0, referenceElement: 1, source: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
52
52
|
}
|
|
53
53
|
static {
|
|
54
54
|
this.styles = O;
|
|
@@ -82,8 +82,8 @@ class R extends Q {
|
|
|
82
82
|
return !!this.layer?.capabilities?.query?.supportsPagination;
|
|
83
83
|
}
|
|
84
84
|
get _state() {
|
|
85
|
-
const { _canLoad: t, _canQuery: e, _featureCount: s, _loaded: o, _queryAbortController: i, _queryFeatureCountAbortController:
|
|
86
|
-
return
|
|
85
|
+
const { _canLoad: t, _canQuery: e, _featureCount: s, _loaded: o, _queryAbortController: i, _queryFeatureCountAbortController: r, _queryPageAbortController: u, associationTypes: c } = this;
|
|
86
|
+
return r || t && !o ? "loading" : i || u ? "querying" : !this._globalId || !c || !e || !s ? "disabled" : "ready";
|
|
87
87
|
}
|
|
88
88
|
get heading() {
|
|
89
89
|
return this._heading;
|
|
@@ -118,7 +118,7 @@ class R extends Q {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
_addAssociationTypeFlowItem(t) {
|
|
121
|
-
this._addFlowItem(B(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this.parentFeatureViewModel?.title} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`));
|
|
121
|
+
this._addFlowItem(B(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this.parentFeatureViewModel?.title} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`));
|
|
122
122
|
}
|
|
123
123
|
_clearAssociations() {
|
|
124
124
|
this._attachmentAssociations.removeAll(), this._connectivityAssociations.removeAll(), this._containerAssociations.removeAll(), this._contentAssociations.removeAll(), this._structureAssociations.removeAll();
|
|
@@ -132,9 +132,9 @@ class R extends Q {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
async _countAssociatedFeatureCount(t, e, s, o, i) {
|
|
135
|
-
const
|
|
135
|
+
const r = this._getFeatureQueryWhereClause(t, e, s, o);
|
|
136
136
|
return await t.queryFeatureCount({
|
|
137
|
-
where:
|
|
137
|
+
where: r,
|
|
138
138
|
outFields: ["*"],
|
|
139
139
|
returnGeometry: !1
|
|
140
140
|
}, {
|
|
@@ -144,37 +144,37 @@ class R extends Q {
|
|
|
144
144
|
async _countAssociatedFeatures(t, e, s, o, i) {
|
|
145
145
|
if (!e.length)
|
|
146
146
|
return 0;
|
|
147
|
-
const
|
|
148
|
-
await this._loadLayers(
|
|
149
|
-
const u =
|
|
150
|
-
return (await Promise.all(u)).reduce((
|
|
147
|
+
const r = await this._findLayersBySourceId(t);
|
|
148
|
+
await this._loadLayers(r);
|
|
149
|
+
const u = r.map((a) => this._countAssociatedFeatureCount(a, e, s, o, i));
|
|
150
|
+
return (await Promise.all(u)).reduce((a, d) => a + d, 0);
|
|
151
151
|
}
|
|
152
152
|
async _createAssociationFeatureObjects(t, e, s, o, i) {
|
|
153
153
|
if (!t.length)
|
|
154
154
|
return [];
|
|
155
|
-
const
|
|
156
|
-
const l = await this._findLayersBySourceId(
|
|
155
|
+
const r = /* @__PURE__ */ new Map(), u = Array.from(e.entries()).map(async ([a, d]) => {
|
|
156
|
+
const l = await this._findLayersBySourceId(a);
|
|
157
157
|
await this._loadLayers(l);
|
|
158
158
|
const y = l.map((n) => this._queryLayer(n, d, s, o, i));
|
|
159
159
|
(await Promise.all(y)).forEach((n) => {
|
|
160
160
|
n.forEach((h) => {
|
|
161
161
|
if (this.source === "popup" ? h.sourceLayer && h.getEffectivePopupTemplate() : !!h.sourceLayer) {
|
|
162
|
-
const f = h.layer.globalIdField ?? "", g = h.
|
|
163
|
-
b.push(h),
|
|
162
|
+
const f = h.layer.globalIdField ?? "", g = h.getAttribute(f), b = r.get(g) ?? [];
|
|
163
|
+
b.push(h), r.set(g, b);
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
await Promise.all(u);
|
|
169
169
|
const c = [];
|
|
170
|
-
return await Promise.all(t.toArray().map(async (
|
|
171
|
-
const { fromNetworkElement: d, toNetworkElement: l } =
|
|
170
|
+
return await Promise.all(t.toArray().map(async (a) => {
|
|
171
|
+
const { fromNetworkElement: d, toNetworkElement: l } = a, y = d.globalId === this._globalId ? l : d, m = r.get(y.globalId) ?? [];
|
|
172
172
|
await Promise.all(m.map(async (n) => {
|
|
173
173
|
const h = this._utilityNetwork?.getTerminalById(y?.terminalId ?? void 0)?.name, _ = await n.sourceLayer.getFeatureTitle(n) || this._getFeatureTitle(n);
|
|
174
174
|
c.push({
|
|
175
175
|
title: _,
|
|
176
176
|
feature: n,
|
|
177
|
-
association:
|
|
177
|
+
association: a,
|
|
178
178
|
terminalName: h
|
|
179
179
|
});
|
|
180
180
|
}));
|
|
@@ -188,16 +188,16 @@ class R extends Q {
|
|
|
188
188
|
let s = function(d, l) {
|
|
189
189
|
return d.networkSourceId === l.networkSourceId && d.globalId === l.globalId && d.terminalId === l.terminalId && d.firstUnit === l.firstUnit && d.numUnits === l.numUnits;
|
|
190
190
|
};
|
|
191
|
-
const o = t.fromNetworkElement, i = t.toNetworkElement,
|
|
192
|
-
return c &&
|
|
191
|
+
const o = t.fromNetworkElement, i = t.toNetworkElement, r = e.fromNetworkElement, u = e.toNetworkElement, c = s(o, r), a = s(i, u);
|
|
192
|
+
return c && a && t.associationType === e.associationType;
|
|
193
193
|
}
|
|
194
194
|
return t.globalId != null && e.globalId != null && t.globalId === e.globalId;
|
|
195
195
|
}
|
|
196
196
|
async _findLayersBySourceId(t) {
|
|
197
197
|
const { _utilityNetwork: e, map: s } = this;
|
|
198
198
|
e?.loaded || await e?.load();
|
|
199
|
-
const o = e.getLayerIdBySourceId(t), i = s.allLayers.filter((c) => !!e?.isUtilityLayer(c) && c.layerId === o),
|
|
200
|
-
return i.concat(
|
|
199
|
+
const o = e.getLayerIdBySourceId(t), i = s.allLayers.filter((c) => !!e?.isUtilityLayer(c) && c.layerId === o), r = s.allTables.filter((c) => !!e?.isUtilityLayer(c) && c.layerId === o);
|
|
200
|
+
return i.concat(r).toArray();
|
|
201
201
|
}
|
|
202
202
|
_getAssociationsByType(t) {
|
|
203
203
|
switch (t) {
|
|
@@ -245,15 +245,15 @@ class R extends Q {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
_getFeatureQueryWhereClause(t, e, s, o) {
|
|
248
|
-
const i = t.globalIdField,
|
|
248
|
+
const i = t.globalIdField, r = t.fieldsIndex.get(q.assetGroup), u = t.fieldsIndex.get(q.assetType), c = s != null, a = o != null, d = i ? D.sqlIn(i, e) : null, l = c ? `(${r?.name} = ${s})` : null, y = c && a ? `(${u?.name} = ${o})` : null;
|
|
249
249
|
return [d, l, y].filter(Boolean).join(" AND ");
|
|
250
250
|
}
|
|
251
251
|
_getFeatureTitle(t) {
|
|
252
252
|
const e = t.attributes, s = t.sourceLayer;
|
|
253
253
|
if (!e || !s)
|
|
254
254
|
return "";
|
|
255
|
-
const o = "displayField" in s ? s.displayField : null, i = o != null ? e[o.toString()] : null,
|
|
256
|
-
return
|
|
255
|
+
const o = "displayField" in s ? s.displayField : null, i = o != null ? e[o.toString()] : null, r = i != null ? i.toString() : null, u = t.getObjectId()?.toString();
|
|
256
|
+
return r || u || "";
|
|
257
257
|
}
|
|
258
258
|
_isSubtypeGroupLayer(t) {
|
|
259
259
|
return t != null && typeof t == "object" && "type" in t && t.type === "subtype-group" && "sublayers" in t;
|
|
@@ -285,11 +285,11 @@ class R extends Q {
|
|
|
285
285
|
return this._equals(t.association, e.association);
|
|
286
286
|
}
|
|
287
287
|
async _queryAssociatedFeatures(t, e) {
|
|
288
|
-
const { layer: s, _globalId: o, associationTypes: i, _utilityNetwork:
|
|
289
|
-
if (await Promise.allSettled([s?.load(),
|
|
288
|
+
const { layer: s, _globalId: o, associationTypes: i, _utilityNetwork: r, _canQuery: u, _associationFeatures: c } = this;
|
|
289
|
+
if (await Promise.allSettled([s?.load(), r?.load()]), !u || !s || !i || !r)
|
|
290
290
|
return;
|
|
291
|
-
const
|
|
292
|
-
|
|
291
|
+
const a = this._getAssociationsByType(t.type), { associatedAssetGroup: d, associatedAssetType: l } = t, y = /* @__PURE__ */ new Map();
|
|
292
|
+
a.forEach((n) => {
|
|
293
293
|
const { fromNetworkElement: h, toNetworkElement: _ } = n, { networkSourceId: f, elementGlobalId: g } = h.globalId === o ? {
|
|
294
294
|
networkSourceId: _.networkSourceId,
|
|
295
295
|
elementGlobalId: _.globalId
|
|
@@ -299,35 +299,35 @@ class R extends Q {
|
|
|
299
299
|
}, b = y.get(f) || [];
|
|
300
300
|
b.push(g), y.set(f, b);
|
|
301
301
|
});
|
|
302
|
-
const m = await this._createAssociationFeatureObjects(
|
|
302
|
+
const m = await this._createAssociationFeatureObjects(a, y, d, l, e);
|
|
303
303
|
this._parseFeatureObjects(m, c);
|
|
304
304
|
}
|
|
305
305
|
async _queryAssociations(t) {
|
|
306
|
-
const { layer: e, _globalId: s, associationTypes: o, _utilityNetwork: i, _canQuery:
|
|
307
|
-
if (await Promise.allSettled([e?.load(), i?.load()]), this._clearAssociations(), !
|
|
306
|
+
const { layer: e, _globalId: s, associationTypes: o, _utilityNetwork: i, _canQuery: r } = this;
|
|
307
|
+
if (await Promise.allSettled([e?.load(), i?.load()]), this._clearAssociations(), !r || !e || !o || !i || !s)
|
|
308
308
|
return;
|
|
309
309
|
const u = this._isSubtypeSublayer(e) ? e.parent : e, c = new V({
|
|
310
310
|
globalId: s,
|
|
311
311
|
networkSourceId: i.getSourceIdByLayerId(u.layerId)
|
|
312
|
-
}),
|
|
312
|
+
}), a = /* @__PURE__ */ new Set();
|
|
313
313
|
o.forEach((n) => {
|
|
314
314
|
switch (n.type) {
|
|
315
315
|
case "attachment":
|
|
316
316
|
case "structure":
|
|
317
|
-
|
|
317
|
+
a.add("attachment");
|
|
318
318
|
break;
|
|
319
319
|
case "container":
|
|
320
320
|
case "content":
|
|
321
|
-
|
|
321
|
+
a.add("containment");
|
|
322
322
|
break;
|
|
323
323
|
case "connectivity":
|
|
324
|
-
|
|
324
|
+
a.add("connectivity"), a.add("junction-junction-connectivity"), a.add("junction-edge-from-connectivity"), a.add("junction-edge-midspan-connectivity"), a.add("junction-edge-to-connectivity");
|
|
325
325
|
break;
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
const d = await i?.queryAssociations(new U({
|
|
329
329
|
elements: [c],
|
|
330
|
-
types: Array.from(
|
|
330
|
+
types: Array.from(a)
|
|
331
331
|
}), {
|
|
332
332
|
signal: t?.signal
|
|
333
333
|
}), l = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
@@ -408,21 +408,21 @@ class R extends Q {
|
|
|
408
408
|
await this._queryAssociations(t), this._featureCount = this._attachmentFeatureCount + this._connectivityFeatureCount + this._containerFeatureCount + this._contentFeatureCount + this._structureFeatureCount;
|
|
409
409
|
}
|
|
410
410
|
async _queryLayer(t, e, s, o, i) {
|
|
411
|
-
const
|
|
412
|
-
where:
|
|
411
|
+
const r = this._getFeatureQueryWhereClause(t, e, s, o), u = new P({
|
|
412
|
+
where: r,
|
|
413
413
|
outFields: ["*"],
|
|
414
414
|
cacheHint: this._supportsCacheHint
|
|
415
415
|
}), c = x.fromJSON(await $(t, u, i));
|
|
416
|
-
return c.features.forEach((
|
|
416
|
+
return c.features.forEach((a) => {
|
|
417
417
|
const d = this._isSubtypeGroupLayer(t);
|
|
418
|
-
|
|
418
|
+
a.layer = d ? t.findSublayerForFeature(a) : t, a.sourceLayer = d ? t.findSublayerForFeature(a) : t;
|
|
419
419
|
}), c.features;
|
|
420
420
|
}
|
|
421
421
|
_parseFeatureObjects(t, e) {
|
|
422
422
|
const s = I();
|
|
423
423
|
t.forEach((o) => {
|
|
424
|
-
const
|
|
425
|
-
j(s,
|
|
424
|
+
const r = (o?.feature).sourceLayer;
|
|
425
|
+
j(s, r, () => new w()).add(o);
|
|
426
426
|
});
|
|
427
427
|
for (const [o, i] of s)
|
|
428
428
|
this._sortFeatureObjectsByTitle(i), e.set(o, i);
|
|
@@ -432,16 +432,16 @@ class R extends Q {
|
|
|
432
432
|
e && (this._activeAssociationType = t, this._setUpUtilityNetworkAssociationsViewModels(), this._addAssociationTypeFlowItem(t));
|
|
433
433
|
}
|
|
434
434
|
_setUpUtilityNetworkAssociationsViewModels() {
|
|
435
|
-
this._associationViewModels.forEach((i,
|
|
436
|
-
const u = this._associationFeatures.get(
|
|
435
|
+
this._associationViewModels.forEach((i, r) => {
|
|
436
|
+
const u = this._associationFeatures.get(r);
|
|
437
437
|
u ? i.forEach((c) => {
|
|
438
|
-
u.find((d) => this._matchesGlobalFeature(c, d)) || (i.remove(c), i.length || this._associationViewModels.delete(
|
|
439
|
-
}) : (i.removeAll(), this._associationViewModels.delete(
|
|
438
|
+
u.find((d) => this._matchesGlobalFeature(c, d)) || (i.remove(c), i.length || this._associationViewModels.delete(r));
|
|
439
|
+
}) : (i.removeAll(), this._associationViewModels.delete(r));
|
|
440
440
|
});
|
|
441
441
|
const { map: t, view: e, spatialReference: s, timeZone: o } = this;
|
|
442
|
-
this._associationFeatures.forEach((i,
|
|
443
|
-
const u = this._associationViewModels.get(
|
|
444
|
-
i?.filter(Boolean).forEach((c,
|
|
442
|
+
this._associationFeatures.forEach((i, r) => {
|
|
443
|
+
const u = this._associationViewModels.get(r) || new w();
|
|
444
|
+
i?.filter(Boolean).forEach((c, a) => {
|
|
445
445
|
if (!u.some((l) => this._matchesGlobalFeature(l, c))) {
|
|
446
446
|
const { association: l, feature: y, terminalName: m, title: n } = c;
|
|
447
447
|
u.add({
|
|
@@ -456,16 +456,16 @@ class R extends Q {
|
|
|
456
456
|
graphic: y
|
|
457
457
|
}),
|
|
458
458
|
terminalName: m
|
|
459
|
-
},
|
|
459
|
+
}, a);
|
|
460
460
|
}
|
|
461
|
-
}), this._associationViewModels.set(
|
|
461
|
+
}), this._associationViewModels.set(r, u);
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
_shouldDiscardNetworkElement(t, e, s) {
|
|
465
465
|
if (!t)
|
|
466
466
|
return !1;
|
|
467
|
-
const { networkSourceId: o } = t, i = s.get(e)?.associatedNetworkSourceId,
|
|
468
|
-
return i != null && i !== o || !
|
|
467
|
+
const { networkSourceId: o } = t, i = s.get(e)?.associatedNetworkSourceId, r = this._networkSourceIdsInUse.has(o);
|
|
468
|
+
return i != null && i !== o || !r;
|
|
469
469
|
}
|
|
470
470
|
_sortFeatureObjectsByTitle(t) {
|
|
471
471
|
t.sort(this._compareByFeatureTitle);
|