schummar-table 0.10.0 → 0.10.3
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/cjs/index.js +25 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tableTheme.js +2 -0
- package/dist/cjs/tableTheme.js.map +1 -1
- package/dist/es/index.js +25 -20
- package/dist/es/index.js.map +1 -1
- package/dist/es/tableTheme.js +2 -0
- package/dist/es/tableTheme.js.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.js
CHANGED
|
@@ -629,7 +629,7 @@ function ClearFiltersButton() {
|
|
|
629
629
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
630
630
|
css: tableTheme.defaultClasses.clearFiltersButton,
|
|
631
631
|
children: /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
632
|
-
variant: "
|
|
632
|
+
variant: "outlined",
|
|
633
633
|
onClick: () => {
|
|
634
634
|
table.update((state) => {
|
|
635
635
|
state.activeColumns.forEach((column) => {
|
|
@@ -1268,17 +1268,18 @@ function ExpandControl({
|
|
|
1268
1268
|
activeItemsById
|
|
1269
1269
|
} = table.getState();
|
|
1270
1270
|
const newExpanded = new Set(expanded);
|
|
1271
|
-
if (expandOnlyOne)
|
|
1271
|
+
if (expandOnlyOne) {
|
|
1272
1272
|
newExpanded.clear();
|
|
1273
|
-
if (isExpanded)
|
|
1274
|
-
newExpanded.delete(itemId);
|
|
1275
|
-
else {
|
|
1276
|
-
newExpanded.add(itemId);
|
|
1277
1273
|
const item = activeItemsById.get(itemId);
|
|
1278
1274
|
for (const ancestor of item ? getAncestors(activeItemsById, item) : []) {
|
|
1279
1275
|
newExpanded.add(ancestor);
|
|
1280
1276
|
}
|
|
1281
1277
|
}
|
|
1278
|
+
if (isExpanded) {
|
|
1279
|
+
newExpanded.delete(itemId);
|
|
1280
|
+
} else {
|
|
1281
|
+
newExpanded.add(itemId);
|
|
1282
|
+
}
|
|
1282
1283
|
onExpandedChange == null ? void 0 : onExpandedChange(newExpanded);
|
|
1283
1284
|
if (!controlledExpanded) {
|
|
1284
1285
|
table.update((state) => {
|
|
@@ -1700,7 +1701,11 @@ const TableInner = react.memo(function TableInner2({
|
|
|
1700
1701
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
1701
1702
|
className: classes == null ? void 0 : classes.headerCell,
|
|
1702
1703
|
css: [tableTheme.defaultClasses.headerCell, stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader],
|
|
1703
|
-
children: [enableSelection && /* @__PURE__ */ jsxRuntime.jsx(SelectComponent, {}), enableColumnSelection && /* @__PURE__ */ jsxRuntime.jsx(ColumnSelection, {}), enableExport && /* @__PURE__ */ jsxRuntime.jsx(Export$1, {}), /* @__PURE__ */ jsxRuntime.jsx(
|
|
1704
|
+
children: [enableSelection && /* @__PURE__ */ jsxRuntime.jsx(SelectComponent, {}), enableColumnSelection && /* @__PURE__ */ jsxRuntime.jsx(ColumnSelection, {}), enableExport && /* @__PURE__ */ jsxRuntime.jsx(Export$1, {}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1705
|
+
css: {
|
|
1706
|
+
flex: 1
|
|
1707
|
+
}
|
|
1708
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(ResizeHandleView, {})]
|
|
1704
1709
|
}), /* @__PURE__ */ jsxRuntime.jsx(ColumnHeaderContext.Provider, {
|
|
1705
1710
|
children: activeColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(ColumnContext.Provider, {
|
|
1706
1711
|
value: column.id,
|
|
@@ -2735,28 +2740,28 @@ function SelectFilter(_m) {
|
|
|
2735
2740
|
css: {
|
|
2736
2741
|
marginBottom: "var(--spacing)"
|
|
2737
2742
|
}
|
|
2738
|
-
}), /* @__PURE__ */ jsxRuntime.
|
|
2743
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
2744
|
+
disabled: !(value.size > 0),
|
|
2745
|
+
onClick: () => onChange(/* @__PURE__ */ new Set()),
|
|
2746
|
+
variant: "outlined",
|
|
2747
|
+
css: {
|
|
2748
|
+
justifyContent: "center",
|
|
2749
|
+
width: "100%",
|
|
2750
|
+
marginBottom: "var(--spacing)"
|
|
2751
|
+
},
|
|
2752
|
+
children: deselectAll
|
|
2753
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2739
2754
|
css: {
|
|
2740
2755
|
maxHeight: "20em",
|
|
2741
2756
|
overflowY: "auto"
|
|
2742
2757
|
},
|
|
2743
|
-
children:
|
|
2744
|
-
disabled: value.size === 0,
|
|
2745
|
-
onClick: () => onChange(/* @__PURE__ */ new Set()),
|
|
2746
|
-
variant: "outlined",
|
|
2747
|
-
css: {
|
|
2748
|
-
justifyContent: "center",
|
|
2749
|
-
width: "calc(100% - 5px)",
|
|
2750
|
-
marginRight: "5px"
|
|
2751
|
-
},
|
|
2752
|
-
children: deselectAll
|
|
2753
|
-
}), filtered.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(FormControlLabel, {
|
|
2758
|
+
children: filtered.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(FormControlLabel, {
|
|
2754
2759
|
control: /* @__PURE__ */ jsxRuntime.jsx(Checkbox2, {
|
|
2755
2760
|
checked: value.has(option),
|
|
2756
2761
|
onChange: () => onChange(toggle(value, option, singleSelect))
|
|
2757
2762
|
}),
|
|
2758
2763
|
label: render(option)
|
|
2759
|
-
}, index))
|
|
2764
|
+
}, index))
|
|
2760
2765
|
}), filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2761
2766
|
css: {
|
|
2762
2767
|
textAlign: "center"
|