@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,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function m({
2
+ function l({
3
3
  supported: e,
4
4
  disabled: s,
5
- ready: i,
5
+ ready: r,
6
6
  operationState: t,
7
- valid: r
7
+ valid: a
8
8
  }) {
9
- return e ? s || !i ? "disabled" : t === "active" ? "measuring" : r ? "measured" : "ready" : "unsupported";
9
+ return e ? s || !r ? "disabled" : t === "active" ? "measuring" : a ? "measured" : "ready" : "unsupported";
10
10
  }
11
- function l(e, s) {
11
+ function d(e, s) {
12
12
  switch (e) {
13
13
  case "unsupported":
14
14
  case "measured":
@@ -20,7 +20,7 @@ function l(e, s) {
20
20
  return s ? "measured" : "measuring";
21
21
  }
22
22
  }
23
- const a = ["metric", "imperial"], n = [
23
+ const u = ["metric", "imperial"], n = [
24
24
  "inches",
25
25
  "feet",
26
26
  "yards",
@@ -32,7 +32,7 @@ const a = ["metric", "imperial"], n = [
32
32
  "decimeters",
33
33
  "meters",
34
34
  "kilometers"
35
- ], u = [
35
+ ], c = [
36
36
  "square-inches",
37
37
  "square-feet",
38
38
  "square-yards",
@@ -47,7 +47,7 @@ const a = ["metric", "imperial"], n = [
47
47
  "acres",
48
48
  "ares",
49
49
  "hectares"
50
- ], c = [
50
+ ], m = [
51
51
  "liters",
52
52
  "megaliters",
53
53
  "gigaliters",
@@ -61,11 +61,11 @@ const a = ["metric", "imperial"], n = [
61
61
  "cubic-feet",
62
62
  "cubic-yards",
63
63
  "cubic-miles"
64
- ], o = [...a, ...n], d = [...a, ...u], f = [...a, ...c];
65
- function b(e, s = !0) {
64
+ ], o = [...u, ...n], f = [...u, ...c], b = [...u, ...m];
65
+ function g(e, s = !0) {
66
66
  return s ? e == null ? { state: "unavailable" } : { state: "available", value: e } : { state: "invalid" };
67
67
  }
68
- function g(e, s) {
68
+ function h(e, s) {
69
69
  switch (s.type) {
70
70
  case "length":
71
71
  return e.formatLength(s);
@@ -77,27 +77,35 @@ function g(e, s) {
77
77
  return "";
78
78
  }
79
79
  }
80
- function h(e) {
80
+ function p(e) {
81
81
  return e === "imperial" || e === "metric";
82
82
  }
83
- function p(e, s, i = s) {
84
- const t = e?.filter((r) => s.includes(r));
85
- return t && t.length > 0 ? t.slice() : i.slice();
83
+ function q(e, s, r = s) {
84
+ const t = e?.filter((a) => s.includes(a));
85
+ return t && t.length > 0 ? t.slice() : r.slice();
86
86
  }
87
- function q(e, s, i, t) {
88
- const r = e ?? s ?? t ?? void 0;
89
- return r && i.includes(r) ? r : i[0];
87
+ function y({
88
+ userUnit: e,
89
+ analysisUnit: s,
90
+ options: r,
91
+ defaultUnit: t,
92
+ viewUnit: a
93
+ }) {
94
+ if (e == null && s == null && a != null && r.includes(a))
95
+ return a;
96
+ const i = e ?? s ?? t ?? void 0;
97
+ return i && r.includes(i) ? i : r[0];
90
98
  }
91
99
  export {
92
- l as a,
93
- b,
94
- q as c,
100
+ d as a,
101
+ g as b,
102
+ y as c,
95
103
  o as d,
96
- f as e,
97
- g as f,
98
- m as g,
99
- h as i,
104
+ b as e,
105
+ h as f,
106
+ l as g,
107
+ p as i,
100
108
  n as l,
101
- d as m,
102
- p as r
109
+ f as m,
110
+ q as r
103
111
  };
@@ -3,7 +3,7 @@ import { svg as a, html as H } from "lit";
3
3
  import { getBoundingBox as J, computeBBox as V, getTransformMatrix as X } from "@arcgis/core/applications/Components/svgUtils.js";
4
4
  import j from "@arcgis/core/Color.js";
5
5
  import { nothing as t, safeStyleMap as Y } from "@arcgis/lumina";
6
- import { p as q, t as K } from "./utils3.js";
6
+ import { p as q, t as K } from "./utils2.js";
7
7
  let Q = 0;
8
8
  function Z() {
9
9
  return Q++;
@@ -2,7 +2,7 @@
2
2
  import { html as h, svg as S } from "lit";
3
3
  import { renderColorRampPreviewHTML as R } from "@arcgis/core/symbols/support/symbolUtils.js";
4
4
  import { renderElement as C, safeStyleMap as z } from "@arcgis/lumina";
5
- import { p as d, s as E, g as $ } from "./utils3.js";
5
+ import { p as d, s as E, g as $ } from "./utils2.js";
6
6
  const b = 10, p = 20, u = 10, g = 20;
7
7
  function v(n) {
8
8
  return typeof n == "number";
@@ -1,12 +1,80 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function a(e) {
3
- const { x: t, y: n, width: r, height: i } = e.getBoundingClientRect();
4
- return { x: t + r / 2, y: n + i / 2 };
2
+ import { html as c } from "lit";
3
+ import { safeClassMap as p, safeStyleMap as m, nothing as a } from "@arcgis/lumina";
4
+ import { classes as y } from "@arcgis/toolkit/dom";
5
+ import { g as v, a as $ } from "./action-utils.js";
6
+ import { s as b } from "./component-utils.js";
7
+ function A(e) {
8
+ return e && "visibilityMode" in e ? e.visibilityMode : null;
5
9
  }
6
- function c(e) {
7
- return e?.spatialReference?.isWebMercator || e?.spatialReference?.isGeographic || !1;
10
+ function x(e, t) {
11
+ if (!("visible" in e))
12
+ return;
13
+ A(t) === "exclusive" && e.visible || (e.visible = !e.visible);
14
+ }
15
+ function P(e, t) {
16
+ "panel" in e && (e.panel.open = !e.panel.open, e.panel.open && t && t());
17
+ }
18
+ function I(e) {
19
+ return Array.isArray(e) ? e.filter((t) => t !== "legend") : e === "legend" ? null : e;
20
+ }
21
+ function T(e) {
22
+ const t = I(e.panel?.content);
23
+ return Array.isArray(t) ? t.length > 0 : !!t;
24
+ }
25
+ function h(e) {
26
+ return !!e && "content" in e && e.content.type === "track-info";
27
+ }
28
+ function D(e) {
29
+ return !!e && "content" in e && e.content.type === "telemetry-display";
30
+ }
31
+ function V(e) {
32
+ return h(e) || D(e);
33
+ }
34
+ function q(e, t, i, n) {
35
+ e && i === t.layer?.uid && (b(e), n?.(null));
36
+ }
37
+ function M(e, t, i) {
38
+ i.type === "toggle" && (i.value = !i.value), e(i, t);
39
+ }
40
+ function w(e) {
41
+ return e.actionsSections.map((t) => t.filter((i) => i.visible));
42
+ }
43
+ function R(e, t, i) {
44
+ return e.updateComplete.then(() => {
45
+ const n = () => {
46
+ const r = Array.from(e.el.shadowRoot?.querySelectorAll(`calcite-list-item[data-item="${t}"]`) ?? []);
47
+ if (r.length < 2)
48
+ return;
49
+ const l = r.find(i);
50
+ l && r.filter((o) => o !== l).forEach((o) => o.remove());
51
+ };
52
+ return n(), e.updateComplete.then(n);
53
+ });
54
+ }
55
+ function S(e, t) {
56
+ const { icon: i } = t;
57
+ if (i)
58
+ return null;
59
+ const n = "image" in t ? t.image : void 0;
60
+ return n ? c`<span aria-hidden=true class=${p(y(e.itemActionIcon, { [e.itemActionImage]: !!n }))} style=${m(v(n))}></span>` : null;
61
+ }
62
+ function j(e, t, i) {
63
+ const { item: n, css: r, handleAction: l } = e, { active: o, disabled: u, title: s, type: f, indicator: d } = t, g = $(t);
64
+ return c`<calcite-action .active=${f === "toggle" ? t.value : !1} data-action-id=${t.id ?? a} .disabled=${u} .icon=${g ?? void 0} .indicator=${d} .loading=${o} @click=${() => M(l, n, t)} slot=${(i ? void 0 : "actions-end") ?? a} .text=${s ?? ""} .textEnabled=${i} title=${s ?? void 0 ?? a}>${S(r, t)}</calcite-action>`;
8
65
  }
9
66
  export {
10
- c,
11
- a as f
67
+ S as F,
68
+ j as L,
69
+ h as a,
70
+ D as b,
71
+ P as c,
72
+ w as d,
73
+ I as e,
74
+ q as f,
75
+ A as g,
76
+ T as h,
77
+ V as i,
78
+ R as r,
79
+ x as t
12
80
  };
@@ -1,80 +1,56 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { html as c } from "lit";
3
- import { safeClassMap as p, safeStyleMap as m, nothing as a } from "@arcgis/lumina";
4
- import { classes as y } from "@arcgis/toolkit/dom";
5
- import { g as v, a as $ } from "./action-utils.js";
6
- import { s as b } from "./component-utils.js";
7
- function A(e) {
8
- return e && "visibilityMode" in e ? e.visibilityMode : null;
9
- }
10
- function x(e, t) {
11
- if (!("visible" in e))
12
- return;
13
- A(t) === "exclusive" && e.visible || (e.visible = !e.visible);
14
- }
15
- function P(e, t) {
16
- "panel" in e && (e.panel.open = !e.panel.open, e.panel.open && t && t());
17
- }
18
- function I(e) {
19
- return Array.isArray(e) ? e.filter((t) => t !== "legend") : e === "legend" ? null : e;
20
- }
21
- function T(e) {
22
- const t = I(e.panel?.content);
23
- return Array.isArray(t) ? t.length > 0 : !!t;
24
- }
25
- function h(e) {
26
- return !!e && "content" in e && e.content.type === "track-info";
27
- }
28
- function D(e) {
29
- return !!e && "content" in e && e.content.type === "telemetry-display";
30
- }
31
- function V(e) {
32
- return h(e) || D(e);
33
- }
34
- function q(e, t, i, n) {
35
- e && i === t.layer?.uid && (b(e), n?.(null));
36
- }
37
- function M(e, t, i) {
38
- i.type === "toggle" && (i.value = !i.value), e(i, t);
39
- }
40
- function w(e) {
41
- return e.actionsSections.map((t) => t.filter((i) => i.visible));
42
- }
43
- function R(e, t, i) {
44
- return e.updateComplete.then(() => {
45
- const n = () => {
46
- const r = Array.from(e.el.shadowRoot?.querySelectorAll(`calcite-list-item[data-item="${t}"]`) ?? []);
47
- if (r.length < 2)
48
- return;
49
- const l = r.find(i);
50
- l && r.filter((o) => o !== l).forEach((o) => o.remove());
51
- };
52
- return n(), e.updateComplete.then(n);
53
- });
54
- }
55
- function S(e, t) {
56
- const { icon: i } = t;
57
- if (i)
2
+ import { formatNumber as l, substitute as s } from "@arcgis/core/intl.js";
3
+ import { g as o } from "./titleUtils.js";
4
+ const u = /^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;
5
+ function m(t, e, r) {
6
+ switch (e) {
7
+ case "heatmap-ramp":
8
+ return (r[t.label] || t.label) ?? null;
9
+ case "stretch-ramp":
10
+ const n = "value" in t ? t.value : void 0, a = t.label ? r[t.label] : "";
11
+ return a ? `${a}: ${typeof n == "string" ? n : l(n ?? 0, {
12
+ style: "decimal",
13
+ notation: n?.toString().toLowerCase().includes("e") ? "scientific" : "standard"
14
+ })}` : "";
15
+ default:
16
+ return t.label ?? null;
17
+ }
18
+ }
19
+ function g(t, e) {
20
+ return !!(e && e === "Stretched" && "version" in t && typeof t.version == "number" && t.version >= 10.3 && t.declaredClass === "esri.layers.ImageryLayer");
21
+ }
22
+ function d(t) {
23
+ return t ? t / 72 * 96 : 0;
24
+ }
25
+ function c(t) {
26
+ return t ? t * 72 / 96 : 0;
27
+ }
28
+ function p(t) {
29
+ if (typeof t == "string") {
30
+ const e = t.match(u);
31
+ if (e) {
32
+ const r = Number(e[1]), n = e[3]?.toLowerCase(), a = t.startsWith("-"), i = n === "px" ? c(r) : r;
33
+ return a ? -i : i;
34
+ }
58
35
  return null;
59
- const n = "image" in t ? t.image : void 0;
60
- return n ? c`<span aria-hidden=true class=${p(y(e.itemActionIcon, { [e.itemActionImage]: !!n }))} style=${m(v(n))}></span>` : null;
36
+ }
37
+ return t;
38
+ }
39
+ function h(t, e) {
40
+ const r = o(t, e, !1), n = r ? t.previewTemplateAriaLabel : t.previewAriaLabel;
41
+ return s(n ?? "", { label: r });
61
42
  }
62
- function j(e, t, i) {
63
- const { item: n, css: r, handleAction: l } = e, { active: o, disabled: u, title: s, type: f, indicator: d } = t, g = $(t);
64
- return c`<calcite-action .active=${f === "toggle" ? t.value : !1} data-action-id=${t.id ?? a} .disabled=${u} .icon=${g ?? void 0} .indicator=${d} .loading=${o} @click=${() => M(l, n, t)} slot=${(i ? void 0 : "actions-end") ?? a} .text=${s ?? ""} .textEnabled=${i} title=${s ?? void 0 ?? a}>${S(r, t)}</calcite-action>`;
43
+ function v(t, e) {
44
+ if (!e || !t)
45
+ return;
46
+ const r = t.querySelector("svg") ?? t.querySelector("canvas") ?? t;
47
+ !(r instanceof SVGElement) && !r.hasAttribute("role") && r.setAttribute("role", "img"), r.setAttribute("aria-label", e);
65
48
  }
66
49
  export {
67
- S as F,
68
- j as L,
69
- h as a,
70
- D as b,
71
- P as c,
72
- w as d,
73
- I as e,
74
- q as f,
75
- A as g,
76
- T as h,
77
- V as i,
78
- R as r,
79
- x as t
50
+ m as a,
51
+ h as g,
52
+ g as i,
53
+ d as p,
54
+ v as s,
55
+ p as t
80
56
  };
@@ -1,56 +1,19 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { formatNumber as l, substitute as s } from "@arcgis/core/intl.js";
3
- import { g as o } from "./titleUtils.js";
4
- const u = /^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;
5
- function m(t, e, r) {
6
- switch (e) {
7
- case "heatmap-ramp":
8
- return (r[t.label] || t.label) ?? null;
9
- case "stretch-ramp":
10
- const n = "value" in t ? t.value : void 0, a = t.label ? r[t.label] : "";
11
- return a ? `${a}: ${typeof n == "string" ? n : l(n ?? 0, {
12
- style: "decimal",
13
- notation: n?.toString().toLowerCase().includes("e") ? "scientific" : "standard"
14
- })}` : "";
15
- default:
16
- return t.label ?? null;
17
- }
2
+ function n(t, a) {
3
+ return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) * Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
18
4
  }
19
- function g(t, e) {
20
- return !!(e && e === "Stretched" && "version" in t && typeof t.version == "number" && t.version >= 10.3 && t.declaredClass === "esri.layers.ImageryLayer");
5
+ function h(t, a) {
6
+ return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) / Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
21
7
  }
22
- function d(t) {
23
- return t ? t / 72 * 96 : 0;
24
- }
25
- function c(t) {
26
- return t ? t * 72 / 96 : 0;
27
- }
28
- function p(t) {
29
- if (typeof t == "string") {
30
- const e = t.match(u);
31
- if (e) {
32
- const r = Number(e[1]), n = e[3]?.toLowerCase(), a = t.startsWith("-"), i = n === "px" ? c(r) : r;
33
- return a ? -i : i;
34
- }
35
- return null;
36
- }
37
- return t;
38
- }
39
- function h(t, e) {
40
- const r = o(t, e, !1), n = r ? t.previewTemplateAriaLabel : t.previewAriaLabel;
41
- return s(n ?? "", { label: r });
42
- }
43
- function v(t, e) {
44
- if (!e || !t)
45
- return;
46
- const r = t.querySelector("svg") ?? t.querySelector("canvas") ?? t;
47
- !(r instanceof SVGElement) && !r.hasAttribute("role") && r.setAttribute("role", "img"), r.setAttribute("aria-label", e);
8
+ function M(t, a) {
9
+ return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) * (1 / a) / Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
48
10
  }
11
+ const o = 120, r = 50, s = 5;
49
12
  export {
50
- m as a,
51
- h as g,
52
- g as i,
53
- d as p,
54
- v as s,
55
- p as t
13
+ r as a,
14
+ h as b,
15
+ M as c,
16
+ s as d,
17
+ n as f,
18
+ o as m
56
19
  };
@@ -1,19 +1,51 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function n(t, a) {
3
- return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) * Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
2
+ import { formatNumber as i } from "@arcgis/core/intl.js";
3
+ const p = /* @__PURE__ */ new Map([
4
+ ["a3-landscape", "a3-landscape"],
5
+ ["a3-portrait", "a3-portrait"],
6
+ ["a4-landscape", "a4-landscape"],
7
+ ["a4-portrait", "a4-portrait"],
8
+ ["letter-ansi-a-landscape", "ansi-a-landscape"],
9
+ ["letter-ansi-a-portrait", "ansi-a-portrait"],
10
+ ["tabloid-ansi-b-landscape", "ansi-b-landscape"],
11
+ ["tabloid-ansi-b-portrait", "ansi-b-portrait"]
12
+ ]), u = /^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/iu;
13
+ function f(a) {
14
+ if (!a)
15
+ return;
16
+ const t = a.layoutTemplateInfo;
17
+ if (!t)
18
+ return;
19
+ const [e, n] = t.pageSize;
20
+ return `${i(e)} × ${i(n)} ${a.pageUnits}`;
4
21
  }
5
- function h(t, a) {
6
- return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) / Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
22
+ function d(a, t) {
23
+ const { label: e, layout: n, layoutItem: o } = a, r = n && !o && t[n] ? t[n] : null;
24
+ return r || ((e ?? n ?? o?.id)?.replaceAll("_", " ") ?? t.untitled);
7
25
  }
8
- function M(t, a) {
9
- return 2 * Math.atan(Math.tan(Math.PI * (t / 2) / 180) * (1 / a) / Math.sqrt((1 / a) ** 2 + 1)) * 180 / Math.PI;
26
+ function g(a) {
27
+ return p.get(a);
28
+ }
29
+ const b = /* @__PURE__ */ new Map([
30
+ ["AIX", "aix"],
31
+ ["EPS", "eps"],
32
+ ["GIF", "gif"],
33
+ ["JPG", "jpg"],
34
+ ["PDF", "pdf"],
35
+ ["PNG32", "png32"],
36
+ ["PNG8", "png8"],
37
+ ["SVG", "svg"],
38
+ ["SVGZ", "svgz"],
39
+ ["TIFF", "tiff"]
40
+ ]), s = "map-only";
41
+ function m(a) {
42
+ return a?.toLowerCase() === s;
10
43
  }
11
- const o = 120, r = 50, s = 5;
12
44
  export {
13
- r as a,
14
- h as b,
15
- M as c,
16
- s as d,
17
- n as f,
18
- o as m
45
+ f as a,
46
+ g as b,
47
+ b as f,
48
+ d as g,
49
+ m as i,
50
+ u as r
19
51
  };
@@ -1,51 +1,55 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { formatNumber as i } from "@arcgis/core/intl.js";
3
- const p = /* @__PURE__ */ new Map([
4
- ["a3-landscape", "a3-landscape"],
5
- ["a3-portrait", "a3-portrait"],
6
- ["a4-landscape", "a4-landscape"],
7
- ["a4-portrait", "a4-portrait"],
8
- ["letter-ansi-a-landscape", "ansi-a-landscape"],
9
- ["letter-ansi-a-portrait", "ansi-a-portrait"],
10
- ["tabloid-ansi-b-landscape", "ansi-b-landscape"],
11
- ["tabloid-ansi-b-portrait", "ansi-b-portrait"]
12
- ]), u = /^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/iu;
13
- function f(a) {
14
- if (!a)
15
- return;
16
- const t = a.layoutTemplateInfo;
17
- if (!t)
18
- return;
19
- const [e, n] = t.pageSize;
20
- return `${i(e)} × ${i(n)} ${a.pageUnits}`;
2
+ const r = [
3
+ -45,
4
+ 0,
5
+ 45,
6
+ -90,
7
+ 90,
8
+ -135,
9
+ 180,
10
+ 135
11
+ ], s = [...r, -180], l = 200, h = {
12
+ 0: { label: "north", iconName: "chevron-up" },
13
+ 45: { label: "northEast", iconName: "chevron-up-right" },
14
+ 90: { label: "east", iconName: "chevron-right" },
15
+ 135: { label: "southEast", iconName: "chevron-down-right" },
16
+ 180: { label: "south", iconName: "chevron-down" },
17
+ "-135": { label: "southWest", iconName: "chevron-down-left" },
18
+ "-90": { label: "west", iconName: "chevron-left" },
19
+ "-45": { label: "northWest", iconName: "chevron-up-left" }
20
+ };
21
+ function u(e) {
22
+ const t = i(e), o = s.map((n) => ({
23
+ angle: n,
24
+ offset: Math.abs(n - t)
25
+ })).sort((n, c) => n.offset - c.offset)[0].angle;
26
+ return o === -180 ? 180 : o;
27
+ }
28
+ function d(e) {
29
+ const t = e * Math.PI / 180;
30
+ return { x: Math.sin(t), y: Math.cos(t) };
31
+ }
32
+ function f(e, t) {
33
+ const a = t.y - e.y, o = t.x - e.x, n = Math.sqrt(o * o + a * a);
34
+ return { x: o / n, y: a / n };
21
35
  }
22
- function d(a, t) {
23
- const { label: e, layout: n, layoutItem: o } = a, r = n && !o && t[n] ? t[n] : null;
24
- return r || ((e ?? n ?? o?.id)?.replaceAll("_", " ") ?? t.untitled);
36
+ function g(e) {
37
+ const { x: t, y: a, width: o, height: n } = e.getBoundingClientRect();
38
+ return { x: t + o / 2, y: a + n / 2 };
25
39
  }
26
- function g(a) {
27
- return p.get(a);
40
+ function m(e) {
41
+ return e?.spatialReference?.isWebMercator || e?.spatialReference?.isGeographic || !1;
28
42
  }
29
- const b = /* @__PURE__ */ new Map([
30
- ["AIX", "aix"],
31
- ["EPS", "eps"],
32
- ["GIF", "gif"],
33
- ["JPG", "jpg"],
34
- ["PDF", "pdf"],
35
- ["PNG32", "png32"],
36
- ["PNG8", "png8"],
37
- ["SVG", "svg"],
38
- ["SVGZ", "svgz"],
39
- ["TIFF", "tiff"]
40
- ]), s = "map-only";
41
- function m(a) {
42
- return a?.toLowerCase() === s;
43
+ function i({ x: e, y: t }) {
44
+ return Math.atan2(e, t) * 180 / Math.PI;
43
45
  }
44
46
  export {
45
- f as a,
46
- g as b,
47
- b as f,
48
- d as g,
49
- m as i,
50
- u as r
47
+ d as a,
48
+ r as b,
49
+ m as c,
50
+ l as d,
51
+ h as e,
52
+ g as f,
53
+ f as t,
54
+ u as v
51
55
  };
@@ -227,12 +227,20 @@ export abstract class ArcgisAreaMeasurement2d extends LitElement {
227
227
  /**
228
228
  * Unit system (imperial, metric) or specific unit used for displaying the area values. Possible values are listed in
229
229
  * [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-2d/#unitOptions).
230
+ *
231
+ * When no unit is explicitly set on the component or its analysis, this property uses the area unit configured in the view through
232
+ * [view.options.displayUnits.area](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
233
+ * This property overrides the area unit on this component's analysis without changing the units configured in the view.
230
234
  */
231
235
  accessor unit: SystemOrAreaUnit;
232
236
  /**
233
237
  * List of available units and unit systems (imperial, metric) that are shown in the component's dropdown.
234
238
  * By default, the following units are included: `metric`, `imperial`, `square-inches`, `square-feet`, `square-us-feet`, `square-yards`, `square-miles`, `square-meters`, `square-kilometers`, `acres`, `ares`, `hectares`.
235
- * Possible [unit](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-2d/#unit) values can only be a subset of this list.
239
+ * If the unit inherited from the view through
240
+ * [view.options.displayUnits.area](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits)
241
+ * is not listed in [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-2d/#unitOptions), the component checks whether its default unit is listed there.
242
+ * If it is, the component uses that default. If neither unit is listed, it uses the first entry in
243
+ * [unitOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-2d/#unitOptions).
236
244
  */
237
245
  accessor unitOptions: Array<SystemOrAreaUnit>;
238
246
  /**