@arcgis/map-components 6.0.0-next.0 → 6.0.0-next.1
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/{3TGYCCNJ.js → 24DOFGMG.js} +1 -1
- package/dist/cdn/3KZAH5OY.js +2 -0
- package/dist/cdn/{AKDB2XVJ.js → 5K54VOLZ.js} +1 -1
- package/dist/cdn/{JBHAJ6GW.js → 63FA3UEL.js} +1 -1
- package/dist/cdn/{BCCCO3CN.js → 7UWE25UH.js} +1 -1
- package/dist/cdn/{UHK5GFKQ.js → AENNGCAE.js} +1 -1
- package/dist/cdn/{7AHOPT65.js → BQKVSKYK.js} +1 -1
- package/dist/cdn/{3DPVKWFO.js → CROCDACG.js} +1 -1
- package/dist/cdn/H77SMV46.js +2 -0
- package/dist/cdn/{VYYFRZLI.js → IMPFB7YV.js} +1 -1
- package/dist/cdn/{FUQD5XQR.js → JRQYT5SI.js} +1 -1
- package/dist/cdn/{D7RGMPF3.js → NBDQBLRI.js} +1 -1
- package/dist/cdn/{NIUMOIYZ.js → QTOA5MBN.js} +1 -1
- package/dist/cdn/{2KP3MSHV.js → QWOOD63Q.js} +1 -1
- package/dist/cdn/R6HUY6QI.js +2 -0
- package/dist/cdn/RHNZWKZV.js +2 -0
- package/dist/cdn/{NZBID35V.js → RZQNEEP6.js} +1 -1
- package/dist/cdn/{HKGNXMRR.js → TNFZHEWD.js} +1 -1
- package/dist/cdn/TZ6WQV6O.js +2 -0
- package/dist/cdn/{KRVLKKXB.js → V2GMDCVJ.js} +1 -1
- package/dist/cdn/W3ENDJ6U.js +2 -0
- package/dist/cdn/WJZZ7SZO.js +2 -0
- package/dist/cdn/{KXGVE4NK.js → XJ6DZ6AN.js} +1 -1
- package/dist/cdn/{2JWHVMJ3.js → Y2UYA3OR.js} +1 -1
- package/dist/cdn/Z42QB2QP.js +2 -0
- package/dist/cdn/{3V3PYL2L.js → ZUAR3LO3.js} +1 -1
- package/dist/cdn/{N6QTPGCU.js → ZVZVHZYX.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/action-utils.js +7 -7
- package/dist/chunks/esri-main.js +1 -1
- package/dist/components/arcgis-aggregated-features/customElement.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +13 -13
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +29 -29
- package/dist/components/arcgis-basemap-layer-list-next/types.d.ts +1 -1
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +7 -7
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +16 -16
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +2 -2
- package/dist/components/arcgis-feature-form-text/customElement.d.ts +7 -0
- package/dist/components/arcgis-feature-form-text/customElement.js +24 -0
- package/dist/components/arcgis-feature-form-text/index.d.ts +1 -0
- package/dist/components/arcgis-feature-form-text/index.js +1 -0
- package/dist/components/arcgis-feature-next/customElement.d.ts +14 -6
- package/dist/components/arcgis-feature-next/customElement.js +31 -31
- package/dist/components/arcgis-feature-relationship/customElement.js +69 -69
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +21 -21
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +15 -15
- package/dist/components/arcgis-features-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +14 -14
- package/dist/components/arcgis-legend/customElement.d.ts +2 -2
- package/dist/components/arcgis-legend/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.d.ts +7 -1
- package/dist/components/arcgis-map/customElement.d.ts +7 -1
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -4
- package/dist/components/arcgis-popup/customElement.d.ts +1 -1
- package/dist/components/arcgis-popup/customElement.js +10 -10
- package/dist/components/arcgis-scene/customElement.d.ts +7 -1
- package/dist/components/arcgis-table-list-next/customElement.d.ts +3 -3
- package/dist/components/arcgis-table-list-next/customElement.js +5 -5
- package/dist/components/arcgis-time-bar-slider/customElement.js +24 -23
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.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 +4 -0
- package/dist/loader.js +5 -4
- package/dist/types/lumina.d.ts +6 -1
- package/dist/types/preact.d.ts +7 -1
- package/dist/types/react.d.ts +8 -1
- package/dist/types/stencil.d.ts +6 -1
- package/dist/utils/layer-list-utils.d.ts +2 -2
- package/package.json +6 -6
- package/dist/cdn/7R2TTA5R.js +0 -2
- package/dist/cdn/E7RFFMRP.js +0 -2
- package/dist/cdn/FDXRUZWU.js +0 -2
- package/dist/cdn/KJ6TWPZT.js +0 -2
- package/dist/cdn/NOIAW4P4.js +0 -2
- package/dist/cdn/QDXORLKV.js +0 -2
- package/dist/cdn/Z6AYJE6L.js +0 -2
- /package/dist/cdn/{XIYYT5SJ.js → YYCBU2CG.js} +0 -0
|
@@ -2,40 +2,40 @@
|
|
|
2
2
|
import { c as H } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as k, html as o } from "lit";
|
|
4
4
|
import { debounce as A } from "@arcgis/toolkit/function";
|
|
5
|
-
import { LitElement as K, renderElement as q, safeClassMap as
|
|
5
|
+
import { LitElement as K, renderElement as q, safeClassMap as E } from "@arcgis/lumina";
|
|
6
6
|
import { templateHasKey as x, stripHTML as N } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
7
7
|
import { renderingSanitizer as O } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
8
8
|
import { isRelatableFeatureSupportedLayer as W, findRelatedLayer as Z } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
9
|
-
import { substitute as z, formatNumber as
|
|
9
|
+
import { substitute as z, formatNumber as M } from "@arcgis/core/intl.js";
|
|
10
10
|
import { watch as g, on as G } from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import { p as J } from "../../chunks/feature-utils.js";
|
|
12
|
-
import
|
|
12
|
+
import V from "@arcgis/core/core/Collection.js";
|
|
13
13
|
import S from "@arcgis/core/rest/support/RelationshipQuery.js";
|
|
14
14
|
import { ignoreAbortErrors as R } from "@arcgis/core/core/promiseUtils.js";
|
|
15
15
|
import { classes as Q } from "@arcgis/toolkit/dom";
|
|
16
16
|
import { createRef as U, ref as X } from "lit/directives/ref.js";
|
|
17
|
-
import Y from "@arcgis/core/popup/
|
|
17
|
+
import Y from "@arcgis/core/popup/FeatureModel.js";
|
|
18
18
|
import { g as L } from "../../chunks/async-utils.js";
|
|
19
19
|
import { bypassReadOnly as ee } from "@arcgis/lumina/controllers";
|
|
20
|
-
const te = k`:host{position:relative;flex:1 1 auto}:host([empty]){display:none}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.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}`,
|
|
20
|
+
const te = k`:host{position:relative;flex:1 1 auto}:host([empty]){display:none}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.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}`, ie = (h) => {
|
|
21
21
|
const e = [];
|
|
22
22
|
if (h.formTemplate) {
|
|
23
|
-
const { description: t, title:
|
|
24
|
-
h.fields?.forEach((
|
|
25
|
-
const s =
|
|
26
|
-
(s || a) && e.push(
|
|
23
|
+
const { description: t, title: i } = h.formTemplate;
|
|
24
|
+
h.fields?.forEach((r) => {
|
|
25
|
+
const s = i && x(i, r.name), a = t && x(t, r.name);
|
|
26
|
+
(s || a) && e.push(r.name);
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
return e;
|
|
30
30
|
}, P = 100;
|
|
31
|
-
function
|
|
31
|
+
function re(h) {
|
|
32
32
|
return typeof h == "string" && h.trim().length > 0;
|
|
33
33
|
}
|
|
34
34
|
class se extends K {
|
|
35
35
|
constructor() {
|
|
36
36
|
super(...arguments), this._increaseFeaturePage = () => {
|
|
37
|
-
const { state: e, showAllEnabled: t, relatedFeatures:
|
|
38
|
-
e === "ready" && t &&
|
|
37
|
+
const { state: e, showAllEnabled: t, relatedFeatures: i, featuresPerPage: r, featurePage: s } = this;
|
|
38
|
+
e === "ready" && t && i.length >= r * s && this.featurePage++;
|
|
39
39
|
}, this._relatedFeatureIntersectionObserver = new IntersectionObserver(([e]) => {
|
|
40
40
|
e?.isIntersecting && this._increaseFeaturePage();
|
|
41
41
|
}, {
|
|
@@ -65,19 +65,19 @@ class se extends K {
|
|
|
65
65
|
!this.featureCount || this.relatedLayer?.type === "subtype-group" && !this.activeCategory || (this.relatedFeatureViewModels.destroyAll(), this.featurePage = 1, t.destroyAll(), t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({ signal: e?.signal }))));
|
|
66
66
|
}, this._addFlowItem = (e) => {
|
|
67
67
|
e && this.flowItems?.push(e);
|
|
68
|
-
}, this._relatedFeatureIntersectionObserverNode = U(), this.relatedFeatures = new
|
|
68
|
+
}, this._relatedFeatureIntersectionObserverNode = U(), this.relatedFeatures = new V(), this._queryAbortController = null, this._queryPageAbortController = null, this._queryFeatureCountAbortController = null, this.featureCount = 0, this._loaded = !1, this.relatedFeatureViewModels = new V(), this.autoDestroyDisabled = !1, this.featuresPerPage = 10, this.useFeatureNextFlowItem = !1, this.includeDefaultActions = !1, this.flowType = "feature-relationship", this.headingLevel = 2, this.hideHeading = !1, this.hideDescription = !1, this.hideEmptyRelationshipContent = !1, this.empty = !1, this.showAllEnabled = !1;
|
|
69
69
|
}
|
|
70
70
|
static {
|
|
71
|
-
this.properties = { allCategories: 16, _queryAbortController: 16, _queryPageAbortController: 16, _queryFeatureCountAbortController: 16, featureCount: 16, _loaded: 16, canLoad: 16, canQuery: 16, displayShowAllButton: 16, displayListItems: 16, categories: 16, itemDescriptionFieldName: 16, relatedFeatureViewModels: 16, state: 16, autoDestroyDisabled: 5, allItemsDescription: 32, featurePage: 9, featuresPerPage: 9, flowItems: 0, useFeatureNextFlowItem: 5, flowType: 1, headingLevel: 9, messages: 0, heading: 1, description: 1, values: 0, activeCategory: 0, hideHeading: 5, hideDescription: 5, hideEmptyRelationshipContent: 5, empty: 39, displayCount: 9, graphic: 0, layer: 0, map: 0, view: 0, spatialReference: 0, timeZone: 1, orderByFields: 0, relationshipId: 9, showAllEnabled: 5, label: 3 };
|
|
71
|
+
this.properties = { allCategories: 16, _queryAbortController: 16, _queryPageAbortController: 16, _queryFeatureCountAbortController: 16, featureCount: 16, _loaded: 16, canLoad: 16, canQuery: 16, displayShowAllButton: 16, displayListItems: 16, categories: 16, itemDescriptionFieldName: 16, relatedFeatureViewModels: 16, state: 16, autoDestroyDisabled: 5, allItemsDescription: 32, featurePage: 9, featuresPerPage: 9, flowItems: 0, useFeatureNextFlowItem: 5, actions: 0, includeDefaultActions: 5, flowType: 1, headingLevel: 9, messages: 0, heading: 1, description: 1, values: 0, activeCategory: 0, hideHeading: 5, hideDescription: 5, hideEmptyRelationshipContent: 5, empty: 39, displayCount: 9, graphic: 0, layer: 0, map: 0, view: 0, spatialReference: 0, timeZone: 1, orderByFields: 0, relationshipId: 9, showAllEnabled: 5, label: 3 };
|
|
72
72
|
}
|
|
73
73
|
static {
|
|
74
74
|
this.styles = te;
|
|
75
75
|
}
|
|
76
76
|
get orderByFieldsFixedCasing() {
|
|
77
77
|
const { orderByFields: e, relatedLayer: t } = this;
|
|
78
|
-
return e && t?.loaded ? e.map((
|
|
79
|
-
const
|
|
80
|
-
return
|
|
78
|
+
return e && t?.loaded ? e.map((i) => {
|
|
79
|
+
const r = i.clone();
|
|
80
|
+
return r.field = J(i.field, t), r;
|
|
81
81
|
}) : e ?? [];
|
|
82
82
|
}
|
|
83
83
|
get supportsCacheHint() {
|
|
@@ -93,15 +93,15 @@ class se extends K {
|
|
|
93
93
|
return this.layer?.objectIdField || null;
|
|
94
94
|
}
|
|
95
95
|
get relatedLayer() {
|
|
96
|
-
const { layer: e, map: t, relationship:
|
|
97
|
-
if (!e?.loaded || !t || !
|
|
96
|
+
const { layer: e, map: t, relationship: i } = this;
|
|
97
|
+
if (!e?.loaded || !t || !i)
|
|
98
98
|
return null;
|
|
99
|
-
const
|
|
100
|
-
return Z(t,
|
|
99
|
+
const r = e.type === "subtype-sublayer" && e.parent && W(e.parent) ? e.parent : e;
|
|
100
|
+
return Z(t, r, i) ?? null;
|
|
101
101
|
}
|
|
102
102
|
get relatedLayerKeyField() {
|
|
103
103
|
const { relatedLayer: e, relationshipId: t } = this;
|
|
104
|
-
return e?.loaded && t != null ? e.relationships?.find((
|
|
104
|
+
return e?.loaded && t != null ? e.relationships?.find((i) => i.id === t)?.keyField : null;
|
|
105
105
|
}
|
|
106
106
|
get relatedLayerKeyFields() {
|
|
107
107
|
const { relatedLayer: e } = this;
|
|
@@ -109,7 +109,7 @@ class se extends K {
|
|
|
109
109
|
}
|
|
110
110
|
get relationship() {
|
|
111
111
|
const { relationshipId: e, layer: t } = this;
|
|
112
|
-
return e != null && t?.loaded ? t.relationships?.find(({ id:
|
|
112
|
+
return e != null && t?.loaded ? t.relationships?.find(({ id: i }) => i === e) ?? null : null;
|
|
113
113
|
}
|
|
114
114
|
get relationshipKey() {
|
|
115
115
|
const { relationshipKeyField: e } = this;
|
|
@@ -126,8 +126,8 @@ class se extends K {
|
|
|
126
126
|
return !!this.relatedLayer && !!this.relationship && this.relationshipId != null && this.objectId != null && !!e?.supportsCount && e?.supportsPagination;
|
|
127
127
|
}
|
|
128
128
|
get displayShowAllButton() {
|
|
129
|
-
const { showAllEnabled: e, featureCount: t, displayCount:
|
|
130
|
-
return !e &&
|
|
129
|
+
const { showAllEnabled: e, featureCount: t, displayCount: i, state: r, allCategoriesCount: s } = this, a = !!s && (s > i || i === 0), n = !!t && (t > i || i === 0);
|
|
130
|
+
return !e && r === "ready" && (a || n);
|
|
131
131
|
}
|
|
132
132
|
get displayListItems() {
|
|
133
133
|
const { relatedFeatures: e, allCategoriesCount: t } = this;
|
|
@@ -141,21 +141,21 @@ class se extends K {
|
|
|
141
141
|
return this.orderByFieldsFixedCasing[0]?.field || null;
|
|
142
142
|
}
|
|
143
143
|
get state() {
|
|
144
|
-
const { _queryAbortController: e, _queryFeatureCountAbortController: t, _queryPageAbortController:
|
|
145
|
-
return t || a && !s ? "loading" : e ||
|
|
144
|
+
const { _queryAbortController: e, _queryFeatureCountAbortController: t, _queryPageAbortController: i, canQuery: r, _loaded: s, canLoad: a } = this;
|
|
145
|
+
return t || a && !s ? "loading" : e || i ? "querying" : r ? "ready" : "disabled";
|
|
146
146
|
}
|
|
147
147
|
get allItemsDescription() {
|
|
148
|
-
const { messages: e, featureCount: t, allCategories:
|
|
148
|
+
const { messages: e, featureCount: t, allCategories: i, allCategoriesCount: r } = this;
|
|
149
149
|
return z(e?.numberRecords ?? "", {
|
|
150
|
-
number:
|
|
150
|
+
number: M(i ? r : t)
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
get featurePage() {
|
|
154
154
|
return this._featurePage;
|
|
155
155
|
}
|
|
156
156
|
set featurePage(e) {
|
|
157
|
-
const { featuresPerPage: t, featureCount:
|
|
158
|
-
this._featurePage = Math.min(Math.max(e,
|
|
157
|
+
const { featuresPerPage: t, featureCount: i } = this, r = 1, s = Math.ceil(i / t) || 1;
|
|
158
|
+
this._featurePage = Math.min(Math.max(e, r), s);
|
|
159
159
|
}
|
|
160
160
|
get heading() {
|
|
161
161
|
const { activeCategory: e } = this;
|
|
@@ -165,8 +165,8 @@ class se extends K {
|
|
|
165
165
|
this._heading = e;
|
|
166
166
|
}
|
|
167
167
|
get _empty() {
|
|
168
|
-
const { displayListItems: e, hideEmptyRelationshipContent: t, state:
|
|
169
|
-
return t &&
|
|
168
|
+
const { displayListItems: e, hideEmptyRelationshipContent: t, state: i } = this;
|
|
169
|
+
return t && i === "ready" && !e;
|
|
170
170
|
}
|
|
171
171
|
get displayCount() {
|
|
172
172
|
return this._displayCount ?? 3;
|
|
@@ -208,18 +208,18 @@ class se extends K {
|
|
|
208
208
|
async _queryFeatureCount() {
|
|
209
209
|
const { layer: e, relatedLayer: t } = this;
|
|
210
210
|
await e?.load(), await t?.load();
|
|
211
|
-
const { _queryFeatureCountAbortController:
|
|
211
|
+
const { _queryFeatureCountAbortController: i, activeCategory: r, canQuery: s, objectId: a, relatedLayerKeyField: n, relationshipId: l, relationshipKey: d, supportsCacheHint: b } = this;
|
|
212
212
|
if (!s || !e || !t || a == null) {
|
|
213
213
|
this.featureCount = 0, this.allCategories = void 0;
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
|
-
if (t?.type === "subtype-group" && !
|
|
216
|
+
if (t?.type === "subtype-group" && !r) {
|
|
217
217
|
if (this.featureCount = 0, this.relatedFeatureViewModels.destroyAll(), this.featurePage = 1, this.relatedFeatures.destroyAll(), n && d != null) {
|
|
218
218
|
const { default: F } = await import("@arcgis/core/smartMapping/statistics/uniqueValues.js"), { uniqueValueInfos: w } = await F({
|
|
219
219
|
layer: t,
|
|
220
220
|
sqlWhere: `${n} = '${d}'`,
|
|
221
221
|
field: t.subtypeField ?? void 0,
|
|
222
|
-
signal:
|
|
222
|
+
signal: i?.signal
|
|
223
223
|
}), v = w.map(({ count: c, value: p }) => {
|
|
224
224
|
const f = t.subtypes?.find((I) => I.code === p)?.name;
|
|
225
225
|
return p != null && f ? {
|
|
@@ -232,47 +232,47 @@ class se extends K {
|
|
|
232
232
|
}
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
const { historicMoment: m, gdbVersion:
|
|
235
|
+
const { historicMoment: m, gdbVersion: _ } = e, C = new S({
|
|
236
236
|
cacheHint: b,
|
|
237
|
-
gdbVersion:
|
|
237
|
+
gdbVersion: _,
|
|
238
238
|
historicMoment: m,
|
|
239
239
|
relationshipId: l,
|
|
240
240
|
returnGeometry: !1,
|
|
241
241
|
objectIds: [a],
|
|
242
242
|
where: this._getRelationshipWhereClause(t)
|
|
243
|
-
}), y = await e.queryRelatedFeaturesCount(
|
|
244
|
-
signal:
|
|
243
|
+
}), y = await e.queryRelatedFeaturesCount(C, {
|
|
244
|
+
signal: i?.signal
|
|
245
245
|
});
|
|
246
246
|
this.allCategories = void 0, this.featureCount = y[a] || 0;
|
|
247
247
|
}
|
|
248
248
|
_getRelationshipWhereClause(e) {
|
|
249
|
-
const { activeCategory: t } = this,
|
|
249
|
+
const { activeCategory: t } = this, i = e.createQuery(), r = "subtypeField" in e ? e.subtypeField : void 0, s = t && r ? `${r} = ${t.value}` : void 0, a = i.where;
|
|
250
250
|
return a && s ? `(${a}) AND (${s})` : a ?? s;
|
|
251
251
|
}
|
|
252
252
|
_sliceFeatures(e) {
|
|
253
|
-
const { showAllEnabled: t, displayCount:
|
|
254
|
-
return t ? e :
|
|
253
|
+
const { showAllEnabled: t, displayCount: i } = this;
|
|
254
|
+
return t ? e : i ? e.slice(0, i) : [];
|
|
255
255
|
}
|
|
256
256
|
async _queryPage() {
|
|
257
|
-
const { relatedFeatures: e, featurePage: t, showAllEnabled:
|
|
258
|
-
!
|
|
257
|
+
const { relatedFeatures: e, featurePage: t, showAllEnabled: i, _queryPageAbortController: r, featureCount: s } = this;
|
|
258
|
+
!i || t < 2 || !s || this.relatedLayer?.type === "subtype-group" && !this.activeCategory || e.addMany(await this._queryRelatedFeatures({ signal: r?.signal }));
|
|
259
259
|
}
|
|
260
260
|
async _queryRelatedFeatures(e) {
|
|
261
|
-
const { displayCount: t, featureCount:
|
|
262
|
-
if (!
|
|
261
|
+
const { displayCount: t, featureCount: i, featurePage: r, featuresPerPage: s, layer: a, orderByFieldsFixedCasing: n, relatedLayer: l, relatedLayerKeyFields: d, relationshipId: b, showAllEnabled: m, supportsCacheHint: _ } = this, { canQuery: C, objectId: y } = this;
|
|
262
|
+
if (!C || !a || !l || y == null)
|
|
263
263
|
return [];
|
|
264
|
-
const F = m ? ((
|
|
264
|
+
const F = m ? ((r - 1) * s + i) % i : 0, w = m ? s : t, v = l.objectIdField, c = "subtypeField" in l ? l.subtypeField : void 0, p = [
|
|
265
265
|
...n.map((u) => u.field),
|
|
266
|
-
...
|
|
266
|
+
...ie(l),
|
|
267
267
|
...d,
|
|
268
268
|
v,
|
|
269
269
|
c
|
|
270
|
-
].filter(
|
|
270
|
+
].filter(re), f = n.map((u) => `${u.field} ${u.order}`), { historicMoment: I, gdbVersion: T } = a, j = new S({
|
|
271
271
|
orderByFields: f,
|
|
272
272
|
start: F,
|
|
273
273
|
num: w,
|
|
274
274
|
outFields: p,
|
|
275
|
-
cacheHint:
|
|
275
|
+
cacheHint: _,
|
|
276
276
|
historicMoment: I,
|
|
277
277
|
gdbVersion: T,
|
|
278
278
|
relationshipId: b,
|
|
@@ -283,8 +283,8 @@ class se extends K {
|
|
|
283
283
|
signal: e?.signal
|
|
284
284
|
}))[y]?.features || [];
|
|
285
285
|
return l.type === "subtype-group" && c ? $.forEach((u) => {
|
|
286
|
-
const B = u.attributes[c],
|
|
287
|
-
u.sourceLayer =
|
|
286
|
+
const B = u.attributes[c], D = l.findSublayerForSubtypeCode?.(B);
|
|
287
|
+
u.sourceLayer = D, u.layer = D;
|
|
288
288
|
}) : $.forEach((u) => {
|
|
289
289
|
u.sourceLayer = l, u.layer = l;
|
|
290
290
|
}), $;
|
|
@@ -297,11 +297,11 @@ class se extends K {
|
|
|
297
297
|
const { flowItems: t } = this;
|
|
298
298
|
if (!t)
|
|
299
299
|
return;
|
|
300
|
-
const
|
|
301
|
-
this._addFlowItem(
|
|
300
|
+
const i = this.useFeatureNextFlowItem ? q(o`<arcgis-feature-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .includeDefaultActions=${this.includeDefaultActions} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`) : q(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`);
|
|
301
|
+
this._addFlowItem(i);
|
|
302
302
|
}
|
|
303
303
|
_addRelationshipFlowItem({ showAllEnabled: e = !1, activeCategory: t }) {
|
|
304
|
-
this._addFlowItem(q(o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`));
|
|
304
|
+
this._addFlowItem(q(o`<arcgis-feature-relationship .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} .includeDefaultActions=${this.includeDefaultActions} hide-description .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`));
|
|
305
305
|
}
|
|
306
306
|
_showAllRecords() {
|
|
307
307
|
const { flowItems: e } = this;
|
|
@@ -316,16 +316,16 @@ class se extends K {
|
|
|
316
316
|
this._relatedFeatureIntersectionObserverNode.value && this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value);
|
|
317
317
|
}
|
|
318
318
|
_matchesFeature(e, t) {
|
|
319
|
-
const
|
|
320
|
-
return
|
|
319
|
+
const i = e?.graphic?.getObjectId(), r = t?.getObjectId();
|
|
320
|
+
return i != null && r != null && i === r;
|
|
321
321
|
}
|
|
322
322
|
_setRelatedFeaturesViewModels() {
|
|
323
|
-
const { relatedFeatures: e, relatedFeatureViewModels: t, map:
|
|
323
|
+
const { relatedFeatures: e, relatedFeatureViewModels: t, map: i, view: r, spatialReference: s, timeZone: a } = this;
|
|
324
324
|
e?.filter(Boolean).forEach((n) => {
|
|
325
325
|
t.some((d) => this._matchesFeature(d, n)) || t.add(new Y({
|
|
326
326
|
abilities: { relationshipContent: !1 },
|
|
327
|
-
map:
|
|
328
|
-
view:
|
|
327
|
+
map: i,
|
|
328
|
+
view: r,
|
|
329
329
|
spatialReference: s,
|
|
330
330
|
timeZone: a,
|
|
331
331
|
graphic: n
|
|
@@ -354,15 +354,15 @@ class se extends K {
|
|
|
354
354
|
return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`;
|
|
355
355
|
}
|
|
356
356
|
_renderCategory(e) {
|
|
357
|
-
const { count: t, name:
|
|
358
|
-
return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${
|
|
357
|
+
const { count: t, name: i } = e, r = M(t);
|
|
358
|
+
return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${i} @calciteListItemSelect=${() => this._selectCategory(e)}><calcite-chip .label=${r} scale=s slot=content-end>${r}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`;
|
|
359
359
|
}
|
|
360
360
|
_renderRelatedFeature(e) {
|
|
361
|
-
const { itemDescriptionFieldName: t, values:
|
|
362
|
-
...
|
|
363
|
-
...
|
|
361
|
+
const { itemDescriptionFieldName: t, values: i } = this, { formattedAttributes: r, state: s, heading: a } = e, n = {
|
|
362
|
+
...i,
|
|
363
|
+
...r?.global
|
|
364
364
|
}, l = (t && n?.[t]) ?? "";
|
|
365
|
-
return o`<calcite-list-item class=${
|
|
365
|
+
return o`<calcite-list-item class=${E(Q("list-item", { "list-item-hidden": s === "loading" }))} .description=${N(l.toString())} .label=${N(a)} @calciteListItemSelect=${() => this._selectRecord(e)}><div slot=heading><div .innerHTML=${O.sanitize(a ?? "") ?? ""}></div></div><div slot=description><div .innerHTML=${O.sanitize(l ?? "") ?? ""}></div></div>${this._renderChevronIconNode()}</calcite-list-item>`;
|
|
366
366
|
}
|
|
367
367
|
_renderShowAllListItem() {
|
|
368
368
|
return this.displayShowAllButton ? o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${() => this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>` : null;
|
|
@@ -375,11 +375,11 @@ class se extends K {
|
|
|
375
375
|
}
|
|
376
376
|
_renderList() {
|
|
377
377
|
const { relatedFeatureViewModels: e, categories: t } = this;
|
|
378
|
-
return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList ?? ""}>${t?.map((
|
|
378
|
+
return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList ?? ""}>${t?.map((i) => this._renderCategory(i)) ?? e.toArray().map((i) => this._renderRelatedFeature(i))}${this._renderShowAllListItem()}</calcite-list>`;
|
|
379
379
|
}
|
|
380
380
|
_renderRelatedFeatures() {
|
|
381
381
|
const { displayListItems: e } = this, { state: t } = this;
|
|
382
|
-
return o`<div class=${
|
|
382
|
+
return o`<div class=${E(Q("list", {
|
|
383
383
|
"list-querying": t === "querying"
|
|
384
384
|
}))}>${e ? this._renderList() : t === "ready" ? this._renderNoRelatedFeaturesMessage() : null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`;
|
|
385
385
|
}
|
|
@@ -5,16 +5,16 @@ import { keyed as d } from "lit/directives/keyed.js";
|
|
|
5
5
|
import { ArcgisUtilityNetworkAssociationList as y } from "../arcgis-utility-network-association-list/customElement.js";
|
|
6
6
|
import { stripHTML as p } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
7
7
|
import { formatNumber as w, substitute as $ } from "@arcgis/core/intl.js";
|
|
8
|
-
import { renderElement as
|
|
8
|
+
import { renderElement as u, safeClassMap as b } from "@arcgis/lumina";
|
|
9
9
|
import { u as F } from "../../chunks/useT9n.js";
|
|
10
10
|
import { i as m } from "../../chunks/layer-utils.js";
|
|
11
|
-
const _ = g`: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)}`,
|
|
12
|
-
class
|
|
11
|
+
const _ = g`: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)}`, A = "nested";
|
|
12
|
+
class v extends y {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this._messagesFeature = F({ name: "feature", blocking: !0 }), this.autoDestroyDisabled = !1, this.displayCount = 3, this.useFeatureNextFlowItem = !1, this.flowType = "feature-utility-network-association-type";
|
|
14
|
+
super(...arguments), this._messagesFeature = F({ name: "feature", blocking: !0 }), this.autoDestroyDisabled = !1, this.displayCount = 3, this.useFeatureNextFlowItem = !1, this.includeDefaultActions = !1, this.flowType = "feature-utility-network-association-type";
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.properties = { autoDestroyDisabled: 5, description: 1, displayCount: 9, flowItems: 0, useFeatureNextFlowItem: 5, flowType: 1, heading: 1, map: 0, messageOverrides: 0, referenceElement: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
17
|
+
this.properties = { autoDestroyDisabled: 5, description: 1, displayCount: 9, flowItems: 0, useFeatureNextFlowItem: 5, actions: 0, includeDefaultActions: 5, flowType: 1, heading: 1, map: 0, messageOverrides: 0, referenceElement: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
18
18
|
}
|
|
19
19
|
static {
|
|
20
20
|
this.styles = _;
|
|
@@ -24,13 +24,13 @@ class A extends y {
|
|
|
24
24
|
}
|
|
25
25
|
_featureViewModelMatch(e, t) {
|
|
26
26
|
const i = e.graphic, s = i?.layer;
|
|
27
|
-
let
|
|
28
|
-
m(s) && s.parent ?
|
|
29
|
-
const
|
|
27
|
+
let n = null;
|
|
28
|
+
m(s) && s.parent ? n = s.parent.globalIdField ?? null : s && "globalIdField" in s && (n = s.globalIdField);
|
|
29
|
+
const l = n ? i?.getAttribute(n) : null, r = t.graphic, a = r?.layer;
|
|
30
30
|
let c = null;
|
|
31
|
-
m(
|
|
32
|
-
const
|
|
33
|
-
return !!(
|
|
31
|
+
m(a) && a.parent ? c = a.parent.globalIdField ?? null : a && "globalIdField" in a && (c = a.globalIdField);
|
|
32
|
+
const h = c ? r?.getAttribute(c) : null;
|
|
33
|
+
return !!(l && h && l === h);
|
|
34
34
|
}
|
|
35
35
|
_findFlowItem(e) {
|
|
36
36
|
return this.flowItems?.findIndex((t) => {
|
|
@@ -78,7 +78,7 @@ class A extends y {
|
|
|
78
78
|
const { flowItems: t } = this;
|
|
79
79
|
if (!t)
|
|
80
80
|
return;
|
|
81
|
-
const i = this.useFeatureNextFlowItem ?
|
|
81
|
+
const i = this.useFeatureNextFlowItem ? u(d(this.parentFeatureViewModel, o`<arcgis-feature-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .includeDefaultActions=${this.includeDefaultActions} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`)) : u(d(this.parentFeatureViewModel, o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`));
|
|
82
82
|
t.push(i);
|
|
83
83
|
}
|
|
84
84
|
_showAllAssociations(e) {
|
|
@@ -87,15 +87,15 @@ class A extends y {
|
|
|
87
87
|
return;
|
|
88
88
|
this.showAllEnabled = !0;
|
|
89
89
|
const s = e?.title ?? "";
|
|
90
|
-
t.push(
|
|
90
|
+
t.push(u(o`<arcgis-feature-utility-network-association-list .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this.associationViewModels} .description=${i} .flowItems=${t} .flowType=${this.flowType} .heading=${s} .includeDefaultActions=${this.includeDefaultActions} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .selectedLayer=${e} .showAllEnabled=${this.showAllEnabled} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem}></arcgis-feature-utility-network-association-list>`));
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
93
|
const { associationViewModels: e, state: t } = this, i = this.selectedLayer?.title ?? this._messagesFeature.noTitle ?? "";
|
|
94
|
-
return o`<div class="root">${t === "loading" || t === "querying" ? this._renderLoading() : o`<calcite-list .displayMode=${
|
|
94
|
+
return o`<div class="root">${t === "loading" || t === "querying" ? this._renderLoading() : o`<calcite-list .displayMode=${A} .filterEnabled=${this.showAllEnabled && !!this.selectedLayer} .filterLabel=${this._messages.associationFilterPlaceholder} .filterPlaceholder=${this._messages.associationFilterPlaceholder} .label=${i}>${this.showAllEnabled && this.selectedLayer ? o`${this._renderFeatureCountWarning()}${this._renderAssociatedFeatureListPage()}${this._renderFeatureObserver()}` : Array.from(e.keys(), (s) => this._renderTypeList(s))}</calcite-list>`}</div>`;
|
|
95
95
|
}
|
|
96
96
|
_renderAssociatedFeature(e) {
|
|
97
|
-
const { featureViewModel: t, title: i } = e, s = this.state === "loading",
|
|
98
|
-
return o`<calcite-list-item class=${b(s ? "list-item--hidden" : "")} .description=${p(e.terminalName ?? "")} .label=${p(i)} @calciteListItemSelect=${async () => await this._handleFeatureClick(
|
|
97
|
+
const { featureViewModel: t, title: i } = e, s = this.state === "loading", n = this._findFlowItem(t), l = n < 0 && this._isParentFeature(t), r = l || n >= 0, a = `associated-feature-${e.association.globalId}`;
|
|
98
|
+
return o`<calcite-list-item class=${b(s ? "list-item--hidden" : "")} .description=${p(e.terminalName ?? "")} .label=${p(i)} @calciteListItemSelect=${async () => await this._handleFeatureClick(l, n, t)}>${this._isConnectivityAssociation(e.association) ? this._renderConnectivityIcon(e.association.associationType, a) : null}${this._isConnectivityMidspanAssociation(e.association) ? o`<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>`;
|
|
99
99
|
}
|
|
100
100
|
_renderAssociatedFeatureList(e) {
|
|
101
101
|
return e.toArray().map((t) => this._renderAssociatedFeature(t));
|
|
@@ -112,16 +112,16 @@ class A extends y {
|
|
|
112
112
|
return this._isConnectivityAssociation(e.association) ? o`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(i)}>${this.getConnectivityTooltip(e.association.associationType)}</calcite-tooltip>` : null;
|
|
113
113
|
}
|
|
114
114
|
_renderTypeList(e) {
|
|
115
|
-
const { displayCount: t } = this, i = this.associationViewModels.get(e), s = i.slice(0, t),
|
|
115
|
+
const { displayCount: t } = this, i = this.associationViewModels.get(e), s = i.slice(0, t), n = s.length < i.length, l = $(this._messagesFeature.numberRecords ?? "", {
|
|
116
116
|
number: i.length.toString()
|
|
117
|
-
}),
|
|
118
|
-
return d("show-all", o`<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(s), this._renderAssociatedFeatureList(s)]}${
|
|
117
|
+
}), r = this._messagesFeature.showAll ?? "";
|
|
118
|
+
return d("show-all", o`<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(s), this._renderAssociatedFeatureList(s)]}${n ? d("show-all-item", o`<calcite-list-item .description=${l} .label=${r} @calciteListItemSelect=${() => this._showAllAssociations(e)}><calcite-icon icon=list scale=s slot=content-end></calcite-icon></calcite-list-item>`) : null}</calcite-list></calcite-list-item>`);
|
|
119
119
|
}
|
|
120
120
|
_renderTooltips(e) {
|
|
121
121
|
return e.toArray().map((t) => this._renderItemTooltip(t));
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
f("arcgis-feature-utility-network-association-list",
|
|
124
|
+
f("arcgis-feature-utility-network-association-list", v);
|
|
125
125
|
export {
|
|
126
|
-
|
|
126
|
+
v as ArcgisFeatureUtilityNetworkAssociationList
|
|
127
127
|
};
|
|
@@ -6,7 +6,7 @@ import { i as k, q as j } from "../../chunks/layer-utils.js";
|
|
|
6
6
|
import { g as v } from "../../chunks/async-utils.js";
|
|
7
7
|
import { createReactiveMap as I, findUtilityNetwork as x, getOrCreateMapValue as P } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
8
8
|
import { stripHTML as E } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
9
|
-
import
|
|
9
|
+
import f from "@arcgis/core/core/Collection.js";
|
|
10
10
|
import { ignoreAbortErrors as T } from "@arcgis/core/core/promiseUtils.js";
|
|
11
11
|
import { watch as A } from "@arcgis/core/core/reactiveUtils.js";
|
|
12
12
|
import * as U from "@arcgis/core/core/sql.js";
|
|
@@ -14,7 +14,7 @@ import Q from "@arcgis/core/rest/networks/support/NetworkElement.js";
|
|
|
14
14
|
import G from "@arcgis/core/rest/networks/support/QueryAssociationsParameters.js";
|
|
15
15
|
import { LitElement as B, renderElement as q } from "@arcgis/lumina";
|
|
16
16
|
import { debounce as L } from "@arcgis/toolkit/function";
|
|
17
|
-
import O from "@arcgis/core/popup/
|
|
17
|
+
import O from "@arcgis/core/popup/FeatureModel.js";
|
|
18
18
|
import { u as $ } from "../../chunks/useT9n.js";
|
|
19
19
|
const R = V`.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}`, N = 100, S = {
|
|
20
20
|
assetGroup: "assetgroup",
|
|
@@ -24,13 +24,13 @@ class Z extends B {
|
|
|
24
24
|
constructor() {
|
|
25
25
|
super(...arguments), this._addFlowItem = (t) => {
|
|
26
26
|
t && this.flowItems?.push(t);
|
|
27
|
-
}, this._attachmentAssociations = new
|
|
27
|
+
}, this._attachmentAssociations = new f(), this._attachmentFeatureCount = 0, this._cancelQuery = () => {
|
|
28
28
|
const { _queryAbortController: t } = this;
|
|
29
29
|
t && t.abort(), this._queryAbortController = null;
|
|
30
30
|
}, this._cancelQueryFeatureCount = () => {
|
|
31
31
|
const { _queryFeatureCountAbortController: t } = this;
|
|
32
32
|
t && t.abort(), this._queryFeatureCountAbortController = null;
|
|
33
|
-
}, this._connectivityAssociations = new
|
|
33
|
+
}, this._connectivityAssociations = new f(), this._connectivityFeatureCount = 0, this._containerAssociations = new f(), this._containerFeatureCount = 0, this._contentAssociations = new f(), this._contentFeatureCount = 0, this._messages = $({ name: "utility-network-associations", blocking: !0 }), this._messagesFeature = $({ name: "feature", blocking: !0 }), this._networkSourceIdsInUse = /* @__PURE__ */ new Set(), this._query = async (t) => {
|
|
34
34
|
if (!t)
|
|
35
35
|
return;
|
|
36
36
|
await this._loadUtilityNetworks();
|
|
@@ -44,12 +44,12 @@ class Z extends B {
|
|
|
44
44
|
this._loaded = !1, this._cancelQueryFeatureCount();
|
|
45
45
|
const t = new AbortController();
|
|
46
46
|
this._queryFeatureCountAbortController = t, await T(this._queryFeatureCount()), this._queryFeatureCountAbortController === t && (this._queryFeatureCountAbortController = null), this._loaded = !0;
|
|
47
|
-
}, this._queryDebounced = L(this._queryController, v(N)), this._queryFeatureCountDebounced = L(this._queryFeatureCountController, v(N)), this._structureAssociations = new
|
|
47
|
+
}, this._queryDebounced = L(this._queryController, v(N)), this._queryFeatureCountDebounced = L(this._queryFeatureCountController, v(N)), this._structureAssociations = new f(), this._structureFeatureCount = 0, this._queryAssociationType = async () => {
|
|
48
48
|
this._activeAssociationType && this._queryDebounced(this._activeAssociationType);
|
|
49
|
-
}, 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.useFeatureNextFlowItem = !1, this.flowType = "feature-utility-network-associations", this.headingLevel = 2, this.source = "popup";
|
|
49
|
+
}, 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.useFeatureNextFlowItem = !1, this.includeDefaultActions = !1, this.flowType = "feature-utility-network-associations", this.headingLevel = 2, this.source = "popup";
|
|
50
50
|
}
|
|
51
51
|
static {
|
|
52
|
-
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, useFeatureNextFlowItem: 5, flowType: 1, graphic: 0, heading: 1, headingLevel: 9, layer: 0, map: 0, messageOverrides: 0, messages: 0, parentFeatureViewModel: 0, referenceElement: 1, source: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
52
|
+
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, useFeatureNextFlowItem: 5, actions: 0, includeDefaultActions: 5, flowType: 1, graphic: 0, heading: 1, headingLevel: 9, layer: 0, map: 0, messageOverrides: 0, messages: 0, parentFeatureViewModel: 0, referenceElement: 1, source: 1, spatialReference: 0, timeZone: 1, view: 0 };
|
|
53
53
|
}
|
|
54
54
|
static {
|
|
55
55
|
this.styles = R;
|
|
@@ -119,7 +119,7 @@ class Z extends B {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
_addAssociationTypeFlowItem(t) {
|
|
122
|
-
const e = this.useFeatureNextFlowItem ? q(m`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`) : q(m`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .map=${this.map} .messageOverrides=${this.messageOverrides} .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
|
+
const e = this.useFeatureNextFlowItem ? q(m`<arcgis-feature-utility-network-association-list .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .includeDefaultActions=${this.includeDefaultActions} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`) : q(m`<arcgis-feature-utility-network-association-list .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .includeDefaultActions=${this.includeDefaultActions} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);
|
|
123
123
|
this._addFlowItem(e);
|
|
124
124
|
}
|
|
125
125
|
_clearAssociations() {
|
|
@@ -157,7 +157,7 @@ class Z extends B {
|
|
|
157
157
|
(await Promise.all(y)).forEach((n) => {
|
|
158
158
|
n.forEach((h) => {
|
|
159
159
|
if (this.source === "popup" ? h.sourceLayer && h.getEffectivePopupTemplate() : !!h.sourceLayer) {
|
|
160
|
-
const
|
|
160
|
+
const w = h.layer.globalIdField ?? "", g = h.getAttribute(w), F = a.get(g) ?? [];
|
|
161
161
|
F.push(h), a.set(g, F);
|
|
162
162
|
}
|
|
163
163
|
});
|
|
@@ -291,14 +291,14 @@ class Z extends B {
|
|
|
291
291
|
return;
|
|
292
292
|
const l = this._getAssociationsByType(t.type), { associatedAssetGroup: d, associatedAssetType: u } = t, y = /* @__PURE__ */ new Map();
|
|
293
293
|
l.forEach((n) => {
|
|
294
|
-
const { fromNetworkElement: h, toNetworkElement: _ } = n, { networkSourceId:
|
|
294
|
+
const { fromNetworkElement: h, toNetworkElement: _ } = n, { networkSourceId: w, elementGlobalId: g } = h.globalId === i ? {
|
|
295
295
|
networkSourceId: _.networkSourceId,
|
|
296
296
|
elementGlobalId: _.globalId
|
|
297
297
|
} : {
|
|
298
298
|
networkSourceId: h.networkSourceId,
|
|
299
299
|
elementGlobalId: h.globalId
|
|
300
|
-
}, F = y.get(
|
|
301
|
-
F.push(g), y.set(
|
|
300
|
+
}, F = y.get(w) || [];
|
|
301
|
+
F.push(g), y.set(w, F);
|
|
302
302
|
});
|
|
303
303
|
const p = await this._createAssociationFeatureObjects(l, y, d, u, e);
|
|
304
304
|
this._parseFeatureObjects(p, c);
|
|
@@ -378,7 +378,7 @@ class Z extends B {
|
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
const p = i.map(async (n) => {
|
|
381
|
-
const { associatedNetworkSourceId: h, associatedAssetGroup: _, associatedAssetType:
|
|
381
|
+
const { associatedNetworkSourceId: h, associatedAssetGroup: _, associatedAssetType: w } = n, g = u.get(n.type), b = _ != null ? await this._countAssociatedFeatures(h, g, _, w, t) : g.length;
|
|
382
382
|
switch (n.type) {
|
|
383
383
|
case "attachment":
|
|
384
384
|
this._attachmentFeatureCount = b;
|
|
@@ -418,7 +418,7 @@ class Z extends B {
|
|
|
418
418
|
const s = I();
|
|
419
419
|
t.forEach((i) => {
|
|
420
420
|
const a = (i?.feature).sourceLayer;
|
|
421
|
-
P(s, a, () => new
|
|
421
|
+
P(s, a, () => new f()).add(i);
|
|
422
422
|
});
|
|
423
423
|
for (const [i, o] of s)
|
|
424
424
|
this._sortFeatureObjectsByTitle(o), e.set(i, o);
|
|
@@ -436,7 +436,7 @@ class Z extends B {
|
|
|
436
436
|
});
|
|
437
437
|
const { map: t, view: e, spatialReference: s, timeZone: i } = this;
|
|
438
438
|
this._associationFeatures.forEach((o, a) => {
|
|
439
|
-
const r = this._associationViewModels.get(a) || new
|
|
439
|
+
const r = this._associationViewModels.get(a) || new f();
|
|
440
440
|
o?.filter(Boolean).forEach((c, l) => {
|
|
441
441
|
if (!r.some((u) => this._matchesGlobalFeature(u, c))) {
|
|
442
442
|
const { association: u, feature: y, terminalName: p, title: n } = c;
|
|
@@ -58,7 +58,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
58
58
|
*/
|
|
59
59
|
accessor actions: Collection<PopupAction>;
|
|
60
60
|
/**
|
|
61
|
-
* Indicates if the component is active when it is visible and is not [waiting](https://developers.arcgis.com/javascript/latest/references/core/popup/
|
|
61
|
+
* Indicates if the component is active when it is visible and is not [waiting](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#waitingForResult) for results.
|
|
62
62
|
*
|
|
63
63
|
* @default false
|
|
64
64
|
*/
|