@arcgis/common-components 5.2.0-next.6 → 5.2.0-next.61

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 (193) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/4S3TDYPJ.js +2 -0
  3. package/dist/cdn/5HXH344K.js +2 -0
  4. package/dist/cdn/6DGHVYTV.js +2 -0
  5. package/dist/cdn/7SJH7FOK.js +2 -0
  6. package/dist/cdn/ADYTRVI3.js +2 -0
  7. package/dist/cdn/BMAH7QBK.js +2 -0
  8. package/dist/cdn/{232BH3SJ.js → BOSIIV32.js} +1 -1
  9. package/dist/cdn/DFDXMCOB.js +2 -0
  10. package/dist/cdn/DWUHV2MR.js +2 -0
  11. package/dist/cdn/EJYLPUWU.js +2 -0
  12. package/dist/cdn/G3IYOM43.js +2 -0
  13. package/dist/cdn/HY65JC4L.js +2 -0
  14. package/dist/cdn/I6VYJHWH.js +2 -0
  15. package/dist/cdn/J2J3YRCY.js +2 -0
  16. package/dist/cdn/JZRBBRRT.js +2 -0
  17. package/dist/cdn/L5RQNCAS.js +2 -0
  18. package/dist/cdn/NNP2GXAL.js +2 -0
  19. package/dist/cdn/{OOBX2C2L.js → PECTYCLV.js} +1 -1
  20. package/dist/cdn/PFBJ5AAH.js +2 -0
  21. package/dist/cdn/PMV2N3L3.js +2 -0
  22. package/dist/cdn/{YVCGEEMG.js → SQL3PEL7.js} +1 -1
  23. package/dist/cdn/T62KUQBN.js +2 -0
  24. package/dist/cdn/{YG4PY2H3.js → TJ7PO6GP.js} +1 -1
  25. package/dist/cdn/TTH3HGVV.js +2 -0
  26. package/dist/cdn/TWW63D32.js +2 -0
  27. package/dist/cdn/UI52HM3O.js +2 -0
  28. package/dist/cdn/WLDOB2AM.js +2 -0
  29. package/dist/cdn/{MINFRX4Y.js → XCIAOWMG.js} +1 -1
  30. package/dist/cdn/{6XE5JNJ7.js → XG35NKST.js} +3 -3
  31. package/dist/cdn/{WJ3TYWP2.js → XRQOTHR7.js} +1 -1
  32. package/dist/cdn/Z5QBBHLD.js +2 -0
  33. package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
  34. package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
  35. package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
  36. package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
  37. package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
  38. package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
  39. package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
  40. package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
  41. package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
  42. package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
  43. package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
  44. package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
  45. package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
  46. package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
  47. package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
  48. package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
  49. package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
  50. package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
  51. package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
  52. package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
  53. package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
  54. package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
  55. package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
  56. package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
  57. package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
  58. package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
  59. package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
  60. package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
  61. package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
  62. package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
  63. package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
  64. package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
  65. package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
  66. package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
  67. package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
  68. package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
  69. package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
  70. package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
  71. package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
  72. package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
  73. package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
  74. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
  75. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
  76. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
  77. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
  78. package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
  79. package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
  80. package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
  81. package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
  82. package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
  83. package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
  84. package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
  85. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
  86. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
  87. package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
  88. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
  89. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
  90. package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
  91. package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
  92. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
  93. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
  94. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
  95. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
  96. package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
  97. package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
  98. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
  99. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
  100. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
  101. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
  102. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
  103. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
  104. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
  105. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
  106. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
  107. package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
  108. package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
  109. package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
  110. package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
  111. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
  112. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
  113. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
  114. package/dist/cdn/index.js +1 -1
  115. package/dist/cdn/main.css +1 -1
  116. package/dist/chunks/layer-utils.js +52 -40
  117. package/dist/chunks/locale.js +14 -6
  118. package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
  119. package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
  120. package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
  121. package/dist/components/arcgis-color-input/customElement.js +6 -6
  122. package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
  123. package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
  124. package/dist/components/arcgis-field-info/customElement.js +245 -213
  125. package/dist/components/arcgis-field-info/index.js +1 -0
  126. package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
  127. package/dist/components/arcgis-field-pick-list/customElement.js +43 -51
  128. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
  129. package/dist/components/arcgis-histogram/customElement.d.ts +30 -0
  130. package/dist/components/arcgis-histogram/customElement.js +103 -90
  131. package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
  132. package/dist/components/arcgis-picker-input/customElement.js +7 -7
  133. package/dist/components/arcgis-slider/customElement.d.ts +4 -3
  134. package/dist/components/arcgis-slider/customElement.js +308 -288
  135. package/dist/components/arcgis-slider-field/customElement.d.ts +292 -0
  136. package/dist/components/arcgis-slider-field/customElement.js +375 -0
  137. package/dist/components/arcgis-slider-field/index.d.ts +1 -0
  138. package/dist/components/arcgis-slider-field/index.js +2 -0
  139. package/dist/components/arcgis-ticks/customElement.js +100 -79
  140. package/dist/components/arcgis-unique-values-list/customElement.js +26 -26
  141. package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
  142. package/dist/components/arcgis-value-picker/customElement.js +87 -0
  143. package/dist/components/arcgis-value-picker/index.d.ts +1 -0
  144. package/dist/components/arcgis-value-picker/index.js +3 -0
  145. package/dist/components/arcgis-value-picker/types.d.ts +69 -0
  146. package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
  147. package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
  148. package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
  149. package/dist/components/arcgis-value-picker-collection/index.js +1 -0
  150. package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
  151. package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
  152. package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
  153. package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
  154. package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
  155. package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
  156. package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
  157. package/dist/components/arcgis-value-picker-label/index.js +1 -0
  158. package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
  159. package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
  160. package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
  161. package/dist/components/arcgis-value-picker-slider/index.js +3 -0
  162. package/dist/docs/api.json +1 -1
  163. package/dist/docs/docs.json +1 -1
  164. package/dist/docs/vscode.css-custom-data.json +1 -1
  165. package/dist/docs/vscode.html-custom-data.json +1 -1
  166. package/dist/docs/web-types.json +1 -1
  167. package/dist/index.d.ts +60 -0
  168. package/dist/loader.js +11 -5
  169. package/dist/types/lumina.d.ts +46 -1
  170. package/dist/types/preact.d.ts +52 -1
  171. package/dist/types/react.d.ts +58 -1
  172. package/dist/types/stencil.d.ts +46 -1
  173. package/package.json +5 -5
  174. package/dist/cdn/2MN6S2HH.js +0 -2
  175. package/dist/cdn/4BJYJUMR.js +0 -2
  176. package/dist/cdn/5I5ODGDD.js +0 -2
  177. package/dist/cdn/AGGCAE6P.js +0 -2
  178. package/dist/cdn/BDF4ZLUF.js +0 -2
  179. package/dist/cdn/F45Q3BRT.js +0 -2
  180. package/dist/cdn/GEWXC2ZR.js +0 -2
  181. package/dist/cdn/HWEOBUAY.js +0 -2
  182. package/dist/cdn/IRIB5DXG.js +0 -2
  183. package/dist/cdn/KPJCYYYQ.js +0 -2
  184. package/dist/cdn/NKMDS2IH.js +0 -2
  185. package/dist/cdn/ORSF6IOL.js +0 -2
  186. package/dist/cdn/QEW7H22O.js +0 -2
  187. package/dist/cdn/UMIMGOKS.js +0 -2
  188. package/dist/cdn/VUQJROFR.js +0 -2
  189. package/dist/cdn/YSXFXVP6.js +0 -2
  190. package/dist/cdn/YVWFGK4M.js +0 -2
  191. package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
  192. /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
  193. /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
@@ -1 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-scrim";
1
2
  export * from "./customElement.js";
@@ -17,10 +17,12 @@ import type VoxelLayer from "@arcgis/core/layers/VoxelLayer.js";
17
17
  import type WCSLayer from "@arcgis/core/layers/WCSLayer.js";
18
18
  import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
19
19
  import type CatalogLayer from "@arcgis/core/layers/CatalogLayer.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 FieldInfoLayer = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | ImageryTileLayer | KnowledgeGraphSublayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | SceneLayer | StreamLayer | Sublayer | SubtypeGroupLayer | SubtypeSublayer | VoxelLayer | WCSLayer | WFSLayer;
28
+ export type FieldInfoLayer = AnnotationFeatureLayer | CatalogFootprintLayer | CatalogLayer | CSVLayer | DimensionFeatureLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | ImageryTileLayer | KnowledgeGraphSublayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | SceneLayer | StreamLayer | Sublayer | SubtypeGroupLayer | SubtypeSublayer | VoxelLayer | WCSLayer | WFSLayer;
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as F } from "../../chunks/runtime.js";
3
- import { keyed as y } from "lit/directives/keyed.js";
4
- import { LitElement as w, createEvent as r, renderElement as $, nothing as h, safeStyleMap as u, safeClassMap as v } from "@arcgis/lumina";
3
+ import { keyed as w } from "lit/directives/keyed.js";
4
+ import { LitElement as $, createEvent as r, renderElement as y, nothing as h, safeStyleMap as u, safeClassMap as v } from "@arcgis/lumina";
5
5
  import { createRef as a, ref as c } from "lit/directives/ref.js";
6
6
  import { html as l, css as C } from "lit";
7
- import { Task as k } from "@lit/task";
8
- import { log as f, composeMissingPropertyMessage as S } from "@arcgis/toolkit/log";
7
+ import { Task as S } from "@lit/task";
8
+ import { log as f, composeMissingPropertyMessage as x } from "@arcgis/toolkit/log";
9
9
  import { F as g } from "../../chunks/internal-types.js";
10
- import { i as x } from "../../chunks/commonFunctions.js";
11
- import { u as b } from "../../chunks/useT9n.js";
10
+ import { i as b } from "../../chunks/general.js";
11
+ import { u as k } from "../../chunks/useT9n.js";
12
12
  const n = /* @__PURE__ */ new Map();
13
13
  n.set("oid", "key");
14
14
  n.set("guid", "key");
@@ -26,13 +26,13 @@ n.set("date-only", "calendar");
26
26
  n.set("time-only", "clock");
27
27
  n.set("timestamp-offset", "time-zone");
28
28
  n.set("string", "string");
29
- const B = ({ fieldType: m }) => l`<calcite-icon scale=s .icon=${n.get(m)}></calcite-icon>`, E = C`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
30
- class L extends w {
29
+ const L = ({ fieldType: m }) => l`<calcite-icon scale=s .icon=${n.get(m)}></calcite-icon>`, B = C`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
30
+ class I extends $ {
31
31
  constructor() {
32
- super(...arguments), this._messages = b({ blocking: !0 }), this.popoverNode = a(), this.listNode = a(), this.flowElement = a(), this.panelElement = a(), this.dropdownNode = a(), this.fieldInfoFlowItemEl = a(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this._propWatcherTask = new k(this, {
32
+ super(...arguments), this._messages = k({ blocking: !0 }), this.popoverNode = a(), this.listNode = a(), this.flowElement = a(), this.panelElement = a(), this.dropdownNode = a(), this.fieldInfoFlowItemEl = a(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this._propWatcherTask = new S(this, {
33
33
  task: async ([e]) => {
34
- if (!this.listOnly && !x(e?.refElement))
35
- throw f("error", this, S("popoverProps")), new Error();
34
+ if (!this.listOnly && !b(e?.refElement))
35
+ throw f("error", this, x("popoverProps")), new Error();
36
36
  this._propWatcherTask.autoRun = !1;
37
37
  },
38
38
  args: () => [this.popoverProps]
@@ -42,7 +42,7 @@ class L extends w {
42
42
  this.properties = { lastSortBy: 16, filterFields: 16, mapView: 0, view: 0, layer: 0, fields: 0, selectedFields: 0, listOnly: 5, popoverProps: 0, showFieldInfo: 5, showFieldTypeIcon: 5, showFieldName: 5, showDescription: 5, showSelectionAll: 5, showCancel: 5, hideCancel: 5, showSort: 5, hideSort: 5, showFilterLength: 9, multiple: 5, heading: 1, okBtnText: 1, filterPlaceholderText: 1, filterNoResultsText: 1, sortBy: 1, groupFieldsAndExpressions: 5, fieldsGroupHeading: 1, expressionsGroupHeading: 1, customExpressionCheck: 0 };
43
43
  }
44
44
  static {
45
- this.styles = E;
45
+ this.styles = B;
46
46
  }
47
47
  async reposition() {
48
48
  await this.popoverNode.value?.reposition();
@@ -88,8 +88,8 @@ class L extends w {
88
88
  }
89
89
  getSortedList(e) {
90
90
  let t = [...e];
91
- const i = t.filter((s) => s.type === "none");
92
- return t = t.filter((s) => s.type !== "none"), this.lastSortBy === "display" ? t.sort((s, o) => s.alias.localeCompare(o.alias)) : this.lastSortBy === "field" ? t.sort((s, o) => s.name.localeCompare(o.name)) : this.lastSortBy === "type" && t.sort((s, o) => s.type.localeCompare(o.type)), t = t.concat(i), t;
91
+ const s = t.filter((i) => i.type === "none");
92
+ return t = t.filter((i) => i.type !== "none"), this.lastSortBy === "display" ? t.sort((i, o) => i.alias.localeCompare(o.alias)) : this.lastSortBy === "field" ? t.sort((i, o) => i.name.localeCompare(o.name)) : this.lastSortBy === "type" && t.sort((i, o) => i.type.localeCompare(o.type)), t = t.concat(s), t;
93
93
  }
94
94
  isExpression(e) {
95
95
  return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(g.expression);
@@ -132,12 +132,12 @@ class L extends w {
132
132
  ];
133
133
  }
134
134
  addFieldInfoFlowItem(e, t) {
135
- const i = this.flowElement.value, s = $(l`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${u(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(o) => {
135
+ const s = this.flowElement.value, i = y(l`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${u(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(o) => {
136
136
  o.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
137
137
  t.setFocus();
138
138
  }, 300);
139
139
  }} ${c(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? h} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
140
- i.appendChild(s), this.panelElement.value.selected = !1, this.fieldInfoFlowItemEl?.value.setFocus();
140
+ s.appendChild(i), this.panelElement.value.selected = !1, this.fieldInfoFlowItemEl?.value.setFocus();
141
141
  }
142
142
  usingCustomGroups() {
143
143
  return !!this.fields.length && "fields" in this.fields[0];
@@ -151,12 +151,12 @@ class L extends w {
151
151
  reorderSelectedFieldsByCurrentListOrder() {
152
152
  if (!this.selectedFields.length)
153
153
  return !1;
154
- const e = this.getAllFields().map((o) => o.name), t = new Set(this.selectedFields), i = e.filter((o) => t.has(o)), s = (
154
+ const e = this.getAllFields().map((o) => o.name), t = new Set(this.selectedFields), s = e.filter((o) => t.has(o)), i = (
155
155
  // adding/removing fields
156
- i.length !== this.selectedFields.length || // reordering fields
157
- i.some((o, p) => o !== this.selectedFields[p])
156
+ s.length !== this.selectedFields.length || // reordering fields
157
+ s.some((o, p) => o !== this.selectedFields[p])
158
158
  );
159
- return s && (this.selectedFields = [...i]), s;
159
+ return i && (this.selectedFields = [...s]), i;
160
160
  }
161
161
  render() {
162
162
  return this._propWatcherTask.render({
@@ -177,30 +177,22 @@ class L extends w {
177
177
  });
178
178
  }
179
179
  renderList() {
180
- const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.getAllFields(), i = t.length >= this.showFilterLength;
181
- return l`${t.length ? l`<calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} class=${v(this.listOnly ? "" : "content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => {
182
- const s = this.listNode.value.selectedItems.map((d) => d.value), o = this.selectedFields.filter((d) => s.includes(d)), p = s.filter((d) => !this.selectedFields.includes(d));
180
+ const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.getAllFields(), s = t.length >= this.showFilterLength;
181
+ return l`${t.length ? l`<calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} class=${v(this.listOnly ? "" : "content")} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => {
182
+ const i = this.listNode.value.selectedItems.map((d) => d.value), o = this.selectedFields.filter((d) => i.includes(d)), p = i.filter((d) => !this.selectedFields.includes(d));
183
183
  this.selectedFields = [.../* @__PURE__ */ new Set([...o, ...p])], this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
184
- }} @calciteListFilter=${(s) => {
185
- s.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((o) => o.value), this.filterText = this.listNode.value.filterText;
186
- }} ${c(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple && this.showSelectionAll && (!i || !this.filterText || this.filterFields?.length) ? this.renderSelectionButton() : null}${this.renderListItems()}</calcite-list>` : l`<slot name=no-fields></slot>`}${this.filterFields && !this.filterFields.length && this.listNode.value && this.filterNoResultsText?.length !== 0 ? l`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
184
+ }} @calciteListFilter=${(i) => {
185
+ i.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((o) => o.value), this.filterText = this.listNode.value.filterText;
186
+ }} ${c(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple && this.showSelectionAll && (!s || !this.filterText || this.filterFields?.length) ? this.renderSelectionButton() : null}${this.renderListItems()}</calcite-list>` : l`<slot name=no-fields></slot>`}${this.filterFields && !this.filterFields.length && this.listNode.value && this.filterNoResultsText?.length !== 0 ? l`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
187
187
  }
188
188
  renderSortButton() {
189
189
  const e = this.getAllFields();
190
190
  if (!(e.length >= this.showFilterLength && !this.hideSort))
191
191
  return "";
192
- const i = e.every((s) => !!s.type);
192
+ const s = e.every((i) => !!i.type);
193
193
  return l`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields ? this.filterFields.length < 4 : !1} @calciteDropdownOpen=${() => {
194
194
  this.observer?.disconnect(), this.popoverNode.value && this.observer?.observe(this.popoverNode.value, { attributes: !0 });
195
- }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${c(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? h}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @click=${() => this.setSortBy("default")} @keydown=${(s) => {
196
- s.stopPropagation(), (s.key === " " || s.key === "Enter") && this.setSortBy("default");
197
- }}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @click=${() => this.setSortBy("display")} @keydown=${(s) => {
198
- s.stopPropagation(), (s.key === " " || s.key === "Enter") && this.setSortBy("display");
199
- }}>${this._messages.displayName}</calcite-dropdown-item>${i && l`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @click=${() => this.setSortBy("type")} @keydown=${(s) => {
200
- s.stopPropagation(), (s.key === " " || s.key === "Enter") && this.setSortBy("type");
201
- }}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @click=${() => this.setSortBy("field")} @keydown=${(s) => {
202
- s.stopPropagation(), (s.key === " " || s.key === "Enter") && this.setSortBy("field");
203
- }}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
195
+ }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${c(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? h}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s && l`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
204
196
  }
205
197
  renderSelectionButton() {
206
198
  return l`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
@@ -210,18 +202,18 @@ class L extends w {
210
202
  this.selectedFields = [.../* @__PURE__ */ new Set([...this.selectedFields, ...this.filterFields])];
211
203
  else {
212
204
  const t = this.getAllFields();
213
- this.selectedFields = t.map((i) => i.name);
205
+ this.selectedFields = t.map((s) => s.name);
214
206
  }
215
207
  this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields });
216
208
  }}>${this.canDeselectAll() ? this._messages.deselectAll : this._messages.selectAll}</calcite-button></div>`;
217
209
  }
218
210
  renderListItems() {
219
211
  const e = this.allLists.filter((t) => !!t.fields.length);
220
- return e.length === 1 && !e[0].title ? e[0].fields.map((t) => this.renderCalciteListItem(t)) : e.map((i) => l`<calcite-list-item-group .heading=${i.title}>${i.fields.map((s) => this.renderCalciteListItem(s))}</calcite-list-item-group>`);
212
+ return e.length === 1 && !e[0].title ? e[0].fields.map((t) => this.renderCalciteListItem(t)) : e.map((s) => l`<calcite-list-item-group .heading=${s.title}>${s.fields.map((i) => this.renderCalciteListItem(i))}</calcite-list-item-group>`);
221
213
  }
222
214
  renderCalciteListItem(e) {
223
- const t = this.showFieldInfoCheck(e), i = this.showFieldTypeIcon && !!e.type;
224
- return y(e.name, l`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
215
+ const t = this.showFieldInfoCheck(e), s = this.showFieldTypeIcon && !!e.type;
216
+ return w(e.name, l`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
225
217
  if (this.showFieldName && e.hideFieldName !== !0)
226
218
  return `{${e.name}}`;
227
219
  if (this.showDescription && e.hideDescription !== !0 && e.description)
@@ -229,26 +221,26 @@ class L extends w {
229
221
  })()} .value=${e.name} .selected=${!this.multiple && e.name === this.selectedFields[0] || this.multiple && this.selectedFields.includes(e.name)} .metadata=${{
230
222
  label: e.alias,
231
223
  fieldName: e.name
232
- }}>${i && l`<div slot=actions-end class="field-icons">${B({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
224
+ }}>${s && l`<div slot=actions-end class="field-icons">${L({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
233
225
  }
234
226
  renderInfoAction(e, t) {
235
- const { _messages: i } = this;
236
- return t ? l`<calcite-action slot=actions-end .text=${i.info} title=${i.info ?? h} scale=s icon=information @click=${(s) => {
237
- s.stopPropagation();
238
- const o = s.currentTarget;
227
+ const { _messages: s } = this;
228
+ return t ? l`<calcite-action slot=actions-end .text=${s.info} title=${s.info ?? h} scale=s icon=information @click=${(i) => {
229
+ i.stopPropagation();
230
+ const o = i.currentTarget;
239
231
  this.addFieldInfoFlowItem(e, o);
240
232
  }}></calcite-action>` : "";
241
233
  }
242
234
  renderEditAction(e) {
243
235
  const { _messages: t } = this;
244
- return e.showEditAction ? l`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? h} scale=s icon=pencil @click=${(i) => {
245
- i.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
236
+ return e.showEditAction ? l`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? h} scale=s icon=pencil @click=${(s) => {
237
+ s.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
246
238
  }}></calcite-action>` : "";
247
239
  }
248
240
  renderDeleteAction(e) {
249
241
  const { _messages: t } = this;
250
- return e.showDeleteAction ? l`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? h} scale=s icon=trash @click=${(i) => {
251
- i.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
242
+ return e.showDeleteAction ? l`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? h} scale=s icon=trash @click=${(s) => {
243
+ s.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
252
244
  }}></calcite-action>` : "";
253
245
  }
254
246
  renderAddButton() {
@@ -262,7 +254,7 @@ class L extends w {
262
254
  }}>${this._messages.cancel}</calcite-button>`;
263
255
  }
264
256
  }
265
- F("arcgis-field-pick-list", L);
257
+ F("arcgis-field-pick-list", I);
266
258
  export {
267
- L as ArcgisFieldPickList
259
+ I as ArcgisFieldPickList
268
260
  };
@@ -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;
@@ -188,6 +188,25 @@ export abstract class ArcgisHistogram extends LitElement {
188
188
  accessor icon: string | undefined;
189
189
  /** The component's default label. */
190
190
  accessor label: string | undefined;
191
+ /**
192
+ * Allows customizing how the average and standard deviation line labels render on the histogram. Note that this property is only responsible
193
+ * for formatting the numeric value of the data line it represents, so the average and standard-deviation symbols are preserved regardless of
194
+ * whether it is set. Return `null` or `undefined` to use the default formatting.
195
+ *
196
+ * @example
197
+ * ```js
198
+ * histogram.labelFormatter = (value, type, defaultFormatter) => {
199
+ * if (type === "average") {
200
+ * return value + "%";
201
+ * }
202
+ *
203
+ * if (type === "standard-deviation") {
204
+ * return value.toFixed(2);
205
+ * }
206
+ * };
207
+ * ```
208
+ */
209
+ accessor labelFormatter: (value: number, type: "average" | "standard-deviation", defaultFormatter: (value: number) => string) => string | null | undefined;
191
210
  /**
192
211
  * Determines the orientation of the histogram.
193
212
  *
@@ -255,4 +274,15 @@ export abstract class ArcgisHistogram extends LitElement {
255
274
  * ```
256
275
  */
257
276
  accessor standardDeviation: number | undefined;
277
+ /**
278
+ * 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).
279
+ *
280
+ * @default 1
281
+ * @example
282
+ * ```js
283
+ * // Will render lines for +σ, +2σ, +3σ, and -σ, -2σ, -3σ
284
+ * histogram.standardDeviationCount = 3;
285
+ * ```
286
+ */
287
+ accessor standardDeviationCount: number;
258
288
  }
@@ -2,59 +2,61 @@
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 { g 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%}.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, $] = 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, v = n - C, [L, _] = e === "vertical" ? [0, v * (a / o)] : [s - $ - v * (s / o), a - b];
16
+ return [L, _, $, 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
+ const a = [];
21
+ return t != null && a.push({
22
22
  value: t,
23
23
  symbol: "x̄",
24
24
  lineClass: "average-data-line"
25
- }), r != null && n != null && e != null && s.push(...G(n, e, r, t)), i && s.push(...i), s;
25
+ }), i != null && e != null && r != null && a.push(
26
+ ...G(e, r, i, n, t)
27
+ ), s && a.push(...s), a;
26
28
  }
27
- function N(t, r, n, e, i) {
29
+ function N(t, i, n, e, r) {
28
30
  if (n == null)
29
31
  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];
32
+ const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
33
+ if (i === "vertical") {
34
+ let l = o - s * o || 1;
35
+ return l = Math.round(l) + 0.5, [0, "100%", l, l];
34
36
  }
35
- let l = s * a || 1;
36
- return l = Math.round(l) + 0.5, [l, l, "100%", 0];
37
+ let c = s * a || 1;
38
+ return c = Math.round(c) + 0.5, [c, c, "100%", 0];
37
39
  }
38
- function P(t, r, n, e, i) {
40
+ function P(t, i, n, e, r) {
39
41
  if (n == null)
40
42
  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];
43
+ const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
44
+ return i === "vertical" ? [a, o - s * o] : [0, s * a];
43
45
  }
44
- function T(t, r, n) {
46
+ function T(t, i, n) {
45
47
  if (!t || t.length === 0)
46
48
  return null;
47
- if (L(t)) {
48
- const e = t.map((i) => ({
49
- ...i,
50
- color: w(i.color ?? n)
49
+ if (V(t)) {
50
+ const e = t.map((r) => ({
51
+ ...r,
52
+ color: w(r.color ?? n)
51
53
  }));
52
54
  return e.unshift({
53
- color: r,
55
+ color: i,
54
56
  minValue: Number.NEGATIVE_INFINITY,
55
57
  maxValue: e[0].minValue
56
58
  }), e.push({
57
- color: r,
59
+ color: i,
58
60
  minValue: e[e.length - 1].maxValue,
59
61
  maxValue: Number.POSITIVE_INFINITY
60
62
  }), e;
@@ -64,45 +66,45 @@ function T(t, r, n) {
64
66
  color: w(e.color ?? n)
65
67
  }));
66
68
  }
67
- function A(t, r, n, e) {
69
+ function A(t, i, n, e) {
68
70
  if (!t || t.length === 0)
69
71
  return n;
70
- if (L(t)) {
71
- const i = H(t, r);
72
- if (i.length === 0)
72
+ if (V(t)) {
73
+ const r = H(t, i);
74
+ if (r.length === 0)
73
75
  return n;
74
76
  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}%)`;
77
+ const { color: s = n, weight: a } = r[0], { color: o = n, weight: c } = r[1] ?? r[0], l = a + c;
78
+ return `color-mix(in srgb, ${s} ${a / l * 100}%, ${o} ${c / l * 100}%)`;
77
79
  }
78
- return i[0].color ?? n;
80
+ return r[0].color ?? n;
79
81
  }
80
- return W(t, r);
82
+ return W(t, i);
81
83
  }
82
- function H(t, r) {
84
+ function H(t, i) {
83
85
  const n = [];
84
86
  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 });
87
+ const r = Math.max(0, Math.min(i.maxValue, e.maxValue) - Math.max(i.minValue, e.minValue));
88
+ r > 0 && n.push({ color: e.color, weight: r });
87
89
  }
88
- return n.sort((e, i) => i.weight - e.weight);
90
+ return n.sort((e, r) => r.weight - e.weight);
89
91
  }
90
- function W(t, r) {
91
- const n = (r.maxValue - r.minValue) / 2 + r.minValue;
92
+ function W(t, i) {
93
+ const n = (i.maxValue - i.minValue) / 2 + i.minValue;
92
94
  if (n > t[t.length - 1].value)
93
95
  return t[t.length - 1].color;
94
96
  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;
97
+ const r = t[e], s = t[e + 1];
98
+ if (n <= r.value)
99
+ return r.color;
98
100
  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}%)`;
101
+ const a = (n - r.value) / (s.value - r.value) * 100;
102
+ return `color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`;
101
103
  }
102
104
  }
103
105
  return t[t.length - 1].color;
104
106
  }
105
- function L(t) {
107
+ function V(t) {
106
108
  return t[0] != null && "minValue" in t[0];
107
109
  }
108
110
  function w(t) {
@@ -110,76 +112,87 @@ function w(t) {
110
112
  return t;
111
113
  if (Array.isArray(t))
112
114
  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})`;
115
+ const { r: i, g: n, b: e, a: r = 1 } = t;
116
+ return `rgba(${i}, ${n}, ${e}, ${r})`;
115
117
  }
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;
118
+ function G(t, i, n, e, r) {
119
+ const s = 0.06 * (i - t);
120
+ return Y(n, e, r).map((a, o, c) => {
121
+ const l = c.length / 2, u = a > r ? "+" : "-", g = o >= l ? o - l + 1 : l - o;
120
122
  return {
121
- symbol: `${c}${u === 1 ? "" : u}σ`,
122
- value: s
123
+ symbol: `${u}${g === 1 ? "" : g}σ`,
124
+ value: a
123
125
  };
124
- });
126
+ }).filter(({ value: a }) => Math.abs(r - a) > s);
125
127
  }
126
- function Y(t, r) {
127
- if (r == null || t == null)
128
+ function Y(t, i, n) {
129
+ if (n == null || t == null)
128
130
  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;
131
+ const e = i, r = [];
132
+ for (let s = e * -1; s <= e; s++)
133
+ s !== 0 && r.push(n + s * t);
134
+ return r;
133
135
  }
134
- const V = "var(--arcgis-histogram-bar-color)", U = "var(--arcgis-histogram-stop-color)";
135
- class j extends I {
136
+ const D = "var(--arcgis-histogram-bar-color)", U = "var(--arcgis-histogram-stop-color)";
137
+ class j extends F {
136
138
  constructor() {
137
- super(...arguments), this._messages = k(), this._normalizedStops = null, this._formatLabel = (r) => z(this._messages._lang, this._numberFormatterOptions).format(r), this._numberFormatterOptions = {
139
+ super(...arguments), this._messages = k(), this._normalizedStops = null, this.#t = (i, n) => {
140
+ const e = (r) => R(this._messages._lang, this._numberFormatterOptions).format(r);
141
+ return this.labelFormatter?.(i, n, e) ?? e(i);
142
+ }, this._numberFormatterOptions = {
138
143
  maximumFractionDigits: 2
139
- }, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1;
144
+ }, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1, this.standardDeviationCount = 1;
140
145
  }
141
146
  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 };
147
+ 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
148
  }
144
149
  static {
145
- this.styles = F;
150
+ this.styles = z;
146
151
  }
152
+ #t;
147
153
  loaded() {
148
- const r = new ResizeObserver((i) => {
149
- for (const s of i) {
154
+ const i = new ResizeObserver((r) => {
155
+ for (const s of r) {
150
156
  const { width: a, height: o } = s.contentRect;
151
157
  this.containerDimensions = [a, o];
152
158
  }
153
159
  }), { width: n, height: e } = this.el.getBoundingClientRect();
154
- this.containerDimensions = [n, e], r.observe(this.el);
160
+ this.containerDimensions = [n, e], i.observe(this.el);
155
161
  }
156
- willUpdate(r) {
157
- r.has("colorStops") && (this._normalizedStops = T(this.colorStops, V, U));
162
+ willUpdate(i) {
163
+ i.has("colorStops") && (this._normalizedStops = T(this.colorStops, D, U));
158
164
  }
159
165
  render() {
160
- const { label: r } = this;
161
- return y`<div role=img .ariaLabel=${r ?? void 0} class="content">${this._renderContent()}</div>`;
166
+ const { label: i } = this;
167
+ return y`<div role=img .ariaLabel=${i ?? void 0} class="content">${this._renderContent()}</div>`;
162
168
  }
163
169
  _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;
170
+ const { containerDimensions: [i, n] } = this, e = "bg-fill", r = i ? [
171
+ d`<defs><clipPath id=${e}><rect height=${n ?? h} width=${i ?? h} x=0 y=0 /></clipPath></defs>`,
172
+ d`<g style=${x({ clipPath: `url(#${e})` })}><g>${this._renderBars()}</g></g>`,
173
+ d`<g>${this._renderLines()}</g>`
174
+ ] : [];
175
+ return y`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${r}</svg>`;
166
176
  }
167
177
  _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} />`;
178
+ const { bins: i, _messages: n } = this, e = S(this.bins, this.min, this.max, this.layout, this.containerDimensions);
179
+ return !e || !i ? null : e.map((r, s) => {
180
+ const [a, o, c, l] = r, u = i[s], g = n?.barLabel ? E(n.barLabel, u) : "";
181
+ return d`<rect style=${x({
182
+ fill: A(this._normalizedStops, u, D, this.colorBlendingEnabled)
183
+ })} .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
184
  });
175
185
  }
176
186
  _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 }));
187
+ 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
188
  }
179
189
  }
180
190
  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>`;
191
+ 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 ? [
192
+ d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,
193
+ d`<tspan>${a(s.value, s.lineClass === "average-data-line" ? "average" : "standard-deviation")}</tspan>`
194
+ ] : s.label, b = "lineClass" in s && s.lineClass ? s.lineClass : "data-line";
195
+ 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
196
  };
184
197
  M("arcgis-histogram", j);
185
198
  export {
@@ -29,8 +29,12 @@ export abstract class ArcgisPickerInput extends LitElement {
29
29
  accessor label: string;
30
30
  /** Convenience prop to specify common popover props. */
31
31
  accessor popoverProps: PopoverProps | undefined;
32
- /** Close the component. */
33
- close(): Promise<void>;
32
+ /**
33
+ * Close the component.
34
+ *
35
+ * @param options
36
+ */
37
+ close(options?: { focus: boolean; }): Promise<void>;
34
38
  /** Set focus on the component. */
35
39
  setFocus(): Promise<void>;
36
40
  /** Emitted when the component has been closed. */