@arcgis/map-components 5.2.0-next.47 → 5.2.0-next.49
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/6ZLGA6NY.js +2 -0
- package/dist/cdn/ZMZJEEHS.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-feature-expression/customElement.js +23 -23
- package/dist/components/arcgis-feature-next/customElement.js +48 -48
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +4 -4
- package/dist/cdn/AROGEJUN.js +0 -2
- package/dist/cdn/W3AXBO55.js +0 -2
|
@@ -4,8 +4,8 @@ import { css as w, html as r } from "lit";
|
|
|
4
4
|
import { ref as y } from "lit/directives/ref.js";
|
|
5
5
|
import { u as I } from "../../chunks/useT9n.js";
|
|
6
6
|
import { classes as M } from "@arcgis/toolkit/dom";
|
|
7
|
-
import { usePropertyChange as
|
|
8
|
-
import { m as
|
|
7
|
+
import { usePropertyChange as x } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { m as C } from "../../chunks/useViewModel.js";
|
|
9
9
|
import { LitElement as b, createEvent as F, nothing as _, safeClassMap as L } from "@arcgis/lumina";
|
|
10
10
|
import { substitute as T } from "@arcgis/core/intl.js";
|
|
11
11
|
import { renderingSanitizer as A } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
@@ -14,10 +14,10 @@ import N from "@arcgis/core/core/Collection.js";
|
|
|
14
14
|
import { watch as H } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
15
|
import { stripHTML as P } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
16
16
|
import Z from "@arcgis/core/popup/Feature.js";
|
|
17
|
-
const z = w`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`, U =
|
|
17
|
+
const z = w`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`, U = C(Z);
|
|
18
18
|
class S extends b {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.internalFlowItems = new N(), this.flowType = "feature", this.viewModel = U(this), this.view = this.viewModel.view, this.icon = "icon", this.isFeatureFromTable = this.viewModel.isFeatureFromTable, this.graphic = this.viewModel.graphic, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.headingLevel = 2, this.spatialReference = this.viewModel.spatialReference, this.timeZone = this.viewModel.timeZone, this.heading = this.viewModel.heading, this.map = this.viewModel.map, this.chartAnimationDisabled = this.viewModel.abilities.chartAnimation, this.hideHeading = !1, this.hideContent = !1, this.hideAttachmentsContent = !1, this.hideCustomContent = !1, this.hideExpressionContent = !1, this.hideFieldsContent = !1, this.hideMediaContent = !1, this.showRelationshipContent = !1, this.hideTextContent = !1, this.showUtilityNetworkContent = !1, this.hideLastEditedInfo = !1, this.autoDestroyDisabled = !1, this.location = this.viewModel.location, this.state = this.viewModel.state, this.arcgisPropertyChange =
|
|
20
|
+
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.internalFlowItems = new N(), this.flowType = "feature", this.viewModel = U(this), this.view = this.viewModel.view, this.icon = "icon", this.isFeatureFromTable = this.viewModel.isFeatureFromTable, this.graphic = this.viewModel.graphic, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.headingLevel = 2, this.spatialReference = this.viewModel.spatialReference, this.timeZone = this.viewModel.timeZone, this.heading = this.viewModel.heading, this.map = this.viewModel.map, this.chartAnimationDisabled = this.viewModel.abilities.chartAnimation, this.hideHeading = !1, this.hideContent = !1, this.hideAttachmentsContent = !1, this.hideCustomContent = !1, this.hideExpressionContent = !1, this.hideFieldsContent = !1, this.hideMediaContent = !1, this.showRelationshipContent = !1, this.hideTextContent = !1, this.showUtilityNetworkContent = !1, this.hideLastEditedInfo = !1, this.autoDestroyDisabled = !1, this.location = this.viewModel.location, this.state = this.viewModel.state, this.arcgisPropertyChange = x()("flowItems", "state"), this.arcgisReady = F();
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.properties = { popupTemplate: 16, sourceLayer: 16, fieldInfoMap: 16, values: 16, globalValues: 16, internalFlowItems: 16, flowType: 1, viewModel: 0, view: 0, flowItems: 0, referenceElement: 1, icon: 1, isFeatureFromTable: 36, graphic: 0, defaultPopupTemplateEnabled: 5, headingLevel: 9, spatialReference: 0, timeZone: 1, heading: 0, map: 0, chartAnimationDisabled: 5, hideHeading: 5, hideContent: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, showRelationshipContent: 5, hideTextContent: 5, showUtilityNetworkContent: 5, hideLastEditedInfo: 5, autoDestroyDisabled: 5, messageOverrides: 0, label: 1, location: 0, state: 32 };
|
|
@@ -53,11 +53,11 @@ class S extends b {
|
|
|
53
53
|
const i = this.viewModel.content;
|
|
54
54
|
if (!Array.isArray(i))
|
|
55
55
|
return;
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
56
|
+
const a = i[e];
|
|
57
|
+
if (a?.type !== "media")
|
|
58
58
|
return;
|
|
59
|
-
const
|
|
60
|
-
this._setContentElementMedia(
|
|
59
|
+
const s = a;
|
|
60
|
+
this._setContentElementMedia(s, t);
|
|
61
61
|
}
|
|
62
62
|
async updateGeometry() {
|
|
63
63
|
return await this.viewModel.updateGeometry();
|
|
@@ -68,18 +68,18 @@ class S extends b {
|
|
|
68
68
|
]);
|
|
69
69
|
}
|
|
70
70
|
_setContentElementMedia(e, t) {
|
|
71
|
-
const i = e.mediaInfos?.length ?? 0,
|
|
72
|
-
e.activeMediaInfoIndex =
|
|
71
|
+
const i = e.mediaInfos?.length ?? 0, a = (t + i) % i;
|
|
72
|
+
e.activeMediaInfoIndex = a;
|
|
73
73
|
}
|
|
74
74
|
_pageContentElementMedia(e, t) {
|
|
75
75
|
const i = this.viewModel.content;
|
|
76
76
|
if (!Array.isArray(i))
|
|
77
77
|
return;
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
78
|
+
const a = i[e];
|
|
79
|
+
if (a?.type !== "media")
|
|
80
80
|
return;
|
|
81
|
-
const
|
|
82
|
-
this._setContentElementMedia(
|
|
81
|
+
const s = a, { activeMediaInfoIndex: o } = s, n = (o ?? 0) + t;
|
|
82
|
+
this._setContentElementMedia(s, n);
|
|
83
83
|
}
|
|
84
84
|
_removeFlowItems() {
|
|
85
85
|
this.internalFlowItems?.destroyAll();
|
|
@@ -102,17 +102,17 @@ class S extends b {
|
|
|
102
102
|
return r`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t ? null : r`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`;
|
|
103
103
|
}
|
|
104
104
|
_renderAttachments(e) {
|
|
105
|
-
const { values: t, fieldInfoMap: i, sourceLayer:
|
|
105
|
+
const { values: t, fieldInfoMap: i, sourceLayer: a, globalValues: s } = this, o = d({
|
|
106
106
|
values: t,
|
|
107
107
|
fieldInfoMap: i,
|
|
108
|
-
globalValues:
|
|
109
|
-
layer:
|
|
108
|
+
globalValues: s,
|
|
109
|
+
layer: a,
|
|
110
110
|
text: e.title
|
|
111
111
|
}), n = d({
|
|
112
112
|
values: t,
|
|
113
113
|
fieldInfoMap: i,
|
|
114
|
-
globalValues:
|
|
115
|
-
layer:
|
|
114
|
+
globalValues: s,
|
|
115
|
+
layer: a,
|
|
116
116
|
text: e.description
|
|
117
117
|
});
|
|
118
118
|
return r`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${o} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords ?? void 0} .attachmentTypes=${e.attachmentTypes ?? void 0} .orderByFields=${e.orderByFields ?? void 0} .graphic=${this.graphic ?? void 0} .description=${n} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`;
|
|
@@ -121,15 +121,15 @@ class S extends b {
|
|
|
121
121
|
return r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer ?? void 0} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
122
122
|
}
|
|
123
123
|
_renderFields(e, t) {
|
|
124
|
-
const i = this.viewModel.formattedAttributes, { values:
|
|
125
|
-
values:
|
|
126
|
-
fieldInfoMap:
|
|
124
|
+
const i = this.viewModel.formattedAttributes, { values: a, fieldInfoMap: s, sourceLayer: o, popupTemplate: n, globalValues: l, graphic: c } = this, h = !!e?.fieldInfos, u = (e.fieldInfos ?? n?.fieldInfos ?? [])?.filter(({ fieldName: g }) => !!g && (E(g) || B(g) || g in a)), f = n?.expressionInfos, m = d({
|
|
125
|
+
values: a,
|
|
126
|
+
fieldInfoMap: s,
|
|
127
127
|
globalValues: l,
|
|
128
128
|
layer: o,
|
|
129
129
|
text: e.title
|
|
130
130
|
}), v = d({
|
|
131
|
-
values:
|
|
132
|
-
fieldInfoMap:
|
|
131
|
+
values: a,
|
|
132
|
+
fieldInfoMap: s,
|
|
133
133
|
globalValues: l,
|
|
134
134
|
layer: o,
|
|
135
135
|
text: e.description
|
|
@@ -140,62 +140,62 @@ class S extends b {
|
|
|
140
140
|
}} .fieldInfos=${u} .expressionInfos=${f ?? void 0}></arcgis-feature-fields>`;
|
|
141
141
|
}
|
|
142
142
|
_renderMedia(e, t) {
|
|
143
|
-
const { values: i, graphic:
|
|
143
|
+
const { values: i, graphic: a, fieldInfoMap: s, sourceLayer: o, popupTemplate: n, globalValues: l } = this, { formattedAttributes: c, relatedInfos: h, expressionAttributes: p } = this.viewModel, u = {
|
|
144
144
|
...c?.global,
|
|
145
145
|
...c?.content?.[t]
|
|
146
146
|
}, f = d({
|
|
147
147
|
values: i,
|
|
148
|
-
fieldInfoMap:
|
|
148
|
+
fieldInfoMap: s,
|
|
149
149
|
globalValues: l,
|
|
150
150
|
layer: o,
|
|
151
151
|
text: e.title
|
|
152
152
|
}), m = d({
|
|
153
153
|
values: i,
|
|
154
|
-
fieldInfoMap:
|
|
154
|
+
fieldInfoMap: s,
|
|
155
155
|
globalValues: l,
|
|
156
156
|
layer: o,
|
|
157
157
|
text: e.description
|
|
158
158
|
});
|
|
159
|
-
return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex ?? 0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${f} class="content-element" .description=${m} .values=${i} .expressionValues=${p} .layer=${o} .graphic=${
|
|
159
|
+
return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex ?? 0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${f} class="content-element" .description=${m} .values=${i} .expressionValues=${p} .layer=${o} .graphic=${a ?? void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos ?? []} .popupTemplate=${n ?? void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`;
|
|
160
160
|
}
|
|
161
161
|
_renderText(e) {
|
|
162
|
-
const { values: t, fieldInfoMap: i, sourceLayer:
|
|
162
|
+
const { values: t, fieldInfoMap: i, sourceLayer: a, globalValues: s } = this;
|
|
163
163
|
return r`<arcgis-feature-content .creator=${d({
|
|
164
164
|
values: t,
|
|
165
165
|
fieldInfoMap: i,
|
|
166
|
-
globalValues:
|
|
167
|
-
layer:
|
|
166
|
+
globalValues: s,
|
|
167
|
+
layer: a,
|
|
168
168
|
text: e.text
|
|
169
169
|
})} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
170
170
|
}
|
|
171
171
|
_renderExpression(e, t) {
|
|
172
|
-
const i = this.viewModel.formattedAttributes, { fieldInfoMap: s } = this;
|
|
173
|
-
return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .view=${this.viewModel.view ?? void 0} .graphic=${this.graphic ?? void 0} .location=${this.location ?? void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${
|
|
172
|
+
const i = this.viewModel.formattedAttributes, { fieldInfoMap: a, popupTemplate: s, sourceLayer: o } = this, n = s?.expressionInfos;
|
|
173
|
+
return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${n ?? void 0} .map=${this.map ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .view=${this.viewModel.view ?? void 0} .graphic=${this.graphic ?? void 0} .layer=${o} .location=${this.location ?? void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{
|
|
174
174
|
...i?.global,
|
|
175
175
|
...i?.content?.[t]
|
|
176
176
|
}}></arcgis-feature-expression>`;
|
|
177
177
|
}
|
|
178
178
|
_renderRelationship(e, t) {
|
|
179
|
-
const { values: i, graphic:
|
|
179
|
+
const { values: i, graphic: a, fieldInfoMap: s, sourceLayer: o, globalValues: n } = this, { displayCount: l, orderByFields: c, relationshipId: h } = e, { formattedAttributes: p, view: u } = this.viewModel, f = {
|
|
180
180
|
...p?.global,
|
|
181
181
|
...p?.content?.[t]
|
|
182
182
|
}, m = d({
|
|
183
183
|
values: i,
|
|
184
|
-
fieldInfoMap:
|
|
184
|
+
fieldInfoMap: s,
|
|
185
185
|
globalValues: n,
|
|
186
186
|
layer: o,
|
|
187
187
|
text: e.title
|
|
188
188
|
}), v = d({
|
|
189
189
|
values: i,
|
|
190
|
-
fieldInfoMap:
|
|
190
|
+
fieldInfoMap: s,
|
|
191
191
|
globalValues: n,
|
|
192
192
|
layer: o,
|
|
193
193
|
text: e.description
|
|
194
194
|
});
|
|
195
|
-
return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems ?? this.internalFlowItems} .description=${v} .layer=${o} .map=${this.map ?? void 0} .displayCount=${l} .graphic=${
|
|
195
|
+
return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems ?? this.internalFlowItems} .description=${v} .layer=${o} .map=${this.map ?? void 0} .displayCount=${l} .graphic=${a ?? void 0} .heading=${m} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c ?? void 0} .relationshipId=${h ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} use-feature-next-flow-item .values=${f} .view=${u ?? void 0}></arcgis-feature-relationship>`;
|
|
196
196
|
}
|
|
197
197
|
_renderAssociation(e) {
|
|
198
|
-
const { fieldInfoMap: t, globalValues: i, graphic:
|
|
198
|
+
const { fieldInfoMap: t, globalValues: i, graphic: a, messages: s, sourceLayer: o, values: n } = this, l = d({
|
|
199
199
|
values: n,
|
|
200
200
|
fieldInfoMap: t,
|
|
201
201
|
globalValues: i,
|
|
@@ -208,7 +208,7 @@ class S extends b {
|
|
|
208
208
|
layer: o,
|
|
209
209
|
text: e.description
|
|
210
210
|
});
|
|
211
|
-
return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems ?? this.internalFlowItems} .graphic=${
|
|
211
|
+
return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems ?? this.internalFlowItems} .graphic=${a ?? void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${o} .map=${this.map ?? void 0} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} use-feature-next-flow-item .view=${this.viewModel.view ?? void 0}></arcgis-feature-utility-network-associations>`;
|
|
212
212
|
}
|
|
213
213
|
_renderContentElement(e, t) {
|
|
214
214
|
switch (e.type) {
|
|
@@ -239,30 +239,30 @@ class S extends b {
|
|
|
239
239
|
if (Array.isArray(e) && e.length)
|
|
240
240
|
return e.length ? e.map(this._renderContentElement, this) : null;
|
|
241
241
|
if (typeof e == "string") {
|
|
242
|
-
const { values: i, fieldInfoMap:
|
|
242
|
+
const { values: i, fieldInfoMap: a, sourceLayer: s, globalValues: o } = this;
|
|
243
243
|
return r`<arcgis-feature-content .creator=${d({
|
|
244
244
|
values: i,
|
|
245
|
-
fieldInfoMap:
|
|
245
|
+
fieldInfoMap: a,
|
|
246
246
|
globalValues: o,
|
|
247
|
-
layer:
|
|
247
|
+
layer: s,
|
|
248
248
|
text: e
|
|
249
249
|
})} .graphic=${t ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
250
250
|
}
|
|
251
251
|
return e instanceof HTMLElement ? e : null;
|
|
252
252
|
}
|
|
253
253
|
_renderContentContainer() {
|
|
254
|
-
const { flowItems: e, hideContent: t, internalFlowItems: i, headingLevel:
|
|
255
|
-
return e ? c : r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${
|
|
254
|
+
const { flowItems: e, hideContent: t, internalFlowItems: i, headingLevel: a, state: s, messages: o, heading: n, hideHeading: l } = this, c = t ? null : r`<div class="main">${[this._renderContent(), this._renderLastEditInfo()]}</div>`, h = o.returnToInitialFeature ?? "";
|
|
255
|
+
return e ? c : r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s === "loading"} .headingLevel=${a} .heading=${l ? void 0 : P(n)} .selected=${!i.length}>${!l && n ? r`<div slot=heading><div .innerHTML=${A.sanitize(n ?? "") ?? ""}></div></div>` : null}${c}</calcite-flow-item>${i.toArray().map((p, u) => r`<calcite-flow-item @calciteFlowItemBack=${(f) => {
|
|
256
256
|
f.preventDefault(), this._handleDrillInBackClick();
|
|
257
|
-
}} .loading=${
|
|
257
|
+
}} .loading=${s === "loading"} .headingLevel=${a} .selected=${u === i.length - 1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h ?? _}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`;
|
|
258
258
|
}
|
|
259
259
|
_renderLastEditInfo() {
|
|
260
260
|
const { hideLastEditedInfo: e, messages: t } = this, { lastEditInfo: i } = this.viewModel;
|
|
261
261
|
if (!i || e)
|
|
262
262
|
return null;
|
|
263
|
-
const { date:
|
|
264
|
-
date:
|
|
265
|
-
user:
|
|
263
|
+
const { date: a, user: s } = i, o = i.type === "edit" ? s ? t.lastEditedByUser : t.lastEdited : s ? t.lastCreatedByUser : t.lastCreated, n = T(o ?? "", {
|
|
264
|
+
date: a,
|
|
265
|
+
user: s
|
|
266
266
|
});
|
|
267
267
|
return r`<div class=${L(M("last-edited-info", "content-element"))}>${n}</div>`;
|
|
268
268
|
}
|