@arcgis/common-components 5.2.0-next.11 → 5.2.0-next.110

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 (172) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/cdn/24BY6E4U.js +2 -0
  4. package/dist/cdn/{MCZBUYS5.js → 26TPKYHY.js} +2 -2
  5. package/dist/cdn/2P3QKSBJ.js +2 -0
  6. package/dist/cdn/3ENYIWMV.js +2 -0
  7. package/dist/cdn/3YTGG7RF.js +2 -0
  8. package/dist/cdn/{VQLI4IE7.js → 6YKEQTXQ.js} +2 -2
  9. package/dist/cdn/{L5RMOAO3.js → 73AR55J2.js} +2 -2
  10. package/dist/cdn/746MUQGB.js +2 -0
  11. package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
  12. package/dist/cdn/AHWD5KV4.js +2 -0
  13. package/dist/cdn/ALOLCOFN.js +2 -0
  14. package/dist/cdn/B2QFPLR5.js +2 -0
  15. package/dist/cdn/{WEKRF34E.js → B6QUU35R.js} +2 -2
  16. package/dist/cdn/BGN6KRHS.js +2 -0
  17. package/dist/cdn/BQD6UQIB.js +2 -0
  18. package/dist/cdn/{JLPZ3OR2.js → BSSCT4Z5.js} +2 -2
  19. package/dist/cdn/CT3ZUD4C.js +2 -0
  20. package/dist/cdn/D2RCMLMS.js +2 -0
  21. package/dist/cdn/{5KS7T5BY.js → D2YGEFGL.js} +2 -2
  22. package/dist/cdn/DICEO27I.js +2 -0
  23. package/dist/cdn/{ECNI2A4K.js → E4NVOXNZ.js} +1 -1
  24. package/dist/cdn/{GVOQ2CB7.js → EY5CL247.js} +2 -2
  25. package/dist/cdn/EZH7L65E.js +2 -0
  26. package/dist/cdn/{LKUOAV7B.js → F2XLHROQ.js} +2 -2
  27. package/dist/cdn/F3UPNSY4.js +2 -0
  28. package/dist/cdn/F7ZMTKDL.js +2 -0
  29. package/dist/cdn/GAXWOAWM.js +2 -0
  30. package/dist/cdn/GV62Q7D7.js +2 -0
  31. package/dist/cdn/H4MYODDU.js +2 -0
  32. package/dist/cdn/{OBIWQRXY.js → IUQEF23H.js} +2 -2
  33. package/dist/cdn/KIWPQY6T.js +4 -0
  34. package/dist/cdn/KMWJCWRS.js +2 -0
  35. package/dist/cdn/{L2JNUMXB.js → KOQXEMEM.js} +2 -2
  36. package/dist/cdn/LE43VGSR.js +2 -0
  37. package/dist/cdn/NMDESY3T.js +2 -0
  38. package/dist/cdn/NXUTEL5Q.js +2 -0
  39. package/dist/cdn/P3DCEHGK.js +2 -0
  40. package/dist/cdn/P6IUT6XO.js +2 -0
  41. package/dist/cdn/P7I4EXSU.js +2 -0
  42. package/dist/cdn/Q7STPO4U.js +2 -0
  43. package/dist/cdn/QJJFF4PI.js +2 -0
  44. package/dist/cdn/{4W7JZPB6.js → SHMWZ2AY.js} +2 -2
  45. package/dist/cdn/{3P53QRGS.js → ST5VEH7P.js} +2 -2
  46. package/dist/cdn/U2K7ABGL.js +2 -0
  47. package/dist/cdn/VIUFXHPL.js +2 -0
  48. package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
  49. package/dist/cdn/{XRARFMJ7.js → ZBSOCWIQ.js} +2 -2
  50. package/dist/cdn/{3V5M7OHL.js → ZZGYCYHP.js} +4 -4
  51. package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
  53. package/dist/cdn/assets/slider-histogram-range/t9n/messages.en.json +1 -0
  54. package/dist/cdn/index.js +2 -2
  55. package/dist/cdn/main.css +1 -1
  56. package/dist/chunks/element-reference-controller.js +19 -0
  57. package/dist/chunks/{commonFunctions.js → general.js} +1 -1
  58. package/dist/chunks/internal-types.js +1 -1
  59. package/dist/chunks/layer-utils.js +53 -41
  60. package/dist/chunks/locale.js +15 -7
  61. package/dist/chunks/resources.js +1 -1
  62. package/dist/chunks/runtime.js +1 -1
  63. package/dist/chunks/strategies.js +287 -0
  64. package/dist/chunks/toolbar.js +9 -0
  65. package/dist/chunks/types.js +16 -0
  66. package/dist/chunks/useT9n.js +1 -1
  67. package/dist/chunks/utils.js +59 -0
  68. package/dist/chunks/utils2.js +20 -0
  69. package/dist/chunks/utils3.js +7 -0
  70. package/dist/components/arcgis-ckeditor5/customElement.d.ts +23 -0
  71. package/dist/components/arcgis-ckeditor5/customElement.js +3 -3
  72. package/dist/components/arcgis-ckeditor5-popover/customElement.js +2 -2
  73. package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
  74. package/dist/components/arcgis-color-input/customElement.js +2 -2
  75. package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +23 -0
  76. package/dist/components/arcgis-coordinate-system-picker/customElement.js +2 -2
  77. package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
  78. package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
  79. package/dist/components/arcgis-field-info/customElement.js +249 -226
  80. package/dist/components/arcgis-field-info/index.js +1 -0
  81. package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
  82. package/dist/components/arcgis-field-pick-list/customElement.d.ts +15 -12
  83. package/dist/components/arcgis-field-pick-list/customElement.js +206 -123
  84. package/dist/components/arcgis-field-pick-list/index.js +4 -3
  85. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
  86. package/dist/components/arcgis-histogram/customElement.d.ts +39 -2
  87. package/dist/components/arcgis-histogram/customElement.js +106 -91
  88. package/dist/components/arcgis-label-input/customElement.js +19 -15
  89. package/dist/components/arcgis-picker-input/customElement.js +1 -1
  90. package/dist/components/arcgis-ramp-color/customElement.js +1 -1
  91. package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
  92. package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
  93. package/dist/components/arcgis-slider/customElement.d.ts +11 -3
  94. package/dist/components/arcgis-slider/customElement.js +372 -349
  95. package/dist/components/arcgis-slider-field/customElement.d.ts +298 -0
  96. package/dist/components/arcgis-slider-field/customElement.js +96 -0
  97. package/dist/components/arcgis-slider-field/index.d.ts +1 -0
  98. package/dist/components/arcgis-slider-field/index.js +2 -0
  99. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +390 -0
  100. package/dist/components/arcgis-slider-histogram-range/customElement.js +120 -0
  101. package/dist/components/arcgis-slider-histogram-range/index.d.ts +1 -0
  102. package/dist/components/arcgis-slider-histogram-range/index.js +3 -0
  103. package/dist/components/arcgis-slider-histogram-range/types.d.ts +6 -0
  104. package/dist/components/arcgis-slider-input/customElement.js +1 -1
  105. package/dist/components/arcgis-ticks/customElement.d.ts +11 -3
  106. package/dist/components/arcgis-ticks/customElement.js +101 -80
  107. package/dist/components/arcgis-toolbar/customElement.d.ts +67 -0
  108. package/dist/components/arcgis-toolbar/customElement.js +108 -0
  109. package/dist/components/arcgis-toolbar/index.d.ts +1 -0
  110. package/dist/components/arcgis-toolbar/index.js +2 -0
  111. package/dist/components/arcgis-toolbar/types.d.ts +41 -0
  112. package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
  113. package/dist/components/arcgis-toolbar-action/customElement.js +52 -0
  114. package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
  115. package/dist/components/arcgis-toolbar-action/index.js +3 -0
  116. package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
  117. package/dist/components/arcgis-toolbar-group/customElement.js +48 -0
  118. package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
  119. package/dist/components/arcgis-toolbar-group/index.js +2 -0
  120. package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
  121. package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
  122. package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
  123. package/dist/components/arcgis-toolbar-item/index.js +4 -0
  124. package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
  125. package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
  126. package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
  127. package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
  128. package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
  129. package/dist/components/arcgis-toolbar-split-button/customElement.js +67 -0
  130. package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
  131. package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
  132. package/dist/components/arcgis-toolbar-stack/customElement.d.ts +48 -0
  133. package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
  134. package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
  135. package/dist/components/arcgis-toolbar-stack/index.js +1 -0
  136. package/dist/components/arcgis-unique-values-list/customElement.js +116 -96
  137. package/dist/components/arcgis-value-picker/customElement.js +6 -6
  138. package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
  139. package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
  140. package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
  141. package/dist/components/arcgis-value-picker-slider/customElement.js +1 -1
  142. package/dist/docs/api.json +1 -1
  143. package/dist/docs/docs.json +1 -1
  144. package/dist/docs/vscode.css-custom-data.json +1 -1
  145. package/dist/docs/vscode.html-custom-data.json +1 -1
  146. package/dist/docs/web-types.json +1 -1
  147. package/dist/index.d.ts +62 -0
  148. package/dist/index.js +3 -1
  149. package/dist/loader.js +14 -5
  150. package/dist/types/lumina.d.ts +58 -2
  151. package/dist/types/preact.d.ts +67 -2
  152. package/dist/types/react.d.ts +76 -2
  153. package/dist/types/stencil.d.ts +60 -4
  154. package/dist/utils/types.d.ts +14 -1
  155. package/package.json +6 -6
  156. package/dist/cdn/2XA6O2MP.js +0 -2
  157. package/dist/cdn/4BJYJUMR.js +0 -2
  158. package/dist/cdn/5U5NQ3F5.js +0 -2
  159. package/dist/cdn/77HZGUSC.js +0 -2
  160. package/dist/cdn/A3CISHRB.js +0 -2
  161. package/dist/cdn/AFBKMYU6.js +0 -4
  162. package/dist/cdn/IUJ4ILLQ.js +0 -2
  163. package/dist/cdn/JPD7Z3MB.js +0 -2
  164. package/dist/cdn/LB7I345F.js +0 -2
  165. package/dist/cdn/LBD3GPSD.js +0 -2
  166. package/dist/cdn/MCH3WQ4X.js +0 -2
  167. package/dist/cdn/N7C4DINF.js +0 -2
  168. package/dist/cdn/NKMDS2IH.js +0 -2
  169. package/dist/cdn/PSITQBDP.js +0 -2
  170. package/dist/cdn/TXYPZ6MB.js +0 -2
  171. package/dist/cdn/WLYFLEI6.js +0 -2
  172. package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
@@ -17,10 +17,12 @@ import type SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer.js";
17
17
  import type VoxelLayer from "@arcgis/core/layers/VoxelLayer.js";
18
18
  import type WCSLayer from "@arcgis/core/layers/WCSLayer.js";
19
19
  import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
20
+ import type DimensionFeatureLayer from "@arcgis/core/layers/DimensionFeatureLayer.js";
21
+ import type AnnotationFeatureLayer from "@arcgis/core/layers/AnnotationFeatureLayer.js";
20
22
 
21
23
  /**
22
24
  * All supported layer types
23
25
  *
24
26
  * @internal
25
27
  */
26
- export type FieldPickListLayer = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | ImageryTileLayer | KnowledgeGraphSublayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | SceneLayer | StreamLayer | Sublayer | SubtypeGroupLayer | SubtypeSublayer | VoxelLayer | WCSLayer | WFSLayer;
28
+ export type FieldPickListLayer = AnnotationFeatureLayer | CatalogFootprintLayer | CatalogLayer | CSVLayer | DimensionFeatureLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | ImageryTileLayer | KnowledgeGraphSublayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | SceneLayer | StreamLayer | Sublayer | SubtypeGroupLayer | SubtypeSublayer | VoxelLayer | WCSLayer | WFSLayer;
@@ -4,6 +4,15 @@ import type { HistogramBin } from "@arcgis/core/smartMapping/statistics/types.js
4
4
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
5
5
  import type { T9nMeta } from "@arcgis/lumina/controllers";
6
6
 
7
+ declare module "@arcgis/lumina" {
8
+ export interface DeclareCssProperties {
9
+ /** Specifies the color of the histogram bars when the bin doesn't have a corresponding color stop. */
10
+ "--arcgis-histogram-bar-color": "*";
11
+ /** Specifies the default color for color stops. */
12
+ "--arcgis-histogram-stop-color": "*";
13
+ }
14
+ }
15
+
7
16
  /**
8
17
  * Renders a histogram to visualize the spread of a dataset based on [bins](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/#bins) representing buckets, or sub-ranges, of
9
18
  * data. Each [bin](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/types/#HistogramBin) is defined by a minimum and maximum value and a total count.
@@ -41,8 +50,6 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
41
50
  *
42
51
  * ![Histogram with color](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/histogram-colors.avif "Histogram with color")
43
52
  *
44
- * @cssproperty [--arcgis-histogram-bar-color] - Specifies the color of the histogram bars when the bin doesn't have a corresponding color stop.
45
- * @cssproperty [--arcgis-histogram-stop-color] - Specifies the default color for color stops.
46
53
  * @see [histogram module](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/histogram/)
47
54
  * @see [Sample - Histogram component](https://developers.arcgis.com/javascript/latest/sample-code/histogram/)
48
55
  * @since 5.0
@@ -188,6 +195,25 @@ export abstract class ArcgisHistogram extends LitElement {
188
195
  accessor icon: string | undefined;
189
196
  /** The component's default label. */
190
197
  accessor label: string | undefined;
198
+ /**
199
+ * Allows customizing how the average and standard deviation line labels render on the histogram. Note that this property is only responsible
200
+ * for formatting the numeric value of the data line it represents, so the average and standard-deviation symbols are preserved regardless of
201
+ * whether it is set. Return `null` or `undefined` to use the default formatting.
202
+ *
203
+ * @example
204
+ * ```js
205
+ * histogram.labelFormatter = (value, type, defaultFormatter) => {
206
+ * if (type === "average") {
207
+ * return value + "%";
208
+ * }
209
+ *
210
+ * if (type === "standard-deviation") {
211
+ * return value.toFixed(2);
212
+ * }
213
+ * };
214
+ * ```
215
+ */
216
+ accessor labelFormatter: (value: number, type: "average" | "standard-deviation", defaultFormatter: (value: number) => string) => string | null | undefined;
191
217
  /**
192
218
  * Determines the orientation of the histogram.
193
219
  *
@@ -255,4 +281,15 @@ export abstract class ArcgisHistogram extends LitElement {
255
281
  * ```
256
282
  */
257
283
  accessor standardDeviation: number | undefined;
284
+ /**
285
+ * Indicates the number of standard deviation lines to render on the histogram from the [average](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/#average).
286
+ *
287
+ * @default 1
288
+ * @example
289
+ * ```js
290
+ * // Will render lines for +σ, +2σ, +3σ, and -σ, -2σ, -3σ
291
+ * histogram.standardDeviationCount = 3;
292
+ * ```
293
+ */
294
+ accessor standardDeviationCount: number;
258
295
  }
@@ -1,60 +1,64 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  import { c as M } from "../../chunks/runtime.js";
3
3
  import { u as k } from "../../chunks/useT9n.js";
4
4
  import { substitute as E } from "@arcgis/core/intl.js";
5
- import { LitElement as I, nothing as h, safeStyleMap as v, safeClassMap as O } from "@arcgis/lumina";
6
- import { css as R, html as y, svg as f } from "lit";
7
- import { g as z } from "../../chunks/locale.js";
8
- const F = R`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr}.svg{display:block;width:100%;height:100%}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;
9
- function S(t, r, n, e, i) {
10
- const [s, a] = i;
11
- if (!t || a === 0 || s === 0 || n == null || r == null)
5
+ import { LitElement as F, nothing as h, safeStyleMap as x, safeClassMap as I } from "@arcgis/lumina";
6
+ import { css as O, html as y, svg as d } from "lit";
7
+ import { a as R } from "../../chunks/locale.js";
8
+ const z = O`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr;width:100%;height:100%}.svg{display:block;width:100%;height:100%;overflow:visible}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;
9
+ function S(t, i, n, e, r) {
10
+ const [s, a] = r;
11
+ if (!t || a === 0 || s === 0 || n == null || i == null)
12
12
  return null;
13
- const o = n - r, c = (t.length > 1 ? t[t.length - 1].maxValue - t[0].minValue : 0) / o, [u, g] = e === "vertical" ? [a * c, s] : [a, s * c], b = t ? t.map((m) => m.count) : [], d = Math.max(...b);
13
+ const o = n - i, l = (t.length > 1 ? t[t.length - 1].maxValue - t[0].minValue : 0) / o, [u, g] = e === "vertical" ? [a * l, s] : [a, s * l], p = t ? t.map((m) => m.count) : [], f = Math.max(...p);
14
14
  return t.map((m) => {
15
- const [p, $] = e === "vertical" ? [u / t.length, d !== 0 ? m.count / d * g : 0] : [d !== 0 ? m.count / d * u : 0, g / t.length], { maxValue: D } = m, x = n - D, [_, C] = e === "vertical" ? [0, x * (a / o)] : [s - $ - x * (s / o), a - p];
16
- return [_, C, $, p];
15
+ const [b, v] = e === "vertical" ? [u / t.length, f !== 0 ? m.count / f * g : 0] : [f !== 0 ? m.count / f * u : 0, g / t.length], { maxValue: C } = m, $ = n - C, [L, _] = e === "vertical" ? [0, $ * (a / o)] : [s - v - $ * (s / o), a - b];
16
+ return [L, _, v, b];
17
17
  });
18
18
  }
19
- function B(t, r, n, e, i) {
20
- const s = [];
21
- return t != null && s.push({
19
+ function B(t, i, n, e, r, s) {
20
+ if (e === void 0 || r === void 0)
21
+ return [];
22
+ const a = [];
23
+ return t != null && a.push({
22
24
  value: t,
23
25
  symbol: "x̄",
24
26
  lineClass: "average-data-line"
25
- }), r != null && n != null && e != null && s.push(...G(n, e, r, t)), i && s.push(...i), s;
27
+ }), i != null && e != null && r != null && a.push(
28
+ ...G(e, r, i, n, t)
29
+ ), s && a.push(...s), a.filter(({ value: o }) => o >= e && o <= r);
26
30
  }
27
- function N(t, r, n, e, i) {
31
+ function N(t, i, n, e, r) {
28
32
  if (n == null)
29
33
  return [0, 0, 0, 0];
30
- const s = Math.round((i - n) / e * 100) / 100, [a, o] = t;
31
- if (r === "vertical") {
32
- let c = o - s * o || 1;
33
- return c = Math.round(c) + 0.5, [0, "100%", c, c];
34
+ const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
35
+ if (i === "vertical") {
36
+ let l = o - s * o || 1;
37
+ return l = Math.round(l) + 0.5, [0, "100%", l, l];
34
38
  }
35
- let l = s * a || 1;
36
- return l = Math.round(l) + 0.5, [l, l, "100%", 0];
39
+ let c = s * a || 1;
40
+ return c = Math.round(c) + 0.5, [c, c, "100%", 0];
37
41
  }
38
- function P(t, r, n, e, i) {
42
+ function P(t, i, n, e, r) {
39
43
  if (n == null)
40
44
  return [0, 0];
41
- const s = Math.round((i - n) / e * 100) / 100, [a, o] = t;
42
- return r === "vertical" ? [a, o - s * o] : [0, s * a];
45
+ const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
46
+ return i === "vertical" ? [a, o - s * o] : [0, s * a];
43
47
  }
44
- function T(t, r, n) {
48
+ function T(t, i, n) {
45
49
  if (!t || t.length === 0)
46
50
  return null;
47
- if (L(t)) {
48
- const e = t.map((i) => ({
49
- ...i,
50
- color: w(i.color ?? n)
51
+ if (V(t)) {
52
+ const e = t.map((r) => ({
53
+ ...r,
54
+ color: w(r.color ?? n)
51
55
  }));
52
56
  return e.unshift({
53
- color: r,
57
+ color: i,
54
58
  minValue: Number.NEGATIVE_INFINITY,
55
59
  maxValue: e[0].minValue
56
60
  }), e.push({
57
- color: r,
61
+ color: i,
58
62
  minValue: e[e.length - 1].maxValue,
59
63
  maxValue: Number.POSITIVE_INFINITY
60
64
  }), e;
@@ -64,45 +68,45 @@ function T(t, r, n) {
64
68
  color: w(e.color ?? n)
65
69
  }));
66
70
  }
67
- function A(t, r, n, e) {
71
+ function A(t, i, n, e) {
68
72
  if (!t || t.length === 0)
69
73
  return n;
70
- if (L(t)) {
71
- const i = H(t, r);
72
- if (i.length === 0)
74
+ if (V(t)) {
75
+ const r = H(t, i);
76
+ if (r.length === 0)
73
77
  return n;
74
78
  if (e) {
75
- const { color: s = n, weight: a } = i[0], { color: o = n, weight: l } = i[1] ?? i[0], c = a + l;
76
- return `color-mix(in srgb, ${s} ${a / c * 100}%, ${o} ${l / c * 100}%)`;
79
+ const { color: s = n, weight: a } = r[0], { color: o = n, weight: c } = r[1] ?? r[0], l = a + c;
80
+ return `color-mix(in srgb, ${s} ${a / l * 100}%, ${o} ${c / l * 100}%)`;
77
81
  }
78
- return i[0].color ?? n;
82
+ return r[0].color ?? n;
79
83
  }
80
- return W(t, r);
84
+ return W(t, i);
81
85
  }
82
- function H(t, r) {
86
+ function H(t, i) {
83
87
  const n = [];
84
88
  for (const e of t) {
85
- const i = Math.max(0, Math.min(r.maxValue, e.maxValue) - Math.max(r.minValue, e.minValue));
86
- i > 0 && n.push({ color: e.color, weight: i });
89
+ const r = Math.max(0, Math.min(i.maxValue, e.maxValue) - Math.max(i.minValue, e.minValue));
90
+ r > 0 && n.push({ color: e.color, weight: r });
87
91
  }
88
- return n.sort((e, i) => i.weight - e.weight);
92
+ return n.sort((e, r) => r.weight - e.weight);
89
93
  }
90
- function W(t, r) {
91
- const n = (r.maxValue - r.minValue) / 2 + r.minValue;
94
+ function W(t, i) {
95
+ const n = (i.maxValue - i.minValue) / 2 + i.minValue;
92
96
  if (n > t[t.length - 1].value)
93
97
  return t[t.length - 1].color;
94
98
  for (let e = 0; e < t.length - 1; e++) {
95
- const i = t[e], s = t[e + 1];
96
- if (n <= i.value)
97
- return i.color;
99
+ const r = t[e], s = t[e + 1];
100
+ if (n <= r.value)
101
+ return r.color;
98
102
  if (n < s.value) {
99
- const a = (n - i.value) / (s.value - i.value) * 100;
100
- return `color-mix(in srgb, ${i.color}, ${s.color} ${a}%)`;
103
+ const a = (n - r.value) / (s.value - r.value) * 100;
104
+ return `color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`;
101
105
  }
102
106
  }
103
107
  return t[t.length - 1].color;
104
108
  }
105
- function L(t) {
109
+ function V(t) {
106
110
  return t[0] != null && "minValue" in t[0];
107
111
  }
108
112
  function w(t) {
@@ -110,76 +114,87 @@ function w(t) {
110
114
  return t;
111
115
  if (Array.isArray(t))
112
116
  return `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3] ?? 1})`;
113
- const { r, g: n, b: e, a: i = 1 } = t;
114
- return `rgba(${r}, ${n}, ${e}, ${i})`;
117
+ const { r: i, g: n, b: e, a: r = 1 } = t;
118
+ return `rgba(${i}, ${n}, ${e}, ${r})`;
115
119
  }
116
- function G(t, r, n, e) {
117
- const i = 0.06 * (r - t);
118
- return Y(n, e).filter((s) => Math.abs(e - s) > i).map((s, a, o) => {
119
- const l = o.length / 2, c = s > e ? "+" : "-", u = a >= l ? a - l + 1 : l - a;
120
+ function G(t, i, n, e, r) {
121
+ const s = 0.06 * (i - t);
122
+ return Y(n, e, r).map((a, o, c) => {
123
+ const l = c.length / 2, u = a > r ? "+" : "-", g = o >= l ? o - l + 1 : l - o;
120
124
  return {
121
- symbol: `${c}${u === 1 ? "" : u}σ`,
122
- value: s
125
+ symbol: `${u}${g === 1 ? "" : g}σ`,
126
+ value: a
123
127
  };
124
- });
128
+ }).filter(({ value: a }) => Math.abs(r - a) > s);
125
129
  }
126
- function Y(t, r) {
127
- if (r == null || t == null)
130
+ function Y(t, i, n) {
131
+ if (n == null || t == null)
128
132
  return [];
129
- const n = 1, e = [];
130
- for (let i = n * -1; i <= n; i++)
131
- i !== 0 && e.push(r + i * t);
132
- return e;
133
+ const e = i, r = [];
134
+ for (let s = e * -1; s <= e; s++)
135
+ s !== 0 && r.push(n + s * t);
136
+ return r;
133
137
  }
134
- const V = "var(--arcgis-histogram-bar-color)", U = "var(--arcgis-histogram-stop-color)";
135
- class j extends I {
138
+ const D = "var(--arcgis-histogram-bar-color)", U = "var(--arcgis-histogram-stop-color)";
139
+ class j extends F {
136
140
  constructor() {
137
- super(...arguments), this._messages = k(), this._normalizedStops = null, this._formatLabel = (r) => z(this._messages._lang, this._numberFormatterOptions).format(r), this._numberFormatterOptions = {
141
+ super(...arguments), this._messages = k(), this._normalizedStops = null, this.#t = (i, n) => {
142
+ const e = (r) => R(this._messages._lang, this._numberFormatterOptions).format(r);
143
+ return this.labelFormatter?.(i, n, e) ?? e(i);
144
+ }, this._numberFormatterOptions = {
138
145
  maximumFractionDigits: 2
139
- }, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1;
146
+ }, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1, this.standardDeviationCount = 1;
140
147
  }
141
148
  static {
142
- this.properties = { containerDimensions: 16, colorStops: 0, icon: 3, average: 11, messageOverrides: 0, standardDeviation: 11, bins: 0, dataLines: 0, label: 1, layout: 3, max: 11, min: 11, colorBlendingEnabled: 5 };
149
+ this.properties = { containerDimensions: 16, colorStops: 0, icon: 3, labelFormatter: 0, average: 11, messageOverrides: 0, standardDeviation: 11, bins: 0, dataLines: 0, label: 1, layout: 3, max: 11, min: 11, colorBlendingEnabled: 5, standardDeviationCount: 9 };
143
150
  }
144
151
  static {
145
- this.styles = F;
152
+ this.styles = z;
146
153
  }
154
+ #t;
147
155
  loaded() {
148
- const r = new ResizeObserver((i) => {
149
- for (const s of i) {
156
+ const i = new ResizeObserver((r) => {
157
+ for (const s of r) {
150
158
  const { width: a, height: o } = s.contentRect;
151
159
  this.containerDimensions = [a, o];
152
160
  }
153
161
  }), { width: n, height: e } = this.el.getBoundingClientRect();
154
- this.containerDimensions = [n, e], r.observe(this.el);
162
+ this.containerDimensions = [n, e], i.observe(this.el);
155
163
  }
156
- willUpdate(r) {
157
- r.has("colorStops") && (this._normalizedStops = T(this.colorStops, V, U));
164
+ willUpdate(i) {
165
+ i.has("colorStops") && (this._normalizedStops = T(this.colorStops, D, U));
158
166
  }
159
167
  render() {
160
- const { label: r } = this;
161
- return y`<div role=img .ariaLabel=${r ?? void 0} class="content">${this._renderContent()}</div>`;
168
+ const { label: i } = this;
169
+ return y`<div role=img .ariaLabel=${i ?? void 0} class="content">${this._renderContent()}</div>`;
162
170
  }
163
171
  _renderContent() {
164
- const { containerDimensions: [r, n] } = this, e = "bg-fill";
165
- return r ? y`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${f`<defs><clipPath id=${e}><rect height=${n ?? h} width=${r ?? h} x=0 y=0 /></clipPath></defs><g style=${v({ clipPath: `url(#${e})` })}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>` : null;
172
+ const { containerDimensions: [i, n] } = this, e = "bg-fill", r = i ? [
173
+ d`<defs><clipPath id=${e}><rect height=${n ?? h} width=${i ?? h} x=0 y=0 /></clipPath></defs>`,
174
+ d`<g style=${x({ clipPath: `url(#${e})` })}><g>${this._renderBars()}</g></g>`,
175
+ d`<g>${this._renderLines()}</g>`
176
+ ] : [];
177
+ return y`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${r}</svg>`;
166
178
  }
167
179
  _renderBars() {
168
- const { bins: r, _messages: n } = this, e = S(this.bins, this.min, this.max, this.layout, this.containerDimensions);
169
- return !e || !r ? null : e.map((i, s) => {
170
- const [a, o, l, c] = i, u = r[s], g = n?.barLabel ? E(n.barLabel, u) : "";
171
- return f`<rect style=${v({
172
- fill: A(this._normalizedStops, u, V, this.colorBlendingEnabled)
173
- })} .ariaLabel=${g} data-index=${s ?? h} height=${c ?? h} role=img shape-rendering=crispEdges stroke-width=0 width=${l ?? h} x=${a ?? h} y=${o ?? h} />`;
180
+ const { bins: i, _messages: n } = this, e = S(this.bins, this.min, this.max, this.layout, this.containerDimensions);
181
+ return !e || !i ? null : e.map((r, s) => {
182
+ const [a, o, c, l] = r, u = i[s], g = n?.barLabel ? E(n.barLabel, u) : "";
183
+ return d`<rect style=${x({
184
+ fill: A(this._normalizedStops, u, D, this.colorBlendingEnabled)
185
+ })} .ariaLabel=${g} data-index=${s ?? h} height=${l ?? h} role=img shape-rendering=crispEdges stroke-width=0 width=${c ?? h} x=${a ?? h} y=${o ?? h} />`;
174
186
  });
175
187
  }
176
188
  _renderLines() {
177
- return B(this.average, this.standardDeviation, this.min, this.max, this.dataLines)?.map((n) => q({ dataLine: n, containerDimensions: this.containerDimensions, layout: this.layout, min: this.min, max: this.max, labelFormatter: this._formatLabel }));
189
+ return B(this.average, this.standardDeviation, this.standardDeviationCount, this.min, this.max, this.dataLines)?.map((n) => q({ dataLine: n, containerDimensions: this.containerDimensions, layout: this.layout, min: this.min, max: this.max, labelFormatter: this.#t }));
178
190
  }
179
191
  }
180
192
  const q = (t) => {
181
- const { containerDimensions: r, layout: n, min: e, max: i, dataLine: s, labelFormatter: a } = t, o = i != null && e != null ? i - e : 0, [l, c, u, g] = N(r, n, e, o, s.value), [b, d] = P(r, n, e, o, s.value), m = "symbol" in s ? [f`<tspan class="data-line-symbol">${s.symbol}</tspan>`, f`<tspan>${a(s.value)}</tspan>`] : s.label, p = "lineClass" in s && s.lineClass ? s.lineClass : "data-line";
182
- return f`<g><title>${s.value}</title><line class=${O(p)} shape-rendering=crispEdges x1=${l ?? h} x2=${c ?? h} y1=${u ?? h} y2=${g ?? h} /><text class="label" text-anchor=end transform=${(n === "horizontal" ? "rotate(270)" : void 0) ?? h} x=${b ?? h} y=${d - 2}>${m}</text></g>`;
193
+ const { containerDimensions: i, layout: n, min: e, max: r, dataLine: s, labelFormatter: a } = t, o = r != null && e != null ? r - e : 0, [c, l, u, g] = N(i, n, e, o, s.value), [p, f] = P(i, n, e, o, s.value), m = "symbol" in s ? [
194
+ d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,
195
+ d`<tspan>${a(s.value, s.lineClass === "average-data-line" ? "average" : "standard-deviation")}</tspan>`
196
+ ] : s.label, b = "lineClass" in s && s.lineClass ? s.lineClass : "data-line";
197
+ return d`<g><title>${s.value}</title><line class=${I(b)} shape-rendering=crispEdges x1=${c ?? h} x2=${l ?? h} y1=${u ?? h} y2=${g ?? h} /><text class="label" text-anchor=end transform=${(n === "horizontal" ? "rotate(270)" : void 0) ?? h} x=${p ?? h} y=${f - 2}>${m}</text></g>`;
183
198
  };
184
199
  M("arcgis-histogram", j);
185
200
  export {
@@ -1,18 +1,19 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as o } from "../../chunks/runtime.js";
3
- import { formatNumber as u } from "@arcgis/core/intl.js";
4
- import { LitElement as c, createEvent as h, safeClassMap as d } from "@arcgis/lumina";
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import { c as r } from "../../chunks/runtime.js";
3
+ import { formatNumber as o } from "@arcgis/core/intl.js";
4
+ import { LitElement as u, createEvent as c, safeClassMap as h } from "@arcgis/lumina";
5
+ import { useWatchAttributes as d } from "@arcgis/lumina/controllers";
5
6
  import { createRef as s, ref as l } from "lit/directives/ref.js";
6
- import { css as p, html as n } from "lit";
7
+ import { css as p, html as a } from "lit";
7
8
  const m = p`:host{display:block}:host([hidden]){display:none}.content{display:flex;flex-direction:column}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:var(--calcite-font-line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.content{align-items:start}.readOnlyLabel{text-align:start}}:host([alignment="end"]){.content{align-items:end}.readOnlyLabel{text-align:end}}:host([alignment="center"]){.content{align-items:center}.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`;
8
- class f extends c {
9
+ class f extends u {
9
10
  constructor() {
10
- super(...arguments), this._buttonRef = s(), this._inputRef = s(), this._labelRef = s(), this._formatOptions = {
11
+ super(), this._buttonRef = s(), this._inputRef = s(), this._labelRef = s(), this._formatOptions = {
11
12
  style: "decimal",
12
13
  useGrouping: !0,
13
14
  minimumFractionDigits: 0,
14
15
  maximumFractionDigits: 2
15
- }, this._formatValue = (t) => u(t, this._formatOptions), this._pointerDownPosition = null, this._displayedValue = "", this._editing = !1, this.alignment = "center", this.readOnly = !1, this.value = 0, this.arcgisChange = h({ cancelable: !1 });
16
+ }, this._formatValue = (t) => o(t, this._formatOptions), this._pointerDownPosition = null, this._displayedValue = "", this._editing = !1, this.alignment = "center", this.readOnly = !1, this.value = 0, this.arcgisChange = c({ cancelable: !1 }), d(["hidden"], () => this.requestUpdate());
16
17
  }
17
18
  static {
18
19
  this.properties = { _displayedValue: 16, _editing: 16, alignment: 3, editing: 39, labelFormatter: 0, readOnly: 7, value: 11 };
@@ -39,10 +40,13 @@ class f extends c {
39
40
  }
40
41
  }
41
42
  updated(t) {
42
- const e = this._inputRef.value, i = this._buttonRef.value, a = this.renderRoot.querySelector(".readOnlyLabel");
43
- if (e && i && a) {
44
- const r = a.offsetWidth;
45
- i.style.width = `${r}px`, e.style.width = `${r}px`;
43
+ this.#t();
44
+ }
45
+ #t() {
46
+ const t = this._inputRef.value, e = this._buttonRef.value, i = this.renderRoot.querySelector(".readOnlyLabel");
47
+ if (t && e && i) {
48
+ const n = i.offsetWidth;
49
+ n > 0 && (e.style.width = `${n}px`, t.style.width = `${n}px`);
46
50
  }
47
51
  }
48
52
  _enterEdit() {
@@ -103,14 +107,14 @@ class f extends c {
103
107
  }
104
108
  render() {
105
109
  const { alignment: t, _displayedValue: e } = this, i = [
106
- n`<span class="readOnlyLabel"><span ${l(this._labelRef)}>${e}</span></span>`
110
+ a`<span class="readOnlyLabel"><span ${l(this._labelRef)}>${e}</span></span>`
107
111
  ];
108
- return this.readOnly || i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${l(this._buttonRef)}>${e}</calcite-button>`, n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${l(this._inputRef)}></calcite-input-number>`), n`<div class=${d({
112
+ return this.readOnly || i.push(a`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${l(this._buttonRef)}>${e}</calcite-button>`, a`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${l(this._inputRef)}></calcite-input-number>`), a`<div class=${h({
109
113
  content: !0
110
114
  })}>${i}</div>`;
111
115
  }
112
116
  }
113
- o("arcgis-label-input", f);
117
+ r("arcgis-label-input", f);
114
118
  export {
115
119
  f as ArcgisLabelInput
116
120
  };
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  import { c as n } from "../../chunks/runtime.js";
3
3
  import { css as l, html as o } from "lit";
4
4
  import { LitElement as a, createEvent as i, safeStyleMap as r } from "@arcgis/lumina";
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  import { c as f } from "../../chunks/runtime.js";
3
3
  import w from "@arcgis/core/Color.js";
4
4
  import { LitElement as x, nothing as u, safeClassMap as C } from "@arcgis/lumina";
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  import { c as l } from "../../chunks/runtime.js";
3
3
  import { LitElement as m } from "@arcgis/lumina";
4
4
  import { css as p, html as c } from "lit";
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  import { c } from "../../chunks/runtime.js";
3
3
  import t from "@arcgis/core/Color.js";
4
4
  import { LitElement as e } from "@arcgis/lumina";
@@ -74,12 +74,13 @@ export abstract class ArcgisSlider extends LitElement {
74
74
  */
75
75
  accessor disabled: boolean;
76
76
  /**
77
- * Controls where the filled segment is displayed on the track for single-thumb sliders.
78
- * Range sliders always display the fill between the min and max thumbs.
77
+ * Controls where the filled segment is displayed on the track. Single-thumb sliders may only display the fill on the `start` or `end` segments, which
78
+ * represent the range of values up to, and range of values past the slider thumb. Range sliders with two or more thumbs may only display
79
+ * the fill on the `between` or `not-between` segments, which represent the range between the min and max thumbs, and the range outside the min and max thumbs.
79
80
  *
80
81
  * @default "start"
81
82
  */
82
- accessor fillPlacement: "end" | "none" | "start";
83
+ accessor fillPlacement: "between" | "end" | "none" | "not-between" | "start";
83
84
  /**
84
85
  * Sets the maximum value of the slider's displayed range.
85
86
  * When specified, the slider track is scaled from [fullRangeMin](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMin) to `fullRangeMax`, while
@@ -214,6 +215,13 @@ export abstract class ArcgisSlider extends LitElement {
214
215
  * @see [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#layout)
215
216
  */
216
217
  accessor mirrored: boolean;
218
+ /**
219
+ * Determines whether the popover should always render over the most recently active thumb or range segment,
220
+ * or only while that thumb or range segment is active.
221
+ *
222
+ * @default "auto"
223
+ */
224
+ accessor popoverDisplay: "always" | "auto";
217
225
  /**
218
226
  * The accessible label for the popover. This label is used by assistive technologies and does not affect the visible UI.
219
227
  *