@12-apps/ui 6.78.1 → 6.78.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
  2. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
  3. package/dist/_internal/components/data-display/DataGrid/DataGrid.body.js +2 -2
  4. package/dist/_internal/components/data-display/DataGrid/DataGrid.cells.js +1 -1
  5. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
  6. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +12 -12
  7. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +19 -19
  8. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +5 -5
  9. package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +2 -2
  10. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +2 -2
  11. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +6 -6
  12. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +1 -1
  13. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +9 -9
  14. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +3 -3
  15. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -6
  16. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +2 -2
  17. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
  18. package/dist/_internal/components/data-display/index.js +3 -3
  19. package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +2 -2
  20. package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +5 -3
  21. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +3 -3
  22. package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +2 -2
  23. package/dist/_internal/components/feedback/index.js +4 -4
  24. package/dist/_internal/components/index.js +7 -7
  25. package/dist/{chunk-XGKUXYAD.js → chunk-3Z3WIQ5M.js} +2 -2
  26. package/dist/{chunk-Z7COWR4K.js → chunk-5M2NWXN4.js} +2 -2
  27. package/dist/{chunk-ZFXTRPQO.js → chunk-5RYPVYWP.js} +2 -2
  28. package/dist/{chunk-6J7RGNSF.js → chunk-7HA7UH7O.js} +2 -2
  29. package/dist/{chunk-C7CIUDXZ.js → chunk-7JOLSD2W.js} +2 -2
  30. package/dist/{chunk-QBH36OBQ.js → chunk-BWFUZ4N2.js} +2 -2
  31. package/dist/{chunk-FXZUVZON.js → chunk-DYHOBKPU.js} +2 -2
  32. package/dist/{chunk-XYSE2QZN.js → chunk-EF4DVYD2.js} +2 -2
  33. package/dist/{chunk-C47LBKEG.js → chunk-FCVPVEAS.js} +3 -3
  34. package/dist/{chunk-QCQWOSSD.js → chunk-GHXW6O5T.js} +4 -9
  35. package/dist/chunk-GHXW6O5T.js.map +1 -0
  36. package/dist/{chunk-KYTADPS2.js → chunk-GRMBCJS6.js} +2 -2
  37. package/dist/{chunk-ZTPB7PVI.js → chunk-HPEBSLYP.js} +2 -2
  38. package/dist/{chunk-ICDAYOJ6.js → chunk-K6FW4YDA.js} +9 -2
  39. package/dist/chunk-K6FW4YDA.js.map +1 -0
  40. package/dist/{chunk-K44FSPU7.js → chunk-LBZEPWYK.js} +2 -2
  41. package/dist/{chunk-2VHAD4NE.js → chunk-LI6XSM5D.js} +3 -3
  42. package/dist/{chunk-FAIQCGSL.js → chunk-M3DSPEZ3.js} +2 -2
  43. package/dist/{chunk-LTLOZQPP.js → chunk-MM7BPTVV.js} +11 -3
  44. package/dist/chunk-MM7BPTVV.js.map +1 -0
  45. package/dist/{chunk-GFXS5PJL.js → chunk-NBXG3SQ3.js} +3 -3
  46. package/dist/{chunk-SCAPSX6T.js → chunk-O36MIQIO.js} +2 -2
  47. package/dist/{chunk-QIYX33SH.js → chunk-RHKQ2RSY.js} +4 -4
  48. package/dist/{chunk-F6IMOMA3.js → chunk-ZPACE34U.js} +3 -3
  49. package/dist/data-display/CardKit.js +6 -6
  50. package/dist/data-display/DataGrid.js +3 -3
  51. package/dist/data-display/DataViews.js +19 -19
  52. package/dist/feedback/ConfirmAction.js +4 -4
  53. package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts.map +1 -1
  54. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +6 -0
  55. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
  56. package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts +1 -1
  57. package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts.map +1 -1
  58. package/dist/types/components/feedback/ConfirmAction/ConfirmAction.parts.d.ts +6 -0
  59. package/dist/types/components/feedback/ConfirmAction/ConfirmAction.parts.d.ts.map +1 -1
  60. package/package.json +1 -1
  61. package/src/components/data-display/DataGrid/DataGrid.cells.tsx +13 -0
  62. package/src/components/data-display/DataGrid/DataGrid.types.ts +6 -0
  63. package/src/components/data-display/DataViews/data-views-grid-helpers.tsx +4 -5
  64. package/src/components/feedback/ConfirmAction/ConfirmAction.md +3 -2
  65. package/src/components/feedback/ConfirmAction/ConfirmAction.parts.tsx +17 -3
  66. package/dist/chunk-ICDAYOJ6.js.map +0 -1
  67. package/dist/chunk-LTLOZQPP.js.map +0 -1
  68. package/dist/chunk-QCQWOSSD.js.map +0 -1
  69. /package/dist/{chunk-XGKUXYAD.js.map → chunk-3Z3WIQ5M.js.map} +0 -0
  70. /package/dist/{chunk-Z7COWR4K.js.map → chunk-5M2NWXN4.js.map} +0 -0
  71. /package/dist/{chunk-ZFXTRPQO.js.map → chunk-5RYPVYWP.js.map} +0 -0
  72. /package/dist/{chunk-6J7RGNSF.js.map → chunk-7HA7UH7O.js.map} +0 -0
  73. /package/dist/{chunk-C7CIUDXZ.js.map → chunk-7JOLSD2W.js.map} +0 -0
  74. /package/dist/{chunk-QBH36OBQ.js.map → chunk-BWFUZ4N2.js.map} +0 -0
  75. /package/dist/{chunk-FXZUVZON.js.map → chunk-DYHOBKPU.js.map} +0 -0
  76. /package/dist/{chunk-XYSE2QZN.js.map → chunk-EF4DVYD2.js.map} +0 -0
  77. /package/dist/{chunk-C47LBKEG.js.map → chunk-FCVPVEAS.js.map} +0 -0
  78. /package/dist/{chunk-KYTADPS2.js.map → chunk-GRMBCJS6.js.map} +0 -0
  79. /package/dist/{chunk-ZTPB7PVI.js.map → chunk-HPEBSLYP.js.map} +0 -0
  80. /package/dist/{chunk-K44FSPU7.js.map → chunk-LBZEPWYK.js.map} +0 -0
  81. /package/dist/{chunk-2VHAD4NE.js.map → chunk-LI6XSM5D.js.map} +0 -0
  82. /package/dist/{chunk-FAIQCGSL.js.map → chunk-M3DSPEZ3.js.map} +0 -0
  83. /package/dist/{chunk-GFXS5PJL.js.map → chunk-NBXG3SQ3.js.map} +0 -0
  84. /package/dist/{chunk-SCAPSX6T.js.map → chunk-O36MIQIO.js.map} +0 -0
  85. /package/dist/{chunk-QIYX33SH.js.map → chunk-RHKQ2RSY.js.map} +0 -0
  86. /package/dist/{chunk-F6IMOMA3.js.map → chunk-ZPACE34U.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KHG57NAE.js";
4
4
  import {
5
5
  createConfirmButton
6
- } from "./chunk-Z7COWR4K.js";
6
+ } from "./chunk-5M2NWXN4.js";
7
7
  import {
8
8
  Dialog,
9
9
  DialogContent
@@ -128,4 +128,4 @@ function ManageViewsDialog({
128
128
  export {
129
129
  ManageViewsDialog
130
130
  };
131
- //# sourceMappingURL=chunk-C7CIUDXZ.js.map
131
+ //# sourceMappingURL=chunk-7JOLSD2W.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConfirmActionDialog
3
- } from "./chunk-LTLOZQPP.js";
3
+ } from "./chunk-MM7BPTVV.js";
4
4
  import {
5
5
  useConfirmAction
6
6
  } from "./chunk-EMYESBIT.js";
@@ -23,4 +23,4 @@ ConfirmAction.displayName = "ConfirmAction";
23
23
  export {
24
24
  ConfirmAction
25
25
  };
26
- //# sourceMappingURL=chunk-QBH36OBQ.js.map
26
+ //# sourceMappingURL=chunk-BWFUZ4N2.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  GridBody,
11
11
  GridHeader
12
- } from "./chunk-ZFXTRPQO.js";
12
+ } from "./chunk-5RYPVYWP.js";
13
13
 
14
14
  // src/components/data-display/DataGrid/DataGrid.tsx
15
15
  import Paper from "@mui/material/Paper/index.js";
@@ -120,4 +120,4 @@ export {
120
120
  DataGrid,
121
121
  GRID_ONLY_PROPS
122
122
  };
123
- //# sourceMappingURL=chunk-FXZUVZON.js.map
123
+ //# sourceMappingURL=chunk-DYHOBKPU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cardGridTracks
3
- } from "./chunk-QCQWOSSD.js";
3
+ } from "./chunk-GHXW6O5T.js";
4
4
  import {
5
5
  default as default2
6
6
  } from "./chunk-6DPAWXZ3.js";
@@ -48,4 +48,4 @@ function CardBody({
48
48
  export {
49
49
  CardBody
50
50
  };
51
- //# sourceMappingURL=chunk-XYSE2QZN.js.map
51
+ //# sourceMappingURL=chunk-EF4DVYD2.js.map
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-4HUSG5MR.js";
4
4
  import {
5
5
  DataViewsGrid
6
- } from "./chunk-2VHAD4NE.js";
6
+ } from "./chunk-LI6XSM5D.js";
7
7
  import {
8
8
  viewStateKey
9
9
  } from "./chunk-ZOLAYP2D.js";
10
10
  import {
11
11
  ViewDialogs,
12
12
  ViewMutationErrorAlert
13
- } from "./chunk-6J7RGNSF.js";
13
+ } from "./chunk-7HA7UH7O.js";
14
14
  import {
15
15
  useUrlEchoGuard,
16
16
  useUrlSyncState
@@ -166,4 +166,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
166
166
  export {
167
167
  DataViewsTableBase
168
168
  };
169
- //# sourceMappingURL=chunk-C47LBKEG.js.map
169
+ //# sourceMappingURL=chunk-FCVPVEAS.js.map
@@ -27,16 +27,11 @@ function buildGridColumns(columns, visibleColumns, onRowClick) {
27
27
  return {
28
28
  ...col,
29
29
  hidden,
30
+ // On the cell, not a wrapper inside it: its padding opens the row too.
31
+ onCellClick: onRowClick,
30
32
  cell: (ctx) => {
31
33
  const content = col.cell ? col.cell(ctx) : ctx.value == null ? "" : String(ctx.value);
32
- return /* @__PURE__ */ jsx(
33
- default2,
34
- {
35
- onClick: () => onRowClick(ctx.row),
36
- sx: { cursor: "pointer", width: "100%", height: "100%", display: "flex", alignItems: "center" },
37
- children: content
38
- }
39
- );
34
+ return /* @__PURE__ */ jsx(default2, { sx: { width: "100%", height: "100%", display: "flex", alignItems: "center" }, children: content });
40
35
  }
41
36
  };
42
37
  });
@@ -166,4 +161,4 @@ export {
166
161
  togglePillValues,
167
162
  cardGridTracks
168
163
  };
169
- //# sourceMappingURL=chunk-QCQWOSSD.js.map
164
+ //# sourceMappingURL=chunk-GHXW6O5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/data-views-grid-helpers.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Theme } from \"@mui/material/styles/index.js\";\n\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\nimport { type GridColumn } from \"../DataGrid\";\nimport { type SortFieldDefinition } from \"../../layout/ContentToolbar\";\nimport { Box } from \"../../../mui/Box\";\nimport { rem, sxRem } from \"../../../tokens/relative\";\nimport { Button } from \"../../form/Button\";\nimport { DropdownMenu, type DropdownMenuItem } from \"../../navigation/DropdownMenu\";\n\nimport type {\n DataViewColumn,\n DataViewState,\n FilterFieldConfig,\n RangeFieldConfig,\n RowAction,\n} from \"./data-views-types\";\n\n/** Is this the non-clickable actions column? */\nexport function isActionsColumn<T extends Record<string, unknown>>(col: GridColumn<T>): boolean {\n return col.type === \"actions\" || col.id === \"actions\";\n}\n\n/**\n * Map the DataView columns to grid columns, applying visibility and — when a row\n * click handler is present — making each non-actions cell, padding included, open the row.\n */\nexport function buildGridColumns<T extends Record<string, unknown>>(\n columns: DataViewColumn<T>[],\n visibleColumns: string[],\n onRowClick: ((row: T) => void) | undefined,\n): GridColumn<T>[] {\n return columns.map((col) => {\n const hidden = col.hideable !== false && !visibleColumns.includes(col.id);\n if (!onRowClick || isActionsColumn(col)) return { ...col, hidden };\n return {\n ...col,\n hidden,\n // On the cell, not a wrapper inside it: its padding opens the row too.\n onCellClick: onRowClick,\n cell: (ctx) => {\n const content = col.cell ? col.cell(ctx) : ctx.value == null ? \"\" : String(ctx.value);\n return (\n <Box sx={{ width: \"100%\", height: \"100%\", display: \"flex\", alignItems: \"center\" }}>\n {content}\n </Box>\n );\n },\n };\n });\n}\n\ninterface ActionsColumnConfig<T extends Record<string, unknown>> {\n /** Whose type scale the column's width is drawn at. */\n theme: Theme;\n /** Actions that build the auto \"⋮\" kebab. Ignored when `renderRowMenu` is set. */\n rowActions: RowAction<T>[];\n /** Optional leading slot (e.g. a favourite star) rendered before the kebab. */\n leading?: (row: T) => React.ReactNode;\n testIdPrefix: string;\n getRowId: (row: T) => string | number;\n /**\n * Escape hatch: render a bespoke per-row menu (e.g. an entity's self-contained\n * 3-dots menu that owns its own popups) INSTEAD of the auto kebab built from\n * `rowActions`. This is how the table row and the card share ONE menu component.\n * `rowActions`/`bulkActions` still drive the multi-row bulk menu, which a\n * single-row menu intentionally does not replace.\n */\n renderRowMenu?: (row: T) => React.ReactNode;\n}\n\n/**\n * The auto \"⋮\" kebab actions column built from the reusable `rowActions` — the\n * SAME definitions that feed the bulk menu, so the two never drift. Each item\n * acts on just this row; `rowLabel` provides a per-row label when set. An\n * optional `leading` slot (e.g. a favourite star) renders before the kebab.\n * When `renderRowMenu` is supplied, the cell renders that bespoke menu instead.\n */\nexport function buildRowActionsColumn<T extends Record<string, unknown>>(\n config: ActionsColumnConfig<T>,\n): DataViewColumn<T> {\n const { theme, rowActions, leading, testIdPrefix, getRowId, renderRowMenu } = config;\n const kebabActions = rowActions.filter((action) => action.row !== false);\n return {\n id: \"actions\",\n header: \"\",\n type: \"actions\",\n enableSort: false,\n hideable: false,\n // Narrow: the column only holds the \"⋮\" kebab (plus an optional leading icon),\n // so it needs room for just one or two icons — 72 or 44 design px.\n width: rem(theme, leading ? 72 : 44),\n cell: ({ row }) => (\n <Box component=\"span\" sx={{ display: \"inline-flex\", alignItems: \"center\", gap: sxRem(2), justifyContent: \"flex-end\" }}>\n {leading?.(row)}\n {renderRowMenu\n ? renderRowMenu(row)\n : renderAutoKebab(kebabActions, row, testIdPrefix, getRowId)}\n </Box>\n ),\n };\n}\n\n/** The built-in kebab menu for one row, derived from `rowActions`. */\nfunction renderAutoKebab<T extends Record<string, unknown>>(\n kebabActions: RowAction<T>[],\n row: T,\n testIdPrefix: string,\n getRowId: (row: T) => string | number,\n): React.ReactNode {\n const copy = useDataViewsCopy();\n const items: DropdownMenuItem[] = kebabActions\n .filter((action) => action.isVisible?.(row) ?? true)\n .map((action) => ({\n id: action.id,\n label: action.rowLabel ? action.rowLabel(row) : action.label,\n color: action.color,\n onClick: () => void action.onSelect([row]),\n }));\n if (items.length === 0) return null;\n return (\n <DropdownMenu\n size=\"sm\"\n items={items}\n trigger={\n <Button variant=\"text\" size=\"sm\" dataTestId={`${testIdPrefix}-actions-${getRowId(row)}`} aria-label={copy.grid.rowActions}>\n ⋮\n </Button>\n }\n />\n );\n}\n\n/** Sort options derived from the sortable columns when a page supplies none. */\nexport function defaultSortFields<T extends Record<string, unknown>>(\n columns: DataViewColumn<T>[],\n): SortFieldDefinition[] {\n return columns\n .filter(\n (col) =>\n col.enableSort !== false &&\n col.type !== \"actions\" &&\n col.id !== \"actions\" &&\n typeof col.header === \"string\" &&\n col.header !== \"\",\n )\n .map((col) => ({\n value: col.id,\n label: col.header as string,\n orderOptions: [\n { value: \"asc\", label: \"Crescente\" },\n { value: \"desc\", label: \"Decrescente\" },\n ],\n }));\n}\n\n/** Count active filters (search + selected pills + bounded ranges) for the badge. */\nexport function computeActiveFilterCount<T extends Record<string, unknown>>(\n state: DataViewState,\n fields: FilterFieldConfig<T>[],\n rangeFields: RangeFieldConfig<T>[],\n): number {\n const ranges = state.ranges ?? {};\n const pillCount = fields.reduce((n, field) => n + ((state.pills[field.id]?.length ?? 0) > 0 ? 1 : 0), 0);\n const rangeCount = rangeFields.reduce((n, field) => {\n const range = ranges[field.id];\n return n + (range && (range.min != null || range.max != null) ? 1 : 0);\n }, 0);\n return (state.search.trim() ? 1 : 0) + pillCount + rangeCount;\n}\n\nfunction bulkMenuItems<T extends Record<string, unknown>>(\n rowActions: RowAction<T>[],\n selectedRows: T[],\n clearSelection: () => void,\n): DropdownMenuItem[] {\n return rowActions\n .filter((action) => action.bulk !== false)\n .map((action) => {\n // State-machine guards: the action runs only on the rows it applies to,\n // and disappears from the menu when none of the selection qualifies.\n const targets = action.isVisible ? selectedRows.filter(action.isVisible) : selectedRows;\n return { action, targets };\n })\n .filter(({ targets }) => targets.length > 0)\n .map(({ action, targets }) => ({\n id: action.id,\n label: action.label,\n color: action.color,\n onClick: () => {\n // Run the (possibly async) handler on the captured selection, then clear\n // it — but only once the work settles. On failure keep the selection so\n // the user can see which rows still need action and retry.\n const result = action.onSelect(targets);\n if (result instanceof Promise) {\n void result.then(\n () => clearSelection(),\n () => {\n /* keep the selection on failure so the user can retry */\n },\n );\n } else {\n clearSelection();\n }\n },\n }));\n}\n\ninterface RenderBulkArgs<T extends Record<string, unknown>> {\n rowActions: RowAction<T>[] | undefined;\n bulkActions: ((selectedRows: T[], clearSelection: () => void) => React.ReactNode) | undefined;\n selectedRows: T[];\n clearSelection: () => void;\n testIdPrefix: string;\n}\n\n/**\n * The selection bulk control shown in the toolbar. Prefers the reusable\n * `rowActions` (an \"Ações\" dropdown mirroring the row kebab); falls back to the\n * low-level `bulkActions` render prop. Renders nothing with no selection.\n */\nexport function renderBulkActions<T extends Record<string, unknown>>({\n rowActions,\n bulkActions,\n selectedRows,\n clearSelection,\n testIdPrefix,\n}: RenderBulkArgs<T>): React.ReactNode {\n const copy = useDataViewsCopy();\n if (selectedRows.length === 0) return undefined;\n if (rowActions) {\n const items = bulkMenuItems(rowActions, selectedRows, clearSelection);\n if (items.length === 0) return undefined;\n return (\n <DropdownMenu\n size=\"sm\"\n items={items}\n trigger={\n <Button variant=\"outline\" size=\"sm\" dataTestId={`${testIdPrefix}-bulk-actions`}>\n {copy.grid.bulkActions(selectedRows.length)}\n </Button>\n }\n />\n );\n }\n return bulkActions ? bulkActions(selectedRows, clearSelection) : undefined;\n}\n\n/** Toggle a single value in a pill's selected-list (returns the next list). */\nexport function togglePillValues(current: string[] | undefined, value: string, checked: boolean): string[] {\n const list = current ?? [];\n return checked ? [...list, value] : list.filter((v) => v !== value);\n}\n\n/**\n * The card grid's `grid-template-columns`, as an sx fragment.\n *\n * One rule at every width: each card asks for `targetWidth` and `auto-fill`\n * decides how many fit. Density moves the target, so it changes the count at\n * every size — which the previous column-count cap could not do, because its\n * track floor bottomed out at a constant shared by all three densities.\n *\n * Below `sm` this is a single column, and no target changes that. That is why\n * the density control hides itself there rather than offering three settings\n * that all draw the same thing.\n */\nexport function cardGridTracks(targetWidth: number) {\n return {\n gridTemplateColumns: (theme: Theme) => ({\n xs: \"1fr\",\n sm: `repeat(auto-fill, minmax(${rem(theme, targetWidth)}, 1fr))`,\n }),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6CU,cAkDJ,YAlDI;AAxBH,SAAS,gBAAmD,KAA6B;AAC9F,SAAO,IAAI,SAAS,aAAa,IAAI,OAAO;AAC9C;AAMO,SAAS,iBACd,SACA,gBACA,YACiB;AACjB,SAAO,QAAQ,IAAI,CAAC,QAAQ;AAC1B,UAAM,SAAS,IAAI,aAAa,SAAS,CAAC,eAAe,SAAS,IAAI,EAAE;AACxE,QAAI,CAAC,cAAc,gBAAgB,GAAG,EAAG,QAAO,EAAE,GAAG,KAAK,OAAO;AACjE,WAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA;AAAA,MAEA,aAAa;AAAA,MACb,MAAM,CAAC,Q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,EACF;AACF;","names":["default"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConfirmActionDialog
3
- } from "./chunk-LTLOZQPP.js";
3
+ } from "./chunk-MM7BPTVV.js";
4
4
  import {
5
5
  useConfirmAction
6
6
  } from "./chunk-EMYESBIT.js";
@@ -43,4 +43,4 @@ function useRowConfirm({
43
43
  export {
44
44
  useRowConfirm
45
45
  };
46
- //# sourceMappingURL=chunk-KYTADPS2.js.map
46
+ //# sourceMappingURL=chunk-GRMBCJS6.js.map
@@ -2,7 +2,7 @@ import {
2
2
  buildGridColumns,
3
3
  buildRowActionsColumn,
4
4
  isActionsColumn
5
- } from "./chunk-QCQWOSSD.js";
5
+ } from "./chunk-GHXW6O5T.js";
6
6
 
7
7
  // src/components/data-display/DataViews/data-views-columns.ts
8
8
  import { useTheme } from "@mui/material/styles/index.js";
@@ -62,4 +62,4 @@ export {
62
62
  useColumnsWithActions,
63
63
  useRenderedColumns
64
64
  };
65
- //# sourceMappingURL=chunk-ZTPB7PVI.js.map
65
+ //# sourceMappingURL=chunk-HPEBSLYP.js.map
@@ -87,6 +87,11 @@ function HeaderCell({
87
87
  }
88
88
  );
89
89
  }
90
+ function cellClick(column, row, isEditing) {
91
+ const onCellClick = column.onCellClick;
92
+ if (!onCellClick || isEditing) return void 0;
93
+ return () => onCellClick(row);
94
+ }
90
95
  function DataCell({
91
96
  row,
92
97
  rowIndex,
@@ -106,9 +111,11 @@ function DataCell({
106
111
  "data-slot": "cell",
107
112
  "data-col-id": column.id,
108
113
  "data-editing": isEditing,
114
+ onClick: cellClick(column, row, isEditing),
109
115
  sx: {
110
116
  ...columnBox(theme, column),
111
- height: rowHeight
117
+ height: rowHeight,
118
+ ...column.onCellClick && { cursor: "pointer" }
112
119
  },
113
120
  role: "gridcell",
114
121
  tabIndex: -1,
@@ -205,4 +212,4 @@ export {
205
212
  DataCell,
206
213
  GridRow
207
214
  };
208
- //# sourceMappingURL=chunk-ICDAYOJ6.js.map
215
+ //# sourceMappingURL=chunk-K6FW4YDA.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, type Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { rem } from '../../../tokens/relative';\n\nimport { cellValue } from './DataGrid.rows';\nimport type { DataGridModel } from './DataGrid.model';\nimport type { DataGridProps, GridColumn, GridSort } from './DataGrid.types';\nimport type { DataGridCopy } from '../../../copy';\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\n/**\n * One of a column's `width`/`minWidth`/`maxWidth` as CSS. A number is design\n * px through the type scale — except 1 or less, which `sx` has always read as a\n * fraction of the table and still does; a string (`'312px'`, `'20%'`) is used as\n * given.\n */\nfunction columnLength(theme: Theme, value: number | string | undefined): string | undefined {\n if (typeof value !== 'number') return value;\n return value <= 1 && value !== 0 ? `${value * 100}%` : rem(theme, value);\n}\n\n/** A column's size constraints, as the `sx` of its header and its cells. */\nfunction columnBox<T extends Record<string, unknown>>(\n theme: Theme,\n column: GridColumn<T>,\n): { minWidth?: string; maxWidth?: string; width?: string } {\n return {\n minWidth: columnLength(theme, column.minWidth),\n maxWidth: columnLength(theme, column.maxWidth),\n width: columnLength(theme, column.width),\n };\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 /** The header row's height, as CSS. */\n headerHeight: string;\n onSort: (columnId: string) => void;\n copy: DataGridCopy;\n}\n\nexport function HeaderCell<T extends Record<string, unknown>>({\n column,\n sort,\n sortable,\n stickyHeader,\n headerHeight,\n onSort,\n copy,\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 ...columnBox(theme, column),\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 ?? copy.sortBy(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 /** The row's height, as CSS — `DataGridModel.rowHeight`. */\n rowHeight: string;\n editing: NonNullable<DataGridProps<T>['editing']>;\n model: Pick<DataGridModel<T>, 'editingCell' | 'setEditingCell'>;\n}\n\n/** The cell's own click, padding included — never while the cell is being edited (FUT-3849). */\nfunction cellClick<T extends Record<string, unknown>>(\n column: GridColumn<T>,\n row: T,\n isEditing: boolean,\n): (() => void) | undefined {\n const onCellClick = column.onCellClick;\n if (!onCellClick || isEditing) return undefined;\n return () => onCellClick(row);\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 theme = useTheme();\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 onClick={cellClick(column, row, isEditing)}\n sx={{\n ...columnBox(theme, column),\n height: rowHeight,\n ...(column.onCellClick && { cursor: \"pointer\" }),\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': props.copy.selectRow(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 ?? props.copy.collapseRow)\n : (expansion.expandLabel ?? props.copy.expandRow)\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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[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConfirmActionDialog
3
- } from "./chunk-LTLOZQPP.js";
3
+ } from "./chunk-MM7BPTVV.js";
4
4
  import {
5
5
  useConfirmAction
6
6
  } from "./chunk-EMYESBIT.js";
@@ -40,4 +40,4 @@ function withConfirmation(Wrapped, defaults) {
40
40
  export {
41
41
  withConfirmation
42
42
  };
43
- //# sourceMappingURL=chunk-K44FSPU7.js.map
43
+ //# sourceMappingURL=chunk-LBZEPWYK.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-QIYX33SH.js";
3
+ } from "./chunk-RHKQ2RSY.js";
4
4
  import {
5
5
  useDataViewsState
6
- } from "./chunk-F6IMOMA3.js";
6
+ } from "./chunk-ZPACE34U.js";
7
7
 
8
8
  // src/components/data-display/DataViews/DataViewsGrid.tsx
9
9
  import { useEffect, useRef } from "react";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-2VHAD4NE.js.map
30
+ //# sourceMappingURL=chunk-LI6XSM5D.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-4IE66GY2.js";
10
10
  import {
11
11
  renderBulkActions
12
- } from "./chunk-QCQWOSSD.js";
12
+ } from "./chunk-GHXW6O5T.js";
13
13
  import {
14
14
  useDataViewsCopy
15
15
  } from "./chunk-KHG57NAE.js";
@@ -143,4 +143,4 @@ function GridToolbar(props) {
143
143
  export {
144
144
  GridToolbar
145
145
  };
146
- //# sourceMappingURL=chunk-FAIQCGSL.js.map
146
+ //# sourceMappingURL=chunk-M3DSPEZ3.js.map
@@ -23,6 +23,9 @@ function resolveInitialFocus(tone, initialFocus) {
23
23
  if (initialFocus) return initialFocus;
24
24
  return tone === "destructive" ? "cancel" : "confirm";
25
25
  }
26
+ function typedMatches(typed, expected) {
27
+ return typed.trim().toLocaleLowerCase("pt-BR") === expected.trim().toLocaleLowerCase("pt-BR");
28
+ }
26
29
  function TypeToConfirmField({
27
30
  expected,
28
31
  label,
@@ -43,7 +46,11 @@ function TypeToConfirmField({
43
46
  onChange: (event) => onChange(event.target.value),
44
47
  inputProps: {
45
48
  "aria-label": label ?? copy.typeToConfirm(expected),
46
- "data-testid": `${dataTestId}-type-to-confirm`
49
+ "data-testid": `${dataTestId}-type-to-confirm`,
50
+ // A word to copy, not prose: the phone keeps its hands off it.
51
+ autoCapitalize: "none",
52
+ autoCorrect: "off",
53
+ spellCheck: false
47
54
  }
48
55
  }
49
56
  )
@@ -67,7 +74,7 @@ function ConfirmActionDialog({
67
74
  React.useEffect(() => {
68
75
  if (state.open) setTyped("");
69
76
  }, [state.open]);
70
- const gateUnmet = typeToConfirm !== void 0 && typed.trim() !== typeToConfirm;
77
+ const gateUnmet = typeToConfirm !== void 0 && !typedMatches(typed, typeToConfirm);
71
78
  return /* @__PURE__ */ jsxs(
72
79
  AlertDialog,
73
80
  {
@@ -104,6 +111,7 @@ function ConfirmActionDialog({
104
111
  }
105
112
 
106
113
  export {
114
+ typedMatches,
107
115
  ConfirmActionDialog
108
116
  };
109
- //# sourceMappingURL=chunk-LTLOZQPP.js.map
117
+ //# sourceMappingURL=chunk-MM7BPTVV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/feedback/ConfirmAction/ConfirmAction.parts.tsx"],"sourcesContent":["import type { ConfirmActionCopy } from \"../../../copy\";\nimport Alert from '@mui/material/Alert/index.js';\nimport Stack from '@mui/material/Stack/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React, { type ReactNode } from 'react';\n\nimport { AlertDialog } from '../../data-display/AlertDialog';\nimport { OutlinedTextFieldSlim } from '../../form/Input/outlined/text-field-slim-outlined';\n\nimport type {\n ConfirmInitialFocus,\n ConfirmOptions,\n ConfirmTone,\n UseConfirmActionResult,\n} from './ConfirmAction.types';\n\nconst DEFAULT_TEST_ID = 'confirm-action';\n\n/**\n * The popup's body: the row being acted on, then what happens to it.\n *\n * The NAME is rendered in its own right rather than woven into the sentence, so\n * it is there whatever the caller wrote — \"the popup names the specific entity\"\n * is the one thing that must not depend on each call site remembering to\n * mention it. A body with neither a name nor a description would leave the\n * operator with only the title to decide on, so a neutral fallback covers that.\n */\nfunction confirmBody(\n description: ReactNode,\n copy: ConfirmActionCopy,\n entityName?: string,\n): ReactNode {\n if (!entityName) return description ?? copy.irreversible;\n return (\n <>\n <Typography component=\"span\" sx={{ fontWeight: 600, display: \"block\" }}>\n {entityName}\n </Typography>\n {description}\n </>\n );\n}\n\n/** Destructive dialogs open on Cancel; anything else opens on the confirm. */\nfunction resolveInitialFocus(\n tone: ConfirmTone,\n initialFocus?: ConfirmInitialFocus,\n): ConfirmInitialFocus {\n if (initialFocus) return initialFocus;\n return tone === 'destructive' ? 'cancel' : 'confirm';\n}\n\n/**\n * Whether what was typed is the word asked for — trimmed, and in any case.\n * The gate is a pause, not a spelling test: a phone's automatic capital C\n * (\"Confirmar\") or a held Caps Lock must not lock the act (FUT-3905).\n */\nexport function typedMatches(typed: string, expected: string): boolean {\n return typed.trim().toLocaleLowerCase('pt-BR') === expected.trim().toLocaleLowerCase('pt-BR');\n}\n\n/**\n * The type-to-confirm field. Rendered only when `typeToConfirm` is set, which\n * should be rare: it is the guard for actions with NO recovery path, where a\n * click is too cheap a gesture. Comparison ignores case and surrounding\n * whitespace ({@link typedMatches}): a phone capitalises the first letter, and\n * \"Confirmar\" must unlock what \"confirmar\" does (FUT-3905).\n */\nfunction TypeToConfirmField({\n expected,\n label,\n value,\n onChange,\n disabled,\n dataTestId,\n copy,\n}: {\n expected: string;\n label?: string;\n /** The words this prompt renders. REQUIRED — no default copy. */\n copy: ConfirmActionCopy;\n value: string;\n onChange: (next: string) => void;\n disabled: boolean;\n dataTestId: string;\n}): React.ReactElement {\n return (\n <Stack spacing={1} sx={{ mt: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label ?? copy.typeToConfirm(expected)}\n </Typography>\n {/*\n * The outlined slim field, not MUI's `TextField` (FUT-3429): same\n * composition and DOM, but no `Select` branch, so a screen that can open\n * this popup no longer ships `Select`, `Menu`, `MenuList`, `NativeSelect`\n * and `List` for a box that only ever takes a word.\n */}\n <OutlinedTextFieldSlim\n size=\"small\"\n value={value}\n disabled={disabled}\n onChange={(event) => onChange(event.target.value)}\n // On the INPUT rather than the wrapper: a test id on MUI's TextField\n // lands on the outer div, which is not the node a test can type into.\n inputProps={{\n 'aria-label': label ?? copy.typeToConfirm(expected),\n 'data-testid': `${dataTestId}-type-to-confirm`,\n // A word to copy, not prose: the phone keeps its hands off it.\n autoCapitalize: 'none',\n autoCorrect: 'off',\n spellCheck: false,\n }}\n />\n </Stack>\n );\n}\n\nexport interface ConfirmActionDialogProps extends ConfirmOptions {\n /** The fallback body when no entity is named. REQUIRED — no default copy. */\n copy: ConfirmActionCopy;\n state: UseConfirmActionResult;\n}\n\n/**\n * The popup itself: an `AlertDialog` in its destructive skin, plus the two\n * things a bare AlertDialog has no opinion about — the failure the last attempt\n * produced (shown IN the dialog, which stays open, rather than closing over a\n * write that never landed) and the optional type-to-confirm gate.\n */\nexport function ConfirmActionDialog({\n state,\n title,\n description,\n entityName,\n confirmText,\n cancelText,\n typeToConfirm,\n typeToConfirmLabel,\n tone = 'destructive',\n initialFocus,\n dataTestId = DEFAULT_TEST_ID,\n copy,\n}: ConfirmActionDialogProps): React.ReactElement {\n const [typed, setTyped] = React.useState('');\n\n // Every fresh open starts from an empty field: carrying the previous answer\n // over would hand the next delete a pre-satisfied gate.\n React.useEffect(() => {\n if (state.open) setTyped('');\n }, [state.open]);\n\n const gateUnmet = typeToConfirm !== undefined && !typedMatches(typed, typeToConfirm);\n\n return (\n <AlertDialog\n open={state.open}\n variant={tone === 'destructive' ? 'destructive' : 'default'}\n title={title}\n description={confirmBody(description, copy, entityName)}\n confirmText={confirmText}\n // `copy.cancel` is the fallback, NOT `AlertDialog`'s own. The 6.3.0 copy\n // sweep deleted this component's `cancelText = 'Cancelar'` default and\n // put the word in `ConfirmActionCopy` — where nothing then read it, so\n // every confirmation that names no `cancelText` of its own fell through\n // to `AlertDialog`'s English `'Cancel'`, in a pt-BR dialog. That is the\n // precise failure the sweep exists to prevent, one layer down: a port\n // that is required, supplied, and ignored.\n cancelText={cancelText ?? copy.cancel}\n loading={state.pending}\n confirmDisabled={gateUnmet}\n initialFocus={resolveInitialFocus(tone, initialFocus)}\n onConfirm={state.confirm}\n onCancel={state.cancel}\n onClose={state.cancel}\n data-testid={dataTestId}\n >\n {state.error && (\n <Alert severity=\"error\" sx={{ mt: 1 }} data-testid={`${dataTestId}-error`}>\n {state.error}\n </Alert>\n )}\n {typeToConfirm !== undefined && (\n <TypeToConfirmField\n expected={typeToConfirm}\n label={typeToConfirmLabel}\n value={typed}\n onChange={setTyped}\n disabled={state.pending}\n dataTestId={dataTestId}\n copy={copy}\n />\n )}\n </AlertDialog>\n );\n}\n"],"mappings":";;;;;;;;AACA,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,WAA+B;AA8BlC,mBACE,KADF;AAlBJ,IAAM,kBAAkB;AAWxB,SAAS,YACP,aACA,MACA,YACW;AACX,MAAI,CAAC,WAAY,QAAO,eAAe,KAAK;AAC5C,SACE,iCACE;AAAA,wBAAC,cAAW,WAAU,QAAO,IAAI,EAAE,YAAY,KAAK,SAAS,QAAQ,GAClE,sBACH;AAAA,IACC;AAAA,KACH;AAEJ;AAGA,SAAS,oBACP,MACA,cACqB;AACrB,MAAI,aAAc,QAAO;AACzB,SAAO,SAAS,gBAAgB,WAAW;AAC7C;AAOO,SAAS,aAAa,OAAe,UAA2B;AACrE,SAAO,MAAM,KAAK,EAAE,kBAAkB,OAAO,MAAM,SAAS,KAAK,EAAE,kBAAkB,OAAO;AAC9F;AASA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASuB;AACr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;AAAA,cAAM,SACL,oBAAC,SAAM,UAAS,SAAQ,IAAI,EAAE,IAAI,EAAE,GAAG,eAAa,GAAG,UAAU,UAC9D,gBAAM,OACT;AAAA,QAED,kBAAkB,UACjB;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,OAAO;AAAA,YACP,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAU,MAAM;AAAA,YAChB;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7TCOYCD7.js";
4
4
  import {
5
5
  CardBody
6
- } from "./chunk-XYSE2QZN.js";
6
+ } from "./chunk-EF4DVYD2.js";
7
7
  import {
8
8
  toGridExpansion
9
9
  } from "./chunk-O5UGAL2V.js";
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-KHG57NAE.js";
29
29
  import {
30
30
  DataGrid
31
- } from "./chunk-FXZUVZON.js";
31
+ } from "./chunk-DYHOBKPU.js";
32
32
  import {
33
33
  default as default2
34
34
  } from "./chunk-6DPAWXZ3.js";
@@ -250,4 +250,4 @@ function GridMain(props) {
250
250
  export {
251
251
  GridMain
252
252
  };
253
- //# sourceMappingURL=chunk-GFXS5PJL.js.map
253
+ //# sourceMappingURL=chunk-NBXG3SQ3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridToolbar
3
- } from "./chunk-FAIQCGSL.js";
3
+ } from "./chunk-M3DSPEZ3.js";
4
4
 
5
5
  // src/components/data-display/DataViews/data-views-shell-toolbar.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -68,4 +68,4 @@ function ShellToolbar({
68
68
  export {
69
69
  ShellToolbar
70
70
  };
71
- //# sourceMappingURL=chunk-SCAPSX6T.js.map
71
+ //# sourceMappingURL=chunk-O36MIQIO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridMain
3
- } from "./chunk-GFXS5PJL.js";
3
+ } from "./chunk-NBXG3SQ3.js";
4
4
  import {
5
5
  FilterDialog,
6
6
  GridFilterPanel
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-K3PMMW23.js";
30
30
  import {
31
31
  ShellToolbar
32
- } from "./chunk-SCAPSX6T.js";
32
+ } from "./chunk-O36MIQIO.js";
33
33
  import {
34
34
  SHELL_PROPS,
35
35
  useStickyBarTop
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-5YDS6HO3.js";
41
41
  import {
42
42
  togglePillValues
43
- } from "./chunk-QCQWOSSD.js";
43
+ } from "./chunk-GHXW6O5T.js";
44
44
  import {
45
45
  DataViewsLayoutProvider,
46
46
  useDataViewsLayout
@@ -251,4 +251,4 @@ function GridShell(props) {
251
251
  export {
252
252
  GridShell
253
253
  };
254
- //# sourceMappingURL=chunk-QIYX33SH.js.map
254
+ //# sourceMappingURL=chunk-RHKQ2RSY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useColumnsWithActions,
3
3
  useRenderedColumns
4
- } from "./chunk-ZTPB7PVI.js";
4
+ } from "./chunk-HPEBSLYP.js";
5
5
  import {
6
6
  filterRows
7
7
  } from "./chunk-YGQX7BNI.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  computeActiveFilterCount,
14
14
  defaultSortFields
15
- } from "./chunk-QCQWOSSD.js";
15
+ } from "./chunk-GHXW6O5T.js";
16
16
  import {
17
17
  serverDerived,
18
18
  useServerQuery
@@ -172,4 +172,4 @@ function useDataViewsState({
172
172
  export {
173
173
  useDataViewsState
174
174
  };
175
- //# sourceMappingURL=chunk-F6IMOMA3.js.map
175
+ //# sourceMappingURL=chunk-ZPACE34U.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useRowConfirm
3
- } from "../chunk-KYTADPS2.js";
3
+ } from "../chunk-GRMBCJS6.js";
4
4
  import {
5
5
  useRemoveConfirm
6
- } from "../chunk-XGKUXYAD.js";
6
+ } from "../chunk-3Z3WIQ5M.js";
7
7
  import {
8
8
  rowActionsToMenuItems
9
9
  } from "../chunk-ZBXG6RVJ.js";
@@ -24,10 +24,10 @@ import {
24
24
  import "../chunk-WVML3ENZ.js";
25
25
  import "../chunk-AY5GKCH7.js";
26
26
  import "../chunk-XCBQXSTR.js";
27
- import "../chunk-Z7COWR4K.js";
28
- import "../chunk-QBH36OBQ.js";
29
- import "../chunk-K44FSPU7.js";
30
- import "../chunk-LTLOZQPP.js";
27
+ import "../chunk-5M2NWXN4.js";
28
+ import "../chunk-BWFUZ4N2.js";
29
+ import "../chunk-LBZEPWYK.js";
30
+ import "../chunk-MM7BPTVV.js";
31
31
  import "../chunk-EMYESBIT.js";
32
32
  import "../chunk-LZRVUOMU.js";
33
33
  import "../chunk-EEB66IVH.js";
@@ -1,11 +1,11 @@
1
1
  import "../chunk-L5CPOEDP.js";
2
2
  import {
3
3
  DataGrid
4
- } from "../chunk-FXZUVZON.js";
4
+ } from "../chunk-DYHOBKPU.js";
5
5
  import "../chunk-EARWC6PD.js";
6
6
  import "../chunk-LDROG4QI.js";
7
- import "../chunk-ZFXTRPQO.js";
8
- import "../chunk-ICDAYOJ6.js";
7
+ import "../chunk-5RYPVYWP.js";
8
+ import "../chunk-K6FW4YDA.js";
9
9
  import "../chunk-G3E66C6J.js";
10
10
  import "../chunk-YKCAJ2TN.js";
11
11
  import "../chunk-PZ5AY32C.js";
@@ -3,11 +3,11 @@ import {
3
3
  } from "../chunk-MBMZNSBP.js";
4
4
  import {
5
5
  DataViewsTableBase
6
- } from "../chunk-C47LBKEG.js";
6
+ } from "../chunk-FCVPVEAS.js";
7
7
  import "../chunk-4HUSG5MR.js";
8
8
  import {
9
9
  DataViewsGrid
10
- } from "../chunk-2VHAD4NE.js";
10
+ } from "../chunk-LI6XSM5D.js";
11
11
  import {
12
12
  BaseListCard
13
13
  } from "../chunk-CSD6SWBZ.js";
@@ -23,12 +23,12 @@ import {
23
23
  DropIndicator,
24
24
  useDragItem
25
25
  } from "../chunk-K4EKTMTC.js";
26
- import "../chunk-QIYX33SH.js";
27
- import "../chunk-GFXS5PJL.js";
26
+ import "../chunk-RHKQ2RSY.js";
27
+ import "../chunk-NBXG3SQ3.js";
28
28
  import {
29
29
  DataViewsBoard
30
30
  } from "../chunk-7TCOYCD7.js";
31
- import "../chunk-XYSE2QZN.js";
31
+ import "../chunk-EF4DVYD2.js";
32
32
  import "../chunk-555TUQ7E.js";
33
33
  import "../chunk-LUNN5GTB.js";
34
34
  import "../chunk-IQ2U5MVO.js";
@@ -50,12 +50,12 @@ import "../chunk-33MMQHYU.js";
50
50
  import "../chunk-7D7CJRL7.js";
51
51
  import "../chunk-GCZJH4XL.js";
52
52
  import "../chunk-CBOB5AV6.js";
53
- import "../chunk-6J7RGNSF.js";
53
+ import "../chunk-7HA7UH7O.js";
54
54
  import "../chunk-LG52LMAM.js";
55
- import "../chunk-C7CIUDXZ.js";
55
+ import "../chunk-7JOLSD2W.js";
56
56
  import "../chunk-5M4TYFR3.js";
57
- import "../chunk-SCAPSX6T.js";
58
- import "../chunk-FAIQCGSL.js";
57
+ import "../chunk-O36MIQIO.js";
58
+ import "../chunk-M3DSPEZ3.js";
59
59
  import "../chunk-VBGC7G4F.js";
60
60
  import "../chunk-WSAUWJFO.js";
61
61
  import "../chunk-VJG43WKU.js";
@@ -68,15 +68,15 @@ import "../chunk-VMN6KG2U.js";
68
68
  import "../chunk-G6EJLEVV.js";
69
69
  import "../chunk-B2JSUFDX.js";
70
70
  import "../chunk-DZEC6RFM.js";
71
- import "../chunk-F6IMOMA3.js";
72
- import "../chunk-ZTPB7PVI.js";
71
+ import "../chunk-ZPACE34U.js";
72
+ import "../chunk-HPEBSLYP.js";
73
73
  import "../chunk-YGQX7BNI.js";
74
74
  import {
75
75
  DataViewsScopeTabs,
76
76
  assertNoScopePillOverlap,
77
77
  resolveScope
78
78
  } from "../chunk-PL2AB5HJ.js";
79
- import "../chunk-QCQWOSSD.js";
79
+ import "../chunk-GHXW6O5T.js";
80
80
  import "../chunk-IMLIIW77.js";
81
81
  import "../chunk-LLZWB32X.js";
82
82
  import "../chunk-U5FOJBLG.js";
@@ -173,10 +173,10 @@ import "../chunk-PN4HVM43.js";
173
173
  import "../chunk-C3UKR3NT.js";
174
174
  import "../chunk-D6KL74KI.js";
175
175
  import "../chunk-XCBQXSTR.js";
176
- import "../chunk-Z7COWR4K.js";
177
- import "../chunk-QBH36OBQ.js";
178
- import "../chunk-K44FSPU7.js";
179
- import "../chunk-LTLOZQPP.js";
176
+ import "../chunk-5M2NWXN4.js";
177
+ import "../chunk-BWFUZ4N2.js";
178
+ import "../chunk-LBZEPWYK.js";
179
+ import "../chunk-MM7BPTVV.js";
180
180
  import "../chunk-EMYESBIT.js";
181
181
  import "../chunk-LZRVUOMU.js";
182
182
  import "../chunk-EEB66IVH.js";
@@ -188,11 +188,11 @@ import "../chunk-AL5E624U.js";
188
188
  import "../chunk-GYXUCS37.js";
189
189
  import "../chunk-LV7LSPBF.js";
190
190
  import "../chunk-L5CPOEDP.js";
191
- import "../chunk-FXZUVZON.js";
191
+ import "../chunk-DYHOBKPU.js";
192
192
  import "../chunk-EARWC6PD.js";
193
193
  import "../chunk-LDROG4QI.js";
194
- import "../chunk-ZFXTRPQO.js";
195
- import "../chunk-ICDAYOJ6.js";
194
+ import "../chunk-5RYPVYWP.js";
195
+ import "../chunk-K6FW4YDA.js";
196
196
  import "../chunk-G3E66C6J.js";
197
197
  import "../chunk-SNCSGLJ6.js";
198
198
  import "../chunk-UMICTXMP.js";
@@ -1,16 +1,16 @@
1
1
  import "../chunk-XCBQXSTR.js";
2
2
  import {
3
3
  createConfirmButton
4
- } from "../chunk-Z7COWR4K.js";
4
+ } from "../chunk-5M2NWXN4.js";
5
5
  import {
6
6
  ConfirmAction
7
- } from "../chunk-QBH36OBQ.js";
7
+ } from "../chunk-BWFUZ4N2.js";
8
8
  import {
9
9
  withConfirmation
10
- } from "../chunk-K44FSPU7.js";
10
+ } from "../chunk-LBZEPWYK.js";
11
11
  import {
12
12
  ConfirmActionDialog
13
- } from "../chunk-LTLOZQPP.js";
13
+ } from "../chunk-MM7BPTVV.js";
14
14
  import {
15
15
  useConfirmAction
16
16
  } from "../chunk-EMYESBIT.js";
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.cells.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataGrid/DataGrid.cells.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAqClD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC5D,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,IAAI,GACL,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2CxC;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,GAAG,EAAE,CAAC,CAAC;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAClD,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC;CACjE;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC1D,GAAG,EACH,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,KAAK,GACN,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkCtC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB;AAoDD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,GAAG,CAAC,OAAO,CAuCnB"}
1
+ {"version":3,"file":"DataGrid.cells.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataGrid/DataGrid.cells.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,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AG,gBAAgB,CAAC,CAAC;CACjE;AAaD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC1D,GAAG,EACH,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,KAAK,GACN,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoCtC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB;AAoDD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,GAAG,CAAC,OAAO,CAuCnB"}
@@ -42,6 +42,12 @@ export interface GridColumn<T = Record<string, unknown>> {
42
42
  rowIndex: number;
43
43
  col: GridColumn<T>;
44
44
  }) => React.ReactNode;
45
+ /**
46
+ * Fired by a click anywhere in the cell, its padding included. Opening a row
47
+ * from a wrapper inside the content left the padding dead: a strip either
48
+ * side of every column that showed the hover and did nothing (FUT-3849).
49
+ */
50
+ onCellClick?: (row: T) => void;
45
51
  headerCell?: (col: GridColumn<T>) => React.ReactNode;
46
52
  /** Cell editor renderer (edit mode) */
47
53
  editor?: (ctx: {