@arcgis/map-components 5.1.0-next.115 → 5.1.0-next.117

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 (196) hide show
  1. package/dist/cdn/G56TPBPA.js +2 -0
  2. package/dist/cdn/HSGCZH6S.js +2 -0
  3. package/dist/cdn/OPVHAXY3.js +2 -0
  4. package/dist/cdn/UANW2KLF.js +2 -0
  5. package/dist/cdn/WDIFQPYR.js +2 -0
  6. package/dist/cdn/{AP5KCMFI.js → WYDUTSDC.js} +1 -1
  7. package/dist/cdn/assets/paste/t9n/messages.ar.json +1 -1
  8. package/dist/cdn/assets/paste/t9n/messages.bg.json +1 -1
  9. package/dist/cdn/assets/paste/t9n/messages.bs.json +1 -1
  10. package/dist/cdn/assets/paste/t9n/messages.ca.json +1 -1
  11. package/dist/cdn/assets/paste/t9n/messages.cs.json +1 -1
  12. package/dist/cdn/assets/paste/t9n/messages.da.json +1 -1
  13. package/dist/cdn/assets/paste/t9n/messages.de.json +1 -1
  14. package/dist/cdn/assets/paste/t9n/messages.el.json +1 -1
  15. package/dist/cdn/assets/paste/t9n/messages.es.json +1 -1
  16. package/dist/cdn/assets/paste/t9n/messages.et.json +1 -1
  17. package/dist/cdn/assets/paste/t9n/messages.fi.json +1 -1
  18. package/dist/cdn/assets/paste/t9n/messages.fr.json +1 -1
  19. package/dist/cdn/assets/paste/t9n/messages.he.json +1 -1
  20. package/dist/cdn/assets/paste/t9n/messages.hr.json +1 -1
  21. package/dist/cdn/assets/paste/t9n/messages.hu.json +1 -1
  22. package/dist/cdn/assets/paste/t9n/messages.id.json +1 -1
  23. package/dist/cdn/assets/paste/t9n/messages.it.json +1 -1
  24. package/dist/cdn/assets/paste/t9n/messages.ja.json +1 -1
  25. package/dist/cdn/assets/paste/t9n/messages.ko.json +1 -1
  26. package/dist/cdn/assets/paste/t9n/messages.lt.json +1 -1
  27. package/dist/cdn/assets/paste/t9n/messages.lv.json +1 -1
  28. package/dist/cdn/assets/paste/t9n/messages.nl.json +1 -1
  29. package/dist/cdn/assets/paste/t9n/messages.no.json +1 -1
  30. package/dist/cdn/assets/paste/t9n/messages.pl.json +1 -1
  31. package/dist/cdn/assets/paste/t9n/messages.pt-BR.json +1 -1
  32. package/dist/cdn/assets/paste/t9n/messages.pt-PT.json +1 -1
  33. package/dist/cdn/assets/paste/t9n/messages.ro.json +1 -1
  34. package/dist/cdn/assets/paste/t9n/messages.ru.json +1 -1
  35. package/dist/cdn/assets/paste/t9n/messages.sk.json +1 -1
  36. package/dist/cdn/assets/paste/t9n/messages.sl.json +1 -1
  37. package/dist/cdn/assets/paste/t9n/messages.sr.json +1 -1
  38. package/dist/cdn/assets/paste/t9n/messages.sv.json +1 -1
  39. package/dist/cdn/assets/paste/t9n/messages.th.json +1 -1
  40. package/dist/cdn/assets/paste/t9n/messages.tr.json +1 -1
  41. package/dist/cdn/assets/paste/t9n/messages.uk.json +1 -1
  42. package/dist/cdn/assets/paste/t9n/messages.vi.json +1 -1
  43. package/dist/cdn/assets/paste/t9n/messages.zh-CN.json +1 -1
  44. package/dist/cdn/assets/paste/t9n/messages.zh-HK.json +1 -1
  45. package/dist/cdn/assets/paste/t9n/messages.zh-TW.json +1 -1
  46. package/dist/cdn/assets/print/t9n/messages.ar.json +1 -1
  47. package/dist/cdn/assets/print/t9n/messages.bg.json +1 -1
  48. package/dist/cdn/assets/print/t9n/messages.bs.json +1 -1
  49. package/dist/cdn/assets/print/t9n/messages.ca.json +1 -1
  50. package/dist/cdn/assets/print/t9n/messages.cs.json +1 -1
  51. package/dist/cdn/assets/print/t9n/messages.da.json +1 -1
  52. package/dist/cdn/assets/print/t9n/messages.de.json +1 -1
  53. package/dist/cdn/assets/print/t9n/messages.el.json +1 -1
  54. package/dist/cdn/assets/print/t9n/messages.es.json +1 -1
  55. package/dist/cdn/assets/print/t9n/messages.et.json +1 -1
  56. package/dist/cdn/assets/print/t9n/messages.fi.json +1 -1
  57. package/dist/cdn/assets/print/t9n/messages.fr.json +1 -1
  58. package/dist/cdn/assets/print/t9n/messages.he.json +1 -1
  59. package/dist/cdn/assets/print/t9n/messages.hr.json +1 -1
  60. package/dist/cdn/assets/print/t9n/messages.hu.json +1 -1
  61. package/dist/cdn/assets/print/t9n/messages.id.json +1 -1
  62. package/dist/cdn/assets/print/t9n/messages.it.json +1 -1
  63. package/dist/cdn/assets/print/t9n/messages.ja.json +1 -1
  64. package/dist/cdn/assets/print/t9n/messages.ko.json +1 -1
  65. package/dist/cdn/assets/print/t9n/messages.lt.json +1 -1
  66. package/dist/cdn/assets/print/t9n/messages.lv.json +1 -1
  67. package/dist/cdn/assets/print/t9n/messages.nl.json +1 -1
  68. package/dist/cdn/assets/print/t9n/messages.no.json +1 -1
  69. package/dist/cdn/assets/print/t9n/messages.pl.json +1 -1
  70. package/dist/cdn/assets/print/t9n/messages.pt-BR.json +1 -1
  71. package/dist/cdn/assets/print/t9n/messages.pt-PT.json +1 -1
  72. package/dist/cdn/assets/print/t9n/messages.ro.json +1 -1
  73. package/dist/cdn/assets/print/t9n/messages.ru.json +1 -1
  74. package/dist/cdn/assets/print/t9n/messages.sk.json +1 -1
  75. package/dist/cdn/assets/print/t9n/messages.sl.json +1 -1
  76. package/dist/cdn/assets/print/t9n/messages.sr.json +1 -1
  77. package/dist/cdn/assets/print/t9n/messages.sv.json +1 -1
  78. package/dist/cdn/assets/print/t9n/messages.th.json +1 -1
  79. package/dist/cdn/assets/print/t9n/messages.tr.json +1 -1
  80. package/dist/cdn/assets/print/t9n/messages.uk.json +1 -1
  81. package/dist/cdn/assets/print/t9n/messages.vi.json +1 -1
  82. package/dist/cdn/assets/print/t9n/messages.zh-CN.json +1 -1
  83. package/dist/cdn/assets/print/t9n/messages.zh-HK.json +1 -1
  84. package/dist/cdn/assets/print/t9n/messages.zh-TW.json +1 -1
  85. package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
  86. package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
  87. package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
  88. package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
  89. package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
  90. package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
  91. package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
  92. package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
  93. package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
  94. package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
  95. package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
  96. package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
  97. package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
  98. package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
  99. package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
  100. package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
  101. package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
  102. package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
  103. package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
  104. package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
  105. package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
  106. package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
  107. package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
  108. package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
  109. package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
  110. package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
  111. package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
  112. package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
  113. package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
  114. package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
  115. package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
  116. package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
  117. package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
  118. package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
  119. package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
  120. package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
  121. package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
  122. package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
  123. package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
  124. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
  125. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
  126. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
  127. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
  128. package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
  129. package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
  130. package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
  131. package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
  132. package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
  133. package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
  134. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
  135. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
  136. package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
  137. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
  138. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
  139. package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
  140. package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
  141. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
  142. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
  143. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
  144. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
  145. package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
  146. package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
  147. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
  148. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
  149. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
  150. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
  151. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
  152. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
  153. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
  154. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
  155. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
  156. package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
  157. package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
  158. package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
  159. package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
  160. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
  161. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
  162. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
  163. package/dist/cdn/index.js +1 -1
  164. package/dist/cdn/main.css +1 -1
  165. package/dist/components/arcgis-basemap-toggle/customElement.js +24 -21
  166. package/dist/components/arcgis-directions/customElement.d.ts +18 -4
  167. package/dist/components/arcgis-feature/customElement.d.ts +4 -6
  168. package/dist/components/arcgis-feature-table/customElement.d.ts +27 -6
  169. package/dist/components/arcgis-features/customElement.d.ts +10 -1
  170. package/dist/components/arcgis-features/customElement.js +35 -34
  171. package/dist/components/arcgis-map/customElement.d.ts +3 -3
  172. package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +20 -2
  173. package/dist/components/arcgis-popup/customElement.js +44 -35
  174. package/dist/components/arcgis-scene/customElement.d.ts +3 -3
  175. package/dist/components/arcgis-value-picker/customElement.d.ts +10 -0
  176. package/dist/components/arcgis-video/customElement.d.ts +2 -0
  177. package/dist/components/arcgis-video/customElement.js +6 -6
  178. package/dist/components/arcgis-view-popover/customElement.d.ts +94 -0
  179. package/dist/components/arcgis-view-popover/customElement.js +128 -0
  180. package/dist/components/arcgis-view-popover/index.d.ts +1 -0
  181. package/dist/components/arcgis-view-popover/index.js +2 -0
  182. package/dist/docs/api.json +1 -1
  183. package/dist/docs/docs.json +1 -1
  184. package/dist/docs/vscode.html-custom-data.json +1 -1
  185. package/dist/docs/web-types.json +1 -1
  186. package/dist/index.d.ts +10 -0
  187. package/dist/loader.js +2 -1
  188. package/dist/types/lumina.d.ts +7 -1
  189. package/dist/types/preact.d.ts +8 -1
  190. package/dist/types/react.d.ts +9 -1
  191. package/dist/types/stencil.d.ts +7 -1
  192. package/package.json +5 -5
  193. package/dist/cdn/4SNOTPCF.js +0 -2
  194. package/dist/cdn/AAS5G7SF.js +0 -2
  195. package/dist/cdn/DFUIUXWM.js +0 -2
  196. package/dist/cdn/LS5CW2BE.js +0 -2
@@ -3,8 +3,8 @@ import { c as A } from "../../chunks/runtime.js";
3
3
  import { css as E, html as w } from "lit";
4
4
  import P from "@arcgis/core/popup/Features.js";
5
5
  import { u as F } from "../../chunks/useT9n.js";
6
- import { useDirection as $, usePropertyChange as N } from "@arcgis/lumina/controllers";
7
- import { m as O } from "../../chunks/useViewModel.js";
6
+ import { useDirection as O, usePropertyChange as N } from "@arcgis/lumina/controllers";
7
+ import { m as $ } from "../../chunks/useViewModel.js";
8
8
  import { LitElement as L, createEvent as _, safeStyleMap as S, safeClassMap as y } from "@arcgis/lumina";
9
9
  import { stripHTML as T } from "@arcgis/core/applications/Components/stringUtils.js";
10
10
  import { classes as x } from "@arcgis/toolkit/dom";
@@ -17,7 +17,7 @@ const B = E`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--
17
17
  function f(b) {
18
18
  return b && Number.parseInt(b.replaceAll(/[^-\d.]/gu, ""), 10) || 0;
19
19
  }
20
- const I = O(P), C = {
20
+ const I = $(P), C = {
21
21
  buttonEnabled: !0,
22
22
  position: "auto",
23
23
  breakpoint: {
@@ -26,7 +26,7 @@ const I = O(P), C = {
26
26
  };
27
27
  class j extends L {
28
28
  constructor() {
29
- super(...arguments), this._direction = $(), this._featuresComponent = g(), this._dockAction = new V({ id: "popup-dock-action" }), this._mainContainerNode = g(), this._pointerNode = g(), this.messages = F(), this.viewModel = I(this), this._containerNode = g(), this._popupResizeObserver = new ResizeObserver(() => this._positionContainer()), this._positionContainer = () => {
29
+ super(...arguments), this._direction = O(), this._featuresComponent = g(), this._dockAction = new V({ id: "popup-dock-action" }), this._mainContainerNode = g(), this._pointerNode = g(), this.messages = F(), this.viewModel = I(this), this._containerNode = g(), this._popupResizeObserver = new ResizeObserver(() => this._positionContainer()), this._positionContainer = () => {
30
30
  this.positionStyle = this._calculatePositionStyle();
31
31
  }, this.screenLocation = H(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.alignment = "auto", this.autoCloseEnabled = !1, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.dockEnabled = !1, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.features = this.viewModel.features, this.goToOverride = this.viewModel.goToOverride, this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideCollapseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSpinner = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.open = this.viewModel.open, this.promises = this.viewModel.promises, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.state = this.viewModel.state, this.topLayerDisabled = !1, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = N()("active", "collapsed", "currentAlignment", "dockEnabled", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = _(), this.arcgisClose = _(), this.arcgisTriggerAction = _();
32
32
  }
@@ -55,8 +55,8 @@ class j extends L {
55
55
  set dockOptions(t) {
56
56
  const e = { ...C }, o = this.viewModel?.view?.breakpoints, i = {};
57
57
  o && (i.width = o.xsmall, i.height = o.xsmall);
58
- const r = { ...e, ...t }, n = { ...e.breakpoint, ...i }, { breakpoint: a } = r;
59
- typeof a == "object" ? r.breakpoint = { ...n, ...a } : a && (r.breakpoint = n), this._dockOptions = r;
58
+ const s = { ...e, ...t }, n = { ...e.breakpoint, ...i }, { breakpoint: a } = s;
59
+ typeof a == "object" ? s.breakpoint = { ...n, ...a } : a && (s.breakpoint = n), this._dockOptions = s;
60
60
  }
61
61
  get selectedDrillInFeature() {
62
62
  return this._featuresComponent.value?.selectedDrillInFeature ?? null;
@@ -88,6 +88,9 @@ class j extends L {
88
88
  async triggerAction(t) {
89
89
  return await this._featuresComponent.value?.triggerAction(t);
90
90
  }
91
+ connectedCallback() {
92
+ super.connectedCallback(), this._syncPopupResizeObserver();
93
+ }
91
94
  loaded() {
92
95
  this.manager.onLifecycle(() => [
93
96
  p(() => [this.viewModel?.view?.widthBreakpoint, this.dockEnabled, this._direction], () => this._handleDockIcon(), { initial: !0 }),
@@ -108,7 +111,7 @@ class j extends L {
108
111
  this.viewModel?.view?.size
109
112
  ], () => this._positionContainer(), { initial: !0 }),
110
113
  p(() => this._mainContainerNode.value, (t) => {
111
- this._popupResizeObserver.disconnect(), t && this._popupResizeObserver.observe(t);
114
+ this._syncPopupResizeObserver(t);
112
115
  }, { initial: !0 }),
113
116
  p(() => this.viewModel?.view?.size, (t, e) => this._updateDockEnabledForViewSize(t, e)),
114
117
  p(() => this.viewModel?.view?.ready, () => this._setDockEnabledForViewSize(this.dockOptions), { initial: !0 }),
@@ -119,9 +122,15 @@ class j extends L {
119
122
  p(() => [this.active, this._containerNode.value, this.dockEnabled, this.topLayerDisabled], () => this._togglePopover(), { initial: !0 })
120
123
  ]);
121
124
  }
125
+ disconnectedCallback() {
126
+ super.disconnectedCallback(), this._popupResizeObserver.disconnect();
127
+ }
122
128
  _togglePopover() {
123
129
  this._containerNode.value?.togglePopover(this.active && !this.dockEnabled && !this.topLayerDisabled);
124
130
  }
131
+ _syncPopupResizeObserver(t = this._mainContainerNode.value) {
132
+ this._popupResizeObserver.disconnect(), t && this._popupResizeObserver.observe(t);
133
+ }
125
134
  _handleClose(t) {
126
135
  t.stopPropagation(), this.arcgisClose.emit();
127
136
  }
@@ -135,8 +144,8 @@ class j extends L {
135
144
  t.stopPropagation(), t.detail.action === this._dockAction && (this.dockEnabled = !this.dockEnabled), this.arcgisTriggerAction.emit({ action: t.detail.action });
136
145
  }
137
146
  _isOutsideView(t) {
138
- const { popupHeight: e, popupWidth: o, screenLocation: i, side: r, view: n } = t;
139
- return Number.isNaN(o) || Number.isNaN(e) || !n || !i ? !1 : r === "right" && i.x + o / 2 > n.width || r === "left" && i.x - o / 2 < 0 || r === "top" && i.y - e < 0 || r === "bottom" && i.y + e > n.height;
147
+ const { popupHeight: e, popupWidth: o, screenLocation: i, side: s, view: n } = t;
148
+ return Number.isNaN(o) || Number.isNaN(e) || !n || !i ? !1 : s === "right" && i.x + o / 2 > n.width || s === "left" && i.x - o / 2 < 0 || s === "top" && i.y - e < 0 || s === "bottom" && i.y + e > n.height;
140
149
  }
141
150
  _getPointerSize() {
142
151
  const { _pointerNode: t } = this, e = t.value ? window.getComputedStyle(t.value) : null, o = f(e?.height), i = f(e?.width);
@@ -145,35 +154,35 @@ class j extends L {
145
154
  _calculateAutoAlignment(t) {
146
155
  if (t !== "auto")
147
156
  return t;
148
- const { _mainContainerNode: e, _popupRect: o, viewModel: i } = this, { view: r } = i, { screenLocation: n } = this;
149
- if (n == null || !r || !o || !e.value)
157
+ const { _mainContainerNode: e, _popupRect: o, viewModel: i } = this, { view: s } = i, { screenLocation: n } = this;
158
+ if (n == null || !s || !o || !e.value)
150
159
  return "top-center";
151
- const a = window.getComputedStyle(e.value), l = f(a.maxHeight), s = f(a.height), c = this._getPointerSize(), { height: d, width: k } = o, h = k + c, u = Math.max(d, l, s) + c, M = this._isOutsideView({
160
+ const a = window.getComputedStyle(e.value), l = f(a.maxHeight), r = f(a.height), c = this._getPointerSize(), { height: d, width: k } = o, h = k + c, u = Math.max(d, l, r) + c, z = this._isOutsideView({
152
161
  popupHeight: u,
153
162
  popupWidth: h,
154
163
  screenLocation: n,
155
164
  side: "right",
156
- view: r
157
- }), D = this._isOutsideView({
165
+ view: s
166
+ }), M = this._isOutsideView({
158
167
  popupHeight: u,
159
168
  popupWidth: h,
160
169
  screenLocation: n,
161
170
  side: "left",
162
- view: r
171
+ view: s
163
172
  }), v = this._isOutsideView({
164
173
  popupHeight: u,
165
174
  popupWidth: h,
166
175
  screenLocation: n,
167
176
  side: "top",
168
- view: r
169
- }), z = this._isOutsideView({
177
+ view: s
178
+ }), D = this._isOutsideView({
170
179
  popupHeight: u,
171
180
  popupWidth: h,
172
181
  screenLocation: n,
173
182
  side: "bottom",
174
- view: r
183
+ view: s
175
184
  });
176
- return D ? v ? "bottom-right" : "top-right" : M ? v ? "bottom-left" : "top-left" : v ? z ? "top-center" : "bottom-center" : "top-center";
185
+ return M ? v ? "bottom-right" : "top-right" : z ? v ? "bottom-left" : "top-left" : v ? D ? "top-center" : "bottom-center" : "top-center";
177
186
  }
178
187
  _callCurrentAlignment(t) {
179
188
  return typeof t == "function" ? t.call(this) : t;
@@ -230,33 +239,33 @@ class j extends L {
230
239
  _calculateAlignmentPosition(t, e, o, i) {
231
240
  if (t < 0 || e < 0 || !o || !i || t > o.width || e > o.height)
232
241
  return;
233
- const { topLayerDisabled: r } = this, n = r ? t : t + o.x, a = r ? e : e + o.y, { _direction: l, currentAlignment: s } = this, c = this._getPointerSize(), d = c / 2;
234
- if (s === "top-left" || s === "top-start" && l === "ltr" || s === "top-end" && l === "rtl")
242
+ const { topLayerDisabled: s } = this, n = s ? t : t + o.x, a = s ? e : e + o.y, { _direction: l, currentAlignment: r } = this, c = this._getPointerSize(), d = c / 2;
243
+ if (r === "top-left" || r === "top-start" && l === "ltr" || r === "top-end" && l === "rtl")
235
244
  return {
236
245
  top: a - (i.height + d),
237
246
  left: n - i.width - d
238
247
  };
239
- if (s === "top-center")
248
+ if (r === "top-center")
240
249
  return {
241
250
  top: a - (i.height + c),
242
251
  left: n - i.width / 2
243
252
  };
244
- if (s === "top-right" || s === "top-end" && l === "ltr" || s === "top-start" && l === "rtl")
253
+ if (r === "top-right" || r === "top-end" && l === "ltr" || r === "top-start" && l === "rtl")
245
254
  return {
246
255
  top: a - (i.height + d),
247
256
  left: n + d
248
257
  };
249
- if (s === "bottom-left" || s === "bottom-start" && l === "ltr" || s === "bottom-end" && l === "rtl")
258
+ if (r === "bottom-left" || r === "bottom-start" && l === "ltr" || r === "bottom-end" && l === "rtl")
250
259
  return {
251
260
  top: a + d,
252
261
  left: n - i.width - d
253
262
  };
254
- if (s === "bottom-center")
263
+ if (r === "bottom-center")
255
264
  return {
256
265
  top: a + c,
257
266
  left: n - i.width / 2
258
267
  };
259
- if (s === "bottom-right" || s === "bottom-end" && l === "ltr" || s === "bottom-start" && l === "rtl")
268
+ if (r === "bottom-right" || r === "bottom-end" && l === "ltr" || r === "bottom-start" && l === "rtl")
260
269
  return {
261
270
  top: a + d,
262
271
  left: n + d
@@ -278,8 +287,8 @@ class j extends L {
278
287
  return `inset: ${this._getPositionStyleValue(i.top)} ${this._getPositionStyleValue(i.right)} ${this._getPositionStyleValue(i.bottom)} ${this._getPositionStyleValue(i.left)};`;
279
288
  }
280
289
  _dockingThresholdCrossed(t, e, o) {
281
- const [i, r] = t, [n, a] = e, { width: l = 0, height: s = 0 } = o ?? {};
282
- return i <= l && n > l || i > l && n <= l || r <= s && a > s || r > s && a <= s;
290
+ const [i, s] = t, [n, a] = e, { width: l = 0, height: r = 0 } = o ?? {};
291
+ return i <= l && n > l || i > l && n <= l || s <= r && a > r || s > r && a <= r;
283
292
  }
284
293
  _updateDockEnabledForViewSize(t, e) {
285
294
  if (!t || !e || !this.viewModel?.view?.ready)
@@ -291,17 +300,17 @@ class j extends L {
291
300
  const e = t.breakpoint, o = this.viewModel?.view?.ui;
292
301
  if (!o)
293
302
  return !1;
294
- const { width: i, height: r } = o;
295
- if (Number.isNaN(i) || Number.isNaN(r) || typeof e != "object")
303
+ const { width: i, height: s } = o;
304
+ if (Number.isNaN(i) || Number.isNaN(s) || typeof e != "object")
296
305
  return !1;
297
- const n = typeof e.width == "number" && i <= (e.width ?? 0), a = typeof e.height == "number" && r <= (e.height ?? 0);
306
+ const n = typeof e.width == "number" && i <= (e.width ?? 0), a = typeof e.height == "number" && s <= (e.height ?? 0);
298
307
  return n || a;
299
308
  }
300
309
  _setDockEnabledForViewSize(t) {
301
310
  this.viewModel?.view?.ready && typeof t.breakpoint == "object" && (this.dockEnabled = this._shouldDockAtCurrentViewSize(t));
302
311
  }
303
312
  render() {
304
- const { _direction: t, dockEnabled: e, currentAlignment: o, currentDockPosition: i, positionStyle: r } = this, { active: n, view: a } = this.viewModel, l = n && e, s = n && !e, c = a?.widthBreakpoint, d = a?.heightBreakpoint, k = {
313
+ const { _direction: t, dockEnabled: e, currentAlignment: o, currentDockPosition: i, positionStyle: s } = this, { active: n, view: a } = this.viewModel, l = n && e, r = n && !e, c = a?.widthBreakpoint, d = a?.heightBreakpoint, k = {
305
314
  "aligned-top-center": o === "top-center",
306
315
  "aligned-bottom-center": o === "bottom-center",
307
316
  "aligned-top-left": o === "top-left" || o === "top-start" && t === "ltr" || o === "top-end" && t === "rtl",
@@ -309,7 +318,7 @@ class j extends L {
309
318
  "aligned-top-right": o === "top-right" || o === "top-end" && t === "ltr" || o === "top-start" && t === "rtl",
310
319
  "aligned-bottom-right": o === "bottom-right" || o === "bottom-end" && t === "ltr" || o === "bottom-start" && t === "rtl",
311
320
  "is-docked": l,
312
- shadow: s,
321
+ shadow: r,
313
322
  "is-rtl": this._direction === "rtl",
314
323
  "is-docked-top-start": i === "top-start",
315
324
  "is-docked-top-end": i === "top-end",
@@ -332,8 +341,8 @@ class j extends L {
332
341
  "is-sm-height-breakpoint": d === "small",
333
342
  "is-xs-height-breakpoint": d === "xsmall"
334
343
  };
335
- return w`<div style=${S(r)} class=${y(x("root", k, {
336
- hidden: !n || !r && !e
344
+ return w`<div style=${S(s)} class=${y(x("root", k, {
345
+ hidden: !n || !s && !e
337
346
  }))} .ariaHidden=${!n} .ariaLabel=${T(this.heading ?? "")} role=dialog popover=manual ${m(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`;
338
347
  }
339
348
  _renderPointer() {
@@ -36,7 +36,7 @@ import type { AnalysisView3DFor } from "@arcgis/core/views/3d/analysis/types.js"
36
36
  import type { LayerView3DFor } from "@arcgis/core/views/3d/types.js";
37
37
  import type { DoubleTapDragEvent, VerticalTwoFingerDragEvent, PointerUpEvent, PointerMoveEvent, PointerLeaveEvent, PointerEnterEvent, PointerDownEvent, ViewMouseWheelEvent, LayerViewDestroyEvent, LayerViewCreateErrorEvent, LayerViewCreateEvent, KeyUpEvent, KeyDownEvent, ImmediateDoubleClickEvent, ImmediateClickEvent, HoldEvent, DragEvent, DoubleClickEvent, ClickEvent } from "@arcgis/core/views/input/types.js";
38
38
  import type { AnalysisViewDestroyEvent, AnalysisViewCreateErrorEvent, AnalysisViewCreateEvent, HitTestOptions3D, Screenshot, UserSettings, SceneViewHitTestResult, GoToOptions3D, GoToTarget3D } from "@arcgis/core/views/types.js";
39
- import type { ScreenPoint } from "@arcgis/core/core/types.js";
39
+ import type { ScreenPoint, ScreenRect } from "@arcgis/core/core/types.js";
40
40
  import type { ViewPopupOpenOptions } from "@arcgis/core/views/PopupView.js";
41
41
  import type { ReadonlyCollection } from "@arcgis/core/core/Collection.js";
42
42
  import type { ViewPadding } from "@arcgis/core/views/ui/types.js";
@@ -924,10 +924,10 @@ export abstract class ArcgisScene extends LitElement {
924
924
  *
925
925
  * [Read more](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest)
926
926
  *
927
- * @param screenPoint
927
+ * @param hitTarget
928
928
  * @param options
929
929
  */
930
- hitTest(screenPoint: MouseEvent | ScreenPoint, options?: HitTestOptions3D): Promise<SceneViewHitTestResult>;
930
+ hitTest(hitTarget: MouseEvent | ScreenPoint | ScreenRect, options?: HitTestOptions3D): Promise<SceneViewHitTestResult>;
931
931
  /**
932
932
  * Opens the popup based on input options.
933
933
  *
@@ -19,6 +19,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
19
19
  *
20
20
  * #### Configuring Value Picker without slotted components
21
21
  *
22
+ * ![value-picker-nodata](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-nodata.avif)
23
+ *
22
24
  * ```html
23
25
  * <arcgis-map itemId="462c629e8e604c15baf45627c4f337d6">
24
26
  * <arcgis-value-picker slot="top-right"></arcgis-value-picker>
@@ -67,6 +69,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
67
69
  * Consider using the [arcgis-value-picker-label](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-value-picker-label/) component to step through a small, fixed list of predefined values. This component provides a strict
68
70
  * interface that steps back and forth, so it's a good option for temporal data, or data that shows progression dependent on the element's position in the list.
69
71
  *
72
+ * ![value-picker-label](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-label.avif)
73
+ *
70
74
  * ```js
71
75
  * const mapElement = document.querySelector("arcgis-map");
72
76
  * const valuePickerLabel = document.querySelector("arcgis-value-picker-label");
@@ -103,6 +107,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
103
107
  * that can be represented along a fixed numeric range. This is a good option for sets of elements spaced along an interval, or mutating
104
108
  * a continuous parameter such as layer opacity.
105
109
  *
110
+ * ![value-picker-slider](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-slider.avif)
111
+ *
106
112
  * ```js
107
113
  * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
108
114
  *
@@ -131,6 +137,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
131
137
  * Consider using the [arcgis-value-picker-combobox](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-value-picker-combobox/) component to step through a longer list of items that cannot be clicked through
132
138
  * one by one. The combobox component allows the user to open the list as a dropdown and make a selection, or narrow the size of the list by searching for an element or keyword.
133
139
  *
140
+ * ![value-picker-combobox](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-combobox.avif)
141
+ *
134
142
  * ```js
135
143
  * const valuePickerCombobox = document.querySelector("arcgis-value-picker-combobox");
136
144
  *
@@ -163,6 +171,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
163
171
  * Consider using the [arcgis-value-picker-collection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-value-picker-collection/) component when a visual representation for the dataset is not necessary.
164
172
  * This is also a good option for datasets already in the form of a [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
165
173
  *
174
+ * ![value-picker-collection](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-collection.avif)
175
+ *
166
176
  * ```js
167
177
  * const Collection = (await import("@arcgis/core/core/Collection.js")).default;
168
178
  *
@@ -70,6 +70,8 @@ export abstract class ArcgisVideo extends LitElement {
70
70
  accessor layer: VideoLayer | null | undefined;
71
71
  /** A reference to the associated [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) or [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/). */
72
72
  accessor map: Map | WebMap | null | undefined;
73
+ /** @default false */
74
+ accessor operationalDataVisible: boolean;
73
75
  /**
74
76
  * When `true`, this property indicates whether the view successfully satisfied all dependencies,
75
77
  * signaling that the following conditions are met.
@@ -6,8 +6,8 @@ import { watch as e } from "@arcgis/core/core/reactiveUtils.js";
6
6
  import l from "@arcgis/core/views/VideoView.js";
7
7
  import { LitElement as c, createEvent as m, safeClassMap as d } from "@arcgis/lumina";
8
8
  import { makeAccessorController as f } from "@arcgis/lumina/controllers/accessor";
9
- import { createRef as s, ref as r } from "lit/directives/ref.js";
10
- import { C as a } from "../../chunks/resources.js";
9
+ import { createRef as s, ref as a } from "lit/directives/ref.js";
10
+ import { C as r } from "../../chunks/resources.js";
11
11
  import { c as p, s as y, S as w } from "../../chunks/slots.js";
12
12
  import { s as v } from "../../chunks/esri-main.js";
13
13
  const u = h`:host{width:100%;height:100%}`, R = f(l, {
@@ -15,10 +15,10 @@ const u = h`:host{width:100%;height:100%}`, R = f(l, {
15
15
  });
16
16
  class g extends c {
17
17
  constructor() {
18
- super(), this._containerRef = s(), this._direction = n(), this._mapRef = s(), this._slotGroupRefs = p(), this.autoDestroyDisabled = !1, this.view = R(this), this.attributionMode = this.view.attributionMode, this.ready = this.view.ready, this.layer = this.view.layer, this.map = this.view.map, this.arcgisViewReadyChange = m();
18
+ super(), this._containerRef = s(), this._direction = n(), this._mapRef = s(), this._slotGroupRefs = p(), this.autoDestroyDisabled = !1, this.operationalDataVisible = !1, this.view = R(this), this.attributionMode = this.view.attributionMode, this.ready = this.view.ready, this.layer = this.view.layer, this.map = this.view.map, this.arcgisViewReadyChange = m();
19
19
  }
20
20
  static {
21
- this.properties = { autoDestroyDisabled: 5, view: 32, aria: 0, attributionMode: 1, ready: 36, layer: 0, map: 0 };
21
+ this.properties = { autoDestroyDisabled: 5, operationalDataVisible: 5, view: 32, aria: 0, attributionMode: 1, ready: 36, layer: 0, map: 0 };
22
22
  }
23
23
  static {
24
24
  this.styles = [v, y, u];
@@ -44,10 +44,10 @@ class g extends c {
44
44
  ]);
45
45
  }
46
46
  renderMain() {
47
- return t`<div class=${`root ${a.base}`} ${r(this._mapRef)}></div>`;
47
+ return t`<div class=${`root ${r.base}`} ${a(this._mapRef)}></div>`;
48
48
  }
49
49
  render() {
50
- return t`${this.renderMain()}<section class=${d(a.containerUI)} ${r(this._containerRef)}>${w({ direction: this._direction, slotGroupRefs: this._slotGroupRefs })}</section>`;
50
+ return t`${this.renderMain()}<section class=${d(r.containerUI)} ${a(this._containerRef)}>${w({ direction: this._direction, slotGroupRefs: this._slotGroupRefs })}</section>`;
51
51
  }
52
52
  }
53
53
  o("arcgis-video", g);
@@ -0,0 +1,94 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type MapView from "@arcgis/core/views/MapView.js";
3
+ import type SceneView from "@arcgis/core/views/SceneView.js";
4
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
5
+ import type { ActionBar as ActionBar } from "@esri/calcite-components/components/calcite-action-bar";
6
+ import type { Button as Button } from "@esri/calcite-components/components/calcite-button";
7
+
8
+ /**
9
+ * The View Popover component provides view-aware placement and sizing for popovers anchored to actions inside
10
+ * a map or scene view. This component is critical to enabling a great user experience with popovers
11
+ * when the exact placement and content of the popover is highly variable.
12
+ *
13
+ * This component was originally added to support arcgis-sketch, which can be placed in all corners
14
+ * of the view, in multiple orientations, and with highly configurable settings contents.
15
+ *
16
+ * Because layer lists and grid controls are included in the settings popover, it is very common for
17
+ * the popover to overflow the view. It is equally common for the settings popover to be quite compact.
18
+ *
19
+ * Provide the popover content through the default slot and assign a [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-view-popover/#view),
20
+ * [anchorElement](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-view-popover/#anchorElement), and [actionBarElement](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-view-popover/#actionBarElement)
21
+ * to enable automatic positioning within the view.
22
+ *
23
+ * @since 5.1
24
+ * @internal
25
+ */
26
+ export abstract class ArcgisViewPopover extends LitElement {
27
+ /** The calcite action bar that owns the anchor action; must be set for correct layout. */
28
+ accessor actionBarElement: ActionBar | undefined;
29
+ get actionBarLayout(): ActionBarLayout;
30
+ /** The action element that anchors the popover. */
31
+ accessor anchorElement: HTMLElement | undefined;
32
+ /**
33
+ * Indicates whether the popover includes a close action in the header.
34
+ *
35
+ * @default true
36
+ */
37
+ accessor closable: boolean;
38
+ /** The popover heading. */
39
+ accessor heading: string | undefined;
40
+ /** Accessible label for the popover. */
41
+ accessor label: string | undefined;
42
+ /**
43
+ * Maximum content width, in pixels, applied to the slotted popover content.
44
+ *
45
+ * @default 400
46
+ */
47
+ accessor maxContentWidth: number;
48
+ /**
49
+ * Minimum content width, in pixels, applied to the slotted popover content.
50
+ *
51
+ * @default 300
52
+ */
53
+ accessor minContentWidth: number;
54
+ /**
55
+ * Indicates whether the popover is open.
56
+ *
57
+ * Listen for [@arcgisPropertyChange](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-view-popover/#event-arcgisPropertyChange) to react to user-driven close actions.
58
+ *
59
+ * @default false
60
+ */
61
+ accessor open: boolean;
62
+ /**
63
+ * Controls whether the popover appears attached to the action itself or to the containing action bar.
64
+ *
65
+ * @default "bar"
66
+ */
67
+ accessor tailAttachmentAppearance: TailAttachmentAppearance;
68
+ /** The view that constrains popover placement and sizing. */
69
+ accessor view: MapView | SceneView | undefined;
70
+ /**
71
+ * Minimum inset, in pixels, between the popover and the edges of the view.
72
+ * The bottom edge will be relative to the attribution bar, if it is visible.
73
+ *
74
+ * @default 16
75
+ */
76
+ accessor viewEdgeMargin: number;
77
+ /**
78
+ * Visual scale for the popover; this applies only to the header and close button.
79
+ *
80
+ * @default "m"
81
+ */
82
+ accessor visualScale: Button["scale"];
83
+ /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
84
+ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "open"; }>;
85
+ readonly "@eventTypes": {
86
+ arcgisPropertyChange: ArcgisViewPopover["arcgisPropertyChange"]["detail"];
87
+ };
88
+ }
89
+
90
+ /** @internal */
91
+ export type ActionBarLayout = "horizontal" | "vertical";
92
+
93
+ /** @internal */
94
+ export type TailAttachmentAppearance = "action" | "bar";
@@ -0,0 +1,128 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { c as u } from "../../chunks/runtime.js";
3
+ import { LitElement as _, safeStyleMap as w } from "@arcgis/lumina";
4
+ import { css as M, html as b } from "lit";
5
+ import { usePropertyChange as E } from "@arcgis/lumina/controllers";
6
+ const R = M`:host{display:block;pointer-events:initial}calcite-popover{pointer-events:initial}.content{min-inline-size:min(calc(100cqw - var(--arcgis-view-popover-width-reserve, 32px)),var(--arcgis-view-popover-min-inline-size, 300px));max-inline-size:min(calc(100cqw - var(--arcgis-view-popover-width-reserve, 32px)),var(--arcgis-view-popover-max-inline-size, 400px));max-height:var( --arcgis-view-popover-content-max-height, calc(100cqh - var(--arcgis-view-popover-height-reserve, 77px)) );-webkit-user-select:none;user-select:none;overflow-y:auto}`, l = 6, z = 2, S = 32, x = 77, y = 0;
7
+ function O(t) {
8
+ const e = B(t), i = t.actionBarLayout === "vertical" ? 0 : e;
9
+ return {
10
+ effectiveTailOffset: e,
11
+ horizontalMargin: A(t),
12
+ verticalMargin: k(t) + i + t.headerRect.height,
13
+ offsetSkidding: P(t),
14
+ placement: C(t)
15
+ };
16
+ }
17
+ function B({ actionBarLayout: t, actionRect: e, barRect: i, tailAttachmentAppearance: a }) {
18
+ const r = a === "bar" ? t === "vertical" ? Math.max(0, e.left - i.left) : Math.max(0, e.top - i.top) : 0;
19
+ return l + r;
20
+ }
21
+ function A({ actionBarLayout: t, barRect: { left: e, right: i }, actionRect: { left: a }, tailAttachmentAppearance: r, viewEdgeMargin: n }) {
22
+ const o = n * 2;
23
+ if (t === "vertical") {
24
+ const h = i - e, v = r === "action" ? -(a - e - l) : l;
25
+ return o + h + v;
26
+ }
27
+ return o;
28
+ }
29
+ function P(t) {
30
+ return t.actionBarLayout === "vertical" || f(t) === "left" ? t.viewEdgeMargin : -t.viewEdgeMargin;
31
+ }
32
+ function C(t) {
33
+ const { actionBarLayout: e, actionRect: i, viewRect: a } = t, r = f(t);
34
+ if (e === "vertical")
35
+ return r === "left" ? "right-end" : "left-end";
36
+ const n = i.bottom - a.top < a.height / 2 ? "bottom" : "top";
37
+ return r === "left" ? `${n}-end` : `${n}-start`;
38
+ }
39
+ function f({ barRect: { left: t, right: e }, viewRect: { left: i, right: a } }) {
40
+ return t - i < a - e ? "left" : "right";
41
+ }
42
+ function $({ actionRect: t, viewRect: e }) {
43
+ return t.top - e.top > e.height / 2 ? "bottom" : "top";
44
+ }
45
+ function k(t) {
46
+ const { actionBarLayout: e, actionRect: i, attributionHeight: a, viewEdgeMargin: r, viewRect: n } = t, o = $(t), h = i.bottom - n.top, v = i.top - n.top, g = o === "top" ? h : r, d = r, p = a + r, m = o === "top" ? p : n.height - v;
47
+ return (e === "vertical" ? d + p : g + m) + z;
48
+ }
49
+ function s() {
50
+ return new DOMRect(0, 0, 0, 0);
51
+ }
52
+ function c(t) {
53
+ return t?.getBoundingClientRect() ?? s();
54
+ }
55
+ class T extends _ {
56
+ constructor() {
57
+ super(...arguments), this._handlePopoverBeforeOpen = (e) => {
58
+ if (e.target !== e.currentTarget)
59
+ return;
60
+ const i = e.currentTarget;
61
+ this._headerElement = i.shadowRoot?.querySelector(".header") ?? void 0, this._observeMeasurementElements(), this._remeasureAndSolve();
62
+ }, this._handlePopoverClose = (e) => {
63
+ e.target === e.currentTarget && (e.preventDefault(), this.open = !1, this._stopMeasuring());
64
+ }, this._viewRect = s(), this._barRect = s(), this._actionRect = s(), this._headerRect = s(), this._resizeObserver = new ResizeObserver(() => this._remeasureAndSolve()), this._placement = "bottom-end", this._effectiveTailOffset = l, this._offsetSkidding = y, this._horizontalMargin = S, this._verticalMargin = x, this.closable = !0, this.open = !1, this.maxContentWidth = 400, this.minContentWidth = 300, this.viewEdgeMargin = 16, this.visualScale = "m", this.tailAttachmentAppearance = "bar", this.arcgisPropertyChange = E()("open");
65
+ }
66
+ static {
67
+ this.properties = { _placement: 16, _effectiveTailOffset: 16, _offsetSkidding: 16, _horizontalMargin: 16, _verticalMargin: 16, view: 0, actionBarLayout: 32, actionBarElement: 0, anchorElement: 0, closable: 5, heading: 1, label: 1, open: 5, maxContentWidth: 9, minContentWidth: 9, viewEdgeMargin: 9, visualScale: 1, tailAttachmentAppearance: 1 };
68
+ }
69
+ static {
70
+ this.styles = R;
71
+ }
72
+ get _viewElement() {
73
+ return this.view?.container ?? void 0;
74
+ }
75
+ get actionBarLayout() {
76
+ return this.actionBarElement?.layout === "vertical" ? "vertical" : "horizontal";
77
+ }
78
+ willUpdate(e) {
79
+ e.has("open") && !this.open ? this._stopMeasuring() : this.open && this._hasParameterInputChange(e) ? this._remeasureAndSolve() : this.open && this._hasObservedElementChange(e) && this._observeMeasurementElements();
80
+ }
81
+ disconnectedCallback() {
82
+ super.disconnectedCallback(), this._stopMeasuring();
83
+ }
84
+ _hasObservedElementChange(e) {
85
+ return e.has("actionBarElement") || e.has("anchorElement") || e.has("view");
86
+ }
87
+ _hasParameterInputChange(e) {
88
+ return e.has("open") && this.open || e.has("tailAttachmentAppearance") || e.has("viewEdgeMargin") || e.has("visualScale");
89
+ }
90
+ _observeMeasurementElements() {
91
+ this._resizeObserver.disconnect();
92
+ for (const e of [this.anchorElement, this.actionBarElement, this._viewElement, this._headerElement])
93
+ e && this._resizeObserver.observe(e);
94
+ this._remeasureAndSolve();
95
+ }
96
+ _stopMeasuring() {
97
+ this._resizeObserver.disconnect(), this._headerElement = void 0;
98
+ }
99
+ _remeasureAndSolve() {
100
+ this._actionRect = c(this.anchorElement), this._barRect = c(this.actionBarElement), this._headerRect = c(this._headerElement), this._viewRect = c(this._viewElement), this._solveLayoutAndUpdate();
101
+ }
102
+ _solveLayoutAndUpdate() {
103
+ const { effectiveTailOffset: e, horizontalMargin: i, verticalMargin: a, offsetSkidding: r, placement: n } = O({
104
+ actionBarLayout: this.actionBarLayout,
105
+ actionRect: this._actionRect,
106
+ attributionHeight: this.view?.attributionHeight ?? 0,
107
+ barRect: this._barRect,
108
+ headerRect: this._headerRect,
109
+ visualScale: this.visualScale,
110
+ tailAttachmentAppearance: this.tailAttachmentAppearance,
111
+ viewEdgeMargin: this.viewEdgeMargin,
112
+ viewRect: this._viewRect
113
+ });
114
+ this._effectiveTailOffset = e, this._horizontalMargin = i, this._verticalMargin = a, this._offsetSkidding = r, this._placement = n;
115
+ }
116
+ render() {
117
+ return this.anchorElement ? b`<calcite-popover .closable=${this.closable} .heading=${this.heading} .label=${this.label ?? ""} .open=${this.open} .offsetDistance=${this._effectiveTailOffset} .offsetSkidding=${this._offsetSkidding} overlay-positioning=fixed flip-disabled .placement=${this._placement} .referenceElement=${this.anchorElement} @calcitePopoverBeforeOpen=${this._handlePopoverBeforeOpen} .scale=${this.visualScale} style=${w({
118
+ "--arcgis-view-popover-max-inline-size": `${this.maxContentWidth}px`,
119
+ "--arcgis-view-popover-min-inline-size": `${this.minContentWidth}px`,
120
+ "--arcgis-view-popover-height-reserve": `${this._verticalMargin}px`,
121
+ "--arcgis-view-popover-width-reserve": `${this._horizontalMargin}px`
122
+ })} trigger-disabled @calcitePopoverClose=${this._handlePopoverClose}><div class="content"><slot></slot></div></calcite-popover>` : null;
123
+ }
124
+ }
125
+ u("arcgis-view-popover", T);
126
+ export {
127
+ T as ArcgisViewPopover
128
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-popover";
2
+ export * from "./customElement.js";