@primer/react 38.45.0-rc.eb3f2c41a → 38.45.0-rc.faa269337
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 +4 -2
- package/dist/Blankslate/{Blankslate-11d7a7fd.css → Blankslate-670cf090.css} +2 -2
- package/dist/Blankslate/Blankslate-670cf090.css.map +1 -0
- package/dist/Blankslate/Blankslate.js +46 -36
- package/dist/Blankslate/Blankslate.module.css.js +1 -1
- package/dist/DataTable/DataTable.js +5 -0
- package/dist/DataTable/{Table-7f0e985b.css → Table-3916da1f.css} +2 -2
- package/dist/DataTable/Table-3916da1f.css.map +1 -0
- package/dist/DataTable/Table.module.css.js +3 -1
- package/dist/DataTable/TableGroup.d.ts +7 -1
- package/dist/DataTable/TableGroup.js +153 -120
- package/dist/DataTable/useTable.js +111 -83
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/SegmentedControl/SegmentedControl-99b8e34e.css +2 -0
- package/dist/SegmentedControl/SegmentedControl-99b8e34e.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
- package/dist/SegmentedControl/SegmentedControlButton.js +76 -119
- package/dist/TooltipV2/Tooltip.d.ts +1 -1
- package/dist/TooltipV2/Tooltip.js +101 -128
- package/generated/components.json +17 -2
- package/package.json +1 -1
- package/dist/Blankslate/Blankslate-11d7a7fd.css.map +0 -1
- package/dist/DataTable/Table-7f0e985b.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-3dc28307.css +0 -2
- package/dist/SegmentedControl/SegmentedControl-3dc28307.css.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c } from "../utils/react-compiler-runtime.js";
|
|
2
2
|
import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
|
|
3
|
+
import Checkbox from "../Checkbox/Checkbox.js";
|
|
3
4
|
import { useControllableState } from "../hooks/useControllableState.js";
|
|
4
5
|
import { Button } from "../internal/components/ButtonReset.js";
|
|
5
6
|
import { TableGroupContext } from "./TableGroupContext.js";
|
|
@@ -11,8 +12,8 @@ import { clsx } from "clsx";
|
|
|
11
12
|
import { ChevronRightIcon } from "@primer/octicons-react";
|
|
12
13
|
//#region src/DataTable/TableGroup.tsx
|
|
13
14
|
function TableGroup(t0) {
|
|
14
|
-
const $ = c(
|
|
15
|
-
const { className, id, label, rowCount, colSpan, children, "aria-label": ariaLabel, collapsible: t1, expanded: controlledExpanded, defaultExpanded: t2, onExpandedChange } = t0;
|
|
15
|
+
const $ = c(71);
|
|
16
|
+
const { className, id, label, rowCount, colSpan, children, "aria-label": ariaLabel, collapsible: t1, expanded: controlledExpanded, defaultExpanded: t2, onExpandedChange, selection, selectionDisabled, onToggleSelect } = t0;
|
|
16
17
|
const collapsible = t1 === void 0 ? false : t1;
|
|
17
18
|
const defaultExpanded = t2 === void 0 ? true : t2;
|
|
18
19
|
const headerId = useId();
|
|
@@ -69,10 +70,27 @@ function TableGroup(t0) {
|
|
|
69
70
|
t8 = clsx("TableGroupHeaderCell", Table_module_css_default.TableGroupHeaderCell);
|
|
70
71
|
$[12] = t8;
|
|
71
72
|
} else t8 = $[12];
|
|
72
|
-
const t9 = collapsible ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label : ariaLabel;
|
|
73
|
+
const t9 = collapsible || selection !== void 0 ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label : ariaLabel;
|
|
73
74
|
let t10;
|
|
74
|
-
if ($[13] !== ariaLabel || $[14] !==
|
|
75
|
-
t10 =
|
|
75
|
+
if ($[13] !== ariaLabel || $[14] !== label || $[15] !== onToggleSelect || $[16] !== selection || $[17] !== selectionDisabled) {
|
|
76
|
+
t10 = selection !== void 0 ? /* @__PURE__ */ jsx(Checkbox, {
|
|
77
|
+
className: Table_module_css_default.TableGroupSelection,
|
|
78
|
+
checked: selection === "all",
|
|
79
|
+
indeterminate: selection === "some",
|
|
80
|
+
disabled: selectionDisabled || !onToggleSelect,
|
|
81
|
+
"aria-label": `Select ${ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label}`,
|
|
82
|
+
onChange: () => onToggleSelect === null || onToggleSelect === void 0 ? void 0 : onToggleSelect()
|
|
83
|
+
}) : null;
|
|
84
|
+
$[13] = ariaLabel;
|
|
85
|
+
$[14] = label;
|
|
86
|
+
$[15] = onToggleSelect;
|
|
87
|
+
$[16] = selection;
|
|
88
|
+
$[17] = selectionDisabled;
|
|
89
|
+
$[18] = t10;
|
|
90
|
+
} else t10 = $[18];
|
|
91
|
+
let t11;
|
|
92
|
+
if ($[19] !== ariaLabel || $[20] !== bodyId || $[21] !== collapsible || $[22] !== expanded || $[23] !== isExpanded || $[24] !== label || $[25] !== rowCount || $[26] !== setExpanded) {
|
|
93
|
+
t11 = collapsible ? /* @__PURE__ */ jsx(Button, {
|
|
76
94
|
className: Table_module_css_default.TableGroupToggle,
|
|
77
95
|
"data-component": "Table.Group.Toggle",
|
|
78
96
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label,
|
|
@@ -84,78 +102,90 @@ function TableGroup(t0) {
|
|
|
84
102
|
},
|
|
85
103
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true" })
|
|
86
104
|
}) : null;
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
} else
|
|
97
|
-
let
|
|
98
|
-
if ($[
|
|
99
|
-
|
|
100
|
-
$[
|
|
101
|
-
} else
|
|
102
|
-
const
|
|
103
|
-
let t13;
|
|
104
|
-
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
-
t13 = clsx("TableGroupHeaderLabel", Table_module_css_default.TableGroupHeaderLabel);
|
|
106
|
-
$[23] = t13;
|
|
107
|
-
} else t13 = $[23];
|
|
105
|
+
$[19] = ariaLabel;
|
|
106
|
+
$[20] = bodyId;
|
|
107
|
+
$[21] = collapsible;
|
|
108
|
+
$[22] = expanded;
|
|
109
|
+
$[23] = isExpanded;
|
|
110
|
+
$[24] = label;
|
|
111
|
+
$[25] = rowCount;
|
|
112
|
+
$[26] = setExpanded;
|
|
113
|
+
$[27] = t11;
|
|
114
|
+
} else t11 = $[27];
|
|
115
|
+
let t12;
|
|
116
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
117
|
+
t12 = clsx("TableGroupHeaderContent", Table_module_css_default.TableGroupHeaderContent);
|
|
118
|
+
$[28] = t12;
|
|
119
|
+
} else t12 = $[28];
|
|
120
|
+
const t13 = collapsible || void 0;
|
|
108
121
|
let t14;
|
|
109
|
-
if ($[
|
|
110
|
-
t14 =
|
|
111
|
-
$[
|
|
112
|
-
} else t14 = $[
|
|
122
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
123
|
+
t14 = clsx("TableGroupHeaderLabel", Table_module_css_default.TableGroupHeaderLabel);
|
|
124
|
+
$[29] = t14;
|
|
125
|
+
} else t14 = $[29];
|
|
113
126
|
let t15;
|
|
114
|
-
if ($[
|
|
115
|
-
t15 = /* @__PURE__ */
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
$[25] = label;
|
|
120
|
-
$[26] = t15;
|
|
121
|
-
} else t15 = $[26];
|
|
127
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
128
|
+
t15 = /* @__PURE__ */ jsx(VisuallyHidden, { children: "," });
|
|
129
|
+
$[30] = t15;
|
|
130
|
+
} else t15 = $[30];
|
|
122
131
|
let t16;
|
|
123
|
-
if ($[
|
|
124
|
-
t16 =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const t17 = rowCount === 1 ? " row" : " rows";
|
|
128
|
-
let t18;
|
|
129
|
-
if ($[28] !== t17) {
|
|
130
|
-
t18 = /* @__PURE__ */ jsx(VisuallyHidden, { children: t17 });
|
|
131
|
-
$[28] = t17;
|
|
132
|
-
$[29] = t18;
|
|
133
|
-
} else t18 = $[29];
|
|
134
|
-
let t19;
|
|
135
|
-
if ($[30] !== rowCount || $[31] !== t18) {
|
|
136
|
-
t19 = /* @__PURE__ */ jsxs("span", {
|
|
137
|
-
className: t16,
|
|
138
|
-
children: [rowCount, t18]
|
|
132
|
+
if ($[31] !== label) {
|
|
133
|
+
t16 = /* @__PURE__ */ jsxs("span", {
|
|
134
|
+
className: t14,
|
|
135
|
+
children: [label, t15]
|
|
139
136
|
});
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
$[31] = label;
|
|
138
|
+
$[32] = t16;
|
|
139
|
+
} else t16 = $[32];
|
|
140
|
+
let t17;
|
|
141
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
142
|
+
t17 = clsx("TableGroupHeaderCount", Table_module_css_default.TableGroupHeaderCount);
|
|
143
|
+
$[33] = t17;
|
|
144
|
+
} else t17 = $[33];
|
|
145
|
+
const t18 = rowCount === 1 ? " row" : " rows";
|
|
146
|
+
let t19;
|
|
147
|
+
if ($[34] !== t18) {
|
|
148
|
+
t19 = /* @__PURE__ */ jsx(VisuallyHidden, { children: t18 });
|
|
149
|
+
$[34] = t18;
|
|
150
|
+
$[35] = t19;
|
|
151
|
+
} else t19 = $[35];
|
|
144
152
|
let t20;
|
|
145
|
-
if ($[
|
|
153
|
+
if ($[36] !== rowCount || $[37] !== t19) {
|
|
146
154
|
t20 = /* @__PURE__ */ jsxs("span", {
|
|
147
|
-
className:
|
|
148
|
-
|
|
149
|
-
children: [t15, t19]
|
|
155
|
+
className: t17,
|
|
156
|
+
children: [rowCount, t19]
|
|
150
157
|
});
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
|
|
155
|
-
} else t20 = $[36];
|
|
158
|
+
$[36] = rowCount;
|
|
159
|
+
$[37] = t19;
|
|
160
|
+
$[38] = t20;
|
|
161
|
+
} else t20 = $[38];
|
|
156
162
|
let t21;
|
|
157
|
-
if ($[
|
|
158
|
-
t21 = /* @__PURE__ */
|
|
163
|
+
if ($[39] !== t13 || $[40] !== t16 || $[41] !== t20) {
|
|
164
|
+
t21 = /* @__PURE__ */ jsxs("span", {
|
|
165
|
+
className: t12,
|
|
166
|
+
"aria-hidden": t13,
|
|
167
|
+
children: [t16, t20]
|
|
168
|
+
});
|
|
169
|
+
$[39] = t13;
|
|
170
|
+
$[40] = t16;
|
|
171
|
+
$[41] = t20;
|
|
172
|
+
$[42] = t21;
|
|
173
|
+
} else t21 = $[42];
|
|
174
|
+
let t22;
|
|
175
|
+
if ($[43] !== selection || $[44] !== t11 || $[45] !== t21) {
|
|
176
|
+
t22 = /* @__PURE__ */ jsxs("span", {
|
|
177
|
+
className: Table_module_css_default.TableGroupHeaderTitle,
|
|
178
|
+
"data-selection": selection,
|
|
179
|
+
children: [t11, t21]
|
|
180
|
+
});
|
|
181
|
+
$[43] = selection;
|
|
182
|
+
$[44] = t11;
|
|
183
|
+
$[45] = t21;
|
|
184
|
+
$[46] = t22;
|
|
185
|
+
} else t22 = $[46];
|
|
186
|
+
let t23;
|
|
187
|
+
if ($[47] !== colSpan || $[48] !== headerId || $[49] !== t10 || $[50] !== t22 || $[51] !== t9) {
|
|
188
|
+
t23 = /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs("th", {
|
|
159
189
|
id: headerId,
|
|
160
190
|
ref: headerRef,
|
|
161
191
|
className: t8,
|
|
@@ -164,72 +194,75 @@ function TableGroup(t0) {
|
|
|
164
194
|
role: "columnheader",
|
|
165
195
|
"aria-label": t9,
|
|
166
196
|
"data-component": "Table.Group.Header",
|
|
167
|
-
children: [t10,
|
|
197
|
+
children: [t10, t22]
|
|
168
198
|
}) });
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
} else
|
|
176
|
-
let
|
|
177
|
-
if ($[
|
|
178
|
-
|
|
199
|
+
$[47] = colSpan;
|
|
200
|
+
$[48] = headerId;
|
|
201
|
+
$[49] = t10;
|
|
202
|
+
$[50] = t22;
|
|
203
|
+
$[51] = t9;
|
|
204
|
+
$[52] = t23;
|
|
205
|
+
} else t23 = $[52];
|
|
206
|
+
let t24;
|
|
207
|
+
if ($[53] !== id || $[54] !== t23 || $[55] !== t7) {
|
|
208
|
+
t24 = /* @__PURE__ */ jsx("tbody", {
|
|
179
209
|
className: t7,
|
|
180
210
|
role: "rowgroup",
|
|
181
211
|
"data-component": "Table.Group",
|
|
182
212
|
"data-group-id": id,
|
|
183
|
-
children:
|
|
213
|
+
children: t23
|
|
184
214
|
});
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else
|
|
190
|
-
const
|
|
191
|
-
let
|
|
192
|
-
if ($[
|
|
193
|
-
|
|
194
|
-
$[
|
|
195
|
-
} else
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
215
|
+
$[53] = id;
|
|
216
|
+
$[54] = t23;
|
|
217
|
+
$[55] = t7;
|
|
218
|
+
$[56] = t24;
|
|
219
|
+
} else t24 = $[56];
|
|
220
|
+
const t25 = !isExpanded;
|
|
221
|
+
let t26;
|
|
222
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
223
|
+
t26 = clsx("TableBody", Table_module_css_default.TableBody);
|
|
224
|
+
$[57] = t26;
|
|
225
|
+
} else t26 = $[57];
|
|
226
|
+
const t27 = collapsible ? selection : void 0;
|
|
227
|
+
let t28;
|
|
228
|
+
if ($[58] !== children || $[59] !== contextValue) {
|
|
229
|
+
t28 = /* @__PURE__ */ jsx(TableGroupContext.Provider, {
|
|
199
230
|
value: contextValue,
|
|
200
231
|
children
|
|
201
232
|
});
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
} else
|
|
206
|
-
let
|
|
207
|
-
if ($[
|
|
208
|
-
|
|
233
|
+
$[58] = children;
|
|
234
|
+
$[59] = contextValue;
|
|
235
|
+
$[60] = t28;
|
|
236
|
+
} else t28 = $[60];
|
|
237
|
+
let t29;
|
|
238
|
+
if ($[61] !== bodyId || $[62] !== bodyRef || $[63] !== id || $[64] !== t25 || $[65] !== t27 || $[66] !== t28) {
|
|
239
|
+
t29 = /* @__PURE__ */ jsx("tbody", {
|
|
209
240
|
id: bodyId,
|
|
210
241
|
ref: bodyRef,
|
|
211
|
-
hidden:
|
|
212
|
-
className:
|
|
242
|
+
hidden: t25,
|
|
243
|
+
className: t26,
|
|
213
244
|
role: "rowgroup",
|
|
214
245
|
"data-component": "Table.Group.Body",
|
|
215
246
|
"data-group-id": id,
|
|
216
|
-
|
|
247
|
+
"data-selection": t27,
|
|
248
|
+
children: t28
|
|
217
249
|
});
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
|
|
232
|
-
|
|
250
|
+
$[61] = bodyId;
|
|
251
|
+
$[62] = bodyRef;
|
|
252
|
+
$[63] = id;
|
|
253
|
+
$[64] = t25;
|
|
254
|
+
$[65] = t27;
|
|
255
|
+
$[66] = t28;
|
|
256
|
+
$[67] = t29;
|
|
257
|
+
} else t29 = $[67];
|
|
258
|
+
let t30;
|
|
259
|
+
if ($[68] !== t24 || $[69] !== t29) {
|
|
260
|
+
t30 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t24, t29] });
|
|
261
|
+
$[68] = t24;
|
|
262
|
+
$[69] = t29;
|
|
263
|
+
$[70] = t30;
|
|
264
|
+
} else t30 = $[70];
|
|
265
|
+
return t30;
|
|
233
266
|
}
|
|
234
267
|
//#endregion
|
|
235
268
|
export { TableGroup };
|
|
@@ -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(82);
|
|
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;
|
|
@@ -232,13 +232,17 @@ function useTable(t0) {
|
|
|
232
232
|
for (const item_0 of rowOrder) if (isDataTableRowGroup(item_0)) {
|
|
233
233
|
if (body.rows.length > 0) bodies.push(body);
|
|
234
234
|
const groupStartIndex = rowIndex_0;
|
|
235
|
+
const rows_1 = item_0.rows.map((row_1, index_2) => createRow(row_1, groupStartIndex + index_2));
|
|
236
|
+
const selectableRows = rows_1.filter(_temp2);
|
|
235
237
|
bodies.push({
|
|
236
238
|
type: "row-group",
|
|
237
239
|
key: `group:${typeof item_0.groupId}:${item_0.groupId}`,
|
|
238
240
|
id: item_0.groupId,
|
|
239
241
|
label: item_0.label,
|
|
240
|
-
rows:
|
|
242
|
+
rows: rows_1,
|
|
241
243
|
expanded: !collapsibleGroups || expandedGroups.has(item_0.groupId),
|
|
244
|
+
selection: selectableRows.length > 0 && selectableRows.every(_temp3) ? "all" : selectableRows.some(_temp4) ? "some" : "none",
|
|
245
|
+
selectable: selectableRows.length > 0,
|
|
242
246
|
"aria-label": item_0["aria-label"]
|
|
243
247
|
});
|
|
244
248
|
rowIndex_0 = rowIndex_0 + item_0.rows.length;
|
|
@@ -252,7 +256,7 @@ function useTable(t0) {
|
|
|
252
256
|
rowIndex_0 = rowIndex_0 + 1;
|
|
253
257
|
}
|
|
254
258
|
if (body.rows.length > 0 || bodies.length === 0) bodies.push(body);
|
|
255
|
-
t11 = bodies.flatMap(
|
|
259
|
+
t11 = bodies.flatMap(_temp5).filter(_temp6);
|
|
256
260
|
$[23] = collapsibleGroups;
|
|
257
261
|
$[24] = columns;
|
|
258
262
|
$[25] = data;
|
|
@@ -277,25 +281,25 @@ function useTable(t0) {
|
|
|
277
281
|
sortBy = $[39];
|
|
278
282
|
t11 = $[40];
|
|
279
283
|
}
|
|
280
|
-
const
|
|
284
|
+
const selectableRows_0 = t11;
|
|
281
285
|
let t12;
|
|
282
|
-
if ($[45] !==
|
|
283
|
-
t12 = new Set(
|
|
284
|
-
$[45] =
|
|
286
|
+
if ($[45] !== selectableRows_0) {
|
|
287
|
+
t12 = new Set(selectableRows_0.filter(_temp7).map(_temp8));
|
|
288
|
+
$[45] = selectableRows_0;
|
|
285
289
|
$[46] = t12;
|
|
286
290
|
} else t12 = $[46];
|
|
287
291
|
const effectiveSelectedRows = t12;
|
|
288
292
|
const selectedCount = effectiveSelectedRows.size;
|
|
289
|
-
const selectableCount =
|
|
293
|
+
const selectableCount = selectableRows_0.length;
|
|
290
294
|
const allSelected = selectableCount > 0 && selectedCount === selectableCount;
|
|
291
295
|
const someSelected = selectedCount > 0 && !allSelected;
|
|
292
296
|
let t13;
|
|
293
297
|
if ($[47] !== selectedRows || $[48] !== setSelectedRows) {
|
|
294
|
-
t13 = function toggleRowSelection(
|
|
295
|
-
if (!
|
|
298
|
+
t13 = function toggleRowSelection(row_8) {
|
|
299
|
+
if (!row_8.selectable) return;
|
|
296
300
|
const nextSelectedRows_0 = new Set(selectedRows);
|
|
297
|
-
if (nextSelectedRows_0.has(
|
|
298
|
-
else nextSelectedRows_0.add(
|
|
301
|
+
if (nextSelectedRows_0.has(row_8.selectionId)) nextSelectedRows_0.delete(row_8.selectionId);
|
|
302
|
+
else nextSelectedRows_0.add(row_8.selectionId);
|
|
299
303
|
setSelectedRows(nextSelectedRows_0);
|
|
300
304
|
};
|
|
301
305
|
$[47] = selectedRows;
|
|
@@ -303,109 +307,133 @@ function useTable(t0) {
|
|
|
303
307
|
$[49] = t13;
|
|
304
308
|
} else t13 = $[49];
|
|
305
309
|
const toggleRowSelection = t13;
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
+
let toggleAllRows;
|
|
311
|
+
let toggleGroupSelection;
|
|
312
|
+
if ($[50] !== allSelected || $[51] !== selectableRows_0 || $[52] !== selectedRows || $[53] !== setSelectedRows) {
|
|
313
|
+
toggleAllRows = function toggleAllRows() {
|
|
314
|
+
toggleRowsSelection(selectableRows_0, allSelected);
|
|
315
|
+
};
|
|
316
|
+
toggleGroupSelection = function toggleGroupSelection(group_0) {
|
|
317
|
+
toggleRowsSelection(group_0.rows.filter(_temp9), group_0.selection === "all");
|
|
318
|
+
};
|
|
319
|
+
function toggleRowsSelection(rows_2, allSelected_0) {
|
|
320
|
+
if (rows_2.length === 0) return;
|
|
310
321
|
const nextSelectedRows_1 = new Set(selectedRows);
|
|
311
|
-
for (const
|
|
312
|
-
else nextSelectedRows_1.add(
|
|
322
|
+
for (const row_10 of rows_2) if (allSelected_0) nextSelectedRows_1.delete(row_10.selectionId);
|
|
323
|
+
else nextSelectedRows_1.add(row_10.selectionId);
|
|
313
324
|
setSelectedRows(nextSelectedRows_1);
|
|
314
|
-
}
|
|
325
|
+
}
|
|
315
326
|
$[50] = allSelected;
|
|
316
|
-
$[51] =
|
|
327
|
+
$[51] = selectableRows_0;
|
|
317
328
|
$[52] = selectedRows;
|
|
318
329
|
$[53] = setSelectedRows;
|
|
319
|
-
$[54] =
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
330
|
+
$[54] = toggleAllRows;
|
|
331
|
+
$[55] = toggleGroupSelection;
|
|
332
|
+
} else {
|
|
333
|
+
toggleAllRows = $[54];
|
|
334
|
+
toggleGroupSelection = $[55];
|
|
335
|
+
}
|
|
336
|
+
let t14;
|
|
337
|
+
if ($[56] !== collapsibleGroups || $[57] !== expandedGroups || $[58] !== setExpandedGroups) {
|
|
338
|
+
t14 = function toggleGroupExpansion(group_1) {
|
|
325
339
|
if (!collapsibleGroups) return;
|
|
326
340
|
const nextExpandedGroups_0 = new Set(expandedGroups);
|
|
327
|
-
if (nextExpandedGroups_0.has(
|
|
328
|
-
else nextExpandedGroups_0.add(
|
|
341
|
+
if (nextExpandedGroups_0.has(group_1.id)) nextExpandedGroups_0.delete(group_1.id);
|
|
342
|
+
else nextExpandedGroups_0.add(group_1.id);
|
|
329
343
|
setExpandedGroups(nextExpandedGroups_0);
|
|
330
344
|
};
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
} else
|
|
336
|
-
const toggleGroupExpansion =
|
|
337
|
-
let
|
|
338
|
-
if ($[
|
|
339
|
-
|
|
345
|
+
$[56] = collapsibleGroups;
|
|
346
|
+
$[57] = expandedGroups;
|
|
347
|
+
$[58] = setExpandedGroups;
|
|
348
|
+
$[59] = t14;
|
|
349
|
+
} else t14 = $[59];
|
|
350
|
+
const toggleGroupExpansion = t14;
|
|
351
|
+
let t15;
|
|
352
|
+
if ($[60] !== setSelectedRows) {
|
|
353
|
+
t15 = () => {
|
|
340
354
|
setSelectedRows(/* @__PURE__ */ new Set());
|
|
341
355
|
};
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
} else
|
|
345
|
-
let
|
|
346
|
-
if ($[
|
|
347
|
-
|
|
356
|
+
$[60] = setSelectedRows;
|
|
357
|
+
$[61] = t15;
|
|
358
|
+
} else t15 = $[61];
|
|
359
|
+
let t16;
|
|
360
|
+
if ($[62] !== sortBy || $[63] !== t15 || $[64] !== toggleAllRows || $[65] !== toggleGroupExpansion || $[66] !== toggleGroupSelection || $[67] !== toggleRowSelection) {
|
|
361
|
+
t16 = {
|
|
348
362
|
sortBy,
|
|
349
363
|
toggleRowSelection,
|
|
350
364
|
toggleAllRows,
|
|
365
|
+
toggleGroupSelection,
|
|
351
366
|
toggleGroupExpansion,
|
|
352
|
-
clearSelection:
|
|
367
|
+
clearSelection: t15
|
|
353
368
|
};
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
369
|
+
$[62] = sortBy;
|
|
370
|
+
$[63] = t15;
|
|
371
|
+
$[64] = toggleAllRows;
|
|
372
|
+
$[65] = toggleGroupExpansion;
|
|
373
|
+
$[66] = toggleGroupSelection;
|
|
374
|
+
$[67] = toggleRowSelection;
|
|
375
|
+
$[68] = t16;
|
|
376
|
+
} else t16 = $[68];
|
|
377
|
+
const t17 = `${tableId}-selection-column`;
|
|
378
|
+
let t18;
|
|
379
|
+
if ($[69] !== allSelected || $[70] !== effectiveSelectedRows || $[71] !== selectableCount || $[72] !== selectedCount || $[73] !== someSelected || $[74] !== t17) {
|
|
380
|
+
t18 = {
|
|
381
|
+
headerId: t17,
|
|
366
382
|
selectedRows: effectiveSelectedRows,
|
|
367
383
|
allSelected,
|
|
368
384
|
someSelected,
|
|
369
385
|
selectableCount,
|
|
370
386
|
selectedCount
|
|
371
387
|
};
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
} else
|
|
380
|
-
let
|
|
381
|
-
if ($[
|
|
382
|
-
|
|
388
|
+
$[69] = allSelected;
|
|
389
|
+
$[70] = effectiveSelectedRows;
|
|
390
|
+
$[71] = selectableCount;
|
|
391
|
+
$[72] = selectedCount;
|
|
392
|
+
$[73] = someSelected;
|
|
393
|
+
$[74] = t17;
|
|
394
|
+
$[75] = t18;
|
|
395
|
+
} else t18 = $[75];
|
|
396
|
+
let t19;
|
|
397
|
+
if ($[76] !== bodies || $[77] !== gridTemplateColumns || $[78] !== headers || $[79] !== t16 || $[80] !== t18) {
|
|
398
|
+
t19 = {
|
|
383
399
|
headers,
|
|
384
|
-
actions:
|
|
385
|
-
selection:
|
|
400
|
+
actions: t16,
|
|
401
|
+
selection: t18,
|
|
386
402
|
gridTemplateColumns,
|
|
387
403
|
bodies
|
|
388
404
|
};
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
} else
|
|
396
|
-
return
|
|
405
|
+
$[76] = bodies;
|
|
406
|
+
$[77] = gridTemplateColumns;
|
|
407
|
+
$[78] = headers;
|
|
408
|
+
$[79] = t16;
|
|
409
|
+
$[80] = t18;
|
|
410
|
+
$[81] = t19;
|
|
411
|
+
} else t19 = $[81];
|
|
412
|
+
return t19;
|
|
413
|
+
}
|
|
414
|
+
function _temp9(row_9) {
|
|
415
|
+
return row_9.selectable;
|
|
416
|
+
}
|
|
417
|
+
function _temp8(row_7) {
|
|
418
|
+
return row_7.selectionId;
|
|
397
419
|
}
|
|
398
|
-
function
|
|
399
|
-
return
|
|
420
|
+
function _temp7(row_6) {
|
|
421
|
+
return row_6.selected;
|
|
422
|
+
}
|
|
423
|
+
function _temp6(row_5) {
|
|
424
|
+
return row_5.selectable;
|
|
425
|
+
}
|
|
426
|
+
function _temp5(body_0) {
|
|
427
|
+
return body_0.rows;
|
|
400
428
|
}
|
|
401
429
|
function _temp4(row_3) {
|
|
402
430
|
return row_3.selected;
|
|
403
431
|
}
|
|
404
|
-
function _temp3(
|
|
405
|
-
return
|
|
432
|
+
function _temp3(row_4) {
|
|
433
|
+
return row_4.selected;
|
|
406
434
|
}
|
|
407
|
-
function _temp2(
|
|
408
|
-
return
|
|
435
|
+
function _temp2(row_2) {
|
|
436
|
+
return row_2.selectable;
|
|
409
437
|
}
|
|
410
438
|
function _temp(group) {
|
|
411
439
|
return group.groupId;
|
|
@@ -10,7 +10,8 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
|
10
10
|
primer_react_action_list_item_gap: false,
|
|
11
11
|
primer_react_timeline_list_semantics: false,
|
|
12
12
|
primer_react_merged_forwarded_refs: false,
|
|
13
|
-
primer_react_button_loading_disabled_styles: false
|
|
13
|
+
primer_react_button_loading_disabled_styles: false,
|
|
14
|
+
primer_react_blankslate_compact_default: false
|
|
14
15
|
});
|
|
15
16
|
//#endregion
|
|
16
17
|
export { DefaultFeatureFlags };
|