fastapi-rtk 0.2.62 → 1.0.1
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/index10.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
- package/dist/.external/cjs/@tanstack_react-table@8.20.5_react-dom@18.3.1_react@18.3.1/@tanstack/react-table/build/lib/index.cjs +16 -0
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/core/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/format/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/validation/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._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.cjs +87 -2
- package/dist/.external/esm/@tanstack_react-table@8.20.5_react-dom@18.3.1_react@18.3.1/@tanstack/react-table/build/lib/index.mjs +16 -0
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/core/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/format/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/validation/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._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.mjs +90 -5
- package/dist/core/cjs/Dialogs/AddDialog.cjs +1 -1
- package/dist/core/cjs/Dialogs/EditDialog.cjs +1 -1
- package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.cjs +13 -3
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TablePaper.cjs +2 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TopToolbar.cjs +87 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/MRT_TopToolbar.module.css.cjs +11 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/patch/common.styles.module.css.cjs +5 -0
- package/dist/core/cjs/index.cjs +2 -0
- package/dist/core/esm/Dialogs/AddDialog.mjs +1 -1
- package/dist/core/esm/Dialogs/EditDialog.mjs +1 -1
- package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.mjs +13 -3
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TablePaper.mjs +2 -1
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TopToolbar.mjs +87 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/MRT_TopToolbar.module.css.mjs +11 -0
- package/dist/core/esm/Tables/NextGenDataGrid/patch/common.styles.module.css.mjs +6 -0
- package/dist/core/esm/index.mjs +2 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.d.ts +3 -1
- package/dist/core/lib/Tables/NextGenDataGrid/patch/MRT_TopToolbar.d.ts +4 -0
- package/dist/core/lib/index.d.ts +1 -0
- package/dist/core/styles.css +34 -0
- package/package.json +1 -1
- /package/dist/.external/cjs/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.5_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.cjs +0 -0
- /package/dist/.external/esm/{mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.5_yup@1.7.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1}/mantine-form-yup-resolver/dist/esm/index.mjs +0 -0
|
@@ -29,6 +29,21 @@ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
|
29
29
|
*
|
|
30
30
|
* @license MIT
|
|
31
31
|
*/
|
|
32
|
+
function flexRender(Comp, props) {
|
|
33
|
+
return !Comp ? null : isReactComponent(Comp) ? /* @__PURE__ */ React__namespace.createElement(Comp, props) : Comp;
|
|
34
|
+
}
|
|
35
|
+
function isReactComponent(component) {
|
|
36
|
+
return isClassComponent(component) || typeof component === "function" || isExoticComponent(component);
|
|
37
|
+
}
|
|
38
|
+
function isClassComponent(component) {
|
|
39
|
+
return typeof component === "function" && (() => {
|
|
40
|
+
const proto = Object.getPrototypeOf(component);
|
|
41
|
+
return proto.prototype && proto.prototype.isReactComponent;
|
|
42
|
+
})();
|
|
43
|
+
}
|
|
44
|
+
function isExoticComponent(component) {
|
|
45
|
+
return typeof component === "object" && typeof component.$$typeof === "symbol" && ["react.memo", "react.forward_ref"].includes(component.$$typeof.description);
|
|
46
|
+
}
|
|
32
47
|
function useReactTable(options) {
|
|
33
48
|
const resolvedOptions = {
|
|
34
49
|
state: {},
|
|
@@ -108,4 +123,5 @@ exports.reSplitAlphaNumeric = index.reSplitAlphaNumeric;
|
|
|
108
123
|
exports.selectRowsFn = index.selectRowsFn;
|
|
109
124
|
exports.shouldAutoRemoveFilter = index.shouldAutoRemoveFilter;
|
|
110
125
|
exports.sortingFns = index.sortingFns;
|
|
126
|
+
exports.flexRender = flexRender;
|
|
111
127
|
exports.useReactTable = useReactTable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../.bundled/jsonforms/cjs/_virtual/index10.cjs");
|
|
4
4
|
const index$1 = require("./codegen/index.cjs");
|
|
5
5
|
const validation_error = require("../runtime/validation_error.cjs");
|
|
6
6
|
const names = require("./names.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index8.cjs");
|
|
4
4
|
const additionalItems = require("./additionalItems.cjs");
|
|
5
5
|
const prefixItems = require("./prefixItems.cjs");
|
|
6
6
|
const items = require("./items.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index6.cjs");
|
|
4
4
|
const id = require("./id.cjs");
|
|
5
5
|
const ref = require("./ref.cjs");
|
|
6
6
|
var hasRequiredCore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index9.cjs");
|
|
4
4
|
const format = require("./format.cjs");
|
|
5
5
|
var hasRequiredFormat;
|
|
6
6
|
function requireFormat() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index7.cjs");
|
|
4
4
|
const limitNumber = require("./limitNumber.cjs");
|
|
5
5
|
const multipleOf = require("./multipleOf.cjs");
|
|
6
6
|
const limitLength = require("./limitLength.cjs");
|
|
@@ -118,7 +118,7 @@ const getPrimaryShade = (theme) => {
|
|
|
118
118
|
var _a, _b;
|
|
119
119
|
return typeof theme.primaryShade === "number" ? theme.primaryShade : (_b = (_a = theme.primaryShade) === null || _a === void 0 ? void 0 : _a.dark) !== null && _b !== void 0 ? _b : 7;
|
|
120
120
|
};
|
|
121
|
-
const getPrimaryColor = (theme, shade) => theme.colors[theme.primaryColor][getPrimaryShade(theme)];
|
|
121
|
+
const getPrimaryColor = (theme, shade) => theme.colors[theme.primaryColor][shade !== null && shade !== void 0 ? shade : getPrimaryShade(theme)];
|
|
122
122
|
function dataVariable(name, value) {
|
|
123
123
|
const key = `data-${name}`;
|
|
124
124
|
switch (typeof value) {
|
|
@@ -2019,7 +2019,17 @@ const MRT_GlobalFilterTextInput = (_a) => {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
} }))] });
|
|
2021
2021
|
};
|
|
2022
|
-
const
|
|
2022
|
+
const flexRender = index.flexRender;
|
|
2023
|
+
function createMRTColumnHelper() {
|
|
2024
|
+
return {
|
|
2025
|
+
accessor: (accessor, column) => {
|
|
2026
|
+
return typeof accessor === "function" ? Object.assign(Object.assign({}, column), { accessorFn: accessor }) : Object.assign(Object.assign({}, column), { accessorKey: accessor });
|
|
2027
|
+
},
|
|
2028
|
+
display: (column) => column,
|
|
2029
|
+
group: (column) => column
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
const createRow = (table, originalRow, rowIndex = -1, depth = 0, subRows, parentId) => index$1.createRow(table, "mrt-row-create", originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
|
|
2023
2033
|
[getColumnId(col)]: ""
|
|
2024
2034
|
}))), rowIndex, depth, subRows, parentId);
|
|
2025
2035
|
const getMRT_RowActionsColumnDef = (tableOptions) => {
|
|
@@ -2572,6 +2582,8 @@ const useMRT_TableInstance = (definedTableOptions) => {
|
|
|
2572
2582
|
return table;
|
|
2573
2583
|
};
|
|
2574
2584
|
const useMantineReactTable = (tableOptions) => useMRT_TableInstance(useMRT_TableOptions(tableOptions));
|
|
2585
|
+
var classes$8 = { "root": "MRT_TablePaper-module_root__q0v5L" };
|
|
2586
|
+
var classes$7 = { "root": "MRT_TableContainer-module_root__JIsGB", "root-sticky": "MRT_TableContainer-module_root-sticky__uC4qx", "root-fullscreen": "MRT_TableContainer-module_root-fullscreen__aM8Jg" };
|
|
2575
2587
|
var classes$6 = { "root": "MRT_Table-module_root__ms2uS", "root-grid": "MRT_Table-module_root-grid__2Pynz" };
|
|
2576
2588
|
const useMRT_ColumnVirtualizer = (table) => {
|
|
2577
2589
|
var _a, _b, _c, _d;
|
|
@@ -2676,6 +2688,31 @@ const MRT_EditRowModal = (_a) => {
|
|
|
2676
2688
|
table
|
|
2677
2689
|
}))) !== null && _b !== void 0 ? _b : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsxRuntime.jsx(core.Stack, { gap: "lg", pb: 24, pt: 16, children: internalEditComponents }) }), jsxRuntime.jsx(core.Flex, { justify: "flex-end", children: jsxRuntime.jsx(MRT_EditActionButtons, { row, table, variant: "text" }) })] }));
|
|
2678
2690
|
};
|
|
2691
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
2692
|
+
const MRT_TableContainer = (_a) => {
|
|
2693
|
+
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
2694
|
+
const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, mantineLoadingOverlayProps, mantineTableContainerProps }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef } } = table;
|
|
2695
|
+
const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay } = getState();
|
|
2696
|
+
const [totalToolbarHeight, setTotalToolbarHeight] = React.useState(0);
|
|
2697
|
+
const tableContainerProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(mantineTableContainerProps, { table })), rest);
|
|
2698
|
+
const loadingOverlayProps = parseFromValuesOrFunc(mantineLoadingOverlayProps, { table });
|
|
2699
|
+
useIsomorphicLayoutEffect(() => {
|
|
2700
|
+
var _a2, _b, _c, _d;
|
|
2701
|
+
const topToolbarHeight = typeof document !== "undefined" ? (_b = (_a2 = topToolbarRef.current) === null || _a2 === void 0 ? void 0 : _a2.offsetHeight) !== null && _b !== void 0 ? _b : 0 : 0;
|
|
2702
|
+
const bottomToolbarHeight = typeof document !== "undefined" ? (_d = (_c = bottomToolbarRef === null || bottomToolbarRef === void 0 ? void 0 : bottomToolbarRef.current) === null || _c === void 0 ? void 0 : _c.offsetHeight) !== null && _d !== void 0 ? _d : 0 : 0;
|
|
2703
|
+
setTotalToolbarHeight(topToolbarHeight + bottomToolbarHeight);
|
|
2704
|
+
});
|
|
2705
|
+
const createModalOpen = createDisplayMode === "modal" && creatingRow;
|
|
2706
|
+
const editModalOpen = editDisplayMode === "modal" && editingRow;
|
|
2707
|
+
return jsxRuntime.jsxs(core.Box, Object.assign({}, tableContainerProps, { __vars: Object.assign({ "--mrt-top-toolbar-height": `${totalToolbarHeight}` }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.__vars), className: clsx.clsx("mrt-table-container", classes$7.root, enableStickyHeader && classes$7["root-sticky"], isFullScreen && classes$7["root-fullscreen"], tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.className), ref: (node) => {
|
|
2708
|
+
if (node) {
|
|
2709
|
+
tableContainerRef.current = node;
|
|
2710
|
+
if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
|
|
2711
|
+
tableContainerProps.ref.current = node;
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
}, children: [jsxRuntime.jsx(core.LoadingOverlay, Object.assign({ visible: isLoading || showLoadingOverlay, zIndex: 2 }, loadingOverlayProps)), jsxRuntime.jsx(MRT_Table, { table }), (createModalOpen || editModalOpen) && jsxRuntime.jsx(MRT_EditRowModal, { open: true, table })] }));
|
|
2715
|
+
};
|
|
2679
2716
|
var commonClasses = { "common-toolbar-styles": "common-styles-module_common-toolbar-styles__DnjR8" };
|
|
2680
2717
|
var classes$5 = { "root": "MRT_BottomToolbar-module_root__VDeWo", "root-fullscreen": "MRT_BottomToolbar-module_root-fullscreen__esE15", "custom-toolbar-container": "MRT_BottomToolbar-module_custom-toolbar-container__XcDRF", "paginator-container": "MRT_BottomToolbar-module_paginator-container__A3eWY", "paginator-container-alert-banner": "MRT_BottomToolbar-module_paginator-container-alert-banner__gyqtO" };
|
|
2681
2718
|
var classes$4 = { "collapse": "MRT_ProgressBar-module_collapse__rOLJH", "collapse-top": "MRT_ProgressBar-module_collapse-top__oCi0h" };
|
|
@@ -2777,6 +2814,49 @@ const MRT_TopToolbar = (_a) => {
|
|
|
2777
2814
|
}
|
|
2778
2815
|
}, children: [positionToolbarAlertBanner === "top" && jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner, table }), ["both", "top"].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : "") && jsxRuntime.jsx(MRT_ToolbarDropZone, { table }), jsxRuntime.jsxs(core.Flex, { className: clsx.clsx(classes$1["actions-container"], stackAlertBanner && classes$1["actions-container-stack-alert"]), children: [enableGlobalFilter && positionGlobalFilter === "left" && jsxRuntime.jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps)), (_b = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _b !== void 0 ? _b : jsxRuntime.jsx("span", {}), enableToolbarInternalActions ? jsxRuntime.jsxs(core.Flex, { justify: "end", wrap: "wrap-reverse", children: [enableGlobalFilter && positionGlobalFilter === "right" && jsxRuntime.jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps)), jsxRuntime.jsx(MRT_ToolbarInternalButtons, { table })] }) : enableGlobalFilter && positionGlobalFilter === "right" && jsxRuntime.jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps))] }), enablePagination && ["both", "top"].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : "") && jsxRuntime.jsx(core.Flex, { justify: "end", children: jsxRuntime.jsx(MRT_TablePagination, { position: "top", table }) }), jsxRuntime.jsx(MRT_ProgressBar, { isTopToolbar: true, table })] }));
|
|
2779
2816
|
};
|
|
2817
|
+
const MRT_TablePaper = (_a) => {
|
|
2818
|
+
var _b, _c;
|
|
2819
|
+
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
2820
|
+
const { getState, options: { enableBottomToolbar, enableTopToolbar, mantinePaperProps, renderBottomToolbar, renderTopToolbar }, refs: { tablePaperRef } } = table;
|
|
2821
|
+
const { isFullScreen } = getState();
|
|
2822
|
+
const tablePaperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(mantinePaperProps, { table })), rest);
|
|
2823
|
+
return jsxRuntime.jsxs(core.Paper, Object.assign({ shadow: "xs", withBorder: true }, tablePaperProps, {
|
|
2824
|
+
className: clsx.clsx("mrt-table-paper", classes$8.root, isFullScreen && "mrt-table-paper-fullscreen", tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.className),
|
|
2825
|
+
ref: (ref) => {
|
|
2826
|
+
tablePaperRef.current = ref;
|
|
2827
|
+
if (tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.ref) {
|
|
2828
|
+
tablePaperProps.ref.current = ref;
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
// rare case where we should use inline styles to guarantee highest specificity
|
|
2832
|
+
style: (theme) => Object.assign(Object.assign({ zIndex: isFullScreen ? 200 : void 0 }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style, theme)), isFullScreen ? {
|
|
2833
|
+
border: 0,
|
|
2834
|
+
borderRadius: 0,
|
|
2835
|
+
bottom: 0,
|
|
2836
|
+
height: "100vh",
|
|
2837
|
+
left: 0,
|
|
2838
|
+
margin: 0,
|
|
2839
|
+
maxHeight: "100vh",
|
|
2840
|
+
maxWidth: "100vw",
|
|
2841
|
+
padding: 0,
|
|
2842
|
+
position: "fixed",
|
|
2843
|
+
right: 0,
|
|
2844
|
+
top: 0,
|
|
2845
|
+
width: "100vw"
|
|
2846
|
+
} : null),
|
|
2847
|
+
children: [enableTopToolbar && ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : jsxRuntime.jsx(MRT_TopToolbar, { table })), jsxRuntime.jsx(MRT_TableContainer, { table }), enableBottomToolbar && ((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : jsxRuntime.jsx(MRT_BottomToolbar, { table }))]
|
|
2848
|
+
}));
|
|
2849
|
+
};
|
|
2850
|
+
const isTableInstanceProp = (props) => props.table !== void 0;
|
|
2851
|
+
const MantineReactTable = (props) => {
|
|
2852
|
+
let table;
|
|
2853
|
+
if (isTableInstanceProp(props)) {
|
|
2854
|
+
table = props.table;
|
|
2855
|
+
} else {
|
|
2856
|
+
table = useMantineReactTable(props);
|
|
2857
|
+
}
|
|
2858
|
+
return jsxRuntime.jsx(MRT_TablePaper, { table });
|
|
2859
|
+
};
|
|
2780
2860
|
exports.MRT_AggregationFns = MRT_AggregationFns;
|
|
2781
2861
|
exports.MRT_BottomToolbar = MRT_BottomToolbar;
|
|
2782
2862
|
exports.MRT_ColumnActionMenu = MRT_ColumnActionMenu;
|
|
@@ -2813,6 +2893,7 @@ exports.MRT_TableBodyEmptyRow = MRT_TableBodyEmptyRow;
|
|
|
2813
2893
|
exports.MRT_TableBodyRow = MRT_TableBodyRow;
|
|
2814
2894
|
exports.MRT_TableBodyRowGrabHandle = MRT_TableBodyRowGrabHandle;
|
|
2815
2895
|
exports.MRT_TableBodyRowPinButton = MRT_TableBodyRowPinButton;
|
|
2896
|
+
exports.MRT_TableContainer = MRT_TableContainer;
|
|
2816
2897
|
exports.MRT_TableDetailPanel = MRT_TableDetailPanel;
|
|
2817
2898
|
exports.MRT_TableFooter = MRT_TableFooter;
|
|
2818
2899
|
exports.MRT_TableFooterCell = MRT_TableFooterCell;
|
|
@@ -2826,6 +2907,7 @@ exports.MRT_TableHeadCellResizeHandle = MRT_TableHeadCellResizeHandle;
|
|
|
2826
2907
|
exports.MRT_TableHeadCellSortLabel = MRT_TableHeadCellSortLabel;
|
|
2827
2908
|
exports.MRT_TableHeadRow = MRT_TableHeadRow;
|
|
2828
2909
|
exports.MRT_TablePagination = MRT_TablePagination;
|
|
2910
|
+
exports.MRT_TablePaper = MRT_TablePaper;
|
|
2829
2911
|
exports.MRT_ToggleDensePaddingButton = MRT_ToggleDensePaddingButton;
|
|
2830
2912
|
exports.MRT_ToggleFiltersButton = MRT_ToggleFiltersButton;
|
|
2831
2913
|
exports.MRT_ToggleFullScreenButton = MRT_ToggleFullScreenButton;
|
|
@@ -2835,12 +2917,15 @@ exports.MRT_ToolbarAlertBanner = MRT_ToolbarAlertBanner;
|
|
|
2835
2917
|
exports.MRT_ToolbarDropZone = MRT_ToolbarDropZone;
|
|
2836
2918
|
exports.MRT_ToolbarInternalButtons = MRT_ToolbarInternalButtons;
|
|
2837
2919
|
exports.MRT_TopToolbar = MRT_TopToolbar;
|
|
2920
|
+
exports.MantineReactTable = MantineReactTable;
|
|
2838
2921
|
exports.Memo_MRT_TableBody = Memo_MRT_TableBody;
|
|
2839
2922
|
exports.Memo_MRT_TableBodyCell = Memo_MRT_TableBodyCell;
|
|
2840
2923
|
exports.Memo_MRT_TableBodyRow = Memo_MRT_TableBodyRow;
|
|
2924
|
+
exports.createMRTColumnHelper = createMRTColumnHelper;
|
|
2841
2925
|
exports.createRow = createRow;
|
|
2842
2926
|
exports.dataVariable = dataVariable;
|
|
2843
2927
|
exports.defaultDisplayColumnProps = defaultDisplayColumnProps;
|
|
2928
|
+
exports.flexRender = flexRender;
|
|
2844
2929
|
exports.getAllLeafColumnDefs = getAllLeafColumnDefs;
|
|
2845
2930
|
exports.getCanRankRows = getCanRankRows;
|
|
2846
2931
|
exports.getColumnId = getColumnId;
|
|
@@ -11,6 +11,21 @@ import { ColumnFaceting, ColumnFiltering, ColumnGrouping, ColumnOrdering, Column
|
|
|
11
11
|
*
|
|
12
12
|
* @license MIT
|
|
13
13
|
*/
|
|
14
|
+
function flexRender(Comp, props) {
|
|
15
|
+
return !Comp ? null : isReactComponent(Comp) ? /* @__PURE__ */ React.createElement(Comp, props) : Comp;
|
|
16
|
+
}
|
|
17
|
+
function isReactComponent(component) {
|
|
18
|
+
return isClassComponent(component) || typeof component === "function" || isExoticComponent(component);
|
|
19
|
+
}
|
|
20
|
+
function isClassComponent(component) {
|
|
21
|
+
return typeof component === "function" && (() => {
|
|
22
|
+
const proto = Object.getPrototypeOf(component);
|
|
23
|
+
return proto.prototype && proto.prototype.isReactComponent;
|
|
24
|
+
})();
|
|
25
|
+
}
|
|
26
|
+
function isExoticComponent(component) {
|
|
27
|
+
return typeof component === "object" && typeof component.$$typeof === "symbol" && ["react.memo", "react.forward_ref"].includes(component.$$typeof.description);
|
|
28
|
+
}
|
|
14
29
|
function useReactTable(options) {
|
|
15
30
|
const resolvedOptions = {
|
|
16
31
|
state: {},
|
|
@@ -68,6 +83,7 @@ export {
|
|
|
68
83
|
expandRows,
|
|
69
84
|
filterFns,
|
|
70
85
|
flattenBy,
|
|
86
|
+
flexRender,
|
|
71
87
|
functionalUpdate,
|
|
72
88
|
getCoreRowModel,
|
|
73
89
|
getExpandedRowModel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as compile } from "../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as compile } from "../../../../../../.bundled/jsonforms/esm/_virtual/index10.mjs";
|
|
2
2
|
import { __require as requireCodegen } from "./codegen/index.mjs";
|
|
3
3
|
import { __require as requireValidation_error } from "../runtime/validation_error.mjs";
|
|
4
4
|
import { __require as requireNames } from "./names.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as applicator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as applicator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index8.mjs";
|
|
2
2
|
import { __require as requireAdditionalItems } from "./additionalItems.mjs";
|
|
3
3
|
import { __require as requirePrefixItems } from "./prefixItems.mjs";
|
|
4
4
|
import { __require as requireItems } from "./items.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as core } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as core } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index6.mjs";
|
|
2
2
|
import { __require as requireId } from "./id.mjs";
|
|
3
3
|
import { __require as requireRef } from "./ref.mjs";
|
|
4
4
|
var hasRequiredCore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as format } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as format } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index9.mjs";
|
|
2
2
|
import { __require as requireFormat$1 } from "./format.mjs";
|
|
3
3
|
var hasRequiredFormat;
|
|
4
4
|
function requireFormat() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as validation } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as validation } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index7.mjs";
|
|
2
2
|
import { __require as requireLimitNumber } from "./limitNumber.mjs";
|
|
3
3
|
import { __require as requireMultipleOf } from "./multipleOf.mjs";
|
|
4
4
|
import { __require as requireLimitLength } from "./limitLength.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { clsx } from "../../../clsx@2.1.1/clsx/dist/clsx.mjs";
|
|
3
|
-
import { useRef, useMemo, useState, useReducer, useEffect, Fragment as Fragment$1, memo, createElement, useCallback } from "react";
|
|
4
|
-
import { useDirection, Flex, Tooltip, Switch, Radio, Checkbox, Box, ActionIcon, Menu, Button, Select, MultiSelect, TextInput, Badge, Collapse, Alert, Stack, Transition, Text, Group, Pagination, Progress, useMantineColorScheme, Table, lighten, darken, Modal, TableThead, TableTr, TableTh, TableTbody, TableTfoot, useMantineTheme, TableTd, Popover, Indicator, Skeleton, RangeSlider, Autocomplete, CopyButton, UnstyledButton, Highlight } from "@mantine/core";
|
|
5
|
-
import { useReactTable } from "../../../@tanstack_react-table@8.20.5_react-dom@18.3.1_react@18.3.1/@tanstack/react-table/build/lib/index.mjs";
|
|
3
|
+
import { useRef, useMemo, useState, useReducer, useEffect, Fragment as Fragment$1, memo, createElement, useCallback, useLayoutEffect } from "react";
|
|
4
|
+
import { useDirection, Flex, Tooltip, Switch, Radio, Checkbox, Box, ActionIcon, Menu, Button, Select, MultiSelect, TextInput, Badge, Collapse, Alert, Stack, Transition, Text, Group, Pagination, Progress, useMantineColorScheme, Table, lighten, darken, Modal, TableThead, TableTr, TableTh, TableTbody, TableTfoot, useMantineTheme, TableTd, Popover, Indicator, Skeleton, RangeSlider, Autocomplete, CopyButton, UnstyledButton, Highlight, LoadingOverlay, Paper } from "@mantine/core";
|
|
5
|
+
import { useReactTable, flexRender as flexRender$1 } from "../../../@tanstack_react-table@8.20.5_react-dom@18.3.1_react@18.3.1/@tanstack/react-table/build/lib/index.mjs";
|
|
6
6
|
import { rankItem, compareItems, rankings } from "../../../@tanstack_match-sorter-utils@8.19.4/@tanstack/match-sorter-utils/build/lib/index.mjs";
|
|
7
7
|
import { useVirtualizer } from "../../../@tanstack_react-virtual@3.11.2_react-dom@18.3.1_react@18.3.1/@tanstack/react-virtual/dist/esm/index.mjs";
|
|
8
8
|
import { useMediaQuery, useDebouncedValue, useHover } from "@mantine/hooks";
|
|
@@ -116,7 +116,7 @@ const getPrimaryShade = (theme) => {
|
|
|
116
116
|
var _a, _b;
|
|
117
117
|
return typeof theme.primaryShade === "number" ? theme.primaryShade : (_b = (_a = theme.primaryShade) === null || _a === void 0 ? void 0 : _a.dark) !== null && _b !== void 0 ? _b : 7;
|
|
118
118
|
};
|
|
119
|
-
const getPrimaryColor = (theme, shade) => theme.colors[theme.primaryColor][getPrimaryShade(theme)];
|
|
119
|
+
const getPrimaryColor = (theme, shade) => theme.colors[theme.primaryColor][shade !== null && shade !== void 0 ? shade : getPrimaryShade(theme)];
|
|
120
120
|
function dataVariable(name, value) {
|
|
121
121
|
const key = `data-${name}`;
|
|
122
122
|
switch (typeof value) {
|
|
@@ -2017,7 +2017,17 @@ const MRT_GlobalFilterTextInput = (_a) => {
|
|
|
2017
2017
|
}
|
|
2018
2018
|
} }))] });
|
|
2019
2019
|
};
|
|
2020
|
-
const
|
|
2020
|
+
const flexRender = flexRender$1;
|
|
2021
|
+
function createMRTColumnHelper() {
|
|
2022
|
+
return {
|
|
2023
|
+
accessor: (accessor, column) => {
|
|
2024
|
+
return typeof accessor === "function" ? Object.assign(Object.assign({}, column), { accessorFn: accessor }) : Object.assign(Object.assign({}, column), { accessorKey: accessor });
|
|
2025
|
+
},
|
|
2026
|
+
display: (column) => column,
|
|
2027
|
+
group: (column) => column
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
const createRow = (table, originalRow, rowIndex = -1, depth = 0, subRows, parentId) => createRow$1(table, "mrt-row-create", originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
|
|
2021
2031
|
[getColumnId(col)]: ""
|
|
2022
2032
|
}))), rowIndex, depth, subRows, parentId);
|
|
2023
2033
|
const getMRT_RowActionsColumnDef = (tableOptions) => {
|
|
@@ -2570,6 +2580,8 @@ const useMRT_TableInstance = (definedTableOptions) => {
|
|
|
2570
2580
|
return table;
|
|
2571
2581
|
};
|
|
2572
2582
|
const useMantineReactTable = (tableOptions) => useMRT_TableInstance(useMRT_TableOptions(tableOptions));
|
|
2583
|
+
var classes$8 = { "root": "MRT_TablePaper-module_root__q0v5L" };
|
|
2584
|
+
var classes$7 = { "root": "MRT_TableContainer-module_root__JIsGB", "root-sticky": "MRT_TableContainer-module_root-sticky__uC4qx", "root-fullscreen": "MRT_TableContainer-module_root-fullscreen__aM8Jg" };
|
|
2573
2585
|
var classes$6 = { "root": "MRT_Table-module_root__ms2uS", "root-grid": "MRT_Table-module_root-grid__2Pynz" };
|
|
2574
2586
|
const useMRT_ColumnVirtualizer = (table) => {
|
|
2575
2587
|
var _a, _b, _c, _d;
|
|
@@ -2674,6 +2686,31 @@ const MRT_EditRowModal = (_a) => {
|
|
|
2674
2686
|
table
|
|
2675
2687
|
}))) !== null && _b !== void 0 ? _b : jsxs(Fragment, { children: [jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsx(Stack, { gap: "lg", pb: 24, pt: 16, children: internalEditComponents }) }), jsx(Flex, { justify: "flex-end", children: jsx(MRT_EditActionButtons, { row, table, variant: "text" }) })] }));
|
|
2676
2688
|
};
|
|
2689
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
2690
|
+
const MRT_TableContainer = (_a) => {
|
|
2691
|
+
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
2692
|
+
const { getState, options: { createDisplayMode, editDisplayMode, enableStickyHeader, mantineLoadingOverlayProps, mantineTableContainerProps }, refs: { bottomToolbarRef, tableContainerRef, topToolbarRef } } = table;
|
|
2693
|
+
const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay } = getState();
|
|
2694
|
+
const [totalToolbarHeight, setTotalToolbarHeight] = useState(0);
|
|
2695
|
+
const tableContainerProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(mantineTableContainerProps, { table })), rest);
|
|
2696
|
+
const loadingOverlayProps = parseFromValuesOrFunc(mantineLoadingOverlayProps, { table });
|
|
2697
|
+
useIsomorphicLayoutEffect(() => {
|
|
2698
|
+
var _a2, _b, _c, _d;
|
|
2699
|
+
const topToolbarHeight = typeof document !== "undefined" ? (_b = (_a2 = topToolbarRef.current) === null || _a2 === void 0 ? void 0 : _a2.offsetHeight) !== null && _b !== void 0 ? _b : 0 : 0;
|
|
2700
|
+
const bottomToolbarHeight = typeof document !== "undefined" ? (_d = (_c = bottomToolbarRef === null || bottomToolbarRef === void 0 ? void 0 : bottomToolbarRef.current) === null || _c === void 0 ? void 0 : _c.offsetHeight) !== null && _d !== void 0 ? _d : 0 : 0;
|
|
2701
|
+
setTotalToolbarHeight(topToolbarHeight + bottomToolbarHeight);
|
|
2702
|
+
});
|
|
2703
|
+
const createModalOpen = createDisplayMode === "modal" && creatingRow;
|
|
2704
|
+
const editModalOpen = editDisplayMode === "modal" && editingRow;
|
|
2705
|
+
return jsxs(Box, Object.assign({}, tableContainerProps, { __vars: Object.assign({ "--mrt-top-toolbar-height": `${totalToolbarHeight}` }, tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.__vars), className: clsx("mrt-table-container", classes$7.root, enableStickyHeader && classes$7["root-sticky"], isFullScreen && classes$7["root-fullscreen"], tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.className), ref: (node) => {
|
|
2706
|
+
if (node) {
|
|
2707
|
+
tableContainerRef.current = node;
|
|
2708
|
+
if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
|
|
2709
|
+
tableContainerProps.ref.current = node;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}, children: [jsx(LoadingOverlay, Object.assign({ visible: isLoading || showLoadingOverlay, zIndex: 2 }, loadingOverlayProps)), jsx(MRT_Table, { table }), (createModalOpen || editModalOpen) && jsx(MRT_EditRowModal, { open: true, table })] }));
|
|
2713
|
+
};
|
|
2677
2714
|
var commonClasses = { "common-toolbar-styles": "common-styles-module_common-toolbar-styles__DnjR8" };
|
|
2678
2715
|
var classes$5 = { "root": "MRT_BottomToolbar-module_root__VDeWo", "root-fullscreen": "MRT_BottomToolbar-module_root-fullscreen__esE15", "custom-toolbar-container": "MRT_BottomToolbar-module_custom-toolbar-container__XcDRF", "paginator-container": "MRT_BottomToolbar-module_paginator-container__A3eWY", "paginator-container-alert-banner": "MRT_BottomToolbar-module_paginator-container-alert-banner__gyqtO" };
|
|
2679
2716
|
var classes$4 = { "collapse": "MRT_ProgressBar-module_collapse__rOLJH", "collapse-top": "MRT_ProgressBar-module_collapse-top__oCi0h" };
|
|
@@ -2775,6 +2812,49 @@ const MRT_TopToolbar = (_a) => {
|
|
|
2775
2812
|
}
|
|
2776
2813
|
}, children: [positionToolbarAlertBanner === "top" && jsx(MRT_ToolbarAlertBanner, { stackAlertBanner, table }), ["both", "top"].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : "") && jsx(MRT_ToolbarDropZone, { table }), jsxs(Flex, { className: clsx(classes$1["actions-container"], stackAlertBanner && classes$1["actions-container-stack-alert"]), children: [enableGlobalFilter && positionGlobalFilter === "left" && jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps)), (_b = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _b !== void 0 ? _b : jsx("span", {}), enableToolbarInternalActions ? jsxs(Flex, { justify: "end", wrap: "wrap-reverse", children: [enableGlobalFilter && positionGlobalFilter === "right" && jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps)), jsx(MRT_ToolbarInternalButtons, { table })] }) : enableGlobalFilter && positionGlobalFilter === "right" && jsx(MRT_GlobalFilterTextInput, Object.assign({}, globalFilterProps))] }), enablePagination && ["both", "top"].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : "") && jsx(Flex, { justify: "end", children: jsx(MRT_TablePagination, { position: "top", table }) }), jsx(MRT_ProgressBar, { isTopToolbar: true, table })] }));
|
|
2777
2814
|
};
|
|
2815
|
+
const MRT_TablePaper = (_a) => {
|
|
2816
|
+
var _b, _c;
|
|
2817
|
+
var { table } = _a, rest = __rest(_a, ["table"]);
|
|
2818
|
+
const { getState, options: { enableBottomToolbar, enableTopToolbar, mantinePaperProps, renderBottomToolbar, renderTopToolbar }, refs: { tablePaperRef } } = table;
|
|
2819
|
+
const { isFullScreen } = getState();
|
|
2820
|
+
const tablePaperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(mantinePaperProps, { table })), rest);
|
|
2821
|
+
return jsxs(Paper, Object.assign({ shadow: "xs", withBorder: true }, tablePaperProps, {
|
|
2822
|
+
className: clsx("mrt-table-paper", classes$8.root, isFullScreen && "mrt-table-paper-fullscreen", tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.className),
|
|
2823
|
+
ref: (ref) => {
|
|
2824
|
+
tablePaperRef.current = ref;
|
|
2825
|
+
if (tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.ref) {
|
|
2826
|
+
tablePaperProps.ref.current = ref;
|
|
2827
|
+
}
|
|
2828
|
+
},
|
|
2829
|
+
// rare case where we should use inline styles to guarantee highest specificity
|
|
2830
|
+
style: (theme) => Object.assign(Object.assign({ zIndex: isFullScreen ? 200 : void 0 }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style, theme)), isFullScreen ? {
|
|
2831
|
+
border: 0,
|
|
2832
|
+
borderRadius: 0,
|
|
2833
|
+
bottom: 0,
|
|
2834
|
+
height: "100vh",
|
|
2835
|
+
left: 0,
|
|
2836
|
+
margin: 0,
|
|
2837
|
+
maxHeight: "100vh",
|
|
2838
|
+
maxWidth: "100vw",
|
|
2839
|
+
padding: 0,
|
|
2840
|
+
position: "fixed",
|
|
2841
|
+
right: 0,
|
|
2842
|
+
top: 0,
|
|
2843
|
+
width: "100vw"
|
|
2844
|
+
} : null),
|
|
2845
|
+
children: [enableTopToolbar && ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : jsx(MRT_TopToolbar, { table })), jsx(MRT_TableContainer, { table }), enableBottomToolbar && ((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : jsx(MRT_BottomToolbar, { table }))]
|
|
2846
|
+
}));
|
|
2847
|
+
};
|
|
2848
|
+
const isTableInstanceProp = (props) => props.table !== void 0;
|
|
2849
|
+
const MantineReactTable = (props) => {
|
|
2850
|
+
let table;
|
|
2851
|
+
if (isTableInstanceProp(props)) {
|
|
2852
|
+
table = props.table;
|
|
2853
|
+
} else {
|
|
2854
|
+
table = useMantineReactTable(props);
|
|
2855
|
+
}
|
|
2856
|
+
return jsx(MRT_TablePaper, { table });
|
|
2857
|
+
};
|
|
2778
2858
|
export {
|
|
2779
2859
|
MRT_AggregationFns,
|
|
2780
2860
|
MRT_BottomToolbar,
|
|
@@ -2812,6 +2892,7 @@ export {
|
|
|
2812
2892
|
MRT_TableBodyRow,
|
|
2813
2893
|
MRT_TableBodyRowGrabHandle,
|
|
2814
2894
|
MRT_TableBodyRowPinButton,
|
|
2895
|
+
MRT_TableContainer,
|
|
2815
2896
|
MRT_TableDetailPanel,
|
|
2816
2897
|
MRT_TableFooter,
|
|
2817
2898
|
MRT_TableFooterCell,
|
|
@@ -2825,6 +2906,7 @@ export {
|
|
|
2825
2906
|
MRT_TableHeadCellSortLabel,
|
|
2826
2907
|
MRT_TableHeadRow,
|
|
2827
2908
|
MRT_TablePagination,
|
|
2909
|
+
MRT_TablePaper,
|
|
2828
2910
|
MRT_ToggleDensePaddingButton,
|
|
2829
2911
|
MRT_ToggleFiltersButton,
|
|
2830
2912
|
MRT_ToggleFullScreenButton,
|
|
@@ -2834,12 +2916,15 @@ export {
|
|
|
2834
2916
|
MRT_ToolbarDropZone,
|
|
2835
2917
|
MRT_ToolbarInternalButtons,
|
|
2836
2918
|
MRT_TopToolbar,
|
|
2919
|
+
MantineReactTable,
|
|
2837
2920
|
Memo_MRT_TableBody,
|
|
2838
2921
|
Memo_MRT_TableBodyCell,
|
|
2839
2922
|
Memo_MRT_TableBodyRow,
|
|
2923
|
+
createMRTColumnHelper,
|
|
2840
2924
|
createRow,
|
|
2841
2925
|
dataVariable,
|
|
2842
2926
|
defaultDisplayColumnProps,
|
|
2927
|
+
flexRender,
|
|
2843
2928
|
getAllLeafColumnDefs,
|
|
2844
2929
|
getCanRankRows,
|
|
2845
2930
|
getColumnId,
|
|
@@ -7,7 +7,7 @@ const utils = require("fastapi-rtk/utils");
|
|
|
7
7
|
const core = require("@mantine/core");
|
|
8
8
|
const form = require("@mantine/form");
|
|
9
9
|
const hooks = require("@mantine/hooks");
|
|
10
|
-
const index = require("../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
10
|
+
const index = require("../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const useApi = require("../hooks/api/useApi.cjs");
|
|
13
13
|
const useForms = require("../hooks/api/useForms.cjs");
|
|
@@ -8,7 +8,7 @@ const core = require("@mantine/core");
|
|
|
8
8
|
const form = require("@mantine/form");
|
|
9
9
|
const hooks = require("@mantine/hooks");
|
|
10
10
|
const lodash = require("../_virtual/lodash.cjs");
|
|
11
|
-
const index = require("../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
11
|
+
const index = require("../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
12
12
|
const React = require("react");
|
|
13
13
|
const convertToFormInputs$1 = require("../ActionIcons/utils/convertToFormInputs.cjs");
|
|
14
14
|
const convertToFormInputs = require("../fab-react-toolkit-patch/utils/convertToFormInputs.cjs");
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const core = require("@mantine/core");
|
|
5
5
|
const form = require("@mantine/form");
|
|
6
6
|
const hooks = require("@mantine/hooks");
|
|
7
|
-
const index = require("../../../../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
7
|
+
const index = require("../../../../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const index_esm = require("../../../../../../.external/cjs/yup@1.7.1/yup/index.esm.cjs");
|
|
10
10
|
const useApi = require("../../../../hooks/api/useApi.cjs");
|
|
@@ -29,7 +29,7 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
29
29
|
const { info, queryParams, setQueryParams } = useApi.useApi();
|
|
30
30
|
const api = useApi.useApi();
|
|
31
31
|
const auth = useAuth.useAuth();
|
|
32
|
-
const { customizer, custom, leftToolbar } = toolbar;
|
|
32
|
+
const { customizer, custom, leftToolbar, centerToolbar } = toolbar;
|
|
33
33
|
const data = React.useMemo(() => {
|
|
34
34
|
if (!quickFilters) {
|
|
35
35
|
return [];
|
|
@@ -73,7 +73,6 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
73
73
|
return {
|
|
74
74
|
renderToolbarInternalActions,
|
|
75
75
|
enableTopToolbar: !hideToolbar,
|
|
76
|
-
enableFilters: (customizer == null ? void 0 : customizer.filter) !== null,
|
|
77
76
|
...React.useMemo(() => {
|
|
78
77
|
if (quickFilterUI && leftToolbar) {
|
|
79
78
|
throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");
|
|
@@ -95,8 +94,19 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
95
94
|
};
|
|
96
95
|
props.positionToolbarAlertBanner = "bottom";
|
|
97
96
|
}
|
|
97
|
+
if (centerToolbar) {
|
|
98
|
+
const { custom: custom2 } = centerToolbar;
|
|
99
|
+
props.renderTopToolbarCenterActions = ({ table }) => {
|
|
100
|
+
const functionProps = {
|
|
101
|
+
api,
|
|
102
|
+
auth,
|
|
103
|
+
mrtProps: { table }
|
|
104
|
+
};
|
|
105
|
+
return renderCustomizedToolbars(void 0, {}, functionProps, custom2);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
98
108
|
return props;
|
|
99
|
-
}, [api, auth, leftToolbar, quickFilterUI])
|
|
109
|
+
}, [api, auth, centerToolbar, leftToolbar, quickFilterUI])
|
|
100
110
|
};
|
|
101
111
|
}
|
|
102
112
|
exports.useToolbar = useToolbar;
|
|
@@ -7,6 +7,7 @@ const clsx = require("../../../../../.external/cjs/clsx@2.1.1/clsx/dist/clsx.cjs
|
|
|
7
7
|
const index_esm = require("../../../../../.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.cjs");
|
|
8
8
|
const MRT_TableContainer = require("./MRT_TableContainer.cjs");
|
|
9
9
|
const MRT_TablePaper_module = require("./MRT_TablePaper.module.css.cjs");
|
|
10
|
+
const MRT_TopToolbar = require("./MRT_TopToolbar.cjs");
|
|
10
11
|
const MRT_TablePaper = ({ table, ...rest }) => {
|
|
11
12
|
const {
|
|
12
13
|
getState,
|
|
@@ -56,7 +57,7 @@ const MRT_TablePaper = ({ table, ...rest }) => {
|
|
|
56
57
|
} : null
|
|
57
58
|
}),
|
|
58
59
|
children: [
|
|
59
|
-
enableTopToolbar && (utils.parseFromValuesOrFunc(renderTopToolbar, { table }) ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
enableTopToolbar && (utils.parseFromValuesOrFunc(renderTopToolbar, { table }) ?? /* @__PURE__ */ jsxRuntime.jsx(MRT_TopToolbar.MRT_TopToolbar, { table })),
|
|
60
61
|
/* @__PURE__ */ jsxRuntime.jsx(MRT_TableContainer.MRT_TableContainer, { table }),
|
|
61
62
|
enableBottomToolbar && (utils.parseFromValuesOrFunc(renderBottomToolbar, { table }) ?? /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_BottomToolbar, { table }))
|
|
62
63
|
]
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const utils = require("fastapi-rtk/utils");
|
|
5
|
+
const core = require("@mantine/core");
|
|
6
|
+
const hooks = require("@mantine/hooks");
|
|
7
|
+
const clsx = require("../../../../../.external/cjs/clsx@2.1.1/clsx/dist/clsx.cjs");
|
|
8
|
+
const index_esm = require("../../../../../.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.cjs");
|
|
9
|
+
const common_styles_module = require("./common.styles.module.css.cjs");
|
|
10
|
+
const MRT_TopToolbar_module = require("./MRT_TopToolbar.module.css.cjs");
|
|
11
|
+
const MRT_TopToolbar = ({ table, ...rest }) => {
|
|
12
|
+
const {
|
|
13
|
+
getState,
|
|
14
|
+
options: {
|
|
15
|
+
enableGlobalFilter,
|
|
16
|
+
enablePagination,
|
|
17
|
+
enableToolbarInternalActions,
|
|
18
|
+
mantineTopToolbarProps,
|
|
19
|
+
positionGlobalFilter,
|
|
20
|
+
positionPagination,
|
|
21
|
+
positionToolbarAlertBanner,
|
|
22
|
+
positionToolbarDropZone,
|
|
23
|
+
renderTopToolbarCustomActions,
|
|
24
|
+
renderTopToolbarCenterActions
|
|
25
|
+
},
|
|
26
|
+
refs: { topToolbarRef }
|
|
27
|
+
} = table;
|
|
28
|
+
const { isFullScreen, showGlobalFilter } = getState();
|
|
29
|
+
const isMobile = hooks.useMediaQuery("(max-width:720px)");
|
|
30
|
+
const isTablet = hooks.useMediaQuery("(max-width:1024px)");
|
|
31
|
+
const toolbarProps = {
|
|
32
|
+
...utils.parseFromValuesOrFunc(mantineTopToolbarProps, { table }),
|
|
33
|
+
...rest
|
|
34
|
+
};
|
|
35
|
+
const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter && isTablet;
|
|
36
|
+
const globalFilterProps = {
|
|
37
|
+
style: !isTablet ? {
|
|
38
|
+
zIndex: 3
|
|
39
|
+
} : void 0,
|
|
40
|
+
table
|
|
41
|
+
};
|
|
42
|
+
const ActionsContainerComponent = renderTopToolbarCenterActions ? core.Group : core.Flex;
|
|
43
|
+
const ActionsContainerProps = renderTopToolbarCenterActions ? { grow: true } : {};
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
45
|
+
core.Box,
|
|
46
|
+
{
|
|
47
|
+
...toolbarProps,
|
|
48
|
+
className: clsx.clsx(
|
|
49
|
+
common_styles_module["common-toolbar-styles"],
|
|
50
|
+
MRT_TopToolbar_module.default["root"],
|
|
51
|
+
isFullScreen && MRT_TopToolbar_module.default["root-fullscreen"],
|
|
52
|
+
toolbarProps == null ? void 0 : toolbarProps.className
|
|
53
|
+
),
|
|
54
|
+
ref: (node) => {
|
|
55
|
+
if (node) {
|
|
56
|
+
topToolbarRef.current = node;
|
|
57
|
+
if (toolbarProps == null ? void 0 : toolbarProps.ref) {
|
|
58
|
+
toolbarProps.ref.current = node;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
children: [
|
|
63
|
+
positionToolbarAlertBanner === "top" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_ToolbarAlertBanner, { stackAlertBanner, table }),
|
|
64
|
+
["both", "top"].includes(positionToolbarDropZone ?? "") && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_ToolbarDropZone, { table }),
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
66
|
+
ActionsContainerComponent,
|
|
67
|
+
{
|
|
68
|
+
className: clsx.clsx(MRT_TopToolbar_module.default["actions-container"], stackAlertBanner && MRT_TopToolbar_module.default["actions-container-stack-alert"]),
|
|
69
|
+
...ActionsContainerProps,
|
|
70
|
+
children: [
|
|
71
|
+
enableGlobalFilter && positionGlobalFilter === "left" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_GlobalFilterTextInput, { ...globalFilterProps }),
|
|
72
|
+
(renderTopToolbarCustomActions == null ? void 0 : renderTopToolbarCustomActions({ table })) ?? /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
73
|
+
renderTopToolbarCenterActions ? /* @__PURE__ */ jsxRuntime.jsx(core.Center, { children: renderTopToolbarCenterActions({ table }) }) : void 0,
|
|
74
|
+
enableToolbarInternalActions ? /* @__PURE__ */ jsxRuntime.jsxs(core.Flex, { justify: "end", wrap: "wrap-reverse", children: [
|
|
75
|
+
enableGlobalFilter && positionGlobalFilter === "right" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_GlobalFilterTextInput, { ...globalFilterProps }),
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_ToolbarInternalButtons, { table })
|
|
77
|
+
] }) : enableGlobalFilter && positionGlobalFilter === "right" && /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_GlobalFilterTextInput, { ...globalFilterProps })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
enablePagination && ["both", "top"].includes(positionPagination ?? "") && /* @__PURE__ */ jsxRuntime.jsx(core.Flex, { justify: "end", children: /* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_TablePagination, { position: "top", table }) }),
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(index_esm.MRT_ProgressBar, { isTopToolbar: true, table })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
exports.MRT_TopToolbar = MRT_TopToolbar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const root = "_root_4odg9_1";
|
|
4
|
+
const classes = {
|
|
5
|
+
root,
|
|
6
|
+
"root-fullscreen": "_root-fullscreen_4odg9_6",
|
|
7
|
+
"actions-container": "_actions-container_4odg9_11",
|
|
8
|
+
"actions-container-stack-alert": "_actions-container-stack-alert_4odg9_22"
|
|
9
|
+
};
|
|
10
|
+
exports.default = classes;
|
|
11
|
+
exports.root = root;
|
package/dist/core/cjs/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ const constants = require("fastapi-rtk/constants");
|
|
|
34
34
|
const hooks = require("fastapi-rtk/hooks");
|
|
35
35
|
const utils = require("fastapi-rtk/utils");
|
|
36
36
|
const zustand = require("fastapi-rtk/zustand");
|
|
37
|
+
const index_esm = require("../../.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.cjs");
|
|
37
38
|
const Filter = require("./Tables/DataGrid/Toolbar/Filter/Filter.cjs");
|
|
38
39
|
const useTranslation = require("../../.external/cjs/react-i18next@15.7.4_i18next@25.6.0_react-dom@18.3.1_react@18.3.1_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
39
40
|
exports.Actions = Actions.Actions;
|
|
@@ -70,6 +71,7 @@ exports.ApiProvider = ApiProvider.ApiProvider;
|
|
|
70
71
|
exports.InfiniteScroll = InfiniteScroll.InfiniteScroll;
|
|
71
72
|
exports.LazyLoadWrapper = LazyLoadWrapper.LazyLoadWrapper;
|
|
72
73
|
exports.Provider = Provider.Provider;
|
|
74
|
+
exports.mrt = index_esm;
|
|
73
75
|
exports.Filter = Filter.Filter;
|
|
74
76
|
exports.useTranslation = useTranslation.useTranslation;
|
|
75
77
|
Object.keys(_bundledJsonforms).forEach((k) => {
|
|
@@ -5,7 +5,7 @@ import { deepMerge } from "fastapi-rtk/utils";
|
|
|
5
5
|
import { useProps, Stack } from "@mantine/core";
|
|
6
6
|
import { useForm } from "@mantine/form";
|
|
7
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
8
|
-
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
8
|
+
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
9
9
|
import { useMemo, useCallback, useEffect } from "react";
|
|
10
10
|
import { useApi } from "../hooks/api/useApi.mjs";
|
|
11
11
|
import { useForms } from "../hooks/api/useForms.mjs";
|
|
@@ -6,7 +6,7 @@ import { useProps, Stack } from "@mantine/core";
|
|
|
6
6
|
import { useForm } from "@mantine/form";
|
|
7
7
|
import { useDebouncedState } from "@mantine/hooks";
|
|
8
8
|
import { l as lodashExports } from "../_virtual/lodash.mjs";
|
|
9
|
-
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
9
|
+
import { yupResolver } from "../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
10
10
|
import { useMemo, useRef, useEffect, useCallback } from "react";
|
|
11
11
|
import { convertToFormInputs as convertToFormInputs$1 } from "../ActionIcons/utils/convertToFormInputs.mjs";
|
|
12
12
|
import { convertToFormInputs } from "../fab-react-toolkit-patch/utils/convertToFormInputs.mjs";
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useProps, Box, Flex, ActionIcon, Divider, Text, ScrollArea, Button, Group } from "@mantine/core";
|
|
3
3
|
import { useForm } from "@mantine/form";
|
|
4
4
|
import { randomId } from "@mantine/hooks";
|
|
5
|
-
import { yupResolver } from "../../../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.
|
|
5
|
+
import { yupResolver } from "../../../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@8.3.6_yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
6
6
|
import { useEffect } from "react";
|
|
7
7
|
import { object as create$3, array as create$2, mixed as create$8, string as create$6 } from "../../../../../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
8
8
|
import { useApi } from "../../../../hooks/api/useApi.mjs";
|
|
@@ -27,7 +27,7 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
27
27
|
const { info, queryParams, setQueryParams } = useApi();
|
|
28
28
|
const api = useApi();
|
|
29
29
|
const auth = useAuth();
|
|
30
|
-
const { customizer, custom, leftToolbar } = toolbar;
|
|
30
|
+
const { customizer, custom, leftToolbar, centerToolbar } = toolbar;
|
|
31
31
|
const data = useMemo(() => {
|
|
32
32
|
if (!quickFilters) {
|
|
33
33
|
return [];
|
|
@@ -71,7 +71,6 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
71
71
|
return {
|
|
72
72
|
renderToolbarInternalActions,
|
|
73
73
|
enableTopToolbar: !hideToolbar,
|
|
74
|
-
enableFilters: (customizer == null ? void 0 : customizer.filter) !== null,
|
|
75
74
|
...useMemo(() => {
|
|
76
75
|
if (quickFilterUI && leftToolbar) {
|
|
77
76
|
throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");
|
|
@@ -93,8 +92,19 @@ function useToolbar(toolbar = {}, quickFilters, hideToolbar, enableAdvancedFilte
|
|
|
93
92
|
};
|
|
94
93
|
props.positionToolbarAlertBanner = "bottom";
|
|
95
94
|
}
|
|
95
|
+
if (centerToolbar) {
|
|
96
|
+
const { custom: custom2 } = centerToolbar;
|
|
97
|
+
props.renderTopToolbarCenterActions = ({ table }) => {
|
|
98
|
+
const functionProps = {
|
|
99
|
+
api,
|
|
100
|
+
auth,
|
|
101
|
+
mrtProps: { table }
|
|
102
|
+
};
|
|
103
|
+
return renderCustomizedToolbars(void 0, {}, functionProps, custom2);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
96
106
|
return props;
|
|
97
|
-
}, [api, auth, leftToolbar, quickFilterUI])
|
|
107
|
+
}, [api, auth, centerToolbar, leftToolbar, quickFilterUI])
|
|
98
108
|
};
|
|
99
109
|
}
|
|
100
110
|
export {
|
|
@@ -2,9 +2,10 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
3
3
|
import { Paper } from "@mantine/core";
|
|
4
4
|
import { clsx } from "../../../../../.external/esm/clsx@2.1.1/clsx/dist/clsx.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { MRT_BottomToolbar } from "../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.mjs";
|
|
6
6
|
import { MRT_TableContainer } from "./MRT_TableContainer.mjs";
|
|
7
7
|
import classes from "./MRT_TablePaper.module.css.mjs";
|
|
8
|
+
import { MRT_TopToolbar } from "./MRT_TopToolbar.mjs";
|
|
8
9
|
const MRT_TablePaper = ({ table, ...rest }) => {
|
|
9
10
|
const {
|
|
10
11
|
getState,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
3
|
+
import { Box, Group, Flex, Center } from "@mantine/core";
|
|
4
|
+
import { useMediaQuery } from "@mantine/hooks";
|
|
5
|
+
import { clsx } from "../../../../../.external/esm/clsx@2.1.1/clsx/dist/clsx.mjs";
|
|
6
|
+
import { MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_GlobalFilterTextInput, MRT_ToolbarInternalButtons, MRT_TablePagination, MRT_ProgressBar } from "../../../../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.mjs";
|
|
7
|
+
import commonClasses from "./common.styles.module.css.mjs";
|
|
8
|
+
import classes from "./MRT_TopToolbar.module.css.mjs";
|
|
9
|
+
const MRT_TopToolbar = ({ table, ...rest }) => {
|
|
10
|
+
const {
|
|
11
|
+
getState,
|
|
12
|
+
options: {
|
|
13
|
+
enableGlobalFilter,
|
|
14
|
+
enablePagination,
|
|
15
|
+
enableToolbarInternalActions,
|
|
16
|
+
mantineTopToolbarProps,
|
|
17
|
+
positionGlobalFilter,
|
|
18
|
+
positionPagination,
|
|
19
|
+
positionToolbarAlertBanner,
|
|
20
|
+
positionToolbarDropZone,
|
|
21
|
+
renderTopToolbarCustomActions,
|
|
22
|
+
renderTopToolbarCenterActions
|
|
23
|
+
},
|
|
24
|
+
refs: { topToolbarRef }
|
|
25
|
+
} = table;
|
|
26
|
+
const { isFullScreen, showGlobalFilter } = getState();
|
|
27
|
+
const isMobile = useMediaQuery("(max-width:720px)");
|
|
28
|
+
const isTablet = useMediaQuery("(max-width:1024px)");
|
|
29
|
+
const toolbarProps = {
|
|
30
|
+
...parseFromValuesOrFunc(mantineTopToolbarProps, { table }),
|
|
31
|
+
...rest
|
|
32
|
+
};
|
|
33
|
+
const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter && isTablet;
|
|
34
|
+
const globalFilterProps = {
|
|
35
|
+
style: !isTablet ? {
|
|
36
|
+
zIndex: 3
|
|
37
|
+
} : void 0,
|
|
38
|
+
table
|
|
39
|
+
};
|
|
40
|
+
const ActionsContainerComponent = renderTopToolbarCenterActions ? Group : Flex;
|
|
41
|
+
const ActionsContainerProps = renderTopToolbarCenterActions ? { grow: true } : {};
|
|
42
|
+
return /* @__PURE__ */ jsxs(
|
|
43
|
+
Box,
|
|
44
|
+
{
|
|
45
|
+
...toolbarProps,
|
|
46
|
+
className: clsx(
|
|
47
|
+
commonClasses["common-toolbar-styles"],
|
|
48
|
+
classes["root"],
|
|
49
|
+
isFullScreen && classes["root-fullscreen"],
|
|
50
|
+
toolbarProps == null ? void 0 : toolbarProps.className
|
|
51
|
+
),
|
|
52
|
+
ref: (node) => {
|
|
53
|
+
if (node) {
|
|
54
|
+
topToolbarRef.current = node;
|
|
55
|
+
if (toolbarProps == null ? void 0 : toolbarProps.ref) {
|
|
56
|
+
toolbarProps.ref.current = node;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
positionToolbarAlertBanner === "top" && /* @__PURE__ */ jsx(MRT_ToolbarAlertBanner, { stackAlertBanner, table }),
|
|
62
|
+
["both", "top"].includes(positionToolbarDropZone ?? "") && /* @__PURE__ */ jsx(MRT_ToolbarDropZone, { table }),
|
|
63
|
+
/* @__PURE__ */ jsxs(
|
|
64
|
+
ActionsContainerComponent,
|
|
65
|
+
{
|
|
66
|
+
className: clsx(classes["actions-container"], stackAlertBanner && classes["actions-container-stack-alert"]),
|
|
67
|
+
...ActionsContainerProps,
|
|
68
|
+
children: [
|
|
69
|
+
enableGlobalFilter && positionGlobalFilter === "left" && /* @__PURE__ */ jsx(MRT_GlobalFilterTextInput, { ...globalFilterProps }),
|
|
70
|
+
(renderTopToolbarCustomActions == null ? void 0 : renderTopToolbarCustomActions({ table })) ?? /* @__PURE__ */ jsx("span", {}),
|
|
71
|
+
renderTopToolbarCenterActions ? /* @__PURE__ */ jsx(Center, { children: renderTopToolbarCenterActions({ table }) }) : void 0,
|
|
72
|
+
enableToolbarInternalActions ? /* @__PURE__ */ jsxs(Flex, { justify: "end", wrap: "wrap-reverse", children: [
|
|
73
|
+
enableGlobalFilter && positionGlobalFilter === "right" && /* @__PURE__ */ jsx(MRT_GlobalFilterTextInput, { ...globalFilterProps }),
|
|
74
|
+
/* @__PURE__ */ jsx(MRT_ToolbarInternalButtons, { table })
|
|
75
|
+
] }) : enableGlobalFilter && positionGlobalFilter === "right" && /* @__PURE__ */ jsx(MRT_GlobalFilterTextInput, { ...globalFilterProps })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
enablePagination && ["both", "top"].includes(positionPagination ?? "") && /* @__PURE__ */ jsx(Flex, { justify: "end", children: /* @__PURE__ */ jsx(MRT_TablePagination, { position: "top", table }) }),
|
|
80
|
+
/* @__PURE__ */ jsx(MRT_ProgressBar, { isTopToolbar: true, table })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
MRT_TopToolbar
|
|
87
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const root = "_root_4odg9_1";
|
|
2
|
+
const classes = {
|
|
3
|
+
root,
|
|
4
|
+
"root-fullscreen": "_root-fullscreen_4odg9_6",
|
|
5
|
+
"actions-container": "_actions-container_4odg9_11",
|
|
6
|
+
"actions-container-stack-alert": "_actions-container-stack-alert_4odg9_22"
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
classes as default,
|
|
10
|
+
root
|
|
11
|
+
};
|
package/dist/core/esm/index.mjs
CHANGED
|
@@ -32,6 +32,7 @@ export * from "fastapi-rtk/constants";
|
|
|
32
32
|
export * from "fastapi-rtk/hooks";
|
|
33
33
|
export * from "fastapi-rtk/utils";
|
|
34
34
|
export * from "fastapi-rtk/zustand";
|
|
35
|
+
import * as index_esm from "../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._v6brefjjgmgbqbolvm3v6bkbsa/mantine-react-table/dist/index.esm.mjs";
|
|
35
36
|
import { Filter } from "./Tables/DataGrid/Toolbar/Filter/Filter.mjs";
|
|
36
37
|
import { useTranslation } from "../../.external/esm/react-i18next@15.7.4_i18next@25.6.0_react-dom@18.3.1_react@18.3.1_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
37
38
|
export {
|
|
@@ -62,6 +63,7 @@ export {
|
|
|
62
63
|
UserMenu,
|
|
63
64
|
View,
|
|
64
65
|
ViewDialog,
|
|
66
|
+
index_esm as mrt,
|
|
65
67
|
normalProps,
|
|
66
68
|
overlayProps,
|
|
67
69
|
useApi,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export function useToolbar(toolbar: {}, quickFilters: any, hideToolbar: any, enableAdvancedFilters: any): {
|
|
2
2
|
renderTopToolbarCustomActions(): import("react").JSX.Element;
|
|
3
3
|
positionToolbarAlertBanner: string;
|
|
4
|
+
renderTopToolbarCenterActions({ table }: {
|
|
5
|
+
table: any;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
4
7
|
renderToolbarInternalActions: ({ table }: {
|
|
5
8
|
table: any;
|
|
6
9
|
}) => import("react").JSX.Element;
|
|
7
10
|
enableTopToolbar: boolean;
|
|
8
|
-
enableFilters: boolean;
|
|
9
11
|
};
|
package/dist/core/lib/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { ApiProvider } from './Wrappers/ApiProvider/ApiProvider';
|
|
|
20
20
|
export { InfiniteScroll } from './Wrappers/InfiniteScroll/InfiniteScroll';
|
|
21
21
|
export { LazyLoadWrapper } from './Wrappers/LazyLoadWrapper/LazyLoadWrapper';
|
|
22
22
|
export { Provider } from './Wrappers/Provider/Provider';
|
|
23
|
+
export * as mrt from 'mantine-react-table';
|
|
23
24
|
export { Filter } from './Tables/DataGrid/Toolbar/Filter/Filter';
|
|
24
25
|
export { useLang, useTranslation } from './hooks/lang/useLang';
|
|
25
26
|
export { DataGrid, DataGrid as Datagrid } from './Tables/DataGrid/DataGrid';
|
package/dist/core/styles.css
CHANGED
|
@@ -1600,3 +1600,37 @@
|
|
|
1600
1600
|
overflow: hidden;
|
|
1601
1601
|
transition: all 150ms ease-in-out;
|
|
1602
1602
|
}
|
|
1603
|
+
._common-toolbar-styles_1c9lk_1 {
|
|
1604
|
+
align-items: flex-start;
|
|
1605
|
+
display: grid;
|
|
1606
|
+
flex-wrap: wrap-reverse;
|
|
1607
|
+
min-height: calc(3.5rem * var(--mantine-scale));
|
|
1608
|
+
overflow: visible;
|
|
1609
|
+
padding: 0;
|
|
1610
|
+
transition: all 150ms ease-in-out;
|
|
1611
|
+
z-index: 3;
|
|
1612
|
+
}
|
|
1613
|
+
._root_4odg9_1 {
|
|
1614
|
+
background-color: var(--mrt-base-background-color);
|
|
1615
|
+
position: relative;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
._root-fullscreen_4odg9_6 {
|
|
1619
|
+
position: sticky !important;
|
|
1620
|
+
top: 0;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
._actions-container_4odg9_11 {
|
|
1624
|
+
align-items: flex-start;
|
|
1625
|
+
box-sizing: border-box;
|
|
1626
|
+
justify-content: space-between;
|
|
1627
|
+
padding: calc(0.5rem * var(--mantine-scale));
|
|
1628
|
+
right: 0;
|
|
1629
|
+
top: 0;
|
|
1630
|
+
width: 100%;
|
|
1631
|
+
position: absolute;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
._actions-container-stack-alert_4odg9_22 {
|
|
1635
|
+
position: relative !important;
|
|
1636
|
+
}
|
package/package.json
CHANGED
|
File without changes
|