@nocobase/client 2.0.0-alpha.17 → 2.0.0-alpha.18
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/es/index.mjs
CHANGED
|
@@ -9586,7 +9586,7 @@ function addAppVersion(e, t) {
|
|
|
9586
9586
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
9587
9587
|
}), e;
|
|
9588
9588
|
}
|
|
9589
|
-
const name = "@nocobase/client", version = "2.0.0-alpha.
|
|
9589
|
+
const name = "@nocobase/client", version = "2.0.0-alpha.18", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9590
9590
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9591
9591
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9592
9592
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9609,10 +9609,10 @@ const name = "@nocobase/client", version = "2.0.0-alpha.17", license = "AGPL-3.0
|
|
|
9609
9609
|
"@formily/reactive-react": "^2.2.27",
|
|
9610
9610
|
"@formily/shared": "^2.2.27",
|
|
9611
9611
|
"@formily/validator": "^2.2.27",
|
|
9612
|
-
"@nocobase/evaluators": "2.0.0-alpha.
|
|
9613
|
-
"@nocobase/flow-engine": "2.0.0-alpha.
|
|
9614
|
-
"@nocobase/sdk": "2.0.0-alpha.
|
|
9615
|
-
"@nocobase/utils": "2.0.0-alpha.
|
|
9612
|
+
"@nocobase/evaluators": "2.0.0-alpha.18",
|
|
9613
|
+
"@nocobase/flow-engine": "2.0.0-alpha.18",
|
|
9614
|
+
"@nocobase/sdk": "2.0.0-alpha.18",
|
|
9615
|
+
"@nocobase/utils": "2.0.0-alpha.18",
|
|
9616
9616
|
"@tanstack/react-table": "^8.21.3",
|
|
9617
9617
|
"@types/tabulator-tables": "^6.2.6",
|
|
9618
9618
|
ahooks: "^3.7.2",
|
|
@@ -74932,30 +74932,32 @@ TableBlockModel.define({
|
|
|
74932
74932
|
});
|
|
74933
74933
|
const tableScroll = { x: "max-content" }, HighPerformanceTable = React.memo(
|
|
74934
74934
|
(e) => {
|
|
74935
|
-
var
|
|
74936
|
-
const { model: t, size: o, virtual: n, dataSource: r, columns: i, pagination: a, highlightedRowKey: l } = e, c =
|
|
74935
|
+
var x;
|
|
74936
|
+
const { model: t, size: o, virtual: n, dataSource: r, columns: i, pagination: a, highlightedRowKey: l } = e, [c, u] = React.useState(
|
|
74937
|
+
() => t.resource.getSelectedRows().map((b) => b[t.collection.filterTargetKey])
|
|
74938
|
+
), d = useMemo(() => f({
|
|
74937
74939
|
columnWidth: 50,
|
|
74938
74940
|
type: "checkbox",
|
|
74939
|
-
onChange: (
|
|
74940
|
-
t.resource.setSelectedRows(
|
|
74941
|
+
onChange: (b, C) => {
|
|
74942
|
+
t.resource.setSelectedRows(C), u(C.map((y) => y[t.collection.filterTargetKey]));
|
|
74941
74943
|
},
|
|
74942
|
-
selectedRowKeys:
|
|
74944
|
+
selectedRowKeys: c,
|
|
74943
74945
|
renderCell: t.renderCell
|
|
74944
|
-
}, t.rowSelectionProps), [t]),
|
|
74945
|
-
(
|
|
74946
|
-
console.log("onChange pagination:",
|
|
74946
|
+
}, t.rowSelectionProps), [t, c]), p = useCallback(
|
|
74947
|
+
(b) => {
|
|
74948
|
+
console.log("onChange pagination:", b), t.resource.loading = !0, t.resource.setPage(b.current), t.resource.setPageSize(b.pageSize), t.resource.refresh();
|
|
74947
74949
|
},
|
|
74948
74950
|
[t]
|
|
74949
|
-
),
|
|
74950
|
-
(
|
|
74951
|
-
var
|
|
74952
|
-
return
|
|
74951
|
+
), m = useCallback(
|
|
74952
|
+
(b) => {
|
|
74953
|
+
var C;
|
|
74954
|
+
return b[(C = t.collection) == null ? void 0 : C.filterTargetKey] === l ? highlightedRowClass : "";
|
|
74953
74955
|
},
|
|
74954
|
-
[l, (
|
|
74955
|
-
),
|
|
74956
|
-
(
|
|
74957
|
-
onClick: (
|
|
74958
|
-
l !==
|
|
74956
|
+
[l, (x = t.collection) == null ? void 0 : x.filterTargetKey]
|
|
74957
|
+
), h = useMemo(() => a, [r]), g = useCallback(
|
|
74958
|
+
(b, C) => ({
|
|
74959
|
+
onClick: (y) => O(void 0, null, function* () {
|
|
74960
|
+
l !== b[t.collection.filterTargetKey] ? (defineClickedRowRecordVariable(t, b), yield t.dispatchEvent("rowClick", { record: b, rowIndex: C, event: y }), removeClickedRowRecordVariable(t)) : yield t.dispatchEvent("rowClick", { record: b, rowIndex: C, event: y });
|
|
74959
74961
|
})
|
|
74960
74962
|
}),
|
|
74961
74963
|
[l, t]
|
|
@@ -74967,15 +74969,15 @@ const tableScroll = { x: "max-content" }, HighPerformanceTable = React.memo(
|
|
|
74967
74969
|
tableLayout: "fixed",
|
|
74968
74970
|
size: o,
|
|
74969
74971
|
rowKey: t.collection.filterTargetKey,
|
|
74970
|
-
rowSelection:
|
|
74972
|
+
rowSelection: d,
|
|
74971
74973
|
virtual: n,
|
|
74972
74974
|
scroll: tableScroll,
|
|
74973
74975
|
dataSource: r,
|
|
74974
74976
|
columns: i,
|
|
74975
|
-
pagination:
|
|
74976
|
-
onChange:
|
|
74977
|
-
rowClassName:
|
|
74978
|
-
onRow:
|
|
74977
|
+
pagination: h,
|
|
74978
|
+
onChange: p,
|
|
74979
|
+
rowClassName: m,
|
|
74980
|
+
onRow: g
|
|
74979
74981
|
}
|
|
74980
74982
|
);
|
|
74981
74983
|
}
|
|
@@ -76830,7 +76832,7 @@ const ArrayNester$1 = ({ name: e, value: t, disabled: o }) => {
|
|
|
76830
76832
|
const g = `${m}.${e}`;
|
|
76831
76833
|
if (!l.current[g]) {
|
|
76832
76834
|
const x = r.createFork();
|
|
76833
|
-
x.context.defineProperty("fieldIndex", {
|
|
76835
|
+
x.gridContainerRef = React.createRef(), x.context.defineProperty("fieldIndex", {
|
|
76834
76836
|
get: () => [...a, `${c}:${h}`]
|
|
76835
76837
|
}), l.current[g] = x;
|
|
76836
76838
|
}
|
|
@@ -79140,7 +79142,7 @@ const ArrayNester = ({ name: e, value: t = [] }) => {
|
|
|
79140
79142
|
const h = `row_${m}`;
|
|
79141
79143
|
if (!r.current[h]) {
|
|
79142
79144
|
const g = n.createFork();
|
|
79143
|
-
g.context.defineProperty("fieldIndex", {
|
|
79145
|
+
g.gridContainerRef = React.createRef(), g.context.defineProperty("fieldIndex", {
|
|
79144
79146
|
get: () => [...i, `${a}:${m}`]
|
|
79145
79147
|
}), r.current[h] = g;
|
|
79146
79148
|
}
|