@primer/react 38.44.1-rc.f98981f35 → 38.45.0-rc.72a855661
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/CHANGELOG.md +11 -1
- package/dist/ActionMenu/ActionMenu.js +12 -8
- package/dist/DataTable/DataTable.d.ts +11 -2
- package/dist/DataTable/DataTable.js +148 -61
- package/dist/DataTable/Table-7f0e985b.css +2 -0
- package/dist/DataTable/{Table-0327e248.css.map → Table-7f0e985b.css.map} +1 -1
- package/dist/DataTable/Table.d.ts +1 -0
- package/dist/DataTable/Table.js +18 -13
- package/dist/DataTable/Table.module.css.js +1 -1
- package/dist/DataTable/TableBulkActions-aca5618a.css +2 -0
- package/dist/DataTable/TableBulkActions-aca5618a.css.map +1 -0
- package/dist/DataTable/TableBulkActions.d.ts +15 -0
- package/dist/DataTable/TableBulkActions.js +217 -0
- package/dist/DataTable/TableBulkActions.module.css.js +12 -0
- package/dist/DataTable/index.d.ts +4 -2
- package/dist/DataTable/index.js +2 -0
- package/dist/DataTable/useTable.js +46 -36
- package/dist/experimental/index.d.ts +3 -2
- package/dist/utils/descendant-registry.d.ts +1 -1
- package/dist/utils/descendant-registry.js +94 -76
- package/generated/components.json +51 -0
- package/package.json +2 -2
- package/dist/DataTable/Table-0327e248.css +0 -2
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
2
|
+
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
3
|
+
import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
|
|
4
|
+
import VisuallyHidden from "../_VisuallyHidden.js";
|
|
5
|
+
import TableBulkActions_module_css_default from "./TableBulkActions.module.css.js";
|
|
6
|
+
import React, { useRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
//#region src/DataTable/TableBulkActions.tsx
|
|
10
|
+
function defaultSelectedCountLabel(selectedCount) {
|
|
11
|
+
return `${selectedCount} selected`;
|
|
12
|
+
}
|
|
13
|
+
const TableBulkActions = /*#__PURE__*/ React.forwardRef(function TableBulkActions(t0, ref) {
|
|
14
|
+
const $ = c(47);
|
|
15
|
+
let children;
|
|
16
|
+
let className;
|
|
17
|
+
let onBlurCapture;
|
|
18
|
+
let onFocusCapture;
|
|
19
|
+
let onFocusReturn;
|
|
20
|
+
let rest;
|
|
21
|
+
let selectedCount;
|
|
22
|
+
let t1;
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({selectedCount, onFocusReturn, getSelectedCountLabel: t1, "aria-label": t2, className, children, onFocusCapture, onBlurCapture, ...rest} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = children;
|
|
28
|
+
$[2] = className;
|
|
29
|
+
$[3] = onBlurCapture;
|
|
30
|
+
$[4] = onFocusCapture;
|
|
31
|
+
$[5] = onFocusReturn;
|
|
32
|
+
$[6] = rest;
|
|
33
|
+
$[7] = selectedCount;
|
|
34
|
+
$[8] = t1;
|
|
35
|
+
$[9] = t2;
|
|
36
|
+
} else {
|
|
37
|
+
children = $[1];
|
|
38
|
+
className = $[2];
|
|
39
|
+
onBlurCapture = $[3];
|
|
40
|
+
onFocusCapture = $[4];
|
|
41
|
+
onFocusReturn = $[5];
|
|
42
|
+
rest = $[6];
|
|
43
|
+
selectedCount = $[7];
|
|
44
|
+
t1 = $[8];
|
|
45
|
+
t2 = $[9];
|
|
46
|
+
}
|
|
47
|
+
const getSelectedCountLabel = t1 === void 0 ? defaultSelectedCountLabel : t1;
|
|
48
|
+
const ariaLabel = t2 === void 0 ? "Bulk actions" : t2;
|
|
49
|
+
const focusedAction = useRef(null);
|
|
50
|
+
const focusObserver = useRef(null);
|
|
51
|
+
const active = selectedCount > 0;
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[10] !== onFocusReturn) {
|
|
54
|
+
t3 = function recoverFocus() {
|
|
55
|
+
const element = focusedAction.current;
|
|
56
|
+
if (element && !element.isConnected) {
|
|
57
|
+
var _focusObserver$curren;
|
|
58
|
+
focusedAction.current = null;
|
|
59
|
+
(_focusObserver$curren = focusObserver.current) === null || _focusObserver$curren === void 0 || _focusObserver$curren.disconnect();
|
|
60
|
+
const document = element.ownerDocument;
|
|
61
|
+
if (document.activeElement === document.body) {
|
|
62
|
+
var _onFocusReturn;
|
|
63
|
+
(_onFocusReturn = onFocusReturn) === null || _onFocusReturn === void 0 || _onFocusReturn();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
$[10] = onFocusReturn;
|
|
68
|
+
$[11] = t3;
|
|
69
|
+
} else t3 = $[11];
|
|
70
|
+
const recoverFocus = t3;
|
|
71
|
+
let t4;
|
|
72
|
+
if ($[12] !== recoverFocus) {
|
|
73
|
+
t4 = function observeFocusedAction() {
|
|
74
|
+
var _focusObserver$curren2;
|
|
75
|
+
(_focusObserver$curren2 = focusObserver.current) === null || _focusObserver$curren2 === void 0 || _focusObserver$curren2.disconnect();
|
|
76
|
+
const element_0 = focusedAction.current;
|
|
77
|
+
if (element_0) {
|
|
78
|
+
const observer = new MutationObserver(recoverFocus);
|
|
79
|
+
observer.observe(element_0.ownerDocument.body, {
|
|
80
|
+
childList: true,
|
|
81
|
+
subtree: true
|
|
82
|
+
});
|
|
83
|
+
focusObserver.current = observer;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
$[12] = recoverFocus;
|
|
87
|
+
$[13] = t4;
|
|
88
|
+
} else t4 = $[13];
|
|
89
|
+
const observeFocusedAction = t4;
|
|
90
|
+
let t5;
|
|
91
|
+
if ($[14] !== observeFocusedAction || $[15] !== recoverFocus) {
|
|
92
|
+
t5 = () => {
|
|
93
|
+
recoverFocus();
|
|
94
|
+
observeFocusedAction();
|
|
95
|
+
return () => {
|
|
96
|
+
var _focusObserver$curren3;
|
|
97
|
+
(_focusObserver$curren3 = focusObserver.current) === null || _focusObserver$curren3 === void 0 || _focusObserver$curren3.disconnect();
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
$[14] = observeFocusedAction;
|
|
101
|
+
$[15] = recoverFocus;
|
|
102
|
+
$[16] = t5;
|
|
103
|
+
} else t5 = $[16];
|
|
104
|
+
useIsomorphicLayoutEffect(t5);
|
|
105
|
+
let t6;
|
|
106
|
+
if ($[17] !== getSelectedCountLabel || $[18] !== selectedCount) {
|
|
107
|
+
t6 = getSelectedCountLabel(selectedCount);
|
|
108
|
+
$[17] = getSelectedCountLabel;
|
|
109
|
+
$[18] = selectedCount;
|
|
110
|
+
$[19] = t6;
|
|
111
|
+
} else t6 = $[19];
|
|
112
|
+
let t7;
|
|
113
|
+
if ($[20] !== active || $[21] !== t6) {
|
|
114
|
+
t7 = /* @__PURE__ */ jsx(AriaStatus, {
|
|
115
|
+
as: "span",
|
|
116
|
+
className: TableBulkActions_module_css_default.Count,
|
|
117
|
+
announceOnShow: active,
|
|
118
|
+
children: t6
|
|
119
|
+
});
|
|
120
|
+
$[20] = active;
|
|
121
|
+
$[21] = t6;
|
|
122
|
+
$[22] = t7;
|
|
123
|
+
} else t7 = $[22];
|
|
124
|
+
const count = t7;
|
|
125
|
+
let t8;
|
|
126
|
+
if ($[23] !== observeFocusedAction || $[24] !== onFocusCapture) {
|
|
127
|
+
t8 = (event) => {
|
|
128
|
+
focusedAction.current = event.target;
|
|
129
|
+
observeFocusedAction();
|
|
130
|
+
if (event.currentTarget.contains(event.target)) event.target.scrollIntoView({
|
|
131
|
+
block: "nearest",
|
|
132
|
+
inline: "nearest"
|
|
133
|
+
});
|
|
134
|
+
if (!event.defaultPrevented) {
|
|
135
|
+
var _onFocusCapture;
|
|
136
|
+
(_onFocusCapture = onFocusCapture) === null || _onFocusCapture === void 0 || _onFocusCapture(event);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
$[23] = observeFocusedAction;
|
|
140
|
+
$[24] = onFocusCapture;
|
|
141
|
+
$[25] = t8;
|
|
142
|
+
} else t8 = $[25];
|
|
143
|
+
let t9;
|
|
144
|
+
if ($[26] !== onBlurCapture) {
|
|
145
|
+
t9 = (event_0) => {
|
|
146
|
+
if (event_0.target.isConnected) {
|
|
147
|
+
var _focusObserver$curren4;
|
|
148
|
+
focusedAction.current = null;
|
|
149
|
+
(_focusObserver$curren4 = focusObserver.current) === null || _focusObserver$curren4 === void 0 || _focusObserver$curren4.disconnect();
|
|
150
|
+
}
|
|
151
|
+
if (!event_0.defaultPrevented) {
|
|
152
|
+
var _onBlurCapture;
|
|
153
|
+
(_onBlurCapture = onBlurCapture) === null || _onBlurCapture === void 0 || _onBlurCapture(event_0);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
$[26] = onBlurCapture;
|
|
157
|
+
$[27] = t9;
|
|
158
|
+
} else t9 = $[27];
|
|
159
|
+
const t10 = active ? "group" : void 0;
|
|
160
|
+
const t11 = active ? ariaLabel : void 0;
|
|
161
|
+
const t12 = active || void 0;
|
|
162
|
+
let t13;
|
|
163
|
+
if ($[28] !== className) {
|
|
164
|
+
t13 = clsx(TableBulkActions_module_css_default.TableBulkActions, className);
|
|
165
|
+
$[28] = className;
|
|
166
|
+
$[29] = t13;
|
|
167
|
+
} else t13 = $[29];
|
|
168
|
+
let t14;
|
|
169
|
+
if ($[30] !== active || $[31] !== count) {
|
|
170
|
+
t14 = /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
171
|
+
isVisible: active,
|
|
172
|
+
children: count
|
|
173
|
+
});
|
|
174
|
+
$[30] = active;
|
|
175
|
+
$[31] = count;
|
|
176
|
+
$[32] = t14;
|
|
177
|
+
} else t14 = $[32];
|
|
178
|
+
let t15;
|
|
179
|
+
if ($[33] !== active || $[34] !== children) {
|
|
180
|
+
t15 = active ? /* @__PURE__ */ jsx("div", {
|
|
181
|
+
className: TableBulkActions_module_css_default.Actions,
|
|
182
|
+
children
|
|
183
|
+
}) : null;
|
|
184
|
+
$[33] = active;
|
|
185
|
+
$[34] = children;
|
|
186
|
+
$[35] = t15;
|
|
187
|
+
} else t15 = $[35];
|
|
188
|
+
let t16;
|
|
189
|
+
if ($[36] !== ref || $[37] !== rest || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 || $[43] !== t15 || $[44] !== t8 || $[45] !== t9) {
|
|
190
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
191
|
+
...rest,
|
|
192
|
+
onFocusCapture: t8,
|
|
193
|
+
onBlurCapture: t9,
|
|
194
|
+
ref,
|
|
195
|
+
role: t10,
|
|
196
|
+
"aria-label": t11,
|
|
197
|
+
"data-component": "Table.BulkActions",
|
|
198
|
+
"data-active": t12,
|
|
199
|
+
className: t13,
|
|
200
|
+
children: [t14, t15]
|
|
201
|
+
});
|
|
202
|
+
$[36] = ref;
|
|
203
|
+
$[37] = rest;
|
|
204
|
+
$[38] = t10;
|
|
205
|
+
$[39] = t11;
|
|
206
|
+
$[40] = t12;
|
|
207
|
+
$[41] = t13;
|
|
208
|
+
$[42] = t14;
|
|
209
|
+
$[43] = t15;
|
|
210
|
+
$[44] = t8;
|
|
211
|
+
$[45] = t9;
|
|
212
|
+
$[46] = t16;
|
|
213
|
+
} else t16 = $[46];
|
|
214
|
+
return t16;
|
|
215
|
+
});
|
|
216
|
+
//#endregion
|
|
217
|
+
export { TableBulkActions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./TableBulkActions-aca5618a.css";
|
|
2
|
+
//#region src/DataTable/TableBulkActions.module.css.js
|
|
3
|
+
var TableBulkActions_module_css_default = {
|
|
4
|
+
"TableBulkActions": "prc-DataTable-TableBulkActions-kfFOd",
|
|
5
|
+
"Count": "prc-DataTable-Count-G2fIf",
|
|
6
|
+
"ColumnLabel": "prc-DataTable-ColumnLabel-nT9S-",
|
|
7
|
+
"Actions": "prc-DataTable-Actions-BRFii",
|
|
8
|
+
"HeaderRow": "prc-DataTable-HeaderRow-vCWxU",
|
|
9
|
+
"BulkActionsCell": "prc-DataTable-BulkActionsCell-ji6XT"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TableBulkActions_module_css_default as default };
|
|
@@ -2,7 +2,8 @@ import { SlotMarker } from "../utils/types/Slots.js";
|
|
|
2
2
|
import { ObjectPaths } from "./utils.js";
|
|
3
3
|
import { DataTableData, DataTableRowGroup, DataTableRowId, UniqueRow } from "./row.js";
|
|
4
4
|
import { CellAlignment, Column, ColumnWidth, createColumnHelper } from "./column.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TableBulkActions, TableBulkActionsProps } from "./TableBulkActions.js";
|
|
6
|
+
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "./DataTable.js";
|
|
6
7
|
import { ErrorDialog } from "./ErrorDialog.js";
|
|
7
8
|
import { Table as Table$1, TableActions, TableActionsProps, TableBody, TableBodyProps, TableCell, TableCellPlaceholder, TableCellProps, TableContainer, TableContainerProps, TableDivider, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, TableRowSelection, TableRowSelectionProps, TableSelectionHeader, TableSelectionHeaderProps, TableSkeleton, TableSkeletonProps, TableSubtitle, TableSubtitleProps, TableTitle, TableTitleProps } from "./Table.js";
|
|
8
9
|
import { TableGroup, TableGroupProps } from "./TableGroup.js";
|
|
@@ -14,6 +15,7 @@ declare const Table: typeof Table$1 & SlotMarker & {
|
|
|
14
15
|
Title: typeof TableTitle;
|
|
15
16
|
Subtitle: typeof TableSubtitle;
|
|
16
17
|
Actions: typeof TableActions;
|
|
18
|
+
BulkActions: typeof TableBulkActions;
|
|
17
19
|
Divider: typeof TableDivider;
|
|
18
20
|
Skeleton: typeof TableSkeleton;
|
|
19
21
|
Head: typeof TableHead;
|
|
@@ -29,4 +31,4 @@ declare const Table: typeof Table$1 & SlotMarker & {
|
|
|
29
31
|
ErrorDialog: typeof ErrorDialog;
|
|
30
32
|
};
|
|
31
33
|
//#endregion
|
|
32
|
-
export { type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, type ObjectPaths, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, type UniqueRow, createColumnHelper };
|
|
34
|
+
export { type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, type ObjectPaths, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, type UniqueRow, createColumnHelper };
|
package/dist/DataTable/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Table as Table$1, TableActions, TableBody, TableCell, TableCellPlaceholder, TableContainer, TableDivider, TableHead, TableHeader, TableRow, TableRowSelection, TableSelectionHeader, TableSkeleton, TableSubtitle, TableTitle } from "./Table.js";
|
|
2
2
|
import { TableGroup } from "./TableGroup.js";
|
|
3
|
+
import { TableBulkActions } from "./TableBulkActions.js";
|
|
3
4
|
import { DataTable } from "./DataTable.js";
|
|
4
5
|
import { ErrorDialog } from "./ErrorDialog.js";
|
|
5
6
|
import { Pagination } from "./Pagination.js";
|
|
@@ -10,6 +11,7 @@ const Table = Object.assign(Table$1, {
|
|
|
10
11
|
Title: TableTitle,
|
|
11
12
|
Subtitle: TableSubtitle,
|
|
12
13
|
Actions: TableActions,
|
|
14
|
+
BulkActions: TableBulkActions,
|
|
13
15
|
Divider: TableDivider,
|
|
14
16
|
Skeleton: TableSkeleton,
|
|
15
17
|
Head: TableHead,
|
|
@@ -4,7 +4,7 @@ import { DEFAULT_SORT_DIRECTION, SortDirection, strategies, transition } from ".
|
|
|
4
4
|
import { useId, useState } from "react";
|
|
5
5
|
//#region src/DataTable/useTable.ts
|
|
6
6
|
function useTable(t0) {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(80);
|
|
8
8
|
const { columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId, rowSelection: t1, selectedRows: controlledSelectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t2, expandedGroups: controlledExpandedGroups, defaultExpandedGroups, onExpandedGroupsChange } = t0;
|
|
9
9
|
const rowSelection = t1 === void 0 ? false : t1;
|
|
10
10
|
const collapsibleGroups = t2 === void 0 ? false : t2;
|
|
@@ -335,55 +335,65 @@ function useTable(t0) {
|
|
|
335
335
|
} else t15 = $[58];
|
|
336
336
|
const toggleGroupExpansion = t15;
|
|
337
337
|
let t16;
|
|
338
|
-
if ($[59] !==
|
|
339
|
-
t16 = {
|
|
338
|
+
if ($[59] !== setSelectedRows) {
|
|
339
|
+
t16 = () => {
|
|
340
|
+
setSelectedRows(/* @__PURE__ */ new Set());
|
|
341
|
+
};
|
|
342
|
+
$[59] = setSelectedRows;
|
|
343
|
+
$[60] = t16;
|
|
344
|
+
} else t16 = $[60];
|
|
345
|
+
let t17;
|
|
346
|
+
if ($[61] !== sortBy || $[62] !== t16 || $[63] !== toggleAllRows || $[64] !== toggleGroupExpansion || $[65] !== toggleRowSelection) {
|
|
347
|
+
t17 = {
|
|
340
348
|
sortBy,
|
|
341
349
|
toggleRowSelection,
|
|
342
350
|
toggleAllRows,
|
|
343
|
-
toggleGroupExpansion
|
|
351
|
+
toggleGroupExpansion,
|
|
352
|
+
clearSelection: t16
|
|
344
353
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
$[61] = sortBy;
|
|
355
|
+
$[62] = t16;
|
|
356
|
+
$[63] = toggleAllRows;
|
|
357
|
+
$[64] = toggleGroupExpansion;
|
|
358
|
+
$[65] = toggleRowSelection;
|
|
359
|
+
$[66] = t17;
|
|
360
|
+
} else t17 = $[66];
|
|
361
|
+
const t18 = `${tableId}-selection-column`;
|
|
362
|
+
let t19;
|
|
363
|
+
if ($[67] !== allSelected || $[68] !== effectiveSelectedRows || $[69] !== selectableCount || $[70] !== selectedCount || $[71] !== someSelected || $[72] !== t18) {
|
|
364
|
+
t19 = {
|
|
365
|
+
headerId: t18,
|
|
356
366
|
selectedRows: effectiveSelectedRows,
|
|
357
367
|
allSelected,
|
|
358
368
|
someSelected,
|
|
359
369
|
selectableCount,
|
|
360
370
|
selectedCount
|
|
361
371
|
};
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
372
|
+
$[67] = allSelected;
|
|
373
|
+
$[68] = effectiveSelectedRows;
|
|
374
|
+
$[69] = selectableCount;
|
|
375
|
+
$[70] = selectedCount;
|
|
376
|
+
$[71] = someSelected;
|
|
377
|
+
$[72] = t18;
|
|
378
|
+
$[73] = t19;
|
|
379
|
+
} else t19 = $[73];
|
|
380
|
+
let t20;
|
|
381
|
+
if ($[74] !== bodies || $[75] !== gridTemplateColumns || $[76] !== headers || $[77] !== t17 || $[78] !== t19) {
|
|
382
|
+
t20 = {
|
|
373
383
|
headers,
|
|
374
|
-
actions:
|
|
375
|
-
selection:
|
|
384
|
+
actions: t17,
|
|
385
|
+
selection: t19,
|
|
376
386
|
gridTemplateColumns,
|
|
377
387
|
bodies
|
|
378
388
|
};
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else
|
|
386
|
-
return
|
|
389
|
+
$[74] = bodies;
|
|
390
|
+
$[75] = gridTemplateColumns;
|
|
391
|
+
$[76] = headers;
|
|
392
|
+
$[77] = t17;
|
|
393
|
+
$[78] = t19;
|
|
394
|
+
$[79] = t20;
|
|
395
|
+
} else t20 = $[79];
|
|
396
|
+
return t20;
|
|
387
397
|
}
|
|
388
398
|
function _temp5(row_4) {
|
|
389
399
|
return row_4.selectionId;
|
|
@@ -27,7 +27,8 @@ import { BlankslateProps } from "../Blankslate/Blankslate.js";
|
|
|
27
27
|
import { Blankslate as BlankslateContainer } from "../Blankslate/index.js";
|
|
28
28
|
import { CardActionProps as ActionProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIconProps as IconProps, CardImageProps as ImageProps, CardMetadataProps as MetadataProps, CardProps } from "../Card/Card.js";
|
|
29
29
|
import { Card } from "../Card/index.js";
|
|
30
|
-
import {
|
|
30
|
+
import { TableBulkActionsProps } from "../DataTable/TableBulkActions.js";
|
|
31
|
+
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "../DataTable/DataTable.js";
|
|
31
32
|
import { TableActionsProps, TableBodyProps, TableCellProps, TableContainerProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TableRowSelectionProps, TableSelectionHeaderProps, TableSubtitleProps, TableTitleProps } from "../DataTable/Table.js";
|
|
32
33
|
import { TableGroupProps } from "../DataTable/TableGroup.js";
|
|
33
34
|
import { Table } from "../DataTable/index.js";
|
|
@@ -51,4 +52,4 @@ import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
|
51
52
|
import { TopicTagProps } from "../TopicTag/TopicTag.js";
|
|
52
53
|
import { TopicTagGroupProps } from "../TopicTag/TopicTagGroup.js";
|
|
53
54
|
import { TopicTag } from "../TopicTag/index.js";
|
|
54
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
55
|
+
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
@@ -19,9 +19,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
19
19
|
* the string key is a unique and stable identifier for each component which can be used as a `key` if necessary.
|
|
20
20
|
*
|
|
21
21
|
* @note Note that this pattern is not SSR compatible. It won't raise errors or hydration mismatches, but the
|
|
22
|
-
* registry will not be available during SSR.
|
|
23
|
-
* after hydration on the client. The initial `undefined` value
|
|
24
|
-
* render if necessary.
|
|
22
|
+
* registry will not be available during SSR. Registrations are collected and published during the effect phase,
|
|
23
|
+
* so the registry will be populated after hydration on the client. The initial `undefined` value
|
|
24
|
+
* can be used to safely show loading UI during SSR/initial render if necessary.
|
|
25
25
|
*/
|
|
26
26
|
function createDescendantRegistry() {
|
|
27
27
|
const Context = /*#__PURE__*/ createContext({
|
|
@@ -83,118 +83,136 @@ function createDescendantRegistry() {
|
|
|
83
83
|
}
|
|
84
84
|
const unsetValue = Symbol("unset");
|
|
85
85
|
function Provider(t0) {
|
|
86
|
-
const $ = c(
|
|
86
|
+
const $ = c(21);
|
|
87
87
|
const { children, setRegistry } = t0;
|
|
88
88
|
const workingRegistryRef = useRef("queued");
|
|
89
|
-
const [key, rebuildRegistry] = useReducer(_temp, 0);
|
|
90
|
-
const pendingRebuildRef = useRef(false);
|
|
91
|
-
const isMountedRef = useRef(true);
|
|
92
89
|
let t1;
|
|
93
90
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t1 = ()
|
|
95
|
-
if (pendingRebuildRef.current) return;
|
|
96
|
-
pendingRebuildRef.current = true;
|
|
97
|
-
scheduleMicrotask(() => {
|
|
98
|
-
pendingRebuildRef.current = false;
|
|
99
|
-
if (isMountedRef.current) rebuildRegistry();
|
|
100
|
-
});
|
|
101
|
-
};
|
|
91
|
+
t1 = /* @__PURE__ */ new Map();
|
|
102
92
|
$[0] = t1;
|
|
103
93
|
} else t1 = $[0];
|
|
104
|
-
const
|
|
94
|
+
const registryRef = useRef(t1);
|
|
95
|
+
const [key, rebuildRegistry] = useReducer(_temp, 0);
|
|
96
|
+
const pendingRegistryUpdateRef = useRef(false);
|
|
97
|
+
const isMountedRef = useRef(true);
|
|
105
98
|
let t2;
|
|
106
|
-
|
|
107
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
+
if ($[1] !== setRegistry) {
|
|
108
100
|
t2 = () => {
|
|
101
|
+
if (pendingRegistryUpdateRef.current) return;
|
|
102
|
+
pendingRegistryUpdateRef.current = true;
|
|
103
|
+
scheduleMicrotask(() => {
|
|
104
|
+
pendingRegistryUpdateRef.current = false;
|
|
105
|
+
if (!isMountedRef.current) return;
|
|
106
|
+
if (workingRegistryRef.current === "queued") rebuildRegistry();
|
|
107
|
+
else if (workingRegistryRef.current === "idle") setRegistry(new Map(registryRef.current));
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
$[1] = setRegistry;
|
|
111
|
+
$[2] = t2;
|
|
112
|
+
} else t2 = $[2];
|
|
113
|
+
const scheduleRegistryUpdate = t2;
|
|
114
|
+
let t3;
|
|
115
|
+
let t4;
|
|
116
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
117
|
+
t3 = () => {
|
|
109
118
|
isMountedRef.current = true;
|
|
110
119
|
return () => {
|
|
111
120
|
isMountedRef.current = false;
|
|
112
121
|
};
|
|
113
122
|
};
|
|
114
|
-
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
123
|
+
t4 = [];
|
|
124
|
+
$[3] = t3;
|
|
125
|
+
$[4] = t4;
|
|
117
126
|
} else {
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
t3 = $[3];
|
|
128
|
+
t4 = $[4];
|
|
120
129
|
}
|
|
121
|
-
useEffect(
|
|
122
|
-
let
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
130
|
+
useEffect(t3, t4);
|
|
131
|
+
let t5;
|
|
132
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
+
t5 = function instantiateNewRegistry() {
|
|
125
134
|
if (workingRegistryRef.current === "queued") workingRegistryRef.current = /* @__PURE__ */ new Map();
|
|
126
135
|
};
|
|
127
|
-
$[
|
|
128
|
-
} else
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
$[5] = t5;
|
|
137
|
+
} else t5 = $[5];
|
|
138
|
+
let t6;
|
|
139
|
+
if ($[6] !== key) {
|
|
140
|
+
t6 = [key];
|
|
141
|
+
$[6] = key;
|
|
142
|
+
$[7] = t6;
|
|
143
|
+
} else t6 = $[7];
|
|
144
|
+
useIsomorphicLayoutEffect(t5, t6);
|
|
145
|
+
let t7;
|
|
146
|
+
if ($[8] !== scheduleRegistryUpdate) {
|
|
147
|
+
t7 = (id) => {
|
|
133
148
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.set(id, unsetValue);
|
|
134
149
|
else if (workingRegistryRef.current === "idle") {
|
|
135
150
|
workingRegistryRef.current = "queued";
|
|
136
|
-
|
|
151
|
+
scheduleRegistryUpdate();
|
|
137
152
|
}
|
|
138
153
|
return function unregister() {
|
|
139
154
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.delete(id);
|
|
140
|
-
else if (workingRegistryRef.current === "idle")
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
155
|
+
else if (workingRegistryRef.current === "idle") {
|
|
156
|
+
registryRef.current.delete(id);
|
|
157
|
+
scheduleRegistryUpdate();
|
|
158
|
+
}
|
|
145
159
|
};
|
|
146
160
|
};
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
const register =
|
|
151
|
-
let
|
|
152
|
-
if ($[
|
|
153
|
-
|
|
161
|
+
$[8] = scheduleRegistryUpdate;
|
|
162
|
+
$[9] = t7;
|
|
163
|
+
} else t7 = $[9];
|
|
164
|
+
const register = t7;
|
|
165
|
+
let t8;
|
|
166
|
+
if ($[10] !== scheduleRegistryUpdate) {
|
|
167
|
+
t8 = (id_0, value) => {
|
|
154
168
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.set(id_0, value);
|
|
155
|
-
else if (workingRegistryRef.current === "idle")
|
|
169
|
+
else if (workingRegistryRef.current === "idle") {
|
|
170
|
+
registryRef.current.set(id_0, value);
|
|
171
|
+
scheduleRegistryUpdate();
|
|
172
|
+
}
|
|
156
173
|
};
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
160
|
-
const updateValue =
|
|
161
|
-
let
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
174
|
+
$[10] = scheduleRegistryUpdate;
|
|
175
|
+
$[11] = t8;
|
|
176
|
+
} else t8 = $[11];
|
|
177
|
+
const updateValue = t8;
|
|
178
|
+
let t9;
|
|
179
|
+
if ($[12] !== setRegistry) {
|
|
180
|
+
t9 = function commitWorkingRegistry() {
|
|
164
181
|
if (workingRegistryRef.current instanceof Map) {
|
|
165
182
|
const setEntries = Array.from(workingRegistryRef.current.entries()).filter(_temp2);
|
|
166
|
-
|
|
183
|
+
registryRef.current = new Map(setEntries);
|
|
167
184
|
workingRegistryRef.current = "idle";
|
|
185
|
+
setRegistry(new Map(setEntries));
|
|
168
186
|
}
|
|
169
187
|
};
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else
|
|
173
|
-
useEffect(
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
188
|
+
$[12] = setRegistry;
|
|
189
|
+
$[13] = t9;
|
|
190
|
+
} else t9 = $[13];
|
|
191
|
+
useEffect(t9);
|
|
192
|
+
let t10;
|
|
193
|
+
if ($[14] !== key || $[15] !== register || $[16] !== updateValue) {
|
|
194
|
+
t10 = {
|
|
177
195
|
register,
|
|
178
196
|
updateValue,
|
|
179
197
|
key
|
|
180
198
|
};
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else
|
|
186
|
-
const contextValue =
|
|
187
|
-
let
|
|
188
|
-
if ($[
|
|
189
|
-
|
|
199
|
+
$[14] = key;
|
|
200
|
+
$[15] = register;
|
|
201
|
+
$[16] = updateValue;
|
|
202
|
+
$[17] = t10;
|
|
203
|
+
} else t10 = $[17];
|
|
204
|
+
const contextValue = t10;
|
|
205
|
+
let t11;
|
|
206
|
+
if ($[18] !== children || $[19] !== contextValue) {
|
|
207
|
+
t11 = /* @__PURE__ */ jsx(Context.Provider, {
|
|
190
208
|
value: contextValue,
|
|
191
209
|
children
|
|
192
210
|
});
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
} else
|
|
197
|
-
return
|
|
211
|
+
$[18] = children;
|
|
212
|
+
$[19] = contextValue;
|
|
213
|
+
$[20] = t11;
|
|
214
|
+
} else t11 = $[20];
|
|
215
|
+
return t11;
|
|
198
216
|
}
|
|
199
217
|
function _temp2(entry) {
|
|
200
218
|
return entry[1] !== unsetValue;
|