@arcgis/map-components 5.1.0-next.75 → 5.1.0-next.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{KET53JUE.js → 6MK35EAT.js} +1 -1
- package/dist/cdn/{FM3AT2SL.js → AG7LUCV3.js} +1 -1
- package/dist/cdn/G7KHJU6J.js +2 -0
- package/dist/cdn/{ACAAYGKC.js → HL4M23YL.js} +1 -1
- package/dist/cdn/MNXYDKVS.js +2 -0
- package/dist/cdn/PP7ZT3L2.js +2 -0
- package/dist/cdn/QW4QGAIG.js +2 -0
- package/dist/cdn/SD7DMWPD.js +2 -0
- package/dist/cdn/{KGLUFWJ7.js → T66WG4I4.js} +1 -1
- package/dist/cdn/V2HLEYHF.js +3 -0
- package/dist/cdn/{3TVO5LIN.js → WO2BX7U2.js} +1 -1
- package/dist/cdn/XOTOQOK6.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +20 -19
- package/dist/chunks/video-utils.js +12 -0
- package/dist/components/arcgis-feature/customElement.js +75 -53
- package/dist/components/arcgis-feature-media/customElement.js +222 -211
- package/dist/components/arcgis-feature-relationship/customElement.js +69 -68
- package/dist/components/arcgis-features/customElement.d.ts +2 -2
- package/dist/components/arcgis-features/customElement.js +44 -44
- package/dist/components/arcgis-popup/customElement.d.ts +2 -2
- package/dist/components/arcgis-popup/customElement.js +105 -105
- package/dist/components/arcgis-video-player/customElement.js +22 -21
- package/dist/components/arcgis-video-player-action-bar/customElement.js +14 -17
- 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/2IXIUNGH.js +0 -2
- package/dist/cdn/CQCKW6L4.js +0 -2
- package/dist/cdn/EXZFAJW4.js +0 -3
- package/dist/cdn/GHSQJ4UC.js +0 -2
- package/dist/cdn/QPMWCCXQ.js +0 -2
- package/dist/cdn/YCM6SOEX.js +0 -2
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as $ } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { ref as
|
|
3
|
+
import { css as y, html as n } from "lit";
|
|
4
|
+
import { ref as w } 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
7
|
import { usePropertyChange as C } from "@arcgis/lumina/controllers";
|
|
8
8
|
import { m as x } 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
|
-
import {
|
|
12
|
-
import B from "
|
|
11
|
+
import { renderingSanitizer as A } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
12
|
+
import { g as R, a as D, c as V, b as k, s as d, i as E, d as B } from "../../chunks/feature-utils.js";
|
|
13
|
+
import H from "@arcgis/core/core/Collection.js";
|
|
13
14
|
import { watch as N } from "@arcgis/core/core/reactiveUtils.js";
|
|
14
15
|
import { stripHTML as P } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
15
16
|
import Z from "@arcgis/core/popup/Feature.js";
|
|
16
|
-
const
|
|
17
|
-
class
|
|
17
|
+
const z = y`: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 = x(Z);
|
|
18
|
+
class S extends b {
|
|
18
19
|
constructor() {
|
|
19
|
-
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.flowType = "feature", this.internalFlowItems = new
|
|
20
|
+
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.flowType = "feature", this.internalFlowItems = new H(), 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 = C()("flowItems", "state"), this.arcgisReady = F();
|
|
20
21
|
}
|
|
21
22
|
static {
|
|
22
23
|
this.properties = { flowType: 16, popupTemplate: 16, sourceLayer: 16, fieldInfoMap: 16, values: 16, globalValues: 16, internalFlowItems: 16, 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 };
|
|
23
24
|
}
|
|
24
25
|
static {
|
|
25
|
-
this.styles =
|
|
26
|
+
this.styles = z;
|
|
26
27
|
}
|
|
27
28
|
get popupTemplate() {
|
|
28
|
-
return
|
|
29
|
+
return R(this.graphic, this.defaultPopupTemplateEnabled) ?? void 0;
|
|
29
30
|
}
|
|
30
31
|
get sourceLayer() {
|
|
31
|
-
return
|
|
32
|
+
return D(this.graphic);
|
|
32
33
|
}
|
|
33
34
|
get fieldInfoMap() {
|
|
34
|
-
return
|
|
35
|
+
return V(k(this.popupTemplate), this.sourceLayer);
|
|
35
36
|
}
|
|
36
37
|
get values() {
|
|
37
38
|
return this.graphic?.attributes ?? {};
|
|
@@ -77,8 +78,8 @@ class z extends b {
|
|
|
77
78
|
const s = i[e];
|
|
78
79
|
if (s?.type !== "media")
|
|
79
80
|
return;
|
|
80
|
-
const a = s, { activeMediaInfoIndex: o } = a,
|
|
81
|
-
this._setContentElementMedia(a,
|
|
81
|
+
const a = s, { activeMediaInfoIndex: o } = a, r = (o ?? 0) + t;
|
|
82
|
+
this._setContentElementMedia(a, r);
|
|
82
83
|
}
|
|
83
84
|
_removeFlowItems() {
|
|
84
85
|
this.internalFlowItems?.destroyAll();
|
|
@@ -93,117 +94,124 @@ class z extends b {
|
|
|
93
94
|
this.internalFlowItems?.pop()?.destroy();
|
|
94
95
|
}
|
|
95
96
|
render() {
|
|
96
|
-
const { state: e } = this.viewModel, t =
|
|
97
|
-
return
|
|
97
|
+
const { state: e } = this.viewModel, t = n`<div class="container">${e === "error" ? this._renderError() : e === "loading" ? this._renderLoading() : this._renderContentContainer()}</div>`;
|
|
98
|
+
return n`<div class="root">${t}</div>`;
|
|
98
99
|
}
|
|
99
100
|
_renderError() {
|
|
100
101
|
const { messages: e, hideHeading: t } = this;
|
|
101
|
-
return
|
|
102
|
+
return n`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t ? null : n`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`;
|
|
102
103
|
}
|
|
103
104
|
_renderLoading() {
|
|
104
|
-
return
|
|
105
|
+
return n`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`;
|
|
105
106
|
}
|
|
106
107
|
_renderAttachments(e) {
|
|
107
|
-
const { values: t, fieldInfoMap: i, sourceLayer: s, globalValues: a } = this, o =
|
|
108
|
+
const { values: t, fieldInfoMap: i, sourceLayer: s, globalValues: a } = this, o = d({
|
|
108
109
|
values: t,
|
|
109
110
|
fieldInfoMap: i,
|
|
110
111
|
globalValues: a,
|
|
111
112
|
layer: s,
|
|
112
113
|
text: e.title
|
|
113
|
-
}),
|
|
114
|
+
}), r = d({
|
|
114
115
|
values: t,
|
|
115
116
|
fieldInfoMap: i,
|
|
116
117
|
globalValues: a,
|
|
117
118
|
layer: s,
|
|
118
119
|
text: e.description
|
|
119
120
|
});
|
|
120
|
-
return
|
|
121
|
+
return n`<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=${r} .messages=${this.messages}></arcgis-feature-attachments>`;
|
|
121
122
|
}
|
|
122
123
|
_renderCustom(e) {
|
|
123
|
-
return
|
|
124
|
+
return n`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer ?? void 0} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
124
125
|
}
|
|
125
126
|
_renderFields(e, t) {
|
|
126
|
-
const i = this.viewModel.formattedAttributes, { values: s, fieldInfoMap: a, sourceLayer: o, popupTemplate:
|
|
127
|
+
const i = this.viewModel.formattedAttributes, { values: s, fieldInfoMap: a, sourceLayer: o, popupTemplate: r, globalValues: l, graphic: c } = this, h = !!e?.fieldInfos, u = (e.fieldInfos ?? r?.fieldInfos ?? [])?.filter(({ fieldName: m }) => !!m && (E(m) || B(m) || m in s)), f = r?.expressionInfos, g = d({
|
|
127
128
|
values: s,
|
|
128
129
|
fieldInfoMap: a,
|
|
129
130
|
globalValues: l,
|
|
130
131
|
layer: o,
|
|
131
132
|
text: e.title
|
|
132
|
-
}), v =
|
|
133
|
+
}), v = d({
|
|
133
134
|
values: s,
|
|
134
135
|
fieldInfoMap: a,
|
|
135
136
|
globalValues: l,
|
|
136
137
|
layer: o,
|
|
137
138
|
text: e.description
|
|
138
139
|
});
|
|
139
|
-
return
|
|
140
|
+
return n`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${g} class="content-element" .messages=${this.messages} .graphic=${c ?? void 0} .isContentFieldInfos=${h} .layer=${o} .description=${v} .values=${{
|
|
140
141
|
...i?.global,
|
|
141
142
|
...i?.content?.[t]
|
|
142
143
|
}} .fieldInfos=${u} .expressionInfos=${f ?? void 0}></arcgis-feature-fields>`;
|
|
143
144
|
}
|
|
144
145
|
_renderMedia(e, t) {
|
|
145
|
-
const { values: i, graphic: s, fieldInfoMap: a, sourceLayer: o, popupTemplate:
|
|
146
|
-
...
|
|
147
|
-
...
|
|
148
|
-
},
|
|
146
|
+
const { values: i, graphic: s, fieldInfoMap: a, sourceLayer: o, popupTemplate: r, globalValues: l } = this, { formattedAttributes: c, relatedInfos: h, expressionAttributes: p } = this.viewModel, u = {
|
|
147
|
+
...c?.global,
|
|
148
|
+
...c?.content?.[t]
|
|
149
|
+
}, f = d({
|
|
149
150
|
values: i,
|
|
150
151
|
fieldInfoMap: a,
|
|
151
152
|
globalValues: l,
|
|
152
153
|
layer: o,
|
|
153
154
|
text: e.title
|
|
154
|
-
}),
|
|
155
|
+
}), g = d({
|
|
155
156
|
values: i,
|
|
156
157
|
fieldInfoMap: a,
|
|
157
158
|
globalValues: l,
|
|
158
159
|
layer: o,
|
|
159
160
|
text: e.description
|
|
160
161
|
});
|
|
161
|
-
return
|
|
162
|
+
return n`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex ?? 0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${f} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${o} .graphic=${s ?? void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos ?? []} .popupTemplate=${r ?? void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`;
|
|
162
163
|
}
|
|
163
164
|
_renderText(e) {
|
|
164
|
-
|
|
165
|
+
const { values: t, fieldInfoMap: i, sourceLayer: s, globalValues: a } = this;
|
|
166
|
+
return n`<arcgis-feature-content .creator=${d({
|
|
167
|
+
values: t,
|
|
168
|
+
fieldInfoMap: i,
|
|
169
|
+
globalValues: a,
|
|
170
|
+
layer: s,
|
|
171
|
+
text: e.text
|
|
172
|
+
})} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
165
173
|
}
|
|
166
174
|
_renderExpression(e, t) {
|
|
167
175
|
const i = this.viewModel.formattedAttributes, { fieldInfoMap: s } = this;
|
|
168
|
-
return
|
|
176
|
+
return n`<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=${s} .values=${{
|
|
169
177
|
...i?.global,
|
|
170
178
|
...i?.content?.[t]
|
|
171
179
|
}}></arcgis-feature-expression>`;
|
|
172
180
|
}
|
|
173
181
|
_renderRelationship(e, t) {
|
|
174
|
-
const { values: i, graphic: s, fieldInfoMap: a, sourceLayer: o, globalValues:
|
|
182
|
+
const { values: i, graphic: s, fieldInfoMap: a, sourceLayer: o, globalValues: r } = this, { displayCount: l, orderByFields: c, relationshipId: h } = e, { formattedAttributes: p, view: u } = this.viewModel, f = {
|
|
175
183
|
...p?.global,
|
|
176
184
|
...p?.content?.[t]
|
|
177
|
-
}, g =
|
|
185
|
+
}, g = d({
|
|
178
186
|
values: i,
|
|
179
187
|
fieldInfoMap: a,
|
|
180
|
-
globalValues:
|
|
188
|
+
globalValues: r,
|
|
181
189
|
layer: o,
|
|
182
190
|
text: e.title
|
|
183
|
-
}), v =
|
|
191
|
+
}), v = d({
|
|
184
192
|
values: i,
|
|
185
193
|
fieldInfoMap: a,
|
|
186
|
-
globalValues:
|
|
194
|
+
globalValues: r,
|
|
187
195
|
layer: o,
|
|
188
196
|
text: e.description
|
|
189
197
|
});
|
|
190
|
-
return
|
|
198
|
+
return n`<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=${s ?? void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c ?? void 0} .relationshipId=${h ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} .values=${f} .view=${u ?? void 0}></arcgis-feature-relationship>`;
|
|
191
199
|
}
|
|
192
200
|
_renderAssociation(e) {
|
|
193
|
-
const { fieldInfoMap: t, globalValues: i, graphic: s, messages: a, sourceLayer: o, values:
|
|
194
|
-
values:
|
|
201
|
+
const { fieldInfoMap: t, globalValues: i, graphic: s, messages: a, sourceLayer: o, values: r } = this, l = d({
|
|
202
|
+
values: r,
|
|
195
203
|
fieldInfoMap: t,
|
|
196
204
|
globalValues: i,
|
|
197
205
|
layer: o,
|
|
198
206
|
text: e.title
|
|
199
|
-
}),
|
|
200
|
-
values:
|
|
207
|
+
}), c = d({
|
|
208
|
+
values: r,
|
|
201
209
|
fieldInfoMap: t,
|
|
202
210
|
globalValues: i,
|
|
203
211
|
layer: o,
|
|
204
212
|
text: e.description
|
|
205
213
|
});
|
|
206
|
-
return
|
|
214
|
+
return n`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems ?? this.internalFlowItems} .graphic=${s ?? void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${o} .map=${this.map ?? void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} .view=${this.viewModel.view ?? void 0}></arcgis-feature-utility-network-associations>`;
|
|
207
215
|
}
|
|
208
216
|
_renderContentElement(e, t) {
|
|
209
217
|
switch (e.type) {
|
|
@@ -229,29 +237,43 @@ class z extends b {
|
|
|
229
237
|
}
|
|
230
238
|
_renderContent() {
|
|
231
239
|
const { content: e, graphic: t } = this.viewModel;
|
|
232
|
-
|
|
240
|
+
if (!e)
|
|
241
|
+
return null;
|
|
242
|
+
if (Array.isArray(e) && e.length)
|
|
243
|
+
return e.length ? e.map(this._renderContentElement, this) : null;
|
|
244
|
+
if (typeof e == "string") {
|
|
245
|
+
const { values: i, fieldInfoMap: s, sourceLayer: a, globalValues: o } = this;
|
|
246
|
+
return n`<arcgis-feature-content .creator=${d({
|
|
247
|
+
values: i,
|
|
248
|
+
fieldInfoMap: s,
|
|
249
|
+
globalValues: o,
|
|
250
|
+
layer: a,
|
|
251
|
+
text: e
|
|
252
|
+
})} .graphic=${t ?? void 0} class="content-element"></arcgis-feature-content>`;
|
|
253
|
+
}
|
|
254
|
+
return e instanceof HTMLElement ? e : null;
|
|
233
255
|
}
|
|
234
256
|
_renderContentContainer() {
|
|
235
|
-
const { hideContent: e, internalFlowItems: t, headingLevel: i, state: s, messages: a } = this;
|
|
257
|
+
const { hideContent: e, internalFlowItems: t, headingLevel: i, state: s, messages: a, heading: o, hideHeading: r } = this;
|
|
236
258
|
if (e)
|
|
237
259
|
return null;
|
|
238
|
-
const
|
|
239
|
-
return this.flowItems ?
|
|
240
|
-
|
|
241
|
-
}} .loading=${s === "loading"} .headingLevel=${i} .selected=${
|
|
260
|
+
const l = n`<div class="main">${[this._renderContent(), this._renderLastEditInfo()]}</div>`, c = a.returnToInitialFeature ?? "";
|
|
261
|
+
return this.flowItems ? l : n`<calcite-flow ${w(this._storeRootFlowNode)}><calcite-flow-item .loading=${s === "loading"} .headingLevel=${i} .heading=${this.hideHeading ? void 0 : P(this.heading)} .selected=${!t.length}>${!r && o ? n`<div slot=heading .innerHTML=${A.sanitize(o ?? "") ?? ""}></div>` : null}${l}</calcite-flow-item>${t.toArray().map((h, p) => n`<calcite-flow-item @calciteFlowItemBack=${(u) => {
|
|
262
|
+
u.preventDefault(), this._handleDrillInBackClick();
|
|
263
|
+
}} .loading=${s === "loading"} .headingLevel=${i} .selected=${p === t.length - 1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${c} title=${c ?? _}></calcite-action>${h}</calcite-flow-item>`)}</calcite-flow>`;
|
|
242
264
|
}
|
|
243
265
|
_renderLastEditInfo() {
|
|
244
266
|
const { hideLastEditedInfo: e, messages: t } = this, { lastEditInfo: i } = this.viewModel;
|
|
245
267
|
if (!i || e)
|
|
246
268
|
return null;
|
|
247
|
-
const { date: s, user: a } = i, o = i.type === "edit" ? a ? t.lastEditedByUser : t.lastEdited : a ? t.lastCreatedByUser : t.lastCreated,
|
|
269
|
+
const { date: s, user: a } = i, o = i.type === "edit" ? a ? t.lastEditedByUser : t.lastEdited : a ? t.lastCreatedByUser : t.lastCreated, r = T(o ?? "", {
|
|
248
270
|
date: s,
|
|
249
271
|
user: a
|
|
250
272
|
});
|
|
251
|
-
return
|
|
273
|
+
return n`<div class=${L(M("last-edited-info", "content-element"))}>${r}</div>`;
|
|
252
274
|
}
|
|
253
275
|
}
|
|
254
|
-
$("arcgis-feature",
|
|
276
|
+
$("arcgis-feature", S);
|
|
255
277
|
export {
|
|
256
|
-
|
|
278
|
+
S as ArcgisFeature
|
|
257
279
|
};
|