@navikt/ds-react 8.10.4 → 8.10.5

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 (128) hide show
  1. package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +11 -12
  2. package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
  3. package/cjs/data/drag-and-drop/root/DragAndDrop.context.d.ts +4 -2
  4. package/cjs/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
  5. package/cjs/data/drag-and-drop/root/DragAndDropRoot.d.ts +5 -5
  6. package/cjs/data/drag-and-drop/root/DragAndDropRoot.js +49 -28
  7. package/cjs/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
  8. package/cjs/data/drag-and-drop/types.d.ts +0 -4
  9. package/cjs/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.d.ts} +3 -3
  10. package/cjs/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js} +5 -5
  11. package/cjs/data/drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js.map +1 -0
  12. package/cjs/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.d.ts +27 -0
  13. package/cjs/data/{drag-and-drop-old/item/DataDragAndDropItem.js → drag-and-drop-legacy/item/DragAndDropItemLegacy.js} +12 -12
  14. package/cjs/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.js.map +1 -0
  15. package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.d.ts +5 -0
  16. package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js +6 -0
  17. package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js.map +1 -0
  18. package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.d.ts +24 -0
  19. package/cjs/data/{drag-and-drop-old/root/DataDragAndDropRoot.js → drag-and-drop-legacy/root/DragAndDropLegacyRoot.js} +10 -10
  20. package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.js.map +1 -0
  21. package/cjs/data/stories/Data.test-data.js +0 -1
  22. package/cjs/data/stories/Data.test-data.js.map +1 -1
  23. package/cjs/data/table/column-header/DataTableColumnHeader.js +2 -2
  24. package/cjs/data/table/column-header/DataTableColumnHeader.js.map +1 -1
  25. package/cjs/data/table/details-panel-row/DataTableDetailsPanelRow.js +1 -1
  26. package/cjs/data/table/details-panel-row/DataTableDetailsPanelRow.js.map +1 -1
  27. package/cjs/data/table/helpers/collectTableRowEntries.d.ts +7 -5
  28. package/cjs/data/table/helpers/collectTableRowEntries.js +18 -10
  29. package/cjs/data/table/helpers/collectTableRowEntries.js.map +1 -1
  30. package/cjs/data/table/helpers/table-focus.d.ts +0 -3
  31. package/cjs/data/table/helpers/table-focus.js +38 -8
  32. package/cjs/data/table/helpers/table-focus.js.map +1 -1
  33. package/cjs/data/table/hooks/useGridCache.js +2 -2
  34. package/cjs/data/table/hooks/useGridCache.js.map +1 -1
  35. package/cjs/data/table/hooks/useTableDetailsPanel.js +1 -1
  36. package/cjs/data/table/hooks/useTableDetailsPanel.js.map +1 -1
  37. package/cjs/data/table/hooks/useTableItems.d.ts +4 -4
  38. package/cjs/data/table/hooks/useTableItems.js +8 -8
  39. package/cjs/data/table/hooks/useTableItems.js.map +1 -1
  40. package/cjs/data/table/hooks/useTableKeyboardNav.js +5 -1
  41. package/cjs/data/table/hooks/useTableKeyboardNav.js.map +1 -1
  42. package/cjs/data/table/root/DataTable.types.d.ts +0 -3
  43. package/cjs/data/table/root/DataTableRoot.d.ts +1 -1
  44. package/cjs/data/table/root/DataTableRoot.js +7 -11
  45. package/cjs/data/table/root/DataTableRoot.js.map +1 -1
  46. package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +11 -12
  47. package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
  48. package/esm/data/drag-and-drop/root/DragAndDrop.context.d.ts +4 -2
  49. package/esm/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
  50. package/esm/data/drag-and-drop/root/DragAndDropRoot.d.ts +5 -5
  51. package/esm/data/drag-and-drop/root/DragAndDropRoot.js +49 -28
  52. package/esm/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
  53. package/esm/data/drag-and-drop/types.d.ts +0 -4
  54. package/esm/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.d.ts} +3 -3
  55. package/esm/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js} +4 -4
  56. package/esm/data/drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js.map +1 -0
  57. package/esm/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.d.ts +27 -0
  58. package/esm/data/{drag-and-drop-old/item/DataDragAndDropItem.js → drag-and-drop-legacy/item/DragAndDropItemLegacy.js} +11 -11
  59. package/esm/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.js.map +1 -0
  60. package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.d.ts +5 -0
  61. package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js +3 -0
  62. package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js.map +1 -0
  63. package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.d.ts +24 -0
  64. package/esm/data/{drag-and-drop-old/root/DataDragAndDropRoot.js → drag-and-drop-legacy/root/DragAndDropLegacyRoot.js} +8 -8
  65. package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.js.map +1 -0
  66. package/esm/data/stories/Data.test-data.js +0 -1
  67. package/esm/data/stories/Data.test-data.js.map +1 -1
  68. package/esm/data/table/column-header/DataTableColumnHeader.js +2 -2
  69. package/esm/data/table/column-header/DataTableColumnHeader.js.map +1 -1
  70. package/esm/data/table/details-panel-row/DataTableDetailsPanelRow.js +1 -1
  71. package/esm/data/table/details-panel-row/DataTableDetailsPanelRow.js.map +1 -1
  72. package/esm/data/table/helpers/collectTableRowEntries.d.ts +7 -5
  73. package/esm/data/table/helpers/collectTableRowEntries.js +18 -10
  74. package/esm/data/table/helpers/collectTableRowEntries.js.map +1 -1
  75. package/esm/data/table/helpers/table-focus.d.ts +0 -3
  76. package/esm/data/table/helpers/table-focus.js +38 -8
  77. package/esm/data/table/helpers/table-focus.js.map +1 -1
  78. package/esm/data/table/hooks/useGridCache.js +2 -2
  79. package/esm/data/table/hooks/useGridCache.js.map +1 -1
  80. package/esm/data/table/hooks/useTableDetailsPanel.js +1 -1
  81. package/esm/data/table/hooks/useTableDetailsPanel.js.map +1 -1
  82. package/esm/data/table/hooks/useTableItems.d.ts +4 -4
  83. package/esm/data/table/hooks/useTableItems.js +8 -8
  84. package/esm/data/table/hooks/useTableItems.js.map +1 -1
  85. package/esm/data/table/hooks/useTableKeyboardNav.js +6 -2
  86. package/esm/data/table/hooks/useTableKeyboardNav.js.map +1 -1
  87. package/esm/data/table/root/DataTable.types.d.ts +0 -3
  88. package/esm/data/table/root/DataTableRoot.d.ts +1 -1
  89. package/esm/data/table/root/DataTableRoot.js +7 -11
  90. package/esm/data/table/root/DataTableRoot.js.map +1 -1
  91. package/package.json +8 -7
  92. package/src/data/drag-and-drop/drag-handler/DragAndDropDragHandler.tsx +11 -16
  93. package/src/data/drag-and-drop/root/DragAndDrop.context.tsx +4 -2
  94. package/src/data/drag-and-drop/root/DragAndDropRoot.tsx +85 -40
  95. package/src/data/drag-and-drop/types.ts +0 -5
  96. package/src/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.tsx} +5 -5
  97. package/src/data/{drag-and-drop-old/item/DataDragAndDropItem.tsx → drag-and-drop-legacy/item/DragAndDropItemLegacy.tsx} +13 -13
  98. package/src/data/{drag-and-drop-old/root/DataDragAndDrop.context.tsx → drag-and-drop-legacy/root/DragAndDropLegacy.context.tsx} +3 -3
  99. package/src/data/{drag-and-drop-old/root/DataDragAndDropRoot.tsx → drag-and-drop-legacy/root/DragAndDropLegacyRoot.tsx} +19 -21
  100. package/src/data/stories/Data.test-data.tsx +0 -1
  101. package/src/data/table/column-header/DataTableColumnHeader.tsx +2 -0
  102. package/src/data/table/details-panel-row/DataTableDetailsPanelRow.tsx +5 -1
  103. package/src/data/table/helpers/collectTableRowEntries.ts +31 -17
  104. package/src/data/table/helpers/table-focus.ts +63 -9
  105. package/src/data/table/hooks/__tests__/useTableItems.test.ts +46 -7
  106. package/src/data/table/hooks/useGridCache.ts +3 -2
  107. package/src/data/table/hooks/useTableDetailsPanel.tsx +5 -2
  108. package/src/data/table/hooks/useTableItems.ts +20 -19
  109. package/src/data/table/hooks/useTableKeyboardNav.ts +6 -2
  110. package/src/data/table/root/DataTable.types.ts +0 -3
  111. package/src/data/table/root/DataTableRoot.tsx +34 -34
  112. package/src/data/table/root/agent-feature-gap.md +96 -0
  113. package/cjs/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +0 -1
  114. package/cjs/data/drag-and-drop-old/item/DataDragAndDropItem.d.ts +0 -27
  115. package/cjs/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +0 -1
  116. package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.d.ts +0 -5
  117. package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.js +0 -6
  118. package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +0 -1
  119. package/cjs/data/drag-and-drop-old/root/DataDragAndDropRoot.d.ts +0 -24
  120. package/cjs/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +0 -1
  121. package/esm/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +0 -1
  122. package/esm/data/drag-and-drop-old/item/DataDragAndDropItem.d.ts +0 -27
  123. package/esm/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +0 -1
  124. package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.d.ts +0 -5
  125. package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.js +0 -3
  126. package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +0 -1
  127. package/esm/data/drag-and-drop-old/root/DataDragAndDropRoot.d.ts +0 -24
  128. package/esm/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +0 -1
@@ -110,7 +110,7 @@ interface DataTableProps<T>
110
110
  *
111
111
  * If not provided, the row index will be used as id. This can cause issues if your data changes dynamically, so it's recommended to provide a stable id if possible.
112
112
  */
113
- getRowId?: (rowData: T, index: number) => string | number;
113
+ getRowId?: (rowData: T) => string | number;
114
114
  /**
115
115
  * Sticky columns that remain visible when horizontally scrolling the table.
116
116
  *
@@ -214,14 +214,9 @@ function DataTableInner<T>(
214
214
  sort: sortProp,
215
215
  });
216
216
 
217
- /**
218
- * TODO:
219
- * - If user currently does not give a getRowsId function, and data is nested (getSubRows)
220
- * we end up in an infinite loop since the index based ids repeat for children and causes chaos.
221
- */
222
217
  const tableItems = useTableItems({
223
218
  items: data,
224
- getRowId: getRowId ?? ((_, index) => index),
219
+ getRowId,
225
220
  subRows,
226
221
  });
227
222
 
@@ -277,6 +272,7 @@ function DataTableInner<T>(
277
272
  <TableItemsProvider
278
273
  itemDetails={tableItems.itemDetails}
279
274
  items={tableItems.items}
275
+ visibleRowIds={tableItems.visibleRowIds}
280
276
  onExpandedRowIdsChange={tableItems.onExpandedRowIdsChange}
281
277
  isSubRowExpanded={tableItems.isSubRowExpanded}
282
278
  >
@@ -389,37 +385,40 @@ function TableElementWrapper({
389
385
  });
390
386
  }, [updateStickyStyles]);
391
387
 
392
- useEffect(() => {
393
- const tableWrapperElement = tableWrapperRef.current;
388
+ useEffect(
389
+ function observeAndUpdateStickyStyles() {
390
+ const tableWrapperElement = tableWrapperRef.current;
394
391
 
395
- if (!tableWrapperElement) {
396
- return;
397
- }
392
+ if (!tableWrapperElement) {
393
+ return;
394
+ }
398
395
 
399
- const handleResize = () => scheduleStickyStylesUpdate();
396
+ const handleResize = () => scheduleStickyStylesUpdate();
400
397
 
401
- window.addEventListener("resize", handleResize);
398
+ window.addEventListener("resize", handleResize);
402
399
 
403
- let resizeObserver: ResizeObserver | undefined;
404
- if (typeof ResizeObserver !== "undefined") {
405
- resizeObserver = new ResizeObserver(handleResize);
406
- resizeObserver.observe(tableWrapperElement);
407
- if (tableRef.current) {
408
- resizeObserver.observe(tableRef.current);
400
+ let resizeObserver: ResizeObserver | undefined;
401
+ if (typeof ResizeObserver !== "undefined") {
402
+ resizeObserver = new ResizeObserver(handleResize);
403
+ resizeObserver.observe(tableWrapperElement);
404
+ if (tableRef.current) {
405
+ resizeObserver.observe(tableRef.current);
406
+ }
409
407
  }
410
- }
411
408
 
412
- scheduleStickyStylesUpdate();
409
+ scheduleStickyStylesUpdate();
413
410
 
414
- return () => {
415
- window.removeEventListener("resize", handleResize);
416
- resizeObserver?.disconnect();
417
- if (rafRef.current !== null) {
418
- cancelAnimationFrame(rafRef.current);
419
- rafRef.current = null;
420
- }
421
- };
422
- }, [scheduleStickyStylesUpdate]);
411
+ return () => {
412
+ window.removeEventListener("resize", handleResize);
413
+ resizeObserver?.disconnect();
414
+ if (rafRef.current !== null) {
415
+ cancelAnimationFrame(rafRef.current);
416
+ rafRef.current = null;
417
+ }
418
+ };
419
+ },
420
+ [scheduleStickyStylesUpdate],
421
+ );
423
422
 
424
423
  return (
425
424
  <div className="aksel-data-table__border-wrapper">
@@ -450,7 +449,7 @@ function DataTableTBodyContent({
450
449
  loadingLabel,
451
450
  emptyState,
452
451
  }: DataTableTBodyContentProps) {
453
- const { items, itemDetails } = useTableItemsContext();
452
+ const { items, itemDetails, visibleRowIds } = useTableItemsContext();
454
453
  const { columns, isLoading, fullWidthColSpan } = useDataTableContext();
455
454
 
456
455
  if (isLoading && loadingState != null) {
@@ -506,8 +505,9 @@ function DataTableTBodyContent({
506
505
  </td>
507
506
  </tr>
508
507
  )}
509
- {items.map((rowData) => {
510
- const details = itemDetails.get(rowData);
508
+ {items.map((rowData, rowIndex) => {
509
+ const rowId = visibleRowIds[rowIndex];
510
+ const details = rowId != null ? itemDetails.get(rowId) : undefined;
511
511
 
512
512
  /* Should in theory be impossible. Look about typing this? */
513
513
  if (!details) {
@@ -0,0 +1,96 @@
1
+ ### Component: DataTable
2
+
3
+ **Primitive type:** Data table with optional selection, sorting, nested rows, details panels, sticky columns, column resizing, and keyboard cell navigation.
4
+ **Reference libraries:** React Aria Table / Adobe Spectrum TableView, MUI Data Grid, Base UI table patterns. Cloudscape Table is a useful secondary reference for resize/details behavior.
5
+
6
+ ### Launch Review Findings
7
+
8
+ 1. **The auto API has no visible caption slot or caption prop.**
9
+ Consumers can still pass `aria-label`/`aria-labelledby` through native table props, but `children?: never` means the preview API cannot render a native `caption` or a built-in visible summary/title. Mature table APIs usually provide at least one clear accessible naming path.
10
+
11
+ 2. **Column resizing is present, but the preview API still reads as unfinished.**
12
+ Resizing is effectively opt-out in fixed layout because `DataTableColumnHeader` defaults `resizable` to `true`. The interaction also still has unfinished accessibility and i18n details, and `onWidthChange` currently fires for every width step while dragging.
13
+
14
+ 3. **Critical behaviors are under-tested for a preview launch.**
15
+ Existing tests cover selection trees, item expansion state, and low-level keyboard helpers, but not the end-to-end behaviors users will notice first: sorting, details panels, loading states, row click behavior, column resizing, and selection accessibility.
16
+
17
+ ### Feature Gap Table
18
+
19
+ | # | Feature | Status | Priority | Reference | Notes |
20
+ | --- | --------------------------------------------------- | ---------- | --------------- | ---------------------------- | ----------------------------------------------------------------------- |
21
+ | 1 | Arrow/Home/End keyboard cell navigation | ✅ Present | — | React Aria, MUI | Good base coverage in helper tests. |
22
+ | 2 | Controlled/uncontrolled sorting | ✅ Present | — | React Aria, MUI | Supports controlled and uncontrolled sort arrays. |
23
+ | 3 | Multi-column sorting | ✅ Present | — | MUI, Spectrum | Shift-click is supported. |
24
+ | 4 | Controlled/uncontrolled row selection | ✅ Present | — | React Aria, MUI | Single and multiple selection both exist. |
25
+ | 5 | Controlled/uncontrolled nested row expansion | ✅ Present | — | MUI, Spectrum | `subRows` API is already solid for preview. |
26
+ | 6 | Controlled/uncontrolled details panel expansion | ✅ Present | — | MUI | Good baseline, limited to top-level rows by design. |
27
+ | 7 | Loading overlay / loading rows / empty state | ✅ Present | — | MUI, Spectrum | Baseline states exist. |
28
+ | 9 | Visible caption / built-in accessible naming path | ❌ Missing | 🔴 Expected | React Aria, Spectrum | Auto API cannot render `caption`; users only get raw HTML attrs. |
29
+ | 13 | Opt-in / polished column resize API | ⚠️ Partial | 🟡 Valuable | MUI, Cloudscape | Feature exists, but defaults and a11y polish are not preview-ready yet. |
30
+ | 14 | Per-row disabled selection callback | ❌ Missing | 🟡 Valuable | React Aria, MUI | Current API only accepts disabled keys, not row-driven logic. |
31
+ | 15 | Row-level prop/className callback | ❌ Missing | 🟡 Valuable | MUI | No way to attach row-specific attrs/classes without custom rendering. |
32
+ | 16 | Header-group / multi-row header support in auto API | ❌ Missing | 🟢 Nice-to-have | React Aria, MUI | Current auto API is intentionally flat. |
33
+ | 17 | Accessor shorthand for simple columns | ❌ Missing | 🟢 Nice-to-have | MUI, TanStack-style patterns | Would reduce boilerplate for simple data tables. |
34
+ | 18 | Typeahead row navigation | ❌ Missing | 🟢 Nice-to-have | React Aria | Useful on large data sets, not necessary for first preview. |
35
+ | 19 | RTL-aware sticky/nesting layout | ❌ Missing | 🟢 Nice-to-have | React Aria, MUI | Current sticky/nesting CSS is mostly physical, not logical. |
36
+
37
+ ### Implementation Notes
38
+
39
+ #### 9. Visible caption / built-in accessible naming path
40
+
41
+ - **What it does:** Lets consumers provide a native table caption or a clearly supported naming API without dropping to raw HTML attributes.
42
+ - **Reference behavior:** React Aria tables require an accessible label; Spectrum and MUI also expose a clear naming path.
43
+ - **Approach here:** Keep `children` forbidden, but add a `caption?: React.ReactNode` prop that renders a native `caption`. Optionally add `captionProps` for styling hooks.
44
+ - **Props/API additions needed:** `caption?: React.ReactNode`, optionally `captionProps?: React.HTMLAttributes<HTMLTableCaptionElement>`.
45
+
46
+ #### 13. Opt-in / polished column resize API
47
+
48
+ - **What it does:** Makes resize behavior predictable and avoids surprising every preview consumer with advanced header affordances.
49
+ - **Reference behavior:** MUI and Cloudscape treat column resize as an explicit feature and spend a lot of API surface on labels, limits, and commit behavior.
50
+ - **Approach here:** Default `resizable` to `false`, add missing slider aria metadata, and only call `onWidthChange` on commit or with a small debounce. Also move hard-coded Norwegian labels into the same i18n pattern as the rest of the component.
51
+ - **Props/API additions needed:** No new public props required for a first pass. The main change is default behavior and polish.
52
+
53
+ #### 14. Per-row disabled selection callback
54
+
55
+ - **What it does:** Lets consumers disable selection from row data instead of precomputing key arrays.
56
+ - **Reference behavior:** Many mature table APIs allow row-driven selection rules.
57
+ - **Approach here:** Resolve disabled state during row collection so selection helpers can still work with ids internally.
58
+ - **Props/API additions needed:** `isRowSelectionDisabled?: (rowData: T) => boolean`.
59
+
60
+ #### 15. Row-level prop/className callback
61
+
62
+ - **What it does:** Lets consumers add row-specific classes, test hooks, aria hooks, and state styling without replacing the table implementation.
63
+ - **Reference behavior:** MUI exposes row-class callbacks and row metadata hooks.
64
+ - **Approach here:** Apply callbacks when rendering `DataTableTr` so the row id and row data are both available.
65
+ - **Props/API additions needed:** `getRowProps?: (rowData: T, rowId: string | number) => React.HTMLAttributes<HTMLTableRowElement>` or a narrower `getRowClassName` if you want to keep the API tighter.
66
+
67
+ ### Internal Refactors
68
+
69
+ 1. Split the current root into a small orchestration hook plus presentational sub-components. `DataTableRoot.tsx` currently owns state setup, context assembly, loading/empty rendering, row rendering, and sticky-wrapper logic in one file.
70
+
71
+ 2. Replace object-keyed `itemDetails` lookups with id-keyed row entries. This fixes the duplicate-object bug and simplifies details-panel and selection wiring.
72
+
73
+ 3. Unify loading-state presence checks. `DataTableTBodyContent` uses nullish checks for `loadingState`, while `showLoadingOverlay` in the root uses truthiness checks; those should match.
74
+
75
+ 4. Make localization an explicit seam. The component currently hard-codes visible and aria labels such as sort-resize instructions, expand/collapse labels, and selection labels directly in render code.
76
+
77
+ 5. Revisit the resize default and commit path before large-table performance work. Continuous `onWidthChange` callbacks can easily push rerenders through the whole table if consumers control widths externally.
78
+
79
+ 6. Decide whether the preview API is a plain table or the start of a data-grid abstraction. A few current seams, especially keyboard navigation and selection, are already grid-like, while captioning and row-header semantics still assume a plain table model.
80
+
81
+ ### Test Gaps Before Preview
82
+
83
+ 1. Sorting interaction story/test covering click, keyboard activation, and multi-sort.
84
+ 2. Details-panel story/test covering expand, collapse, `aria-controls`, and controlled mode.
85
+ 3. Loading/empty-state tests covering overlay vs skeleton vs custom loading content.
86
+ 4. Row-click tests covering selection interaction, text-selection guard, and interactive-content guard.
87
+ 5. Resize tests covering keyboard resize, pointer resize, and form embedding.
88
+ 6. Accessibility test coverage for selection labels and row-header semantics once those are implemented.
89
+
90
+ ### Suggested Order For Follow-up Work
91
+
92
+ 1. Fix selection labeling and row-header semantics together.
93
+ 2. Add a built-in caption/naming API.
94
+ 3. Harden resize defaults and button semantics.
95
+ 4. Refactor row metadata to be id-based.
96
+ 5. Fill the missing user-facing stories/tests around sort, details, loading, and row click.
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropDragHandler.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,qDAI6B;AAC7B,0EAAuE;AAmBvE;;;;;GAKG;AACU,QAAA,0BAA0B,GAAG,eAAK,CAAC,UAAU,CAGxD,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE;IACzC,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,CACL,uCAAK,SAAS,EAAC,6CAA6C;YACzD,gBAAgB,IAAI,CACnB,wCACE,SAAS,EAAC,+CAA+C,oBAC1C,IAAI;gBAEnB,8BAAC,mCAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CAClD,CACR;YACD,uCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,8BAAC,8BAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE;YACL,gBAAgB,IAAI,CACnB,wCACE,SAAS,EAAC,+CAA+C,oBAC1C,MAAM;gBAErB,8BAAC,qCAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACpD,CACR,CACG,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,8BAAC,mBAAQ;QACN,gBAAgB,IAAI,CACnB,8BAAC,mBAAQ,CAAC,OAAO,IACf,IAAI,EAAC,KAAK,EACV,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,8BAAC,mCAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACtC,CACpB;QACD,8BAAC,mBAAQ,CAAC,MAAM,IAAC,OAAO;YACtB,uCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,8BAAC,8BAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE,CACU;QACjB,gBAAgB,IAAI,CACnB,8BAAC,mBAAQ,CAAC,OAAO,IACf,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,8BAAC,qCAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACxC,CACpB,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- interface DataDragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
4
- /**
5
- * Unique id
6
- */
7
- id: string;
8
- /**
9
- * Index of the item being dragged
10
- */
11
- index: number;
12
- }
13
- /**
14
- * TODO
15
- *
16
- * @see 🏷️ {@link DataDragAndDropItemProps}
17
- * @example
18
- * ```tsx
19
- * <DragAndDrop.Item numOfSelectedRows={selectedRows.length} onClear={handleClear}>
20
- * TODO
21
- * </DragAndDrop.Item>
22
- * ```
23
- */
24
- declare const DataDragAndDropItem: React.ForwardRefExoticComponent<DataDragAndDropItemProps & React.RefAttributes<HTMLDivElement>>;
25
- export default DataDragAndDropItem;
26
- export { DataDragAndDropItem };
27
- export type { DataDragAndDropItemProps };
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropItem.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/item/DataDragAndDropItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAsD;AACtD,+CAAsC;AACtC,qDAAmD;AACnD,oDAA4C;AAC5C,gDAAoD;AACpD,2FAAwF;AACxF,6EAAyE;AAczE;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAG,eAAK,CAAC,UAAU,CAG1C,CAAC,EAA2C,EAAE,YAAY,EAAE,EAAE;QAA7D,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,OAAW,EAAN,IAAI,cAAzC,wCAA2C,CAAF;IAC1C,MAAM,SAAS,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,IAAA,sBAAW,EAAC;QACpD,EAAE;QACF,KAAK;QACL,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,eAAK,CAAC,UAAU,CAAC,gDAAsB,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,UAAU,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,OAAO,CAAC;IACrE,MAAM,eAAe,GAAG,YAAY,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,OAAO,CAAC;IACzE,MAAM,gBAAgB,GAAG,UAAU,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,UAAU,CAAC;IAE3E,OAAO,CACL,8BAAC,cAAM,IAAC,GAAG,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO;QAEvD,qDACE,GAAG,EAAE,SAAS,IACV,IAAI,IACR,SAAS,EAAE,IAAA,YAAE,EAAC,sCAAsC,EAAE,SAAS,CAAC,mBACjD,UAAU,yBACJ,aAAa,4BACV,gBAAgB,sBACtB,eAAe,EACjC,QAAQ,EAAE,CAAC,CAAC;YAEZ,8BAAC,uDAA0B,IACzB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,SACH;YACF,2CAAM,QAAQ,CAAO,CACjB,CACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAGM,kDAAmB;AAD5B,kBAAe,mBAAmB,CAAC"}
@@ -1,5 +0,0 @@
1
- interface DataDragAndDropContextType {
2
- inputMethod: "mouse" | "keyboard" | null;
3
- }
4
- export declare const DataDragAndDropContext: import("react").Context<DataDragAndDropContextType | undefined>;
5
- export {};
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataDragAndDropContext = void 0;
4
- const react_1 = require("react");
5
- exports.DataDragAndDropContext = (0, react_1.createContext)(undefined);
6
- //# sourceMappingURL=DataDragAndDrop.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDrop.context.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDrop.context.tsx"],"names":[],"mappings":";;;AAAA,iCAAsC;AAQzB,QAAA,sBAAsB,GAAG,IAAA,qBAAa,EAEjD,SAAS,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import DataDragAndDropItem, { DataDragAndDropItemProps } from "../item/DataDragAndDropItem";
3
- interface DataDragAndDropProps extends React.HTMLAttributes<HTMLDivElement> {
4
- children: any[];
5
- setItems: React.Dispatch<React.SetStateAction<any[]>>;
6
- }
7
- interface DataDragAndDropRootComponent extends React.ForwardRefExoticComponent<DataDragAndDropProps & React.RefAttributes<HTMLDivElement>> {
8
- /**
9
- * @see 🏷️ {@link DataDragAndDropItemProps}
10
- * * @example
11
- * ```jsx
12
- * <DragAndDrop>
13
- * <DragAndDrop.Item id="1" index={0}>
14
- * ...
15
- * </DragAndDrop.Item>
16
- * </DragAndDrop>
17
- * ```
18
- */
19
- Item: typeof DataDragAndDropItem;
20
- }
21
- declare const DataDragAndDrop: DataDragAndDropRootComponent;
22
- export { DataDragAndDrop, DataDragAndDropItem };
23
- export default DataDragAndDrop;
24
- export type { DataDragAndDropItemProps, DataDragAndDropProps };
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropRoot.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDropRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAC/D,sDAAqD;AACrD,+CAA0D;AAC1D,qDAAmD;AACnD,sFAEqC;AAuFX,8BAzFnB,6BAAmB,CAyFmB;AAtF7C,uEAAmE;AAwBnE,MAAM,eAAe,GAAG,IAAA,kBAAU,EAChC,CAAC,EAA+B,EAAE,YAAY,EAAE,EAAE;QAAjD,EAAE,QAAQ,EAAE,QAAQ,OAAW,EAAN,IAAI,cAA7B,wBAA+B,CAAF;IAC5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,eAAK,CAAC,QAAQ,CAElD,I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MAAM,CAAC,KAAK,CAAC,CAAC;YAClD,CAAC;YAED,8BAAC,cAAM,IAAC,OAAO,QAAC,GAAG,EAAC,UAAU;gBAC5B,uDAAS,IAAI,IAAE,GAAG,EAAE,YAAY,KAC7B,QAAQ,CACL,CACC;YACT,8BAAC,mBAAW,IAAC,aAAa,EAAE,IAAI,IAC7B,CAAC,MAAM,EAAE,EAAE;gBACV,8DAA8D;gBAC9D,IAAI,WAAW,KAAK,UAAU;oBAAE,OAAO,IAAI,CAAC;gBAC5C,IAAI,CAAC,IAAA,qBAAU,EAAC,MAAM,CAAC;oBAAE,OAAO,IAAI,CAAC;gBACrC,IAAI,IAAA,sBAAc,EAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;oBAClD,OAAO,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;gBACvC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CACW,CACG,CACa,CACnC,CAAC;AACJ,CAAC,CAC8B,CAAC;AAIzB,0CAAe;AAFxB,eAAe,CAAC,IAAI,GAAG,6BAAmB,CAAC;AAG3C,kBAAe,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropDragHandler.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAmBvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,UAAU,CAGxD,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE;IACzC,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,CACL,6BAAK,SAAS,EAAC,6CAA6C;YACzD,gBAAgB,IAAI,CACnB,8BACE,SAAS,EAAC,+CAA+C,oBAC1C,IAAI;gBAEnB,oBAAC,qBAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CAClD,CACR;YACD,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,oBAAC,gBAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE;YACL,gBAAgB,IAAI,CACnB,8BACE,SAAS,EAAC,+CAA+C,oBAC1C,MAAM;gBAErB,oBAAC,uBAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACpD,CACR,CACG,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,QAAQ;QACN,gBAAgB,IAAI,CACnB,oBAAC,QAAQ,CAAC,OAAO,IACf,IAAI,EAAC,KAAK,EACV,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,oBAAC,qBAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACtC,CACpB;QACD,oBAAC,QAAQ,CAAC,MAAM,IAAC,OAAO;YACtB,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,oBAAC,gBAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE,CACU;QACjB,gBAAgB,IAAI,CACnB,oBAAC,QAAQ,CAAC,OAAO,IACf,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,oBAAC,uBAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACxC,CACpB,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- interface DataDragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
4
- /**
5
- * Unique id
6
- */
7
- id: string;
8
- /**
9
- * Index of the item being dragged
10
- */
11
- index: number;
12
- }
13
- /**
14
- * TODO
15
- *
16
- * @see 🏷️ {@link DataDragAndDropItemProps}
17
- * @example
18
- * ```tsx
19
- * <DragAndDrop.Item numOfSelectedRows={selectedRows.length} onClear={handleClear}>
20
- * TODO
21
- * </DragAndDrop.Item>
22
- * ```
23
- */
24
- declare const DataDragAndDropItem: React.ForwardRefExoticComponent<DataDragAndDropItemProps & React.RefAttributes<HTMLDivElement>>;
25
- export default DataDragAndDropItem;
26
- export { DataDragAndDropItem };
27
- export type { DataDragAndDropItemProps };
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropItem.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/item/DataDragAndDropItem.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAczE;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAG1C,CAAC,EAA2C,EAAE,YAAY,EAAE,EAAE;QAA7D,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,OAAW,EAAN,IAAI,cAAzC,wCAA2C,CAAF;IAC1C,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC;QACpD,EAAE;QACF,KAAK;QACL,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,UAAU,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,OAAO,CAAC;IACrE,MAAM,eAAe,GAAG,YAAY,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,OAAO,CAAC;IACzE,MAAM,gBAAgB,GAAG,UAAU,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,UAAU,CAAC;IAE3E,OAAO,CACL,oBAAC,MAAM,IAAC,GAAG,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO;QAEvD,2CACE,GAAG,EAAE,SAAS,IACV,IAAI,IACR,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,mBACjD,UAAU,yBACJ,aAAa,4BACV,gBAAgB,sBACtB,eAAe,EACjC,QAAQ,EAAE,CAAC,CAAC;YAEZ,oBAAC,0BAA0B,IACzB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,SACH;YACF,iCAAM,QAAQ,CAAO,CACjB,CACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- interface DataDragAndDropContextType {
2
- inputMethod: "mouse" | "keyboard" | null;
3
- }
4
- export declare const DataDragAndDropContext: import("react").Context<DataDragAndDropContextType | undefined>;
5
- export {};
@@ -1,3 +0,0 @@
1
- import { createContext } from "react";
2
- export const DataDragAndDropContext = createContext(undefined);
3
- //# sourceMappingURL=DataDragAndDrop.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDrop.context.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDrop.context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAEjD,SAAS,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import DataDragAndDropItem, { DataDragAndDropItemProps } from "../item/DataDragAndDropItem.js";
3
- interface DataDragAndDropProps extends React.HTMLAttributes<HTMLDivElement> {
4
- children: any[];
5
- setItems: React.Dispatch<React.SetStateAction<any[]>>;
6
- }
7
- interface DataDragAndDropRootComponent extends React.ForwardRefExoticComponent<DataDragAndDropProps & React.RefAttributes<HTMLDivElement>> {
8
- /**
9
- * @see 🏷️ {@link DataDragAndDropItemProps}
10
- * * @example
11
- * ```jsx
12
- * <DragAndDrop>
13
- * <DragAndDrop.Item id="1" index={0}>
14
- * ...
15
- * </DragAndDrop.Item>
16
- * </DragAndDrop>
17
- * ```
18
- */
19
- Item: typeof DataDragAndDropItem;
20
- }
21
- declare const DataDragAndDrop: DataDragAndDropRootComponent;
22
- export { DataDragAndDrop, DataDragAndDropItem };
23
- export default DataDragAndDrop;
24
- export type { DataDragAndDropItemProps, DataDragAndDropProps };
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataDragAndDropRoot.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDropRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC1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