@arcgis/map-components 5.1.0-next.74 → 5.1.0-next.76

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.
Files changed (57) hide show
  1. package/dist/cdn/5CKHTWHC.js +2 -0
  2. package/dist/cdn/6D72H6LD.js +2 -0
  3. package/dist/cdn/AG7LUCV3.js +2 -0
  4. package/dist/cdn/APYGTRF2.js +2 -0
  5. package/dist/cdn/CUYGLJRU.js +2 -0
  6. package/dist/cdn/G7KHJU6J.js +2 -0
  7. package/dist/cdn/HL4M23YL.js +2 -0
  8. package/dist/cdn/MNXYDKVS.js +2 -0
  9. package/dist/cdn/PP7ZT3L2.js +2 -0
  10. package/dist/cdn/QW4QGAIG.js +2 -0
  11. package/dist/cdn/SD7DMWPD.js +2 -0
  12. package/dist/cdn/{KGLUFWJ7.js → T66WG4I4.js} +1 -1
  13. package/dist/cdn/V2HLEYHF.js +3 -0
  14. package/dist/cdn/WO2BX7U2.js +2 -0
  15. package/dist/cdn/XOTOQOK6.js +2 -0
  16. package/dist/cdn/YFXHW7I2.js +2 -0
  17. package/dist/cdn/YLKEVZLN.js +2 -0
  18. package/dist/cdn/index.js +1 -1
  19. package/dist/chunks/resources.js +35 -0
  20. package/dist/chunks/slots.js +12 -40
  21. package/dist/chunks/useArcgisViewReadyError.js +20 -19
  22. package/dist/chunks/video-utils.js +12 -0
  23. package/dist/components/arcgis-feature/customElement.js +75 -53
  24. package/dist/components/arcgis-feature-media/customElement.js +222 -211
  25. package/dist/components/arcgis-feature-relationship/customElement.js +69 -68
  26. package/dist/components/arcgis-features/customElement.d.ts +2 -2
  27. package/dist/components/arcgis-features/customElement.js +44 -44
  28. package/dist/components/arcgis-link-chart/customElement.js +2 -1
  29. package/dist/components/arcgis-map/customElement.js +7 -6
  30. package/dist/components/arcgis-popup/customElement.d.ts +2 -2
  31. package/dist/components/arcgis-presentation/customElement.js +256 -109
  32. package/dist/components/arcgis-presentation/index.js +1 -0
  33. package/dist/components/arcgis-presentation-captions/customElement.js +37 -0
  34. package/dist/components/arcgis-presentation-captions/index.js +1 -0
  35. package/dist/components/arcgis-scene/customElement.js +2 -1
  36. package/dist/components/arcgis-slider-scale-range/customElement.js +8 -8
  37. package/dist/components/arcgis-video/customElement.js +10 -9
  38. package/dist/components/arcgis-video-player/customElement.js +22 -21
  39. package/dist/components/arcgis-video-player-action-bar/customElement.js +14 -17
  40. package/dist/docs/api.json +1 -1
  41. package/dist/docs/docs.json +1 -1
  42. package/dist/docs/web-types.json +1 -1
  43. package/dist/loader.js +2 -1
  44. package/package.json +5 -5
  45. package/dist/cdn/5EAOM22D.js +0 -2
  46. package/dist/cdn/7J7GJZ35.js +0 -2
  47. package/dist/cdn/AHDX7DZE.js +0 -2
  48. package/dist/cdn/CQCKW6L4.js +0 -2
  49. package/dist/cdn/EXZFAJW4.js +0 -3
  50. package/dist/cdn/GHSQJ4UC.js +0 -2
  51. package/dist/cdn/NYCLIJ7T.js +0 -2
  52. package/dist/cdn/OPXYBLHE.js +0 -2
  53. package/dist/cdn/QPMWCCXQ.js +0 -2
  54. package/dist/cdn/UPVWARLK.js +0 -2
  55. package/dist/cdn/YCM6SOEX.js +0 -2
  56. package/dist/cdn/YCN7F3YY.js +0 -2
  57. package/dist/cdn/Z4OSJFVK.js +0 -2
@@ -1,17 +1,18 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { html as h } from "lit";
3
- import { when as r, watch as s } from "@arcgis/core/core/reactiveUtils.js";
4
- import { GenericController as u, useDirection as c, makeGenericController as l } from "@arcgis/lumina/controllers";
2
+ import { html as u } from "lit";
3
+ import { when as p, watch as s } from "@arcgis/core/core/reactiveUtils.js";
4
+ import { GenericController as h, useDirection as c, makeGenericController as a } from "@arcgis/lumina/controllers";
5
5
  import { getSlotAssignedElements as m } from "@arcgis/toolkit/dom";
6
6
  import { createRef as f } from "lit/directives/ref.js";
7
7
  import { c as E, S as d } from "./slots.js";
8
- import { createEvent as a } from "@arcgis/lumina";
9
- class _ extends u {
8
+ import { createEvent as l } from "@arcgis/lumina";
9
+ class _ extends h {
10
10
  //#endregion
11
11
  //#region Lifecycle
12
12
  constructor(t) {
13
13
  super(t), this.direction = c(), this.popupRef = f(), this.slotGroupRefs = E(), this.attributionHeight = 0, this._uiContainer = null, this.component.listen("arcgisViewClick", (o) => {
14
- this._handleOpenPopup(o.detail);
14
+ const e = o.detail.native;
15
+ o.detail.button !== 0 || e?.ctrlKey || e?.metaKey || this._handleOpenPopup(o.detail);
15
16
  }), this.component.listenOn(globalThis, "unhandledrejection", (o) => {
16
17
  const e = o.reason;
17
18
  if (e?.name === "webgl:required") {
@@ -24,11 +25,11 @@ class _ extends u {
24
25
  //#region Private Methods
25
26
  hostLifecycle() {
26
27
  return [
27
- r(() => this.component.view.ready, () => {
28
+ p(() => this.component.view.ready, () => {
28
29
  this._assignDefaultPopup();
29
30
  }),
30
31
  // Close component popup when view popup is opened
31
- r(() => this.component.view.popup?.visible, () => {
32
+ p(() => this.component.view.popup?.visible, () => {
32
33
  this.popupElement?.open && (this.popupElement.open = !1);
33
34
  })
34
35
  ];
@@ -68,7 +69,7 @@ class _ extends u {
68
69
  !this.popupElement && o.length ? this.popupElement = o[0] : o.length || (this.popupElement = void 0);
69
70
  }
70
71
  _webGLErrorAlert() {
71
- return this.webGLError ? h`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>` : null;
72
+ return this.webGLError ? u`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>` : null;
72
73
  }
73
74
  //#endregion
74
75
  //#region Rendering
@@ -76,30 +77,30 @@ class _ extends u {
76
77
  return d({ direction: this.direction, popupComponentEnabled: this.component.popupComponentEnabled, slotGroupRefs: this.slotGroupRefs, handlePopupSlotChange: (t) => this._handlePopupSlotChange(t), webGLErrorElement: this._webGLErrorAlert(), popupElement: this.popupRef });
77
78
  }
78
79
  }
79
- const v = l((p, t) => {
80
- const o = a();
80
+ const v = a((n, t) => {
81
+ const o = l();
81
82
  return t.onLifecycle(
82
83
  () => s(
83
84
  () => {
84
- const { map: e } = p;
85
+ const { map: e } = n;
85
86
  if (!e || e.destroyed)
86
87
  return [];
87
88
  const i = [];
88
- return e.loadError && i.push(e), e.basemap?.loadError && i.push(e.basemap), e.ground.loadError && i.push(e.ground), [...e.allLayers, ...e.allTables].forEach((n) => {
89
- n.loadError && i.push(n);
89
+ return e.loadError && i.push(e), e.basemap?.loadError && i.push(e.basemap), e.ground.loadError && i.push(e.ground), [...e.allLayers, ...e.allTables].forEach((r) => {
90
+ r.loadError && i.push(r);
90
91
  }), i;
91
92
  },
92
93
  (e) => {
93
- e.length && (p.loadErrorSources = e, o.emit());
94
+ e.length && (n.loadErrorSources = e, o.emit());
94
95
  }
95
96
  )
96
97
  ), o;
97
- }), G = l(
98
- (p, t) => {
99
- const o = a();
98
+ }), G = a(
99
+ (n, t) => {
100
+ const o = l();
100
101
  return t.onLifecycle(
101
102
  () => s(
102
- () => p.view?.readyState,
103
+ () => n.view?.readyState,
103
104
  (e) => {
104
105
  (e === "map-content-error" || e === "rendering-error") && o.emit();
105
106
  }
@@ -0,0 +1,12 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { formatDate as i } from "@arcgis/core/intl.js";
3
+ function e(t) {
4
+ return i(Math.round(r(t)) * 1e3, { minute: "2-digit", second: "2-digit" });
5
+ }
6
+ function r(t) {
7
+ return Number.isFinite(t) && t >= 0 ? t : 0;
8
+ }
9
+ export {
10
+ e as f,
11
+ r as n
12
+ };
@@ -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 w, html as r } from "lit";
4
- import { ref as y } from "lit/directives/ref.js";
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 { g as A, a as R, c as D, b as k, s as c, i as V, d as E } from "../../chunks/feature-utils.js";
12
- import B from "@arcgis/core/core/Collection.js";
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 H = 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 = x(Z);
17
- class z extends b {
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 B(), 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
+ 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 = H;
26
+ this.styles = z;
26
27
  }
27
28
  get popupTemplate() {
28
- return A(this.graphic, this.defaultPopupTemplateEnabled) ?? void 0;
29
+ return R(this.graphic, this.defaultPopupTemplateEnabled) ?? void 0;
29
30
  }
30
31
  get sourceLayer() {
31
- return R(this.graphic);
32
+ return D(this.graphic);
32
33
  }
33
34
  get fieldInfoMap() {
34
- return D(k(this.popupTemplate), this.sourceLayer);
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, n = (o ?? 0) + t;
81
- this._setContentElementMedia(a, n);
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 = r`<div class="container">${e === "error" ? this._renderError() : e === "loading" ? this._renderLoading() : this._renderContentContainer()}</div>`;
97
- return r`<div class="root">${t}</div>`;
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 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>`;
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 r`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`;
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 = c({
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
- }), n = c({
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 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} .messages=${this.messages}></arcgis-feature-attachments>`;
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 r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer ?? void 0} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
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: n, globalValues: l, graphic: d } = this, h = !!e?.fieldInfos, u = (e.fieldInfos ?? n?.fieldInfos ?? [])?.filter(({ fieldName: m }) => !!m && (V(m) || E(m) || m in s)), f = n?.expressionInfos, g = c({
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 = c({
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 r`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${g} class="content-element" .messages=${this.messages} .graphic=${d ?? void 0} .isContentFieldInfos=${h} .layer=${o} .description=${v} .values=${{
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: n, globalValues: l } = this, { formattedAttributes: d, relatedInfos: h } = this.viewModel, p = {
146
- ...d?.global,
147
- ...d?.content?.[t]
148
- }, u = c({
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
- }), f = c({
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 r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex ?? 0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${u} class="content-element" .description=${f} .values=${i} .layer=${o} .graphic=${s ?? void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos ?? []} .popupTemplate=${n ?? void 0} .relatedInfos=${h} .formattedValues=${p}></arcgis-feature-media>`;
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
- return r`<arcgis-feature-content .creator=${e.text} .graphic=${this.graphic ?? void 0} class="content-element"></arcgis-feature-content>`;
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 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=${s} .values=${{
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: n } = this, { displayCount: l, orderByFields: d, relationshipId: h } = e, { formattedAttributes: p, view: u } = this.viewModel, f = {
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 = c({
185
+ }, g = d({
178
186
  values: i,
179
187
  fieldInfoMap: a,
180
- globalValues: n,
188
+ globalValues: r,
181
189
  layer: o,
182
190
  text: e.title
183
- }), v = c({
191
+ }), v = d({
184
192
  values: i,
185
193
  fieldInfoMap: a,
186
- globalValues: n,
194
+ globalValues: r,
187
195
  layer: o,
188
196
  text: e.description
189
197
  });
190
- 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=${s ?? void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${d ?? 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>`;
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: n } = this, l = c({
194
- values: n,
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
- }), d = c({
200
- values: n,
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 r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${d} .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>`;
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
- return e ? Array.isArray(e) && e.length ? e.length ? e.map(this._renderContentElement, this) : null : typeof e == "string" ? r`<arcgis-feature-content .creator=${e} .graphic=${t ?? void 0} class="content-element"></arcgis-feature-content>` : e instanceof HTMLElement ? e : null : null;
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 o = r`<div class="main">${[this._renderContent(), this._renderLastEditInfo()]}</div>`, n = a.returnToInitialFeature ?? "";
239
- return this.flowItems ? o : r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s === "loading"} .headingLevel=${i} .heading=${this.hideHeading ? void 0 : P(this.heading)} .selected=${!t.length}>${o}</calcite-flow-item>${t.toArray().map((l, d) => r`<calcite-flow-item @calciteFlowItemBack=${(h) => {
240
- h.preventDefault(), this._handleDrillInBackClick();
241
- }} .loading=${s === "loading"} .headingLevel=${i} .selected=${d === t.length - 1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${n} title=${n ?? _}></calcite-action>${l}</calcite-flow-item>`)}</calcite-flow>`;
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, n = T(o ?? "", {
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 r`<div class=${L(M("last-edited-info", "content-element"))}>${n}</div>`;
273
+ return n`<div class=${L(M("last-edited-info", "content-element"))}>${r}</div>`;
252
274
  }
253
275
  }
254
- $("arcgis-feature", z);
276
+ $("arcgis-feature", S);
255
277
  export {
256
- z as ArcgisFeature
278
+ S as ArcgisFeature
257
279
  };