@carto/ps-react-ui 4.4.1 → 4.4.3

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 (225) hide show
  1. package/dist/components.js.map +1 -1
  2. package/dist/download-config-Dqu78h2a.js +57 -0
  3. package/dist/download-config-Dqu78h2a.js.map +1 -0
  4. package/dist/error-CEkRPccv.js.map +1 -1
  5. package/dist/exports-Cr43OCul.js.map +1 -1
  6. package/dist/formatter-B9Bxn1k7.js +6 -0
  7. package/dist/formatter-B9Bxn1k7.js.map +1 -0
  8. package/dist/lasso-tool-BYbxrJ-7.js.map +1 -1
  9. package/dist/note-t51drNe0.js.map +1 -1
  10. package/dist/options-D9wflre6.js.map +1 -1
  11. package/dist/row-DTCV0Ocm.js.map +1 -1
  12. package/dist/series-CYNOu2Ju.js.map +1 -1
  13. package/dist/smart-tooltip-D4vwQpFf.js.map +1 -1
  14. package/dist/styles-Y8q7Jff3.js +118 -0
  15. package/dist/styles-Y8q7Jff3.js.map +1 -0
  16. package/dist/tooltip-BDnrRKrp.js.map +1 -1
  17. package/dist/types/components/basemaps/basemaps.d.ts +20 -0
  18. package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +11 -0
  19. package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +17 -0
  20. package/dist/types/components/lasso-tool/lasso-tool.d.ts +21 -0
  21. package/dist/types/components/list-data/list-data.d.ts +16 -0
  22. package/dist/types/components/measurement-tools/measurement-tools.d.ts +20 -0
  23. package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +17 -0
  24. package/dist/types/components/tooltip/tooltip.d.ts +13 -0
  25. package/dist/types/components/zoom-controls/zoom-controls.d.ts +16 -0
  26. package/dist/types/hooks/use-widget-ref.d.ts +4 -4
  27. package/dist/types/widgets/actions/brush-toggle/types.d.ts +8 -2
  28. package/dist/types/widgets/actions/download/download.d.ts +11 -0
  29. package/dist/types/widgets/actions/download/exports.d.ts +15 -0
  30. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +13 -0
  31. package/dist/types/widgets/actions/index.d.ts +1 -1
  32. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +1 -0
  33. package/dist/types/widgets/bar/config.d.ts +8 -4
  34. package/dist/types/widgets/category/category-ui.d.ts +3 -0
  35. package/dist/types/widgets/category/components/category-bar.d.ts +3 -0
  36. package/dist/types/widgets/category/components/category-legend.d.ts +3 -0
  37. package/dist/types/widgets/category/components/category-row-multi.d.ts +5 -1
  38. package/dist/types/widgets/category/components/category-row-other.d.ts +3 -0
  39. package/dist/types/widgets/category/components/category-row-single.d.ts +5 -1
  40. package/dist/types/widgets/category/config.d.ts +11 -0
  41. package/dist/types/widgets/category/types.d.ts +1 -0
  42. package/dist/types/widgets/echart/echart-ui.d.ts +7 -0
  43. package/dist/types/widgets/echart/echart.d.ts +6 -0
  44. package/dist/types/widgets/echart/options.d.ts +7 -0
  45. package/dist/types/widgets/echart/types.d.ts +3 -0
  46. package/dist/types/widgets/echart/utils.d.ts +41 -0
  47. package/dist/types/widgets/error/error.d.ts +10 -0
  48. package/dist/types/widgets/formula/components/item.d.ts +3 -0
  49. package/dist/types/widgets/formula/components/prefix.d.ts +3 -0
  50. package/dist/types/widgets/formula/components/row.d.ts +3 -0
  51. package/dist/types/widgets/formula/components/series.d.ts +3 -0
  52. package/dist/types/widgets/formula/components/suffix.d.ts +3 -0
  53. package/dist/types/widgets/formula/components/value.d.ts +3 -0
  54. package/dist/types/widgets/formula/config.d.ts +11 -0
  55. package/dist/types/widgets/formula/formula-ui.d.ts +3 -0
  56. package/dist/types/widgets/histogram/config.d.ts +18 -2
  57. package/dist/types/widgets/histogram/index.d.ts +2 -1
  58. package/dist/types/widgets/histogram/types.d.ts +6 -3
  59. package/dist/types/widgets/loader/loader.d.ts +22 -0
  60. package/dist/types/widgets/loader/utils.d.ts +26 -3
  61. package/dist/types/widgets/markdown/config.d.ts +10 -0
  62. package/dist/types/widgets/markdown/markdown-ui.d.ts +7 -0
  63. package/dist/types/widgets/markdown/markdown.d.ts +3 -0
  64. package/dist/types/widgets/note/note.d.ts +10 -0
  65. package/dist/types/widgets/pie/config.d.ts +8 -4
  66. package/dist/types/widgets/range/components/range-item.d.ts +3 -0
  67. package/dist/types/widgets/range/config.d.ts +5 -0
  68. package/dist/types/widgets/range/range-ui.d.ts +3 -0
  69. package/dist/types/widgets/scatterplot/config.d.ts +7 -3
  70. package/dist/types/widgets/selection-summary/selection-summary.d.ts +11 -0
  71. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +10 -0
  72. package/dist/types/widgets/spread/components/max-value.d.ts +3 -0
  73. package/dist/types/widgets/spread/components/min-value.d.ts +3 -0
  74. package/dist/types/widgets/spread/components/separator.d.ts +3 -0
  75. package/dist/types/widgets/spread/config.d.ts +11 -0
  76. package/dist/types/widgets/spread/spread-ui.d.ts +3 -0
  77. package/dist/types/widgets/stores/types.d.ts +2 -0
  78. package/dist/types/widgets/subheader/subheader.d.ts +11 -0
  79. package/dist/types/widgets/table/config.d.ts +8 -3
  80. package/dist/types/widgets/table/hooks/use-pagination.d.ts +11 -3
  81. package/dist/types/widgets/table/hooks/use-selection.d.ts +11 -2
  82. package/dist/types/widgets/table/hooks/use-sort.d.ts +11 -3
  83. package/dist/types/widgets/timeseries/config.d.ts +8 -4
  84. package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
  85. package/dist/types/widgets/{_shared → utils}/chart-config/index.d.ts +2 -0
  86. package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.d.ts +14 -9
  87. package/dist/types/widgets/utils/formatter.d.ts +2 -0
  88. package/dist/types/widgets/utils/index.d.ts +7 -0
  89. package/dist/types/widgets/wrapper/components/actions.d.ts +3 -0
  90. package/dist/types/widgets/wrapper/components/options.d.ts +3 -0
  91. package/dist/types/widgets/wrapper/components/title.d.ts +3 -0
  92. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +14 -0
  93. package/dist/types/widgets/wrapper/wrapper.d.ts +14 -0
  94. package/dist/use-widget-ref-wtFLDFCD.js.map +1 -1
  95. package/dist/utils-BOhInag6.js.map +1 -1
  96. package/dist/widgets/actions.js +720 -681
  97. package/dist/widgets/actions.js.map +1 -1
  98. package/dist/widgets/bar.js +78 -92
  99. package/dist/widgets/bar.js.map +1 -1
  100. package/dist/widgets/category.js +206 -197
  101. package/dist/widgets/category.js.map +1 -1
  102. package/dist/widgets/echart.js.map +1 -1
  103. package/dist/widgets/formula.js +54 -54
  104. package/dist/widgets/formula.js.map +1 -1
  105. package/dist/widgets/histogram.js +106 -86
  106. package/dist/widgets/histogram.js.map +1 -1
  107. package/dist/widgets/loader.js.map +1 -1
  108. package/dist/widgets/markdown.js.map +1 -1
  109. package/dist/widgets/pie.js +147 -112
  110. package/dist/widgets/pie.js.map +1 -1
  111. package/dist/widgets/range.js +23 -22
  112. package/dist/widgets/range.js.map +1 -1
  113. package/dist/widgets/scatterplot.js +46 -60
  114. package/dist/widgets/scatterplot.js.map +1 -1
  115. package/dist/widgets/selection-summary.js.map +1 -1
  116. package/dist/widgets/skeleton-loader.js.map +1 -1
  117. package/dist/widgets/spread.js +40 -41
  118. package/dist/widgets/spread.js.map +1 -1
  119. package/dist/widgets/subheader.js.map +1 -1
  120. package/dist/widgets/table.js.map +1 -1
  121. package/dist/widgets/timeseries.js +51 -65
  122. package/dist/widgets/timeseries.js.map +1 -1
  123. package/dist/widgets/toolbar-actions.js +101 -6693
  124. package/dist/widgets/toolbar-actions.js.map +1 -1
  125. package/dist/widgets/utils.js +33 -0
  126. package/dist/widgets/utils.js.map +1 -0
  127. package/dist/widgets/wrapper.js.map +1 -1
  128. package/package.json +9 -4
  129. package/src/components/basemaps/basemaps.tsx +20 -0
  130. package/src/components/geolocation-controls/geolocation-controls.tsx +11 -0
  131. package/src/components/lasso-tool/lasso-tool-inline.tsx +17 -0
  132. package/src/components/lasso-tool/lasso-tool.tsx +21 -0
  133. package/src/components/list-data/list-data.tsx +16 -0
  134. package/src/components/measurement-tools/measurement-tools.tsx +20 -0
  135. package/src/components/smart-tooltip/smart-tooltip.tsx +17 -0
  136. package/src/components/tooltip/tooltip.tsx +13 -0
  137. package/src/components/zoom-controls/zoom-controls.tsx +16 -0
  138. package/src/hooks/use-widget-ref.ts +4 -4
  139. package/src/widgets/README.md +13 -13
  140. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +42 -47
  141. package/src/widgets/actions/brush-toggle/types.ts +8 -2
  142. package/src/widgets/actions/download/download.tsx +11 -0
  143. package/src/widgets/actions/download/exports.tsx +15 -0
  144. package/src/widgets/actions/fullscreen/fullscreen.tsx +13 -0
  145. package/src/widgets/actions/index.ts +1 -0
  146. package/src/widgets/actions/relative-data/relative-data.test.tsx +62 -1
  147. package/src/widgets/actions/relative-data/relative-data.tsx +62 -39
  148. package/src/widgets/bar/config.ts +34 -34
  149. package/src/widgets/bar/style.ts +1 -1
  150. package/src/widgets/category/category-ui.tsx +12 -2
  151. package/src/widgets/category/components/category-bar.tsx +3 -0
  152. package/src/widgets/category/components/category-legend.tsx +3 -0
  153. package/src/widgets/category/components/category-row-multi.tsx +9 -2
  154. package/src/widgets/category/components/category-row-other.tsx +3 -0
  155. package/src/widgets/category/components/category-row-single.tsx +8 -1
  156. package/src/widgets/category/config.ts +11 -0
  157. package/src/widgets/category/types.ts +1 -0
  158. package/src/widgets/echart/echart-ui.tsx +7 -0
  159. package/src/widgets/echart/echart.tsx +6 -0
  160. package/src/widgets/echart/options.ts +7 -0
  161. package/src/widgets/echart/types.ts +3 -0
  162. package/src/widgets/echart/utils.ts +41 -0
  163. package/src/widgets/error/error.tsx +10 -0
  164. package/src/widgets/formula/components/item.tsx +3 -0
  165. package/src/widgets/formula/components/prefix.tsx +3 -0
  166. package/src/widgets/formula/components/row.tsx +3 -0
  167. package/src/widgets/formula/components/series.tsx +3 -0
  168. package/src/widgets/formula/components/suffix.tsx +3 -0
  169. package/src/widgets/formula/components/value.tsx +4 -2
  170. package/src/widgets/formula/config.ts +11 -0
  171. package/src/widgets/formula/formula-ui.tsx +3 -0
  172. package/src/widgets/histogram/config.ts +93 -21
  173. package/src/widgets/histogram/index.ts +6 -1
  174. package/src/widgets/histogram/style.ts +1 -1
  175. package/src/widgets/histogram/types.ts +9 -3
  176. package/src/widgets/loader/loader.tsx +22 -0
  177. package/src/widgets/loader/utils.ts +26 -3
  178. package/src/widgets/markdown/config.ts +10 -0
  179. package/src/widgets/markdown/markdown-ui.tsx +7 -0
  180. package/src/widgets/markdown/markdown.tsx +3 -0
  181. package/src/widgets/note/note.tsx +10 -0
  182. package/src/widgets/pie/config.ts +100 -33
  183. package/src/widgets/pie/style.ts +1 -1
  184. package/src/widgets/range/components/range-item.tsx +5 -2
  185. package/src/widgets/range/config.ts +5 -0
  186. package/src/widgets/range/range-ui.tsx +3 -0
  187. package/src/widgets/scatterplot/config.ts +19 -23
  188. package/src/widgets/scatterplot/style.ts +1 -1
  189. package/src/widgets/selection-summary/selection-summary.tsx +11 -0
  190. package/src/widgets/skeleton-loader/skeleton-loader.tsx +10 -0
  191. package/src/widgets/spread/components/max-value.tsx +4 -2
  192. package/src/widgets/spread/components/min-value.tsx +4 -2
  193. package/src/widgets/spread/components/separator.tsx +3 -0
  194. package/src/widgets/spread/config.ts +11 -0
  195. package/src/widgets/spread/spread-ui.tsx +3 -0
  196. package/src/widgets/stores/types.ts +2 -0
  197. package/src/widgets/subheader/subheader.tsx +11 -0
  198. package/src/widgets/table/config.ts +8 -3
  199. package/src/widgets/table/hooks/use-pagination.ts +11 -3
  200. package/src/widgets/table/hooks/use-selection.ts +11 -2
  201. package/src/widgets/table/hooks/use-sort.ts +11 -3
  202. package/src/widgets/timeseries/config.ts +32 -33
  203. package/src/widgets/timeseries/style.ts +1 -1
  204. package/src/widgets/utils/chart-config/download-config.ts +22 -0
  205. package/src/widgets/{_shared → utils}/chart-config/index.ts +4 -0
  206. package/src/widgets/{_shared → utils}/chart-config/option-builders.ts +23 -13
  207. package/src/widgets/utils/formatter.ts +2 -0
  208. package/src/widgets/utils/index.ts +26 -0
  209. package/src/widgets/wrapper/components/actions.tsx +3 -0
  210. package/src/widgets/wrapper/components/options.tsx +3 -0
  211. package/src/widgets/wrapper/components/title.tsx +3 -0
  212. package/src/widgets/wrapper/wrapper-ui.tsx +14 -0
  213. package/src/widgets/wrapper/wrapper.tsx +14 -0
  214. package/dist/styles-CAroD5Rc.js +0 -123
  215. package/dist/styles-CAroD5Rc.js.map +0 -1
  216. /package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +0 -0
  217. /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
  218. /package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.test.d.ts +0 -0
  219. /package/dist/types/widgets/{_shared → utils}/skeleton/index.d.ts +0 -0
  220. /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
  221. /package/src/widgets/{_shared → utils}/chart-config/config-factory.ts +0 -0
  222. /package/src/widgets/{_shared → utils}/chart-config/csv-modifiers.ts +0 -0
  223. /package/src/widgets/{_shared → utils}/chart-config/option-builders.test.ts +0 -0
  224. /package/src/widgets/{_shared → utils}/skeleton/index.ts +0 -0
  225. /package/src/widgets/{_shared → utils}/skeleton/styles.ts +0 -0
@@ -1,18 +1,19 @@
1
- import { jsx as m, jsxs as k } from "react/jsx-runtime";
2
- import { c as V } from "react/compiler-runtime";
3
- import { Box as b, Typography as T, useTheme as te, Skeleton as K } from "@mui/material";
4
- import { u as R } from "../widget-store-CzDt8oSK.js";
5
- import { useShallow as D } from "zustand/shallow";
6
- import { useState as oe } from "react";
1
+ import { jsx as g, jsxs as $ } from "react/jsx-runtime";
2
+ import { c as B } from "react/compiler-runtime";
3
+ import { Box as C, Typography as V, useTheme as re, Skeleton as Y } from "@mui/material";
4
+ import { u as F } from "../widget-store-CzDt8oSK.js";
5
+ import { useShallow as I } from "zustand/shallow";
6
+ import { useState as ne } from "react";
7
+ import { a as ie, d as ae } from "../formatter-B9Bxn1k7.js";
7
8
  import "@mui/icons-material";
8
9
  import "react-markdown";
9
- import { d as Y, a as Q } from "../exports-Cr43OCul.js";
10
+ import { d as te, a as Z } from "../exports-Cr43OCul.js";
10
11
  import "../lasso-tool-BYbxrJ-7.js";
11
12
  import "../cjs-D4KH3azB.js";
12
13
  import "@dnd-kit/core";
13
14
  import "@dnd-kit/sortable";
14
15
  import "@dnd-kit/utilities";
15
- const d = {
16
+ const u = {
16
17
  root: {
17
18
  display: "flex",
18
19
  flexDirection: "column",
@@ -142,120 +143,126 @@ const d = {
142
143
  color: "text.disabled"
143
144
  }
144
145
  };
145
- function Z(o) {
146
- const e = V(6), {
146
+ function oe(o) {
147
+ const e = B(6), {
147
148
  value: t,
148
149
  maxValue: r,
149
150
  color: l,
150
- selected: c
151
- } = o, i = c === void 0 ? !0 : c, s = r > 0 ? t / r * 100 : 0;
152
- let g;
153
- e[0] !== l || e[1] !== s || e[2] !== i ? (g = i ? {
154
- ...d.barFill,
155
- width: `${s}%`,
151
+ selected: s
152
+ } = o, n = s === void 0 ? !0 : s, i = r > 0 ? t / r * 100 : 0;
153
+ let c;
154
+ e[0] !== l || e[1] !== i || e[2] !== n ? (c = n ? {
155
+ ...u.barFill,
156
+ width: `${i}%`,
156
157
  backgroundColor: l
157
158
  } : {
158
- ...d.barFill,
159
- ...d.barFillMuted,
160
- width: `${s}%`
161
- }, e[0] = l, e[1] = s, e[2] = i, e[3] = g) : g = e[3];
162
- const n = g;
159
+ ...u.barFill,
160
+ ...u.barFillMuted,
161
+ width: `${i}%`
162
+ }, e[0] = l, e[1] = i, e[2] = n, e[3] = c) : c = e[3];
163
+ const d = c;
163
164
  let a;
164
- return e[4] !== n ? (a = /* @__PURE__ */ m(b, { sx: d.bar, children: /* @__PURE__ */ m(b, { sx: n }) }), e[4] = n, e[5] = a) : a = e[5], a;
165
+ return e[4] !== d ? (a = /* @__PURE__ */ g(C, { sx: u.bar, children: /* @__PURE__ */ g(C, { sx: d }) }), e[4] = d, e[5] = a) : a = e[5], a;
165
166
  }
166
- function le(o) {
167
- const e = V(23), {
167
+ function se(o) {
168
+ const e = B(26), {
168
169
  name: t,
169
170
  value: r,
170
171
  maxValue: l,
171
- color: c,
172
- formatter: i,
173
- onClick: s,
174
- selected: g
175
- } = o, n = g === void 0 ? !0 : g;
176
- let a;
177
- e[0] !== t || e[1] !== s ? (a = s ? () => s({
172
+ color: s,
173
+ formatter: n,
174
+ labelFormatter: i,
175
+ onClick: c,
176
+ selected: d
177
+ } = o, a = d === void 0 ? !0 : d;
178
+ let f;
179
+ e[0] !== t || e[1] !== c ? (f = c ? () => c({
178
180
  name: t
179
- }) : void 0, e[0] = t, e[1] = s, e[2] = a) : a = e[2];
180
- const u = a, y = s ? d.rowClickable : d.row;
181
- let h;
182
- e[3] !== t ? (h = /* @__PURE__ */ m(T, { sx: d.rowLabel, children: t }), e[3] = t, e[4] = h) : h = e[4];
181
+ }) : void 0, e[0] = t, e[1] = c, e[2] = f) : f = e[2];
182
+ const y = f, k = c ? u.rowClickable : u.row;
183
183
  let p;
184
- e[5] !== i || e[6] !== r ? (p = i(r), e[5] = i, e[6] = r, e[7] = p) : p = e[7];
184
+ e[3] !== i || e[4] !== t ? (p = i ? i(t) : t, e[3] = i, e[4] = t, e[5] = p) : p = e[5];
185
+ let h;
186
+ e[6] !== p ? (h = /* @__PURE__ */ g(V, { sx: u.rowLabel, children: p }), e[6] = p, e[7] = h) : h = e[7];
187
+ let b;
188
+ e[8] !== n || e[9] !== r ? (b = n(r), e[8] = n, e[9] = r, e[10] = b) : b = e[10];
185
189
  let x;
186
- e[8] !== p ? (x = /* @__PURE__ */ m(T, { sx: d.rowValue, children: p }), e[8] = p, e[9] = x) : x = e[9];
187
- let C;
188
- e[10] !== h || e[11] !== x ? (C = /* @__PURE__ */ k(b, { sx: d.rowHeader, children: [
190
+ e[11] !== b ? (x = /* @__PURE__ */ g(V, { sx: u.rowValue, children: b }), e[11] = b, e[12] = x) : x = e[12];
191
+ let w;
192
+ e[13] !== h || e[14] !== x ? (w = /* @__PURE__ */ $(C, { sx: u.rowHeader, children: [
189
193
  h,
190
194
  x
191
- ] }), e[10] = h, e[11] = x, e[12] = C) : C = e[12];
192
- let w;
193
- e[13] !== c || e[14] !== l || e[15] !== n || e[16] !== r ? (w = /* @__PURE__ */ m(Z, { value: r, maxValue: l, color: c, selected: n }), e[13] = c, e[14] = l, e[15] = n, e[16] = r, e[17] = w) : w = e[17];
195
+ ] }), e[13] = h, e[14] = x, e[15] = w) : w = e[15];
194
196
  let v;
195
- return e[18] !== u || e[19] !== y || e[20] !== C || e[21] !== w ? (v = /* @__PURE__ */ k(b, { sx: y, onClick: u, children: [
196
- C,
197
- w
198
- ] }), e[18] = u, e[19] = y, e[20] = C, e[21] = w, e[22] = v) : v = e[22], v;
197
+ e[16] !== s || e[17] !== l || e[18] !== a || e[19] !== r ? (v = /* @__PURE__ */ g(oe, { value: r, maxValue: l, color: s, selected: a }), e[16] = s, e[17] = l, e[18] = a, e[19] = r, e[20] = v) : v = e[20];
198
+ let S;
199
+ return e[21] !== y || e[22] !== k || e[23] !== w || e[24] !== v ? (S = /* @__PURE__ */ $(C, { sx: k, onClick: y, children: [
200
+ w,
201
+ v
202
+ ] }), e[21] = y, e[22] = k, e[23] = w, e[24] = v, e[25] = S) : S = e[25], S;
199
203
  }
200
- function re(o) {
201
- const e = V(25), {
204
+ function ce(o) {
205
+ const e = B(28), {
202
206
  name: t,
203
207
  values: r,
204
208
  maxValue: l,
205
- colors: c,
206
- formatter: i,
207
- onClick: s,
208
- selected: g
209
- } = o, n = g === void 0 ? !0 : g;
210
- let a;
211
- e[0] !== t || e[1] !== s ? (a = s ? () => s({
209
+ colors: s,
210
+ formatter: n,
211
+ labelFormatter: i,
212
+ onClick: c,
213
+ selected: d
214
+ } = o, a = d === void 0 ? !0 : d;
215
+ let f;
216
+ e[0] !== t || e[1] !== c ? (f = c ? () => c({
212
217
  name: t
213
- }) : void 0, e[0] = t, e[1] = s, e[2] = a) : a = e[2];
214
- const u = a, y = s ? d.rowClickable : d.row;
215
- let h;
216
- e[3] !== t ? (h = /* @__PURE__ */ m(T, { sx: d.rowLabel, children: t }), e[3] = t, e[4] = h) : h = e[4];
218
+ }) : void 0, e[0] = t, e[1] = c, e[2] = f) : f = e[2];
219
+ const y = f, k = c ? u.rowClickable : u.row;
217
220
  let p;
218
- if (e[5] !== c || e[6] !== i || e[7] !== l || e[8] !== t || e[9] !== n || e[10] !== r) {
219
- let w;
220
- e[12] !== c || e[13] !== i || e[14] !== l || e[15] !== t || e[16] !== n ? (w = (v, E) => /* @__PURE__ */ k(b, { sx: d.multiBarRow, children: [
221
- /* @__PURE__ */ m(b, { sx: d.multiBarContainer, children: /* @__PURE__ */ m(Z, { value: v, maxValue: l, color: c[E % c.length] ?? "", selected: n }) }),
222
- /* @__PURE__ */ m(T, { sx: d.multiBarValue, children: i(v) })
223
- ] }, `${t}-${v}`), e[12] = c, e[13] = i, e[14] = l, e[15] = t, e[16] = n, e[17] = w) : w = e[17], p = r.map(w), e[5] = c, e[6] = i, e[7] = l, e[8] = t, e[9] = n, e[10] = r, e[11] = p;
221
+ e[3] !== i || e[4] !== t ? (p = i ? i(t) : t, e[3] = i, e[4] = t, e[5] = p) : p = e[5];
222
+ let h;
223
+ e[6] !== p ? (h = /* @__PURE__ */ g(V, { sx: u.rowLabel, children: p }), e[6] = p, e[7] = h) : h = e[7];
224
+ let b;
225
+ if (e[8] !== s || e[9] !== n || e[10] !== l || e[11] !== t || e[12] !== a || e[13] !== r) {
226
+ let v;
227
+ e[15] !== s || e[16] !== n || e[17] !== l || e[18] !== t || e[19] !== a ? (v = (S, _) => /* @__PURE__ */ $(C, { sx: u.multiBarRow, children: [
228
+ /* @__PURE__ */ g(C, { sx: u.multiBarContainer, children: /* @__PURE__ */ g(oe, { value: S, maxValue: l, color: s[_ % s.length] ?? "", selected: a }) }),
229
+ /* @__PURE__ */ g(V, { sx: u.multiBarValue, children: n(S) })
230
+ ] }, `${t}-${S}-${_}`), e[15] = s, e[16] = n, e[17] = l, e[18] = t, e[19] = a, e[20] = v) : v = e[20], b = r.map(v), e[8] = s, e[9] = n, e[10] = l, e[11] = t, e[12] = a, e[13] = r, e[14] = b;
224
231
  } else
225
- p = e[11];
232
+ b = e[14];
226
233
  let x;
227
- e[18] !== p ? (x = /* @__PURE__ */ m(b, { sx: d.barContainer, children: p }), e[18] = p, e[19] = x) : x = e[19];
228
- let C;
229
- return e[20] !== u || e[21] !== y || e[22] !== h || e[23] !== x ? (C = /* @__PURE__ */ k(b, { sx: y, onClick: u, children: [
234
+ e[21] !== b ? (x = /* @__PURE__ */ g(C, { sx: u.barContainer, children: b }), e[21] = b, e[22] = x) : x = e[22];
235
+ let w;
236
+ return e[23] !== y || e[24] !== k || e[25] !== h || e[26] !== x ? (w = /* @__PURE__ */ $(C, { sx: k, onClick: y, children: [
230
237
  h,
231
238
  x
232
- ] }), e[20] = u, e[21] = y, e[22] = h, e[23] = x, e[24] = C) : C = e[24], C;
239
+ ] }), e[23] = y, e[24] = k, e[25] = h, e[26] = x, e[27] = w) : w = e[27], w;
233
240
  }
234
- function ne(o) {
235
- const e = V(10), {
241
+ function de(o) {
242
+ const e = B(10), {
236
243
  hiddenCount: t,
237
244
  otherLabel: r,
238
245
  otherCountLabel: l
239
- } = o, c = r === void 0 ? "Other" : r, i = l === void 0 ? "{count} more" : l;
240
- let s;
241
- e[0] !== t || e[1] !== i ? (s = i.replace("{count}", String(t)), e[0] = t, e[1] = i, e[2] = s) : s = e[2];
242
- const g = s;
243
- let n;
244
- e[3] !== c ? (n = /* @__PURE__ */ m(T, { sx: d.otherLabel, children: c }), e[3] = c, e[4] = n) : n = e[4];
246
+ } = o, s = r === void 0 ? "Other" : r, n = l === void 0 ? "{count} more" : l;
247
+ let i;
248
+ e[0] !== t || e[1] !== n ? (i = n.replace("{count}", String(t)), e[0] = t, e[1] = n, e[2] = i) : i = e[2];
249
+ const c = i;
250
+ let d;
251
+ e[3] !== s ? (d = /* @__PURE__ */ g(V, { sx: u.otherLabel, children: s }), e[3] = s, e[4] = d) : d = e[4];
245
252
  let a;
246
- e[5] !== g ? (a = /* @__PURE__ */ k(T, { sx: d.otherCount, children: [
253
+ e[5] !== c ? (a = /* @__PURE__ */ $(V, { sx: u.otherCount, children: [
247
254
  "(",
248
- g,
255
+ c,
249
256
  ")"
250
- ] }), e[5] = g, e[6] = a) : a = e[6];
251
- let u;
252
- return e[7] !== n || e[8] !== a ? (u = /* @__PURE__ */ k(b, { sx: d.otherRow, children: [
253
- n,
257
+ ] }), e[5] = c, e[6] = a) : a = e[6];
258
+ let f;
259
+ return e[7] !== d || e[8] !== a ? (f = /* @__PURE__ */ $(C, { sx: u.otherRow, children: [
260
+ d,
254
261
  a
255
- ] }), e[7] = n, e[8] = a, e[9] = u) : u = e[9], u;
262
+ ] }), e[7] = d, e[8] = a, e[9] = f) : f = e[9], f;
256
263
  }
257
- function ie(o) {
258
- const e = V(7), {
264
+ function ue(o) {
265
+ const e = B(7), {
259
266
  series: t,
260
267
  colors: r
261
268
  } = o;
@@ -263,104 +270,106 @@ function ie(o) {
263
270
  return null;
264
271
  let l;
265
272
  if (e[0] !== r || e[1] !== t) {
266
- let i;
267
- e[3] !== r ? (i = (s, g) => /* @__PURE__ */ k(b, { sx: d.legendItem, children: [
268
- /* @__PURE__ */ m(b, { sx: {
269
- ...d.legendDot,
270
- backgroundColor: s.color ?? r[g % r.length]
273
+ let n;
274
+ e[3] !== r ? (n = (i, c) => /* @__PURE__ */ $(C, { sx: u.legendItem, children: [
275
+ /* @__PURE__ */ g(C, { sx: {
276
+ ...u.legendDot,
277
+ backgroundColor: i.color ?? r[c % r.length]
271
278
  } }),
272
- /* @__PURE__ */ m(T, { sx: d.legendLabel, children: s.name })
273
- ] }, s.name), e[3] = r, e[4] = i) : i = e[4], l = t.map(i), e[0] = r, e[1] = t, e[2] = l;
279
+ /* @__PURE__ */ g(V, { sx: u.legendLabel, children: i.name })
280
+ ] }, i.name), e[3] = r, e[4] = n) : n = e[4], l = t.map(n), e[0] = r, e[1] = t, e[2] = l;
274
281
  } else
275
282
  l = e[2];
276
- let c;
277
- return e[5] !== l ? (c = /* @__PURE__ */ m(b, { sx: d.legend, children: l }), e[5] = l, e[6] = c) : c = e[6], c;
283
+ let s;
284
+ return e[5] !== l ? (s = /* @__PURE__ */ g(C, { sx: u.legend, children: l }), e[5] = l, e[6] = s) : s = e[6], s;
278
285
  }
279
- const se = (o) => o.toString();
280
- function Le(o) {
281
- const e = V(55), {
286
+ function De(o) {
287
+ const e = B(58), {
282
288
  id: t
283
- } = o, r = te();
289
+ } = o, r = re();
284
290
  let l;
285
- e[0] !== t ? (l = (f) => f.getWidget(t)?.formatter, e[0] = t, e[1] = l) : l = e[1];
286
- const c = R(D(l));
287
- let i;
288
- e[2] !== t ? (i = (f) => f.getWidget(t)?.series, e[2] = t, e[3] = i) : i = e[3];
289
- const s = R(D(i));
290
- let g;
291
- e[4] !== t ? (g = (f) => f.getWidget(t)?.data, e[4] = t, e[5] = g) : g = e[5];
292
- const n = R(D(g));
291
+ e[0] !== t ? (l = (m) => m.getWidget(t)?.formatter, e[0] = t, e[1] = l) : l = e[1];
292
+ const s = F(I(l));
293
+ let n;
294
+ e[2] !== t ? (n = (m) => m.getWidget(t)?.labelFormatter, e[2] = t, e[3] = n) : n = e[3];
295
+ const i = F(I(n));
296
+ let c;
297
+ e[4] !== t ? (c = (m) => m.getWidget(t)?.series, e[4] = t, e[5] = c) : c = e[5];
298
+ const d = F(I(c));
293
299
  let a;
294
- e[6] !== t ? (a = (f) => f.getWidget(t)?.maxItems, e[6] = t, e[7] = a) : a = e[7];
295
- const u = R(D(a));
300
+ e[6] !== t ? (a = (m) => m.getWidget(t)?.data, e[6] = t, e[7] = a) : a = e[7];
301
+ const f = F(I(a));
296
302
  let y;
297
- e[8] !== t ? (y = (f) => f.getWidget(t)?.labels, e[8] = t, e[9] = y) : y = e[9];
298
- const h = R(D(y));
303
+ e[8] !== t ? (y = (m) => m.getWidget(t)?.maxItems, e[8] = t, e[9] = y) : y = e[9];
304
+ const k = F(I(y));
299
305
  let p;
300
- e[10] !== t ? (p = (f) => f.getWidget(t)?.onRowClick, e[10] = t, e[11] = p) : p = e[11];
301
- const x = R(D(p));
302
- let C;
303
- e[12] !== t ? (C = (f) => f.getWidget(t)?.selected, e[12] = t, e[13] = C) : C = e[13];
304
- const w = R(D(C));
305
- let v;
306
- e[14] !== t ? (v = (f) => f.getWidget(t)?.max, e[14] = t, e[15] = v) : v = e[15];
307
- const E = R(D(v)), P = c ?? se, S = s ?? [], [G] = oe(u ? 40 * (S.length || 1) * u : void 0), X = Object.values(r.palette.qualitative.bold), M = S.length > 0 ? S.map((f, U) => f.color ?? X[U % X.length] ?? r.palette.secondary.main) : [r.palette.secondary.main];
308
- let B, _, L, W, F, I, j, A;
309
- if (e[16] !== M || e[17] !== n || e[18] !== P || e[19] !== E || e[20] !== G || e[21] !== u || e[22] !== x || e[23] !== w || e[24] !== S) {
310
- j = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
306
+ e[10] !== t ? (p = (m) => m.getWidget(t)?.labels, e[10] = t, e[11] = p) : p = e[11];
307
+ const h = F(I(p));
308
+ let b;
309
+ e[12] !== t ? (b = (m) => m.getWidget(t)?.onRowClick, e[12] = t, e[13] = b) : b = e[13];
310
+ const x = F(I(b));
311
+ let w;
312
+ e[14] !== t ? (w = (m) => m.getWidget(t)?.selected, e[14] = t, e[15] = w) : w = e[15];
313
+ const v = F(I(w));
314
+ let S;
315
+ e[16] !== t ? (S = (m) => m.getWidget(t)?.max, e[16] = t, e[17] = S) : S = e[17];
316
+ const _ = F(I(S)), U = s ?? ae, z = i ?? ie, L = d ?? [], [N] = ne(k ? 40 * (L.length || 1) * k : void 0), ee = Object.values(r.palette.qualitative.bold), T = L.length > 0 ? L.map((m, K) => m.color ?? ee[K % ee.length] ?? r.palette.secondary.main) : [r.palette.secondary.main];
317
+ let j, A, R, O, D, H, M, q;
318
+ if (e[18] !== T || e[19] !== f || e[20] !== U || e[21] !== z || e[22] !== _ || e[23] !== N || e[24] !== k || e[25] !== x || e[26] !== v || e[27] !== L) {
319
+ q = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
311
320
  e: {
312
- const f = ce({
313
- data: n
321
+ const m = fe({
322
+ data: f
314
323
  });
315
- if (f.length === 0) {
316
- j = null;
324
+ if (m.length === 0) {
325
+ q = null;
317
326
  break e;
318
327
  }
319
- const U = E ?? Math.max(...f.flatMap(ae)), z = u !== void 0 && u >= 0 ? f.slice(0, u) : f;
320
- L = f.length - z.length;
321
- const ee = S.length > 1;
322
- _ = b, e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
323
- ...d.root
324
- }, e[33] = I) : I = e[33], B = b, A = d.list;
325
- const J = L === 0 ? "auto" : "hidden";
326
- e[34] !== G || e[35] !== J ? (W = {
327
- maxHeight: G,
328
- overflow: J
329
- }, e[34] = G, e[35] = J, e[36] = W) : W = e[36], F = ee ? z.map(($) => /* @__PURE__ */ m(re, { name: $.name, values: $.values, maxValue: U, colors: M, formatter: P, onClick: x, selected: w?.($.name) ?? !0 }, $.name)) : z.map(($) => /* @__PURE__ */ m(le, { name: $.name, value: $.values[0] ?? 0, selected: w?.($.name) ?? !0, maxValue: U, color: M[0], formatter: P, onClick: x }, $.name));
328
+ const K = _ ?? Math.max(...m.flatMap(me)), Q = k !== void 0 && k >= 0 ? m.slice(0, k) : m;
329
+ R = m.length - Q.length;
330
+ const le = L.length > 1;
331
+ A = C, e[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = {
332
+ ...u.root
333
+ }, e[36] = M) : M = e[36], j = C, O = u.list;
334
+ const X = R === 0 ? "auto" : "hidden";
335
+ e[37] !== N || e[38] !== X ? (D = {
336
+ maxHeight: N,
337
+ overflow: X
338
+ }, e[37] = N, e[38] = X, e[39] = D) : D = e[39], H = le ? Q.map((W) => /* @__PURE__ */ g(ce, { name: W.name, values: W.values, maxValue: K, colors: T, formatter: U, labelFormatter: z, onClick: x, selected: v?.(W.name) ?? !0 }, W.name)) : Q.map((W) => /* @__PURE__ */ g(se, { name: W.name, value: W.values[0] ?? 0, selected: v?.(W.name) ?? !0, maxValue: K, color: T[0], formatter: U, labelFormatter: z, onClick: x }, W.name));
330
339
  }
331
- e[16] = M, e[17] = n, e[18] = P, e[19] = E, e[20] = G, e[21] = u, e[22] = x, e[23] = w, e[24] = S, e[25] = B, e[26] = _, e[27] = L, e[28] = W, e[29] = F, e[30] = I, e[31] = j, e[32] = A;
340
+ e[18] = T, e[19] = f, e[20] = U, e[21] = z, e[22] = _, e[23] = N, e[24] = k, e[25] = x, e[26] = v, e[27] = L, e[28] = j, e[29] = A, e[30] = R, e[31] = O, e[32] = D, e[33] = H, e[34] = M, e[35] = q;
332
341
  } else
333
- B = e[25], _ = e[26], L = e[27], W = e[28], F = e[29], I = e[30], j = e[31], A = e[32];
334
- if (j !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
335
- return j;
336
- let O;
337
- e[37] !== L || e[38] !== h?.other || e[39] !== h?.otherCount ? (O = L > 0 && /* @__PURE__ */ m(ne, { hiddenCount: L, otherLabel: h?.other, otherCountLabel: h?.otherCount }), e[37] = L, e[38] = h?.other, e[39] = h?.otherCount, e[40] = O) : O = e[40];
338
- let H;
339
- e[41] !== B || e[42] !== W || e[43] !== F || e[44] !== O || e[45] !== A ? (H = /* @__PURE__ */ k(B, { sx: A, style: W, children: [
340
- F,
341
- O
342
- ] }), e[41] = B, e[42] = W, e[43] = F, e[44] = O, e[45] = A, e[46] = H) : H = e[46];
343
- let q;
344
- e[47] !== M || e[48] !== S ? (q = S.length > 0 && /* @__PURE__ */ m(ie, { series: S, colors: M }), e[47] = M, e[48] = S, e[49] = q) : q = e[49];
345
- let N;
346
- return e[50] !== _ || e[51] !== I || e[52] !== H || e[53] !== q ? (N = /* @__PURE__ */ k(_, { sx: I, children: [
342
+ j = e[28], A = e[29], R = e[30], O = e[31], D = e[32], H = e[33], M = e[34], q = e[35];
343
+ if (q !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
344
+ return q;
345
+ let E;
346
+ e[40] !== R || e[41] !== h?.other || e[42] !== h?.otherCount ? (E = R > 0 && /* @__PURE__ */ g(de, { hiddenCount: R, otherLabel: h?.other, otherCountLabel: h?.otherCount }), e[40] = R, e[41] = h?.other, e[42] = h?.otherCount, e[43] = E) : E = e[43];
347
+ let G;
348
+ e[44] !== j || e[45] !== O || e[46] !== D || e[47] !== H || e[48] !== E ? (G = /* @__PURE__ */ $(j, { sx: O, style: D, children: [
347
349
  H,
348
- q
349
- ] }), e[50] = _, e[51] = I, e[52] = H, e[53] = q, e[54] = N) : N = e[54], N;
350
+ E
351
+ ] }), e[44] = j, e[45] = O, e[46] = D, e[47] = H, e[48] = E, e[49] = G) : G = e[49];
352
+ let P;
353
+ e[50] !== T || e[51] !== L ? (P = L.length > 0 && /* @__PURE__ */ g(ue, { series: L, colors: T }), e[50] = T, e[51] = L, e[52] = P) : P = e[52];
354
+ let J;
355
+ return e[53] !== A || e[54] !== M || e[55] !== G || e[56] !== P ? (J = /* @__PURE__ */ $(A, { sx: M, children: [
356
+ G,
357
+ P
358
+ ] }), e[53] = A, e[54] = M, e[55] = G, e[56] = P, e[57] = J) : J = e[57], J;
350
359
  }
351
- function ae(o) {
360
+ function me(o) {
352
361
  return o.values;
353
362
  }
354
- function ce({
363
+ function fe({
355
364
  data: o
356
365
  }) {
357
366
  if (!o || o.length === 0) return [];
358
367
  const e = Math.max(o.length, 1), t = /* @__PURE__ */ new Map(), r = [];
359
368
  for (let l = 0; l < o.length; l++) {
360
- const c = o[l];
361
- for (const i of c) {
362
- let s = t.get(i.name);
363
- s || (s = new Array(e).fill(0), t.set(i.name, s), r.push(i.name)), s[l] = i.value;
369
+ const s = o[l];
370
+ for (const n of s) {
371
+ let i = t.get(n.name);
372
+ i || (i = new Array(e).fill(0), t.set(n.name, i), r.push(n.name)), i[l] = n.value;
364
373
  }
365
374
  }
366
375
  return r.map((l) => ({
@@ -368,54 +377,54 @@ function ce({
368
377
  values: t.get(l)
369
378
  }));
370
379
  }
371
- const de = [85, 70, 55, 75, 60];
372
- function We() {
373
- const o = V(1);
380
+ const ge = [85, 70, 55, 75, 60];
381
+ function Me() {
382
+ const o = B(1);
374
383
  let e;
375
- return o[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(b, { sx: d.list, "aria-label": "Category skeleton", children: Array.from({
384
+ return o[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g(C, { sx: u.list, "aria-label": "Category skeleton", children: Array.from({
376
385
  length: 5
377
- }).map(ue) }), o[0] = e) : e = o[0], e;
386
+ }).map(he) }), o[0] = e) : e = o[0], e;
378
387
  }
379
- function ue(o, e) {
380
- return /* @__PURE__ */ k(b, { sx: d.row, children: [
381
- /* @__PURE__ */ k(b, { sx: d.rowHeader, children: [
382
- /* @__PURE__ */ m(K, { width: 80, height: 16 }),
383
- /* @__PURE__ */ m(K, { width: 40, height: 16 })
388
+ function he(o, e) {
389
+ return /* @__PURE__ */ $(C, { sx: u.row, children: [
390
+ /* @__PURE__ */ $(C, { sx: u.rowHeader, children: [
391
+ /* @__PURE__ */ g(Y, { width: 80, height: 16 }),
392
+ /* @__PURE__ */ g(Y, { width: 40, height: 16 })
384
393
  ] }),
385
- /* @__PURE__ */ m(K, { variant: "rectangular", height: 4, sx: {
394
+ /* @__PURE__ */ g(Y, { variant: "rectangular", height: 4, sx: {
386
395
  borderRadius: 2,
387
- width: `${de[e]}%`
396
+ width: `${ge[e]}%`
388
397
  } })
389
398
  ] }, e);
390
399
  }
391
- function Ie({
400
+ function Te({
392
401
  refUI: o,
393
402
  series: e
394
403
  }) {
395
404
  return [{
396
- ...Y,
397
- modifier: () => Y.modifier(o)
405
+ ...te,
406
+ modifier: () => te.modifier(o)
398
407
  }, {
399
- ...Q,
408
+ ...Z,
400
409
  modifier: async (t) => {
401
410
  if (!t?.length || t[0]?.length === 0)
402
- return Q.modifier([]);
403
- const r = t.length, l = /* @__PURE__ */ new Map(), c = [];
404
- for (let n = 0; n < r; n++) {
405
- const a = t[n];
406
- for (const u of a) {
407
- let y = l.get(u.name);
408
- y || (y = new Array(r).fill(0), l.set(u.name, y), c.push(u.name)), y[n] = u.value;
411
+ return Z.modifier([]);
412
+ const r = t.length, l = /* @__PURE__ */ new Map(), s = [];
413
+ for (let d = 0; d < r; d++) {
414
+ const a = t[d];
415
+ for (const f of a) {
416
+ let y = l.get(f.name);
417
+ y || (y = new Array(r).fill(0), l.set(f.name, y), s.push(f.name)), y[d] = f.value;
409
418
  }
410
419
  }
411
- const i = c.map((n) => [n, ...l.get(n)]), g = r > 1 ? ["Category", ...e?.map((n) => n.name) ?? Array.from({
420
+ const n = s.map((d) => [d, ...l.get(d)]), c = r > 1 ? ["Category", ...e?.map((d) => d.name) ?? Array.from({
412
421
  length: r
413
- }, (n, a) => `Series ${a + 1}`)] : ["Category", "Value"];
414
- return Q.modifier([g, ...i]);
422
+ }, (d, a) => `Series ${a + 1}`)] : ["Category", "Value"];
423
+ return Z.modifier([c, ...n]);
415
424
  }
416
425
  }];
417
426
  }
418
- function Re() {
427
+ function Ve() {
419
428
  return {
420
429
  series: [],
421
430
  maxItems: 10,
@@ -423,14 +432,14 @@ function Re() {
423
432
  };
424
433
  }
425
434
  export {
426
- Z as CategoryBar,
427
- ie as CategoryLegend,
428
- re as CategoryRowMulti,
429
- ne as CategoryRowOther,
430
- le as CategoryRowSingle,
431
- We as CategorySkeleton,
432
- Le as CategoryUI,
433
- Re as categoryConfig,
434
- Ie as categoryDownloadConfig
435
+ oe as CategoryBar,
436
+ ue as CategoryLegend,
437
+ ce as CategoryRowMulti,
438
+ de as CategoryRowOther,
439
+ se as CategoryRowSingle,
440
+ Me as CategorySkeleton,
441
+ De as CategoryUI,
442
+ Ve as categoryConfig,
443
+ Te as categoryDownloadConfig
435
444
  };
436
445
  //# sourceMappingURL=category.js.map