@arcgis/charts-components 5.1.0-next.0 → 5.1.0-next.10

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 (212) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/{N5LXTC5F.js → 26SLWYNT.js} +1 -1
  3. package/dist/cdn/{7HHTWL5X.js → 2CT3MIAY.js} +1 -1
  4. package/dist/cdn/{MR5ILWAE.js → 2OGUU3CF.js} +1 -1
  5. package/dist/cdn/{O3LWVBLQ.js → 2QDRHHCZ.js} +1 -1
  6. package/dist/cdn/{NZKAMZX6.js → 2VC2XQAN.js} +1 -1
  7. package/dist/cdn/3EX7KPVE.js +2 -0
  8. package/dist/cdn/{FGQCHT3Y.js → 4JOHPQNV.js} +1 -1
  9. package/dist/cdn/4TREKWIK.js +2 -0
  10. package/dist/cdn/4XC2ZKSZ.js +2 -0
  11. package/dist/cdn/{CGRJSESJ.js → 5OWNSM2U.js} +1 -1
  12. package/dist/cdn/{VCDTXXBB.js → 5SRYB3Z7.js} +1 -1
  13. package/dist/cdn/{UKLAAPT4.js → 5YJR5M2A.js} +1 -1
  14. package/dist/cdn/{CF4MUKBD.js → 63GL64M2.js} +1 -1
  15. package/dist/cdn/{VLDV4SLC.js → 6HU6FAC6.js} +1 -1
  16. package/dist/cdn/{5UWCB534.js → 6PLEWH4Q.js} +1 -1
  17. package/dist/cdn/{B227HROY.js → 6WQPKBUS.js} +1 -1
  18. package/dist/cdn/72ZNLDFS.js +56 -0
  19. package/dist/cdn/{MFY2WNGC.js → 756AAFX2.js} +1 -1
  20. package/dist/cdn/{PGRROSLP.js → 7CDRRFI2.js} +1 -1
  21. package/dist/cdn/{YFQBIEH6.js → 7FASRM4Q.js} +1 -1
  22. package/dist/cdn/{F7EELFJY.js → 7VTIDISQ.js} +1 -1
  23. package/dist/cdn/{CSMPPQK6.js → A6FIEHBR.js} +1 -1
  24. package/dist/cdn/{DSCSQG33.js → AIQKILAI.js} +1 -1
  25. package/dist/cdn/{RBLN6H3R.js → AVFCOOHZ.js} +1 -1
  26. package/dist/cdn/{H2ZHJTT5.js → AYYGDEVK.js} +1 -1
  27. package/dist/cdn/{GB3TK5D3.js → BJPCRXMJ.js} +1 -1
  28. package/dist/cdn/{E2XSIMND.js → CDL4GUV6.js} +1 -1
  29. package/dist/cdn/CMRNFSZC.js +4 -0
  30. package/dist/cdn/DBBUQUSM.js +2 -0
  31. package/dist/cdn/DEAMKFX3.js +2 -0
  32. package/dist/cdn/DGTF5KBL.js +2 -0
  33. package/dist/cdn/{7F454N3C.js → DN4LNEB4.js} +2 -2
  34. package/dist/cdn/{VPF4DANX.js → DRJ4R4EQ.js} +1 -1
  35. package/dist/cdn/DSJJ45NU.js +2 -0
  36. package/dist/cdn/{7XB4DP2Y.js → E3CLVG36.js} +1 -1
  37. package/dist/cdn/EGY5AQR3.js +2 -0
  38. package/dist/cdn/{7TA3GQ2P.js → EKWDEI6U.js} +1 -1
  39. package/dist/cdn/{XVD4CGMV.js → EVWSDR7F.js} +1 -1
  40. package/dist/cdn/{VQGWUSUK.js → EYLBOIDC.js} +1 -1
  41. package/dist/cdn/FS2NVQNE.js +2 -0
  42. package/dist/cdn/{I4JPIKWZ.js → GYNFKNOC.js} +1 -1
  43. package/dist/cdn/{7OIBV6LX.js → H7FCUZ5Q.js} +1 -1
  44. package/dist/cdn/{T6J2NNJR.js → HAJ2VWEU.js} +1 -1
  45. package/dist/cdn/{OBF3ZYVJ.js → HLTV3SZ3.js} +1 -1
  46. package/dist/cdn/{4SDMBWIH.js → HT3D2REX.js} +1 -1
  47. package/dist/cdn/IRNA25SY.js +2 -0
  48. package/dist/cdn/J5U7GGIA.js +2 -0
  49. package/dist/cdn/JD74DCCM.js +2 -0
  50. package/dist/cdn/JDVXA2CS.js +2 -0
  51. package/dist/cdn/{NKTG3HYP.js → JX35IVRI.js} +1 -1
  52. package/dist/cdn/{V3NRWE2B.js → K5QY4SRM.js} +1 -1
  53. package/dist/cdn/KG447AXN.js +2 -0
  54. package/dist/cdn/{EOT7WEOM.js → KYUASK4W.js} +1 -1
  55. package/dist/cdn/{AE43AFN2.js → KZ7WEJMS.js} +1 -1
  56. package/dist/cdn/LESACRNP.js +2 -0
  57. package/dist/cdn/{GV3FPWSE.js → LEUZZRL3.js} +1 -1
  58. package/dist/cdn/{Z3ATQCGU.js → LOVVVWQQ.js} +1 -1
  59. package/dist/cdn/{ILN66JCQ.js → LRHPJGAF.js} +1 -1
  60. package/dist/cdn/{TW7SDPY6.js → N2BJICO7.js} +1 -1
  61. package/dist/cdn/{YP55GB27.js → NXF4ANBF.js} +1 -1
  62. package/dist/cdn/PCLJVVSC.js +2 -0
  63. package/dist/cdn/{OLGKBPS4.js → PHKJ7FEL.js} +1 -1
  64. package/dist/cdn/{E4Z7JPW7.js → PMJXL2RO.js} +1 -1
  65. package/dist/cdn/PTVFXORI.js +2 -0
  66. package/dist/cdn/{ACIPSEQP.js → Q2KACZBE.js} +1 -1
  67. package/dist/cdn/Q3RD465X.js +2 -0
  68. package/dist/cdn/{Z5OGHBTB.js → QHIXRP3D.js} +1 -1
  69. package/dist/cdn/{L7BKIZJN.js → QN32RSSK.js} +1 -1
  70. package/dist/cdn/{6AMFQCS7.js → R3AFJXL2.js} +1 -1
  71. package/dist/cdn/{ZMTNSPCX.js → R7NXKFI4.js} +1 -1
  72. package/dist/cdn/RGFGKNTV.js +93 -0
  73. package/dist/cdn/{I45WQ4BL.js → RGSTYQHL.js} +1 -1
  74. package/dist/cdn/RJTSFOSP.js +2 -0
  75. package/dist/cdn/{3KIKTBU4.js → S5R4OEBU.js} +1 -1
  76. package/dist/cdn/S5XUWFFZ.js +2 -0
  77. package/dist/cdn/{SGOQQYBY.js → SPAXIJWK.js} +1 -1
  78. package/dist/cdn/{UR4SN4J4.js → ST7NVAV3.js} +1 -1
  79. package/dist/cdn/{TCKWKRVQ.js → SVUBBKM5.js} +1 -1
  80. package/dist/cdn/{YBWIUGMX.js → T4VBQWR4.js} +1 -1
  81. package/dist/cdn/T7XKFYU3.js +2 -0
  82. package/dist/cdn/{4YGTK6R4.js → TEGYSOJJ.js} +1 -1
  83. package/dist/cdn/{UNGIAYCA.js → THMNUUUE.js} +1 -1
  84. package/dist/cdn/{5SBX2OSZ.js → UE4N6ASZ.js} +1 -1
  85. package/dist/cdn/V4GE3B2F.js +2 -0
  86. package/dist/cdn/VLYQJ3YH.js +2 -0
  87. package/dist/cdn/{N7QH3COK.js → VMMTJWUZ.js} +1 -1
  88. package/dist/cdn/{ITCFNAZ2.js → VPTDXGKU.js} +1 -1
  89. package/dist/cdn/VTJWIN7U.js +2 -0
  90. package/dist/cdn/{YHXUQR6R.js → VWLR4WCT.js} +1 -1
  91. package/dist/cdn/WCZWAASA.js +2 -0
  92. package/dist/cdn/XF7VOPC6.js +2 -0
  93. package/dist/cdn/XHESCLJV.js +2 -0
  94. package/dist/cdn/{CCBSYUDL.js → XJLODBLD.js} +1 -1
  95. package/dist/cdn/{UVEAGNF2.js → XZE6IPW7.js} +1 -1
  96. package/dist/cdn/Y2CT4MJ4.js +2 -0
  97. package/dist/cdn/{JEOHGL3P.js → YF6EYCSY.js} +1 -1
  98. package/dist/cdn/{INA4MWOS.js → YUFKLXMQ.js} +1 -1
  99. package/dist/cdn/{UPWTKME3.js → YXUXX2XA.js} +1 -1
  100. package/dist/cdn/{IMMCY2GO.js → ZB4GBCOX.js} +1 -1
  101. package/dist/cdn/{MAYX7C4V.js → ZNLHWCJV.js} +1 -1
  102. package/dist/cdn/{ITMPO5LO.js → ZT6KWD4G.js} +1 -1
  103. package/dist/cdn/index.js +1 -1
  104. package/dist/chunks/action-bar-utils.js +10 -9
  105. package/dist/chunks/bar-chart-model.js +1 -0
  106. package/dist/chunks/bar-chart-series.js +5 -3
  107. package/dist/chunks/box-plot-data.js +1 -1
  108. package/dist/chunks/box-plot-model.js +5 -0
  109. package/dist/chunks/chart-ui-utils.js +53 -48
  110. package/dist/chunks/chart-ui-utils2.js +1 -1
  111. package/dist/chunks/class-breaks.js +159 -94
  112. package/dist/chunks/combo-bar-line-chart-model.js +3 -0
  113. package/dist/chunks/data.js +20 -19
  114. package/dist/chunks/gauge-model.js +1 -0
  115. package/dist/chunks/heat-chart-model.js +84 -66
  116. package/dist/chunks/histogram-model.js +1 -0
  117. package/dist/chunks/index.js +3386 -3331
  118. package/dist/chunks/index2.js +33 -33
  119. package/dist/chunks/index6.js +18 -0
  120. package/dist/chunks/line-chart-model.js +2 -0
  121. package/dist/chunks/model-setter.js +4 -1
  122. package/dist/chunks/model-with-guides.js +7 -6
  123. package/dist/chunks/pie-chart-data.js +1 -1
  124. package/dist/chunks/pie-chart-model.js +2 -1
  125. package/dist/chunks/radar-chart-model.js +11 -9
  126. package/dist/chunks/scatterplot-model.js +1 -0
  127. package/dist/chunks/serial-chart-data.js +380 -371
  128. package/dist/chunks/serial-chart-model.js +9 -4
  129. package/dist/chunks/web-component-utils.js +63 -63
  130. package/dist/components/arcgis-chart/customElement.d.ts +1 -1
  131. package/dist/components/arcgis-chart/customElement.js +3140 -3155
  132. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +2 -1
  133. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +21 -23
  134. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +1 -1
  135. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +13 -16
  136. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +16 -18
  137. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +1 -1
  138. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +14 -17
  139. package/dist/components/arcgis-charts-config-create-flow/customElement.js +28 -20
  140. package/dist/components/arcgis-charts-config-format/customElement.js +20 -20
  141. package/dist/components/arcgis-charts-config-guide/customElement.js +1 -0
  142. package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +115 -105
  143. package/dist/components/arcgis-charts-config-heat-chart-data/index.js +2 -0
  144. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +45 -34
  145. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +21 -23
  146. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +23 -25
  147. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +1 -1
  148. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +8 -10
  149. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +11 -14
  150. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +19 -21
  151. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +11 -14
  152. package/dist/components/arcgis-charts-info-modal/customElement.js +52 -14
  153. package/dist/docs/api.json +1 -1
  154. package/dist/docs/docs.json +1 -1
  155. package/dist/docs/vscode.html-custom-data.json +1 -1
  156. package/dist/docs/web-types.json +1 -1
  157. package/dist/index.js +278 -277
  158. package/dist/json-schema/index.d.ts +7 -9
  159. package/dist/loader.js +4 -4
  160. package/dist/model/bar-chart-model/bar-chart-model.d.ts +3 -12
  161. package/dist/model/box-plot-model/box-plot-model.d.ts +1 -34
  162. package/dist/model/chart-model/chart-model-base.d.ts +0 -46
  163. package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +1 -14
  164. package/dist/model/gauge-model/gauge-model.d.ts +2 -11
  165. package/dist/model/heat-chart-model/heat-chart-model.d.ts +9 -10
  166. package/dist/model/histogram-model/histogram-model.d.ts +2 -11
  167. package/dist/model/line-chart-model/line-chart-model.d.ts +1 -14
  168. package/dist/model/mixins/model-with-line-marker-styling.d.ts +0 -4
  169. package/dist/model/mixins/model-with-multi-axes.d.ts +0 -3
  170. package/dist/model/pie-chart-model/pie-chart-model.d.ts +2 -17
  171. package/dist/model/radar-chart-model/radar-chart-model.d.ts +1 -14
  172. package/dist/model/scatterplot-model/scatterplot-model.d.ts +2 -11
  173. package/dist/model/serial-chart-model/serial-chart-model.d.ts +0 -42
  174. package/dist/spec/rest-js-types.d.ts +15 -0
  175. package/dist/spec/web-chart.d.ts +279 -243
  176. package/dist/utils/chart-config/utils/index.d.ts +3 -0
  177. package/dist/utils/layer/query-parser/index.d.ts +4 -1
  178. package/dist/utils/localization/interfaces.d.ts +1 -0
  179. package/dist/utils/misc/index.d.ts +22 -7
  180. package/dist/utils/type-guards/index.d.ts +15 -8
  181. package/dist/utils/ui/chart-ui-utils.d.ts +9 -5
  182. package/package.json +4 -4
  183. package/dist/cdn/2BIDUUM3.js +0 -2
  184. package/dist/cdn/4OI742MI.js +0 -2
  185. package/dist/cdn/A2TYB4C2.js +0 -2
  186. package/dist/cdn/BJJLSSQL.js +0 -2
  187. package/dist/cdn/C3QBGU3R.js +0 -2
  188. package/dist/cdn/CSHLYYDR.js +0 -2
  189. package/dist/cdn/DISBHZRX.js +0 -2
  190. package/dist/cdn/DM36XG4Z.js +0 -2
  191. package/dist/cdn/FGQ6QTNI.js +0 -2
  192. package/dist/cdn/FIBU5QUG.js +0 -2
  193. package/dist/cdn/GRFJADFY.js +0 -2
  194. package/dist/cdn/GUN4GTO3.js +0 -2
  195. package/dist/cdn/HOPCZKQO.js +0 -2
  196. package/dist/cdn/JYAZY7C6.js +0 -2
  197. package/dist/cdn/MMVAIEM3.js +0 -2
  198. package/dist/cdn/OFZOPSWX.js +0 -2
  199. package/dist/cdn/OKE67HPM.js +0 -2
  200. package/dist/cdn/OQA4LU5O.js +0 -2
  201. package/dist/cdn/OX34MEOD.js +0 -2
  202. package/dist/cdn/RESJUXIH.js +0 -2
  203. package/dist/cdn/RREICBPO.js +0 -58
  204. package/dist/cdn/T6HUC3X4.js +0 -2
  205. package/dist/cdn/W2Z3VO3C.js +0 -2
  206. package/dist/cdn/WI7OSEXJ.js +0 -2
  207. package/dist/cdn/WQS6NQUO.js +0 -2
  208. package/dist/cdn/WZJQSJPK.js +0 -2
  209. package/dist/cdn/XAWIW6KZ.js +0 -32
  210. package/dist/cdn/XPATRR6S.js +0 -2
  211. package/dist/cdn/YWRPXNSI.js +0 -2
  212. package/dist/cdn/ZARMIUOQ.js +0 -2
@@ -1,84 +1,89 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { w as c, W as r } from "./series-types.js";
3
- import { g as i } from "./runtime.js";
4
- import { fetchT9nStringsBundle as o, getElementLocale as h } from "@arcgis/toolkit/intl";
5
- function m(a) {
6
- const s = c(a.series);
7
- let e = "graph-bar";
8
- switch (s) {
9
- case r.LineSeries: {
10
- e = "graph-time-series";
2
+ import { w as o, W as e } from "./series-types.js";
3
+ import { g as h } from "./runtime.js";
4
+ import { fetchT9nStringsBundle as n, getElementLocale as p } from "@arcgis/toolkit/intl";
5
+ import { i as m } from "./utils.js";
6
+ function y(s) {
7
+ const c = o(s.series);
8
+ let t = "graph-bar";
9
+ switch (c) {
10
+ case e.LineSeries: {
11
+ t = "graph-time-series";
11
12
  break;
12
13
  }
13
- case r.PieSeries: {
14
- e = "pie-chart";
14
+ case e.PieSeries: {
15
+ t = "pie-chart";
15
16
  break;
16
17
  }
17
- case r.HistogramSeries: {
18
- e = "graph-histogram";
18
+ case e.HistogramSeries: {
19
+ t = "graph-histogram";
19
20
  break;
20
21
  }
21
- case r.ScatterSeries: {
22
- e = "graph-scatter-plot";
22
+ case e.ScatterSeries: {
23
+ t = "graph-scatter-plot";
23
24
  break;
24
25
  }
25
- case r.BoxPlotSeries: {
26
- e = "box-chart";
26
+ case e.BoxPlotSeries: {
27
+ t = "box-chart";
27
28
  break;
28
29
  }
29
- case r.HeatSeries: {
30
- e = "calendar-heat-chart";
30
+ case e.HeatSeries: {
31
+ t = "calendar-heat-chart";
31
32
  break;
32
33
  }
33
- case r.BarSeries:
34
+ case e.BarSeries:
34
35
  }
35
- return e;
36
+ return t;
36
37
  }
37
- async function b(a) {
38
- const s = await o(
39
- h(document.documentElement).t9nLocale,
40
- i("./assets/common/t9n"),
38
+ async function k(s, c) {
39
+ const t = await n(
40
+ p(document.documentElement).t9nLocale,
41
+ h("./assets/common/t9n"),
41
42
  "messages."
42
43
  );
43
- return n(a, s);
44
+ return g({
45
+ chartType: s,
46
+ commonStrings: t,
47
+ config: c
48
+ });
44
49
  }
45
- function n(a, s) {
46
- const e = s.utilsStrings;
47
- let t = "";
48
- switch (a) {
49
- case r.HistogramSeries: {
50
- t = e.chartType.histogram;
50
+ function g(s) {
51
+ const { chartType: c, commonStrings: t, config: i } = s, a = t.utilsStrings;
52
+ let r = "";
53
+ switch (c) {
54
+ case e.HistogramSeries: {
55
+ r = a.chartType.histogram;
51
56
  break;
52
57
  }
53
- case r.ScatterSeries: {
54
- t = e.chartType.scatterplot;
58
+ case e.ScatterSeries: {
59
+ r = a.chartType.scatterplot;
55
60
  break;
56
61
  }
57
- case r.BarSeries: {
58
- t = e.chartType.barChart;
62
+ case e.BarSeries: {
63
+ r = a.chartType.barChart;
59
64
  break;
60
65
  }
61
- case r.LineSeries: {
62
- t = e.chartType.lineChart;
66
+ case e.LineSeries: {
67
+ r = a.chartType.lineChart;
63
68
  break;
64
69
  }
65
- case r.PieSeries: {
66
- t = e.chartType.pieChart;
70
+ case e.PieSeries: {
71
+ r = a.chartType.pieChart;
67
72
  break;
68
73
  }
69
- case r.BoxPlotSeries: {
70
- t = e.chartType.boxPlot;
74
+ case e.BoxPlotSeries: {
75
+ r = a.chartType.boxPlot;
71
76
  break;
72
77
  }
73
- case r.HeatSeries: {
74
- t = e.chartType.heatChart;
78
+ case e.HeatSeries: {
79
+ i ? r = m(i) ? a.chartType.matrixHeatChart : a.chartType.calendarHeatChart : r = a.chartType.heatChart;
75
80
  break;
76
81
  }
77
82
  }
78
- return t;
83
+ return r;
79
84
  }
80
85
  export {
81
- n as a,
82
- b as f,
83
- m as g
86
+ g as a,
87
+ k as f,
88
+ y as g
84
89
  };
@@ -23,9 +23,9 @@ import "@arcgis/core/rest/support/StatisticDefinition.js";
23
23
  import "@arcgis/core/time/TimeExtent.js";
24
24
  import "@arcgis/core/core/promiseUtils.js";
25
25
  import "./runtime.js";
26
+ import { i as N } from "./utils.js";
26
27
  import { F as m, W as d } from "./interfaces.js";
27
28
  import { F as r } from "./common.js";
28
- import { i as N } from "./utils.js";
29
29
  const z = {
30
30
  DebounceTimer: 400,
31
31
  SliderTimer: 100,
@@ -1,90 +1,91 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import v from "@arcgis/core/Color.js";
3
+ import { compact as w, intersection as D, flatMap as E, sortBy as T } from "lodash-es";
2
4
  import "@arcgis/toolkit/type";
3
5
  import "./series-types.js";
4
- import { a as b, c as x, f as S } from "./rest-js-object-literals.js";
5
- function f(e) {
6
- const t = e.toRgba();
7
- return t[3] = Math.round(t[3] * 255), t;
8
- }
9
- function g(e, t, r) {
10
- const l = Math.max(0, Math.min(1, r));
6
+ import { a as I, c as N, f as A } from "./rest-js-object-literals.js";
7
+ function S(e, o, s) {
8
+ const l = Math.max(0, Math.min(1, s));
11
9
  return [
12
- Math.round(e[0] + (t[0] - e[0]) * l),
13
- Math.round(e[1] + (t[1] - e[1]) * l),
14
- Math.round(e[2] + (t[2] - e[2]) * l),
15
- Math.round(e[3] + (t[3] - e[3]) * l)
10
+ Math.round(e[0] + (o[0] - e[0]) * l),
11
+ Math.round(e[1] + (o[1] - e[1]) * l),
12
+ Math.round(e[2] + (o[2] - e[2]) * l),
13
+ Math.round(e[3] + (o[3] - e[3]) * l)
16
14
  ];
17
15
  }
18
- function k(e) {
19
- const { colorRamp: t, numberOfClassBreaks: r, isFlipped: l } = e, c = [];
20
- let a = [], n = !1;
21
- if (t.colorsForClassBreaks && t.colorsForClassBreaks.length > 0) {
22
- const o = t.colorsForClassBreaks.find(
23
- (s) => s.numClasses === r
16
+ function O(e) {
17
+ const { colorRamp: o, numberOfClassBreaks: s, isFlipped: l } = e;
18
+ let r = [], n = [], c = !1;
19
+ if (o.colorsForClassBreaks && o.colorsForClassBreaks.length > 0) {
20
+ const t = o.colorsForClassBreaks.find(
21
+ (a) => a.numClasses === s
24
22
  );
25
- if (o?.colors?.length === r) {
26
- const s = o.colors.map((i) => f(i));
27
- a = l ? s.reverse() : s, n = !0;
23
+ if (t?.colors?.length === s) {
24
+ const a = t.colors.map((m) => g(m));
25
+ a.every((m) => m !== void 0) && (n = l ? a.reverse() : a, c = !0);
28
26
  }
29
27
  }
30
- if (!n) {
31
- const o = t.colors || [];
32
- if (o.length > 0) {
33
- for (let s = 0; s < r; s++) {
34
- const i = r > 1 ? s / (r - 1) : 0, u = Math.floor(i * (o.length - 1)), m = Math.min(u + 1, o.length - 1), h = i * (o.length - 1) - u, p = f(o[u]), d = f(o[m]), M = g(p, d, h);
35
- c.push(M);
28
+ if (!c) {
29
+ const t = o.colors || [];
30
+ if (t.length > 0) {
31
+ for (let a = 0; a < s; a++) {
32
+ const i = s > 1 ? a / (s - 1) : 0, m = Math.floor(i * (t.length - 1)), d = Math.min(m + 1, t.length - 1), u = i * (t.length - 1) - m, f = g(t[m]), h = g(t[d]);
33
+ if (!f || !h) {
34
+ r = [];
35
+ break;
36
+ }
37
+ const y = S(f, h, u);
38
+ r.push(y);
36
39
  }
37
- a = c;
40
+ n = r;
38
41
  }
39
42
  }
40
- return a;
43
+ return n;
41
44
  }
42
- function C(e) {
43
- const { numberOfClassBreaks: t, selectedColorRamp: r, colorRamp: l, isFlipped: c } = e;
44
- let a = [], n = [136, 65, 157, 255], o = [237, 248, 251, 255];
45
- if (l && l.length > 0 && l.length === t)
46
- a = l;
47
- else if (r) {
48
- a = k({ colorRamp: r, numberOfClassBreaks: t, isFlipped: c }), o = a[0] ?? o, n = a.length > 1 && a[a.length - 1] !== void 0 ? a[a.length - 1] : n;
49
- const s = [];
50
- if (t > 1)
51
- for (let i = 0; i < t; i++) {
52
- const u = i / (t - 1), m = g(o, n, u);
53
- s.push(m);
45
+ function k(e) {
46
+ const { numberOfClassBreaks: o, selectedColorRamp: s, colorRamp: l, isFlipped: r = !1 } = e;
47
+ let n = [], c = [136, 65, 157, 255], t = [237, 248, 251, 255];
48
+ if (l && l.length > 0 && l.length === o ? n = l : s && (n = O({ colorRamp: s, numberOfClassBreaks: o, isFlipped: r })), n.length !== o) {
49
+ t = n[0] ?? l?.[0] ?? t, c = n.length > 1 && n[n.length - 1] !== void 0 ? n[n.length - 1] : c;
50
+ const a = [t];
51
+ if (o > 1) {
52
+ for (let i = 1; i < o; i++) {
53
+ const m = i / (o - 1), d = S(t, c, m);
54
+ a.push(d);
54
55
  }
55
- else
56
- s.push(o);
57
- a = s;
56
+ a.push(c);
57
+ }
58
+ n = a;
58
59
  }
59
- return a;
60
+ return n;
60
61
  }
61
- function y(e, t = 2) {
62
+ function P(e, o = 2) {
62
63
  return `≤ ${((l) => {
63
- let c = "";
64
- return l % 1 === 0 ? c = l.toString() : c = l.toFixed(t), c;
64
+ let r = "";
65
+ return l % 1 === 0 ? r = l.toString() : r = l.toFixed(o), r;
65
66
  })(e)}`;
66
67
  }
67
- function T(e) {
68
- const { classBreaksRendererResult: t, numberOfClassBreaks: r, selectedColorRamp: l, colorRamp: c, isFlipped: a } = e, n = [], o = t.classBreaksResult.classBreakInfos;
69
- if (o && o.length > 0) {
70
- const s = C({
71
- numberOfClassBreaks: r,
68
+ function q(e) {
69
+ const { classBreaksRendererResult: o, numberOfClassBreaks: s, selectedColorRamp: l, colorRamp: r, isFlipped: n } = e, c = [], t = o.classBreaksResult.classBreakInfos;
70
+ if (t && t.length > 0) {
71
+ const a = k({
72
+ numberOfClassBreaks: s,
72
73
  selectedColorRamp: l,
73
- colorRamp: c,
74
- isFlipped: a
75
- }), i = F(o.flatMap((u) => [u.maxValue]));
76
- o.forEach((u, m) => {
77
- const { maxValue: h, minValue: p } = u, d = y(h, i);
78
- n.push({
79
- classMinValue: p,
80
- classMaxValue: h,
81
- label: d,
74
+ colorRamp: r,
75
+ isFlipped: n
76
+ }), i = V(t.flatMap((m) => [m.maxValue]));
77
+ t.forEach((m, d) => {
78
+ const { maxValue: u, minValue: f } = m, h = P(u, i);
79
+ c.push({
80
+ classMinValue: f,
81
+ classMaxValue: u,
82
+ label: h,
82
83
  symbol: {
83
- type: S.SFS,
84
- style: x.Solid,
85
- color: s[m] || [0, 0, 0, 255],
84
+ type: A.SFS,
85
+ style: N.Solid,
86
+ color: a[d] || [0, 0, 0, 255],
86
87
  outline: {
87
- style: b.Solid,
88
+ style: I.Solid,
88
89
  width: 0.5,
89
90
  color: [50, 50, 50, 0.6]
90
91
  }
@@ -92,17 +93,17 @@ function T(e) {
92
93
  });
93
94
  });
94
95
  }
95
- return n;
96
+ return c;
96
97
  }
97
- function w(e) {
98
- let t = "#000000";
98
+ function z(e) {
99
+ let o = "#000000";
99
100
  if (e && Array.isArray(e) && e.length >= 3) {
100
- const r = Math.max(0, Math.min(255, Math.round(e[0] || 0))), l = Math.max(0, Math.min(255, Math.round(e[1] || 0))), c = Math.max(0, Math.min(255, Math.round(e[2] || 0))), a = r.toString(16).padStart(2, "0"), n = l.toString(16).padStart(2, "0"), o = c.toString(16).padStart(2, "0");
101
- t = `#${a}${n}${o}`;
101
+ const s = p(e[0] || 0), l = p(e[1] || 0), r = p(e[2] || 0), n = s.toString(16).padStart(2, "0"), c = l.toString(16).padStart(2, "0"), t = r.toString(16).padStart(2, "0");
102
+ o = `#${n}${c}${t}`;
102
103
  }
103
- return t;
104
+ return o;
104
105
  }
105
- const E = {
106
+ const G = {
106
107
  all: ["*"],
107
108
  light: ["light"],
108
109
  dark: ["dark"],
@@ -115,30 +116,94 @@ const E = {
115
116
  bright: ["bright"],
116
117
  subdued: ["subdued"],
117
118
  colorblindFriendly: ["colorblind-friendly"]
118
- }, I = {
119
+ }, W = {
119
120
  all: "all"
120
- }, F = (e) => {
121
- let t = 0;
122
- const r = (n, o) => {
123
- const s = 10 ** o;
124
- return Math.round(n * s) / s;
125
- }, l = (n) => {
126
- let o = 0;
127
- return n.forEach((s) => {
128
- const i = s.toString().split(".")[1];
129
- i && (o = Math.max(o, i.length));
130
- }), o;
131
- }, c = [...e].sort((n, o) => n - o), a = l(c);
132
- for (; t <= a && c.some(
133
- (o, s) => s > 0 && r(o, t) <= r(c[s - 1], t)
121
+ }, V = (e) => {
122
+ let o = 0;
123
+ const s = (c, t) => {
124
+ const a = 10 ** t;
125
+ return Math.round(c * a) / a;
126
+ }, l = (c) => {
127
+ let t = 0;
128
+ return c.forEach((a) => {
129
+ const i = a.toString().split(".")[1];
130
+ i && (t = Math.max(t, i.length));
131
+ }), t;
132
+ }, r = [...e].sort((c, t) => c - t), n = l(r);
133
+ for (; o <= n && r.some(
134
+ (t, a) => a > 0 && s(t, o) <= s(r[a - 1], o)
134
135
  ); )
135
- t++;
136
- return Math.min(t, a);
136
+ o++;
137
+ return Math.min(o, n);
137
138
  };
139
+ function p(e) {
140
+ return Math.max(0, Math.min(255, Math.round(e)));
141
+ }
142
+ function g(e) {
143
+ let o;
144
+ if (e instanceof v) {
145
+ const s = e.toRgba();
146
+ o = [p(s[0]), p(s[1]), p(s[2]), p(s[3] * 255)];
147
+ } else if (Array.isArray(e) && e.every((s) => typeof s == "number") && (e.length === 3 || e.length === 4)) {
148
+ const s = e.length >= 4 ? e[3] ?? 255 : 255, l = p(s <= 1 ? s * 255 : s);
149
+ return [p(e[0] ?? 0), p(e[1] ?? 0), p(e[2] ?? 0), l];
150
+ }
151
+ return o;
152
+ }
153
+ function Y(e, o) {
154
+ const s = {
155
+ exactN: 100,
156
+ generated: 10,
157
+ anyOverlap: 1
158
+ }, l = (t) => t.join(","), r = (t) => w(t.map(g)), n = (t, a) => D([...t], [...a]).length;
159
+ let c;
160
+ if (e?.length) {
161
+ const t = r(e.map((u) => u.symbol?.color)), a = new Set(t.map(l)), i = t.length, m = o.map((u) => {
162
+ const f = new Set(
163
+ r(k({ numberOfClassBreaks: i, selectedColorRamp: u })).map(l)
164
+ ), h = n(a, f), y = u.colorsForClassBreaks?.find((b) => b.numClasses === i)?.colors ?? [], x = new Set(r(y).map(l)), C = n(a, x), M = [
165
+ ...u.colors ?? [],
166
+ ...E(u.colorsForClassBreaks ?? [], (b) => b.colors ?? [])
167
+ ], F = new Set(r(M).map(l)), R = n(a, F), B = C * s.exactN + h * s.generated + R * s.anyOverlap;
168
+ return { ramp: u, score: B };
169
+ }), d = T(m, [
170
+ (u) => -u.score,
171
+ // descending score
172
+ (u) => u.ramp.name
173
+ // ascending name
174
+ ]);
175
+ d[0]?.score > 0 && (c = d[0].ramp);
176
+ }
177
+ return c;
178
+ }
179
+ function J(e, o) {
180
+ let s = !0;
181
+ if (!e?.length || o.length < 2)
182
+ s = !1;
183
+ else {
184
+ const l = e.map(g), r = o.map((n) => n.symbol.color);
185
+ if (l.length !== r.length)
186
+ s = !1;
187
+ else {
188
+ const n = (a, i) => !!a && !!i && a.length === i.length && a.every((m, d) => m === i[d]);
189
+ let c = 0, t = r.length - 1;
190
+ for (; c < l.length && t >= 0; ) {
191
+ if (!n(l[c], r[t])) {
192
+ s = !1;
193
+ break;
194
+ }
195
+ c++, t--;
196
+ }
197
+ }
198
+ }
199
+ return s;
200
+ }
138
201
  export {
139
- I as C,
140
- E as a,
141
- w as c,
142
- T as e,
143
- C as g
202
+ W as C,
203
+ G as a,
204
+ z as c,
205
+ q as e,
206
+ k as g,
207
+ J as i,
208
+ Y as p
144
209
  };
@@ -22,6 +22,7 @@ class o extends T {
22
22
  // ---------------------------------------------------------------------------------------------
23
23
  // Protected Methods
24
24
  // ---------------------------------------------------------------------------------------------
25
+ /** @private */
25
26
  generateDefaultConfig() {
26
27
  const e = E(this.commonStrings);
27
28
  return e.series = [
@@ -33,6 +34,8 @@ class o extends T {
33
34
  }
34
35
  /**
35
36
  * Initializes the default series for the combo bar-line chart. Used in resetting the series styling.
37
+ *
38
+ * @private
36
39
  */
37
40
  initDefaultSeries() {
38
41
  this.defaultSeries = m({
@@ -1,8 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { capitalize as y } from "lodash-es";
3
3
  import "@arcgis/toolkit/type";
4
- import { g as l, t as n, w as F, W as d, a as A } from "./series-types.js";
5
- import { bV as h, b as $, d as L, aw as N, dh as I, o as H, bK as _, cF as P, df as W, c as v, a as K } from "./index.js";
4
+ import { g as l, t as n, w as F, W as d, a as f } from "./series-types.js";
5
+ import { bV as x, b as $, d as L, aw as N, di as I, o as H, bK as _, cF as P, dg as W, c as v, a as K } from "./index.js";
6
6
  import "@arcgis/toolkit/intl";
7
7
  import "luxon";
8
8
  import "d3-array";
@@ -15,12 +15,13 @@ import "@arcgis/core/core/promiseUtils.js";
15
15
  import "@arcgis/core/request.js";
16
16
  import "./runtime.js";
17
17
  import "@arcgis/toolkit/dom";
18
+ import "@arcgis/core/intl.js";
18
19
  import { H as u, S as o, a as M } from "./common.js";
19
20
  function U(e, t) {
20
21
  let r;
21
22
  return t === n.Category && Array.isArray(e) ? r = o.customSort : t === n.Category ? r = e === l.Ascending ? o.xAxisAsc : o.xAxisDesc : e === l.Ascending ? r = o.yAxisAsc : r = o.yAxisDesc, r;
22
23
  }
23
- function de(e, t) {
24
+ function ne(e, t) {
24
25
  let r;
25
26
  return t === n.Category && Array.isArray(e) ? r = u.customSort : r = e === l.Ascending ? u.Asc : u.Desc, r;
26
27
  }
@@ -34,11 +35,11 @@ const V = (e) => {
34
35
  const t = F(e.series);
35
36
  let r = !1;
36
37
  return (t === d.BarSeries || t === d.LineSeries) && (r = V(e) === o.customSort), r;
37
- }, ne = (e) => {
38
+ }, le = (e) => {
38
39
  let t = [];
39
40
  const r = e.orderOptions?.data?.orderType;
40
41
  return E(e) && r === n.Category && (t = e.orderOptions?.data?.orderBy), t;
41
- }, le = (e, t, r, s) => {
42
+ }, ce = (e, t, r, s) => {
42
43
  const i = F(t.series), m = I(t);
43
44
  t.orderOptions ??= {};
44
45
  let a = m ? [""] : l.Ascending;
@@ -62,7 +63,7 @@ const V = (e) => {
62
63
  orderBy: a
63
64
  });
64
65
  }
65
- }, ce = (e) => e?.series?.[0]?.x ?? "", pe = (e) => {
66
+ }, pe = (e) => e?.series?.[0]?.x ?? "", me = (e) => {
66
67
  const {
67
68
  config: t,
68
69
  xAxisField: r,
@@ -71,14 +72,14 @@ const V = (e) => {
71
72
  mode: m,
72
73
  layer: a,
73
74
  numericFieldIndex: c,
74
- seriesIndex: x,
75
+ seriesIndex: h,
75
76
  splitByField: S = "",
76
77
  fieldList: O
77
78
  } = e, T = F(t.series), b = H(t.series), { idField: D, isTraditionalTypeOID: B } = _(P(a)), C = B && s.length === 1 && s[0] === D;
78
- let p = "y", f = "y";
79
+ let p = "y", A = "y";
79
80
  switch (T) {
80
81
  case d.PieSeries: {
81
- i !== A.NoAggregation ? m === M.Category ? (p = `${i}_${s[0]}_0`.toUpperCase(), f = C ? y(A.Count) : y(`${i} of ${s[0]}`)) : p = K : p = s[0];
82
+ i !== f.NoAggregation ? m === M.Category ? (p = `${i}_${s[0]}_0`.toUpperCase(), A = C ? y(f.Count) : y(`${i} of ${s[0]}`)) : p = K : p = s[0];
82
83
  break;
83
84
  }
84
85
  case d.BarSeries:
@@ -91,35 +92,35 @@ const V = (e) => {
91
92
  fieldName: r,
92
93
  numericFields: s,
93
94
  fieldList: O ?? []
94
- }) || b === W.BarAndLineFromFields ? p = v : (p = `${i}_${s[c ?? 0]}_${c ?? 0}`.toUpperCase(), f = C ? y(A.Count) : y(`${i} of ${s[c ?? 0]}`));
95
+ }) || b === W.BarAndLineFromFields ? p = v : (p = `${i}_${s[c ?? 0]}_${c ?? 0}`.toUpperCase(), A = C ? y(f.Count) : y(`${i} of ${s[c ?? 0]}`));
95
96
  else {
96
97
  const g = s[0];
97
- p = `${i}_${g}_${x ?? 0}`.toUpperCase(), f = C ? y(A.Count) : y(`${i} of ${g}`);
98
+ p = `${i}_${g}_${h ?? 0}`.toUpperCase(), A = C ? y(f.Count) : y(`${i} of ${g}`);
98
99
  }
99
100
  break;
100
101
  }
101
102
  }
102
103
  return {
103
104
  name: p,
104
- description: f
105
+ description: A
105
106
  };
106
107
  };
107
108
  function Y(e) {
108
- const { fieldName: t, fieldList: r } = e, s = h(r ?? [], t);
109
+ const { fieldName: t, fieldList: r } = e, s = x(r ?? [], t);
109
110
  return t === $ || t === L || t === N || t === void 0 || t.trim() === "" || s === void 0;
110
111
  }
111
112
  function j(e) {
112
- const { fieldName: t, fieldList: r, numericFields: s } = e, i = s.filter((m) => h(r ?? [], m)?.type !== "esriFieldTypeOID");
113
+ const { fieldName: t, fieldList: r, numericFields: s } = e, i = s.filter((m) => x(r ?? [], m)?.type !== "esriFieldTypeOID");
113
114
  return Y({ fieldName: t, fieldList: r }) && (i?.length ?? 0) > 0;
114
115
  }
115
116
  export {
116
117
  V as a,
117
- ce as b,
118
+ pe as b,
118
119
  j as c,
119
- ne as d,
120
- de as e,
120
+ le as d,
121
+ ne as e,
121
122
  U as f,
122
- pe as g,
123
- le as s,
123
+ me as g,
124
+ ce as s,
124
125
  Y as x
125
126
  };
@@ -333,6 +333,7 @@ class s extends v {
333
333
  // ---------------------------------------------------------------------------------------------
334
334
  // Protected Methods
335
335
  // ---------------------------------------------------------------------------------------------
336
+ /** @private */
336
337
  generateDefaultConfig() {
337
338
  const e = M(this.commonStrings);
338
339
  return e.series = [x({ objectIDField: N(this.layerInfo.layer).idField })], e;