@aintela/bi 0.2.1 → 0.2.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 (50) hide show
  1. package/README.md +32 -1
  2. package/dist/ChartCardDefaultsContext-BDRsVljO.js +34 -0
  3. package/dist/ChartCardDefaultsContext-BDRsVljO.js.map +1 -0
  4. package/dist/{GridLayout-BgPzzPiP.js → GridLayout-1gWuIKeZ.js} +3 -4
  5. package/dist/GridLayout-1gWuIKeZ.js.map +1 -0
  6. package/dist/{ScriptDashboardViewerVertical-DKaHcL1o.js → ScriptDashboardViewerVertical-Rr_4adpH.js} +4 -4
  7. package/dist/{ScriptDashboardViewerVertical-DKaHcL1o.js.map → ScriptDashboardViewerVertical-Rr_4adpH.js.map} +1 -1
  8. package/dist/{biModuleSurface-dtnpBMtT.js → biModuleSurface-BdJK7sSL.js} +6 -6
  9. package/dist/{biModuleSurface-dtnpBMtT.js.map → biModuleSurface-BdJK7sSL.js.map} +1 -1
  10. package/dist/cards.js +1 -1
  11. package/dist/composer/index.d.ts +3 -1
  12. package/dist/composer/view/ComposerView.d.ts +20 -1
  13. package/dist/composer/view/SessionVisualizationsPanel.d.ts +19 -0
  14. package/dist/composer.js +73 -71
  15. package/dist/data/ChartCardDefaultsContext.d.ts +9 -0
  16. package/dist/data.js +1 -1
  17. package/dist/grid.js +16 -17
  18. package/dist/grid.js.map +1 -1
  19. package/dist/{index-DeiweWw8.js → index-9LcZjCK0.js} +54 -50
  20. package/dist/index-9LcZjCK0.js.map +1 -0
  21. package/dist/{index-Dz2ulBiy.js → index-BzUugG0A.js} +4 -5
  22. package/dist/{index-Dz2ulBiy.js.map → index-BzUugG0A.js.map} +1 -1
  23. package/dist/index-C4_VSDeU.js +3856 -0
  24. package/dist/index-C4_VSDeU.js.map +1 -0
  25. package/dist/{index-CPHaT2or.js → index-DChE_l-p.js} +2 -2
  26. package/dist/index-DChE_l-p.js.map +1 -0
  27. package/dist/{index-DOpx0R4Y.js → index-Dy6hwDjs.js} +2 -2
  28. package/dist/index-Dy6hwDjs.js.map +1 -0
  29. package/dist/index.js +228 -223
  30. package/dist/index.js.map +1 -1
  31. package/dist/runtime/index.d.ts +2 -0
  32. package/dist/runtime/sessionVisualizations.d.ts +61 -0
  33. package/dist/runtime/version.d.ts +1 -1
  34. package/dist/runtime.js +16 -11
  35. package/dist/runtime.js.map +1 -1
  36. package/dist/style.css +1 -1
  37. package/dist/version-BTc4ElDG.js +122 -0
  38. package/dist/version-BTc4ElDG.js.map +1 -0
  39. package/dist/viewer.js +1 -1
  40. package/package.json +1 -1
  41. package/dist/ChartCardDefaultsContext-Cl5T25H0.js +0 -32
  42. package/dist/ChartCardDefaultsContext-Cl5T25H0.js.map +0 -1
  43. package/dist/GridLayout-BgPzzPiP.js.map +0 -1
  44. package/dist/index-7p-ogAPK.js +0 -3631
  45. package/dist/index-7p-ogAPK.js.map +0 -1
  46. package/dist/index-CPHaT2or.js.map +0 -1
  47. package/dist/index-DOpx0R4Y.js.map +0 -1
  48. package/dist/index-DeiweWw8.js.map +0 -1
  49. package/dist/version-BgIpi4UM.js +0 -84
  50. package/dist/version-BgIpi4UM.js.map +0 -1
package/dist/composer.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e, a as t, b as o, c as r, d as n, e as i, f as d, g as C, h as m, i as E, D as S, j as p, k as l, l as T, m as _, n as P, o as c, p as I, q as h, E as u, r as D, s as A, t as v, u as R, v as O, F as k, w as L, x as g, G as b, y as f, H as y, P as N, z as x, A as F, S as G, B as H, I as V, J as M, T as B, K as Y, L as U, M as w, N as z, V as K, O as W, Q as j, R as q, U as X, W as J, X as Q, Y as Z, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ta, a2 as oa, a3 as ra, a4 as na, a5 as ia, a6 as da, a7 as Ca, a8 as ma, a9 as Ea, aa as Sa, ab as pa, ac as la, ad as Ta, ae as _a, af as Pa, ag as ca, ah as Ia, ai as ha, aj as ua, ak as Da, al as Aa, am as va, an as Ra, ao as Oa, ap as ka, aq as La, ar as ga, as as ba, at as fa, au as ya, av as Na, aw as xa, ax as Fa, ay as Ga, az as Ha } from "./index-7p-ogAPK.js";
2
- import { EnvironmentProvider as Ma, InertEnvironmentProvider as Ba, useEnvironment as Ya, useEnvironmentOptional as Ua } from "@aintela/chat/components";
1
+ import { C as e, a as t, b as o, c as r, d as n, e as i, f as d, g as C, h as m, i as E, D as S, j as l, k as p, l as P, m as T, n as _, o as u, p as c, q as D, E as I, r as h, s as A, t as v, u as R, v as O, F as k, w as g, x as L, G as b, y as f, H as y, P as N, z as V, A as F, S as x, B as G, I as H, J as B, K as M, M as Y, T as z, N as U, O as w, Q as K, R as j, V as q, X as W, Y as X, Z as J, _ as Q, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as da, aa as Ca, ab as ma, ac as Ea, ad as Sa, ae as la, af as pa, ag as Pa, ah as Ta, ai as _a, aj as ua, ak as ca, al as Da, am as Ia, an as ha, ao as Aa, ap as va, aq as Ra, ar as Oa, as as ka, at as ga, au as La, av as ba, aw as fa, ax as ya, ay as Na, az as Va, aA as Fa, aB as xa, aC as Ga, aD as Ha, aF as Ba } from "./index-C4_VSDeU.js";
2
+ import { EnvironmentProvider as Ya, InertEnvironmentProvider as za, useEnvironment as Ua, useEnvironmentOptional as wa } from "@aintela/chat/components";
3
3
  export {
4
4
  e as CARD_TYPE_CATALOG,
5
5
  t as CATEGORY_ICONS,
@@ -12,88 +12,90 @@ export {
12
12
  m as ComposerProvider,
13
13
  E as ComposerView,
14
14
  S as DEFAULT_PAD_HEIGHT_PX,
15
- p as DRAFT_SAVE_DEBOUNCE_MS,
16
- l as DashboardPad,
17
- T as DashboardPadEditor,
18
- _ as DashboardPadSketch,
19
- P as DashboardPin,
20
- c as DashboardSidePanel,
21
- I as DatasetParameterizationControls,
22
- h as DrawablePrompt,
23
- u as ENV_HIGHLIGHT_CLASS,
24
- D as EntryEmptyState,
25
- Ma as EnvironmentProvider,
15
+ l as DRAFT_SAVE_DEBOUNCE_MS,
16
+ p as DashboardPad,
17
+ P as DashboardPadEditor,
18
+ T as DashboardPadSketch,
19
+ _ as DashboardPin,
20
+ u as DashboardSidePanel,
21
+ c as DatasetParameterizationControls,
22
+ D as DrawablePrompt,
23
+ I as ENV_HIGHLIGHT_CLASS,
24
+ h as EntryEmptyState,
25
+ Ya as EnvironmentProvider,
26
26
  A as ExampleCardSkath,
27
27
  v as ExampleCardSketch,
28
28
  R as ExampleCardSketh,
29
29
  O as ExamplePad,
30
30
  k as FILTER_TYPE_CATALOG,
31
- L as FILTER_TYPE_ICONS,
32
- g as FilterSketch,
31
+ g as FILTER_TYPE_ICONS,
32
+ L as FilterSketch,
33
33
  b as GRID_ROW_HEIGHT_PX,
34
34
  f as GUIDE_SHOW_DELAY_MS,
35
35
  y as HoverButton,
36
- Ba as InertEnvironmentProvider,
36
+ za as InertEnvironmentProvider,
37
37
  N as PAD_INTERNAL_CLASSES,
38
- x as PAD_INTERNAL_IDS,
38
+ V as PAD_INTERNAL_IDS,
39
39
  F as PrototypePad,
40
- G as SPECIFIC_TYPE_ICONS,
41
- H as SPECIFIC_TYPE_ICON_NAMES,
42
- V as STARTER_TEMPLATES,
43
- M as SpotlightOverlay,
44
- B as TEMPLATE_KIND_TO_SKETCH,
45
- Y as TextSketh,
46
- U as TitleSkath,
47
- w as TitleSketch,
48
- z as ToolBox,
49
- K as VIEWER_COMMIT_DEBOUNCE_MS,
40
+ x as SPECIFIC_TYPE_ICONS,
41
+ G as SPECIFIC_TYPE_ICON_NAMES,
42
+ H as STARTER_TEMPLATES,
43
+ B as SessionVisualizationsPanel,
44
+ M as SessionVisualizationsPanelButton,
45
+ Y as SpotlightOverlay,
46
+ z as TEMPLATE_KIND_TO_SKETCH,
47
+ U as TextSketh,
48
+ w as TitleSkath,
49
+ K as TitleSketch,
50
+ j as ToolBox,
51
+ q as VIEWER_COMMIT_DEBOUNCE_MS,
50
52
  W as activityPanelVariants,
51
- j as activityPanelVariantsReduced,
52
- q as ambientVariants,
53
- X as ambientVariantsReduced,
54
- J as autoComplete,
55
- Q as c,
56
- Z as categoryPrefix,
57
- $ as composerLayoutTransition,
58
- aa as composerLayoutTransitionReduced,
59
- sa as createComposerStore,
60
- ea as createDashboardDraft,
61
- ta as datePicker,
62
- oa as dateRange,
63
- ra as defaultCardTypeIcons,
64
- na as defaultComposerSuggestions,
65
- ia as defaultComposerTemplates,
66
- da as environmentFromStore,
67
- Ca as fromUpsertResponse,
68
- ma as groupCardCatalog,
69
- Ea as guideStepsRequireSketch,
70
- Sa as isElementVisible,
71
- pa as isSimplePadDefinition,
72
- la as joinClientSideChanges,
73
- Ta as padConfigToDashboard,
74
- _a as pickBestElement,
75
- Pa as randomId,
76
- ca as resolveComposerSurfaces,
53
+ X as activityPanelVariantsReduced,
54
+ J as ambientVariants,
55
+ Q as ambientVariantsReduced,
56
+ Z as autoComplete,
57
+ $ as c,
58
+ aa as categoryPrefix,
59
+ sa as composerLayoutTransition,
60
+ ea as composerLayoutTransitionReduced,
61
+ ta as createComposerStore,
62
+ oa as createDashboardDraft,
63
+ ra as datePicker,
64
+ na as dateRange,
65
+ ia as defaultCardTypeIcons,
66
+ da as defaultComposerSuggestions,
67
+ Ca as defaultComposerTemplates,
68
+ ma as environmentFromStore,
69
+ Ea as fromUpsertResponse,
70
+ Sa as groupCardCatalog,
71
+ la as guideStepsRequireSketch,
72
+ pa as isElementVisible,
73
+ Pa as isSimplePadDefinition,
74
+ Ta as joinClientSideChanges,
75
+ _a as padConfigToDashboard,
76
+ ua as pickBestElement,
77
+ ca as randomId,
78
+ Da as resolveComposerSurfaces,
77
79
  Ia as resolveEnvironmentElements,
78
80
  ha as resolveGuideElement,
79
- ua as sanitizeToJsVariable,
80
- Da as seedFromTemplate,
81
- Aa as sketchCardItemComparer,
82
- va as sketchFilterComparer,
83
- Ra as targetSuggestsPadInternal,
84
- Oa as templateKinds,
85
- ka as toDraftPayload,
86
- La as toSelectorList,
87
- ga as upsertDashboardDraft,
88
- ba as useCardTypeIcons,
89
- fa as useComposer,
90
- ya as useComposerChatBridge,
91
- Na as useComposerEnvironment,
81
+ Aa as sanitizeToJsVariable,
82
+ va as seedFromTemplate,
83
+ Ra as sketchCardItemComparer,
84
+ Oa as sketchFilterComparer,
85
+ ka as targetSuggestsPadInternal,
86
+ ga as templateKinds,
87
+ La as toDraftPayload,
88
+ ba as toSelectorList,
89
+ fa as upsertDashboardDraft,
90
+ ya as useCardTypeIcons,
91
+ Na as useComposer,
92
+ Va as useComposerChatBridge,
93
+ Fa as useComposerEnvironment,
92
94
  xa as useComposerStore,
93
- Fa as useComposerStoreOptional,
94
- Ga as useDashboardPad,
95
- Ya as useEnvironment,
96
- Ua as useEnvironmentOptional,
97
- Ha as validateSketch
95
+ Ga as useComposerStoreOptional,
96
+ Ha as useDashboardPad,
97
+ Ua as useEnvironment,
98
+ wa as useEnvironmentOptional,
99
+ Ba as validateSketch
98
100
  };
99
101
  //# sourceMappingURL=composer.js.map
@@ -20,6 +20,14 @@ export interface ChartCardDefaults {
20
20
  * primer colour from the palette in round-robin mount order.
21
21
  */
22
22
  rotateBasePerChart?: boolean;
23
+ /**
24
+ * Gridline colour for every chart under the provider. Without it a chart
25
+ * derives one from `text.primary` at 12%, which is right on a neutral
26
+ * canvas and too heavy on a warm one — and the alternative was the
27
+ * per-card `gridColor` prop, i.e. a host repeating one decision on every
28
+ * card of every dashboard.
29
+ */
30
+ gridColor?: string;
23
31
  /**
24
32
  * Internal: provider-supplied counter used by ChartCard to claim a slot
25
33
  * index on first mount. Use `ChartCardDefaultsProvider` rather than
@@ -33,6 +41,7 @@ export interface ChartCardDefaultsProviderProps {
33
41
  palette?: readonly string[];
34
42
  monoShadePerCategory?: boolean;
35
43
  rotateBasePerChart?: boolean;
44
+ gridColor?: string;
36
45
  children: React.ReactNode;
37
46
  }
38
47
  /**
package/dist/data.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { D as e, c as s, a as r, b as o, d as m, e as l, f as u, g as i, h as c, i as f, j as C, k as n, l as D, m as p, p as d, t as x, n as h, o as b, q as B, r as P, s as S, u as T, v, w as F, x as N } from "./dataUtils-CAUE5uZY.js";
2
- import { C as g, a as k, u as w } from "./ChartCardDefaultsContext-Cl5T25H0.js";
2
+ import { C as g, a as k, u as w } from "./ChartCardDefaultsContext-BDRsVljO.js";
3
3
  import { c as j, r as q, u as z } from "./createBiTheme-TyUv_UHM.js";
4
4
  export {
5
5
  g as ChartCardDefaultsContext,
package/dist/grid.js CHANGED
@@ -1,23 +1,22 @@
1
- import "react-grid-layout/css/styles.css";
2
- import { B as o, D as t, a as e, b as i, c as d, d as n, G as C, e as G } from "./GridLayout-BgPzzPiP.js";
3
- import { G as L } from "./GridCardPlaceHolder-DVVT3pqn.js";
4
- import { C as f, u as A } from "./ChartContext-C_f_6khG.js";
5
- import { t as p, a as u, b as R, u as l } from "./index-Dz2ulBiy.js";
1
+ import { B as s, D as o, a as t, b as e, c as i, d, G as n, e as C } from "./GridLayout-1gWuIKeZ.js";
2
+ import { G as E } from "./GridCardPlaceHolder-DVVT3pqn.js";
3
+ import { C as T, u as f } from "./ChartContext-C_f_6khG.js";
4
+ import { t as _, a as u, b as R, u as l } from "./index-BzUugG0A.js";
6
5
  export {
7
- o as BiErrorBoundary,
8
- f as ChartContextProvider,
9
- t as DEFAULT_BREAKPOINTS,
10
- e as DEFAULT_COLS,
11
- i as DEFAULT_MAX_ROWS,
12
- d as DEFAULT_ROW_HEIGHT,
13
- n as DEFAULT_ROW_MULTIPLIER,
14
- C as GridCard,
15
- L as GridCardPlaceHolder,
16
- G as GridLayout,
17
- p as translateGridConfig,
6
+ s as BiErrorBoundary,
7
+ T as ChartContextProvider,
8
+ o as DEFAULT_BREAKPOINTS,
9
+ t as DEFAULT_COLS,
10
+ e as DEFAULT_MAX_ROWS,
11
+ i as DEFAULT_ROW_HEIGHT,
12
+ d as DEFAULT_ROW_MULTIPLIER,
13
+ n as GridCard,
14
+ E as GridCardPlaceHolder,
15
+ C as GridLayout,
16
+ _ as translateGridConfig,
18
17
  u as translateGridConfigAutoResponsive,
19
18
  R as translateResponsiveGridConfig,
20
- A as useChartContext,
19
+ f as useChartContext,
21
20
  l as useGridConfigTranslator
22
21
  };
23
22
  //# sourceMappingURL=grid.js.map
package/dist/grid.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"grid.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"grid.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -6,14 +6,14 @@ import { p as kt, h as ne, v as St, j as tt, s as le, g as Ct, m as wt, i as Mt,
6
6
  import { u as Tt, r as we } from "./createBiTheme-TyUv_UHM.js";
7
7
  import { u as Ne } from "./ChartContext-C_f_6khG.js";
8
8
  import Be, { useEffect as rt, useState as re, useMemo as E, useRef as nt, createContext as It, useContext as Rt, useCallback as ke } from "react";
9
- import { alpha as J } from "@mui/material/styles";
9
+ import { alpha as ee } from "@mui/material/styles";
10
10
  import Et from "@mui/icons-material/FileDownloadOutlined";
11
11
  import $t from "@mui/icons-material/TableViewOutlined";
12
12
  import Bt from "@mui/icons-material/FilterAltOffOutlined";
13
13
  import { DataGridPro as At, gridClasses as Ve, getGridSingleSelectOperators as _t, useGridApiContext as Gt, useGridSelector as Nt, gridFilterModelSelector as Pt, GridToolbarContainer as zt, GridToolbarColumnsButton as Ht, GridToolbarFilterButton as Kt, GridToolbarDensitySelector as Ft, GridToolbarExportContainer as Wt } from "@mui/x-data-grid-pro";
14
14
  import { LicenseInfo as Ot } from "@mui/x-license";
15
15
  import { ResponsiveContainer as ye, PieChart as jt, Pie as Xt, Cell as qe, Tooltip as Ie, Legend as Re, ScatterChart as Yt, CartesianGrid as De, XAxis as Ee, YAxis as $e, Scatter as Zt, ComposedChart as Ut, BarChart as Vt, AreaChart as qt, LineChart as Dt, Bar as Qt, Area as Jt, Line as er, Treemap as tr } from "recharts";
16
- import { u as rr } from "./ChartCardDefaultsContext-Cl5T25H0.js";
16
+ import { u as rr } from "./ChartCardDefaultsContext-BDRsVljO.js";
17
17
  import { u as ot } from "./useContainerRectangle-D464wPFX.js";
18
18
  import { ComposableMap as at, ZoomableGroup as it, Geographies as Se, Geography as Ce, useZoomPanContext as Pe, Marker as Ae, useMapContext as nr } from "react-simple-maps";
19
19
  function st({
@@ -91,12 +91,12 @@ function Je({ zones: t, ratio: e, needleColor: o, strokeWidth: i, textPrimaryCol
91
91
  const d = te + e * (be - te), [b, y] = _e(d);
92
92
  return /* @__PURE__ */ x("svg", { className: g, x: "0", y: "0", viewBox: `0 0 ${ir} ${sr}`, width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", children: [
93
93
  t.map((w, M) => {
94
- const T = Math.min(M > 0 ? t[M - 1].value : 0, 1), H = te + T * (be - te), L = Math.min(te + w.value * (be - te), be);
94
+ const T = Math.min(M > 0 ? t[M - 1].value : 0, 1), G = te + T * (be - te), L = Math.min(te + w.value * (be - te), be);
95
95
  return /* @__PURE__ */ r(
96
96
  "path",
97
97
  {
98
98
  className: f,
99
- d: Qe(H, L),
99
+ d: Qe(G, L),
100
100
  fill: "none",
101
101
  stroke: w.color,
102
102
  strokeWidth: i,
@@ -283,35 +283,35 @@ function xr({
283
283
  rt(() => {
284
284
  lt();
285
285
  }, []), t && e && console.warn("[DataTableCard] Both `data` and `lazyData` were provided. These props are mutually exclusive. Using `lazyData` and ignoring `data`.");
286
- const H = g ?? (T ? 50 : 20), [L, Z] = re({ page: 0, pageSize: H }), U = E(() => {
286
+ const G = g ?? (T ? 50 : 20), [L, Z] = re({ page: 0, pageSize: G }), U = E(() => {
287
287
  const k = o ?? (e == null ? void 0 : e.columnSchema) ?? (t == null ? void 0 : t.columnSchema);
288
288
  return k ? k.build() : [];
289
- }, [o, t == null ? void 0 : t.columnSchema, e == null ? void 0 : e.columnSchema]), G = e == null ? void 0 : e.getRows, D = E(() => G ? { getRows: G } : void 0, [G]), { naked: $ } = Ne() ?? {}, j = vr({ containerRef: M, multiplier: $ ? 1 : 0.9, naked: $, minHeight: 300 }), K = E(() => gr(U, b), [U, b]), I = e == null ? void 0 : e.downloadCsv, X = e == null ? void 0 : e.downloadXlsx, B = (e == null ? void 0 : e.exporting) ?? !1, [u, N] = re(null), P = Be.useCallback(
289
+ }, [o, t == null ? void 0 : t.columnSchema, e == null ? void 0 : e.columnSchema]), N = e == null ? void 0 : e.getRows, D = E(() => N ? { getRows: N } : void 0, [N]), { naked: $ } = Ne() ?? {}, j = vr({ containerRef: M, multiplier: $ ? 1 : 0.9, naked: $, minHeight: 300 }), K = E(() => gr(U, b), [U, b]), I = e == null ? void 0 : e.downloadCsv, X = e == null ? void 0 : e.downloadXlsx, B = (e == null ? void 0 : e.exporting) ?? !1, [u, P] = re(null), z = Be.useCallback(
290
290
  async (k) => {
291
291
  const O = k === "xlsx" ? X : I;
292
292
  if (!O) return;
293
293
  const se = k === "xlsx" ? "Excel" : "CSV";
294
- N({ kind: "progress", message: `Exportando ${se}…` });
294
+ P({ kind: "progress", message: `Exportando ${se}…` });
295
295
  try {
296
- await O(), N({ kind: "success", message: `${se} exportado com sucesso` });
296
+ await O(), P({ kind: "success", message: `${se} exportado com sucesso` });
297
297
  } catch (fe) {
298
- console.error(`[DataTableCard] ${se} export failed`, fe), N({ kind: "error", message: fe instanceof Error ? fe.message : `Falha ao exportar ${se}` });
298
+ console.error(`[DataTableCard] ${se} export failed`, fe), P({ kind: "error", message: fe instanceof Error ? fe.message : `Falha ao exportar ${se}` });
299
299
  }
300
300
  },
301
301
  [I, X]
302
- ), z = E(() => I ? () => P("csv") : void 0, [I, P]), Q = E(() => X ? () => P("xlsx") : void 0, [X, P]), V = e == null ? void 0 : e.apiRef, oe = E(
302
+ ), H = E(() => I ? () => z("csv") : void 0, [I, z]), J = E(() => X ? () => z("xlsx") : void 0, [X, z]), V = e == null ? void 0 : e.apiRef, oe = E(
303
303
  () => V ? () => {
304
304
  var k;
305
305
  return (k = V.current) == null ? void 0 : k.setFilterModel({ items: [], quickFilterValues: [] });
306
306
  } : void 0,
307
307
  [V]
308
308
  ), ae = E(() => {
309
- if (!(!z && !Q && !oe))
310
- return { onCsvExport: z, onXlsxExport: Q, onClearFilters: oe, exporting: B };
311
- }, [z, Q, oe, B]), ve = E(() => {
309
+ if (!(!H && !J && !oe))
310
+ return { onCsvExport: H, onXlsxExport: J, onClearFilters: oe, exporting: B };
311
+ }, [H, J, oe, B]), ve = E(() => {
312
312
  const k = { density: m ? "compact" : "standard" };
313
313
  return y && (k.pinnedColumns = y), k;
314
- }, []), Me = E(() => t ? t.rows.map((k, O) => ({ id: O, ...k })) : [], [t]), ie = f ?? w.palette.action.hover, me = v ?? "transparent", Le = l ?? J(w.palette.primary.main, w.palette.mode === "dark" ? 0.24 : 0.1);
314
+ }, []), Me = E(() => t ? t.rows.map((k, O) => ({ id: O, ...k })) : [], [t]), ie = f ?? w.palette.action.hover, me = v ?? "transparent", Le = l ?? ee(w.palette.primary.main, w.palette.mode === "dark" ? 0.24 : 0.1);
315
315
  return /* @__PURE__ */ x(S, { "data-testid": d ? "loading" : "", sx: { width: "100%", height: "100%", p: m ? 1 : 2, display: "flex", flexDirection: "column", overflow: "auto" }, ref: M, children: [
316
316
  s && $ && /* @__PURE__ */ r(A, { variant: "h6", sx: { mb: 1 }, children: s }),
317
317
  /* @__PURE__ */ r(
@@ -373,12 +373,12 @@ function xr({
373
373
  {
374
374
  open: u !== null,
375
375
  autoHideDuration: (u == null ? void 0 : u.kind) === "progress" ? null : (u == null ? void 0 : u.kind) === "error" ? 6e3 : 3e3,
376
- onClose: /* @__PURE__ */ p(() => N(null), "onClose"),
376
+ onClose: /* @__PURE__ */ p(() => P(null), "onClose"),
377
377
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
378
378
  children: /* @__PURE__ */ r(
379
379
  vt,
380
380
  {
381
- onClose: /* @__PURE__ */ p(() => N(null), "onClose"),
381
+ onClose: /* @__PURE__ */ p(() => P(null), "onClose"),
382
382
  severity: (u == null ? void 0 : u.kind) === "error" ? "error" : (u == null ? void 0 : u.kind) === "success" ? "success" : "info",
383
383
  icon: (u == null ? void 0 : u.kind) === "progress" ? /* @__PURE__ */ r(bt, { size: 16, color: "inherit" }) : void 0,
384
384
  variant: "outlined",
@@ -415,7 +415,7 @@ function Ge(t, e, o, i = 0.25, s = 1) {
415
415
  if (o <= 1) return t;
416
416
  const c = e / Math.max(1, o - 1), f = i + (s - i) * c;
417
417
  try {
418
- return J(t, f);
418
+ return ee(t, f);
419
419
  } catch {
420
420
  return t;
421
421
  }
@@ -440,13 +440,15 @@ function yr({
440
440
  maxSlices: w = 4,
441
441
  palette: M,
442
442
  backgroundColor: T,
443
- gridColor: H
443
+ gridColor: G
444
444
  }) {
445
445
  var We, Oe;
446
- const L = ue(), { naked: Z } = Ne() ?? {}, U = t ? Array.isArray(t) ? t : t.rows : [], G = E(() => o ? U.map((a) => ({
446
+ const L = ue(), { naked: Z } = Ne() ?? {}, U = t ? Array.isArray(t) ? t : t.rows : [], N = E(() => o ? U.map((a) => ({
447
447
  ...a,
448
448
  __xLabel: (g ?? br)(a[o])
449
- })) : U, [U, o, g]), D = m ?? ((a) => ne(a, 0)), $ = L.palette.text.secondary, ee = H ?? J(L.palette.text.primary, 0.12), j = o ? "__xLabel" : void 0, K = /* @__PURE__ */ p((a, R) => {
449
+ })) : U, [U, o, g]), D = m ?? ((a) => ne(a, 0)), $ = L.palette.text.secondary;
450
+ let Q = G ?? ee(L.palette.text.primary, 0.12);
451
+ const j = o ? "__xLabel" : void 0, K = /* @__PURE__ */ p((a, R) => {
450
452
  var W, ge;
451
453
  if (!a) return R;
452
454
  const C = { ...R }, Y = a.color ?? ((W = R.tick) == null ? void 0 : W.fill) ?? $, F = a.fontSize ?? ((ge = R.tick) == null ? void 0 : ge.fontSize) ?? 12;
@@ -468,10 +470,12 @@ function yr({
468
470
  stroke: L.palette.action.selected,
469
471
  strokeWidth: 1
470
472
  }
471
- }, u = rr(), N = M ?? u.palette ?? we(L).series, P = u.monoShadePerCategory ?? !0, z = (u.rotateBasePerChart ?? !0) && N.length > 0, [Q] = re(() => {
473
+ }, u = rr();
474
+ Q = G ?? u.gridColor ?? Q;
475
+ const P = M ?? u.palette ?? we(L).series, z = u.monoShadePerCategory ?? !0, H = (u.rotateBasePerChart ?? !0) && P.length > 0, [J] = re(() => {
472
476
  var a;
473
- return z ? ((a = u.allocateChartSlot) == null ? void 0 : a.call(u)) ?? 0 : 0;
474
- }), V = /* @__PURE__ */ p((a) => N[((z ? Q : 0) + a) % N.length], "pickPaletteColor"), oe = Math.PI / 180, ae = /* @__PURE__ */ p(({ cx: a, cy: R, midAngle: C, innerRadius: Y, outerRadius: F, percent: W, fill: ge }) => {
477
+ return H ? ((a = u.allocateChartSlot) == null ? void 0 : a.call(u)) ?? 0 : 0;
478
+ }), V = /* @__PURE__ */ p((a) => P[((H ? J : 0) + a) % P.length], "pickPaletteColor"), oe = Math.PI / 180, ae = /* @__PURE__ */ p(({ cx: a, cy: R, midAngle: C, innerRadius: Y, outerRadius: F, percent: W, fill: ge }) => {
475
479
  if (a == null || R == null || Y == null || F == null) return null;
476
480
  const je = Y + (F - Y) * 0.5, Xe = Number(a), Ye = Xe + je * Math.cos(-(C ?? 0) * oe), ft = Number(R) + je * Math.sin(-(C ?? 0) * oe);
477
481
  let Ze = L.palette.text.primary;
@@ -481,16 +485,16 @@ function yr({
481
485
  } catch {
482
486
  }
483
487
  return /* @__PURE__ */ r("text", { x: Ye, y: ft, fill: Ze, fontSize: 14, textAnchor: Ye > Xe ? "start" : "end", dominantBaseline: "central", children: `${((W ?? 1) * 100).toFixed(0)}%` });
484
- }, "renderCustomizedLabel"), ve = i.map((a, R) => a.color ?? V(R)), Me = P && i.length === 1, ie = E(() => {
488
+ }, "renderCustomizedLabel"), ve = i.map((a, R) => a.color ?? V(R)), Me = z && i.length === 1, ie = E(() => {
485
489
  if (e !== "pie" && e !== "donut") return [];
486
- const a = G.map((F, W) => ({
490
+ const a = N.map((F, W) => ({
487
491
  name: X(j ? String(F[j] ?? F[o] ?? W) : `#${W}`),
488
492
  value: Number(i[0] ? F[i[0].dataKey] : 0) || 0
489
493
  }));
490
494
  if (a.length <= w) return a;
491
495
  const R = [...a].sort((F, W) => W.value - F.value), C = R.slice(0, w - 1), Y = R.slice(w - 1).reduce((F, W) => F + W.value, 0);
492
496
  return [...C, { name: "Others", value: Y }];
493
- }, [e, G, j, o, i, w]), me = nt(null), [, Le] = ot(me);
497
+ }, [e, N, j, o, i, w]), me = nt(null), [, Le] = ot(me);
494
498
  if (y || !t)
495
499
  return /* @__PURE__ */ x(S, { "data-testid": "loading", sx: { height: "100%", p: 2, width: "100%", backgroundColor: T }, children: [
496
500
  s && Z && /* @__PURE__ */ r(_, { variant: "text", width: 180, sx: { fontSize: "1.25rem", mb: 1 } }),
@@ -517,7 +521,7 @@ function yr({
517
521
  ie.map((a, R) => /* @__PURE__ */ r(
518
522
  qe,
519
523
  {
520
- fill: P && ie.length > 1 ? Ge(V(0), R, ie.length) : V(R)
524
+ fill: z && ie.length > 1 ? Ge(V(0), R, ie.length) : V(R)
521
525
  },
522
526
  R
523
527
  )),
@@ -532,19 +536,19 @@ function yr({
532
536
  return /* @__PURE__ */ x(S, { sx: { height: "100%", p: 0, backgroundColor: T }, children: [
533
537
  s && Z && /* @__PURE__ */ r(A, { variant: "h6", sx: { mb: 1 }, children: s }),
534
538
  /* @__PURE__ */ r(ye, { width: "100%", height: c, children: /* @__PURE__ */ x(Yt, { margin: { top: 8, right: 16, bottom: d != null && d.tickAngle ? 24 : 8, left: 0 }, children: [
535
- h && /* @__PURE__ */ r(De, { stroke: ee }),
539
+ h && /* @__PURE__ */ r(De, { stroke: Q }),
536
540
  /* @__PURE__ */ r(Ee, { dataKey: o, name: o, ...K(d, { tick: { fill: $, fontSize: 12 } }) }),
537
541
  /* @__PURE__ */ r($e, { dataKey: (We = i[0]) == null ? void 0 : We.dataKey, tickFormatter: D, name: (Oe = i[0]) == null ? void 0 : Oe.name, ...K(b, { tick: { fill: $, fontSize: 12 } }) }),
538
542
  l && /* @__PURE__ */ r(Ie, { ...B }),
539
543
  v && /* @__PURE__ */ r(Re, { wrapperStyle: { color: L.palette.text.secondary } }),
540
- i.map((a, R) => /* @__PURE__ */ r(Zt, { name: a.name ?? a.dataKey, data: G, fill: ve[R] }, a.dataKey))
544
+ i.map((a, R) => /* @__PURE__ */ r(Zt, { name: a.name ?? a.dataKey, data: N, fill: ve[R] }, a.dataKey))
541
545
  ] }) })
542
546
  ] });
543
547
  const k = e === "bar" ? "barH" : e, O = k === "barH", se = k === "stackedArea" || k === "stackedBar", fe = k === "combo" ? Ut : k === "barH" || k === "barV" || k === "stackedBar" ? Vt : k === "area" || k === "stackedArea" ? qt : Dt, pt = O ? "vertical" : "horizontal", Te = f || se, mt = /* @__PURE__ */ p((a) => a.type ? a.type : k === "combo" || k === "barV" || k === "barH" || k === "stackedBar" ? "bar" : k === "area" || k === "stackedArea" ? "area" : "line", "resolveSeriesType");
544
548
  return /* @__PURE__ */ x(S, { sx: { height: "100%", p: 0.3, backgroundColor: T }, ref: me, children: [
545
549
  s && Z && /* @__PURE__ */ r(A, { variant: "h6", sx: { mb: 1 }, children: s }),
546
- /* @__PURE__ */ r(ye, { width: "100%", height: "100%", children: /* @__PURE__ */ x(fe, { data: G, layout: pt, margin: { top: 0, right: 16, bottom: d != null && d.tickAngle ? 24 : 8, left: 0 }, style: { maxHeight: "95%" }, children: [
547
- h && /* @__PURE__ */ r(De, { stroke: ee, strokeDasharray: "3 3" }),
550
+ /* @__PURE__ */ r(ye, { width: "100%", height: "100%", children: /* @__PURE__ */ x(fe, { data: N, layout: pt, margin: { top: 0, right: 16, bottom: d != null && d.tickAngle ? 24 : 8, left: 0 }, style: { maxHeight: "95%" }, children: [
551
+ h && /* @__PURE__ */ r(De, { stroke: Q, strokeDasharray: "3 3" }),
548
552
  O ? /* @__PURE__ */ x(xe, { children: [
549
553
  /* @__PURE__ */ r(Ee, { type: "number", tickFormatter: D, ...K(d, { tick: { fill: $, fontSize: 12 } }) }),
550
554
  /* @__PURE__ */ r($e, { type: "category", dataKey: j ?? o, ...K(b, { tick: { fill: $, fontSize: 12 }, width: 80 }) })
@@ -565,10 +569,10 @@ function yr({
565
569
  stackId: Te ? "stack" : void 0,
566
570
  radius: O ? [0, 4, 4, 0] : [4, 4, 0, 0],
567
571
  maxBarSize: 24,
568
- children: Me && G.map((F, W) => (
572
+ children: Me && N.map((F, W) => (
569
573
  // Bars are typically sorted descending, so invert the shade
570
574
  // index: the largest bar gets the strongest alpha.
571
- /* @__PURE__ */ r(qe, { fill: Ge(C, G.length - 1 - W, G.length) }, W)
575
+ /* @__PURE__ */ r(qe, { fill: Ge(C, N.length - 1 - W, N.length) }, W)
572
576
  ))
573
577
  },
574
578
  a.dataKey
@@ -599,7 +603,7 @@ function kr(t) {
599
603
  /* @__PURE__ */ r("rect", { x: e, y: o, width: i, height: s, rx: 4, fill: v, stroke: h, strokeWidth: 1 }),
600
604
  i > 50 && s > 30 && /* @__PURE__ */ x(xe, { children: [
601
605
  /* @__PURE__ */ r("text", { x: e + 6, y: o + 16, fill: m, fontSize: 12, fontWeight: 600, children: (c ?? "").length > i / 7 ? (c ?? "").slice(0, Math.floor(i / 7)) + "…" : c }),
602
- s > 44 && /* @__PURE__ */ r("text", { x: e + 6, y: o + 32, fill: J(m, 0.7), fontSize: 11, children: g(f ?? 0) })
606
+ s > 44 && /* @__PURE__ */ r("text", { x: e + 6, y: o + 32, fill: ee(m, 0.7), fontSize: 11, children: g(f ?? 0) })
603
607
  ] })
604
608
  ] });
605
609
  }
@@ -653,7 +657,7 @@ function He(t, e = {}) {
653
657
  center: s ?? [0, 20],
654
658
  zoom: i ?? 1
655
659
  };
656
- const c = t.map((H) => H.lat), f = t.map((H) => H.lng), v = Math.min(...c), h = Math.max(...c), l = Math.min(...f), g = Math.max(...f), m = s ?? [
660
+ const c = t.map((G) => G.lat), f = t.map((G) => G.lng), v = Math.min(...c), h = Math.max(...c), l = Math.min(...f), g = Math.max(...f), m = s ?? [
657
661
  (l + g) / 2,
658
662
  (v + h) / 2
659
663
  ];
@@ -696,7 +700,7 @@ function Rr({
696
700
  autoFit: g = !0,
697
701
  geoUrl: m
698
702
  }) {
699
- const d = ue(), b = (t == null ? void 0 : t.rows) ?? [], [y, w] = re(null), M = f ?? ne, T = c ?? we(d).series[0], H = Fe(m), L = J(d.palette.text.primary, 0.06), Z = J(d.palette.text.primary, 0.09), U = d.palette.divider, G = d.palette.text.disabled, D = E(() => Math.max(1, ...b.map((I) => Math.abs(I.value))), [b]), $ = E(() => He(b, { autoFit: g, defaultZoom: h, center: l }), [b, g, h, l]), ee = ke((I, X) => {
703
+ const d = ue(), b = (t == null ? void 0 : t.rows) ?? [], [y, w] = re(null), M = f ?? ne, T = c ?? we(d).series[0], G = Fe(m), L = ee(d.palette.text.primary, 0.06), Z = ee(d.palette.text.primary, 0.09), U = d.palette.divider, N = d.palette.text.disabled, D = E(() => Math.max(1, ...b.map((I) => Math.abs(I.value))), [b]), $ = E(() => He(b, { autoFit: g, defaultZoom: h, center: l }), [b, g, h, l]), Q = ke((I, X) => {
700
704
  const B = I.currentTarget.closest("svg");
701
705
  if (!B) return;
702
706
  const u = B.getBoundingClientRect();
@@ -720,10 +724,10 @@ function Rr({
720
724
  height: 500,
721
725
  style: { width: "100%", height: "100%", display: "block", background: d.palette.background.default, borderRadius: d.shape.borderRadius },
722
726
  children: /* @__PURE__ */ x(it, { center: $.center, zoom: $.zoom, minZoom: 1, maxZoom: 40, children: [
723
- H.map(
724
- (I, X) => X === 0 ? /* @__PURE__ */ r(Se, { geography: I, children: /* @__PURE__ */ p(({ geographies: B }) => B.map((u) => /* @__PURE__ */ r(Ce, { geography: u, fill: L, stroke: U, strokeWidth: 0.5, style: { ...K, hover: { outline: "none", fill: Z } } }, u.rsmKey)), "children") }, I) : /* @__PURE__ */ r(Se, { geography: I, children: /* @__PURE__ */ p(({ geographies: B }) => B.map((u) => /* @__PURE__ */ r(Ce, { geography: u, fill: "none", stroke: G, strokeWidth: 0.3, style: K }, u.rsmKey)), "children") }, I)
727
+ G.map(
728
+ (I, X) => X === 0 ? /* @__PURE__ */ r(Se, { geography: I, children: /* @__PURE__ */ p(({ geographies: B }) => B.map((u) => /* @__PURE__ */ r(Ce, { geography: u, fill: L, stroke: U, strokeWidth: 0.5, style: { ...K, hover: { outline: "none", fill: Z } } }, u.rsmKey)), "children") }, I) : /* @__PURE__ */ r(Se, { geography: I, children: /* @__PURE__ */ p(({ geographies: B }) => B.map((u) => /* @__PURE__ */ r(Ce, { geography: u, fill: "none", stroke: N, strokeWidth: 0.3, style: K }, u.rsmKey)), "children") }, I)
725
729
  ),
726
- /* @__PURE__ */ r(Ir, { bubbles: b, maxVal: D, minBubbleSize: i, maxBubbleSize: s, fillColor: T, fmt: M, onHover: ee, onLeave: j })
730
+ /* @__PURE__ */ r(Ir, { bubbles: b, maxVal: D, minBubbleSize: i, maxBubbleSize: s, fillColor: T, fmt: M, onHover: Q, onLeave: j })
727
731
  ] })
728
732
  }
729
733
  ),
@@ -795,14 +799,14 @@ function Ar({
795
799
  autoFit: l = !0,
796
800
  geoUrl: g
797
801
  }) {
798
- const m = ue(), d = (t == null ? void 0 : t.rows) ?? [], [b, y] = re(null), [w, M] = re(null), T = c ?? ne, H = we(m).series, L = i ?? H[1 % H.length], Z = Fe(g), U = J(m.palette.text.primary, 0.06), G = J(m.palette.text.primary, 0.09), D = m.palette.divider, $ = m.palette.text.disabled, ee = E(() => Math.max(1, ...d.map((u) => Math.abs(u.value ?? 1))), [d]), j = E(() => d.flatMap((u) => [{ lat: u.fromLat, lng: u.fromLng }, { lat: u.toLat, lng: u.toLng }]), [d]), K = E(() => He(j, { autoFit: l, defaultZoom: v, center: h }), [j, l, v, h]), I = ke(
799
- (u, N) => {
800
- const P = d[u], z = `${P.label ?? ""} ${P.value != null ? T(P.value) : ""}`.trim();
801
- if (!z) return;
802
- const Q = N.currentTarget.closest("svg");
803
- if (!Q) return;
804
- const V = Q.getBoundingClientRect();
805
- M(u), y({ x: N.clientX - V.left, y: N.clientY - V.top, text: z });
802
+ const m = ue(), d = (t == null ? void 0 : t.rows) ?? [], [b, y] = re(null), [w, M] = re(null), T = c ?? ne, G = we(m).series, L = i ?? G[1 % G.length], Z = Fe(g), U = ee(m.palette.text.primary, 0.06), N = ee(m.palette.text.primary, 0.09), D = m.palette.divider, $ = m.palette.text.disabled, Q = E(() => Math.max(1, ...d.map((u) => Math.abs(u.value ?? 1))), [d]), j = E(() => d.flatMap((u) => [{ lat: u.fromLat, lng: u.fromLng }, { lat: u.toLat, lng: u.toLng }]), [d]), K = E(() => He(j, { autoFit: l, defaultZoom: v, center: h }), [j, l, v, h]), I = ke(
803
+ (u, P) => {
804
+ const z = d[u], H = `${z.label ?? ""} ${z.value != null ? T(z.value) : ""}`.trim();
805
+ if (!H) return;
806
+ const J = P.currentTarget.closest("svg");
807
+ if (!J) return;
808
+ const V = J.getBoundingClientRect();
809
+ M(u), y({ x: P.clientX - V.left, y: P.clientY - V.top, text: H });
806
810
  },
807
811
  [d, T]
808
812
  ), X = ke(() => {
@@ -826,9 +830,9 @@ function Ar({
826
830
  style: { width: "100%", height: "100%", display: "block", background: m.palette.background.default, borderRadius: m.shape.borderRadius },
827
831
  children: /* @__PURE__ */ x(it, { center: K.center, zoom: K.zoom, minZoom: 1, maxZoom: 40, children: [
828
832
  Z.map(
829
- (u, N) => N === 0 ? /* @__PURE__ */ r(Se, { geography: u, children: /* @__PURE__ */ p(({ geographies: P }) => P.map((z) => /* @__PURE__ */ r(Ce, { geography: z, fill: U, stroke: D, strokeWidth: 0.5, style: { ...B, hover: { outline: "none", fill: G } } }, z.rsmKey)), "children") }, u) : /* @__PURE__ */ r(Se, { geography: u, children: /* @__PURE__ */ p(({ geographies: P }) => P.map((z) => /* @__PURE__ */ r(Ce, { geography: z, fill: "none", stroke: $, strokeWidth: 0.3, style: B }, z.rsmKey)), "children") }, u)
833
+ (u, P) => P === 0 ? /* @__PURE__ */ r(Se, { geography: u, children: /* @__PURE__ */ p(({ geographies: z }) => z.map((H) => /* @__PURE__ */ r(Ce, { geography: H, fill: U, stroke: D, strokeWidth: 0.5, style: { ...B, hover: { outline: "none", fill: N } } }, H.rsmKey)), "children") }, u) : /* @__PURE__ */ r(Se, { geography: u, children: /* @__PURE__ */ p(({ geographies: z }) => z.map((H) => /* @__PURE__ */ r(Ce, { geography: H, fill: "none", stroke: $, strokeWidth: 0.3, style: B }, H.rsmKey)), "children") }, u)
830
834
  ),
831
- /* @__PURE__ */ r($r, { connections: d, maxVal: ee, strokeColor: L, hoveredIdx: w, onHover: I, onLeave: X }),
835
+ /* @__PURE__ */ r($r, { connections: d, maxVal: Q, strokeColor: L, hoveredIdx: w, onHover: I, onLeave: X }),
832
836
  s && /* @__PURE__ */ r(Br, { connections: d, strokeColor: L })
833
837
  ] })
834
838
  }
@@ -1042,4 +1046,4 @@ export {
1042
1046
  Fe as u,
1043
1047
  lt as w
1044
1048
  };
1045
- //# sourceMappingURL=index-DeiweWw8.js.map
1049
+ //# sourceMappingURL=index-9LcZjCK0.js.map