@cloudscape-design/components 3.0.1307 → 3.0.1309
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.
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +4 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +4 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +3 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +1 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +12 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +29 -16
- package/badge/styles.selectors.js +10 -10
- package/collection-preferences/content-display/content-display-option.js +1 -1
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts +3 -7
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +63 -27
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/utils.d.ts +41 -2
- package/collection-preferences/content-display/utils.d.ts.map +1 -1
- package/collection-preferences/content-display/utils.js +107 -13
- package/collection-preferences/content-display/utils.js.map +1 -1
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +2 -2
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/interfaces.d.ts +30 -2
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/collection-preferences/styles.css.js +38 -36
- package/collection-preferences/styles.scoped.css +81 -37
- package/collection-preferences/styles.selectors.js +38 -36
- package/collection-preferences/utils.d.ts +1 -0
- package/collection-preferences/utils.d.ts.map +1 -1
- package/collection-preferences/utils.js +14 -0
- package/collection-preferences/utils.js.map +1 -1
- package/expandable-section/styles.css.js +35 -35
- package/expandable-section/styles.scoped.css +68 -68
- package/expandable-section/styles.selectors.js +35 -35
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages-types.d.ts +4 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/icon/internal.js +2 -2
- package/icon/internal.js.map +1 -1
- package/icon/styles.css.js +41 -39
- package/icon/styles.scoped.css +104 -85
- package/icon/styles.selectors.js +41 -39
- package/internal/base-component/styles.scoped.css +35 -3
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +23 -1
- package/internal/generated/styles/tokens.js +23 -1
- package/internal/generated/theming/index.cjs +476 -4
- package/internal/generated/theming/index.cjs.d.ts +216 -0
- package/internal/generated/theming/index.d.ts +216 -0
- package/internal/generated/theming/index.js +476 -4
- package/internal/hooks/use-width-change/index.d.ts +12 -0
- package/internal/hooks/use-width-change/index.d.ts.map +1 -0
- package/internal/hooks/use-width-change/index.js +33 -0
- package/internal/hooks/use-width-change/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +4 -1
- package/pagination/internal.js.map +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +9 -2
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/tokens/use-token-mode.d.ts.map +1 -1
- package/prompt-input/tokens/use-token-mode.js +0 -9
- package/prompt-input/tokens/use-token-mode.js.map +1 -1
- package/table/column-groups/col-group.d.ts +12 -0
- package/table/column-groups/col-group.d.ts.map +1 -0
- package/table/column-groups/col-group.js +24 -0
- package/table/column-groups/col-group.js.map +1 -0
- package/table/column-groups/split-utils.d.ts +31 -0
- package/table/column-groups/split-utils.d.ts.map +1 -0
- package/table/column-groups/split-utils.js +43 -0
- package/table/column-groups/split-utils.js.map +1 -0
- package/table/column-groups/use-column-groups.d.ts +7 -0
- package/table/column-groups/use-column-groups.d.ts.map +1 -0
- package/table/column-groups/use-column-groups.js +23 -0
- package/table/column-groups/use-column-groups.js.map +1 -0
- package/table/column-groups/utils.d.ts +54 -0
- package/table/column-groups/utils.d.ts.map +1 -0
- package/table/column-groups/utils.js +204 -0
- package/table/column-groups/utils.js.map +1 -0
- package/table/header-cell/common-props.d.ts +23 -0
- package/table/header-cell/common-props.d.ts.map +1 -0
- package/table/header-cell/common-props.js +4 -0
- package/table/header-cell/common-props.js.map +1 -0
- package/table/header-cell/group-header-cell.d.ts +45 -0
- package/table/header-cell/group-header-cell.d.ts.map +1 -0
- package/table/header-cell/group-header-cell.js +44 -0
- package/table/header-cell/group-header-cell.js.map +1 -0
- package/table/header-cell/index.d.ts +12 -22
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +3 -3
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +33 -30
- package/table/header-cell/styles.scoped.css +92 -68
- package/table/header-cell/styles.selectors.js +33 -30
- package/table/header-cell/th-element.d.ts +16 -0
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js +6 -4
- package/table/header-cell/th-element.js.map +1 -1
- package/table/index.d.ts.map +1 -1
- package/table/index.js +5 -2
- package/table/index.js.map +1 -1
- package/table/interfaces.d.ts +37 -1
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +17 -5
- package/table/internal.js.map +1 -1
- package/table/resizer/index.d.ts +9 -2
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +5 -5
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/styles.css.js +16 -13
- package/table/resizer/styles.scoped.css +36 -26
- package/table/resizer/styles.selectors.js +16 -13
- package/table/sticky-header.d.ts +3 -0
- package/table/sticky-header.d.ts.map +1 -1
- package/table/sticky-header.js +7 -2
- package/table/sticky-header.js.map +1 -1
- package/table/sticky-scrolling.d.ts.map +1 -1
- package/table/sticky-scrolling.js +6 -1
- package/table/sticky-scrolling.js.map +1 -1
- package/table/styles.css.js +35 -34
- package/table/styles.scoped.css +47 -41
- package/table/styles.selectors.js +35 -34
- package/table/table-role/grid-navigation.d.ts.map +1 -1
- package/table/table-role/grid-navigation.js +5 -7
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/table-role/table-role-helper.d.ts +3 -0
- package/table/table-role/table-role-helper.d.ts.map +1 -1
- package/table/table-role/table-role-helper.js +9 -4
- package/table/table-role/table-role-helper.js.map +1 -1
- package/table/table-role/utils.d.ts +19 -0
- package/table/table-role/utils.d.ts.map +1 -1
- package/table/table-role/utils.js +86 -7
- package/table/table-role/utils.js.map +1 -1
- package/table/thead.d.ts +5 -0
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +145 -18
- package/table/thead.js.map +1 -1
- package/table/use-column-widths.d.ts +4 -0
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +68 -18
- package/table/use-column-widths.js.map +1 -1
- package/table/use-sticky-header.d.ts.map +1 -1
- package/table/use-sticky-header.js +4 -1
- package/table/use-sticky-header.js.map +1 -1
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +14 -4
- package/table/utils.js.map +1 -1
- package/test-utils/dom/collection-preferences/content-display-preference.d.ts +28 -2
- package/test-utils/dom/collection-preferences/content-display-preference.js +60 -2
- package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -1
- package/test-utils/dom/table/index.d.ts +18 -1
- package/test-utils/dom/table/index.js +22 -3
- package/test-utils/dom/table/index.js.map +1 -1
- package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +28 -2
- package/test-utils/selectors/collection-preferences/content-display-preference.js +52 -2
- package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -1
- package/test-utils/selectors/table/index.d.ts +18 -1
- package/test-utils/selectors/table/index.js +22 -3
- package/test-utils/selectors/table/index.js.map +1 -1
- package/wizard/wizard-step-list.js +4 -4
- package/wizard/wizard-step-list.js.map +1 -1
|
@@ -13,5 +13,24 @@ export declare function findTableRowByAriaRowIndex(table: null | HTMLTableElemen
|
|
|
13
13
|
* Finds the closest column to the targetAriaColIndex+delta in the direction of delta.
|
|
14
14
|
*/
|
|
15
15
|
export declare function findTableRowCellByAriaColIndex(tableRow: HTMLTableRowElement, targetAriaColIndex: number, delta: number): HTMLTableCellElement | null;
|
|
16
|
+
/**
|
|
17
|
+
* Collects all cells visually present in a row, including cells from earlier rows
|
|
18
|
+
* that span into this row via rowspan. This is needed because cells with rowspan > 1
|
|
19
|
+
* are only in one <tr> in the DOM but visually occupy multiple rows.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAllCellsInRow(table: HTMLTableElement, targetAriaRowIndex: number): HTMLTableCellElement[];
|
|
22
|
+
/**
|
|
23
|
+
* From a list of cell elements, find the closest one to targetAriaColIndex in the direction of delta.
|
|
24
|
+
* Accounts for colspan: a cell with colindex=2 and colspan=4 covers columns 2,3,4,5.
|
|
25
|
+
*/
|
|
26
|
+
export declare function findClosestCellByAriaColIndex(cellElements: HTMLTableCellElement[], targetAriaColIndex: number, delta: number): HTMLTableCellElement | null;
|
|
27
|
+
/**
|
|
28
|
+
* Finds the next cell to navigate to, handling colspan and rowspan for grouped columns.
|
|
29
|
+
* Skips past the current cell when movement lands on it due to span attributes.
|
|
30
|
+
*/
|
|
31
|
+
export declare function findNextCell(table: HTMLTableElement, targetRow: HTMLTableRowElement, targetAriaColIndex: number, delta: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
}, currentCell: HTMLTableCellElement | null): HTMLTableCellElement | null;
|
|
16
35
|
export declare function isTableCell(element: Element): boolean;
|
|
17
36
|
export declare function focusNextElement(element: null | HTMLElement): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/table/table-role/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GACV,IAAI,GAAG,oBAAoB,CAC/D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,WAKrD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,WAgBlD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,IAAI,GAAG,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAqBnH;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,mBAAmB,EAC7B,kBAAkB,EAAE,MAAM,EAC1B,KAAK,EAAE,MAAM,+
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/table/table-role/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GACV,IAAI,GAAG,oBAAoB,CAC/D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,WAKrD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,WAgBlD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,IAAI,GAAG,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAqBnH;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,mBAAmB,EAC7B,kBAAkB,EAAE,MAAM,EAC1B,KAAK,EAAE,MAAM,+BAMd;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAqB5G;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,oBAAoB,EAAE,EACpC,kBAAkB,EAAE,MAAM,EAC1B,KAAK,EAAE,MAAM,GACZ,oBAAoB,GAAG,IAAI,CAgC7B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,gBAAgB,EACvB,SAAS,EAAE,mBAAmB,EAC9B,kBAAkB,EAAE,MAAM,EAC1B,KAAK,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC/B,WAAW,EAAE,oBAAoB,GAAG,IAAI,GACvC,oBAAoB,GAAG,IAAI,CAgC7B;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,WAE3C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,GAAG,WAAW,QAW3D"}
|
|
@@ -57,18 +57,62 @@ export function findTableRowByAriaRowIndex(table, targetAriaRowIndex, delta) {
|
|
|
57
57
|
* Finds the closest column to the targetAriaColIndex+delta in the direction of delta.
|
|
58
58
|
*/
|
|
59
59
|
export function findTableRowCellByAriaColIndex(tableRow, targetAriaColIndex, delta) {
|
|
60
|
+
const cellElements = Array.from(tableRow.querySelectorAll('td[aria-colindex],th[aria-colindex]'));
|
|
61
|
+
return findClosestCellByAriaColIndex(cellElements, targetAriaColIndex, delta);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Collects all cells visually present in a row, including cells from earlier rows
|
|
65
|
+
* that span into this row via rowspan. This is needed because cells with rowspan > 1
|
|
66
|
+
* are only in one <tr> in the DOM but visually occupy multiple rows.
|
|
67
|
+
*/
|
|
68
|
+
export function getAllCellsInRow(table, targetAriaRowIndex) {
|
|
60
69
|
var _a;
|
|
70
|
+
const cells = [];
|
|
71
|
+
const rows = table.querySelectorAll('tr[aria-rowindex]');
|
|
72
|
+
for (const row of Array.from(rows)) {
|
|
73
|
+
const rowIndex = parseInt((_a = row.getAttribute('aria-rowindex')) !== null && _a !== void 0 ? _a : '');
|
|
74
|
+
if (isNaN(rowIndex) || rowIndex > targetAriaRowIndex) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const rowCells = row.querySelectorAll('td[aria-colindex],th[aria-colindex]');
|
|
78
|
+
for (const cell of Array.from(rowCells)) {
|
|
79
|
+
const rowspan = cell.rowSpan || 1;
|
|
80
|
+
// Cell is visible in target row if: rowIndex <= targetAriaRowIndex < rowIndex + rowspan
|
|
81
|
+
if (rowIndex + rowspan > targetAriaRowIndex) {
|
|
82
|
+
cells.push(cell);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return cells;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* From a list of cell elements, find the closest one to targetAriaColIndex in the direction of delta.
|
|
90
|
+
* Accounts for colspan: a cell with colindex=2 and colspan=4 covers columns 2,3,4,5.
|
|
91
|
+
*/
|
|
92
|
+
export function findClosestCellByAriaColIndex(cellElements, targetAriaColIndex, delta) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
// First check if any cell's colspan range covers the target exactly.
|
|
95
|
+
for (const element of cellElements) {
|
|
96
|
+
const colIndex = parseInt((_a = element.getAttribute('aria-colindex')) !== null && _a !== void 0 ? _a : '');
|
|
97
|
+
const colspan = element.colSpan || 1;
|
|
98
|
+
if (colIndex <= targetAriaColIndex && targetAriaColIndex < colIndex + colspan) {
|
|
99
|
+
return element;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Otherwise find the closest cell in the direction of delta.
|
|
61
103
|
let targetCell = null;
|
|
62
|
-
const
|
|
104
|
+
const sorted = [...cellElements].sort((a, b) => {
|
|
105
|
+
var _a, _b;
|
|
106
|
+
const aIdx = parseInt((_a = a.getAttribute('aria-colindex')) !== null && _a !== void 0 ? _a : '0');
|
|
107
|
+
const bIdx = parseInt((_b = b.getAttribute('aria-colindex')) !== null && _b !== void 0 ? _b : '0');
|
|
108
|
+
return aIdx - bIdx;
|
|
109
|
+
});
|
|
63
110
|
if (delta < 0) {
|
|
64
|
-
|
|
111
|
+
sorted.reverse();
|
|
65
112
|
}
|
|
66
|
-
for (const element of
|
|
67
|
-
const columnIndex = parseInt((
|
|
113
|
+
for (const element of sorted) {
|
|
114
|
+
const columnIndex = parseInt((_b = element.getAttribute('aria-colindex')) !== null && _b !== void 0 ? _b : '');
|
|
68
115
|
targetCell = element;
|
|
69
|
-
if (columnIndex === targetAriaColIndex) {
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
116
|
if (delta >= 0 && columnIndex > targetAriaColIndex) {
|
|
73
117
|
break;
|
|
74
118
|
}
|
|
@@ -78,6 +122,41 @@ export function findTableRowCellByAriaColIndex(tableRow, targetAriaColIndex, del
|
|
|
78
122
|
}
|
|
79
123
|
return targetCell;
|
|
80
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Finds the next cell to navigate to, handling colspan and rowspan for grouped columns.
|
|
127
|
+
* Skips past the current cell when movement lands on it due to span attributes.
|
|
128
|
+
*/
|
|
129
|
+
export function findNextCell(table, targetRow, targetAriaColIndex, delta, currentCell) {
|
|
130
|
+
var _a, _b, _c, _d;
|
|
131
|
+
const targetRowAriaIndex = parseInt((_a = targetRow.getAttribute('aria-rowindex')) !== null && _a !== void 0 ? _a : '');
|
|
132
|
+
let allVisibleCells = getAllCellsInRow(table, targetRowAriaIndex);
|
|
133
|
+
let targetCell = findClosestCellByAriaColIndex(allVisibleCells, targetAriaColIndex, delta.x);
|
|
134
|
+
// When vertical movement lands on the same cell (due to rowspan), skip past it.
|
|
135
|
+
if (targetCell === currentCell && delta.y !== 0 && currentCell) {
|
|
136
|
+
const cellRow = currentCell.closest('tr');
|
|
137
|
+
const cellRowIndex = parseInt((_b = cellRow === null || cellRow === void 0 ? void 0 : cellRow.getAttribute('aria-rowindex')) !== null && _b !== void 0 ? _b : '0');
|
|
138
|
+
const cellRowSpan = currentCell.rowSpan || 1;
|
|
139
|
+
const skipToRowIndex = delta.y > 0 ? cellRowIndex + cellRowSpan : cellRowIndex - 1;
|
|
140
|
+
const skipRow = findTableRowByAriaRowIndex(table, skipToRowIndex, delta.y);
|
|
141
|
+
if (!skipRow) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
const skipRowAriaIndex = parseInt((_c = skipRow.getAttribute('aria-rowindex')) !== null && _c !== void 0 ? _c : '');
|
|
145
|
+
allVisibleCells = getAllCellsInRow(table, skipRowAriaIndex);
|
|
146
|
+
targetCell = findClosestCellByAriaColIndex(allVisibleCells, targetAriaColIndex, delta.x);
|
|
147
|
+
}
|
|
148
|
+
// When horizontal movement lands on the same cell (due to colspan), skip past it.
|
|
149
|
+
if (targetCell === currentCell && delta.x !== 0 && currentCell) {
|
|
150
|
+
const cellColIndex = parseInt((_d = currentCell.getAttribute('aria-colindex')) !== null && _d !== void 0 ? _d : '0');
|
|
151
|
+
const cellColSpan = currentCell.colSpan || 1;
|
|
152
|
+
const skipToColIndex = delta.x > 0 ? cellColIndex + cellColSpan : cellColIndex - 1;
|
|
153
|
+
targetCell = findClosestCellByAriaColIndex(allVisibleCells, skipToColIndex, delta.x);
|
|
154
|
+
if (!targetCell || targetCell === currentCell) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return targetCell;
|
|
159
|
+
}
|
|
81
160
|
export function isTableCell(element) {
|
|
82
161
|
return element.tagName === 'TD' || element.tagName === 'TH';
|
|
83
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/table/table-role/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAgC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAoB;IACpD,IAAI,OAAO,YAAY,gBAAgB,IAAI,OAAO,YAAY,iBAAiB,EAAE,CAAC;QAChF,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,IAAI,OAAO,GAAmB,MAAM,CAAC;IACrC,OAAO,OAAO,EAAE,CAAC;QACf,0GAA0G;QAC1G,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IACE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ;YACzC,OAAO,CAAC,YAAY,CAAC,sCAAsC,CAAC,KAAK,MAAM,EACvE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAClC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAA8B,EAAE,kBAA0B,EAAE,KAAa;;IAClH,IAAI,SAAS,GAA+B,IAAI,CAAC;IACjD,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI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R,CAAC;QACD,IAAI,KAAK,IAAI,CAAC,IAAI,WAAW,GAAG,kBAAkB,EAAE,CAAC;YACnD,MAAM;QACR,CAAC;QACD,IAAI,KAAK,GAAG,CAAC,IAAI,WAAW,GAAG,kBAAkB,EAAE,CAAC;YAClD,MAAM;QACR,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO,OAAO,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAA2B;IAC1D,IAAI,OAAO,EAAE,CAAC;QACZ,4FAA4F;QAC5F,4FAA4F;QAC5F,kEAAkE;QAClE,+GAA+G;QAC/G,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function getClosestCell(element: Element) {\n return element.closest('td,th') as null | HTMLTableCellElement;\n}\n\nexport function isElementDisabled(element: HTMLElement) {\n if (element instanceof HTMLInputElement || element instanceof HTMLButtonElement) {\n return element.disabled;\n }\n return false;\n}\n\n/**\n * Returns true if the target element or one of its parents is a dialog or is marked with data-awsui-table-suppress-navigation attribute.\n * This is used to suppress navigation for interactive content without a need to use a custom suppression check.\n */\nexport function defaultIsSuppressed(target: Element) {\n let current: null | Element = target;\n while (current) {\n // Stop checking for parents upon reaching the cell element as the function only aims at the cell content.\n if (isTableCell(current)) {\n return false;\n }\n if (\n current.getAttribute('role') === 'dialog' ||\n current.getAttribute('data-awsui-table-suppress-navigation') === 'true'\n ) {\n return true;\n }\n current = current.parentElement;\n }\n return false;\n}\n\n/**\n * Finds the closest row to the targetAriaRowIndex+delta in the direction of delta.\n */\nexport function findTableRowByAriaRowIndex(table: null | HTMLTableElement, targetAriaRowIndex: number, delta: number) {\n let targetRow: null | HTMLTableRowElement = null;\n const rowElements = Array.from(table?.querySelectorAll('tr[aria-rowindex]') ?? []);\n if (delta < 0) {\n rowElements.reverse();\n }\n for (const element of rowElements) {\n const rowIndex = parseInt(element.getAttribute('aria-rowindex') ?? '');\n targetRow = element as HTMLTableRowElement;\n\n if (rowIndex === targetAriaRowIndex) {\n break;\n }\n if (delta >= 0 && rowIndex > targetAriaRowIndex) {\n break;\n }\n if (delta < 0 && rowIndex < targetAriaRowIndex) {\n break;\n }\n }\n return targetRow;\n}\n\n/**\n * Finds the closest column to the targetAriaColIndex+delta in the direction of delta.\n */\nexport function findTableRowCellByAriaColIndex(\n tableRow: HTMLTableRowElement,\n targetAriaColIndex: number,\n delta: number\n) {\n let targetCell: null | HTMLTableCellElement = null;\n const cellElements = Array.from(tableRow.querySelectorAll('td[aria-colindex],th[aria-colindex]'));\n if (delta < 0) {\n cellElements.reverse();\n }\n for (const element of cellElements) {\n const columnIndex = parseInt(element.getAttribute('aria-colindex') ?? '');\n targetCell = element as HTMLTableCellElement;\n\n if (columnIndex === targetAriaColIndex) {\n break;\n }\n if (delta >= 0 && columnIndex > targetAriaColIndex) {\n break;\n }\n if (delta < 0 && columnIndex < targetAriaColIndex) {\n break;\n }\n }\n return targetCell;\n}\n\nexport function isTableCell(element: Element) {\n return element.tagName === 'TD' || element.tagName === 'TH';\n}\n\nexport function focusNextElement(element: null | HTMLElement) {\n if (element) {\n // Table cells are not focusable by default (tabIndex=undefined) so cell.focus() is ignored.\n // To force focusing we have to imperatively set tabIndex to -1. This tabIndex is then to be\n // overridden by the single tab stop context to be 0 or undefined.\n // We cannot make cells have tabIndex=-1 by default due to an associated bug with text selection, see: PR 2158.\n if (isTableCell(element) && element.tabIndex !== 0) {\n element.tabIndex = -1;\n }\n element.focus();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/table/table-role/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAgC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAoB;IACpD,IAAI,OAAO,YAAY,gBAAgB,IAAI,OAAO,YAAY,iBAAiB,EAAE,CAAC;QAChF,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,IAAI,OAAO,GAAmB,MAAM,CAAC;IACrC,OAAO,OAAO,EAAE,CAAC;QACf,0GAA0G;QAC1G,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IACE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ;YACzC,OAAO,CAAC,YAAY,CAAC,sCAAsC,CAAC,KAAK,MAAM,EACvE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAClC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAA8B,EAAE,kBAA0B,EAAE,KAAa;;IAClH,IAAI,SAAS,GAA+B,IAAI,CAAC;IACjD,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,gBAAgB,CAAC,mBAAmB,CAAC,mCAAI,EAAE,CAAC,CAAC;IACnF,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACd,WAAW,CAAC,OA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AAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO,OAAO,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAA2B;IAC1D,IAAI,OAAO,EAAE,CAAC;QACZ,4FAA4F;QAC5F,4FAA4F;QAC5F,kEAAkE;QAClE,+GAA+G;QAC/G,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function getClosestCell(element: Element) {\n return element.closest('td,th') as null | HTMLTableCellElement;\n}\n\nexport function isElementDisabled(element: HTMLElement) {\n if (element instanceof HTMLInputElement || element instanceof HTMLButtonElement) {\n return element.disabled;\n }\n return false;\n}\n\n/**\n * Returns true if the target element or one of its parents is a dialog or is marked with data-awsui-table-suppress-navigation attribute.\n * This is used to suppress navigation for interactive content without a need to use a custom suppression check.\n */\nexport function defaultIsSuppressed(target: Element) {\n let current: null | Element = target;\n while (current) {\n // Stop checking for parents upon reaching the cell element as the function only aims at the cell content.\n if (isTableCell(current)) {\n return false;\n }\n if (\n current.getAttribute('role') === 'dialog' ||\n current.getAttribute('data-awsui-table-suppress-navigation') === 'true'\n ) {\n return true;\n }\n current = current.parentElement;\n }\n return false;\n}\n\n/**\n * Finds the closest row to the targetAriaRowIndex+delta in the direction of delta.\n */\nexport function findTableRowByAriaRowIndex(table: null | HTMLTableElement, targetAriaRowIndex: number, delta: number) {\n let targetRow: null | HTMLTableRowElement = null;\n const rowElements = Array.from(table?.querySelectorAll('tr[aria-rowindex]') ?? []);\n if (delta < 0) {\n rowElements.reverse();\n }\n for (const element of rowElements) {\n const rowIndex = parseInt(element.getAttribute('aria-rowindex') ?? '');\n targetRow = element as HTMLTableRowElement;\n\n if (rowIndex === targetAriaRowIndex) {\n break;\n }\n if (delta >= 0 && rowIndex > targetAriaRowIndex) {\n break;\n }\n if (delta < 0 && rowIndex < targetAriaRowIndex) {\n break;\n }\n }\n return targetRow;\n}\n\n/**\n * Finds the closest column to the targetAriaColIndex+delta in the direction of delta.\n */\nexport function findTableRowCellByAriaColIndex(\n tableRow: HTMLTableRowElement,\n targetAriaColIndex: number,\n delta: number\n) {\n const cellElements = Array.from(\n tableRow.querySelectorAll<HTMLTableCellElement>('td[aria-colindex],th[aria-colindex]')\n );\n return findClosestCellByAriaColIndex(cellElements, targetAriaColIndex, delta);\n}\n\n/**\n * Collects all cells visually present in a row, including cells from earlier rows\n * that span into this row via rowspan. This is needed because cells with rowspan > 1\n * are only in one <tr> in the DOM but visually occupy multiple rows.\n */\nexport function getAllCellsInRow(table: HTMLTableElement, targetAriaRowIndex: number): HTMLTableCellElement[] {\n const cells: HTMLTableCellElement[] = [];\n const rows = table.querySelectorAll<HTMLTableRowElement>('tr[aria-rowindex]');\n\n for (const row of Array.from(rows)) {\n const rowIndex = parseInt(row.getAttribute('aria-rowindex') ?? '');\n if (isNaN(rowIndex) || rowIndex > targetAriaRowIndex) {\n continue;\n }\n\n const rowCells = row.querySelectorAll<HTMLTableCellElement>('td[aria-colindex],th[aria-colindex]');\n for (const cell of Array.from(rowCells)) {\n const rowspan = cell.rowSpan || 1;\n // Cell is visible in target row if: rowIndex <= targetAriaRowIndex < rowIndex + rowspan\n if (rowIndex + rowspan > targetAriaRowIndex) {\n cells.push(cell);\n }\n }\n }\n\n return cells;\n}\n\n/**\n * From a list of cell elements, find the closest one to targetAriaColIndex in the direction of delta.\n * Accounts for colspan: a cell with colindex=2 and colspan=4 covers columns 2,3,4,5.\n */\nexport function findClosestCellByAriaColIndex(\n cellElements: HTMLTableCellElement[],\n targetAriaColIndex: number,\n delta: number\n): HTMLTableCellElement | null {\n // First check if any cell's colspan range covers the target exactly.\n for (const element of cellElements) {\n const colIndex = parseInt(element.getAttribute('aria-colindex') ?? '');\n const colspan = element.colSpan || 1;\n if (colIndex <= targetAriaColIndex && targetAriaColIndex < colIndex + colspan) {\n return element;\n }\n }\n\n // Otherwise find the closest cell in the direction of delta.\n let targetCell: null | HTMLTableCellElement = null;\n const sorted = [...cellElements].sort((a, b) => {\n const aIdx = parseInt(a.getAttribute('aria-colindex') ?? '0');\n const bIdx = parseInt(b.getAttribute('aria-colindex') ?? '0');\n return aIdx - bIdx;\n });\n if (delta < 0) {\n sorted.reverse();\n }\n for (const element of sorted) {\n const columnIndex = parseInt(element.getAttribute('aria-colindex') ?? '');\n targetCell = element;\n\n if (delta >= 0 && columnIndex > targetAriaColIndex) {\n break;\n }\n if (delta < 0 && columnIndex < targetAriaColIndex) {\n break;\n }\n }\n return targetCell;\n}\n\n/**\n * Finds the next cell to navigate to, handling colspan and rowspan for grouped columns.\n * Skips past the current cell when movement lands on it due to span attributes.\n */\nexport function findNextCell(\n table: HTMLTableElement,\n targetRow: HTMLTableRowElement,\n targetAriaColIndex: number,\n delta: { x: number; y: number },\n currentCell: HTMLTableCellElement | null\n): HTMLTableCellElement | null {\n const targetRowAriaIndex = parseInt(targetRow.getAttribute('aria-rowindex') ?? '');\n let allVisibleCells = getAllCellsInRow(table, targetRowAriaIndex);\n let targetCell = findClosestCellByAriaColIndex(allVisibleCells, targetAriaColIndex, delta.x);\n\n // When vertical movement lands on the same cell (due to rowspan), skip past it.\n if (targetCell === currentCell && delta.y !== 0 && currentCell) {\n const cellRow = currentCell.closest('tr');\n const cellRowIndex = parseInt(cellRow?.getAttribute('aria-rowindex') ?? '0');\n const cellRowSpan = currentCell.rowSpan || 1;\n const skipToRowIndex = delta.y > 0 ? cellRowIndex + cellRowSpan : cellRowIndex - 1;\n const skipRow = findTableRowByAriaRowIndex(table, skipToRowIndex, delta.y);\n if (!skipRow) {\n return null;\n }\n const skipRowAriaIndex = parseInt(skipRow.getAttribute('aria-rowindex') ?? '');\n allVisibleCells = getAllCellsInRow(table, skipRowAriaIndex);\n targetCell = findClosestCellByAriaColIndex(allVisibleCells, targetAriaColIndex, delta.x);\n }\n\n // When horizontal movement lands on the same cell (due to colspan), skip past it.\n if (targetCell === currentCell && delta.x !== 0 && currentCell) {\n const cellColIndex = parseInt(currentCell.getAttribute('aria-colindex') ?? '0');\n const cellColSpan = currentCell.colSpan || 1;\n const skipToColIndex = delta.x > 0 ? cellColIndex + cellColSpan : cellColIndex - 1;\n targetCell = findClosestCellByAriaColIndex(allVisibleCells, skipToColIndex, delta.x);\n if (!targetCell || targetCell === currentCell) {\n return null;\n }\n }\n\n return targetCell;\n}\n\nexport function isTableCell(element: Element) {\n return element.tagName === 'TD' || element.tagName === 'TH';\n}\n\nexport function focusNextElement(element: null | HTMLElement) {\n if (element) {\n // Table cells are not focusable by default (tabIndex=undefined) so cell.focus() is ignored.\n // To force focusing we have to imperatively set tabIndex to -1. This tabIndex is then to be\n // overridden by the single tab stop context to be 0 or undefined.\n // We cannot make cells have tabIndex=-1 by default due to an associated bug with text selection, see: PR 2158.\n if (isTableCell(element) && element.tabIndex !== 0) {\n element.tabIndex = -1;\n }\n element.focus();\n }\n}\n"]}
|
package/table/thead.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NonCancelableEventHandler } from '../internal/events';
|
|
3
|
+
import { ColumnGroupsLayout } from './column-groups/utils';
|
|
3
4
|
import { InternalSelectionType, TableProps } from './interfaces';
|
|
4
5
|
import { ItemSelectionProps } from './selection';
|
|
5
6
|
import { StickyColumnsModel } from './sticky-columns';
|
|
@@ -7,6 +8,8 @@ import { TableRole } from './table-role';
|
|
|
7
8
|
export interface TheadProps {
|
|
8
9
|
selectionType: undefined | InternalSelectionType;
|
|
9
10
|
columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;
|
|
11
|
+
groupDefinitions?: ReadonlyArray<TableProps.GroupDefinition>;
|
|
12
|
+
columnGroupsLayout?: ColumnGroupsLayout<any>;
|
|
10
13
|
sortingColumn: TableProps.SortingColumn<any> | undefined;
|
|
11
14
|
sortingDescending: boolean | undefined;
|
|
12
15
|
sortingDisabled: boolean | undefined;
|
|
@@ -26,6 +29,8 @@ export interface TheadProps {
|
|
|
26
29
|
resizerTooltipText?: string;
|
|
27
30
|
stripedRows?: boolean;
|
|
28
31
|
stickyState: StickyColumnsModel;
|
|
32
|
+
stickyColumnsFirst: number;
|
|
33
|
+
stickyColumnsLast: number;
|
|
29
34
|
selectionColumnId: PropertyKey;
|
|
30
35
|
focusedComponent?: null | string;
|
|
31
36
|
onFocusedComponentChange?: (focusId: null | string) => void;
|
package/table/thead.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAgB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAA8B,SAAS,EAAE,MAAM,cAAc,CAAC;AAMrE,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,SAAS,GAAG,qBAAqB,CAAC;IACjD,iBAAiB,EAAE,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACzD,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC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AC,GAAG,SAAS,CAAC;IACtG,cAAc,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC9D,eAAe,EAAE,yBAAyB,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,kBAAkB,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,WAAW,CAAC;IAC/B,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACjC,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5D,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,QAAA,MAAM,KAAK,wFA2XV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/table/thead.js
CHANGED
|
@@ -4,15 +4,26 @@ import React from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { findUpUntil } from '@cloudscape-design/component-toolkit/dom';
|
|
6
6
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
7
|
+
import { getGroupColumnIds, getGroupSplit } from './column-groups/split-utils';
|
|
7
8
|
import { TableHeaderCell } from './header-cell';
|
|
9
|
+
import { TableGroupHeaderCell } from './header-cell/group-header-cell';
|
|
8
10
|
import { focusMarkers } from './selection';
|
|
9
11
|
import { TableHeaderSelectionCell } from './selection/selection-cell';
|
|
10
12
|
import { getTableHeaderRowRoleProps } from './table-role';
|
|
11
|
-
import { useColumnWidths } from './use-column-widths';
|
|
13
|
+
import { DEFAULT_COLUMN_WIDTH, useColumnWidths } from './use-column-widths';
|
|
12
14
|
import { getColumnKey } from './utils';
|
|
13
15
|
import styles from './styles.css.js';
|
|
14
|
-
const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefinitions, sortingColumn, sortingDisabled, sortingDescending, resizableColumns, variant, tableVariant, wrapLines, onFocusMove, onSortingChange, onResizeFinish, singleSelectionHeaderAriaLabel, stripedRows, sticky = false, hidden = false, stuck = false, stickyState, selectionColumnId, focusedComponent, onFocusedComponentChange, tableRole, resizerRoleDescription, resizerTooltipText, isExpandable, setLastUserAction, }, outerRef) => {
|
|
15
|
-
const { getColumnStyles, columnWidths, updateColumn, setCell } = useColumnWidths();
|
|
16
|
+
const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefinitions, columnGroupsLayout, sortingColumn, sortingDisabled, sortingDescending, resizableColumns, variant, tableVariant, wrapLines, onFocusMove, onSortingChange, onResizeFinish, singleSelectionHeaderAriaLabel, stripedRows, sticky = false, hidden = false, stuck = false, stickyState, stickyColumnsFirst, stickyColumnsLast, selectionColumnId, focusedComponent, onFocusedComponentChange, tableRole, resizerRoleDescription, resizerTooltipText, isExpandable, setLastUserAction, }, outerRef) => {
|
|
17
|
+
const { getColumnStyles, columnWidths, updateColumn, updateGroup, setCell } = useColumnWidths();
|
|
18
|
+
const handleSplitGroupResize = (columnIds, newWidth) => {
|
|
19
|
+
const lastColumn = columnIds[columnIds.length - 1];
|
|
20
|
+
if (lastColumn) {
|
|
21
|
+
const currentGroupWidth = columnIds.reduce((sum, id) => sum + (columnWidths.get(id) || DEFAULT_COLUMN_WIDTH), 0);
|
|
22
|
+
const delta = newWidth - currentGroupWidth;
|
|
23
|
+
const currentColumnWidth = columnWidths.get(lastColumn) || DEFAULT_COLUMN_WIDTH;
|
|
24
|
+
updateColumn(lastColumn, currentColumnWidth + delta);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
16
27
|
const commonCellProps = {
|
|
17
28
|
stuck,
|
|
18
29
|
sticky,
|
|
@@ -22,25 +33,141 @@ const Thead = React.forwardRef(({ selectionType, getSelectAllProps, columnDefini
|
|
|
22
33
|
variant,
|
|
23
34
|
tableVariant,
|
|
24
35
|
stickyState,
|
|
36
|
+
wrapLines,
|
|
37
|
+
};
|
|
38
|
+
const sharedTrProps = {
|
|
39
|
+
onFocus: (event) => {
|
|
40
|
+
var _a;
|
|
41
|
+
const focusControlElement = findUpUntil(event.target, element => !!element.getAttribute('data-focus-id'));
|
|
42
|
+
const focusId = (_a = focusControlElement === null || focusControlElement === void 0 ? void 0 : focusControlElement.getAttribute('data-focus-id')) !== null && _a !== void 0 ? _a : null;
|
|
43
|
+
onFocusedComponentChange === null || onFocusedComponentChange === void 0 ? void 0 : onFocusedComponentChange(focusId);
|
|
44
|
+
},
|
|
45
|
+
onBlur: () => onFocusedComponentChange === null || onFocusedComponentChange === void 0 ? void 0 : onFocusedComponentChange(null),
|
|
25
46
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
// No grouping - render single row
|
|
48
|
+
if (!columnGroupsLayout || columnGroupsLayout.rows.length <= 1) {
|
|
49
|
+
return (React.createElement("thead", { className: clsx(!hidden && styles['thead-active']) },
|
|
50
|
+
React.createElement("tr", { ...focusMarkers.all, ref: outerRef, "aria-rowindex": 1, ...getTableHeaderRowRoleProps({ tableRole }), ...sharedTrProps },
|
|
51
|
+
selectionType ? (React.createElement(TableHeaderSelectionCell, { ...commonCellProps, focusedComponent: focusedComponent, columnId: selectionColumnId, cellRef: node => setCell(sticky, selectionColumnId, node), getSelectAllProps: getSelectAllProps, onFocusMove: onFocusMove, singleSelectionHeaderAriaLabel: singleSelectionHeaderAriaLabel })) : null,
|
|
52
|
+
columnDefinitions.map((column, colIndex) => {
|
|
53
|
+
const columnId = getColumnKey(column, colIndex);
|
|
54
|
+
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(columnWidths), resizableColumns: resizableColumns, resizableStyle: getColumnStyles(sticky, columnId), onClick: detail => {
|
|
55
|
+
setLastUserAction('sorting');
|
|
56
|
+
fireNonCancelableEvent(onSortingChange, detail);
|
|
57
|
+
}, isEditable: !!column.editConfig, cellRef: node => setCell(sticky, columnId, node), tableRole: tableRole, resizerRoleDescription: resizerRoleDescription, resizerTooltipText: resizerTooltipText, isExpandable: colIndex === 0 && isExpandable, hasDynamicContent: hidden && !resizableColumns && column.hasDynamicContent, isLast: colIndex === columnDefinitions.length - 1 }));
|
|
58
|
+
}))));
|
|
59
|
+
}
|
|
60
|
+
// Grouped columns
|
|
61
|
+
const totalColumns = columnDefinitions.length;
|
|
62
|
+
return (React.createElement("thead", { className: clsx(!hidden && styles['thead-active']) }, columnGroupsLayout.rows.map((row, rowIndex) => (React.createElement("tr", { key: rowIndex, ...(rowIndex === 0 ? focusMarkers.all : {}), ref: rowIndex === 0 ? outerRef : undefined, "aria-rowindex": rowIndex + 1, "data-group-level": rowIndex, ...getTableHeaderRowRoleProps({ tableRole, rowIndex }), ...sharedTrProps },
|
|
63
|
+
selectionType && rowIndex === 0 ? (React.createElement(TableHeaderSelectionCell, { ...commonCellProps, focusedComponent: focusedComponent, columnId: selectionColumnId, cellRef: node => setCell(sticky, selectionColumnId, node), getSelectAllProps: getSelectAllProps, onFocusMove: onFocusMove, singleSelectionHeaderAriaLabel: singleSelectionHeaderAriaLabel, rowSpan: columnGroupsLayout.rows.length })) : null,
|
|
64
|
+
row.columns.map((col, colIndexInRow) => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
// A cell is the last child of its parent group when the next rendered cell
|
|
67
|
+
// in the same row belongs to a different top-level parent, i.e. they don't
|
|
68
|
+
// share the same immediate parent group.
|
|
69
|
+
const nextCol = row.columns[colIndexInRow + 1];
|
|
70
|
+
const thisParent = (_a = col.parentGroupIds[col.parentGroupIds.length - 1]) !== null && _a !== void 0 ? _a : null;
|
|
71
|
+
const nextParent = nextCol ? ((_b = nextCol.parentGroupIds[nextCol.parentGroupIds.length - 1]) !== null && _b !== void 0 ? _b : null) : null;
|
|
72
|
+
// A column is also considered last-child-of-group when the sticky boundary
|
|
73
|
+
// bisects its parent group just after this column — visually it's the rightmost
|
|
74
|
+
// column of the sticky half, so its resizer should span full-height like a
|
|
75
|
+
// normal last-child-of-group.
|
|
76
|
+
const isColumnAtStickyFirstBoundary = !col.isGroup &&
|
|
77
|
+
thisParent !== null &&
|
|
78
|
+
stickyColumnsFirst > 0 &&
|
|
79
|
+
col.colIndex === stickyColumnsFirst - 1;
|
|
80
|
+
const isColumnAtStickyLastBoundary = !col.isGroup &&
|
|
81
|
+
thisParent !== null &&
|
|
82
|
+
stickyColumnsLast > 0 &&
|
|
83
|
+
col.colIndex === columnDefinitions.length - stickyColumnsLast - 1;
|
|
84
|
+
const isLastChildOfGroup = (thisParent !== null && thisParent !== nextParent) ||
|
|
85
|
+
isColumnAtStickyFirstBoundary ||
|
|
86
|
+
isColumnAtStickyLastBoundary;
|
|
87
|
+
if (col.isGroup) {
|
|
88
|
+
// Group header cell
|
|
89
|
+
const groupDefinition = col.groupDefinition;
|
|
90
|
+
const childIds = getGroupColumnIds(columnGroupsLayout, col.id);
|
|
91
|
+
const sharedGroupCellProps = {
|
|
92
|
+
...commonCellProps,
|
|
93
|
+
tabIndex: sticky ? -1 : 0,
|
|
94
|
+
focusedComponent,
|
|
95
|
+
group: groupDefinition,
|
|
96
|
+
rowspan: col.rowSpan,
|
|
97
|
+
resizableColumns,
|
|
98
|
+
onResizeFinish: () => onResizeFinish(columnWidths),
|
|
99
|
+
columnGroupId: col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined,
|
|
100
|
+
};
|
|
101
|
+
const splitFirst = getGroupSplit({
|
|
102
|
+
col,
|
|
103
|
+
stickyCount: stickyColumnsFirst,
|
|
104
|
+
side: 'first',
|
|
105
|
+
totalColumns,
|
|
106
|
+
});
|
|
107
|
+
const splitLast = getGroupSplit({
|
|
108
|
+
col,
|
|
109
|
+
stickyCount: stickyColumnsLast,
|
|
110
|
+
side: 'last',
|
|
111
|
+
totalColumns,
|
|
112
|
+
});
|
|
113
|
+
const split = splitFirst.stickyColspan > 0 ? splitFirst : splitLast;
|
|
114
|
+
const isSplit = split.stickyColspan > 0;
|
|
115
|
+
if (isSplit) {
|
|
116
|
+
// Group is bisected by the sticky boundary — render two <th> elements.
|
|
117
|
+
// Both halves get resizers. Each resizes its own rightmost column child.
|
|
118
|
+
const isSplitFirst = splitFirst.stickyColspan > 0;
|
|
119
|
+
// Left half is sticky for 'first', non-sticky for 'last'
|
|
120
|
+
const leftColspan = isSplitFirst ? split.stickyColspan : split.staticColspan;
|
|
121
|
+
const leftColIndex = col.colIndex;
|
|
122
|
+
const leftGroupId = isSplitFirst ? col.id : `${col.id}__split`;
|
|
123
|
+
const leftChildIds = childIds.slice(0, leftColspan);
|
|
124
|
+
// Right half is non-sticky for 'first', sticky for 'last'
|
|
125
|
+
const rightColspan = isSplitFirst ? split.staticColspan : split.stickyColspan;
|
|
126
|
+
const rightColIndex = col.colIndex + leftColspan;
|
|
127
|
+
const rightGroupId = isSplitFirst ? `${col.id}__split` : col.id;
|
|
128
|
+
const rightChildIds = childIds.slice(leftColspan);
|
|
129
|
+
return (React.createElement(React.Fragment, { key: col.id },
|
|
130
|
+
React.createElement(TableGroupHeaderCell, { ...sharedGroupCellProps, colspan: leftColspan, colIndex: selectionType ? leftColIndex + 1 : leftColIndex, groupId: leftGroupId, resizableStyle: undefined, updateGroupWidth: (_, newWidth) => {
|
|
131
|
+
handleSplitGroupResize(leftChildIds, newWidth);
|
|
132
|
+
}, childColumnIds: leftChildIds, firstChildColumnId: leftChildIds[0], lastChildColumnId: leftChildIds[leftChildIds.length - 1], cellRef: isSplitFirst ? node => setCell(sticky, col.id, node) : () => { }, isLast: false, stickyColumnId: isSplitFirst ? childIds[0] : undefined, stickyBoundaryColumnId: isSplitFirst ? leftChildIds[leftChildIds.length - 1] : undefined }),
|
|
133
|
+
React.createElement(TableGroupHeaderCell, { ...sharedGroupCellProps, colspan: rightColspan, colIndex: selectionType ? rightColIndex + 1 : rightColIndex, groupId: rightGroupId, resizableStyle: getColumnStyles(sticky, col.id), updateGroupWidth: (_, newWidth) => {
|
|
134
|
+
handleSplitGroupResize(rightChildIds, newWidth);
|
|
135
|
+
}, childColumnIds: rightChildIds, firstChildColumnId: rightChildIds[0], lastChildColumnId: rightChildIds[rightChildIds.length - 1], cellRef: !isSplitFirst ? node => setCell(sticky, col.id, node) : () => { }, resizerRoleDescription: resizerRoleDescription, resizerTooltipText: resizerTooltipText, isLast: rightColIndex + rightColspan === totalColumns, stickyColumnId: !isSplitFirst ? childIds[childIds.length - 1] : undefined })));
|
|
136
|
+
}
|
|
137
|
+
// Determine if the entire group is sticky (all children on one side)
|
|
138
|
+
const isFullyStickyFirst = stickyColumnsFirst > 0 && col.colIndex + col.colSpan - 1 < stickyColumnsFirst;
|
|
139
|
+
const isFullyStickyLast = stickyColumnsLast > 0 && col.colIndex >= columnDefinitions.length - stickyColumnsLast;
|
|
140
|
+
const fullyStickyColumnId = isFullyStickyFirst
|
|
141
|
+
? childIds[0]
|
|
142
|
+
: isFullyStickyLast
|
|
143
|
+
? childIds[childIds.length - 1]
|
|
144
|
+
: undefined;
|
|
145
|
+
// When the group's last child is the sticky-first boundary, the group
|
|
146
|
+
// needs the shadow from that child (but offset from the first child).
|
|
147
|
+
const isAtStickyFirstBoundary = isFullyStickyFirst && col.colIndex + col.colSpan - 1 === stickyColumnsFirst - 1;
|
|
148
|
+
const isAtStickyLastBoundary = isFullyStickyLast && col.colIndex === columnDefinitions.length - stickyColumnsLast;
|
|
149
|
+
const fullyStickyBoundaryColumnId = isAtStickyFirstBoundary
|
|
150
|
+
? childIds[childIds.length - 1]
|
|
151
|
+
: isAtStickyLastBoundary
|
|
152
|
+
? childIds[0]
|
|
153
|
+
: undefined;
|
|
154
|
+
return (React.createElement(TableGroupHeaderCell, { ...sharedGroupCellProps, key: col.id, colspan: col.colSpan, colIndex: selectionType ? col.colIndex + 1 : col.colIndex, groupId: col.id, resizableStyle: getColumnStyles(sticky, col.id), updateGroupWidth: (groupId, newWidth) => {
|
|
155
|
+
updateGroup(groupId, newWidth);
|
|
156
|
+
}, childColumnIds: childIds, firstChildColumnId: childIds[0], lastChildColumnId: childIds[childIds.length - 1], cellRef: node => setCell(sticky, col.id, node), resizerRoleDescription: resizerRoleDescription, resizerTooltipText: resizerTooltipText, isLast: col.colIndex + col.colSpan === totalColumns, stickyColumnId: fullyStickyColumnId, stickyBoundaryColumnId: fullyStickyBoundaryColumnId }));
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
// Regular column cell
|
|
160
|
+
const column = col.columnDefinition;
|
|
161
|
+
const columnId = col.id;
|
|
162
|
+
const colIndex = col.colIndex;
|
|
36
163
|
return (React.createElement(TableHeaderCell, { ...commonCellProps, key: columnId, tabIndex: sticky ? -1 : 0, focusedComponent: focusedComponent, column: column, activeSortingColumn: sortingColumn, sortingDescending: sortingDescending, sortingDisabled: sortingDisabled, wrapLines: wrapLines, colIndex: selectionType ? colIndex + 1 : colIndex, columnId: columnId, updateColumn: updateColumn, onResizeFinish: () => onResizeFinish(columnWidths), resizableColumns: resizableColumns, resizableStyle: getColumnStyles(sticky, columnId), onClick: detail => {
|
|
37
164
|
setLastUserAction('sorting');
|
|
38
165
|
fireNonCancelableEvent(onSortingChange, detail);
|
|
39
|
-
}, isEditable: !!column.editConfig, cellRef: node =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
166
|
+
}, isEditable: !!column.editConfig, cellRef: node => {
|
|
167
|
+
setCell(sticky, columnId, node);
|
|
168
|
+
}, tableRole: tableRole, resizerRoleDescription: resizerRoleDescription, resizerTooltipText: resizerTooltipText, isExpandable: colIndex === 0 && isExpandable, hasDynamicContent: hidden && !resizableColumns && column.hasDynamicContent, colSpan: col.colSpan, rowSpan: col.rowSpan, isLastChildOfGroup: isLastChildOfGroup, isLast: col.colIndex + col.colSpan === totalColumns, columnGroupId: col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined }));
|
|
169
|
+
}
|
|
170
|
+
}))))));
|
|
44
171
|
});
|
|
45
172
|
export default Thead;
|
|
46
173
|
//# sourceMappingURL=thead.js.map
|
package/table/thead.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,0BAA0B,EAAa,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CA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sB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;oBAClD,CAAC,EACD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAC/B,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,EAChD,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,kBAAkB,EAAE,kBAAkB;oBACtC,8EAA8E;oBAC9E,uGAAuG;oBACvG,YAAY,EAAE,QAAQ,KAAK,CAAC,IAAI,YAAY,EAC5C,iBAAiB,EAAE,MAAM,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,iBAAiB,GAC1E,CACH,CAAC;YACJ,CAAC,CAAC,CACC,CACC,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { TableHeaderCell } from './header-cell';\nimport { InternalSelectionType, TableProps } from './interfaces';\nimport { focusMarkers, ItemSelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: undefined | InternalSelectionType;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?: TableProps.Variant;\n wrapLines: boolean | undefined;\n resizableColumns: boolean | undefined;\n getSelectAllProps?: () => ItemSelectionProps;\n onFocusMove: ((sourceElement: HTMLElement, fromIndex: number, direction: -1 | 1) => void) | undefined;\n onResizeFinish: (newWidths: Map<PropertyKey, number>) => void;\n onSortingChange: NonCancelableEventHandler<TableProps.SortingState<any>> | undefined;\n sticky?: boolean;\n hidden?: boolean;\n stuck?: boolean;\n singleSelectionHeaderAriaLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: string;\n stripedRows?: boolean;\n stickyState: StickyColumnsModel;\n selectionColumnId: PropertyKey;\n focusedComponent?: null | string;\n onFocusedComponentChange?: (focusId: null | string) => void;\n tableRole: TableRole;\n isExpandable?: boolean;\n setLastUserAction: (name: string) => void;\n}\n\nconst Thead = React.forwardRef(\n (\n {\n selectionType,\n getSelectAllProps,\n columnDefinitions,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n resizableColumns,\n variant,\n tableVariant,\n wrapLines,\n onFocusMove,\n onSortingChange,\n onResizeFinish,\n singleSelectionHeaderAriaLabel,\n stripedRows,\n sticky = false,\n hidden = false,\n stuck = false,\n stickyState,\n selectionColumnId,\n focusedComponent,\n onFocusedComponentChange,\n tableRole,\n resizerRoleDescription,\n resizerTooltipText,\n isExpandable,\n setLastUserAction,\n }: TheadProps,\n outerRef: React.Ref<HTMLTableRowElement>\n ) => {\n const { getColumnStyles, columnWidths, updateColumn, setCell } = useColumnWidths();\n\n const commonCellProps = {\n stuck,\n sticky,\n hidden,\n stripedRows,\n tableRole,\n variant,\n tableVariant,\n stickyState,\n };\n\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n <tr\n {...focusMarkers.all}\n ref={outerRef}\n aria-rowindex={1}\n {...getTableHeaderRowRoleProps({ tableRole })}\n onFocus={event => {\n const focusControlElement = findUpUntil(event.target, element => !!element.getAttribute('data-focus-id'));\n const focusId = focusControlElement?.getAttribute('data-focus-id') ?? null;\n onFocusedComponentChange?.(focusId);\n }}\n onBlur={() => onFocusedComponentChange?.(null)}\n >\n {selectionType ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n />\n ) : null}\n\n {columnDefinitions.map((column, colIndex) => {\n const columnId = getColumnKey(column, colIndex);\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => setCell(sticky, columnId, node)}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n // Expandable option is only applicable to the first data column of the table.\n // When present, the header content receives extra padding to match the first offset in the data cells.\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n />\n );\n })}\n </tr>\n </thead>\n );\n }\n);\n\nexport default Thead;\n"]}
|
|
1
|
+
{"version":3,"file":"thead.js","sourceRoot":"","sources":["../../../src/table/thead.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,6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MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAE/F,CACH,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { getGroupColumnIds, getGroupSplit } from './column-groups/split-utils';\nimport { ColumnGroupsLayout } from './column-groups/utils';\nimport { TableHeaderCell } from './header-cell';\nimport { TableGroupHeaderCell } from './header-cell/group-header-cell';\nimport { InternalSelectionType, TableProps } from './interfaces';\nimport { focusMarkers, ItemSelectionProps } from './selection';\nimport { TableHeaderSelectionCell } from './selection/selection-cell';\nimport { StickyColumnsModel } from './sticky-columns';\nimport { getTableHeaderRowRoleProps, TableRole } from './table-role';\nimport { DEFAULT_COLUMN_WIDTH, useColumnWidths } from './use-column-widths';\nimport { getColumnKey } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface TheadProps {\n selectionType: undefined | InternalSelectionType;\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<any>>;\n groupDefinitions?: ReadonlyArray<TableProps.GroupDefinition>;\n columnGroupsLayout?: ColumnGroupsLayout<any>;\n sortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n variant: TableProps.Variant;\n tableVariant?: TableProps.Variant;\n wrapLines: boolean | undefined;\n resizableColumns: boolean | undefined;\n getSelectAllProps?: () => ItemSelectionProps;\n onFocusMove: ((sourceElement: HTMLElement, fromIndex: number, direction: -1 | 1) => void) | undefined;\n onResizeFinish: (newWidths: Map<PropertyKey, number>) => void;\n onSortingChange: NonCancelableEventHandler<TableProps.SortingState<any>> | undefined;\n sticky?: boolean;\n hidden?: boolean;\n stuck?: boolean;\n singleSelectionHeaderAriaLabel?: string;\n resizerRoleDescription?: string;\n resizerTooltipText?: string;\n stripedRows?: boolean;\n stickyState: StickyColumnsModel;\n stickyColumnsFirst: number;\n stickyColumnsLast: number;\n selectionColumnId: PropertyKey;\n focusedComponent?: null | string;\n onFocusedComponentChange?: (focusId: null | string) => void;\n tableRole: TableRole;\n isExpandable?: boolean;\n setLastUserAction: (name: string) => void;\n}\n\nconst Thead = React.forwardRef(\n (\n {\n selectionType,\n getSelectAllProps,\n columnDefinitions,\n columnGroupsLayout,\n sortingColumn,\n sortingDisabled,\n sortingDescending,\n resizableColumns,\n variant,\n tableVariant,\n wrapLines,\n onFocusMove,\n onSortingChange,\n onResizeFinish,\n singleSelectionHeaderAriaLabel,\n stripedRows,\n sticky = false,\n hidden = false,\n stuck = false,\n stickyState,\n stickyColumnsFirst,\n stickyColumnsLast,\n selectionColumnId,\n focusedComponent,\n onFocusedComponentChange,\n tableRole,\n resizerRoleDescription,\n resizerTooltipText,\n isExpandable,\n setLastUserAction,\n }: TheadProps,\n outerRef: React.Ref<HTMLTableRowElement>\n ) => {\n const { getColumnStyles, columnWidths, updateColumn, updateGroup, setCell } = useColumnWidths();\n\n const handleSplitGroupResize = (columnIds: string[], newWidth: number) => {\n const lastColumn = columnIds[columnIds.length - 1];\n if (lastColumn) {\n const currentGroupWidth = columnIds.reduce(\n (sum, id) => sum + (columnWidths.get(id) || DEFAULT_COLUMN_WIDTH),\n 0\n );\n const delta = newWidth - currentGroupWidth;\n const currentColumnWidth = columnWidths.get(lastColumn) || DEFAULT_COLUMN_WIDTH;\n updateColumn(lastColumn, currentColumnWidth + delta);\n }\n };\n\n const commonCellProps = {\n stuck,\n sticky,\n hidden,\n stripedRows,\n tableRole,\n variant,\n tableVariant,\n stickyState,\n wrapLines,\n };\n\n const sharedTrProps = {\n onFocus: (event: React.FocusEvent) => {\n const focusControlElement = findUpUntil(\n event.target as HTMLElement,\n element => !!element.getAttribute('data-focus-id')\n );\n const focusId = focusControlElement?.getAttribute('data-focus-id') ?? null;\n onFocusedComponentChange?.(focusId);\n },\n onBlur: () => onFocusedComponentChange?.(null),\n };\n\n // No grouping - render single row\n if (!columnGroupsLayout || columnGroupsLayout.rows.length <= 1) {\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n <tr\n {...focusMarkers.all}\n ref={outerRef}\n aria-rowindex={1}\n {...getTableHeaderRowRoleProps({ tableRole })}\n {...sharedTrProps}\n >\n {selectionType ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n />\n ) : null}\n\n {columnDefinitions.map((column, colIndex) => {\n const columnId = getColumnKey(column, colIndex);\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => setCell(sticky, columnId, node)}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n isLast={colIndex === columnDefinitions.length - 1}\n />\n );\n })}\n </tr>\n </thead>\n );\n }\n\n // Grouped columns\n const totalColumns = columnDefinitions.length;\n return (\n <thead className={clsx(!hidden && styles['thead-active'])}>\n {columnGroupsLayout.rows.map((row, rowIndex) => (\n <tr\n key={rowIndex}\n {...(rowIndex === 0 ? focusMarkers.all : {})}\n ref={rowIndex === 0 ? outerRef : undefined}\n aria-rowindex={rowIndex + 1}\n data-group-level={rowIndex}\n {...getTableHeaderRowRoleProps({ tableRole, rowIndex })}\n {...sharedTrProps}\n >\n {/* Selection column — render once in the first row with rowSpan covering all header rows */}\n {selectionType && rowIndex === 0 ? (\n <TableHeaderSelectionCell\n {...commonCellProps}\n focusedComponent={focusedComponent}\n columnId={selectionColumnId}\n cellRef={node => setCell(sticky, selectionColumnId, node)}\n getSelectAllProps={getSelectAllProps}\n onFocusMove={onFocusMove}\n singleSelectionHeaderAriaLabel={singleSelectionHeaderAriaLabel}\n rowSpan={columnGroupsLayout.rows.length}\n />\n ) : null}\n\n {row.columns.map((col, colIndexInRow) => {\n // A cell is the last child of its parent group when the next rendered cell\n // in the same row belongs to a different top-level parent, i.e. they don't\n // share the same immediate parent group.\n const nextCol = row.columns[colIndexInRow + 1];\n const thisParent = col.parentGroupIds[col.parentGroupIds.length - 1] ?? null;\n const nextParent = nextCol ? (nextCol.parentGroupIds[nextCol.parentGroupIds.length - 1] ?? null) : null;\n // A column is also considered last-child-of-group when the sticky boundary\n // bisects its parent group just after this column — visually it's the rightmost\n // column of the sticky half, so its resizer should span full-height like a\n // normal last-child-of-group.\n const isColumnAtStickyFirstBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsFirst > 0 &&\n col.colIndex === stickyColumnsFirst - 1;\n const isColumnAtStickyLastBoundary =\n !col.isGroup &&\n thisParent !== null &&\n stickyColumnsLast > 0 &&\n col.colIndex === columnDefinitions.length - stickyColumnsLast - 1;\n const isLastChildOfGroup =\n (thisParent !== null && thisParent !== nextParent) ||\n isColumnAtStickyFirstBoundary ||\n isColumnAtStickyLastBoundary;\n\n if (col.isGroup) {\n // Group header cell\n const groupDefinition = col.groupDefinition!;\n const childIds = getGroupColumnIds(columnGroupsLayout!, col.id);\n const sharedGroupCellProps = {\n ...commonCellProps,\n tabIndex: sticky ? -1 : 0,\n focusedComponent,\n group: groupDefinition,\n rowspan: col.rowSpan,\n resizableColumns,\n onResizeFinish: () => onResizeFinish(columnWidths),\n columnGroupId:\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined,\n };\n const splitFirst = getGroupSplit({\n col,\n stickyCount: stickyColumnsFirst,\n side: 'first',\n totalColumns,\n });\n const splitLast = getGroupSplit({\n col,\n stickyCount: stickyColumnsLast,\n side: 'last',\n totalColumns,\n });\n const split = splitFirst.stickyColspan > 0 ? splitFirst : splitLast;\n const isSplit = split.stickyColspan > 0;\n\n if (isSplit) {\n // Group is bisected by the sticky boundary — render two <th> elements.\n // Both halves get resizers. Each resizes its own rightmost column child.\n const isSplitFirst = splitFirst.stickyColspan > 0;\n\n // Left half is sticky for 'first', non-sticky for 'last'\n const leftColspan = isSplitFirst ? split.stickyColspan : split.staticColspan;\n const leftColIndex = col.colIndex;\n const leftGroupId = isSplitFirst ? col.id : `${col.id}__split`;\n const leftChildIds = childIds.slice(0, leftColspan);\n\n // Right half is non-sticky for 'first', sticky for 'last'\n const rightColspan = isSplitFirst ? split.staticColspan : split.stickyColspan;\n const rightColIndex = col.colIndex + leftColspan;\n const rightGroupId = isSplitFirst ? `${col.id}__split` : col.id;\n const rightChildIds = childIds.slice(leftColspan);\n\n return (\n <React.Fragment key={col.id}>\n {/* Left half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={leftColspan}\n colIndex={selectionType ? leftColIndex + 1 : leftColIndex}\n groupId={leftGroupId}\n resizableStyle={undefined}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(leftChildIds, newWidth);\n }}\n childColumnIds={leftChildIds}\n firstChildColumnId={leftChildIds[0]}\n lastChildColumnId={leftChildIds[leftChildIds.length - 1]}\n cellRef={isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n isLast={false}\n stickyColumnId={isSplitFirst ? childIds[0] : undefined}\n stickyBoundaryColumnId={isSplitFirst ? leftChildIds[leftChildIds.length - 1] : undefined}\n />\n\n {/* Right half */}\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n colspan={rightColspan}\n colIndex={selectionType ? rightColIndex + 1 : rightColIndex}\n groupId={rightGroupId}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(_, newWidth) => {\n handleSplitGroupResize(rightChildIds, newWidth);\n }}\n childColumnIds={rightChildIds}\n firstChildColumnId={rightChildIds[0]}\n lastChildColumnId={rightChildIds[rightChildIds.length - 1]}\n cellRef={!isSplitFirst ? node => setCell(sticky, col.id, node) : () => {}}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={rightColIndex + rightColspan === totalColumns}\n stickyColumnId={!isSplitFirst ? childIds[childIds.length - 1] : undefined}\n />\n </React.Fragment>\n );\n }\n\n // Determine if the entire group is sticky (all children on one side)\n const isFullyStickyFirst =\n stickyColumnsFirst > 0 && col.colIndex + col.colSpan - 1 < stickyColumnsFirst;\n const isFullyStickyLast =\n stickyColumnsLast > 0 && col.colIndex >= columnDefinitions.length - stickyColumnsLast;\n const fullyStickyColumnId = isFullyStickyFirst\n ? childIds[0]\n : isFullyStickyLast\n ? childIds[childIds.length - 1]\n : undefined;\n\n // When the group's last child is the sticky-first boundary, the group\n // needs the shadow from that child (but offset from the first child).\n const isAtStickyFirstBoundary =\n isFullyStickyFirst && col.colIndex + col.colSpan - 1 === stickyColumnsFirst - 1;\n const isAtStickyLastBoundary =\n isFullyStickyLast && col.colIndex === columnDefinitions.length - stickyColumnsLast;\n const fullyStickyBoundaryColumnId = isAtStickyFirstBoundary\n ? childIds[childIds.length - 1]\n : isAtStickyLastBoundary\n ? childIds[0]\n : undefined;\n\n return (\n <TableGroupHeaderCell\n {...sharedGroupCellProps}\n key={col.id}\n colspan={col.colSpan}\n colIndex={selectionType ? col.colIndex + 1 : col.colIndex}\n groupId={col.id}\n resizableStyle={getColumnStyles(sticky, col.id)}\n updateGroupWidth={(groupId, newWidth) => {\n updateGroup(groupId, newWidth);\n }}\n childColumnIds={childIds}\n firstChildColumnId={childIds[0]}\n lastChildColumnId={childIds[childIds.length - 1]}\n cellRef={node => setCell(sticky, col.id, node)}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isLast={col.colIndex + col.colSpan === totalColumns}\n stickyColumnId={fullyStickyColumnId}\n stickyBoundaryColumnId={fullyStickyBoundaryColumnId}\n />\n );\n } else {\n // Regular column cell\n const column = col.columnDefinition!;\n const columnId = col.id;\n const colIndex = col.colIndex;\n\n return (\n <TableHeaderCell\n {...commonCellProps}\n key={columnId}\n tabIndex={sticky ? -1 : 0}\n focusedComponent={focusedComponent}\n column={column}\n activeSortingColumn={sortingColumn}\n sortingDescending={sortingDescending}\n sortingDisabled={sortingDisabled}\n wrapLines={wrapLines}\n colIndex={selectionType ? colIndex + 1 : colIndex}\n columnId={columnId}\n updateColumn={updateColumn}\n onResizeFinish={() => onResizeFinish(columnWidths)}\n resizableColumns={resizableColumns}\n resizableStyle={getColumnStyles(sticky, columnId)}\n onClick={detail => {\n setLastUserAction('sorting');\n fireNonCancelableEvent(onSortingChange, detail);\n }}\n isEditable={!!column.editConfig}\n cellRef={node => {\n setCell(sticky, columnId, node);\n }}\n tableRole={tableRole}\n resizerRoleDescription={resizerRoleDescription}\n resizerTooltipText={resizerTooltipText}\n isExpandable={colIndex === 0 && isExpandable}\n hasDynamicContent={hidden && !resizableColumns && column.hasDynamicContent}\n colSpan={col.colSpan}\n rowSpan={col.rowSpan}\n isLastChildOfGroup={isLastChildOfGroup}\n isLast={col.colIndex + col.colSpan === totalColumns}\n columnGroupId={\n col.parentGroupIds.length > 0 ? col.parentGroupIds[col.parentGroupIds.length - 1] : undefined\n }\n />\n );\n }\n })}\n </tr>\n ))}\n </thead>\n );\n }\n);\n\nexport default Thead;\n"]}
|
|
@@ -8,7 +8,9 @@ interface WidthsContext {
|
|
|
8
8
|
getColumnStyles(sticky: boolean, columnId: PropertyKey): ColumnWidthStyle;
|
|
9
9
|
columnWidths: Map<PropertyKey, number>;
|
|
10
10
|
updateColumn: (columnId: PropertyKey, newWidth: number) => void;
|
|
11
|
+
updateGroup: (groupId: PropertyKey, newWidth: number) => void;
|
|
11
12
|
setCell: (sticky: boolean, columnId: PropertyKey, node: null | HTMLElement) => void;
|
|
13
|
+
setCol: (columnId: PropertyKey, node: null | HTMLElement) => void;
|
|
12
14
|
}
|
|
13
15
|
declare const WidthsContext: React.Context<WidthsContext>;
|
|
14
16
|
interface WidthProviderProps {
|
|
@@ -16,11 +18,13 @@ interface WidthProviderProps {
|
|
|
16
18
|
resizableColumns: boolean | undefined;
|
|
17
19
|
containerRef: React.RefObject<HTMLElement>;
|
|
18
20
|
children: React.ReactNode;
|
|
21
|
+
groupColumnMap?: Map<string, string[]>;
|
|
19
22
|
}
|
|
20
23
|
export declare function ColumnWidthsProvider({
|
|
21
24
|
visibleColumns,
|
|
22
25
|
resizableColumns,
|
|
23
26
|
containerRef,
|
|
27
|
+
groupColumnMap,
|
|
24
28
|
children
|
|
25
29
|
}: WidthProviderProps): JSX.Element;
|
|
26
30
|
export declare function useColumnWidths(): WidthsContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-column-widths.d.ts","sourceRoot":"","sources":["../../../src/table/use-column-widths.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiE,MAAM,OAAO,CAAC;AAKtF,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAE3E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,EAAE,EAAE,WAAW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