fastapi-rtk 1.0.43 → 1.0.45
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/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
- package/dist/.external/cjs/ajv@8.18.0/ajv/dist/compile/codegen/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.18.0/ajv/dist/compile/validate/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.18.0/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
- package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.cjs +13 -13
- package/dist/.external/esm/ajv@8.18.0/ajv/dist/compile/codegen/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.18.0/ajv/dist/compile/validate/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.18.0/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
- package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.mjs +5 -5
- package/dist/core/cjs/Tables/NextGenDataGrid/HooksComponent.cjs +21 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +44 -39
- package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.cjs +85 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.cjs +50 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +25 -10
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useOnLoad.cjs +13 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useOptimizations.cjs +50 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useQueryOnlyVisibleColumns.cjs +20 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useSelection/useSelection.cjs +14 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/FASTAPI_RTK_ToolbarAlertBanner.cjs +3 -66
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.cjs +12 -3
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useView.cjs +18 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TableContainer.cjs +34 -25
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TopToolbar.cjs +2 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBody.cjs +146 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBody.module.css.cjs +14 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.cjs +164 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.module.css.cjs +10 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/table/MRT_Table.cjs +67 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/table/MRT_Table.module.css.cjs +9 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.cjs +132 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.module.css.cjs +13 -0
- package/dist/core/cjs/_virtual/_nodeUtil.cjs +4 -0
- package/dist/core/cjs/_virtual/isBuffer.cjs +4 -0
- package/dist/core/cjs/_virtual/isEqual.cjs +6 -0
- package/dist/core/esm/Tables/NextGenDataGrid/HooksComponent.mjs +21 -0
- package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +46 -41
- package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/getOptimizedMRT_RowSelectColumnDef.mjs +85 -0
- package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.mjs +50 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +25 -10
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useOnLoad.mjs +13 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useOptimizations.mjs +50 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useQueryOnlyVisibleColumns.mjs +20 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useSelection/useSelection.mjs +14 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/FASTAPI_RTK_ToolbarAlertBanner.mjs +5 -68
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.mjs +12 -3
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useView.mjs +18 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TableContainer.mjs +36 -27
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TopToolbar.mjs +2 -1
- package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBody.mjs +146 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBody.module.css.mjs +14 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.mjs +164 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.module.css.mjs +10 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/table/MRT_Table.mjs +67 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/table/MRT_Table.module.css.mjs +9 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.mjs +132 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.module.css.mjs +13 -0
- package/dist/core/esm/_virtual/_nodeUtil.mjs +4 -0
- package/dist/core/esm/_virtual/isBuffer.mjs +4 -0
- package/dist/core/esm/_virtual/isEqual.mjs +7 -0
- package/dist/core/lib/Tables/NextGenDataGrid/HooksComponent.d.ts +7 -0
- package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.d.ts +19 -1
- package/dist/core/lib/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/index.d.ts +2 -0
- package/dist/core/lib/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.d.ts +36 -0
- package/dist/core/lib/Tables/NextGenDataGrid/components/index.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useOnLoad.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useOptimizations.d.ts +5 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useQueryOnlyVisibleColumns.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useSelection/useSelection.d.ts +4 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/FASTAPI_RTK_ToolbarAlertBanner.d.ts +4 -2
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.d.ts +4 -2
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useView.d.ts +1 -0
- package/dist/core/lib/Tables/NextGenDataGrid/patch/body/MRT_TableBody.d.ts +12 -0
- package/dist/core/lib/Tables/NextGenDataGrid/patch/body/MRT_TableBodyRow.d.ts +26 -0
- package/dist/core/lib/Tables/NextGenDataGrid/patch/table/MRT_Table.d.ts +4 -0
- package/dist/core/lib/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.d.ts +5 -0
- package/dist/core/styles.css +273 -0
- package/dist/utils/cjs/{MemoWrapper → Memoizer}/MemoWrapper.cjs +1 -1
- package/dist/utils/cjs/Memoizer/RenderWrapper.cjs +20 -0
- package/dist/utils/cjs/index.cjs +5 -1
- package/dist/utils/cjs/useWatchRef/useWatchRef.cjs +28 -0
- package/dist/utils/esm/{MemoWrapper → Memoizer}/MemoWrapper.mjs +1 -1
- package/dist/utils/esm/Memoizer/RenderWrapper.mjs +20 -0
- package/dist/utils/esm/index.mjs +6 -2
- package/dist/utils/esm/useWatchRef/useWatchRef.mjs +28 -0
- package/dist/utils/lib/Memoizer/RenderWrapper.d.ts +10 -0
- package/dist/utils/lib/Memoizer/index.d.ts +2 -0
- package/dist/utils/lib/index.d.ts +2 -1
- package/dist/utils/lib/useWatchRef/index.d.ts +1 -0
- package/dist/utils/lib/useWatchRef/useWatchRef.d.ts +1 -0
- package/package.json +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useCheckbox.cjs +0 -6
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useCheckbox.mjs +0 -6
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useCheckbox.d.ts +0 -3
- package/dist/utils/lib/MemoWrapper/index.d.ts +0 -1
- /package/dist/utils/lib/{MemoWrapper → Memoizer}/MemoWrapper.d.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "../../../../../../.external/esm/clsx@2.1.1/clsx/dist/clsx.mjs";
|
|
3
|
+
import classes from "./MRT_Table.module.css.mjs";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
6
|
+
import { useMantineColorScheme, Table, lighten, darken } from "@mantine/core";
|
|
7
|
+
import { parseCSSVarId, useMRT_ColumnVirtualizer, MRT_TableHead, MRT_TableFooter } from "../../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.mjs";
|
|
8
|
+
import { Memo_MRT_TableBody, MRT_TableBody } from "../body/MRT_TableBody.mjs";
|
|
9
|
+
const MRT_Table = ({ table, ...rest }) => {
|
|
10
|
+
const {
|
|
11
|
+
getFlatHeaders,
|
|
12
|
+
getState,
|
|
13
|
+
options: { columns, enableTableFooter, enableTableHead, layoutMode, mantineTableProps, memoMode }
|
|
14
|
+
} = table;
|
|
15
|
+
const { columnSizing, columnSizingInfo, columnVisibility, density } = getState();
|
|
16
|
+
const tableProps = {
|
|
17
|
+
highlightOnHover: true,
|
|
18
|
+
horizontalSpacing: density,
|
|
19
|
+
verticalSpacing: density,
|
|
20
|
+
...parseFromValuesOrFunc(mantineTableProps, { table }),
|
|
21
|
+
...rest
|
|
22
|
+
};
|
|
23
|
+
const columnSizeVars = useMemo(() => {
|
|
24
|
+
const headers = getFlatHeaders();
|
|
25
|
+
const colSizes = {};
|
|
26
|
+
for (let i = 0; i < headers.length; i++) {
|
|
27
|
+
const header = headers[i];
|
|
28
|
+
const colSize = header.getSize();
|
|
29
|
+
colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize;
|
|
30
|
+
colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize;
|
|
31
|
+
}
|
|
32
|
+
return colSizes;
|
|
33
|
+
}, [columns, columnSizing, columnSizingInfo, columnVisibility]);
|
|
34
|
+
const columnVirtualizer = useMRT_ColumnVirtualizer(table);
|
|
35
|
+
const commonTableGroupProps = {
|
|
36
|
+
columnVirtualizer,
|
|
37
|
+
table
|
|
38
|
+
};
|
|
39
|
+
const { colorScheme } = useMantineColorScheme();
|
|
40
|
+
const { stripedColor } = tableProps;
|
|
41
|
+
return /* @__PURE__ */ jsxs(
|
|
42
|
+
Table,
|
|
43
|
+
{
|
|
44
|
+
className: clsx(
|
|
45
|
+
"mrt-table",
|
|
46
|
+
classes.root,
|
|
47
|
+
(layoutMode == null ? void 0 : layoutMode.startsWith("grid")) && classes["root-grid"],
|
|
48
|
+
tableProps.className
|
|
49
|
+
),
|
|
50
|
+
...tableProps,
|
|
51
|
+
__vars: {
|
|
52
|
+
...columnSizeVars,
|
|
53
|
+
"--mrt-striped-row-background-color": stripedColor,
|
|
54
|
+
"--mrt-striped-row-hover-background-color": stripedColor ? colorScheme === "dark" ? lighten(stripedColor, 0.08) : darken(stripedColor, 0.12) : void 0,
|
|
55
|
+
...tableProps.__vars
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
enableTableHead && /* @__PURE__ */ jsx(MRT_TableHead, { ...commonTableGroupProps }),
|
|
59
|
+
memoMode === "table-body" || columnSizingInfo.isResizingColumn ? /* @__PURE__ */ jsx(Memo_MRT_TableBody, { ...commonTableGroupProps, tableProps }) : /* @__PURE__ */ jsx(MRT_TableBody, { ...commonTableGroupProps, tableProps }),
|
|
60
|
+
enableTableFooter && /* @__PURE__ */ jsx(MRT_TableFooter, { ...commonTableGroupProps })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
MRT_Table
|
|
67
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "../../../../../../.external/esm/clsx@2.1.1/clsx/dist/clsx.mjs";
|
|
3
|
+
import classes from "./MRT_ToolbarAlertBanner.module.css.mjs";
|
|
4
|
+
import { useMemo, Fragment } from "react";
|
|
5
|
+
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
6
|
+
import { Flex, Button, Badge, ActionIcon, Collapse, Alert, Stack } from "@mantine/core";
|
|
7
|
+
import { getMRT_SelectAllHandler, MRT_SelectCheckbox } from "../../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.mjs";
|
|
8
|
+
import { useSelectionStore } from "../../components/OptimizedMRT_RowSelectColumn/zustand.mjs";
|
|
9
|
+
const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, ...rest }) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const {
|
|
12
|
+
getFilteredSelectedRowModel,
|
|
13
|
+
getPrePaginationRowModel,
|
|
14
|
+
getState,
|
|
15
|
+
options: {
|
|
16
|
+
enableRowSelection,
|
|
17
|
+
enableSelectAll,
|
|
18
|
+
icons: { IconX },
|
|
19
|
+
localization,
|
|
20
|
+
mantineToolbarAlertBannerBadgeProps,
|
|
21
|
+
mantineToolbarAlertBannerProps,
|
|
22
|
+
manualPagination,
|
|
23
|
+
positionToolbarAlertBanner,
|
|
24
|
+
renderToolbarAlertBannerContent,
|
|
25
|
+
rowCount
|
|
26
|
+
}
|
|
27
|
+
} = table;
|
|
28
|
+
const { density, grouping, rowSelection, showAlertBanner } = getState();
|
|
29
|
+
const optimizations = table.refs.optimizations.current;
|
|
30
|
+
const store = table.refs.selectionStoreRef.current;
|
|
31
|
+
const optimizedRowSelection = useSelectionStore(store, (state) => state.rowSelection);
|
|
32
|
+
const optimizedSelectAllHandler = useSelectionStore(store, (state) => state.toggleAllRowsSelected);
|
|
33
|
+
const alertProps = {
|
|
34
|
+
...parseFromValuesOrFunc(mantineToolbarAlertBannerProps, {
|
|
35
|
+
table
|
|
36
|
+
}),
|
|
37
|
+
...rest
|
|
38
|
+
};
|
|
39
|
+
const badgeProps = parseFromValuesOrFunc(mantineToolbarAlertBannerBadgeProps, { table });
|
|
40
|
+
const totalRowCount = rowCount ?? getPrePaginationRowModel().flatRows.length;
|
|
41
|
+
const selectedRowCount = useMemo(
|
|
42
|
+
() => manualPagination ? Object.values((optimizations == null ? void 0 : optimizations.selection) ? optimizedRowSelection : rowSelection).filter(Boolean).length : getFilteredSelectedRowModel().rows.length,
|
|
43
|
+
[optimizedRowSelection, rowSelection, totalRowCount, manualPagination]
|
|
44
|
+
);
|
|
45
|
+
const selectedAlert = selectedRowCount ? /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "sm", children: [
|
|
46
|
+
(_b = (_a = localization.selectedCountOfRowCountRowsSelected) == null ? void 0 : _a.replace("{selectedCount}", selectedRowCount.toString())) == null ? void 0 : _b.replace("{rowCount}", totalRowCount.toString()),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Button,
|
|
49
|
+
{
|
|
50
|
+
onClick: (event) => {
|
|
51
|
+
if (optimizations == null ? void 0 : optimizations.selection) {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
optimizedSelectAllHandler(table, false);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
return getMRT_SelectAllHandler({ table })(event, false, true);
|
|
57
|
+
},
|
|
58
|
+
size: "compact-xs",
|
|
59
|
+
variant: "subtle",
|
|
60
|
+
children: localization.clearSelection
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] }) : null;
|
|
64
|
+
const groupedAlert = grouping.length > 0 ? /* @__PURE__ */ jsxs(Flex, { children: [
|
|
65
|
+
localization.groupedBy,
|
|
66
|
+
" ",
|
|
67
|
+
grouping.map((columnId, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
|
+
index > 0 ? localization.thenBy : "",
|
|
69
|
+
/* @__PURE__ */ jsxs(
|
|
70
|
+
Badge,
|
|
71
|
+
{
|
|
72
|
+
className: classes["alert-badge"],
|
|
73
|
+
rightSection: /* @__PURE__ */ jsx(
|
|
74
|
+
ActionIcon,
|
|
75
|
+
{
|
|
76
|
+
color: "white",
|
|
77
|
+
onClick: () => table.getColumn(columnId).toggleGrouping(),
|
|
78
|
+
size: "xs",
|
|
79
|
+
variant: "subtle",
|
|
80
|
+
children: /* @__PURE__ */ jsx(IconX, { style: { transform: "scale(0.8)" } })
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
variant: "filled",
|
|
84
|
+
...badgeProps,
|
|
85
|
+
children: [
|
|
86
|
+
table.getColumn(columnId).columnDef.header,
|
|
87
|
+
" "
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] }, `${index}-${columnId}`))
|
|
92
|
+
] }) : null;
|
|
93
|
+
return /* @__PURE__ */ jsx(Collapse, { in: showAlertBanner || !!selectedAlert || !!groupedAlert, transitionDuration: stackAlertBanner ? 200 : 0, children: /* @__PURE__ */ jsx(
|
|
94
|
+
Alert,
|
|
95
|
+
{
|
|
96
|
+
color: "blue",
|
|
97
|
+
icon: false,
|
|
98
|
+
...alertProps,
|
|
99
|
+
className: clsx(
|
|
100
|
+
classes.alert,
|
|
101
|
+
stackAlertBanner && !positionToolbarAlertBanner && classes["alert-stacked"],
|
|
102
|
+
!stackAlertBanner && positionToolbarAlertBanner === "bottom" && classes["alert-bottom"],
|
|
103
|
+
alertProps == null ? void 0 : alertProps.className
|
|
104
|
+
),
|
|
105
|
+
children: (renderToolbarAlertBannerContent == null ? void 0 : renderToolbarAlertBannerContent({
|
|
106
|
+
groupedAlert,
|
|
107
|
+
selectedAlert,
|
|
108
|
+
table
|
|
109
|
+
})) ?? /* @__PURE__ */ jsxs(
|
|
110
|
+
Flex,
|
|
111
|
+
{
|
|
112
|
+
className: clsx(
|
|
113
|
+
classes["toolbar-alert"],
|
|
114
|
+
positionToolbarAlertBanner === "head-overlay" && classes["head-overlay"],
|
|
115
|
+
density
|
|
116
|
+
),
|
|
117
|
+
children: [
|
|
118
|
+
enableRowSelection && enableSelectAll && positionToolbarAlertBanner === "head-overlay" && /* @__PURE__ */ jsx(MRT_SelectCheckbox, { table }),
|
|
119
|
+
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
120
|
+
alertProps == null ? void 0 : alertProps.children,
|
|
121
|
+
selectedAlert,
|
|
122
|
+
groupedAlert
|
|
123
|
+
] })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
) });
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
MRT_ToolbarAlertBanner
|
|
132
|
+
};
|
package/dist/core/esm/Tables/NextGenDataGrid/patch/toolbar/MRT_ToolbarAlertBanner.module.css.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const alert = "_alert_bw71q_1";
|
|
2
|
+
const classes = {
|
|
3
|
+
alert,
|
|
4
|
+
"alert-stacked": "_alert-stacked_bw71q_13",
|
|
5
|
+
"alert-bottom": "_alert-bottom_bw71q_17",
|
|
6
|
+
"alert-badge": "_alert-badge_bw71q_21",
|
|
7
|
+
"toolbar-alert": "_toolbar-alert_bw71q_25",
|
|
8
|
+
"head-overlay": "_head-overlay_bw71q_28"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
alert,
|
|
12
|
+
classes as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.mjs";
|
|
2
|
+
import { __require as requireIsEqual } from "../../../.external/esm/lodash@4.17.23/lodash/isEqual.mjs";
|
|
3
|
+
var isEqualExports = requireIsEqual();
|
|
4
|
+
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(isEqualExports);
|
|
5
|
+
export {
|
|
6
|
+
isEqual as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function HooksComponent({ useOnLoadProps, useViewProps, useTableSelectionProps, useTableOptimizationsProps, useQueryOnlyVisibleColumnsProps, }: {
|
|
2
|
+
useOnLoadProps: any;
|
|
3
|
+
useViewProps: any;
|
|
4
|
+
useTableSelectionProps: any;
|
|
5
|
+
useTableOptimizationsProps: any;
|
|
6
|
+
useQueryOnlyVisibleColumnsProps: any;
|
|
7
|
+
}): void;
|
|
@@ -1165,6 +1165,20 @@ export type NextGenDataGridFormProps = {
|
|
|
1165
1165
|
*/
|
|
1166
1166
|
dialogProps?: CommonModalProps & AddDialogProps;
|
|
1167
1167
|
};
|
|
1168
|
+
export type NextGenDataGridOptimizationProps = {
|
|
1169
|
+
/**
|
|
1170
|
+
* - Whether to optimize for selection. When enabled, selection column will be replaced with a custom one that is optimized for performance.
|
|
1171
|
+
*/
|
|
1172
|
+
selection?: boolean;
|
|
1173
|
+
/**
|
|
1174
|
+
* - Ref for the selection value to synchronize with external components when `selection` optimization is enabled.
|
|
1175
|
+
*/
|
|
1176
|
+
selectionValueRef?: React.RefObject<string[]>;
|
|
1177
|
+
/**
|
|
1178
|
+
* - Whether to optimize for loading state. When enabled, the table body will not render any cells when in loading state. This will break features that rely on the cells being rendered in loading state, such as skeletons and custom loading indicators, but will improve performance when dealing with large data sets. Defaults to `true`
|
|
1179
|
+
*/
|
|
1180
|
+
loading?: boolean;
|
|
1181
|
+
};
|
|
1168
1182
|
export type NextGenDataGridProps = {
|
|
1169
1183
|
/**
|
|
1170
1184
|
* - Children to render inside the DataGrid
|
|
@@ -1268,9 +1282,13 @@ export type NextGenDataGridProps = {
|
|
|
1268
1282
|
memo?: boolean | "filters" | "cells";
|
|
1269
1283
|
/**
|
|
1270
1284
|
* - Whether to only query the visible columns from the backend. When enabled, it modifies the `columns` from the `queryParams` to only include the visible columns. Defaults to `false`
|
|
1271
|
-
* Deprecated props
|
|
1272
1285
|
*/
|
|
1273
1286
|
queryOnlyVisibleColumns?: boolean;
|
|
1287
|
+
/**
|
|
1288
|
+
* - Optimization options for the table
|
|
1289
|
+
* Deprecated props
|
|
1290
|
+
*/
|
|
1291
|
+
optimizations?: NextGenDataGridOptimizationProps;
|
|
1274
1292
|
/**
|
|
1275
1293
|
* - Body separator for the table
|
|
1276
1294
|
*/
|
package/dist/core/lib/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function selectionStoreFactory(): import('zustand').UseBoundStore<import('zustand').StoreApi<any>>;
|
|
2
|
+
export function useSelectionStore(store: import('zustand').StoreApi<SelectionStore>, selector: (state: SelectionStore) => any): any;
|
|
3
|
+
export type SelectionStore = {
|
|
4
|
+
/**
|
|
5
|
+
* - An object mapping row IDs to their selected state.
|
|
6
|
+
*/
|
|
7
|
+
rowSelection: Record<string, boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* - A set of React refs that need to be synchronized with the row selection state.
|
|
10
|
+
*/
|
|
11
|
+
refs: Set<React.RefObject<string[]>>;
|
|
12
|
+
/**
|
|
13
|
+
* - A function to retrieve the currently selected row IDs as an array.
|
|
14
|
+
*/
|
|
15
|
+
getSelectedRows: () => string[];
|
|
16
|
+
/**
|
|
17
|
+
* - A function to set the selected rows based on an array of row IDs.
|
|
18
|
+
*/
|
|
19
|
+
setSelectedRows: (ids: string[]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* - A function to determine if all rows are selected based on the current state of rowSelection.
|
|
22
|
+
*/
|
|
23
|
+
getIsAllRowsSelected: (table: import('mantine-react-table').MRT_TableInstance<import('mantine-react-table').MRT_RowData>) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* - A function to determine if some rows are selected based on the current state of rowSelection.
|
|
26
|
+
*/
|
|
27
|
+
getIsSomeRowsSelected: (table: import('mantine-react-table').MRT_TableInstance<import('mantine-react-table').MRT_RowData>) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* - A function to toggle the selected state of a specific row.
|
|
30
|
+
*/
|
|
31
|
+
toggleRowSelected: (rowId: string) => void;
|
|
32
|
+
/**
|
|
33
|
+
* - A function to toggle the selected state of all rows based on a given value.
|
|
34
|
+
*/
|
|
35
|
+
toggleAllRowsSelected: (table: import('mantine-react-table').MRT_TableInstance<import('mantine-react-table').MRT_RowData>, value: boolean) => void;
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OptimizedMRT_RowSelectColumn/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useOnLoad(fetchOnMount: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useQueryOnlyVisibleColumns(table: any, queryOnlyVisibleColumns: any): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export function FASTAPI_RTK_ToolbarAlertBanner({
|
|
1
|
+
export function FASTAPI_RTK_ToolbarAlertBanner({ groupedAlert, selectedAlert, table, alertBanner, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
|
3
|
-
|
|
3
|
+
groupedAlert: any;
|
|
4
|
+
selectedAlert: any;
|
|
4
5
|
table: any;
|
|
6
|
+
alertBanner: any;
|
|
5
7
|
}): import("react").JSX.Element;
|
package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export function useToolbarAlertBanner(toolbar: any): {
|
|
2
|
-
renderToolbarAlertBannerContent: ({ table }: {
|
|
1
|
+
export function useToolbarAlertBanner(toolbar: any, optimizations: any): {
|
|
2
|
+
renderToolbarAlertBannerContent: ({ groupedAlert, selectedAlert, table }: {
|
|
3
|
+
groupedAlert: any;
|
|
4
|
+
selectedAlert: any;
|
|
3
5
|
table: any;
|
|
4
6
|
}) => import("react").JSX.Element;
|
|
5
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useView(form: any): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function MRT_TableBody({ columnVirtualizer, table, tableProps, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
columnVirtualizer: any;
|
|
4
|
+
table: any;
|
|
5
|
+
tableProps: any;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export const Memo_MRT_TableBody: import('react').MemoExoticComponent<({ columnVirtualizer, table, tableProps, ...rest }: {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
columnVirtualizer: any;
|
|
10
|
+
table: any;
|
|
11
|
+
tableProps: any;
|
|
12
|
+
}) => import("react").JSX.Element>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function MRT_TableBodyRow({ children, columnVirtualizer, numRows, pinnedRowIds, renderedRowIndex, row, rowVirtualizer, table, tableProps, virtualRow, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
columnVirtualizer: any;
|
|
5
|
+
numRows: any;
|
|
6
|
+
pinnedRowIds: any;
|
|
7
|
+
renderedRowIndex?: number;
|
|
8
|
+
row: any;
|
|
9
|
+
rowVirtualizer: any;
|
|
10
|
+
table: any;
|
|
11
|
+
tableProps: any;
|
|
12
|
+
virtualRow: any;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export const Memo_MRT_TableBodyRow: import('react').MemoExoticComponent<({ children, columnVirtualizer, numRows, pinnedRowIds, renderedRowIndex, row, rowVirtualizer, table, tableProps, virtualRow, ...rest }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
children: any;
|
|
17
|
+
columnVirtualizer: any;
|
|
18
|
+
numRows: any;
|
|
19
|
+
pinnedRowIds: any;
|
|
20
|
+
renderedRowIndex?: number;
|
|
21
|
+
row: any;
|
|
22
|
+
rowVirtualizer: any;
|
|
23
|
+
table: any;
|
|
24
|
+
tableProps: any;
|
|
25
|
+
virtualRow: any;
|
|
26
|
+
}) => import("react").JSX.Element>;
|