aq-fe-framework 0.1.776 → 0.1.777
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.
|
@@ -1808,14 +1808,14 @@ function MyDataTableStagedChanges(_a) {
|
|
|
1808
1808
|
initIds = [],
|
|
1809
1809
|
onStagedChange,
|
|
1810
1810
|
selectColumns,
|
|
1811
|
-
|
|
1811
|
+
readOnly
|
|
1812
1812
|
} = _b, rest = __objRest(_b, [
|
|
1813
1813
|
"data",
|
|
1814
1814
|
"columns",
|
|
1815
1815
|
"initIds",
|
|
1816
1816
|
"onStagedChange",
|
|
1817
1817
|
"selectColumns",
|
|
1818
|
-
"
|
|
1818
|
+
"readOnly"
|
|
1819
1819
|
]);
|
|
1820
1820
|
const disc = useDisclosure10();
|
|
1821
1821
|
const [currentIds, setCurrentIds] = useState7(initIds);
|
|
@@ -1861,19 +1861,22 @@ function MyDataTableStagedChanges(_a) {
|
|
|
1861
1861
|
MyDataTable,
|
|
1862
1862
|
__spreadProps(__spreadValues({
|
|
1863
1863
|
enableRowSelection: true,
|
|
1864
|
-
renderRowActions: ({ row }) =>
|
|
1865
|
-
|
|
1866
|
-
{
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1864
|
+
renderRowActions: ({ row }) => {
|
|
1865
|
+
if (readOnly) return;
|
|
1866
|
+
return /* @__PURE__ */ jsx33(MyCenterFull, { children: /* @__PURE__ */ jsx33(
|
|
1867
|
+
MyActionIcon2,
|
|
1868
|
+
{
|
|
1869
|
+
actionType: "tempDelete",
|
|
1870
|
+
onClick: () => handleDelete(row.original.id)
|
|
1871
|
+
}
|
|
1872
|
+
) });
|
|
1873
|
+
},
|
|
1871
1874
|
columns,
|
|
1872
1875
|
data: displayData
|
|
1873
1876
|
}, rest), {
|
|
1874
1877
|
renderTopToolbarCustomActions: ({ table }) => {
|
|
1875
|
-
var _a2
|
|
1876
|
-
if (
|
|
1878
|
+
var _a2;
|
|
1879
|
+
if (readOnly) return;
|
|
1877
1880
|
return /* @__PURE__ */ jsxs17(Group7, { children: [
|
|
1878
1881
|
/* @__PURE__ */ jsx33(
|
|
1879
1882
|
MyButtonModal2,
|
|
@@ -1899,7 +1902,7 @@ function MyDataTableStagedChanges(_a) {
|
|
|
1899
1902
|
/* @__PURE__ */ jsx33(MyButton2, { actionType: "delete", onClick: () => {
|
|
1900
1903
|
handleDelete(table.getSelectedRowModel().rows.map((item) => item.original.id));
|
|
1901
1904
|
} }),
|
|
1902
|
-
(
|
|
1905
|
+
(_a2 = rest.renderTopToolbarCustomActions) == null ? void 0 : _a2.call(rest, { table })
|
|
1903
1906
|
] });
|
|
1904
1907
|
}
|
|
1905
1908
|
})
|
package/dist/core/index.d.mts
CHANGED
|
@@ -118,9 +118,9 @@ interface MyDataTableStagedChangesProps<T extends MRT_RowData> extends MyDataTab
|
|
|
118
118
|
initIds?: number[];
|
|
119
119
|
selectColumns?: MRT_ColumnDef<T>[];
|
|
120
120
|
onStagedChange?: (changes: StagedChange) => void;
|
|
121
|
-
|
|
121
|
+
readOnly?: boolean;
|
|
122
122
|
}
|
|
123
|
-
declare function MyDataTableStagedChanges<T extends MRT_RowData>({ data, columns, initIds, onStagedChange, selectColumns,
|
|
123
|
+
declare function MyDataTableStagedChanges<T extends MRT_RowData>({ data, columns, initIds, onStagedChange, selectColumns, readOnly, ...rest }: MyDataTableStagedChangesProps<T>): react_jsx_runtime.JSX.Element;
|
|
124
124
|
|
|
125
125
|
interface MyFlexIconTitleProps {
|
|
126
126
|
icon?: ReactNode;
|
package/dist/core/index.mjs
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
MailTemplateDeleteButton,
|
|
113
113
|
useS_moduleConfig,
|
|
114
114
|
useStore_Authenticate
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-WGTPAJYU.mjs";
|
|
116
116
|
import "../chunk-SUH3FFFV.mjs";
|
|
117
117
|
import "../chunk-WBSFRMHN.mjs";
|
|
118
118
|
import "../chunk-O7YCQQO5.mjs";
|