@arqel-dev/ui 0.15.0 → 0.16.0

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 (100) hide show
  1. package/README.md +1 -1
  2. package/dist/{AreaChart-NMQ2RQGA.js → AreaChart-JAZ6LUYG.js} +8 -4
  3. package/dist/AreaChart-JAZ6LUYG.js.map +1 -0
  4. package/dist/ArqelCreatePage-UZAHV4DK.js +8 -0
  5. package/dist/{ArqelCreatePage-MV4JN2MO.js.map → ArqelCreatePage-UZAHV4DK.js.map} +1 -1
  6. package/dist/ArqelDashboardPage-Z5R4XSH4.js +6 -0
  7. package/dist/{ArqelDashboardPage-QK3BYVK3.js.map → ArqelDashboardPage-Z5R4XSH4.js.map} +1 -1
  8. package/dist/ArqelEditPage-RRYFYOTC.js +8 -0
  9. package/dist/{ArqelShowPage-5WWUSYC7.js.map → ArqelEditPage-RRYFYOTC.js.map} +1 -1
  10. package/dist/ArqelIndexPage-J2EUV2PI.js +12 -0
  11. package/dist/{ArqelIndexPage-R6JL5KOH.js.map → ArqelIndexPage-J2EUV2PI.js.map} +1 -1
  12. package/dist/ArqelShowPage-TVCJAV2F.js +6 -0
  13. package/dist/{ArqelEditPage-7J3IS2BR.js.map → ArqelShowPage-TVCJAV2F.js.map} +1 -1
  14. package/dist/{BarChart-KLHKTLO2.js → BarChart-E52NJSJE.js} +8 -4
  15. package/dist/BarChart-E52NJSJE.js.map +1 -0
  16. package/dist/{DonutChart-L56R4QF2.js → DonutChart-IGSF4LEB.js} +3 -3
  17. package/dist/{DonutChart-L56R4QF2.js.map → DonutChart-IGSF4LEB.js.map} +1 -1
  18. package/dist/{FormRenderer-BJBRIkfH.d.ts → FormRenderer-By8fZp4t.d.ts} +2 -0
  19. package/dist/{LineChart-GHMPHFZZ.js → LineChart-RRPGAZON.js} +8 -4
  20. package/dist/LineChart-RRPGAZON.js.map +1 -0
  21. package/dist/PieChart-SGN7V5LQ.js +4 -0
  22. package/dist/{PieChart-T2VQOFPP.js.map → PieChart-SGN7V5LQ.js.map} +1 -1
  23. package/dist/{RadarChart-CSWR5AO7.js → RadarChart-3AOM736J.js} +8 -4
  24. package/dist/RadarChart-3AOM736J.js.map +1 -0
  25. package/dist/{Topbar-DffcNdcJ.d.ts → UserMenu-B5XbC_Gy.d.ts} +24 -4
  26. package/dist/action.js +3 -3
  27. package/dist/{chunk-BJER6TOI.js → chunk-3VSDQCFO.js} +3 -3
  28. package/dist/{chunk-BJER6TOI.js.map → chunk-3VSDQCFO.js.map} +1 -1
  29. package/dist/{chunk-ZAM5TUPP.js → chunk-CMNZLA32.js} +60 -25
  30. package/dist/chunk-CMNZLA32.js.map +1 -0
  31. package/dist/{chunk-CVAMCRLL.js → chunk-EG2DASKR.js} +8 -4
  32. package/dist/chunk-EG2DASKR.js.map +1 -0
  33. package/dist/{chunk-DSULVRB6.js → chunk-GJ2FKAOM.js} +5 -3
  34. package/dist/chunk-GJ2FKAOM.js.map +1 -0
  35. package/dist/{chunk-FV7RESKL.js → chunk-HNUUZEOL.js} +28 -16
  36. package/dist/chunk-HNUUZEOL.js.map +1 -0
  37. package/dist/{chunk-37FLEB4N.js → chunk-IO6RMVUF.js} +8 -4
  38. package/dist/chunk-IO6RMVUF.js.map +1 -0
  39. package/dist/{chunk-N6WLCHQE.js → chunk-Q7WGPKUN.js} +6 -4
  40. package/dist/chunk-Q7WGPKUN.js.map +1 -0
  41. package/dist/{chunk-AZICSFBA.js → chunk-S5UNPCMQ.js} +112 -38
  42. package/dist/chunk-S5UNPCMQ.js.map +1 -0
  43. package/dist/{chunk-MTNFFSVA.js → chunk-SK6H7ARE.js} +5 -3
  44. package/dist/chunk-SK6H7ARE.js.map +1 -0
  45. package/dist/{chunk-FP5R6WED.js → chunk-SLLTFOOS.js} +22 -14
  46. package/dist/chunk-SLLTFOOS.js.map +1 -0
  47. package/dist/{chunk-3HN4ARGG.js → chunk-VKZY6J6G.js} +34 -3
  48. package/dist/chunk-VKZY6J6G.js.map +1 -0
  49. package/dist/{chunk-PSPJA5U6.js → chunk-WMOBLT3Z.js} +10 -5
  50. package/dist/chunk-WMOBLT3Z.js.map +1 -0
  51. package/dist/{chunk-C5H44NSP.js → chunk-WZRPGPLH.js} +10 -5
  52. package/dist/chunk-WZRPGPLH.js.map +1 -0
  53. package/dist/{chunk-N5U2BB6T.js → chunk-X2X6YDOX.js} +102 -28
  54. package/dist/chunk-X2X6YDOX.js.map +1 -0
  55. package/dist/{chunk-4I5S6MH3.js → chunk-X4ZFKOPX.js} +4 -4
  56. package/dist/{chunk-4I5S6MH3.js.map → chunk-X4ZFKOPX.js.map} +1 -1
  57. package/dist/{chunk-UXN67E5L.js → chunk-YQ6KXR3U.js} +8 -10
  58. package/dist/chunk-YQ6KXR3U.js.map +1 -0
  59. package/dist/{chunk-HSDZM4AM.js → chunk-YYQ45W25.js} +37 -24
  60. package/dist/chunk-YYQ45W25.js.map +1 -0
  61. package/dist/flash.js +1 -1
  62. package/dist/form.d.ts +3 -1
  63. package/dist/form.js +1 -1
  64. package/dist/index.d.ts +2 -2
  65. package/dist/index.js +10 -10
  66. package/dist/pages.js +17 -17
  67. package/dist/palette.js +1 -1
  68. package/dist/resource.js +2 -2
  69. package/dist/shell.d.ts +1 -1
  70. package/dist/shell.js +9 -5
  71. package/dist/shell.js.map +1 -1
  72. package/dist/table.js +1 -1
  73. package/dist/utility.js +1 -1
  74. package/dist/widgets.js +2 -2
  75. package/package.json +6 -6
  76. package/dist/AreaChart-NMQ2RQGA.js.map +0 -1
  77. package/dist/ArqelCreatePage-MV4JN2MO.js +0 -8
  78. package/dist/ArqelDashboardPage-QK3BYVK3.js +0 -6
  79. package/dist/ArqelEditPage-7J3IS2BR.js +0 -8
  80. package/dist/ArqelIndexPage-R6JL5KOH.js +0 -12
  81. package/dist/ArqelShowPage-5WWUSYC7.js +0 -6
  82. package/dist/BarChart-KLHKTLO2.js.map +0 -1
  83. package/dist/LineChart-GHMPHFZZ.js.map +0 -1
  84. package/dist/PieChart-T2VQOFPP.js +0 -4
  85. package/dist/RadarChart-CSWR5AO7.js.map +0 -1
  86. package/dist/chunk-37FLEB4N.js.map +0 -1
  87. package/dist/chunk-3HN4ARGG.js.map +0 -1
  88. package/dist/chunk-AZICSFBA.js.map +0 -1
  89. package/dist/chunk-C5H44NSP.js.map +0 -1
  90. package/dist/chunk-CVAMCRLL.js.map +0 -1
  91. package/dist/chunk-DSULVRB6.js.map +0 -1
  92. package/dist/chunk-FP5R6WED.js.map +0 -1
  93. package/dist/chunk-FV7RESKL.js.map +0 -1
  94. package/dist/chunk-HSDZM4AM.js.map +0 -1
  95. package/dist/chunk-MTNFFSVA.js.map +0 -1
  96. package/dist/chunk-N5U2BB6T.js.map +0 -1
  97. package/dist/chunk-N6WLCHQE.js.map +0 -1
  98. package/dist/chunk-PSPJA5U6.js.map +0 -1
  99. package/dist/chunk-UXN67E5L.js.map +0 -1
  100. package/dist/chunk-ZAM5TUPP.js.map +0 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@ Structural React components for [Arqel](https://arqel.dev) admin panels.
14
14
 
15
15
  ```bash
16
16
  pnpm add @arqel-dev/ui @arqel-dev/react @arqel-dev/hooks @arqel-dev/types
17
- pnpm add @inertiajs/react react react-dom @base-ui-components/react @tanstack/react-table lucide-react
17
+ pnpm add @inertiajs/react react react-dom @tanstack/react-table lucide-react recharts
18
18
  ```
19
19
 
20
20
  ## Usage
@@ -1,14 +1,18 @@
1
1
  import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
2
+ import { useArqelLocale } from '@arqel-dev/react/utils';
3
+ import { useMemo } from 'react';
2
4
  import { ResponsiveContainer, AreaChart as AreaChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Area } from 'recharts';
3
5
  import { jsx, jsxs } from 'react/jsx-runtime';
4
6
 
5
7
  function AreaChart({ chartData, height, showLegend, showGrid }) {
6
8
  const rows = toRowShape(chartData);
9
+ const locale = useArqelLocale();
10
+ const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);
7
11
  return /* @__PURE__ */ jsx("div", { "data-testid": "chart-area", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(AreaChart$1, { data: rows, children: [
8
12
  showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
9
13
  /* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
10
- /* @__PURE__ */ jsx(YAxis, {}),
11
- /* @__PURE__ */ jsx(Tooltip, {}),
14
+ /* @__PURE__ */ jsx(YAxis, { tickFormatter: (v) => nf.format(Number(v)) }),
15
+ /* @__PURE__ */ jsx(Tooltip, { formatter: (v) => nf.format(Number(v)) }),
12
16
  showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
13
17
  chartData.datasets.map((ds, i) => {
14
18
  const color = colorFor(ds, i);
@@ -29,5 +33,5 @@ function AreaChart({ chartData, height, showLegend, showGrid }) {
29
33
  }
30
34
 
31
35
  export { AreaChart };
32
- //# sourceMappingURL=AreaChart-NMQ2RQGA.js.map
33
- //# sourceMappingURL=AreaChart-NMQ2RQGA.js.map
36
+ //# sourceMappingURL=AreaChart-JAZ6LUYG.js.map
37
+ //# sourceMappingURL=AreaChart-JAZ6LUYG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/widgets/charts/AreaChart.tsx"],"names":["RechartsAreaChart"],"mappings":";;;;;;AAcO,SAAS,UAAU,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACpF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,MAAM,IAAI,IAAA,CAAK,aAAa,MAAM,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAChE,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,cAAa,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACpD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,WAAA,EAAA,EAAkB,MAAM,IAAA,EACtB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,oBACtB,GAAA,CAAC,KAAA,EAAA,EAAM,aAAA,EAAe,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,oBACnD,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,IAChD,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,KAAM;AACjC,MAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAC5B,MAAA,uBACE,GAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UAEC,IAAA,EAAK,UAAA;AAAA,UACL,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,UACpB,MAAM,EAAA,CAAG,KAAA;AAAA,UACT,MAAA,EAAQ,KAAA;AAAA,UACR,IAAA,EAAM,KAAA;AAAA,UACN,WAAA,EAAa;AAAA,SAAA;AAAA,QANR,EAAA,CAAG;AAAA,OAOV;AAAA,IAEJ,CAAC;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"AreaChart-JAZ6LUYG.js","sourcesContent":["import { useArqelLocale } from '@arqel-dev/react/utils';\nimport { useMemo } from 'react';\nimport {\n Area,\n CartesianGrid,\n Legend,\n AreaChart as RechartsAreaChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function AreaChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n const locale = useArqelLocale();\n const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);\n return (\n <div data-testid=\"chart-area\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsAreaChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis tickFormatter={(v) => nf.format(Number(v))} />\n <Tooltip formatter={(v) => nf.format(Number(v))} />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => {\n const color = colorFor(ds, i);\n return (\n <Area\n key={ds.label}\n type=\"monotone\"\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={color}\n fill={color}\n fillOpacity={0.3}\n />\n );\n })}\n </RechartsAreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ export { ArqelCreatePage as default } from './chunk-IO6RMVUF.js';
2
+ import './chunk-MXUXMHOK.js';
3
+ import './chunk-MZMYV43C.js';
4
+ import './chunk-CMNZLA32.js';
5
+ import './chunk-H23VX3RR.js';
6
+ import './chunk-B7ULUJVO.js';
7
+ //# sourceMappingURL=ArqelCreatePage-UZAHV4DK.js.map
8
+ //# sourceMappingURL=ArqelCreatePage-UZAHV4DK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelCreatePage-MV4JN2MO.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelCreatePage-UZAHV4DK.js"}
@@ -0,0 +1,6 @@
1
+ export { ArqelDashboardPage as default } from './chunk-3VSDQCFO.js';
2
+ import './chunk-YYQ45W25.js';
3
+ import './chunk-WMOBLT3Z.js';
4
+ import './chunk-B7ULUJVO.js';
5
+ //# sourceMappingURL=ArqelDashboardPage-Z5R4XSH4.js.map
6
+ //# sourceMappingURL=ArqelDashboardPage-Z5R4XSH4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelDashboardPage-QK3BYVK3.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelDashboardPage-Z5R4XSH4.js"}
@@ -0,0 +1,8 @@
1
+ export { ArqelEditPage as default } from './chunk-YQ6KXR3U.js';
2
+ import './chunk-MXUXMHOK.js';
3
+ import './chunk-MZMYV43C.js';
4
+ import './chunk-CMNZLA32.js';
5
+ import './chunk-H23VX3RR.js';
6
+ import './chunk-B7ULUJVO.js';
7
+ //# sourceMappingURL=ArqelEditPage-RRYFYOTC.js.map
8
+ //# sourceMappingURL=ArqelEditPage-RRYFYOTC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelShowPage-5WWUSYC7.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelEditPage-RRYFYOTC.js"}
@@ -0,0 +1,12 @@
1
+ export { ArqelIndexPage as default } from './chunk-X4ZFKOPX.js';
2
+ import './chunk-EG2DASKR.js';
3
+ import './chunk-S5UNPCMQ.js';
4
+ import './chunk-RMPOR2YZ.js';
5
+ import './chunk-SLLTFOOS.js';
6
+ import './chunk-VKZY6J6G.js';
7
+ import './chunk-MZMYV43C.js';
8
+ import './chunk-CMNZLA32.js';
9
+ import './chunk-H23VX3RR.js';
10
+ import './chunk-B7ULUJVO.js';
11
+ //# sourceMappingURL=ArqelIndexPage-J2EUV2PI.js.map
12
+ //# sourceMappingURL=ArqelIndexPage-J2EUV2PI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelIndexPage-R6JL5KOH.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelIndexPage-J2EUV2PI.js"}
@@ -0,0 +1,6 @@
1
+ export { ArqelShowPage as default } from './chunk-Q7WGPKUN.js';
2
+ import './chunk-MXUXMHOK.js';
3
+ import './chunk-CMNZLA32.js';
4
+ import './chunk-B7ULUJVO.js';
5
+ //# sourceMappingURL=ArqelShowPage-TVCJAV2F.js.map
6
+ //# sourceMappingURL=ArqelShowPage-TVCJAV2F.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelEditPage-7J3IS2BR.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelShowPage-TVCJAV2F.js"}
@@ -1,19 +1,23 @@
1
1
  import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
2
+ import { useArqelLocale } from '@arqel-dev/react/utils';
3
+ import { useMemo } from 'react';
2
4
  import { ResponsiveContainer, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Bar } from 'recharts';
3
5
  import { jsx, jsxs } from 'react/jsx-runtime';
4
6
 
5
7
  function BarChart({ chartData, height, showLegend, showGrid }) {
6
8
  const rows = toRowShape(chartData);
9
+ const locale = useArqelLocale();
10
+ const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);
7
11
  return /* @__PURE__ */ jsx("div", { "data-testid": "chart-bar", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(BarChart$1, { data: rows, children: [
8
12
  showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
9
13
  /* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
10
- /* @__PURE__ */ jsx(YAxis, {}),
11
- /* @__PURE__ */ jsx(Tooltip, {}),
14
+ /* @__PURE__ */ jsx(YAxis, { tickFormatter: (v) => nf.format(Number(v)) }),
15
+ /* @__PURE__ */ jsx(Tooltip, { formatter: (v) => nf.format(Number(v)) }),
12
16
  showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
13
17
  chartData.datasets.map((ds, i) => /* @__PURE__ */ jsx(Bar, { dataKey: `dataset${i}`, name: ds.label, fill: colorFor(ds, i) }, ds.label))
14
18
  ] }) }) });
15
19
  }
16
20
 
17
21
  export { BarChart };
18
- //# sourceMappingURL=BarChart-KLHKTLO2.js.map
19
- //# sourceMappingURL=BarChart-KLHKTLO2.js.map
22
+ //# sourceMappingURL=BarChart-E52NJSJE.js.map
23
+ //# sourceMappingURL=BarChart-E52NJSJE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/widgets/charts/BarChart.tsx"],"names":["RechartsBarChart"],"mappings":";;;;;;AAcO,SAAS,SAAS,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACnF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,MAAM,IAAI,IAAA,CAAK,aAAa,MAAM,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAChE,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,aAAY,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACnD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,UAAA,EAAA,EAAiB,MAAM,IAAA,EACrB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,oBACtB,GAAA,CAAC,KAAA,EAAA,EAAM,aAAA,EAAe,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,oBACnD,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,IAChD,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,SAAS,GAAA,CAAI,CAAC,IAAI,CAAA,qBAC3B,GAAA,CAAC,GAAA,EAAA,EAAmB,OAAA,EAAS,CAAA,OAAA,EAAU,CAAC,IAAI,IAAA,EAAM,EAAA,CAAG,OAAO,IAAA,EAAM,QAAA,CAAS,IAAI,CAAC,CAAA,EAAA,EAAtE,EAAA,CAAG,KAAsE,CACpF;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"BarChart-E52NJSJE.js","sourcesContent":["import { useArqelLocale } from '@arqel-dev/react/utils';\nimport { useMemo } from 'react';\nimport {\n Bar,\n CartesianGrid,\n Legend,\n BarChart as RechartsBarChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function BarChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n const locale = useArqelLocale();\n const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);\n return (\n <div data-testid=\"chart-bar\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis tickFormatter={(v) => nf.format(Number(v))} />\n <Tooltip formatter={(v) => nf.format(Number(v))} />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => (\n <Bar key={ds.label} dataKey={`dataset${i}`} name={ds.label} fill={colorFor(ds, i)} />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PieChart } from './chunk-C5H44NSP.js';
1
+ import { PieChart } from './chunk-WZRPGPLH.js';
2
2
  import './chunk-L3JBBN4H.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -7,5 +7,5 @@ function DonutChart(props) {
7
7
  }
8
8
 
9
9
  export { DonutChart };
10
- //# sourceMappingURL=DonutChart-L56R4QF2.js.map
11
- //# sourceMappingURL=DonutChart-L56R4QF2.js.map
10
+ //# sourceMappingURL=DonutChart-IGSF4LEB.js.map
11
+ //# sourceMappingURL=DonutChart-IGSF4LEB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/widgets/charts/DonutChart.tsx"],"names":[],"mappings":";;;;AAOO,SAAS,WAAW,KAAA,EAAsB;AAC/C,EAAA,2BAAQ,QAAA,EAAA,EAAU,GAAG,OAAO,WAAA,EAAa,EAAA,EAAI,QAAO,aAAA,EAAc,CAAA;AACpE","file":"DonutChart-L56R4QF2.js","sourcesContent":["import type { ChartSubProps } from '../types';\nimport { PieChart } from './PieChart';\n\n/**\n * DonutChart is a PieChart with a non-zero innerRadius. We delegate so the\n * Recharts primitives stay in one chunk per shape (pie ≡ donut visually).\n */\nexport function DonutChart(props: ChartSubProps) {\n return <PieChart {...props} innerRadius={60} testId=\"chart-donut\" />;\n}\n"]}
1
+ {"version":3,"sources":["../src/widgets/charts/DonutChart.tsx"],"names":[],"mappings":";;;;AAOO,SAAS,WAAW,KAAA,EAAsB;AAC/C,EAAA,2BAAQ,QAAA,EAAA,EAAU,GAAG,OAAO,WAAA,EAAa,EAAA,EAAI,QAAO,aAAA,EAAc,CAAA;AACpE","file":"DonutChart-IGSF4LEB.js","sourcesContent":["import type { ChartSubProps } from '../types';\nimport { PieChart } from './PieChart';\n\n/**\n * DonutChart is a PieChart with a non-zero innerRadius. We delegate so the\n * Recharts primitives stay in one chunk per shape (pie ≡ donut visually).\n */\nexport function DonutChart(props: ChartSubProps) {\n return <PieChart {...props} innerRadius={60} testId=\"chart-donut\" />;\n}\n"]}
@@ -24,6 +24,8 @@ interface FieldRendererProps {
24
24
  className?: string | undefined;
25
25
  inputId?: string | undefined;
26
26
  describedBy?: string | undefined;
27
+ /** Whether the field is in an error state (sets `aria-invalid` on the input). */
28
+ invalid?: boolean | undefined;
27
29
  }
28
30
  declare function FieldRenderer(props: FieldRendererProps): ReactNode;
29
31
 
@@ -1,14 +1,18 @@
1
1
  import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
2
+ import { useArqelLocale } from '@arqel-dev/react/utils';
3
+ import { useMemo } from 'react';
2
4
  import { ResponsiveContainer, LineChart as LineChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Line } from 'recharts';
3
5
  import { jsx, jsxs } from 'react/jsx-runtime';
4
6
 
5
7
  function LineChart({ chartData, height, showLegend, showGrid }) {
6
8
  const rows = toRowShape(chartData);
9
+ const locale = useArqelLocale();
10
+ const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);
7
11
  return /* @__PURE__ */ jsx("div", { "data-testid": "chart-line", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(LineChart$1, { data: rows, children: [
8
12
  showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
9
13
  /* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
10
- /* @__PURE__ */ jsx(YAxis, {}),
11
- /* @__PURE__ */ jsx(Tooltip, {}),
14
+ /* @__PURE__ */ jsx(YAxis, { tickFormatter: (v) => nf.format(Number(v)) }),
15
+ /* @__PURE__ */ jsx(Tooltip, { formatter: (v) => nf.format(Number(v)) }),
12
16
  showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
13
17
  chartData.datasets.map((ds, i) => /* @__PURE__ */ jsx(
14
18
  Line,
@@ -26,5 +30,5 @@ function LineChart({ chartData, height, showLegend, showGrid }) {
26
30
  }
27
31
 
28
32
  export { LineChart };
29
- //# sourceMappingURL=LineChart-GHMPHFZZ.js.map
30
- //# sourceMappingURL=LineChart-GHMPHFZZ.js.map
33
+ //# sourceMappingURL=LineChart-RRPGAZON.js.map
34
+ //# sourceMappingURL=LineChart-RRPGAZON.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/widgets/charts/LineChart.tsx"],"names":["RechartsLineChart"],"mappings":";;;;;;AAcO,SAAS,UAAU,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACpF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,MAAM,IAAI,IAAA,CAAK,aAAa,MAAM,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAChE,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,cAAa,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACpD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,WAAA,EAAA,EAAkB,MAAM,IAAA,EACtB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,oBACtB,GAAA,CAAC,KAAA,EAAA,EAAM,aAAA,EAAe,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,oBACnD,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,IAChD,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,qBAC3B,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QAEC,IAAA,EAAK,UAAA;AAAA,QACL,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,QACpB,MAAM,EAAA,CAAG,KAAA;AAAA,QACT,MAAA,EAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAAA,QACtB,WAAA,EAAa,CAAA;AAAA,QACb,GAAA,EAAK;AAAA,OAAA;AAAA,MANA,EAAA,CAAG;AAAA,KAQX;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"LineChart-RRPGAZON.js","sourcesContent":["import { useArqelLocale } from '@arqel-dev/react/utils';\nimport { useMemo } from 'react';\nimport {\n CartesianGrid,\n Legend,\n Line,\n LineChart as RechartsLineChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function LineChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n const locale = useArqelLocale();\n const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);\n return (\n <div data-testid=\"chart-line\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsLineChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis tickFormatter={(v) => nf.format(Number(v))} />\n <Tooltip formatter={(v) => nf.format(Number(v))} />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => (\n <Line\n key={ds.label}\n type=\"monotone\"\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={colorFor(ds, i)}\n strokeWidth={2}\n dot={false}\n />\n ))}\n </RechartsLineChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export { PieChart } from './chunk-WZRPGPLH.js';
2
+ import './chunk-L3JBBN4H.js';
3
+ //# sourceMappingURL=PieChart-SGN7V5LQ.js.map
4
+ //# sourceMappingURL=PieChart-SGN7V5LQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"PieChart-T2VQOFPP.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"PieChart-SGN7V5LQ.js"}
@@ -1,13 +1,17 @@
1
1
  import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
2
+ import { useArqelLocale } from '@arqel-dev/react/utils';
3
+ import { useMemo } from 'react';
2
4
  import { ResponsiveContainer, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, Tooltip, Legend } from 'recharts';
3
5
  import { jsx, jsxs } from 'react/jsx-runtime';
4
6
 
5
7
  function RadarChart({ chartData, height, showLegend, showGrid }) {
6
8
  const rows = toRowShape(chartData);
9
+ const locale = useArqelLocale();
10
+ const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);
7
11
  return /* @__PURE__ */ jsx("div", { "data-testid": "chart-radar", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(RadarChart$1, { data: rows, children: [
8
12
  showGrid ? /* @__PURE__ */ jsx(PolarGrid, {}) : null,
9
13
  /* @__PURE__ */ jsx(PolarAngleAxis, { dataKey: "name" }),
10
- /* @__PURE__ */ jsx(PolarRadiusAxis, {}),
14
+ /* @__PURE__ */ jsx(PolarRadiusAxis, { tickFormatter: (v) => nf.format(Number(v)) }),
11
15
  chartData.datasets.map((ds, i) => {
12
16
  const color = colorFor(ds, i);
13
17
  return /* @__PURE__ */ jsx(
@@ -22,11 +26,11 @@ function RadarChart({ chartData, height, showLegend, showGrid }) {
22
26
  ds.label
23
27
  );
24
28
  }),
25
- /* @__PURE__ */ jsx(Tooltip, {}),
29
+ /* @__PURE__ */ jsx(Tooltip, { formatter: (v) => nf.format(Number(v)) }),
26
30
  showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null
27
31
  ] }) }) });
28
32
  }
29
33
 
30
34
  export { RadarChart };
31
- //# sourceMappingURL=RadarChart-CSWR5AO7.js.map
32
- //# sourceMappingURL=RadarChart-CSWR5AO7.js.map
35
+ //# sourceMappingURL=RadarChart-3AOM736J.js.map
36
+ //# sourceMappingURL=RadarChart-3AOM736J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/widgets/charts/RadarChart.tsx"],"names":["RechartsRadarChart"],"mappings":";;;;;;AAcO,SAAS,WAAW,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACrF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,MAAM,IAAI,IAAA,CAAK,aAAa,MAAM,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAEhE,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,eAAc,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACrD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,YAAA,EAAA,EAAmB,MAAM,IAAA,EACvB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAU,CAAA,GAAK,IAAA;AAAA,oBAC5B,GAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,oBAC/B,GAAA,CAAC,eAAA,EAAA,EAAgB,aAAA,EAAe,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,IAC5D,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,KAAM;AACjC,MAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAC5B,MAAA,uBACE,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UAEC,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,UACpB,MAAM,EAAA,CAAG,KAAA;AAAA,UACT,MAAA,EAAQ,KAAA;AAAA,UACR,IAAA,EAAM,KAAA;AAAA,UACN,WAAA,EAAa;AAAA,SAAA;AAAA,QALR,EAAA,CAAG;AAAA,OAMV;AAAA,IAEJ,CAAC,CAAA;AAAA,oBACD,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,KAAM,GAAG,MAAA,CAAO,MAAA,CAAO,CAAC,CAAC,CAAA,EAAG,CAAA;AAAA,IAChD,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK;AAAA,GAAA,EAC7B,GACF,CAAA,EACF,CAAA;AAEJ","file":"RadarChart-3AOM736J.js","sourcesContent":["import { useArqelLocale } from '@arqel-dev/react/utils';\nimport { useMemo } from 'react';\nimport {\n Legend,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart as RechartsRadarChart,\n ResponsiveContainer,\n Tooltip,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function RadarChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n const locale = useArqelLocale();\n const nf = useMemo(() => new Intl.NumberFormat(locale), [locale]);\n\n return (\n <div data-testid=\"chart-radar\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsRadarChart data={rows}>\n {showGrid ? <PolarGrid /> : null}\n <PolarAngleAxis dataKey=\"name\" />\n <PolarRadiusAxis tickFormatter={(v) => nf.format(Number(v))} />\n {chartData.datasets.map((ds, i) => {\n const color = colorFor(ds, i);\n return (\n <Radar\n key={ds.label}\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={color}\n fill={color}\n fillOpacity={0.3}\n />\n );\n })}\n <Tooltip formatter={(v) => nf.format(Number(v))} />\n {showLegend ? <Legend /> : null}\n </RechartsRadarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import { ReactNode, ReactElement } from 'react';
3
3
  import { NavigationItemPayload } from '@arqel-dev/hooks';
4
4
 
5
5
  type AppShellVariant = 'sidebar-left' | 'sidebar-right' | 'topbar-only' | 'full-width';
@@ -42,9 +42,29 @@ interface TopbarProps {
42
42
  search?: ReactNode;
43
43
  userMenu?: ReactNode;
44
44
  tenantSwitcher?: ReactNode;
45
- onMobileMenuClick?: () => void;
46
45
  className?: string;
47
46
  }
48
- declare function Topbar({ brand, search, userMenu, tenantSwitcher, onMobileMenuClick, className, }: TopbarProps): react_jsx_runtime.JSX.Element;
47
+ declare function Topbar({ brand, search, userMenu, tenantSwitcher, className }: TopbarProps): react_jsx_runtime.JSX.Element;
49
48
 
50
- export { AppShell as A, Footer as F, MainContent as M, Sidebar as S, Topbar as T, type AppShellProps as a, type AppShellVariant as b, type FooterProps as c, type MainContentMaxWidth as d, type MainContentProps as e, type SidebarProps as f, type TopbarProps as g };
49
+ /**
50
+ * `<UserMenu>` — authenticated-user dropdown for the Topbar `userMenu` slot.
51
+ *
52
+ * Presentational: reads `user`/`logoutUrl`/`profileUrl` via props (no
53
+ * data-fetching). Built on the vendored shadcn DropdownMenu. Logout posts
54
+ * via Inertia (CSRF + redirect handled server-side). Theme control lives
55
+ * here (moved out of the Topbar). Usable standalone — the Profile item and
56
+ * the theme group are each conditional.
57
+ */
58
+
59
+ interface UserMenuProps {
60
+ user: {
61
+ name?: string | null;
62
+ email?: string | null;
63
+ };
64
+ logoutUrl: string;
65
+ profileUrl?: string;
66
+ className?: string;
67
+ }
68
+ declare function UserMenu({ user, logoutUrl, profileUrl, className }: UserMenuProps): ReactElement;
69
+
70
+ export { AppShell as A, Footer as F, MainContent as M, Sidebar as S, Topbar as T, UserMenu as U, type AppShellProps as a, type AppShellVariant as b, type FooterProps as c, type MainContentMaxWidth as d, type MainContentProps as e, type SidebarProps as f, type TopbarProps as g, type UserMenuProps as h };
package/dist/action.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ActionButton, ActionFormModal, ActionMenu, ConfirmDialog } from './chunk-FP5R6WED.js';
2
- import './chunk-3HN4ARGG.js';
1
+ export { ActionButton, ActionFormModal, ActionMenu, ConfirmDialog } from './chunk-SLLTFOOS.js';
2
+ import './chunk-VKZY6J6G.js';
3
3
  import './chunk-MZMYV43C.js';
4
- import './chunk-ZAM5TUPP.js';
4
+ import './chunk-CMNZLA32.js';
5
5
  export { Button, buttonVariants } from './chunk-H23VX3RR.js';
6
6
  import './chunk-B7ULUJVO.js';
7
7
  //# sourceMappingURL=action.js.map
@@ -1,4 +1,4 @@
1
- import { DashboardGrid } from './chunk-HSDZM4AM.js';
1
+ import { DashboardGrid } from './chunk-YYQ45W25.js';
2
2
  import { usePage, router } from '@inertiajs/react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -31,5 +31,5 @@ function ArqelDashboardPage() {
31
31
  }
32
32
 
33
33
  export { ArqelDashboardPage };
34
- //# sourceMappingURL=chunk-BJER6TOI.js.map
35
- //# sourceMappingURL=chunk-BJER6TOI.js.map
34
+ //# sourceMappingURL=chunk-3VSDQCFO.js.map
35
+ //# sourceMappingURL=chunk-3VSDQCFO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/pages/ArqelDashboardPage.tsx"],"names":[],"mappings":";;;;AA0Be,SAAR,kBAAA,GAAmD;AACxD,EAAA,MAAM,EAAE,SAAA,EAAW,YAAA,EAAa,GAAI,SAAiC,CAAE,KAAA;AAEvE,EAAA,MAAM,kBAAA,GAAqB,CAAC,IAAA,EAAc,KAAA,KAAyB;AACjE,IAAA,MAAM,OAAA,GAAU,gBAAgB,EAAC;AACjC,IAAA,MAAM,IAAA,GAAgC,EAAE,GAAG,OAAA,EAAQ;AACnD,IAAA,IAAI,KAAA,KAAU,MAAA,IAAa,KAAA,KAAU,IAAA,IAAQ,UAAU,EAAA,EAAI;AACzD,MAAA,OAAO,KAAK,IAAI,CAAA;AAAA,IAClB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,IAAI,CAAA,GAAI,KAAA;AAAA,IACf;AAEA,IAAA,MAAM,IAAA,GAAO,SAAA,CAAU,IAAA,IAAQ,CAAA,kBAAA,EAAqB,UAAU,EAAE,CAAA,CAAA;AAChE,IAAA,MAAM,MAAA,GAAU,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,CAAE,MAAA,GAAS,CAAA,GAAI,EAAE,OAAA,EAAS,IAAA,EAAK,GAAI,EAAC;AAEpE,IAAA,MAAA,CAAO,GAAA,CAAI,MAAM,MAAA,EAAQ;AAAA,MACvB,aAAA,EAAe,IAAA;AAAA,MACf,cAAA,EAAgB,IAAA;AAAA,MAChB,OAAA,EAAS;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,YAAA,EAAc,gBAAgB,EAAC;AAAA,MAC/B,cAAA,EAAgB;AAAA;AAAA,GAClB;AAEJ","file":"chunk-BJER6TOI.js","sourcesContent":["/**\n * Default Inertia page for `arqel::dashboard`.\n *\n * Bridges the Inertia payload emitted by\n * `Arqel\\Widgets\\Http\\Controllers\\DashboardController::show` into the\n * existing `<DashboardGrid>` component. The grid already handles the\n * heading/description chrome, the filter bar and the responsive\n * widget grid (column spans, polling, deferred fetch), so this page\n * only owns one piece of glue: lifting filter state up into the URL\n * so deep-link refreshes rehydrate cleanly.\n *\n * Filter changes navigate via `router.get(path, { filters: ... })`,\n * matching `DashboardController::show` which reads\n * `$request->input('filters', [])` and forwards it as `filterValues`.\n */\n\nimport { router, usePage } from '@inertiajs/react';\nimport type { JSX } from 'react';\nimport { DashboardGrid, type DashboardPayload } from '../widgets/index.js';\n\ninterface ArqelDashboardPageProps {\n dashboard: DashboardPayload;\n filterValues?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport default function ArqelDashboardPage(): JSX.Element {\n const { dashboard, filterValues } = usePage<ArqelDashboardPageProps>().props;\n\n const handleFilterChange = (name: string, value: unknown): void => {\n const current = filterValues ?? {};\n const next: Record<string, unknown> = { ...current };\n if (value === undefined || value === null || value === '') {\n delete next[name];\n } else {\n next[name] = value;\n }\n\n const path = dashboard.path ?? `/admin/dashboards/${dashboard.id}`;\n const params = (Object.keys(next).length > 0 ? { filters: next } : {}) as never;\n\n router.get(path, params, {\n preserveState: true,\n preserveScroll: true,\n replace: true,\n });\n };\n\n return (\n <DashboardGrid\n dashboard={dashboard}\n filterValues={filterValues ?? {}}\n onFilterChange={handleFilterChange}\n />\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/pages/ArqelDashboardPage.tsx"],"names":[],"mappings":";;;;AA0Be,SAAR,kBAAA,GAAmD;AACxD,EAAA,MAAM,EAAE,SAAA,EAAW,YAAA,EAAa,GAAI,SAAiC,CAAE,KAAA;AAEvE,EAAA,MAAM,kBAAA,GAAqB,CAAC,IAAA,EAAc,KAAA,KAAyB;AACjE,IAAA,MAAM,OAAA,GAAU,gBAAgB,EAAC;AACjC,IAAA,MAAM,IAAA,GAAgC,EAAE,GAAG,OAAA,EAAQ;AACnD,IAAA,IAAI,KAAA,KAAU,MAAA,IAAa,KAAA,KAAU,IAAA,IAAQ,UAAU,EAAA,EAAI;AACzD,MAAA,OAAO,KAAK,IAAI,CAAA;AAAA,IAClB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,IAAI,CAAA,GAAI,KAAA;AAAA,IACf;AAEA,IAAA,MAAM,IAAA,GAAO,SAAA,CAAU,IAAA,IAAQ,CAAA,kBAAA,EAAqB,UAAU,EAAE,CAAA,CAAA;AAChE,IAAA,MAAM,MAAA,GAAU,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,CAAE,MAAA,GAAS,CAAA,GAAI,EAAE,OAAA,EAAS,IAAA,EAAK,GAAI,EAAC;AAEpE,IAAA,MAAA,CAAO,GAAA,CAAI,MAAM,MAAA,EAAQ;AAAA,MACvB,aAAA,EAAe,IAAA;AAAA,MACf,cAAA,EAAgB,IAAA;AAAA,MAChB,OAAA,EAAS;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,YAAA,EAAc,gBAAgB,EAAC;AAAA,MAC/B,cAAA,EAAgB;AAAA;AAAA,GAClB;AAEJ","file":"chunk-3VSDQCFO.js","sourcesContent":["/**\n * Default Inertia page for `arqel::dashboard`.\n *\n * Bridges the Inertia payload emitted by\n * `Arqel\\Widgets\\Http\\Controllers\\DashboardController::show` into the\n * existing `<DashboardGrid>` component. The grid already handles the\n * heading/description chrome, the filter bar and the responsive\n * widget grid (column spans, polling, deferred fetch), so this page\n * only owns one piece of glue: lifting filter state up into the URL\n * so deep-link refreshes rehydrate cleanly.\n *\n * Filter changes navigate via `router.get(path, { filters: ... })`,\n * matching `DashboardController::show` which reads\n * `$request->input('filters', [])` and forwards it as `filterValues`.\n */\n\nimport { router, usePage } from '@inertiajs/react';\nimport type { JSX } from 'react';\nimport { DashboardGrid, type DashboardPayload } from '../widgets/index.js';\n\ninterface ArqelDashboardPageProps {\n dashboard: DashboardPayload;\n filterValues?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport default function ArqelDashboardPage(): JSX.Element {\n const { dashboard, filterValues } = usePage<ArqelDashboardPageProps>().props;\n\n const handleFilterChange = (name: string, value: unknown): void => {\n const current = filterValues ?? {};\n const next: Record<string, unknown> = { ...current };\n if (value === undefined || value === null || value === '') {\n delete next[name];\n } else {\n next[name] = value;\n }\n\n const path = dashboard.path ?? `/admin/dashboards/${dashboard.id}`;\n const params = (Object.keys(next).length > 0 ? { filters: next } : {}) as never;\n\n router.get(path, params, {\n preserveState: true,\n preserveScroll: true,\n replace: true,\n });\n };\n\n return (\n <DashboardGrid\n dashboard={dashboard}\n filterValues={filterValues ?? {}}\n onFilterChange={handleFilterChange}\n />\n );\n}\n"]}