@gridkitjs/react 0.0.0-dev-20261112194323 → 0.0.0-dev-20261112195815
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/dist/index.d.ts +3 -3
- package/dist/index.js +190 -129
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -176,7 +176,7 @@ function GridHeader({
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
return /* @__PURE__ */ jsxs2("thead", { role: "rowgroup", children: [
|
|
179
|
-
/* @__PURE__ */ jsx3("tr", { className: "grid-header", role: "row", "aria-rowindex": 1, children: columns.map((entry, index) => {
|
|
179
|
+
/* @__PURE__ */ jsx3("tr", { className: "gridkit-grid-header", role: "row", "aria-rowindex": 1, children: columns.map((entry, index) => {
|
|
180
180
|
const { column } = entry;
|
|
181
181
|
const resizing = resize.activeColumnId === entry.id;
|
|
182
182
|
const dragging = drag.draggedColumnId === entry.id;
|
|
@@ -221,7 +221,7 @@ function GridHeader({
|
|
|
221
221
|
if (drag.justDragged(entry.id)) {
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
if (event.target instanceof Element && (event.target.closest(".header-resize-handle") !== null || event.target.closest(".header-sort-toggle") !== null || event.target.closest(".header-group-toggle") !== null || event.target.closest(".header-filter-toggle") !== null)) {
|
|
224
|
+
if (event.target instanceof Element && (event.target.closest(".gridkit-header-resize-handle") !== null || event.target.closest(".gridkit-header-sort-toggle") !== null || event.target.closest(".gridkit-header-group-toggle") !== null || event.target.closest(".gridkit-header-filter-toggle") !== null)) {
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
selection.selectColumn(entry.id, intentOf(event));
|
|
@@ -273,7 +273,7 @@ function GridHeader({
|
|
|
273
273
|
nav.onKeyDown(event);
|
|
274
274
|
},
|
|
275
275
|
className: classNames(
|
|
276
|
-
"header-cell",
|
|
276
|
+
"gridkit-header-cell",
|
|
277
277
|
// The grab affordance a header showing either drag
|
|
278
278
|
// destination shares — a column dragged only for grouping
|
|
279
279
|
// (`groupByDraggable` without `reorderable`) grabs the same
|
|
@@ -317,7 +317,7 @@ function GridHeader({
|
|
|
317
317
|
"span",
|
|
318
318
|
{
|
|
319
319
|
className: classNames(
|
|
320
|
-
"header-group-toggle",
|
|
320
|
+
"gridkit-header-group-toggle",
|
|
321
321
|
isGrouped ? "is-grouped" : ""
|
|
322
322
|
),
|
|
323
323
|
"aria-hidden": "true",
|
|
@@ -343,7 +343,7 @@ function GridHeader({
|
|
|
343
343
|
"span",
|
|
344
344
|
{
|
|
345
345
|
className: classNames(
|
|
346
|
-
"header-sort-toggle",
|
|
346
|
+
"gridkit-header-sort-toggle",
|
|
347
347
|
sortDirection !== null ? `is-sorted-${sortDirection}` : ""
|
|
348
348
|
),
|
|
349
349
|
"aria-hidden": "true",
|
|
@@ -358,7 +358,7 @@ function GridHeader({
|
|
|
358
358
|
},
|
|
359
359
|
children: [
|
|
360
360
|
sortDirection === null ? /* @__PURE__ */ jsx3(ChevronsUpDownIcon, {}) : /* @__PURE__ */ jsx3(ChevronUpIcon, {}),
|
|
361
|
-
sortPriority !== null && sortPriority > 1 && /* @__PURE__ */ jsx3("span", { className: "header-sort-priority", children: sortPriority })
|
|
361
|
+
sortPriority !== null && sortPriority > 1 && /* @__PURE__ */ jsx3("span", { className: "gridkit-header-sort-priority", children: sortPriority })
|
|
362
362
|
]
|
|
363
363
|
}
|
|
364
364
|
),
|
|
@@ -372,7 +372,7 @@ function GridHeader({
|
|
|
372
372
|
"span",
|
|
373
373
|
{
|
|
374
374
|
className: classNames(
|
|
375
|
-
"header-filter-toggle",
|
|
375
|
+
"gridkit-header-filter-toggle",
|
|
376
376
|
filtered ? "is-filtered" : ""
|
|
377
377
|
),
|
|
378
378
|
"aria-hidden": "true",
|
|
@@ -395,7 +395,7 @@ function GridHeader({
|
|
|
395
395
|
/* @__PURE__ */ jsx3(
|
|
396
396
|
"span",
|
|
397
397
|
{
|
|
398
|
-
className: "header-resize-handle",
|
|
398
|
+
className: "gridkit-header-resize-handle",
|
|
399
399
|
"aria-hidden": "true",
|
|
400
400
|
tabIndex: -1,
|
|
401
401
|
onPointerDown: (event) => {
|
|
@@ -415,7 +415,7 @@ function GridHeader({
|
|
|
415
415
|
/* @__PURE__ */ jsx3(
|
|
416
416
|
"div",
|
|
417
417
|
{
|
|
418
|
-
className: "gridkit-data-grid header-cell drag-ghost",
|
|
418
|
+
className: "gridkit-data-grid gridkit-header-cell gridkit-drag-ghost",
|
|
419
419
|
style: {
|
|
420
420
|
width: draggedEntry.width,
|
|
421
421
|
transform: drag.ghostTransform
|
|
@@ -615,7 +615,7 @@ function GridGroupRowComponent({
|
|
|
615
615
|
"data-gridkit-group": groupId,
|
|
616
616
|
"data-gridkit-row-index": rowIndex,
|
|
617
617
|
className: classNames(
|
|
618
|
-
"grid-group-row",
|
|
618
|
+
"gridkit-grid-group-row",
|
|
619
619
|
`is-group-level-${String(level)}`
|
|
620
620
|
),
|
|
621
621
|
children: /* @__PURE__ */ jsx4(
|
|
@@ -625,35 +625,35 @@ function GridGroupRowComponent({
|
|
|
625
625
|
colSpan: columnCount,
|
|
626
626
|
tabIndex: focused ? 0 : -1,
|
|
627
627
|
"aria-keyshortcuts": contextMenu ? "Space Enter Shift+F10" : "Space Enter",
|
|
628
|
-
className: "grid-group-cell",
|
|
628
|
+
className: "gridkit-grid-group-cell",
|
|
629
629
|
children: /* @__PURE__ */ jsxs3(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
|
-
className: "grid-group-cell-content",
|
|
632
|
+
className: "gridkit-grid-group-cell-content",
|
|
633
633
|
style: { paddingInlineStart: `${String(level * 1.25 + 0.5)}rem` },
|
|
634
634
|
children: [
|
|
635
635
|
/* @__PURE__ */ jsx4(
|
|
636
636
|
"span",
|
|
637
637
|
{
|
|
638
638
|
className: classNames(
|
|
639
|
-
"group-toggle",
|
|
639
|
+
"gridkit-group-toggle",
|
|
640
640
|
expanded ? "is-expanded" : "is-collapsed"
|
|
641
641
|
),
|
|
642
642
|
"aria-hidden": "true"
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
|
-
/* @__PURE__ */ jsxs3("span", { className: "group-label", children: [
|
|
645
|
+
/* @__PURE__ */ jsxs3("span", { className: "gridkit-group-label", children: [
|
|
646
646
|
resolveColumnLabel(groupColumn),
|
|
647
647
|
":",
|
|
648
648
|
" ",
|
|
649
649
|
formatGroupValue(value, groupColumn, locale, cellMessages)
|
|
650
650
|
] }),
|
|
651
|
-
/* @__PURE__ */ jsxs3("span", { className: "group-count", children: [
|
|
651
|
+
/* @__PURE__ */ jsxs3("span", { className: "gridkit-group-count", children: [
|
|
652
652
|
"(",
|
|
653
653
|
count,
|
|
654
654
|
")"
|
|
655
655
|
] }),
|
|
656
|
-
aggregates.length > 0 && /* @__PURE__ */ jsx4("span", { className: "group-aggregates", children: aggregates.map((spec) => {
|
|
656
|
+
aggregates.length > 0 && /* @__PURE__ */ jsx4("span", { className: "gridkit-group-aggregates", children: aggregates.map((spec) => {
|
|
657
657
|
const key = spec.id ?? spec.columnId;
|
|
658
658
|
const aggregateValue = results.get(key);
|
|
659
659
|
const column = definitions.get(spec.columnId);
|
|
@@ -665,7 +665,7 @@ function GridGroupRowComponent({
|
|
|
665
665
|
locale
|
|
666
666
|
);
|
|
667
667
|
const aggregateLabel = spec.id ?? (column === void 0 ? spec.columnId : resolveColumnLabel(column));
|
|
668
|
-
return /* @__PURE__ */ jsxs3("span", { className: "group-aggregate", children: [
|
|
668
|
+
return /* @__PURE__ */ jsxs3("span", { className: "gridkit-group-aggregate", children: [
|
|
669
669
|
aggregateLabel,
|
|
670
670
|
": ",
|
|
671
671
|
rendered
|
|
@@ -707,7 +707,7 @@ function GridGroupSummaryRowComponent({
|
|
|
707
707
|
"data-gridkit-group-summary": groupId,
|
|
708
708
|
"data-gridkit-row-index": rowIndex,
|
|
709
709
|
className: classNames(
|
|
710
|
-
"grid-group-summary-row",
|
|
710
|
+
"gridkit-grid-group-summary-row",
|
|
711
711
|
`is-group-level-${String(level)}`
|
|
712
712
|
),
|
|
713
713
|
children: columns.map((entry) => {
|
|
@@ -719,13 +719,13 @@ function GridGroupSummaryRowComponent({
|
|
|
719
719
|
{
|
|
720
720
|
role: "gridcell",
|
|
721
721
|
"data-gridkit-column": entry.id,
|
|
722
|
-
className: "grid-group-summary-cell",
|
|
722
|
+
className: "gridkit-grid-group-summary-cell",
|
|
723
723
|
style: { textAlign: specs[0]?.alignment ?? entry.alignment },
|
|
724
724
|
children: [
|
|
725
725
|
entry.id === columns[0]?.id && /* @__PURE__ */ jsx5(
|
|
726
726
|
"span",
|
|
727
727
|
{
|
|
728
|
-
className: "grid-group-summary-indent",
|
|
728
|
+
className: "gridkit-grid-group-summary-indent",
|
|
729
729
|
style: { width: `${String(level * 1.25 + 0.5)}rem` },
|
|
730
730
|
"aria-hidden": "true"
|
|
731
731
|
}
|
|
@@ -796,7 +796,7 @@ function GridRowComponent({
|
|
|
796
796
|
"data-gridkit-row-id": rowId,
|
|
797
797
|
...ariaAttr(rowsSelectable, "aria-selected", selected),
|
|
798
798
|
className: classNames(
|
|
799
|
-
"grid-row",
|
|
799
|
+
"gridkit-grid-row",
|
|
800
800
|
selected ? "is-selected" : "",
|
|
801
801
|
rowClassName
|
|
802
802
|
),
|
|
@@ -813,7 +813,7 @@ function GridRowComponent({
|
|
|
813
813
|
...ariaAttr(cellsSelectable, "aria-selected", cellSelected),
|
|
814
814
|
...ariaAttr(shortcuts !== "", "aria-keyshortcuts", shortcuts),
|
|
815
815
|
className: classNames(
|
|
816
|
-
"grid-cell",
|
|
816
|
+
"gridkit-grid-cell",
|
|
817
817
|
id === activeColumnId ? "is-resizing" : "",
|
|
818
818
|
cellSelected || selectedColumnIds.has(id) ? "is-selected" : "",
|
|
819
819
|
column.wrap?.cells ? "is-wrapped" : "",
|
|
@@ -942,7 +942,7 @@ function GridBody({
|
|
|
942
942
|
"tbody",
|
|
943
943
|
{
|
|
944
944
|
role: "rowgroup",
|
|
945
|
-
className: "grid-body",
|
|
945
|
+
className: "gridkit-grid-body",
|
|
946
946
|
onFocus: (event) => {
|
|
947
947
|
const group = groupRowFrom(event.target);
|
|
948
948
|
if (group !== null) {
|
|
@@ -1105,13 +1105,20 @@ function GridBody({
|
|
|
1105
1105
|
}
|
|
1106
1106
|
) }),
|
|
1107
1107
|
infiniteScroll?.hasMore && /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1108
|
-
infiniteScroll.isLoadingMore === true && /* @__PURE__ */ jsx7("tr", { "aria-hidden": "true", className: "grid-loading-row", children: /* @__PURE__ */ jsx7(
|
|
1108
|
+
infiniteScroll.isLoadingMore === true && /* @__PURE__ */ jsx7("tr", { "aria-hidden": "true", className: "gridkit-grid-loading-row", children: /* @__PURE__ */ jsx7(
|
|
1109
|
+
"td",
|
|
1110
|
+
{
|
|
1111
|
+
colSpan: columns.length,
|
|
1112
|
+
className: "gridkit-grid-loading-cell",
|
|
1113
|
+
children: infiniteScroll.loadingTemplate ? infiniteScroll.loadingTemplate() : messages.loadingMore
|
|
1114
|
+
}
|
|
1115
|
+
) }),
|
|
1109
1116
|
/* @__PURE__ */ jsx7(
|
|
1110
1117
|
"tr",
|
|
1111
1118
|
{
|
|
1112
1119
|
"aria-hidden": "true",
|
|
1113
1120
|
ref: sentinelRef,
|
|
1114
|
-
className: "grid-sentinel-row",
|
|
1121
|
+
className: "gridkit-grid-sentinel-row",
|
|
1115
1122
|
children: /* @__PURE__ */ jsx7(
|
|
1116
1123
|
"td",
|
|
1117
1124
|
{
|
|
@@ -1137,32 +1144,40 @@ function GridFooter({
|
|
|
1137
1144
|
locale,
|
|
1138
1145
|
ariaRowIndex
|
|
1139
1146
|
}) {
|
|
1140
|
-
return /* @__PURE__ */ jsx8("tfoot", { role: "rowgroup", children: /* @__PURE__ */ jsx8(
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
"
|
|
1146
|
-
{
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1147
|
+
return /* @__PURE__ */ jsx8("tfoot", { role: "rowgroup", children: /* @__PURE__ */ jsx8(
|
|
1148
|
+
"tr",
|
|
1149
|
+
{
|
|
1150
|
+
className: "gridkit-grid-footer",
|
|
1151
|
+
role: "row",
|
|
1152
|
+
"aria-rowindex": ariaRowIndex,
|
|
1153
|
+
children: columns.map((entry) => {
|
|
1154
|
+
const specs = aggregates.filter(
|
|
1155
|
+
(candidate) => candidate.columnId === entry.id
|
|
1156
|
+
);
|
|
1157
|
+
return /* @__PURE__ */ jsx8(
|
|
1158
|
+
"td",
|
|
1159
|
+
{
|
|
1160
|
+
role: "gridcell",
|
|
1161
|
+
"data-gridkit-column": entry.id,
|
|
1162
|
+
className: "gridkit-grid-footer-cell",
|
|
1163
|
+
style: { textAlign: specs[0]?.alignment ?? entry.alignment },
|
|
1164
|
+
children: specs.map(
|
|
1165
|
+
(spec) => renderAggregate(
|
|
1166
|
+
results.get(spec.id ?? spec.columnId),
|
|
1167
|
+
spec,
|
|
1168
|
+
entry.column,
|
|
1169
|
+
rows,
|
|
1170
|
+
locale
|
|
1171
|
+
)
|
|
1172
|
+
).flatMap(
|
|
1173
|
+
(rendered, index) => index === 0 ? [rendered] : [", ", rendered]
|
|
1174
|
+
)
|
|
1175
|
+
},
|
|
1176
|
+
entry.id
|
|
1177
|
+
);
|
|
1178
|
+
})
|
|
1179
|
+
}
|
|
1180
|
+
) });
|
|
1166
1181
|
}
|
|
1167
1182
|
|
|
1168
1183
|
// src/DataGrid/components/GridPager.tsx
|
|
@@ -1179,7 +1194,7 @@ function PagerNavButton({
|
|
|
1179
1194
|
"button",
|
|
1180
1195
|
{
|
|
1181
1196
|
type: "button",
|
|
1182
|
-
className: `grid-pager-button grid-pager-nav ${className}`,
|
|
1197
|
+
className: `gridkit-grid-pager-button gridkit-grid-pager-nav ${className}`,
|
|
1183
1198
|
"aria-label": label,
|
|
1184
1199
|
title: label,
|
|
1185
1200
|
...ariaAttr(disabled, "aria-disabled", true),
|
|
@@ -1206,11 +1221,11 @@ function GridPager({ pager, config, messages }) {
|
|
|
1206
1221
|
role: "group",
|
|
1207
1222
|
"aria-label": messages.pagerLabel,
|
|
1208
1223
|
children: [
|
|
1209
|
-
/* @__PURE__ */ jsxs6("div", { className: "grid-pager-bar", style: barStyle, children: [
|
|
1224
|
+
/* @__PURE__ */ jsxs6("div", { className: "gridkit-grid-pager-bar", style: barStyle, children: [
|
|
1210
1225
|
/* @__PURE__ */ jsx9(
|
|
1211
1226
|
PagerNavButton,
|
|
1212
1227
|
{
|
|
1213
|
-
className: "grid-pager-first",
|
|
1228
|
+
className: "gridkit-grid-pager-first",
|
|
1214
1229
|
label: messages.firstPage,
|
|
1215
1230
|
disabled: atFirst,
|
|
1216
1231
|
onClick: () => {
|
|
@@ -1222,7 +1237,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1222
1237
|
/* @__PURE__ */ jsx9(
|
|
1223
1238
|
PagerNavButton,
|
|
1224
1239
|
{
|
|
1225
|
-
className: "grid-pager-previous",
|
|
1240
|
+
className: "gridkit-grid-pager-previous",
|
|
1226
1241
|
label: messages.previousPage,
|
|
1227
1242
|
disabled: atFirst,
|
|
1228
1243
|
onClick: () => {
|
|
@@ -1238,7 +1253,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1238
1253
|
(entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx9(
|
|
1239
1254
|
"span",
|
|
1240
1255
|
{
|
|
1241
|
-
className: "grid-pager-ellipsis",
|
|
1256
|
+
className: "gridkit-grid-pager-ellipsis",
|
|
1242
1257
|
"aria-hidden": "true",
|
|
1243
1258
|
children: "\u2026"
|
|
1244
1259
|
},
|
|
@@ -1247,7 +1262,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1247
1262
|
"button",
|
|
1248
1263
|
{
|
|
1249
1264
|
type: "button",
|
|
1250
|
-
className: "grid-pager-button grid-pager-page",
|
|
1265
|
+
className: "gridkit-grid-pager-button gridkit-grid-pager-page",
|
|
1251
1266
|
"aria-label": messages.pageButtonLabel(entry),
|
|
1252
1267
|
"aria-current": entry === currentPage ? "page" : void 0,
|
|
1253
1268
|
onClick: () => {
|
|
@@ -1257,17 +1272,24 @@ function GridPager({ pager, config, messages }) {
|
|
|
1257
1272
|
},
|
|
1258
1273
|
entry
|
|
1259
1274
|
)
|
|
1260
|
-
) : /* @__PURE__ */ jsxs6("span", { className: "grid-pager-status-slot", children: [
|
|
1261
|
-
/* @__PURE__ */ jsx9("span", { className: "grid-pager-status", children: messages.pageStatus(
|
|
1275
|
+
) : /* @__PURE__ */ jsxs6("span", { className: "gridkit-grid-pager-status-slot", children: [
|
|
1276
|
+
/* @__PURE__ */ jsx9("span", { className: "gridkit-grid-pager-status", children: messages.pageStatus(
|
|
1262
1277
|
pageCount === 0 ? 0 : currentPage,
|
|
1263
1278
|
pageCount
|
|
1264
1279
|
) }),
|
|
1265
|
-
/* @__PURE__ */ jsx9(
|
|
1280
|
+
/* @__PURE__ */ jsx9(
|
|
1281
|
+
"span",
|
|
1282
|
+
{
|
|
1283
|
+
className: "gridkit-grid-pager-status-sizer",
|
|
1284
|
+
"aria-hidden": "true",
|
|
1285
|
+
children: messages.pageStatus(pageCount, pageCount)
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1266
1288
|
] }),
|
|
1267
1289
|
/* @__PURE__ */ jsx9(
|
|
1268
1290
|
PagerNavButton,
|
|
1269
1291
|
{
|
|
1270
|
-
className: "grid-pager-next",
|
|
1292
|
+
className: "gridkit-grid-pager-next",
|
|
1271
1293
|
label: messages.nextPage,
|
|
1272
1294
|
disabled: atLast,
|
|
1273
1295
|
onClick: () => {
|
|
@@ -1279,7 +1301,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1279
1301
|
/* @__PURE__ */ jsx9(
|
|
1280
1302
|
PagerNavButton,
|
|
1281
1303
|
{
|
|
1282
|
-
className: "grid-pager-last",
|
|
1304
|
+
className: "gridkit-grid-pager-last",
|
|
1283
1305
|
label: messages.lastPage,
|
|
1284
1306
|
disabled: atLast,
|
|
1285
1307
|
onClick: () => {
|
|
@@ -1289,7 +1311,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1289
1311
|
}
|
|
1290
1312
|
)
|
|
1291
1313
|
] }),
|
|
1292
|
-
sizeOptions !== void 0 && sizeOptions.length > 0 && /* @__PURE__ */ jsxs6("label", { className: "grid-pager-page-size", children: [
|
|
1314
|
+
sizeOptions !== void 0 && sizeOptions.length > 0 && /* @__PURE__ */ jsxs6("label", { className: "gridkit-grid-pager-page-size", children: [
|
|
1293
1315
|
/* @__PURE__ */ jsx9(
|
|
1294
1316
|
"select",
|
|
1295
1317
|
{
|
|
@@ -1300,7 +1322,7 @@ function GridPager({ pager, config, messages }) {
|
|
|
1300
1322
|
children: sizeOptions.map((size) => /* @__PURE__ */ jsx9("option", { value: size, children: size }, size))
|
|
1301
1323
|
}
|
|
1302
1324
|
),
|
|
1303
|
-
/* @__PURE__ */ jsx9("span", { className: "grid-pager-page-size-label", children: messages.pageSizeLabel })
|
|
1325
|
+
/* @__PURE__ */ jsx9("span", { className: "gridkit-grid-pager-page-size-label", children: messages.pageSizeLabel })
|
|
1304
1326
|
] })
|
|
1305
1327
|
]
|
|
1306
1328
|
}
|
|
@@ -1477,7 +1499,7 @@ function GroupByBar({
|
|
|
1477
1499
|
role: "group",
|
|
1478
1500
|
"aria-label": messages.groupByBarLabel,
|
|
1479
1501
|
children: [
|
|
1480
|
-
showPlaceholder && /* @__PURE__ */ jsx10("span", { className: "group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
|
|
1502
|
+
showPlaceholder && /* @__PURE__ */ jsx10("span", { className: "gridkit-group-by-bar-placeholder", children: messages.groupByBarPlaceholder }),
|
|
1481
1503
|
groupBy.map((entry, index) => {
|
|
1482
1504
|
const dropBefore = activeDropTarget?.beforeColumnId === entry.columnId;
|
|
1483
1505
|
const dropAfter = activeDropTarget?.beforeColumnId === null && index === groupBy.length - 1;
|
|
@@ -1486,7 +1508,7 @@ function GroupByBar({
|
|
|
1486
1508
|
"span",
|
|
1487
1509
|
{
|
|
1488
1510
|
className: classNames(
|
|
1489
|
-
"group-by-chip",
|
|
1511
|
+
"gridkit-group-by-chip",
|
|
1490
1512
|
dragging ? "is-dragging" : "",
|
|
1491
1513
|
dropBefore ? "is-drop-before" : "",
|
|
1492
1514
|
dropAfter ? "is-drop-after" : ""
|
|
@@ -1513,12 +1535,12 @@ function GroupByBar({
|
|
|
1513
1535
|
}
|
|
1514
1536
|
},
|
|
1515
1537
|
children: [
|
|
1516
|
-
/* @__PURE__ */ jsx10("span", { className: "group-by-chip-label", children: labelFor(entry.columnId) }),
|
|
1538
|
+
/* @__PURE__ */ jsx10("span", { className: "gridkit-group-by-chip-label", children: labelFor(entry.columnId) }),
|
|
1517
1539
|
/* @__PURE__ */ jsx10(
|
|
1518
1540
|
"button",
|
|
1519
1541
|
{
|
|
1520
1542
|
type: "button",
|
|
1521
|
-
className: "group-by-chip-remove",
|
|
1543
|
+
className: "gridkit-group-by-chip-remove",
|
|
1522
1544
|
"aria-label": messages.removeGroupBy(columnName(entry.columnId)),
|
|
1523
1545
|
onPointerDown: (event) => {
|
|
1524
1546
|
event.stopPropagation();
|
|
@@ -1538,7 +1560,7 @@ function GroupByBar({
|
|
|
1538
1560
|
/* @__PURE__ */ jsx10(
|
|
1539
1561
|
"span",
|
|
1540
1562
|
{
|
|
1541
|
-
className: "group-by-chip drag-ghost",
|
|
1563
|
+
className: "gridkit-group-by-chip gridkit-drag-ghost",
|
|
1542
1564
|
style: { transform: chipDrag.ghostTransform },
|
|
1543
1565
|
"aria-hidden": "true",
|
|
1544
1566
|
children: labelFor(chipDrag.draggedColumnId)
|
|
@@ -1569,8 +1591,8 @@ function announcedCallbacks({
|
|
|
1569
1591
|
* continuous `"move"` phase as well, and a live region given every frame
|
|
1570
1592
|
* of a drag says nothing an assistive technology can keep up with.
|
|
1571
1593
|
*/
|
|
1572
|
-
|
|
1573
|
-
callbacks.
|
|
1594
|
+
onColumnSizingChange: (event) => {
|
|
1595
|
+
callbacks.onColumnSizingChange?.(event);
|
|
1574
1596
|
if (event.phase === "end") {
|
|
1575
1597
|
announce(
|
|
1576
1598
|
messages.columnResized(
|
|
@@ -2113,17 +2135,17 @@ function MenuItem({
|
|
|
2113
2135
|
{
|
|
2114
2136
|
role: checked === void 0 ? "menuitem" : "menuitemcheckbox",
|
|
2115
2137
|
"data-gridkit-menu-item": entry.id,
|
|
2116
|
-
className: "menu-item",
|
|
2138
|
+
className: "gridkit-menu-item",
|
|
2117
2139
|
...ariaAttr(isItem2 && entry.disabled, "aria-disabled", true),
|
|
2118
2140
|
...ariaAttr(checked !== void 0, "aria-checked", checked),
|
|
2119
2141
|
...ariaAttr(shortcut !== void 0, "aria-keyshortcuts", shortcut),
|
|
2120
2142
|
...ariaAttr(!isItem2, "aria-haspopup", "menu"),
|
|
2121
2143
|
...ariaAttr(!isItem2, "aria-expanded", expanded),
|
|
2122
2144
|
children: [
|
|
2123
|
-
/* @__PURE__ */ jsx13("span", { className: "menu-item-icon", "aria-hidden": "true", children: checked === true ? /* @__PURE__ */ jsx13(CheckIcon, {}) : /* @__PURE__ */ jsx13(MenuIcon, { name: entry.icon }) }),
|
|
2124
|
-
/* @__PURE__ */ jsx13("span", { className: "menu-item-label", children: entry.label }),
|
|
2125
|
-
shortcut !== void 0 && /* @__PURE__ */ jsx13("span", { className: "menu-item-shortcut", "aria-hidden": "true", children: shortcut }),
|
|
2126
|
-
!isItem2 && /* @__PURE__ */ jsx13("span", { className: "menu-submenu-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(ChevronRightIcon2, {}) })
|
|
2145
|
+
/* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-icon", "aria-hidden": "true", children: checked === true ? /* @__PURE__ */ jsx13(CheckIcon, {}) : /* @__PURE__ */ jsx13(MenuIcon, { name: entry.icon }) }),
|
|
2146
|
+
/* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-label", children: entry.label }),
|
|
2147
|
+
shortcut !== void 0 && /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-item-shortcut", "aria-hidden": "true", children: shortcut }),
|
|
2148
|
+
!isItem2 && /* @__PURE__ */ jsx13("span", { className: "gridkit-menu-submenu-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(ChevronRightIcon2, {}) })
|
|
2127
2149
|
]
|
|
2128
2150
|
}
|
|
2129
2151
|
);
|
|
@@ -2226,7 +2248,14 @@ function GridMenu({
|
|
|
2226
2248
|
"aria-label": label,
|
|
2227
2249
|
className: "gridkit-menu",
|
|
2228
2250
|
children: entries.map(
|
|
2229
|
-
(entry) => entry.type === "separator" ? /* @__PURE__ */ jsx13(
|
|
2251
|
+
(entry) => entry.type === "separator" ? /* @__PURE__ */ jsx13(
|
|
2252
|
+
"div",
|
|
2253
|
+
{
|
|
2254
|
+
role: "separator",
|
|
2255
|
+
className: "gridkit-menu-separator"
|
|
2256
|
+
},
|
|
2257
|
+
entry.key
|
|
2258
|
+
) : /* @__PURE__ */ jsx13(
|
|
2230
2259
|
MenuItem,
|
|
2231
2260
|
{
|
|
2232
2261
|
entry,
|
|
@@ -2665,7 +2694,7 @@ function ColumnChooser({
|
|
|
2665
2694
|
"input",
|
|
2666
2695
|
{
|
|
2667
2696
|
type: "search",
|
|
2668
|
-
className: "column-chooser-search",
|
|
2697
|
+
className: "gridkit-column-chooser-search",
|
|
2669
2698
|
"aria-label": messages.columnChooserSearchLabel,
|
|
2670
2699
|
placeholder: messages.searchPlaceholder,
|
|
2671
2700
|
value: search,
|
|
@@ -2674,8 +2703,8 @@ function ColumnChooser({
|
|
|
2674
2703
|
}
|
|
2675
2704
|
}
|
|
2676
2705
|
),
|
|
2677
|
-
entries.length === 0 ? /* @__PURE__ */ jsx15("p", { role: "status", className: "column-chooser-empty", children: messages.noMatchingColumns }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
2678
|
-
/* @__PURE__ */ jsxs10("label", { className: "column-chooser-option column-chooser-all", children: [
|
|
2706
|
+
entries.length === 0 ? /* @__PURE__ */ jsx15("p", { role: "status", className: "gridkit-column-chooser-empty", children: messages.noMatchingColumns }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
2707
|
+
/* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option gridkit-column-chooser-all", children: [
|
|
2679
2708
|
/* @__PURE__ */ jsx15(
|
|
2680
2709
|
"input",
|
|
2681
2710
|
{
|
|
@@ -2692,7 +2721,7 @@ function ColumnChooser({
|
|
|
2692
2721
|
),
|
|
2693
2722
|
messages.showAllColumns
|
|
2694
2723
|
] }),
|
|
2695
|
-
/* @__PURE__ */ jsx15("ul", { className: "column-chooser-list", children: entries.map((entry) => /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs10("label", { className: "column-chooser-option", children: [
|
|
2724
|
+
/* @__PURE__ */ jsx15("ul", { className: "gridkit-column-chooser-list", children: entries.map((entry) => /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs10("label", { className: "gridkit-column-chooser-option", children: [
|
|
2696
2725
|
/* @__PURE__ */ jsx15(
|
|
2697
2726
|
"input",
|
|
2698
2727
|
{
|
|
@@ -2858,12 +2887,19 @@ function OperatorMenuButton({
|
|
|
2858
2887
|
{
|
|
2859
2888
|
ref,
|
|
2860
2889
|
type: "button",
|
|
2861
|
-
className: "filter-menu-submenu",
|
|
2890
|
+
className: "gridkit-filter-menu-submenu",
|
|
2862
2891
|
...buttonProps,
|
|
2863
2892
|
children: [
|
|
2864
|
-
/* @__PURE__ */ jsx16("span", { className: "filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx16(CheckIcon, {}) }),
|
|
2893
|
+
/* @__PURE__ */ jsx16("span", { className: "gridkit-filter-menu-submenu-icon", "aria-hidden": "true", children: active !== void 0 && /* @__PURE__ */ jsx16(CheckIcon, {}) }),
|
|
2865
2894
|
label,
|
|
2866
|
-
/* @__PURE__ */ jsx16(
|
|
2895
|
+
/* @__PURE__ */ jsx16(
|
|
2896
|
+
"span",
|
|
2897
|
+
{
|
|
2898
|
+
className: "gridkit-filter-menu-submenu-indicator",
|
|
2899
|
+
"aria-hidden": "true",
|
|
2900
|
+
children: /* @__PURE__ */ jsx16(ChevronRightIcon2, {})
|
|
2901
|
+
}
|
|
2902
|
+
)
|
|
2867
2903
|
]
|
|
2868
2904
|
}
|
|
2869
2905
|
),
|
|
@@ -2938,7 +2974,7 @@ function OperandField({
|
|
|
2938
2974
|
}) {
|
|
2939
2975
|
const field = {
|
|
2940
2976
|
ref: fieldRef,
|
|
2941
|
-
className: "filter-menu-value",
|
|
2977
|
+
className: "gridkit-filter-menu-value",
|
|
2942
2978
|
"aria-label": label,
|
|
2943
2979
|
"aria-invalid": invalidMessageId === void 0 ? void 0 : true,
|
|
2944
2980
|
"aria-describedby": invalidMessageId,
|
|
@@ -2979,13 +3015,13 @@ function ConditionRow({
|
|
|
2979
3015
|
ref,
|
|
2980
3016
|
role: "group",
|
|
2981
3017
|
"aria-label": messages.filterConditionLabel(position),
|
|
2982
|
-
className: "filter-menu-condition",
|
|
3018
|
+
className: "gridkit-filter-menu-condition",
|
|
2983
3019
|
children: [
|
|
2984
3020
|
/* @__PURE__ */ jsx17(
|
|
2985
3021
|
"select",
|
|
2986
3022
|
{
|
|
2987
3023
|
ref: arity === 0 ? focusRef : void 0,
|
|
2988
|
-
className: "filter-menu-operator",
|
|
3024
|
+
className: "gridkit-filter-menu-operator",
|
|
2989
3025
|
"aria-label": messages.filterOperatorFieldLabel,
|
|
2990
3026
|
value: row.operator,
|
|
2991
3027
|
onChange: (event) => {
|
|
@@ -3126,8 +3162,8 @@ function CombinatorChoice({
|
|
|
3126
3162
|
{
|
|
3127
3163
|
role: "radiogroup",
|
|
3128
3164
|
"aria-label": messages.filterCombinatorLabel,
|
|
3129
|
-
className: "filter-menu-combinator",
|
|
3130
|
-
children: COMBINATORS.map((choice) => /* @__PURE__ */ jsxs13("label", { className: "filter-menu-combinator-option", children: [
|
|
3165
|
+
className: "gridkit-filter-menu-combinator",
|
|
3166
|
+
children: COMBINATORS.map((choice) => /* @__PURE__ */ jsxs13("label", { className: "gridkit-filter-menu-combinator-option", children: [
|
|
3131
3167
|
/* @__PURE__ */ jsx18(
|
|
3132
3168
|
"input",
|
|
3133
3169
|
{
|
|
@@ -3206,8 +3242,8 @@ function SimpleFilterEditor({
|
|
|
3206
3242
|
rowElements.current[first]?.querySelector('[aria-invalid="true"]')?.focus();
|
|
3207
3243
|
}
|
|
3208
3244
|
}, [invalid]);
|
|
3209
|
-
return /* @__PURE__ */ jsxs13("div", { className: "filter-menu-conditions", children: [
|
|
3210
|
-
opened.custom && /* @__PURE__ */ jsx18("p", { className: "filter-menu-custom", children: messages.customFilter }),
|
|
3245
|
+
return /* @__PURE__ */ jsxs13("div", { className: "gridkit-filter-menu-conditions", children: [
|
|
3246
|
+
opened.custom && /* @__PURE__ */ jsx18("p", { className: "gridkit-filter-menu-custom", children: messages.customFilter }),
|
|
3211
3247
|
draft.rows.map((row, index) => (
|
|
3212
3248
|
// A row is its place: the first condition, or the second.
|
|
3213
3249
|
/* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
@@ -3242,7 +3278,7 @@ function SimpleFilterEditor({
|
|
|
3242
3278
|
)
|
|
3243
3279
|
] }, index)
|
|
3244
3280
|
)),
|
|
3245
|
-
invalid.length > 0 && /* @__PURE__ */ jsx18("p", { id: invalidMessageId, className: "filter-menu-invalid", children: messages.filterValueInvalid(menu.family) })
|
|
3281
|
+
invalid.length > 0 && /* @__PURE__ */ jsx18("p", { id: invalidMessageId, className: "gridkit-filter-menu-invalid", children: messages.filterValueInvalid(menu.family) })
|
|
3246
3282
|
] });
|
|
3247
3283
|
}
|
|
3248
3284
|
|
|
@@ -3316,7 +3352,7 @@ function ValueChecklist({
|
|
|
3316
3352
|
role: "listbox",
|
|
3317
3353
|
"aria-multiselectable": "true",
|
|
3318
3354
|
"aria-label": label,
|
|
3319
|
-
className: "filter-menu-checklist",
|
|
3355
|
+
className: "gridkit-filter-menu-checklist",
|
|
3320
3356
|
children: [
|
|
3321
3357
|
/* @__PURE__ */ jsx19("div", { role: "presentation", style: { height: range.offsetBefore } }),
|
|
3322
3358
|
shown.map((item, offset) => {
|
|
@@ -3331,13 +3367,20 @@ function ValueChecklist({
|
|
|
3331
3367
|
"aria-checked": item.checked,
|
|
3332
3368
|
"aria-setsize": items.length,
|
|
3333
3369
|
"aria-posinset": index + 1,
|
|
3334
|
-
className: "filter-menu-option",
|
|
3370
|
+
className: "gridkit-filter-menu-option",
|
|
3335
3371
|
children: [
|
|
3336
|
-
/* @__PURE__ */ jsx19(
|
|
3337
|
-
|
|
3372
|
+
/* @__PURE__ */ jsx19(
|
|
3373
|
+
"span",
|
|
3374
|
+
{
|
|
3375
|
+
className: "gridkit-filter-menu-option-check",
|
|
3376
|
+
"aria-hidden": "true",
|
|
3377
|
+
children: /* @__PURE__ */ jsx19(CheckIcon, {})
|
|
3378
|
+
}
|
|
3379
|
+
),
|
|
3380
|
+
/* @__PURE__ */ jsx19("span", { className: "gridkit-filter-menu-option-label", children: item.label }),
|
|
3338
3381
|
showCounts && /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
3339
3382
|
" ",
|
|
3340
|
-
/* @__PURE__ */ jsx19("span", { className: "filter-menu-option-count", children: String(item.count) })
|
|
3383
|
+
/* @__PURE__ */ jsx19("span", { className: "gridkit-filter-menu-option-count", children: String(item.count) })
|
|
3341
3384
|
] })
|
|
3342
3385
|
]
|
|
3343
3386
|
},
|
|
@@ -3423,12 +3466,12 @@ function ExcelFilterEditor({
|
|
|
3423
3466
|
"button",
|
|
3424
3467
|
{
|
|
3425
3468
|
type: "button",
|
|
3426
|
-
className: "filter-menu-back",
|
|
3469
|
+
className: "gridkit-filter-menu-back",
|
|
3427
3470
|
onClick: () => {
|
|
3428
3471
|
setMode({ kind: "values", focusOnMount: true });
|
|
3429
3472
|
},
|
|
3430
3473
|
children: [
|
|
3431
|
-
/* @__PURE__ */ jsx20("span", { className: "filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(ChevronLeftIcon2, {}) }),
|
|
3474
|
+
/* @__PURE__ */ jsx20("span", { className: "gridkit-filter-menu-back-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(ChevronLeftIcon2, {}) }),
|
|
3432
3475
|
messages.filterBackToValues
|
|
3433
3476
|
]
|
|
3434
3477
|
}
|
|
@@ -3451,7 +3494,7 @@ function ExcelFilterEditor({
|
|
|
3451
3494
|
] });
|
|
3452
3495
|
}
|
|
3453
3496
|
const { shape } = opened;
|
|
3454
|
-
return /* @__PURE__ */ jsxs15("div", { className: "filter-menu-values", children: [
|
|
3497
|
+
return /* @__PURE__ */ jsxs15("div", { className: "gridkit-filter-menu-values", children: [
|
|
3455
3498
|
menu.operators.length > 0 && /* @__PURE__ */ jsx20(
|
|
3456
3499
|
OperatorMenuButton,
|
|
3457
3500
|
{
|
|
@@ -3464,13 +3507,13 @@ function ExcelFilterEditor({
|
|
|
3464
3507
|
}
|
|
3465
3508
|
}
|
|
3466
3509
|
),
|
|
3467
|
-
(shape.kind === "conditions" || shape.kind === "custom") && /* @__PURE__ */ jsx20("p", { className: "filter-menu-custom", children: shape.kind === "conditions" ? messages.filterByCondition : messages.customFilter }),
|
|
3510
|
+
(shape.kind === "conditions" || shape.kind === "custom") && /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-custom", children: shape.kind === "conditions" ? messages.filterByCondition : messages.customFilter }),
|
|
3468
3511
|
/* @__PURE__ */ jsx20(
|
|
3469
3512
|
"input",
|
|
3470
3513
|
{
|
|
3471
3514
|
ref: initialFocusRef,
|
|
3472
3515
|
type: "search",
|
|
3473
|
-
className: "filter-menu-search",
|
|
3516
|
+
className: "gridkit-filter-menu-search",
|
|
3474
3517
|
"aria-label": messages.filterSearchLabel,
|
|
3475
3518
|
placeholder: messages.searchPlaceholder,
|
|
3476
3519
|
value: draft.search,
|
|
@@ -3479,7 +3522,7 @@ function ExcelFilterEditor({
|
|
|
3479
3522
|
}
|
|
3480
3523
|
}
|
|
3481
3524
|
),
|
|
3482
|
-
/* @__PURE__ */ jsxs15("label", { className: "filter-menu-select-all", children: [
|
|
3525
|
+
/* @__PURE__ */ jsxs15("label", { className: "gridkit-filter-menu-select-all", children: [
|
|
3483
3526
|
/* @__PURE__ */ jsx20(
|
|
3484
3527
|
"input",
|
|
3485
3528
|
{
|
|
@@ -3494,7 +3537,7 @@ function ExcelFilterEditor({
|
|
|
3494
3537
|
),
|
|
3495
3538
|
messages.filterSelectAll
|
|
3496
3539
|
] }),
|
|
3497
|
-
checklist.needsSearch ? /* @__PURE__ */ jsx20("p", { className: "filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx20(
|
|
3540
|
+
checklist.needsSearch ? /* @__PURE__ */ jsx20("p", { className: "gridkit-filter-menu-search-first", children: messages.filterSearchFirst(checklist.total) }) : /* @__PURE__ */ jsx20(
|
|
3498
3541
|
ValueChecklist,
|
|
3499
3542
|
{
|
|
3500
3543
|
items: checklist.items,
|
|
@@ -3505,7 +3548,7 @@ function ExcelFilterEditor({
|
|
|
3505
3548
|
}
|
|
3506
3549
|
}
|
|
3507
3550
|
),
|
|
3508
|
-
checklist.hiddenCount > 0 && /* @__PURE__ */ jsx20("p", { role: "status", className: "filter-menu-more", children: messages.filterMoreValues(checklist.hiddenCount) })
|
|
3551
|
+
checklist.hiddenCount > 0 && /* @__PURE__ */ jsx20("p", { role: "status", className: "gridkit-filter-menu-more", children: messages.filterMoreValues(checklist.hiddenCount) })
|
|
3509
3552
|
] });
|
|
3510
3553
|
}
|
|
3511
3554
|
|
|
@@ -3578,7 +3621,7 @@ function FilterMenu({
|
|
|
3578
3621
|
children: /* @__PURE__ */ jsxs16(
|
|
3579
3622
|
"form",
|
|
3580
3623
|
{
|
|
3581
|
-
className: "filter-menu-form",
|
|
3624
|
+
className: "gridkit-filter-menu-form",
|
|
3582
3625
|
noValidate: true,
|
|
3583
3626
|
onSubmit: apply,
|
|
3584
3627
|
onKeyDown: (event) => {
|
|
@@ -3588,11 +3631,11 @@ function FilterMenu({
|
|
|
3588
3631
|
}
|
|
3589
3632
|
},
|
|
3590
3633
|
children: [
|
|
3591
|
-
sortItems.length > 0 && /* @__PURE__ */ jsx21("div", { className: "filter-menu-sort", children: sortItems.map((item) => /* @__PURE__ */ jsxs16(
|
|
3634
|
+
sortItems.length > 0 && /* @__PURE__ */ jsx21("div", { className: "gridkit-filter-menu-sort", children: sortItems.map((item) => /* @__PURE__ */ jsxs16(
|
|
3592
3635
|
"button",
|
|
3593
3636
|
{
|
|
3594
3637
|
type: "button",
|
|
3595
|
-
className: "filter-menu-sort-item",
|
|
3638
|
+
className: "gridkit-filter-menu-sort-item",
|
|
3596
3639
|
disabled: item.disabled,
|
|
3597
3640
|
...ariaAttr(
|
|
3598
3641
|
item.checked !== void 0,
|
|
@@ -3603,19 +3646,26 @@ function FilterMenu({
|
|
|
3603
3646
|
run(item);
|
|
3604
3647
|
},
|
|
3605
3648
|
children: [
|
|
3606
|
-
/* @__PURE__ */ jsx21(
|
|
3649
|
+
/* @__PURE__ */ jsx21(
|
|
3650
|
+
"span",
|
|
3651
|
+
{
|
|
3652
|
+
className: "gridkit-filter-menu-sort-icon",
|
|
3653
|
+
"aria-hidden": "true",
|
|
3654
|
+
children: /* @__PURE__ */ jsx21(MenuIcon, { name: item.icon })
|
|
3655
|
+
}
|
|
3656
|
+
),
|
|
3607
3657
|
item.label
|
|
3608
3658
|
]
|
|
3609
3659
|
},
|
|
3610
3660
|
item.id
|
|
3611
3661
|
)) }),
|
|
3612
3662
|
menu.ui === "excel" ? /* @__PURE__ */ jsx21(ExcelFilterEditor, { ...editorProps, columnValues }) : /* @__PURE__ */ jsx21(SimpleFilterEditor, { ...editorProps }),
|
|
3613
|
-
/* @__PURE__ */ jsxs16("div", { className: "filter-menu-actions", children: [
|
|
3663
|
+
/* @__PURE__ */ jsxs16("div", { className: "gridkit-filter-menu-actions", children: [
|
|
3614
3664
|
clearItem !== void 0 && /* @__PURE__ */ jsx21(
|
|
3615
3665
|
"button",
|
|
3616
3666
|
{
|
|
3617
3667
|
type: "button",
|
|
3618
|
-
className: "filter-menu-clear",
|
|
3668
|
+
className: "gridkit-filter-menu-clear",
|
|
3619
3669
|
disabled: clearItem.disabled,
|
|
3620
3670
|
onClick: () => {
|
|
3621
3671
|
run(clearItem);
|
|
@@ -3623,8 +3673,16 @@ function FilterMenu({
|
|
|
3623
3673
|
children: clearItem.label
|
|
3624
3674
|
}
|
|
3625
3675
|
),
|
|
3626
|
-
/* @__PURE__ */ jsx21(
|
|
3627
|
-
|
|
3676
|
+
/* @__PURE__ */ jsx21(
|
|
3677
|
+
"button",
|
|
3678
|
+
{
|
|
3679
|
+
type: "button",
|
|
3680
|
+
className: "gridkit-filter-menu-cancel",
|
|
3681
|
+
onClick: close,
|
|
3682
|
+
children: messages.cancelFilter
|
|
3683
|
+
}
|
|
3684
|
+
),
|
|
3685
|
+
/* @__PURE__ */ jsx21("button", { type: "submit", className: "gridkit-filter-menu-apply", children: messages.applyFilter })
|
|
3628
3686
|
] })
|
|
3629
3687
|
]
|
|
3630
3688
|
}
|
|
@@ -3861,14 +3919,17 @@ function ToolbarMenuButton({
|
|
|
3861
3919
|
{
|
|
3862
3920
|
...attributes,
|
|
3863
3921
|
type: "button",
|
|
3864
|
-
className: classNames(
|
|
3922
|
+
className: classNames(
|
|
3923
|
+
"gridkit-toolbar-button",
|
|
3924
|
+
more && "gridkit-toolbar-more"
|
|
3925
|
+
),
|
|
3865
3926
|
"data-gridkit-toolbar-item": itemKey,
|
|
3866
3927
|
...ariaAttr(more, "data-gridkit-toolbar-more", ""),
|
|
3867
3928
|
...buttonProps,
|
|
3868
3929
|
children: [
|
|
3869
|
-
icon !== void 0 && /* @__PURE__ */ jsx23("span", { className: "toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(MenuIcon, { name: icon }) }),
|
|
3930
|
+
icon !== void 0 && /* @__PURE__ */ jsx23("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(MenuIcon, { name: icon }) }),
|
|
3870
3931
|
label,
|
|
3871
|
-
/* @__PURE__ */ jsx23("span", { className: "toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(ChevronDownIcon, {}) })
|
|
3932
|
+
/* @__PURE__ */ jsx23("span", { className: "gridkit-toolbar-button-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(ChevronDownIcon, {}) })
|
|
3872
3933
|
]
|
|
3873
3934
|
}
|
|
3874
3935
|
),
|
|
@@ -3945,7 +4006,7 @@ function ToolbarSearch({
|
|
|
3945
4006
|
{
|
|
3946
4007
|
...attributes,
|
|
3947
4008
|
type: "search",
|
|
3948
|
-
className: "toolbar-search",
|
|
4009
|
+
className: "gridkit-toolbar-search",
|
|
3949
4010
|
"data-gridkit-toolbar-item": itemKey,
|
|
3950
4011
|
"aria-label": messages.searchLabel,
|
|
3951
4012
|
placeholder: messages.searchPlaceholder,
|
|
@@ -4111,7 +4172,7 @@ function Toolbar({
|
|
|
4111
4172
|
{
|
|
4112
4173
|
...item.attributes,
|
|
4113
4174
|
type: "button",
|
|
4114
|
-
className: "toolbar-button",
|
|
4175
|
+
className: "gridkit-toolbar-button",
|
|
4115
4176
|
"data-gridkit-toolbar-item": item.key,
|
|
4116
4177
|
...ariaAttr(item.disabled, "aria-disabled", true),
|
|
4117
4178
|
...ariaAttr(
|
|
@@ -4128,7 +4189,7 @@ function Toolbar({
|
|
|
4128
4189
|
item.run();
|
|
4129
4190
|
},
|
|
4130
4191
|
children: [
|
|
4131
|
-
item.icon !== void 0 && /* @__PURE__ */ jsx25("span", { className: "toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(MenuIcon, { name: item.icon }) }),
|
|
4192
|
+
item.icon !== void 0 && /* @__PURE__ */ jsx25("span", { className: "gridkit-toolbar-button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx25(MenuIcon, { name: item.icon }) }),
|
|
4132
4193
|
item.label
|
|
4133
4194
|
]
|
|
4134
4195
|
},
|
|
@@ -4165,7 +4226,7 @@ function Toolbar({
|
|
|
4165
4226
|
{
|
|
4166
4227
|
role: "separator",
|
|
4167
4228
|
"aria-orientation": "vertical",
|
|
4168
|
-
className: "toolbar-separator",
|
|
4229
|
+
className: "gridkit-toolbar-separator",
|
|
4169
4230
|
"data-gridkit-toolbar-item": item.key
|
|
4170
4231
|
},
|
|
4171
4232
|
item.key
|
|
@@ -4174,7 +4235,7 @@ function Toolbar({
|
|
|
4174
4235
|
return /* @__PURE__ */ jsx25(
|
|
4175
4236
|
"div",
|
|
4176
4237
|
{
|
|
4177
|
-
className: "toolbar-spacer",
|
|
4238
|
+
className: "gridkit-toolbar-spacer",
|
|
4178
4239
|
"data-gridkit-toolbar-item": item.key
|
|
4179
4240
|
},
|
|
4180
4241
|
item.key
|
|
@@ -4184,7 +4245,7 @@ function Toolbar({
|
|
|
4184
4245
|
"div",
|
|
4185
4246
|
{
|
|
4186
4247
|
...item.attributes,
|
|
4187
|
-
className: "toolbar-custom",
|
|
4248
|
+
className: "gridkit-toolbar-custom",
|
|
4188
4249
|
"data-gridkit-toolbar-item": item.key,
|
|
4189
4250
|
children: renderItem?.(item.id)
|
|
4190
4251
|
},
|
|
@@ -4870,16 +4931,16 @@ function DataGrid(props) {
|
|
|
4870
4931
|
}));
|
|
4871
4932
|
const gridTableClassName = classNames(
|
|
4872
4933
|
"gridkit-data-grid",
|
|
4873
|
-
borders ? `borders-${borders}` : "",
|
|
4934
|
+
borders ? `gridkit-borders-${borders}` : "",
|
|
4874
4935
|
// Hover is on by default and selection off, so one set of classes
|
|
4875
4936
|
// turns styling off and the other turns it on. The polarity differs
|
|
4876
4937
|
// because the defaults do.
|
|
4877
|
-
hoverRows ? "" : "no-hover-rows",
|
|
4878
|
-
hoverColumns ? "" : "no-hover-columns",
|
|
4879
|
-
hoverCells ? "" : "no-hover-cells",
|
|
4880
|
-
selection.rowMode === false ? "" : "selectable-rows",
|
|
4881
|
-
selection.columnMode === false ? "" : "selectable-columns",
|
|
4882
|
-
selection.cellMode === false ? "" : "selectable-cells"
|
|
4938
|
+
hoverRows ? "" : "gridkit-no-hover-rows",
|
|
4939
|
+
hoverColumns ? "" : "gridkit-no-hover-columns",
|
|
4940
|
+
hoverCells ? "" : "gridkit-no-hover-cells",
|
|
4941
|
+
selection.rowMode === false ? "" : "gridkit-selectable-rows",
|
|
4942
|
+
selection.columnMode === false ? "" : "gridkit-selectable-columns",
|
|
4943
|
+
selection.cellMode === false ? "" : "gridkit-selectable-cells"
|
|
4883
4944
|
);
|
|
4884
4945
|
const hasFooter = aggregates.length > 0;
|
|
4885
4946
|
return /* @__PURE__ */ jsxs19("div", { className: "gridkit-data-grid-viewport", ref: viewportRef, children: [
|