@12-apps/ui 6.27.2 → 6.29.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 (121) hide show
  1. package/dist/_internal/components/data-display/Avatar/Avatar.js +3 -3
  2. package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
  3. package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
  4. package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
  5. package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
  6. package/dist/_internal/components/data-display/Chart/chart-renderers.js +2 -2
  7. package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
  8. package/dist/_internal/components/data-display/DataGrid/DataGrid.body.js +2 -2
  9. package/dist/_internal/components/data-display/DataGrid/DataGrid.cells.js +1 -1
  10. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
  11. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +18 -17
  12. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +19 -18
  13. package/dist/_internal/components/data-display/DataViews/base-list-card.js +2 -2
  14. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +3 -3
  15. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +5 -4
  16. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +17 -16
  17. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +5 -5
  18. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +3 -3
  19. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +4 -4
  20. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
  21. package/dist/_internal/components/data-display/DataViews/data-views-row-detail.js +8 -0
  22. package/dist/_internal/components/data-display/DataViews/data-views-row-detail.js.map +1 -0
  23. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +3 -3
  24. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +2 -2
  25. package/dist/_internal/components/data-display/index.js +19 -19
  26. package/dist/_internal/components/index.js +19 -19
  27. package/dist/_internal/social-login-button/social-login-button.js +1 -1
  28. package/dist/_internal/user-avatar/user-avatar.js +4 -4
  29. package/dist/charts.js +11 -11
  30. package/dist/{chunk-EMNGIYH6.js → chunk-7TZ6OC5T.js} +5 -5
  31. package/dist/{chunk-FUT7HGWZ.js → chunk-ALAJBLBE.js} +2 -2
  32. package/dist/{chunk-E5LWJDI3.js → chunk-AROBXRC5.js} +11 -5
  33. package/dist/chunk-AROBXRC5.js.map +1 -0
  34. package/dist/{chunk-LQRJCEFO.js → chunk-DVE53B2L.js} +4 -4
  35. package/dist/chunk-DVE53B2L.js.map +1 -0
  36. package/dist/{chunk-WZUNBSS7.js → chunk-DVUPIVI2.js} +4 -4
  37. package/dist/{chunk-KCAGCDCQ.js → chunk-EYC6ERJJ.js} +2 -2
  38. package/dist/chunk-EYC6ERJJ.js.map +1 -0
  39. package/dist/{chunk-35UG2QDB.js → chunk-HS2OJI6L.js} +7 -7
  40. package/dist/{chunk-KZLLTOB2.js → chunk-HTZNB6IV.js} +2 -2
  41. package/dist/{chunk-FJQ5CH4Q.js → chunk-J2K65BQQ.js} +2 -2
  42. package/dist/{chunk-EZMCWRXO.js → chunk-MHSTG7FF.js} +2 -2
  43. package/dist/{chunk-BBYCZZBH.js → chunk-MRMNVGNX.js} +2 -2
  44. package/dist/{chunk-DACURY25.js → chunk-NY2Y2SHA.js} +3 -3
  45. package/dist/chunk-O5UGAL2V.js +15 -0
  46. package/dist/chunk-O5UGAL2V.js.map +1 -0
  47. package/dist/{chunk-SUWIHCD6.js → chunk-PVIAHB7D.js} +4 -4
  48. package/dist/{chunk-FJGHP2QW.js → chunk-QGAYEBMU.js} +8 -2
  49. package/dist/chunk-QGAYEBMU.js.map +1 -0
  50. package/dist/{chunk-DFLTUI7W.js → chunk-QZBUGUOY.js} +4 -4
  51. package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
  52. package/dist/{chunk-Y6KPZQPI.js → chunk-SOCKK67R.js} +4 -4
  53. package/dist/{chunk-SOJQEJAE.js → chunk-THOPGHTY.js} +2 -2
  54. package/dist/{chunk-6R567DH4.js → chunk-TSFFZ3AH.js} +8 -7
  55. package/dist/chunk-TSFFZ3AH.js.map +1 -0
  56. package/dist/{chunk-EZ5Z5UFI.js → chunk-TTW4MAOJ.js} +5 -5
  57. package/dist/{chunk-S7HRED4D.js → chunk-VLHGBFR6.js} +3 -3
  58. package/dist/{chunk-MC2WCZK5.js → chunk-XBZ43VIV.js} +6 -6
  59. package/dist/{chunk-JLBHH2JU.js → chunk-XOCLWQON.js} +2 -2
  60. package/dist/{chunk-2WSU6OGE.js → chunk-YEWCIMPZ.js} +12 -3
  61. package/dist/chunk-YEWCIMPZ.js.map +1 -0
  62. package/dist/data-display/Avatar.js +3 -3
  63. package/dist/data-display/CardKit.js +3 -3
  64. package/dist/data-display/Carousel.js +2 -2
  65. package/dist/data-display/Chart.js +11 -11
  66. package/dist/data-display/DataGrid.js +3 -3
  67. package/dist/data-display/DataViews.js +22 -21
  68. package/dist/social-login-button.js +1 -1
  69. package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts.map +1 -1
  70. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +10 -0
  71. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
  72. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +6 -0
  73. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
  74. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +3 -0
  75. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
  76. package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts +3 -0
  77. package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts.map +1 -1
  78. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +3 -0
  79. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
  80. package/dist/types/components/data-display/DataViews/data-views-row-detail.d.ts +27 -0
  81. package/dist/types/components/data-display/DataViews/data-views-row-detail.d.ts.map +1 -0
  82. package/dist/types/components/data-display/DataViews/index.d.ts +1 -0
  83. package/dist/types/components/data-display/DataViews/index.d.ts.map +1 -1
  84. package/dist/types/social-login-button/social-login-button.d.ts +10 -0
  85. package/dist/types/social-login-button/social-login-button.d.ts.map +1 -1
  86. package/dist/user-avatar.js +4 -4
  87. package/package.json +1 -1
  88. package/src/components/data-display/DataGrid/DataGrid.cells.tsx +23 -9
  89. package/src/components/data-display/DataGrid/DataGrid.md +8 -0
  90. package/src/components/data-display/DataGrid/DataGrid.types.ts +10 -0
  91. package/src/components/data-display/DataViews/DataViewsGrid.tsx +6 -0
  92. package/src/components/data-display/DataViews/DataViewsTableBase.tsx +3 -0
  93. package/src/components/data-display/DataViews/data-views-grid-bodies.tsx +7 -0
  94. package/src/components/data-display/DataViews/data-views-grid-parts.tsx +4 -0
  95. package/src/components/data-display/DataViews/data-views-row-detail.ts +40 -0
  96. package/src/components/data-display/DataViews/index.ts +1 -0
  97. package/src/social-login-button/social-login-button.tsx +25 -1
  98. package/dist/chunk-2WSU6OGE.js.map +0 -1
  99. package/dist/chunk-6R567DH4.js.map +0 -1
  100. package/dist/chunk-E5LWJDI3.js.map +0 -1
  101. package/dist/chunk-FJGHP2QW.js.map +0 -1
  102. package/dist/chunk-KCAGCDCQ.js.map +0 -1
  103. package/dist/chunk-LQRJCEFO.js.map +0 -1
  104. /package/dist/{chunk-EMNGIYH6.js.map → chunk-7TZ6OC5T.js.map} +0 -0
  105. /package/dist/{chunk-FUT7HGWZ.js.map → chunk-ALAJBLBE.js.map} +0 -0
  106. /package/dist/{chunk-WZUNBSS7.js.map → chunk-DVUPIVI2.js.map} +0 -0
  107. /package/dist/{chunk-35UG2QDB.js.map → chunk-HS2OJI6L.js.map} +0 -0
  108. /package/dist/{chunk-KZLLTOB2.js.map → chunk-HTZNB6IV.js.map} +0 -0
  109. /package/dist/{chunk-FJQ5CH4Q.js.map → chunk-J2K65BQQ.js.map} +0 -0
  110. /package/dist/{chunk-EZMCWRXO.js.map → chunk-MHSTG7FF.js.map} +0 -0
  111. /package/dist/{chunk-BBYCZZBH.js.map → chunk-MRMNVGNX.js.map} +0 -0
  112. /package/dist/{chunk-DACURY25.js.map → chunk-NY2Y2SHA.js.map} +0 -0
  113. /package/dist/{chunk-SUWIHCD6.js.map → chunk-PVIAHB7D.js.map} +0 -0
  114. /package/dist/{chunk-DFLTUI7W.js.map → chunk-QZBUGUOY.js.map} +0 -0
  115. /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
  116. /package/dist/{chunk-Y6KPZQPI.js.map → chunk-SOCKK67R.js.map} +0 -0
  117. /package/dist/{chunk-SOJQEJAE.js.map → chunk-THOPGHTY.js.map} +0 -0
  118. /package/dist/{chunk-EZ5Z5UFI.js.map → chunk-TTW4MAOJ.js.map} +0 -0
  119. /package/dist/{chunk-S7HRED4D.js.map → chunk-VLHGBFR6.js.map} +0 -0
  120. /package/dist/{chunk-MC2WCZK5.js.map → chunk-XBZ43VIV.js.map} +0 -0
  121. /package/dist/{chunk-JLBHH2JU.js.map → chunk-XOCLWQON.js.map} +0 -0
@@ -494,7 +494,8 @@ import {
494
494
  import "../../chunk-62FET2BM.js";
495
495
  import {
496
496
  Carousel
497
- } from "../../chunk-Y6KPZQPI.js";
497
+ } from "../../chunk-SOCKK67R.js";
498
+ import "../../chunk-RUIV5TVA.js";
498
499
  import "../../chunk-R6SSXEK2.js";
499
500
  import "../../chunk-RXVPUW7V.js";
500
501
  import "../../chunk-WIXUMFU7.js";
@@ -503,7 +504,6 @@ import {
503
504
  CarouselIndicators,
504
505
  CarouselThumbnails
505
506
  } from "../../chunk-624TFFLJ.js";
506
- import "../../chunk-RUIV5TVA.js";
507
507
  import {
508
508
  Chip
509
509
  } from "../../chunk-FPWB5ILF.js";
@@ -639,11 +639,11 @@ import {
639
639
  import "../../chunk-L5CPOEDP.js";
640
640
  import {
641
641
  DataGrid
642
- } from "../../chunk-EZ5Z5UFI.js";
642
+ } from "../../chunk-TTW4MAOJ.js";
643
+ import "../../chunk-HTZNB6IV.js";
643
644
  import "../../chunk-5E3XZAED.js";
644
645
  import "../../chunk-DLJGBJZW.js";
645
- import "../../chunk-KZLLTOB2.js";
646
- import "../../chunk-E5LWJDI3.js";
646
+ import "../../chunk-AROBXRC5.js";
647
647
  import "../../chunk-G3E66C6J.js";
648
648
  import "../../chunk-SNCSGLJ6.js";
649
649
  import {
@@ -721,14 +721,11 @@ import "../../chunk-RTSK5OZT.js";
721
721
  import "../../chunk-5KLSLD72.js";
722
722
  import {
723
723
  SpecChart
724
- } from "../../chunk-S7HRED4D.js";
724
+ } from "../../chunk-VLHGBFR6.js";
725
725
  import {
726
726
  Chart
727
- } from "../../chunk-EMNGIYH6.js";
728
- import "../../chunk-WZUNBSS7.js";
729
- import "../../chunk-HKV4MQ2W.js";
730
- import "../../chunk-XXDXW6TX.js";
731
- import "../../chunk-4V532JF6.js";
727
+ } from "../../chunk-7TZ6OC5T.js";
728
+ import "../../chunk-DVUPIVI2.js";
732
729
  import {
733
730
  ChartContainer,
734
731
  ChartLegend,
@@ -736,21 +733,24 @@ import {
736
733
  ChartTooltip,
737
734
  ChartTooltipContent
738
735
  } from "../../chunk-M5T3COS2.js";
736
+ import "../../chunk-HKV4MQ2W.js";
737
+ import "../../chunk-XXDXW6TX.js";
738
+ import "../../chunk-4V532JF6.js";
739
739
  import {
740
740
  CHART_SEMANTIC_COLORS,
741
741
  ChartSpecError,
742
742
  parseChartSpec,
743
743
  specToChartProps
744
- } from "../../chunk-GOWBYHYW.js";
745
- import {
746
- chartValueFormatter,
747
- formatChartValue
748
- } from "../../chunk-QVWNK4JO.js";
744
+ } from "../../chunk-R6SBP5M5.js";
749
745
  import {
750
746
  getChartSpecRenderer,
751
747
  getRegisteredChartSpecTypes,
752
748
  registerChartSpecRenderer
753
749
  } from "../../chunk-WKUA6P3W.js";
750
+ import {
751
+ chartValueFormatter,
752
+ formatChartValue
753
+ } from "../../chunk-QVWNK4JO.js";
754
754
  import "../../chunk-6GP2DOOO.js";
755
755
  import {
756
756
  Heading
@@ -765,11 +765,11 @@ import "../../chunk-IFPTVHYR.js";
765
765
  import {
766
766
  Avatar,
767
767
  AvatarGroup
768
- } from "../../chunk-SOJQEJAE.js";
768
+ } from "../../chunk-THOPGHTY.js";
769
769
  import "../../chunk-3ZVUNSFF.js";
770
- import "../../chunk-35UG2QDB.js";
771
- import "../../chunk-XRMZMBE3.js";
770
+ import "../../chunk-HS2OJI6L.js";
772
771
  import "../../chunk-FAITHWIO.js";
772
+ import "../../chunk-XRMZMBE3.js";
773
773
  import "../../chunk-VUHLNYAE.js";
774
774
  import "../../chunk-2GSIEDGN.js";
775
775
  import {
@@ -5,7 +5,7 @@ import {
5
5
  GoogleIcon,
6
6
  SocialLoginButton,
7
7
  SocialLoginContainer
8
- } from "../../chunk-2WSU6OGE.js";
8
+ } from "../../chunk-YEWCIMPZ.js";
9
9
  import "../../chunk-INGPH3YQ.js";
10
10
  import "../../chunk-6GP2DOOO.js";
11
11
  import "../../chunk-SLMA4UQS.js";
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  UserAvatar,
4
4
  UserMenu
5
- } from "../../chunk-FUT7HGWZ.js";
5
+ } from "../../chunk-ALAJBLBE.js";
6
6
  import "../../chunk-UDQSIRAP.js";
7
- import "../../chunk-SOJQEJAE.js";
7
+ import "../../chunk-THOPGHTY.js";
8
8
  import "../../chunk-3ZVUNSFF.js";
9
- import "../../chunk-35UG2QDB.js";
10
- import "../../chunk-XRMZMBE3.js";
9
+ import "../../chunk-HS2OJI6L.js";
11
10
  import "../../chunk-FAITHWIO.js";
11
+ import "../../chunk-XRMZMBE3.js";
12
12
  import "../../chunk-VUHLNYAE.js";
13
13
  import "../../chunk-2GSIEDGN.js";
14
14
  import "../../chunk-AVI3XHRQ.js";
package/dist/charts.js CHANGED
@@ -1,14 +1,11 @@
1
1
  import "./chunk-5KLSLD72.js";
2
2
  import {
3
3
  SpecChart
4
- } from "./chunk-S7HRED4D.js";
4
+ } from "./chunk-VLHGBFR6.js";
5
5
  import {
6
6
  Chart
7
- } from "./chunk-EMNGIYH6.js";
8
- import "./chunk-WZUNBSS7.js";
9
- import "./chunk-HKV4MQ2W.js";
10
- import "./chunk-XXDXW6TX.js";
11
- import "./chunk-4V532JF6.js";
7
+ } from "./chunk-7TZ6OC5T.js";
8
+ import "./chunk-DVUPIVI2.js";
12
9
  import {
13
10
  ChartContainer,
14
11
  ChartLegend,
@@ -16,21 +13,24 @@ import {
16
13
  ChartTooltip,
17
14
  ChartTooltipContent
18
15
  } from "./chunk-M5T3COS2.js";
16
+ import "./chunk-HKV4MQ2W.js";
17
+ import "./chunk-XXDXW6TX.js";
18
+ import "./chunk-4V532JF6.js";
19
19
  import {
20
20
  CHART_SEMANTIC_COLORS,
21
21
  ChartSpecError,
22
22
  parseChartSpec,
23
23
  specToChartProps
24
- } from "./chunk-GOWBYHYW.js";
25
- import {
26
- chartValueFormatter,
27
- formatChartValue
28
- } from "./chunk-QVWNK4JO.js";
24
+ } from "./chunk-R6SBP5M5.js";
29
25
  import {
30
26
  getChartSpecRenderer,
31
27
  getRegisteredChartSpecTypes,
32
28
  registerChartSpecRenderer
33
29
  } from "./chunk-WKUA6P3W.js";
30
+ import {
31
+ chartValueFormatter,
32
+ formatChartValue
33
+ } from "./chunk-QVWNK4JO.js";
34
34
  import "./chunk-V5IOLAIS.js";
35
35
  import "./chunk-7ZPUN7TV.js";
36
36
  import "./chunk-PT6TCWIW.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  renderChartByType
3
- } from "./chunk-WZUNBSS7.js";
3
+ } from "./chunk-DVUPIVI2.js";
4
+ import {
5
+ ChartContainer
6
+ } from "./chunk-M5T3COS2.js";
4
7
  import {
5
8
  getSizeStyles,
6
9
  getVariantStyles
7
10
  } from "./chunk-XXDXW6TX.js";
8
- import {
9
- ChartContainer
10
- } from "./chunk-M5T3COS2.js";
11
11
  import {
12
12
  muiColor
13
13
  } from "./chunk-7ZPUN7TV.js";
@@ -104,4 +104,4 @@ var Chart = (props) => {
104
104
  export {
105
105
  Chart
106
106
  };
107
- //# sourceMappingURL=chunk-EMNGIYH6.js.map
107
+ //# sourceMappingURL=chunk-7TZ6OC5T.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Avatar
3
- } from "./chunk-SOJQEJAE.js";
3
+ } from "./chunk-THOPGHTY.js";
4
4
  import {
5
5
  Card
6
6
  } from "./chunk-AVI3XHRQ.js";
@@ -74,4 +74,4 @@ export {
74
74
  UserAvatar,
75
75
  UserMenu
76
76
  };
77
- //# sourceMappingURL=chunk-FUT7HGWZ.js.map
77
+ //# sourceMappingURL=chunk-ALAJBLBE.js.map
@@ -114,6 +114,7 @@ function DataCell({
114
114
  );
115
115
  }
116
116
  function RowControls({
117
+ row,
117
118
  index,
118
119
  rowId,
119
120
  isSelected,
@@ -131,12 +132,17 @@ function RowControls({
131
132
  inputProps: { "aria-label": `Select row ${index + 1}` }
132
133
  }
133
134
  ) }),
134
- expansion && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(
135
+ expansion && /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: expansion.isRowExpandable?.(row) === false ? null : /* @__PURE__ */ jsx(
135
136
  IconButton,
136
137
  {
137
138
  size: "small",
138
- onClick: () => model.onToggleExpansion(rowId),
139
- "aria-label": isExpanded ? "Collapse row" : "Expand row",
139
+ onClick: (event) => {
140
+ event.stopPropagation();
141
+ model.onToggleExpansion(rowId);
142
+ },
143
+ "aria-expanded": isExpanded,
144
+ "aria-label": isExpanded ? expansion.collapseLabel ?? "Collapse row" : expansion.expandLabel ?? "Expand row",
145
+ "data-slot": "expand-toggle",
140
146
  children: isExpanded ? /* @__PURE__ */ jsx(ExpandLess, {}) : /* @__PURE__ */ jsx(ExpandMore, {})
141
147
  }
142
148
  ) })
@@ -178,7 +184,7 @@ function GridRow(rowProps) {
178
184
  ]
179
185
  }
180
186
  ),
181
- expansion && isExpanded && /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: totalColumns, children: expansion.render(row, index) }) })
187
+ expansion && isExpanded && expansion.isRowExpandable?.(row) !== false && /* @__PURE__ */ jsx(TableRow, { "data-slot": "row-detail", children: /* @__PURE__ */ jsx(TableCell, { colSpan: totalColumns, children: expansion.render(row, index) }) })
182
188
  ] });
183
189
  }
184
190
 
@@ -187,4 +193,4 @@ export {
187
193
  DataCell,
188
194
  GridRow
189
195
  };
190
- //# sourceMappingURL=chunk-E5LWJDI3.js.map
196
+ //# sourceMappingURL=chunk-AROBXRC5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataGrid/DataGrid.cells.tsx"],"sourcesContent":["/**\n * The DataGrid's cell and row renderers.\n *\n * Components rather than closures over the grid's scope: as inline `render*`\n * functions they could reach every piece of the component's state, which is how\n * the body grew past 700 lines. Each one now states exactly what it needs.\n */\nimport ArrowDownward from '@mui/icons-material/ArrowDownward';\nimport ArrowUpward from '@mui/icons-material/ArrowUpward';\nimport ExpandLess from '@mui/icons-material/ExpandLess';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport UnfoldMore from '@mui/icons-material/UnfoldMore';\nimport Button from '@mui/material/Button/index.js';\nimport Checkbox from '@mui/material/Checkbox/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport TableCell from '@mui/material/TableCell/index.js';\nimport TableRow from '@mui/material/TableRow/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { cellValue } from './DataGrid.rows';\nimport type { DataGridModel } from './DataGrid.model';\nimport type { DataGridProps, GridColumn, GridSort } from './DataGrid.types';\n\n/** The glyph for a column's current sort state — unsorted included. */\nfunction SortIcon({ dir }: { dir: GridSort['dir'] | undefined }): React.JSX.Element {\n if (!dir) return <UnfoldMore fontSize=\"small\" sx={{ opacity: 0.5 }} />;\n return dir === 'asc' ? <ArrowUpward fontSize=\"small\" /> : <ArrowDownward fontSize=\"small\" />;\n}\n\n/** `aria-sort`'s three values, which are not the same words as `SortDirection`. */\nfunction ariaSort(dir: GridSort['dir'] | undefined): 'none' | 'ascending' | 'descending' {\n if (!dir) return 'none';\n return dir === 'asc' ? 'ascending' : 'descending';\n}\n\nexport interface HeaderCellProps<T extends Record<string, unknown>> {\n column: GridColumn<T>;\n sort: GridSort | undefined;\n sortable: boolean;\n stickyHeader: boolean;\n headerHeight: number;\n onSort: (columnId: string) => void;\n}\n\nexport function HeaderCell<T extends Record<string, unknown>>({\n column,\n sort,\n sortable,\n stickyHeader,\n headerHeight,\n onSort,\n}: HeaderCellProps<T>): React.JSX.Element {\n const theme = useTheme();\n const content = column.headerCell ? column.headerCell(column) : column.header;\n return (\n <TableCell\n data-slot=\"header-cell\"\n data-sort={sort?.dir ?? 'none'}\n sx={{\n position: stickyHeader ? 'sticky' : 'static',\n top: 0,\n zIndex: 1,\n backgroundColor: theme.palette.background.paper,\n borderBottom: `1px solid ${theme.palette.divider}`,\n height: headerHeight,\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n width: column.width,\n }}\n role=\"columnheader\"\n aria-sort={ariaSort(sort?.dir)}\n >\n {sortable ? (\n <Button\n onClick={() => onSort(column.id)}\n sx={{\n justifyContent: 'flex-start',\n textTransform: 'none',\n fontWeight: 500,\n color: 'inherit',\n p: 0,\n minWidth: 0,\n '&:hover': { backgroundColor: 'transparent', opacity: 0.8 },\n }}\n endIcon={<SortIcon dir={sort?.dir} />}\n aria-label={column.ariaLabel ?? `Sort by ${String(column.header)}`}\n >\n {content}\n </Button>\n ) : (\n <Typography variant=\"subtitle2\" fontWeight={500}>\n {content}\n </Typography>\n )}\n </TableCell>\n );\n}\n\nexport interface DataCellProps<T extends Record<string, unknown>> {\n row: T;\n rowIndex: number;\n rowId: string | number;\n column: GridColumn<T>;\n rowHeight: number;\n editing: NonNullable<DataGridProps<T>['editing']>;\n model: Pick<DataGridModel<T>, 'editingCell' | 'setEditingCell'>;\n}\n\nexport function DataCell<T extends Record<string, unknown>>({\n row,\n rowIndex,\n rowId,\n column,\n rowHeight,\n editing,\n model,\n}: DataCellProps<T>): React.JSX.Element {\n const value = cellValue(row, column);\n const isEditing =\n model.editingCell?.rowId === rowId && model.editingCell?.colId === column.id;\n const content = column.cell\n ? column.cell({ value, row, rowIndex, col: column })\n : String(value ?? '');\n return (\n <TableCell\n data-slot=\"cell\"\n data-col-id={column.id}\n data-editing={isEditing}\n sx={{\n minWidth: column.minWidth,\n maxWidth: column.maxWidth,\n width: column.width,\n height: rowHeight,\n }}\n role=\"gridcell\"\n tabIndex={-1}\n >\n {isEditing && column.editor\n ? column.editor({\n value,\n row,\n onChange: () => undefined,\n commit: () => {\n editing.onEditCommit?.({ rowId, colId: column.id, value, row });\n model.setEditingCell(null);\n },\n cancel: () => model.setEditingCell(null),\n })\n : content}\n </TableCell>\n );\n}\n\nexport interface GridRowProps<T extends Record<string, unknown>> {\n row: T;\n index: number;\n rowId: string | number;\n isSelected: boolean;\n isExpanded: boolean;\n totalColumns: number;\n model: DataGridModel<T>;\n props: DataGridProps<T>;\n}\n\n/** The leading checkbox / chevron cells, which exist only for enabled features. */\nfunction RowControls<T extends Record<string, unknown>>({\n row,\n index,\n rowId,\n isSelected,\n isExpanded,\n model,\n props,\n}: GridRowProps<T>): React.JSX.Element {\n const { selection = { mode: 'none' }, expansion } = props;\n return (\n <>\n {selection.mode !== 'none' && (\n <TableCell padding=\"checkbox\">\n <Checkbox\n checked={isSelected}\n onChange={(event) => model.onToggleRow(rowId, event.target.checked)}\n inputProps={{ 'aria-label': `Select row ${index + 1}` }}\n />\n </TableCell>\n )}\n {expansion && (\n <TableCell padding=\"checkbox\">\n {expansion.isRowExpandable?.(row) === false ? null : (\n <IconButton\n size=\"small\"\n // Stopped so a host that opens the record on a row click does not\n // ALSO open it here: the chevron is its own control.\n onClick={(event) => {\n event.stopPropagation();\n model.onToggleExpansion(rowId);\n }}\n aria-expanded={isExpanded}\n aria-label={\n isExpanded\n ? (expansion.collapseLabel ?? 'Collapse row')\n : (expansion.expandLabel ?? 'Expand row')\n }\n data-slot=\"expand-toggle\"\n >\n {isExpanded ? <ExpandLess /> : <ExpandMore />}\n </IconButton>\n )}\n </TableCell>\n )}\n </>\n );\n}\n\nexport function GridRow<T extends Record<string, unknown>>(\n rowProps: GridRowProps<T>,\n): React.JSX.Element {\n const { row, index, rowId, isSelected, isExpanded, totalColumns, model, props } = rowProps;\n const theme = useTheme();\n const expansion = props.expansion;\n return (\n <React.Fragment>\n <TableRow\n data-slot=\"row\"\n data-selected={isSelected}\n data-expanded={isExpanded}\n sx={{\n '&:hover': { backgroundColor: theme.palette.action.hover },\n ...(isSelected && { backgroundColor: theme.palette.action.selected }),\n height: model.rowHeight,\n }}\n role=\"row\"\n aria-selected={isSelected}\n >\n <RowControls {...rowProps} />\n {model.visibleColumns.map((column) => (\n <DataCell\n key={column.id}\n row={row}\n rowIndex={index}\n rowId={rowId}\n column={column}\n rowHeight={model.rowHeight}\n editing={props.editing ?? { mode: 'none' }}\n model={model}\n />\n ))}\n </TableRow>\n {expansion && isExpanded && expansion.isRowExpandable?.(row) !== false && (\n <TableRow data-slot=\"row-detail\">\n <TableCell colSpan={totalColumns}>{expansion.render(row, index)}</TableCell>\n </TableRow>\n )}\n </React.Fragment>\n );\n}\n"],"mappings":";;;;;AAOA,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AACzB,OAAO,WAAW;AA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cACV;AAAA,cACA;AAAA,cACA,WAAW,MAAM;AAAA,cACjB,SAAS,MAAM,WAAW,EAAE,MAAM,OAAO;AAAA,cACzC;AAAA;AAAA,YAPK,OAAO;AAAA,UAQd,CACD;AAAA;AAAA;AAAA,IACH;AAAA,IACC,aAAa,cAAc,UAAU,kBAAkB,GAAG,MAAM,SAC/D,oBAAC,YAAS,aAAU,cAClB,8BAAC,aAAU,SAAS,cAAe,oBAAU,OAAO,KAAK,KAAK,GAAE,GAClE;AAAA,KAEJ;AAEJ;","names":[]}
@@ -1,9 +1,9 @@
1
+ import {
2
+ DataViewsGrid
3
+ } from "./chunk-EYC6ERJJ.js";
1
4
  import {
2
5
  DeleteViewDialog
3
6
  } from "./chunk-MNSW33DU.js";
4
- import {
5
- DataViewsGrid
6
- } from "./chunk-KCAGCDCQ.js";
7
7
  import {
8
8
  viewStateKey
9
9
  } from "./chunk-ZOLAYP2D.js";
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
178
178
  export {
179
179
  DataViewsTableBase
180
180
  };
181
- //# sourceMappingURL=chunk-LQRJCEFO.js.map
181
+ //# sourceMappingURL=chunk-DVE53B2L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/DataViewsTableBase.tsx"],"sourcesContent":["\"use client\";\n\nimport type { SortFieldDefinition } from \"../../layout/ContentToolbar\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { DataViewsGrid } from \"./DataViewsGrid\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport { viewStateKey } from \"./data-views-dirty\";\nimport { DeleteViewDialog } from \"./DeleteViewDialog\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { ViewDialogs, ViewMutationErrorAlert } from \"./data-views-table-parts\";\nimport {\n useSavedViewsController,\n type SavedViewsController,\n} from \"./use-saved-views-controller\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewSyncState,\n type DataViewPersistence,\n type DataViewRouter,\n type FilterFieldConfig,\n type RangeFieldConfig,\n type DataViewCardSelection,\n type RowAction,\n type SavedViewSummary,\n} from \"./data-views-types\";\n\nexport interface DataViewsTableBaseProps<T extends Record<string, unknown>> {\n /** The applied-view id read from the URL (`?view=`) on load, or null. */\n initialViewId?: string | null;\n /** Injected saved-view persistence (create/update/delete). */\n persistence: DataViewPersistence;\n /** Injected router side-effects (URL sync + refresh). */\n router: DataViewRouter;\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** The user's + shared views for this table (from the server). */\n views: SavedViewSummary[];\n /** Big page title in the table header, beside the funnel + gear (GTA layout). */\n title?: string;\n /** Primary page actions (e.g. \"Novo produto\") rendered at the header's right. */\n headerActions?: React.ReactNode;\n /** Sort options for the toolbar's \"Sort By\" dropdown (defaults to sortable columns). */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /** Notified with the currently-visible (filtered) rows, so Export matches the view. */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Reusable row actions driving both the row \"⋮\" kebab and the bulk menu. */\n rowActions?: RowAction<T>[];\n /** Leading control in the auto kebab column (e.g. a favourite star). */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /** Low-level bulk-action override; prefer `rowActions`. */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /** A selection-widening control beside the count (e.g. \"select all matching\"). */\n selectionExtra?: SelectionExtraRender<T>;\n /** Bespoke per-row menu (an entity's self-contained 3-dots menu) instead of the auto kebab. */\n renderRowMenu?: (row: T) => React.ReactNode;\n /** Opt-in expandable rows (table layout only) — see {@link DataViewRowDetail}. */\n rowDetail?: DataViewRowDetail<T>;\n /** Opt-in \"Grade\" (cards) layout — a card renderer per row; adds a Grade/Tabela toggle. */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** Opt-in \"Quadro\" (board) layout — the loaded page as columns of one field. Needs `renderCard`. */\n board?: BoardConfig<T>;\n /** Opt-in \"Lista\" layout — one full-width, entity-rendered row per record (FUT-733). */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** The Lista's shared columns, so its rows line up by construction not convention. */\n listGroup?: ListGroupConfig<T>;\n /** The page-level partition rendered as tabs under the toolbar (server mode only). */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /** Opt into the responsive inline filter UX (collapsible row / modal). Default keeps the panel. */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /** Server-mode wiring (FUT-180): backend-driven rows/total + re-fetch. Omit for client mode. */\n server?: DataViewServer;\n /** Seed the initial view state (search/pills/ranges/sort) from the URL when no saved view applies. */\n initialState?: DataViewState;\n}\n\n/**\n * Derive the grid's reactive `syncState` from the URL-seeded `initialState` in\n * server mode so browser back/forward RE-APPLIES the search/pills/sort controls\n * (merging over live state, preserving hidden columns — see {@link DataViewSyncState}).\n * Client-mode tables (no `server`) get `undefined`. Callers memoize `initialState`\n * on the URL, so this reference only changes on genuine navigations.\n */\nfunction useUrlSyncState(\n server: DataViewServer | undefined,\n initialState: DataViewState | undefined,\n): DataViewSyncState | undefined {\n const isServerMode = server !== undefined;\n return useMemo<DataViewSyncState | undefined>(\n () =>\n isServerMode && initialState\n ? {\n search: initialState.search,\n pills: initialState.pills,\n ranges: initialState.ranges,\n sortBy: initialState.sortBy,\n // The scope belongs in the URL-driven slice alongside them: a\n // `?view=recusados`-style deep link and browser back/forward must\n // move the tab strip, and they must do it WITHOUT resetting the\n // user's hidden columns — which is the whole reason this is a\n // merging `syncState` and not a replacing `appliedState`.\n scope: initialState.scope,\n }\n : undefined,\n [isServerMode, initialState],\n );\n}\n\n/**\n * Resolve the initial applied view: a `?view=<id>` shortcut (FUT-90) wins, else\n * the user's default view, else none. Drives the seed state + trigger label.\n */\nfunction resolveInitialView(\n views: SavedViewSummary[],\n requestedId: string | null,\n): SavedViewSummary | undefined {\n const requested = requestedId ? views.find((view) => view.id === requestedId) : undefined;\n return requested ?? views.find((view) => view.isDefault);\n}\n\n/**\n * The Exibir panel's view chrome, assembled from the saved-views controller.\n * Extracted so {@link DataViewsTableBase} stays inside its size budget.\n */\nfunction buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete,\n}: {\n ctl: SavedViewsController;\n views: SavedViewSummary[];\n activeView: SavedViewSummary | undefined;\n dirty: boolean;\n /** Opens the confirmation; the delete itself happens on confirm. */\n onRequestDelete: (view: SavedViewSummary) => void;\n}): DisplayPanelView {\n return {\n activeViewName: ctl.activeViewName,\n dirty,\n onReset: () => (activeView ? ctl.applyView(activeView) : ctl.selectMain()),\n // Only offer \"Atualizar\" when there IS a view to update — otherwise the\n // single footer button is a plain \"Salvar visão\".\n onUpdate: activeView ? () => ctl.openEdit(activeView) : undefined,\n onSaveAs: ctl.openCreate,\n // The views themselves, not a dropdown: the panel renders them in its own\n // body (see `data-views-view-nav`), so there is no second popover to clip\n // the row actions.\n nav: {\n views,\n activeViewId: activeView?.id ?? null,\n onSelectView: (id) => {\n const next = id === null ? null : views.find((view) => view.id === id);\n if (next) ctl.applyView(next);\n else ctl.selectMain();\n },\n onEditView: ctl.openEdit,\n onPatchView: (view, changes) => void ctl.patchView(view, changes),\n onDeleteView: onRequestDelete,\n },\n };\n}\n\n/**\n * \"Are there unsaved changes?\" — the dot on Exibir, and whether Redefinir and\n * Salvar visão are live.\n *\n * Two things it gets right that the inline version did not. It compares\n * NORMALISED states (`viewStateKey`), so a filter applied and then removed is\n * clean again rather than clean-looking but flagged; and it re-baselines after\n * a SAVE, because the state just written is the clean one from that point.\n *\n * The baseline is the first state the grid emits for a view, not the view\n * itself: the grid normalises what it is handed — resolving visible columns,\n * filling in layout — so the applied view is never byte-identical to the state\n * it produces.\n */\nfunction useDirtyTracking(ctl: SavedViewsController): {\n dirty: boolean;\n noteState: (state: DataViewState) => void;\n markSaved: () => void;\n} {\n const [dirty, setDirty] = useState(false);\n const [savedAt, setSavedAt] = useState(0);\n const baseline = useRef<string | null>(null);\n const appliedKey = JSON.stringify(ctl.applied ?? null);\n\n useEffect(() => {\n baseline.current = null;\n setDirty(false);\n }, [appliedKey, savedAt]);\n\n return {\n dirty,\n noteState: (state) => {\n ctl.currentRef.current = state;\n const key = viewStateKey(state);\n if (baseline.current === null) {\n baseline.current = key;\n setDirty(false);\n return;\n }\n const next = key !== baseline.current;\n setDirty((prev) => (prev === next ? prev : next));\n },\n markSaved: () => setSavedAt((tick) => tick + 1),\n };\n}\n\n/**\n * The reusable admin table (FUT-89): the DataViews grid plus the full saved-views\n * experience — a views dropdown, a save/edit modal (with preview), and a manage\n * dialog. Framework-agnostic: saved-view persistence and router side-effects are\n * INJECTED (`persistence`, `router`, `initialViewId`) so the host app wires them\n * to its backend + framework router. A default view auto-applies on load; applying\n * a view restores its filters + columns + sort. Each table supplies its own columns\n * + filter fields; everything else is shared.\n */\nexport function DataViewsTableBase<T extends Record<string, unknown>>(\n props: DataViewsTableBaseProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice (as in\n // DataViewsGrid): this component only ADDS the saved-views chrome, and a\n // 30-name destructure repeated in the JSX is exactly where a newly added prop\n // silently stops being passed on.\n const {\n initialViewId = null,\n persistence,\n router,\n columns,\n fields,\n testIdPrefix = \"table\",\n views,\n server,\n initialState,\n } = props;\n const initialView = resolveInitialView(views, initialViewId);\n const columnIds = columns.map((col) => col.id);\n const ctl = useSavedViewsController(persistence, router, columnIds, views, initialView, initialState);\n // Unsaved-changes flag for the Exibir panel. Set from `onStateChange` rather\n // than derived in render because the live state lives in a REF (the grid owns\n // it); the equality bail-out in `setDirty` is what stops the update loop.\n const { dirty, noteState, markSaved } = useDirtyTracking(ctl);\n // Deleting a saved view is confirmed, not immediate — see `DeleteViewDialog`.\n const [pendingDelete, setPendingDelete] = useState<SavedViewSummary | null>(null);\n // The view the panel's \"Redefinir\" restores: the applied one, or the built-in\n // \"Visão principal\" when none is.\n const activeView = views.find((view) => view.name === ctl.activeViewName);\n const displayView = buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete: setPendingDelete,\n });\n // Server-mode lists re-apply URL-derived controls on back/forward (not just the mount seed).\n const syncState = useUrlSyncState(server, initialState);\n\n return (\n <>\n <ViewMutationErrorAlert error={ctl.mutationError} onClose={ctl.clearMutationError} testIdPrefix={testIdPrefix} />\n <DataViewsGrid<T>\n {...props}\n testIdPrefix={testIdPrefix}\n appliedState={ctl.applied}\n syncState={syncState}\n onStateChange={noteState}\n // The saved-views menu is NOT a toolbar control any more: it lives in\n // the Exibir panel's VISÃO header, passed through `displayView`.\n displayView={displayView}\n />\n {renderViewDialogs(ctl, fields, columns, views, testIdPrefix, markSaved)}\n <DeleteViewDialog\n view={pendingDelete}\n onClose={() => setPendingDelete(null)}\n onConfirm={(view) => {\n void ctl.handleDelete(view);\n setPendingDelete(null);\n }}\n testIdPrefix={testIdPrefix}\n />\n </>\n );\n}\n\n/** The save + manage saved-view dialogs, split out to keep the base thin. */\nfunction renderViewDialogs<T extends Record<string, unknown>>(\n ctl: SavedViewsController,\n fields: DataViewsTableBaseProps<T>[\"fields\"],\n columns: DataViewsTableBaseProps<T>[\"columns\"],\n views: SavedViewSummary[],\n testIdPrefix: string,\n onSaved: () => void,\n): React.JSX.Element {\n return (\n <ViewDialogs<T>\n saveOpen={ctl.saveOpen}\n onCloseSave={ctl.closeSave}\n currentState={ctl.editing ? ctl.editing.state : ctl.currentRef.current}\n fields={fields}\n columns={columns}\n editing={ctl.editing}\n onSave={async (payload) => {\n await ctl.handleSave(payload);\n // The saved state is the clean one from here on.\n onSaved();\n }}\n manageOpen={ctl.manageOpen}\n onCloseManage={() => ctl.setManageOpen(false)}\n views={views}\n onEditFromManage={ctl.editFromManage}\n onDelete={(view) => void ctl.handleDelete(view)}\n testIdPrefix={testIdPrefix}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA,SAAS,WAAW,SAAS,QAAQ,gBAAgB;AAySjD,mBACE,KADF;AAjLJ,SAAS,gBACP,QACA,cAC+B;AAC/B,QAAM,eAAe,WAAW;AAChC,SAAO;AAAA,IACL,MACE,gBAAgB,eACZ;AAAA,MACE,QAAQ,aAAa;AAAA,MACrB,OAAO,aAAa;AAAA,MACpB,QAAQ,aAAa;AAAA,MACrB,QAAQ,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMrB,OAAO,aAAa;AAAA,IACtB,IACA;AAAA,IACN,CAAC,cAAc,YAAY;AAAA,EAC7B;AACF;AAMA,SAAS,mBACP,OACA,aAC8B;AAC9B,QAAM,YAAY,cAAc,MAAM,KAAK,C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C,WAAW,CAAC,SAAS;AACnB,eAAK,IAAI,aAAa,IAAI;AAC1B,2BAAiB,IAAI;AAAA,QACvB;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,SAAS,kBACP,KACA,QACA,SACA,OACA,cACA,SACmB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,IAAI;AAAA,MACd,aAAa,IAAI;AAAA,MACjB,cAAc,IAAI,UAAU,IAAI,QAAQ,QAAQ,IAAI,WAAW;AAAA,MAC/D;AAAA,MACA;AAAA,MACA,SAAS,IAAI;AAAA,MACb,QAAQ,OAAO,YAAY;AACzB,cAAM,IAAI,WAAW,OAAO;AAE5B,gBAAQ;AAAA,MACV;AAAA,MACA,YAAY,IAAI;AAAA,MAChB,eAAe,MAAM,IAAI,cAAc,KAAK;AAAA,MAC5C;AAAA,MACA,kBAAkB,IAAI;AAAA,MACtB,UAAU,CAAC,SAAS,KAAK,IAAI,aAAa,IAAI;AAAA,MAC9C;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,10 +1,10 @@
1
- import {
2
- buildChartContext
3
- } from "./chunk-HKV4MQ2W.js";
4
1
  import {
5
2
  ChartLegendContent,
6
3
  ChartTooltipContent
7
4
  } from "./chunk-M5T3COS2.js";
5
+ import {
6
+ buildChartContext
7
+ } from "./chunk-HKV4MQ2W.js";
8
8
 
9
9
  // src/components/data-display/Chart/chart-renderers.tsx
10
10
  import {
@@ -312,4 +312,4 @@ function renderChartByType(props, theme) {
312
312
  export {
313
313
  renderChartByType
314
314
  };
315
- //# sourceMappingURL=chunk-WZUNBSS7.js.map
315
+ //# sourceMappingURL=chunk-DVUPIVI2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-6R567DH4.js";
3
+ } from "./chunk-TSFFZ3AH.js";
4
4
  import {
5
5
  useDataViewsState
6
6
  } from "./chunk-FOKBP6HR.js";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-KCAGCDCQ.js.map
30
+ //# sourceMappingURL=chunk-EYC6ERJJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/DataViewsGrid.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport { type SortFieldDefinition } from \"../../layout/ContentToolbar\";\n\nimport { GridShell } from \"./data-views-grid-parts\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewCardSelection } from \"./data-views-types\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewSyncState,\n type FilterFieldConfig,\n type RangeFieldConfig,\n type RowAction,\n} from \"./data-views-types\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { useDataViewsState } from \"./use-data-views-state\";\n\ninterface DataViewsGridProps<T extends Record<string, unknown>> {\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n /** Row click opens the row; clicks in the actions column are ignored. */\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** Seed/replace the view state. A NEW reference re-applies (used to apply a saved view). */\n appliedState?: DataViewState;\n /**\n * URL-driven controls (search/pills/ranges/sort) that RE-APPLY on reference\n * change while preserving column visibility — for server-mode lists that keep\n * their filter/sort/page in the address bar (see {@link DataViewSyncState}).\n */\n syncState?: DataViewSyncState;\n /** Notified on every view-state change (so a save-view modal can read it). */\n onStateChange?: (state: DataViewState) => void;\n /**\n * Notified with the currently-visible (search + filter matched) rows whenever\n * they change — so a page-level Export exports what the user sees, not the\n * full dataset.\n */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Saved-views UI injected into the toolbar (FUT-89). */\n toolbarRightSlot?: React.ReactNode;\n /**\n * The saved-view chrome for the Exibir panel: its VISÃO header (with the\n * views dropdown) and its Redefinir / Salvar visão footer. Supplied by\n * `DataViewsTableBase`; without it the panel is tabs only.\n */\n displayView?: DisplayPanelView;\n /** Big page title in the header row (next to the funnel + gear). */\n title?: string;\n /** Primary page actions rendered at the header's right. */\n headerActions?: React.ReactNode;\n /**\n * Sort options for the toolbar's \"Sort By\" dropdown. Defaults to the sortable\n * columns (asc/desc each) when omitted.\n */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /**\n * A single, reusable list of row actions that drives BOTH the per-row \"⋮\"\n * kebab AND the bulk-actions menu (tabwoah model). When provided, the grid\n * appends a kebab actions column automatically (unless the page already\n * defines one) and shows an \"Ações\" bulk menu when rows are selected.\n */\n rowActions?: RowAction<T>[];\n /**\n * Extra leading control rendered in the auto kebab column, before the \"⋮\"\n * (e.g. a favourite star). Only used when `rowActions` is set.\n */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /**\n * Low-level override for the selection bulk control. Prefer `rowActions`.\n * Receives the selected rows + a `clearSelection` callback.\n */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /**\n * A control rendered beside the \"N selected\" count, for changing WHAT is\n * selected rather than what happens to it — a \"select all N matching the\n * filter\" widening, above all.\n *\n * Called only while something is selected, and handed\n * {@link SelectionExtraContext.allOnPageSelected} so the control can follow\n * the convention operators already know: the widening appears once the whole\n * page is ticked, and not before.\n */\n selectionExtra?: SelectionExtraRender<T>;\n /**\n * Render a bespoke per-row menu in the actions column instead of the auto\n * kebab — typically an entity's self-contained 3-dots menu that owns its own\n * popups, so the SAME menu component drives both the table row and the card.\n * `rowActions`/`bulkActions` still drive the multi-row bulk menu.\n */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Opt-in expandable rows (table layout only): a chevron in a leading column\n * opens `render(row)` under the row. See {@link DataViewRowDetail}.\n */\n rowDetail?: DataViewRowDetail<T>;\n /**\n * Opt-in \"Grade\" (cards) layout. When provided, a Grade/Tabela toggle appears in\n * the toolbar and the cards body renders each visible row via this function\n * (reusing the same search/filter/sort). Omit ⇒ table only (unchanged).\n */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * Opt-in \"Quadro\" (board) layout: the loaded page laid out as columns of one\n * grouping field. Reuses `renderCard`, so supplying a board WITHOUT one simply\n * offers no board. Best when the groups are states in a state machine — derive\n * these groups and `scopes` from ONE definition so the two cannot drift.\n */\n board?: BoardConfig<T>;\n /**\n * Opt-in \"Lista\" layout (FUT-733): one FULL-WIDTH row per record, rendered by\n * the entity — a marker, a title, a subtitle and a value on the right. Sits\n * between the table (compare columns) and the cards (browse); omit ⇒ not\n * offered, exactly as `renderCard` gates the cards.\n */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * The Lista's SHARED COLUMNS — declared once for the list, obeyed by every row.\n *\n * This is what makes a list line up by construction rather than by convention.\n * Omit it and each row still resolves its own tracks from its own config,\n * which agrees with its neighbours right up until one row carries an unusually\n * wide value.\n */\n listGroup?: ListGroupConfig<T>;\n /**\n * The page-level partition rendered as an exclusive tab strip above the\n * toolbar, with server-supplied counts. Requires `server`: a scope is applied\n * at the backend, never in the browser.\n */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /**\n * Opt into the responsive inline filter UX (collapsible filter row on wide\n * screens, modal on narrow). Default `false` keeps the classic slide-in panel.\n */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */\n server?: DataViewServer;\n}\n\n/**\n * Surface the visible (filtered) rows so a page-level Export matches the view.\n *\n * Pages pass inline column/field arrays, so `matched` is a fresh reference on\n * every render even when its contents are unchanged. The guard is a signature\n * over the rows' *contents* (not just their ids), so the callback — and the\n * parent `useState` it usually drives — fires only when the visible data\n * actually changes. Ids alone are not enough: a server refresh can change a\n * visible row's values while keeping its id, and the export must reflect them.\n * Content-equal renders keep the same signature, so this never loops.\n */\nfunction useVisibleRowsNotifier<T>(matched: T[], onVisibleRowsChange?: (rows: T[]) => void): void {\n const visibleSignature = JSON.stringify(matched);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === visibleSignature) return;\n lastSignature.current = visibleSignature;\n onVisibleRowsChange?.(matched);\n }, [visibleSignature, matched, onVisibleRowsChange]);\n}\n\n/**\n * The reusable admin DataViews table (FUT-88): the shared ContentToolbar +\n * TableFilter panel over `@12-apps/ui` DataGrid. State + derived data live in\n * {@link useDataViewsState}; the render lives in `GridShell`. This component just\n * connects the two. Reused across every admin list page.\n */\nexport function DataViewsGrid<T extends Record<string, unknown>>(\n props: DataViewsGridProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice: this component\n // only ADDS the controller, and a 25-name destructure repeated in the JSX is\n // where a newly added prop silently stops being passed on.\n const { rangeFields = [], testIdPrefix = \"table\" } = props;\n const controller = useDataViewsState({ ...props, rangeFields, testIdPrefix });\n useVisibleRowsNotifier(controller.matched, props.onVisibleRowsChange);\n return <GridShell {...props} c={controller} rangeFields={rangeFields} testIdPrefix={testIdPrefix} />;\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,WAAW,cAAc;AAsNzB;AAzBT,SAAS,uBAA0B,SAAc,qBAAiD;AAChG,QAAM,mBAAmB,KAAK,UAAU,OAAO;AAC/C,QAAM,gBAAgB,OAAsB,IAAI;AAChD,YAAU,MAAM;AACd,QAAI,cAAc,YAAY,iBAAkB;AAChD,kBAAc,UAAU;AACxB,0BAAsB,OAAO;AAAA,EAC/B,GAAG,CAAC,kBAAkB,SAAS,mBAAmB,CAAC;AACrD;AAQO,SAAS,cACd,OACmB;AAInB,QAAM,EAAE,cAAc,CAAC,GAAG,eAAe,QAAQ,IAAI;AACrD,QAAM,aAAa,kBAAkB,EAAE,GAAG,OAAO,aAAa,aAAa,CAAC;AAC5E,yBAAuB,WAAW,SAAS,MAAM,mBAAmB;AACpE,SAAO,oBAAC,aAAW,GAAG,OAAO,GAAG,YAAY,aAA0B,cAA4B;AACpG;","names":[]}
@@ -1,9 +1,3 @@
1
- import {
2
- pulseAnimation,
3
- rotateAnimation,
4
- scaleInAnimation,
5
- shimmerAnimation
6
- } from "./chunk-XRMZMBE3.js";
7
1
  import {
8
2
  ACTIVE_SCALE,
9
3
  AVATAR_SIZES,
@@ -23,6 +17,12 @@ import {
23
17
  SPINNER,
24
18
  STATUS_DOT
25
19
  } from "./chunk-FAITHWIO.js";
20
+ import {
21
+ pulseAnimation,
22
+ rotateAnimation,
23
+ scaleInAnimation,
24
+ shimmerAnimation
25
+ } from "./chunk-XRMZMBE3.js";
26
26
  import {
27
27
  px
28
28
  } from "./chunk-SONWG2RT.js";
@@ -272,4 +272,4 @@ function AvatarView(props) {
272
272
  export {
273
273
  AvatarView
274
274
  };
275
- //# sourceMappingURL=chunk-35UG2QDB.js.map
275
+ //# sourceMappingURL=chunk-HS2OJI6L.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GridRow,
3
3
  HeaderCell
4
- } from "./chunk-E5LWJDI3.js";
4
+ } from "./chunk-AROBXRC5.js";
5
5
 
6
6
  // src/components/data-display/DataGrid/DataGrid.body.tsx
7
7
  import Checkbox from "@mui/material/Checkbox/index.js";
@@ -102,4 +102,4 @@ export {
102
102
  GridHeader,
103
103
  GridBody
104
104
  };
105
- //# sourceMappingURL=chunk-KZLLTOB2.js.map
105
+ //# sourceMappingURL=chunk-HTZNB6IV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MoreGroup,
3
3
  fieldClearing
4
- } from "./chunk-EZMCWRXO.js";
4
+ } from "./chunk-MHSTG7FF.js";
5
5
  import {
6
6
  useDataViewsCopy
7
7
  } from "./chunk-KHG57NAE.js";
@@ -180,4 +180,4 @@ function MoreFilters({
180
180
  export {
181
181
  MoreFilters
182
182
  };
183
- //# sourceMappingURL=chunk-FJQ5CH4Q.js.map
183
+ //# sourceMappingURL=chunk-J2K65BQQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RangeBounds
3
- } from "./chunk-DFLTUI7W.js";
3
+ } from "./chunk-QZBUGUOY.js";
4
4
  import {
5
5
  isRangeSet
6
6
  } from "./chunk-GCZJH4XL.js";
@@ -188,4 +188,4 @@ export {
188
188
  fieldClearing,
189
189
  MoreGroup
190
190
  };
191
- //# sourceMappingURL=chunk-EZMCWRXO.js.map
191
+ //# sourceMappingURL=chunk-MHSTG7FF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridToolbar
3
- } from "./chunk-SUWIHCD6.js";
3
+ } from "./chunk-PVIAHB7D.js";
4
4
 
5
5
  // src/components/data-display/DataViews/data-views-shell-toolbar.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -64,4 +64,4 @@ function ShellToolbar({
64
64
  export {
65
65
  ShellToolbar
66
66
  };
67
- //# sourceMappingURL=chunk-BBYCZZBH.js.map
67
+ //# sourceMappingURL=chunk-MRMNVGNX.js.map
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-BEWD734I.js";
8
8
  import {
9
9
  MoreFilters
10
- } from "./chunk-FJQ5CH4Q.js";
10
+ } from "./chunk-J2K65BQQ.js";
11
11
  import {
12
12
  RangePill
13
- } from "./chunk-DFLTUI7W.js";
13
+ } from "./chunk-QZBUGUOY.js";
14
14
  import {
15
15
  CollapsedSearch,
16
16
  InlineKeyword
@@ -220,4 +220,4 @@ function FilterSlots({
220
220
  export {
221
221
  InlineFilterControls
222
222
  };
223
- //# sourceMappingURL=chunk-DACURY25.js.map
223
+ //# sourceMappingURL=chunk-NY2Y2SHA.js.map
@@ -0,0 +1,15 @@
1
+ // src/components/data-display/DataViews/data-views-row-detail.ts
2
+ function toGridExpansion(rowDetail, copy) {
3
+ if (!rowDetail) return void 0;
4
+ return {
5
+ render: (row) => rowDetail.render(row),
6
+ isRowExpandable: rowDetail.isExpandable,
7
+ expandLabel: copy.selection.expandRow,
8
+ collapseLabel: copy.selection.collapseRow
9
+ };
10
+ }
11
+
12
+ export {
13
+ toGridExpansion
14
+ };
15
+ //# sourceMappingURL=chunk-O5UGAL2V.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/data-views-row-detail.ts"],"sourcesContent":["import type React from \"react\";\n\nimport type { GridRowExpansion } from \"../DataGrid\";\nimport type { DataViewsCopy } from \"./data-views-copy\";\n\n/**\n * A detail that opens UNDER a table row — a sub-table, say — behind a chevron\n * in its own leading column.\n *\n * TABLE layout only. The cards, the list and the board draw no chevron: each is\n * an entity-rendered surface with its own way of showing more, and a second\n * disclosure beside that one would compete with it.\n */\nexport interface DataViewRowDetail<T> {\n /** The detail for one row. Rendered only while that row is expanded. */\n render: (row: T) => React.ReactNode;\n /**\n * Which rows HAVE a detail. Omitted, every row does. A refused row keeps an\n * empty chevron cell, so the columns stay aligned, but offers nothing to open.\n */\n isExpandable?: (row: T) => boolean;\n}\n\n/**\n * The DataGrid `expansion` a `rowDetail` becomes. The chevron speaks the SAME\n * words the list card's disclosure does, so the two layouts name the one\n * gesture identically in every locale.\n */\nexport function toGridExpansion<T extends Record<string, unknown>>(\n rowDetail: DataViewRowDetail<T> | undefined,\n copy: DataViewsCopy,\n): GridRowExpansion<T> | undefined {\n if (!rowDetail) return undefined;\n return {\n render: (row) => rowDetail.render(row),\n isRowExpandable: rowDetail.isExpandable,\n expandLabel: copy.selection.expandRow,\n collapseLabel: copy.selection.collapseRow,\n };\n}\n"],"mappings":";AA4BO,SAAS,gBACd,WACA,MACiC;AACjC,MAAI,CAAC,UAAW,QAAO;AACvB,SAAO;AAAA,IACL,QAAQ,CAAC,QAAQ,UAAU,OAAO,GAAG;AAAA,IACrC,iBAAiB,UAAU;AAAA,IAC3B,aAAa,KAAK,UAAU;AAAA,IAC5B,eAAe,KAAK,UAAU;AAAA,EAChC;AACF;","names":[]}
@@ -1,9 +1,9 @@
1
- import {
2
- DataViewsDisplayPanel
3
- } from "./chunk-EMAX7RPN.js";
4
1
  import {
5
2
  DataViewsExportMenu
6
3
  } from "./chunk-O42ZA3TW.js";
4
+ import {
5
+ DataViewsDisplayPanel
6
+ } from "./chunk-EMAX7RPN.js";
7
7
  import {
8
8
  renderBulkActions
9
9
  } from "./chunk-XGOWREVV.js";
@@ -133,4 +133,4 @@ function GridToolbar(props) {
133
133
  export {
134
134
  GridToolbar
135
135
  };
136
- //# sourceMappingURL=chunk-SUWIHCD6.js.map
136
+ //# sourceMappingURL=chunk-PVIAHB7D.js.map
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  DataViewsBoard
3
3
  } from "./chunk-VKH7AENA.js";
4
+ import {
5
+ toGridExpansion
6
+ } from "./chunk-O5UGAL2V.js";
4
7
  import {
5
8
  SelectAllStrip
6
9
  } from "./chunk-BYMWW65P.js";
@@ -22,7 +25,7 @@ import {
22
25
  } from "./chunk-KHG57NAE.js";
23
26
  import {
24
27
  DataGrid
25
- } from "./chunk-EZ5Z5UFI.js";
28
+ } from "./chunk-TTW4MAOJ.js";
26
29
  import {
27
30
  default as default2
28
31
  } from "./chunk-6DPAWXZ3.js";
@@ -40,6 +43,7 @@ function GridBody({
40
43
  onChangeSortBy,
41
44
  sortMode,
42
45
  rowPadding,
46
+ rowDetail,
43
47
  dataTestId,
44
48
  emptyState
45
49
  }) {
@@ -69,6 +73,7 @@ function GridBody({
69
73
  headerHeight: 36,
70
74
  selection: { mode: "multi", selectedRowIds: selectedIds, onChangeSelected },
71
75
  sorting: { mode: sortMode, sortBy, onChangeSortBy },
76
+ expansion: toGridExpansion(rowDetail, copy),
72
77
  "data-testid": dataTestId,
73
78
  emptyState,
74
79
  emptyText: copy.grid.emptyFilteredTitle
@@ -255,6 +260,7 @@ function GridMain(props) {
255
260
  onChangeSortBy: (next) => c.patch({ sortBy: next }),
256
261
  sortMode: c.serverMode ? "server" : "client",
257
262
  rowPadding: DENSITY_ROW_PADDING[layoutState.density],
263
+ rowDetail: props.rowDetail,
258
264
  dataTestId,
259
265
  emptyState
260
266
  }
@@ -264,4 +270,4 @@ function GridMain(props) {
264
270
  export {
265
271
  GridMain
266
272
  };
267
- //# sourceMappingURL=chunk-FJGHP2QW.js.map
273
+ //# sourceMappingURL=chunk-QGAYEBMU.js.map