@arcgis/map-components 5.2.0-next.129 → 5.2.0-next.130

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 (160) hide show
  1. package/dist/cdn/{XHF3WRCS.js → 4IQGYUKD.js} +1 -1
  2. package/dist/cdn/{EFTRT3PC.js → 4J5X3RUS.js} +1 -1
  3. package/dist/cdn/{ZNFXHSNB.js → 4XLFPSJA.js} +1 -1
  4. package/dist/cdn/{2FXJBJQN.js → 5F5KCXDO.js} +1 -1
  5. package/dist/cdn/5S4BCDOW.js +2 -0
  6. package/dist/cdn/{4Q5CHT35.js → 5W3B6N7U.js} +1 -1
  7. package/dist/cdn/{YXFHYEU3.js → 7EJR45XN.js} +1 -1
  8. package/dist/cdn/{Q6QM5JFF.js → 7YFZUDWN.js} +1 -1
  9. package/dist/cdn/{S5NMZQ7S.js → AB5ED2JR.js} +1 -1
  10. package/dist/cdn/{XIU3BXC4.js → BAHKHMBR.js} +1 -1
  11. package/dist/cdn/BAOWXZTE.js +2 -0
  12. package/dist/cdn/BEAV4EJ5.js +2 -0
  13. package/dist/cdn/{SI275RZJ.js → BMMTFWDL.js} +1 -1
  14. package/dist/cdn/{YPW4CF4Y.js → BQ7NE3DK.js} +1 -1
  15. package/dist/cdn/{B62BAX3X.js → CWCTE5IC.js} +1 -1
  16. package/dist/cdn/{3AHZESDA.js → EF7GIYDU.js} +1 -1
  17. package/dist/cdn/EL7UV72L.js +2 -0
  18. package/dist/cdn/{FJREYXK7.js → ERHYWMHC.js} +1 -1
  19. package/dist/cdn/{XPIYOTEC.js → EV3HM55D.js} +1 -1
  20. package/dist/cdn/{5S3AIVW2.js → F3I3X5LJ.js} +1 -1
  21. package/dist/cdn/{JALZMYVE.js → F6AE2AOX.js} +1 -1
  22. package/dist/cdn/{WWASAY4M.js → I2ADFUKC.js} +1 -1
  23. package/dist/cdn/{UCX6CLDZ.js → JDF3QJHI.js} +1 -1
  24. package/dist/cdn/{ML3CEDNN.js → JMKQ5ZE3.js} +1 -1
  25. package/dist/cdn/{DFPVC4EG.js → JNNG6SGW.js} +1 -1
  26. package/dist/cdn/{HOBKD5P4.js → JXXITWQ3.js} +1 -1
  27. package/dist/cdn/JYFFD5QA.js +2 -0
  28. package/dist/cdn/{XFD7GEAG.js → K3TUMGVI.js} +1 -1
  29. package/dist/cdn/{GK6NLJ6Q.js → MCU53PRF.js} +1 -1
  30. package/dist/cdn/{Q2MFXSAM.js → N6IIYBKZ.js} +1 -1
  31. package/dist/cdn/{L5FBV74B.js → NST47N4L.js} +1 -1
  32. package/dist/cdn/{7XKNWVD4.js → ORZZVKYZ.js} +1 -1
  33. package/dist/cdn/OSMCEUNX.js +2 -0
  34. package/dist/cdn/{3FO2I44H.js → QAXZ4V3U.js} +1 -1
  35. package/dist/cdn/{VLDII7DK.js → QJWPUYT2.js} +1 -1
  36. package/dist/cdn/{3NUE2TJM.js → R54YGQ26.js} +1 -1
  37. package/dist/cdn/{2DJC25HT.js → RQ3C7MN3.js} +1 -1
  38. package/dist/cdn/{D2ILHVVB.js → RXRZKDP2.js} +1 -1
  39. package/dist/cdn/{2RYNWWMR.js → T6GHF2C6.js} +1 -1
  40. package/dist/cdn/{XUSJST2P.js → U3MXAIIV.js} +1 -1
  41. package/dist/cdn/{RA5SRNJJ.js → UGZMQPKL.js} +1 -1
  42. package/dist/cdn/{3QZFSJJZ.js → UONIIMIO.js} +1 -1
  43. package/dist/cdn/{7QUUVOSA.js → WH6A6PWO.js} +1 -1
  44. package/dist/cdn/{TWR7AJTM.js → WO4RKS5X.js} +1 -1
  45. package/dist/cdn/{JXODHIWF.js → WSJLW4KK.js} +1 -1
  46. package/dist/cdn/{EQ4D5HAS.js → XR33HMFY.js} +1 -1
  47. package/dist/cdn/XUUOPL4Q.js +2 -0
  48. package/dist/cdn/{7AM3AAIM.js → YIXQRLNL.js} +1 -1
  49. package/dist/cdn/YPRBAWD7.js +2 -0
  50. package/dist/cdn/{GE5OI5A7.js → ZTJ5RKET.js} +1 -1
  51. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/sketch/t9n/messages.en.json +1 -1
  53. package/dist/cdn/assets/time-bar/t9n/messages.ar.json +1 -1
  54. package/dist/cdn/assets/time-bar/t9n/messages.bg.json +1 -1
  55. package/dist/cdn/assets/time-bar/t9n/messages.bs.json +1 -1
  56. package/dist/cdn/assets/time-bar/t9n/messages.ca.json +1 -1
  57. package/dist/cdn/assets/time-bar/t9n/messages.cs.json +1 -1
  58. package/dist/cdn/assets/time-bar/t9n/messages.da.json +1 -1
  59. package/dist/cdn/assets/time-bar/t9n/messages.de.json +1 -1
  60. package/dist/cdn/assets/time-bar/t9n/messages.el.json +1 -1
  61. package/dist/cdn/assets/time-bar/t9n/messages.es.json +1 -1
  62. package/dist/cdn/assets/time-bar/t9n/messages.et.json +1 -1
  63. package/dist/cdn/assets/time-bar/t9n/messages.fi.json +1 -1
  64. package/dist/cdn/assets/time-bar/t9n/messages.fr.json +1 -1
  65. package/dist/cdn/assets/time-bar/t9n/messages.he.json +1 -1
  66. package/dist/cdn/assets/time-bar/t9n/messages.hr.json +1 -1
  67. package/dist/cdn/assets/time-bar/t9n/messages.hu.json +1 -1
  68. package/dist/cdn/assets/time-bar/t9n/messages.id.json +1 -1
  69. package/dist/cdn/assets/time-bar/t9n/messages.it.json +1 -1
  70. package/dist/cdn/assets/time-bar/t9n/messages.ja.json +1 -1
  71. package/dist/cdn/assets/time-bar/t9n/messages.ko.json +1 -1
  72. package/dist/cdn/assets/time-bar/t9n/messages.lt.json +1 -1
  73. package/dist/cdn/assets/time-bar/t9n/messages.lv.json +1 -1
  74. package/dist/cdn/assets/time-bar/t9n/messages.nl.json +1 -1
  75. package/dist/cdn/assets/time-bar/t9n/messages.no.json +1 -1
  76. package/dist/cdn/assets/time-bar/t9n/messages.pl.json +1 -1
  77. package/dist/cdn/assets/time-bar/t9n/messages.pt-BR.json +1 -1
  78. package/dist/cdn/assets/time-bar/t9n/messages.pt-PT.json +1 -1
  79. package/dist/cdn/assets/time-bar/t9n/messages.ro.json +1 -1
  80. package/dist/cdn/assets/time-bar/t9n/messages.ru.json +1 -1
  81. package/dist/cdn/assets/time-bar/t9n/messages.sk.json +1 -1
  82. package/dist/cdn/assets/time-bar/t9n/messages.sl.json +1 -1
  83. package/dist/cdn/assets/time-bar/t9n/messages.sr.json +1 -1
  84. package/dist/cdn/assets/time-bar/t9n/messages.sv.json +1 -1
  85. package/dist/cdn/assets/time-bar/t9n/messages.th.json +1 -1
  86. package/dist/cdn/assets/time-bar/t9n/messages.tr.json +1 -1
  87. package/dist/cdn/assets/time-bar/t9n/messages.uk.json +1 -1
  88. package/dist/cdn/assets/time-bar/t9n/messages.vi.json +1 -1
  89. package/dist/cdn/assets/time-bar/t9n/messages.zh-CN.json +1 -1
  90. package/dist/cdn/assets/time-bar/t9n/messages.zh-HK.json +1 -1
  91. package/dist/cdn/assets/time-bar/t9n/messages.zh-TW.json +1 -1
  92. package/dist/cdn/index.js +1 -1
  93. package/dist/chunks/measurementUtils.js +35 -27
  94. package/dist/chunks/svgUtils.js +1 -1
  95. package/dist/chunks/univariateUtils.js +1 -1
  96. package/dist/chunks/utils.js +75 -7
  97. package/dist/chunks/utils2.js +50 -74
  98. package/dist/chunks/utils3.js +13 -50
  99. package/dist/chunks/utils4.js +45 -13
  100. package/dist/chunks/utils5.js +48 -44
  101. package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +9 -1
  102. package/dist/components/arcgis-area-measurement-2d/customElement.js +18 -12
  103. package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +9 -1
  104. package/dist/components/arcgis-area-measurement-3d/customElement.js +18 -12
  105. package/dist/components/arcgis-basemap-layer-list-next/customElement.js +1 -1
  106. package/dist/components/arcgis-building-discipline-tree/customElement.js +79 -79
  107. package/dist/components/arcgis-building-explorer/customElement.js +22 -22
  108. package/dist/components/arcgis-building-level-item/customElement.js +9 -9
  109. package/dist/components/arcgis-building-level-picker/customElement.js +16 -16
  110. package/dist/components/arcgis-building-phase-picker/customElement.js +25 -22
  111. package/dist/components/arcgis-compass/customElement.js +1 -1
  112. package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +9 -1
  113. package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +15 -9
  114. package/dist/components/arcgis-directional-pad/DirectionalPadViewModel.d.ts +1 -0
  115. package/dist/components/arcgis-directional-pad/customElement.d.ts +2 -2
  116. package/dist/components/arcgis-directional-pad/customElement.js +190 -46
  117. package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +9 -1
  118. package/dist/components/arcgis-distance-measurement-2d/customElement.js +34 -28
  119. package/dist/components/arcgis-elevation-profile/customElement.d.ts +18 -0
  120. package/dist/components/arcgis-elevation-profile/customElement.js +27 -25
  121. package/dist/components/arcgis-layer-list-item-panel/customElement.js +1 -1
  122. package/dist/components/arcgis-layer-list-next/customElement.js +1 -1
  123. package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
  124. package/dist/components/arcgis-legend-card-color-ramp/customElement.js +1 -1
  125. package/dist/components/arcgis-legend-card-element/customElement.js +1 -1
  126. package/dist/components/arcgis-legend-card-size-ramp/customElement.js +1 -1
  127. package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +1 -1
  128. package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
  129. package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +1 -1
  130. package/dist/components/arcgis-legend-spike-ramp/customElement.js +1 -1
  131. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +1 -1
  132. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.js +1 -1
  133. package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
  134. package/dist/components/arcgis-print-export-button/customElement.js +1 -1
  135. package/dist/components/arcgis-print-format-select/customElement.js +1 -1
  136. package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
  137. package/dist/components/arcgis-print-template-select/customElement.js +1 -1
  138. package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
  139. package/dist/components/arcgis-search/customElement.js +1 -1
  140. package/dist/components/arcgis-selection-list/customElement.js +28 -28
  141. package/dist/components/arcgis-sketch/customElement.d.ts +0 -4
  142. package/dist/components/arcgis-volume-measurement/customElement.d.ts +48 -5
  143. package/dist/components/arcgis-volume-measurement/customElement.js +47 -46
  144. package/dist/docs/api.json +1 -1
  145. package/dist/docs/docs.json +1 -1
  146. package/dist/docs/vscode.html-custom-data.json +1 -1
  147. package/dist/docs/web-types.json +1 -1
  148. package/package.json +6 -6
  149. package/dist/cdn/35M4DQZK.js +0 -2
  150. package/dist/cdn/6PE3IB3H.js +0 -2
  151. package/dist/cdn/G5VPRDMX.js +0 -2
  152. package/dist/cdn/JF4LCL3J.js +0 -2
  153. package/dist/cdn/JNQEJQFS.js +0 -2
  154. package/dist/cdn/MRFX6GG4.js +0 -2
  155. package/dist/cdn/SLLE4XAR.js +0 -2
  156. package/dist/cdn/WQISNLF7.js +0 -2
  157. /package/dist/cdn/{7DI2ZSB3.js → 3ZXNGXHC.js} +0 -0
  158. /package/dist/cdn/{SKNX46RX.js → DL57EVZ4.js} +0 -0
  159. /package/dist/cdn/{FUQUIU52.js → E6IRF6JO.js} +0 -0
  160. /package/dist/cdn/{MDTNPISF.js → VDTRRLON.js} +0 -0
@@ -1,37 +1,181 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as l } from "../../chunks/runtime.js";
3
- import { css as d, html as i } from "lit";
4
- import { ref as h } from "lit/directives/ref.js";
5
- import { keyed as s } from "lit/directives/keyed.js";
6
- import { usePropertyChange as u } from "@arcgis/lumina/controllers";
7
- import { focusElement as m } from "@arcgis/toolkit/dom";
8
- import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
9
- import b from "@arcgis/core/widgets/DirectionalPad/DirectionalPadViewModel.js";
10
- import { LitElement as g, createEvent as v, safeClassMap as f, nothing as a, safeStyleMap as w } from "@arcgis/lumina";
11
- import { u as _ } from "../../chunks/useT9n.js";
12
- import { m as $ } from "../../chunks/useViewModel.js";
13
- import { g as R } from "../../chunks/component-utils.js";
14
- import { g as r } from "../../chunks/globalCss.js";
15
- import { f as C, c as x } from "../../chunks/utils.js";
16
- const c = [-45, 0, 45, -90, 90, -135, 180, 135], M = {
17
- 0: { label: "north", iconName: "chevron-up" },
18
- 45: { label: "northEast", iconName: "chevron-up-right" },
19
- 90: { label: "east", iconName: "chevron-right" },
20
- 135: { label: "southEast", iconName: "chevron-down-right" },
21
- 180: { label: "south", iconName: "chevron-down" },
22
- "-135": { label: "southWest", iconName: "chevron-down-left" },
23
- "-90": { label: "west", iconName: "chevron-left" },
24
- "-45": { label: "northWest", iconName: "chevron-up-left" }
25
- }, y = d`:host{outline:none;box-shadow:none!important;background-color:transparent!important;user-select:none;calcite-action-group{touch-action:none}calcite-action{aspect-ratio:1}}.root{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.buttons-container{--calcite-color-background: transparent;--calcite-action-group-gap: 0;calcite-action{--calcite-color-focus: var(--calcite-color-foreground-3)}calcite-action:not([active]){--calcite-action-background-color-press: var(--calcite-color-foreground-1)}calcite-action[active]{--calcite-action-background-color: var(--calcite-color-foreground-3)}calcite-icon{transform:var(--rotation, unset)}@media(hover:none){calcite-action{--calcite-action-background-color-hover: var(--calcite-color-foreground-1);--calcite-action-text-color-press: var(--calcite-color-text-3)}}}.rotation-container{display:block;width:100%;calcite-action{flex:.3}}.rotation-slider-container{display:flex;flex:1;align-items:center;calcite-slider{flex:1;padding-inline:var(--calcite-spacing-xxs)}}`, S = $(b);
26
- class B extends g {
2
+ import { c as _ } from "../../chunks/runtime.js";
3
+ import { css as g, html as c } from "lit";
4
+ import { ref as b } from "lit/directives/ref.js";
5
+ import { keyed as m } from "lit/directives/keyed.js";
6
+ import { usePropertyChange as f } from "@arcgis/lumina/controllers";
7
+ import { focusElement as w } from "@arcgis/toolkit/dom";
8
+ import { watch as y } from "@arcgis/core/core/reactiveUtils.js";
9
+ import { LitElement as M, createEvent as C, safeClassMap as $, nothing as h, safeStyleMap as x } from "@arcgis/lumina";
10
+ import { u as R } from "../../chunks/useT9n.js";
11
+ import { m as P } from "../../chunks/useViewModel.js";
12
+ import { g as E } from "../../chunks/component-utils.js";
13
+ import { g as v } from "../../chunks/globalCss.js";
14
+ import { d as A, a as u, t as V, v as D, f as S, b as p, e as T, c as B } from "../../chunks/utils5.js";
15
+ import { EventedAccessor as O } from "@arcgis/core/core/Evented.js";
16
+ import { property as r, subclass as L } from "@arcgis/core/core/accessorSupport/decorators.js";
17
+ import { c as I } from "../../chunks/goTo.js";
18
+ var k = Object.defineProperty, N = Object.getOwnPropertyDescriptor, a = (n, t, e, i) => {
19
+ for (var o = i > 1 ? void 0 : i ? N(t, e) : t, d = n.length - 1, l; d >= 0; d--)
20
+ (l = n[d]) && (o = (i ? l(t, e, o) : l(o)) || o);
21
+ return i && o && k(t, e, o), o;
22
+ };
23
+ let s = class extends O {
24
+ constructor(n) {
25
+ super(n), this._anyAngleMovementEnabled = !1, this._disabled = !1, this._moveOnceDuration = A, this.speed = 1, this.beginFollowingPointer = (t, e) => {
26
+ if (this.disabled)
27
+ return;
28
+ this._widgetCenter = e;
29
+ const i = this._pointerLocationToVector(t);
30
+ if (i === void 0)
31
+ return;
32
+ const o = this._resolveClosestAngle(t, i);
33
+ o !== void 0 && (this._emitMove(u(o)), this.angle = o, this._initialAngle = o, this._setMovementTimeout(() => {
34
+ this._widgetCenter === void 0 && this._stopMovement();
35
+ }), document.addEventListener("pointermove", this._onPointerMove, { passive: !0 }), document.addEventListener("pointerup", this._onPointerUp, { passive: !0, once: !0 }));
36
+ }, this.moveOnce = (t) => {
37
+ this._emitMove(u(t)), this._setMovementTimeout(this._stopMovement);
38
+ }, this._pointerLocationToVector = (t) => {
39
+ if (this._widgetCenter === void 0)
40
+ return;
41
+ const { x: e, y: i } = V(this._widgetCenter, t);
42
+ return { x: e, y: -i };
43
+ }, this._resolveClosestAngle = (t, e) => {
44
+ const i = t.target;
45
+ if (i?.classList?.contains("compass"))
46
+ return;
47
+ const o = Number.parseInt(i?.getAttribute?.("data-angle") ?? "", 10);
48
+ return Number.isNaN(o) ? D(e) : o;
49
+ }, this._onPointerMove = (t) => {
50
+ if (t.buttons === 0) {
51
+ this._stopMovement();
52
+ return;
53
+ }
54
+ const e = this._pointerLocationToVector(t);
55
+ if (e === void 0)
56
+ return;
57
+ this._setMovementTimeout(void 0);
58
+ const i = this._resolveClosestAngle(t, e);
59
+ if (i === void 0) {
60
+ this._emitStop();
61
+ return;
62
+ }
63
+ const o = u(i), d = this._initialAngle != null && this._initialAngle !== i;
64
+ this._anyAngleMovementEnabled ||= d;
65
+ const l = this._anyAngleMovementEnabled ? e : o;
66
+ (l.x !== this._movementVector?.x || l.y !== this._movementVector?.y) && (this.angle = i, this._emitMove(l));
67
+ }, this._onPointerUp = () => {
68
+ this._movementTimeout === void 0 ? this._stopMovement() : this._widgetCenter = void 0;
69
+ }, this._stopMovement = () => {
70
+ this._emitStop(), this._widgetCenter = void 0, this._initialAngle = void 0, this._anyAngleMovementEnabled = !1, document.removeEventListener("pointermove", this._onPointerMove), document.removeEventListener("pointerup", this._onPointerUp), this._setMovementTimeout(void 0);
71
+ }, this.on("move-start", () => this._navigation?.begin()), this.on(
72
+ "move-direction-change",
73
+ ({ vector: { x: t, y: e } }) => this._navigation?.continuousPanVector({
74
+ x: t * this.speed,
75
+ y: e * this.speed
76
+ })
77
+ ), this.on("move-stop", () => this._navigation?.stop());
78
+ }
79
+ destroy() {
80
+ this._stopMovement();
81
+ }
82
+ get _navigation() {
83
+ return this.view?.mapViewNavigation;
84
+ }
85
+ get disabled() {
86
+ return this.view?.ready === !1 || this._disabled || !this.supported;
87
+ }
88
+ set disabled(n) {
89
+ this._disabled = n;
90
+ }
91
+ get rotation() {
92
+ return this.view?.rotation ?? this._get("rotation") ?? 0;
93
+ }
94
+ set rotation(n) {
95
+ this.view ? this.view.constraints.rotationEnabled && I(
96
+ { target: { rotation: n }, options: { animate: n === 0 ? void 0 : !1 } },
97
+ this.view
98
+ ) : this._set("rotation", n);
99
+ }
100
+ get supported() {
101
+ return this.view == null || this.view.type === "2d";
102
+ }
103
+ get state() {
104
+ return this.disabled ? "disabled" : this.angle != null ? "moving" : "ready";
105
+ }
106
+ _setMovementTimeout(n) {
107
+ if (clearTimeout(this._movementTimeout), n === void 0) {
108
+ this._movementTimeout = void 0;
109
+ return;
110
+ }
111
+ this._movementTimeout = setTimeout(() => {
112
+ this._movementTimeout = void 0, n();
113
+ }, this._moveOnceDuration);
114
+ }
115
+ _emitMove(n) {
116
+ this._movementVector == null && this.emit("move-start", { type: "move-start", vector: n });
117
+ const t = this._movementVector;
118
+ this._movementVector = n, this.emit("move-direction-change", { type: "move-direction-change", vector: n, oldVector: t });
119
+ }
120
+ _emitStop() {
121
+ this.angle = void 0, this._movementVector !== void 0 && (this.emit("move-stop", { type: "move-stop", oldVector: this._movementVector }), this._movementVector = void 0);
122
+ }
123
+ };
124
+ a([
125
+ r()
126
+ ], s.prototype, "_initialAngle", 2);
127
+ a([
128
+ r()
129
+ ], s.prototype, "_movementVector", 2);
130
+ a([
131
+ r()
132
+ ], s.prototype, "_widgetCenter", 2);
133
+ a([
134
+ r()
135
+ ], s.prototype, "_anyAngleMovementEnabled", 2);
136
+ a([
137
+ r()
138
+ ], s.prototype, "_movementTimeout", 2);
139
+ a([
140
+ r()
141
+ ], s.prototype, "_disabled", 2);
142
+ a([
143
+ r()
144
+ ], s.prototype, "_moveOnceDuration", 2);
145
+ a([
146
+ r()
147
+ ], s.prototype, "disabled", 1);
148
+ a([
149
+ r()
150
+ ], s.prototype, "angle", 2);
151
+ a([
152
+ r()
153
+ ], s.prototype, "speed", 2);
154
+ a([
155
+ r()
156
+ ], s.prototype, "rotation", 1);
157
+ a([
158
+ r()
159
+ ], s.prototype, "supported", 1);
160
+ a([
161
+ r({ readOnly: !0 })
162
+ ], s.prototype, "state", 1);
163
+ a([
164
+ r()
165
+ ], s.prototype, "view", 2);
166
+ s = a([
167
+ L("components.directional-pad.DirectionalPadViewModel")
168
+ ], s);
169
+ const U = g`:host{outline:none;box-shadow:none!important;background-color:transparent!important;user-select:none;calcite-action-group{touch-action:none}calcite-action{aspect-ratio:1}}.root{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.buttons-container{--calcite-color-background: transparent;--calcite-action-group-gap: 0;calcite-action{--calcite-color-focus: var(--calcite-color-foreground-3)}calcite-action:not([active]){--calcite-action-background-color-press: var(--calcite-color-foreground-1)}calcite-action[active]{--calcite-action-background-color: var(--calcite-color-foreground-3)}calcite-icon{transform:var(--rotation, unset)}@media(hover:none){calcite-action{--calcite-action-background-color-hover: var(--calcite-color-foreground-1);--calcite-action-text-color-press: var(--calcite-color-text-3)}}}.rotation-container{display:block;width:100%;calcite-action{flex:.3}}.rotation-slider-container{display:flex;flex:1;align-items:center;calcite-slider{flex:1;padding-inline:var(--calcite-spacing-xxs)}}`, F = P(s);
170
+ class j extends M {
27
171
  constructor() {
28
- super(...arguments), this.messages = _({}), this._onContextMenu = (t) => t.preventDefault(), this._buttons = {}, this.viewModel = S(this), this.angle = this.viewModel.angle, this.rotation = this.viewModel.rotation, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.disabled = this.viewModel.disabled, this.hideDirectionalButtons = !1, this.icon = "move", this.showRotationResetButton = !1, this.showRotationSlider = !1, this.state = this.viewModel.state, this.visualScale = "s", this.arcgisPropertyChange = u()("state"), this.arcgisReady = v();
172
+ super(...arguments), this.messages = R({}), this._onContextMenu = (t) => t.preventDefault(), this._buttons = {}, this.viewModel = F(this), this.angle = this.viewModel.angle, this.rotation = this.viewModel.rotation, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.disabled = this.viewModel.disabled, this.hideDirectionalButtons = !1, this.icon = "move", this.showRotationResetButton = !1, this.showRotationSlider = !1, this.state = this.viewModel.state, this.visualScale = "s", this.arcgisPropertyChange = f()("state"), this.arcgisReady = C();
29
173
  }
30
174
  static {
31
175
  this.properties = { _rotationEnabled: 16, angle: 16, rotation: 16, view: 0, autoDestroyDisabled: 5, disabled: 5, hideDirectionalButtons: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, showRotationResetButton: 5, showRotationSlider: 5, state: 32, visualScale: 1 };
32
176
  }
33
177
  static {
34
- this.styles = y;
178
+ this.styles = U;
35
179
  }
36
180
  get _rotationEnabled() {
37
181
  return this.view?.ready ? this.view.constraints.rotationEnabled ?? !1 : !0;
@@ -42,8 +186,8 @@ class B extends g {
42
186
  loaded() {
43
187
  this.manager.onLifecycle(() => [
44
188
  // Move focus when movement angle changed by touch/mouse (not keyboard!)
45
- p(() => this.viewModel.angle, () => {
46
- this._buttonsContainer?.contains(document.activeElement) && (this.viewModel.angle == null ? R(this)?.focus() : m(this._buttons[this.viewModel.angle]));
189
+ y(() => this.viewModel.angle, () => {
190
+ this._buttonsContainer?.contains(document.activeElement) && (this.viewModel.angle == null ? E(this)?.focus() : w(this._buttons[this.viewModel.angle]));
47
191
  })
48
192
  ]);
49
193
  }
@@ -63,9 +207,9 @@ class B extends g {
63
207
  _onButtonPointerDown(t) {
64
208
  if (this._buttonsContainer === void 0)
65
209
  return;
66
- t.composedPath().find((n) => n.hasPointerCapture?.(t.pointerId))?.releasePointerCapture(t.pointerId);
67
- const o = C(this._buttonsContainer);
68
- this.viewModel.beginFollowingPointer(t, o);
210
+ t.composedPath().find((o) => o.hasPointerCapture?.(t.pointerId))?.releasePointerCapture(t.pointerId);
211
+ const i = S(this._buttonsContainer);
212
+ this.viewModel.beginFollowingPointer(t, i);
69
213
  }
70
214
  _onSliderInput({ currentTarget: t }) {
71
215
  typeof t.value == "number" && (this.viewModel.rotation = t.value);
@@ -77,11 +221,11 @@ class B extends g {
77
221
  this.viewModel.moveOnce(t);
78
222
  }
79
223
  render() {
80
- const { label: t, disabled: e } = this, o = this.view == null || this.view.type === "2d";
81
- return i`<div .ariaLabel=${t ?? void 0} class=${f({ root: !0, [r.widget]: !0, [r.disabled]: e })} tabindex=-1>${o ? this._renderContent() : this._renderUnsupportedMessage()}</div>`;
224
+ const { label: t, disabled: e } = this, i = this.view == null || this.view.type === "2d";
225
+ return c`<div .ariaLabel=${t ?? void 0} class=${$({ root: !0, [v.widget]: !0, [v.disabled]: e })} tabindex=-1>${i ? this._renderContent() : this._renderUnsupportedMessage()}</div>`;
82
226
  }
83
227
  _renderUnsupportedMessage() {
84
- return i`<section class="error"><p>${this.messages.unsupported}</p></section>`;
228
+ return c`<section class="error"><p>${this.messages.unsupported}</p></section>`;
85
229
  }
86
230
  _renderContent() {
87
231
  return [
@@ -90,31 +234,31 @@ class B extends g {
90
234
  ];
91
235
  }
92
236
  _renderDirectionalButtons() {
93
- return s("directional-buttons-container", i`<calcite-action-bar expand-toggle-disabled floating layout=grid .scale=${this.visualScale} overflow-mode=none><calcite-action-group class="buttons-container" dir=ltr @contextmenu=${{
237
+ return m("directional-buttons-container", c`<calcite-action-bar expand-toggle-disabled floating layout=grid .scale=${this.visualScale} overflow-mode=none><calcite-action-group class="buttons-container" dir=ltr @contextmenu=${{
94
238
  handleEvent: this._onContextMenu,
95
239
  capture: !0
96
- }} ${h(this._setButtonContainerRef)}>${c.slice(0, 4).map(this._renderButton, this)}${this._renderCompass()}${c.slice(4).map(this._renderButton, this)}</calcite-action-group></calcite-action-bar>`);
240
+ }} ${b(this._setButtonContainerRef)}>${p.slice(0, 4).map(this._renderButton, this)}${this._renderCompass()}${p.slice(4).map(this._renderButton, this)}</calcite-action-group></calcite-action-bar>`);
97
241
  }
98
242
  _renderButton(t) {
99
- const { label: e, iconName: o } = M[t], n = this.messages[e];
100
- return i`<calcite-action .active=${this.angle === t} alignment=center class="button" data-angle=${t ?? a} .disabled=${this.disabled} @click=${this._onClick.bind(this, t)} @pointerdown=${this._onButtonPointerDown} .text=${n ?? ""} title=${n ?? a}><calcite-icon .icon=${o} .scale=${this.visualScale}></calcite-icon></calcite-action>`;
243
+ const { label: e, iconName: i } = T[t], o = this.messages[e];
244
+ return c`<calcite-action .active=${this.angle === t} alignment=center class="button" data-angle=${t ?? h} .disabled=${this.disabled} @click=${this._onClick.bind(this, t)} @pointerdown=${this._onButtonPointerDown} .text=${o ?? ""} title=${o ?? h}><calcite-icon .icon=${i} .scale=${this.visualScale}></calcite-icon></calcite-action>`;
101
245
  }
102
246
  _renderCompass() {
103
- const t = this.disabled || x(this.view) ? "compass-needle" : "arrow-up", e = this.rotation === 0, o = this.messages.resetHeading;
104
- return i`<calcite-action alignment=center class="compass" .disabled=${this.disabled || !this._rotationEnabled || e} @click=${this._onRotationReset} style=${w(this._rotateIcon(this.rotation))} .text=${o ?? ""} title=${o ?? a}>${!e && i`<calcite-icon .icon=${t} .scale=${this.visualScale}></calcite-icon>` || ""}</calcite-action>`;
247
+ const t = this.disabled || B(this.view) ? "compass-needle" : "arrow-up", e = this.rotation === 0, i = this.messages.resetHeading;
248
+ return c`<calcite-action alignment=center class="compass" .disabled=${this.disabled || !this._rotationEnabled || e} @click=${this._onRotationReset} style=${x(this._rotateIcon(this.rotation))} .text=${i ?? ""} title=${i ?? h}>${!e && c`<calcite-icon .icon=${t} .scale=${this.visualScale}></calcite-icon>` || ""}</calcite-action>`;
105
249
  }
106
250
  _renderRotation() {
107
- return s("slider-container", i`<calcite-action-bar expand-toggle-disabled floating layout=horizontal .scale=${this.visualScale}><calcite-action-group class="rotation-container">${this.showRotationResetButton ? this._renderRotationResetButton() : null}${this._renderRotationSlider()}</calcite-action-group></calcite-action-bar>`);
251
+ return m("slider-container", c`<calcite-action-bar expand-toggle-disabled floating layout=horizontal .scale=${this.visualScale}><calcite-action-group class="rotation-container">${this.showRotationResetButton ? this._renderRotationResetButton() : null}${this._renderRotationSlider()}</calcite-action-group></calcite-action-bar>`);
108
252
  }
109
253
  _renderRotationResetButton() {
110
254
  const t = this.messages.resetHeading;
111
- return i`<calcite-action alignment=center class="rotation-reset-button" .disabled=${this.disabled || !this._rotationEnabled} @click=${this._onRotationReset} .text=${t ?? ""} title=${t ?? a}><calcite-icon flip-rtl icon=rotate .scale=${this.visualScale}></calcite-icon></calcite-action>`;
255
+ return c`<calcite-action alignment=center class="rotation-reset-button" .disabled=${this.disabled || !this._rotationEnabled} @click=${this._onRotationReset} .text=${t ?? ""} title=${t ?? h}><calcite-icon flip-rtl icon=rotate .scale=${this.visualScale}></calcite-icon></calcite-action>`;
112
256
  }
113
257
  _renderRotationSlider() {
114
- return i`<div class="rotation-slider-container"><calcite-slider .ariaLabel=${this.messages.heading} .disabled=${this.disabled || !this._rotationEnabled} label-handles max=360 min=0 required .scale=${this.visualScale} .value=${Math.round(this.rotation)} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div>`;
258
+ return c`<div class="rotation-slider-container"><calcite-slider .ariaLabel=${this.messages.heading} .disabled=${this.disabled || !this._rotationEnabled} label-handles max=360 min=0 required .scale=${this.visualScale} .value=${Math.round(this.rotation)} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div>`;
115
259
  }
116
260
  }
117
- l("arcgis-directional-pad", B);
261
+ _("arcgis-directional-pad", j);
118
262
  export {
119
- B as ArcgisDirectionalPad
263
+ j as ArcgisDirectionalPad
120
264
  };
@@ -222,12 +222,20 @@ export abstract class ArcgisDistanceMeasurement2d extends LitElement {
222
222
  /**
223
223
  * Unit system (imperial, metric) or specific unit used for displaying the distance values. Possible values are listed in
224
224
  * [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-distance-measurement-2d/#unitOptions).
225
+ *
226
+ * When no unit is explicitly set on the component or its analysis, this property uses the length unit configured in the view through
227
+ * [view.options.displayUnits.length](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
228
+ * This property overrides the distance unit on this component's analysis without changing the units configured in the view.
225
229
  */
226
230
  accessor unit: SystemOrLengthUnit;
227
231
  /**
228
232
  * List of available units and unit systems (imperial, metric) that are shown in the component's dropdown.
229
233
  * By default, the following units are included: `metric`, `imperial`, `inches`, `feet`, `us-feet`, `yards`, `miles`, `nautical-miles`, `meters`, `kilometers`.
230
- * Possible [unit](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-distance-measurement-2d/#unit) values can only be a subset of this list.
234
+ * If the unit inherited from the view through
235
+ * [view.options.displayUnits.length](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits)
236
+ * is not listed in [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-distance-measurement-2d/#unitOptions), the component checks whether its default unit is listed there.
237
+ * If it is, the component uses that default. If neither unit is listed, it uses the first entry in
238
+ * [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-distance-measurement-2d/#unitOptions).
231
239
  */
232
240
  accessor unitOptions: Array<SystemOrLengthUnit>;
233
241
  /**
@@ -1,27 +1,27 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as w } from "../../chunks/runtime.js";
3
3
  import { css as f, html as d } from "lit";
4
- import { LitElement as b, createEvent as v, nothing as x, safeClassMap as y } from "@arcgis/lumina";
4
+ import { LitElement as v, createEvent as b, nothing as x, safeClassMap as y } from "@arcgis/lumina";
5
5
  import { usePropertyChange as M } from "@arcgis/lumina/controllers";
6
6
  import { classes as k } from "@arcgis/toolkit/dom";
7
7
  import { u as O } from "../../chunks/useT9n.js";
8
8
  import { m as z } from "../../chunks/useViewModel.js";
9
- import { t as D, a as V } from "../../chunks/async-utils.js";
9
+ import { t as D, a as U } from "../../chunks/async-utils.js";
10
10
  import { g as p } from "../../chunks/globalCss.js";
11
11
  import { V as g } from "../../chunks/visible-element.js";
12
- import S from "@arcgis/core/analysis/DistanceMeasurementAnalysis.js";
13
- import { property as n, subclass as $ } from "@arcgis/core/core/accessorSupport/decorators.js";
12
+ import V from "@arcgis/core/analysis/DistanceMeasurementAnalysis.js";
13
+ import { property as o, subclass as S } from "@arcgis/core/core/accessorSupport/decorators.js";
14
14
  import { watch as u } from "@arcgis/core/core/reactiveUtils.js";
15
15
  import h from "@arcgis/core/views/interactive/options/SnappingOptions.js";
16
- import { A as U } from "../../chunks/AnalysisViewModel.js";
16
+ import { A as $ } from "../../chunks/AnalysisViewModel.js";
17
17
  import { g as C, a as E, b as A, r as j, d as m, c as L } from "../../chunks/measurementUtils.js";
18
18
  const P = f`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`;
19
- var B = Object.defineProperty, T = Object.getOwnPropertyDescriptor, s = (t, e, a, o) => {
20
- for (var i = o > 1 ? void 0 : o ? T(e, a) : e, l = t.length - 1, c; l >= 0; l--)
21
- (c = t[l]) && (i = (o ? c(e, a, i) : c(i)) || i);
22
- return o && i && B(e, a, i), i;
19
+ var B = Object.defineProperty, T = Object.getOwnPropertyDescriptor, s = (t, e, a, n) => {
20
+ for (var i = n > 1 ? void 0 : n ? T(e, a) : e, l = t.length - 1, c; l >= 0; l--)
21
+ (c = t[l]) && (i = (n ? c(e, a, i) : c(i)) || i);
22
+ return n && i && B(e, a, i), i;
23
23
  };
24
- let r = class extends U {
24
+ let r = class extends $ {
25
25
  constructor() {
26
26
  super(...arguments), this.snappingOptions = new h(), this.supportedViewType = "2d", this.unsupportedErrorMessage = "The Distance Measurement 2D component is only supported in 2D views.", this.shouldForceInteractive = !1;
27
27
  }
@@ -50,8 +50,8 @@ let r = class extends U {
50
50
  ]);
51
51
  }
52
52
  get state() {
53
- const { analysis: t, disabled: e, operationState: a, ready: o, supported: i } = this, { valid: l } = t;
54
- return C({ supported: i, disabled: e, ready: o, operationState: a, valid: l });
53
+ const { analysis: t, disabled: e, operationState: a, ready: n, supported: i } = this, { valid: l } = t;
54
+ return C({ supported: i, disabled: e, ready: n, operationState: a, valid: l });
55
55
  }
56
56
  get displayState() {
57
57
  return E(this.state, !!this.analysis.geometry);
@@ -69,7 +69,13 @@ let r = class extends U {
69
69
  this._userUnitOptions = t;
70
70
  }
71
71
  get unit() {
72
- return L(this._userUnit, this.analysis.unit, this.unitOptions, this.defaultMeasurementSystem);
72
+ return L({
73
+ userUnit: this._userUnit,
74
+ analysisUnit: this.analysis.unit,
75
+ options: this.unitOptions,
76
+ defaultUnit: this.defaultMeasurementSystem,
77
+ viewUnit: this.view?.options.displayUnits.length
78
+ });
73
79
  }
74
80
  set unit(t) {
75
81
  this._userUnit = t;
@@ -82,40 +88,40 @@ let r = class extends U {
82
88
  this.analysis.geometry = null;
83
89
  }
84
90
  constructAnalysis() {
85
- return new S();
91
+ return new V();
86
92
  }
87
93
  };
88
94
  s([
89
- n({ readOnly: !0 })
95
+ o({ readOnly: !0 })
90
96
  ], r.prototype, "state", 1);
91
97
  s([
92
- n({ readOnly: !0 })
98
+ o({ readOnly: !0 })
93
99
  ], r.prototype, "displayState", 1);
94
100
  s([
95
- n()
101
+ o()
96
102
  ], r.prototype, "measurement", 1);
97
103
  s([
98
- n({ type: h })
104
+ o({ type: h })
99
105
  ], r.prototype, "snappingOptions", 2);
100
106
  s([
101
- n()
107
+ o()
102
108
  ], r.prototype, "unitOptions", 1);
103
109
  s([
104
- n()
110
+ o()
105
111
  ], r.prototype, "_userUnitOptions", 2);
106
112
  s([
107
- n()
113
+ o()
108
114
  ], r.prototype, "unit", 1);
109
115
  s([
110
- n()
116
+ o()
111
117
  ], r.prototype, "_userUnit", 2);
112
118
  r = s([
113
- $("components.distance-measurement-2d.DistanceMeasurement2dViewModel")
119
+ S("components.distance-measurement-2d.DistanceMeasurement2dViewModel")
114
120
  ], r);
115
121
  const I = z(r);
116
- class Z extends b {
122
+ class Z extends v {
117
123
  constructor() {
118
- super(...arguments), this.viewModel = I(this), this.messages = O({ name: "distance-measurement-2d", blocking: !0 }), this.view = this.viewModel.view, this.analysis = this.viewModel.analysis, this.autoDestroyDisabled = !1, this.hideStartButton = !1, this.hideUnitSelect = !1, this.hideVisualization = this.viewModel.hideVisualization, this.icon = "measure-line", this.interactionDisabled = this.viewModel.interactionDisabled, this.snappingOptions = this.viewModel.snappingOptions, this.state = this.viewModel.state, this.unit = this.viewModel.unit, this.unitOptions = this.viewModel.unitOptions, this.arcgisPropertyChange = M()("analysis", "interactionDisabled", "state"), this.arcgisReady = v();
124
+ super(...arguments), this.viewModel = I(this), this.messages = O({ name: "distance-measurement-2d", blocking: !0 }), this.view = this.viewModel.view, this.analysis = this.viewModel.analysis, this.autoDestroyDisabled = !1, this.hideStartButton = !1, this.hideUnitSelect = !1, this.hideVisualization = this.viewModel.hideVisualization, this.icon = "measure-line", this.interactionDisabled = this.viewModel.interactionDisabled, this.snappingOptions = this.viewModel.snappingOptions, this.state = this.viewModel.state, this.unit = this.viewModel.unit, this.unitOptions = this.viewModel.unitOptions, this.arcgisPropertyChange = M()("analysis", "interactionDisabled", "state"), this.arcgisReady = b();
119
125
  }
120
126
  static {
121
127
  this.properties = { view: 0, analysis: 0, autoDestroyDisabled: 5, hideStartButton: 5, hideUnitSelect: 5, hideVisualization: 5, icon: 3, interactionDisabled: 5, label: 1, messageOverrides: 0, referenceElement: 1, snappingOptions: 0, state: 32, unit: 1, unitOptions: 0 };
@@ -130,16 +136,16 @@ class Z extends b {
130
136
  await this.manager.destroy();
131
137
  }
132
138
  async start() {
133
- V(this.viewModel.start());
139
+ U(this.viewModel.start());
134
140
  }
135
141
  render() {
136
- const { messages: e, unit: a, unitOptions: o, viewModel: i } = this, { measurement: l, state: c } = i;
142
+ const { messages: e, unit: a, unitOptions: n, viewModel: i } = this, { measurement: l, state: c } = i;
137
143
  return d`<div aria-label=${e.componentLabel ?? x} class=${y(k("root", p.widget, p.panel))} role=presentation><arcgis-measurement-content .state=${i.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[
138
144
  {
139
145
  title: e.distance,
140
146
  measurement: l.length
141
147
  }
142
- ]}>${g({ hidden: this.hideUnitSelect, children: d`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${a} @arcgisUnitSelectChange=${(_) => {
148
+ ]}>${g({ hidden: this.hideUnitSelect, children: d`<arcgis-unit-select slot=settings .options=${n} .selectLabel=${e.unit} .value=${a} @arcgisUnitSelectChange=${(_) => {
143
149
  this.unit = _.detail;
144
150
  }}></arcgis-unit-select>` })}${g({ hidden: this.hideStartButton, children: d`<calcite-button slot=actions .disabled=${c === "unsupported" || c === "disabled" || this.interactionDisabled} @click=${this.start}>${e.newMeasurement}</calcite-button>` })}</arcgis-measurement-content></div>`;
145
151
  }
@@ -249,12 +249,21 @@ export abstract class ArcgisElevationProfile extends LitElement {
249
249
  * The measurement system (imperial, metric) or specific unit (e.g. feet, kilometers) used to display distance values
250
250
  * in the chart, results and legend.
251
251
  *
252
+ * When no distance unit is explicitly set on the component or its analysis, this property uses the length unit configured in the view through
253
+ * [view.options.displayUnits.length](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
254
+ * This property overrides the distance unit on this component's analysis without changing the units configured in the view.
255
+ *
252
256
  * @since 5.0
253
257
  */
254
258
  accessor distanceUnit: SystemOrLengthUnit | undefined;
255
259
  /**
256
260
  * List of available units unit systems (imperial, metric) and specific units (e.g. feet, kilometers) for displaying
257
261
  * the distance values. These are the options displayed in the distance unit dropdown in the settings popover.
262
+ * If the unit inherited from the view through
263
+ * [view.options.displayUnits.length](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits)
264
+ * is not listed in [distanceUnitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/#distanceUnitOptions), the component checks whether its default unit is listed there.
265
+ * If it is, the component uses that default. If neither unit is listed, it uses the first entry in
266
+ * [distanceUnitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/#distanceUnitOptions).
258
267
  *
259
268
  * @since 5.0
260
269
  */
@@ -281,12 +290,21 @@ export abstract class ArcgisElevationProfile extends LitElement {
281
290
  * The measurement system (imperial, metric) or specific unit (e.g. feet, kilometers) used to display elevation values
282
291
  * in the chart, results and legend.
283
292
  *
293
+ * When no elevation unit is explicitly set on the component or its analysis, this property uses the vertical length unit configured in the view through
294
+ * [view.options.displayUnits.verticalLength](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
295
+ * This property overrides the elevation unit on this component's analysis without changing the units configured in the view.
296
+ *
284
297
  * @since 5.0
285
298
  */
286
299
  accessor elevationUnit: SystemOrLengthUnit | undefined;
287
300
  /**
288
301
  * List of available units unit systems (imperial, metric) and specific units (e.g. feet, kilometers) for displaying
289
302
  * the elevation values. These are the options displayed in the elevation unit dropdown in the settings popover.
303
+ * If the unit inherited from the view through
304
+ * [view.options.displayUnits.verticalLength](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits)
305
+ * is not listed in [elevationUnitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/#elevationUnitOptions), the component checks whether its default unit is listed there.
306
+ * If it is, the component uses that default. If neither unit is listed, it uses the first entry in
307
+ * [elevationUnitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/#elevationUnitOptions).
290
308
  *
291
309
  * @since 5.0
292
310
  */