@voplus/morpho-workspace 10.0.21 → 10.0.23
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/modules/my-document/DataViewToolbar/index.d.ts +5 -0
- package/es/modules/my-document/DataViewToolbar/index.js +23 -0
- package/es/modules/my-document/DataViewToolbar/index.js.map +1 -0
- package/es/modules/my-document/DocumentTableGroup/DocumentSection.d.ts +4 -4
- package/es/modules/my-document/DocumentTableGroup/DocumentSection.js +129 -31
- package/es/modules/my-document/DocumentTableGroup/DocumentSection.js.map +1 -1
- package/es/modules/my-document/DocumentTableGroup/FilterPillsBar.d.ts +19 -0
- package/es/modules/my-document/DocumentTableGroup/FilterPillsBar.js +17 -0
- package/es/modules/my-document/DocumentTableGroup/FilterPillsBar.js.map +1 -0
- package/es/modules/my-document/DocumentTableGroup/index.d.ts +4 -0
- package/es/modules/my-document/DocumentTableGroup/index.js +7 -22
- package/es/modules/my-document/DocumentTableGroup/index.js.map +1 -1
- package/es/modules/my-document/DocumentViewContext.d.ts +18 -1
- package/es/modules/my-document/DocumentViewContext.js +105 -3
- package/es/modules/my-document/DocumentViewContext.js.map +1 -1
- package/es/modules/my-document/FilterTabsBar/index.d.ts +1 -1
- package/es/modules/my-document/FilterTabsBar/index.js +12 -28
- package/es/modules/my-document/FilterTabsBar/index.js.map +1 -1
- package/es/modules/my-document/FilterUI/TeamFilter/index.js +9 -16
- package/es/modules/my-document/FilterUI/TeamFilter/index.js.map +1 -1
- package/es/modules/my-document/FilterUI/WorkspaceFilter/index.js +9 -16
- package/es/modules/my-document/FilterUI/WorkspaceFilter/index.js.map +1 -1
- package/es/modules/my-document/FilterUI/index.d.ts +2 -0
- package/es/modules/my-document/FilterUI/index.js +35 -51
- package/es/modules/my-document/FilterUI/index.js.map +1 -1
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/TableCell.d.ts +20 -0
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/TableCell.js +160 -0
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/TableCell.js.map +1 -0
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/index.css +40 -0
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/index.d.ts +5 -10
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/index.js +103 -174
- package/es/modules/my-document/SectionTemplate/DocumentTableUI/index.js.map +1 -1
- package/es/modules/my-document/SectionTemplate/DocumentViewClass/index.d.ts +7 -6
- package/es/modules/my-document/SectionTemplate/DocumentViewClass/index.js +3 -20
- package/es/modules/my-document/SectionTemplate/DocumentViewClass/index.js.map +1 -1
- package/es/modules/my-document/SectionTemplate/GridUI/index.d.ts +5 -9
- package/es/modules/my-document/SectionTemplate/GridUI/index.js +49 -37
- package/es/modules/my-document/SectionTemplate/GridUI/index.js.map +1 -1
- package/es/modules/my-document/SectionTemplate/documentGroups.d.ts +39 -0
- package/es/modules/my-document/SectionTemplate/documentGroups.js +40 -0
- package/es/modules/my-document/SectionTemplate/documentGroups.js.map +1 -0
- package/es/modules/my-document/SectionTemplate/documentGroups.test.d.ts +1 -0
- package/es/modules/my-document/SectionTemplate/documentGroups.test.js +64 -0
- package/es/modules/my-document/SectionTemplate/documentGroups.test.js.map +1 -0
- package/es/modules/my-document/index.js +21 -14
- package/es/modules/my-document/index.js.map +1 -1
- package/es/modules/my-document/tabClasses.d.ts +3 -0
- package/es/modules/my-document/tabClasses.js +4 -0
- package/es/modules/my-document/tabClasses.js.map +1 -0
- package/es/modules/pin/components/MyPinned/index.css +2 -2
- package/es/modules/tasks/components/TaskItem/subTaskItem.css +0 -2
- package/es/modules/work/components/WorkListHeader/index.js +1 -1
- package/es/modules/work/components/WorkTableCard/TableCellDetail.js +3 -3
- package/es/modules/work/components/WorkTableCard/TableCellDetail.js.map +1 -1
- package/es/modules/work/components/WorkTableList/TableCell.js +1 -1
- package/es/modules/work/components/WorkTableList/TableCell.js.map +1 -1
- package/es/modules/work/components/WorkTableListCard/TableCellDetails.js +2 -2
- package/es/modules/work/components/WorkTableListCard/TableCellDetails.js.map +1 -1
- package/es/modules/work/components/WorkTableListCard/index.css +0 -9
- package/es/modules/work/components/WorkTableListCardPage/index.js +1 -1
- package/es/modules/work/work-type/components/WorkTypeItem/index.d.ts +0 -1
- package/es/modules/work/work-type/components/WorkTypeItem/index.js +17 -12
- package/es/modules/work/work-type/components/WorkTypeItem/index.js.map +1 -1
- package/es/obsolete/space/components/Notes/index.js +1 -1
- package/es/obsolete/space/components/Notes/index.js.map +1 -1
- package/package.json +1 -1
- package/es/controls/Corner/index.css +0 -5
- package/es/controls/Corner/index.d.ts +0 -9
- package/es/controls/Corner/index.js +0 -10
- package/es/controls/Corner/index.js.map +0 -1
- package/es/controls/StickyAddButton/index.css +0 -18
- package/es/controls/StickyAddButton/index.d.ts +0 -9
- package/es/controls/StickyAddButton/index.js +0 -12
- package/es/controls/StickyAddButton/index.js.map +0 -1
- package/es/modules/work/work-type/components/WorkTypeItem/index.css +0 -45
|
@@ -1,188 +1,117 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import MentionList from "@voplus/morpho-org/es/controls/MentionList";
|
|
10
|
-
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
11
|
-
import TagView from "@voplus/morpho-org/es/modules/tag/TagView";
|
|
1
|
+
import React, { useMemo, useState } from "react";
|
|
2
|
+
import { observe, useAsideContentContext, useAutorunEffect } from "@voplus/morpho-ui";
|
|
3
|
+
import { BatchContext, BatchContextState, ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
4
|
+
import { BatchHeader3, DeleteButton, SelectButton, LockButton, UnLockButton, } from "@voplus/morpho-ui/es/components/layout/ListView/headers/BatchHeader";
|
|
5
|
+
import { useDocumentStore, useSelectNodeInfoService, } from "@voplus/morpho-document-core";
|
|
6
|
+
import TableCell, { columnsList, columnsSimpleList, GroupTitle } from "./TableCell";
|
|
7
|
+
import RegisterTable from "@voplus/morpho-ui/es/controls/RegisterTable";
|
|
8
|
+
import { buildGroupTree, computeExpandedRowKeys, toggleCollapsedKey, } from "../documentGroups";
|
|
12
9
|
import "./index.css";
|
|
10
|
+
/** 分组表格视图:将 Star/Urgent/None 分组合并为树形 RegisterTable,默认全部展开,可折叠;多选工具条复用 morpho-ui 批量操作组件 */
|
|
13
11
|
const TableView = (props) => {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
const
|
|
12
|
+
const { groups } = props;
|
|
13
|
+
/** 用户手动折叠的分组 key 集合(受控展开:可见分组默认全部展开) */
|
|
14
|
+
const [collapsedKeys, setCollapsedKeys] = useState(new Set());
|
|
17
15
|
const store = useDocumentStore();
|
|
16
|
+
const asideContext = useAsideContentContext();
|
|
18
17
|
const select = useSelectNodeInfoService();
|
|
18
|
+
/** 批量操作数据源:同步文档行(不含分组行),供 selectAll/isAllSelected 取数 */
|
|
19
|
+
const listState = useMemo(() => new ListDataContextState(), []);
|
|
20
|
+
/** 批量操作状态:选中 id 集合与多选模式开关 */
|
|
21
|
+
const batch = useMemo(() => new BatchContextState(listState), [listState]);
|
|
22
|
+
/** 分组数据变化(加载更多/增删改)时同步文档行到批量数据源 */
|
|
23
|
+
useAutorunEffect(() => {
|
|
24
|
+
listState.clear();
|
|
25
|
+
listState.union(groups.flatMap((g) => g.list.data));
|
|
26
|
+
});
|
|
27
|
+
/** 行选择回调:同步选中集合到 batch,有选中即进入多选模式(驱动工具条显示) */
|
|
19
28
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const rowSelection = {
|
|
23
|
-
selectedRowKeys,
|
|
24
|
-
columnWidth: 45,
|
|
25
|
-
onChange: onSelectChange,
|
|
29
|
+
batch.ids = newSelectedRowKeys.map(String);
|
|
30
|
+
batch.multiple = newSelectedRowKeys.length > 0;
|
|
26
31
|
};
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
message.warning("Nothing to choose");
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
store.delete(selectedRowKeys, { DeleteChilds: true }).then(() => setSelectedRowKeys([]));
|
|
35
|
-
}
|
|
32
|
+
/** 删除选中文档(DeleteButton 内置确认弹窗;完成后退出多选隐藏工具条) */
|
|
33
|
+
const onDelete = async (b) => {
|
|
34
|
+
await store.delete(b.ids, { DeleteChilds: true });
|
|
35
|
+
b.multiple = false;
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
select.add(selectedRowKeys);
|
|
43
|
-
setSelectedRowKeys([]);
|
|
37
|
+
/** 复制选中文档到收藏夹,完成后退出多选 */
|
|
38
|
+
const onMove = (b) => {
|
|
39
|
+
select.add(b.ids);
|
|
40
|
+
b.ids = [];
|
|
41
|
+
b.multiple = false;
|
|
44
42
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
store.lock(selectedRowKeys, { error: "message" }).then(() => setSelectedRowKeys([]));
|
|
52
|
-
}
|
|
43
|
+
/** 锁定选中文档,完成后退出多选 */
|
|
44
|
+
const onLock = (b) => {
|
|
45
|
+
store.lock(b.ids, { error: "message" }).then(() => {
|
|
46
|
+
b.ids = [];
|
|
47
|
+
b.multiple = false;
|
|
48
|
+
});
|
|
53
49
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
store.unlock(selectedRowKeys, { error: "message" }).then(() => setSelectedRowKeys([]));
|
|
61
|
-
}
|
|
50
|
+
/** 解锁选中文档,完成后退出多选 */
|
|
51
|
+
const onUnLock = (b) => {
|
|
52
|
+
store.unlock(b.ids, { error: "message" }).then(() => {
|
|
53
|
+
b.ids = [];
|
|
54
|
+
b.multiple = false;
|
|
55
|
+
});
|
|
62
56
|
};
|
|
63
|
-
const columns = [
|
|
64
|
-
{
|
|
65
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Name")),
|
|
66
|
-
dataIndex: "name",
|
|
67
|
-
key: "name",
|
|
68
|
-
width: 425,
|
|
69
|
-
fixed: "start",
|
|
70
|
-
render: (_, doc) => (React.createElement("div", { className: "flex items-center gap-3" },
|
|
71
|
-
React.createElement("div", { className: "shrink-0" }, meta.getIcon(doc)),
|
|
72
|
-
React.createElement("div", { className: "flex flex-col" },
|
|
73
|
-
React.createElement("span", { className: "font-medium text-slate-900" }, doc.name)))),
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Document Date")),
|
|
77
|
-
dataIndex: "date",
|
|
78
|
-
key: "date",
|
|
79
|
-
minWidth: 150,
|
|
80
|
-
render: (_, doc) => doc.date ? (React.createElement(UTCShortDate, { className: "tabular-nums font-medium text-gray-700", value: doc.date, format: "DD MMM YYYY" })) : (React.createElement("span", { className: "add-info-style" }, "no Data")),
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Create Date")),
|
|
84
|
-
dataIndex: "createDate",
|
|
85
|
-
key: "createDate",
|
|
86
|
-
minWidth: 150,
|
|
87
|
-
render: (_, doc) => doc.createDate ? (React.createElement(UTCShortDate, { className: "tabular-nums font-medium text-gray-700", value: doc.createDate, format: "DD MMM YYYY" })) : (React.createElement("span", { className: "add-info-style" }, "no Data")),
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Create By")),
|
|
91
|
-
dataIndex: "createdBy",
|
|
92
|
-
key: "createdBy",
|
|
93
|
-
minWidth: 150,
|
|
94
|
-
render: (_, doc) => (React.createElement("div", { className: "cell-content", onClick: (e) => e.stopPropagation() },
|
|
95
|
-
React.createElement(MentionList, { contacts: doc.createdBy ? [doc.createdBy] : [], canEdit: false, placeholder: "no Data", unitReferenceProps: { type: "link" } }))),
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Folder")),
|
|
99
|
-
dataIndex: "folder",
|
|
100
|
-
key: "folder",
|
|
101
|
-
width: 150,
|
|
102
|
-
render: (_, doc) => doc.folder ? (React.createElement("div", { className: "cell-content", onClick: (e) => e.stopPropagation() },
|
|
103
|
-
React.createElement(DocumentReference, { id: doc.parentNodeId, type: "link" }))) : (React.createElement("span", { className: "add-info-style" }, "no Data")),
|
|
104
|
-
},
|
|
105
|
-
// {
|
|
106
|
-
// title: (
|
|
107
|
-
// <span className="text-xs font-semibold text-slate-500 uppercase tracking-wider">Flag</span>
|
|
108
|
-
// ),
|
|
109
|
-
// dataIndex: "flag",
|
|
110
|
-
// key: "flag",
|
|
111
|
-
// render: (_, doc: IDocument) => (
|
|
112
|
-
// <div className="cell-content" onClick={(e) => e.stopPropagation()}>
|
|
113
|
-
// <FlagProperty showEditIcon={false} id={doc.id} flag={doc.flag} />
|
|
114
|
-
// </div>
|
|
115
|
-
// ),
|
|
116
|
-
// },
|
|
117
|
-
{
|
|
118
|
-
title: (React.createElement("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider" }, "Tags")),
|
|
119
|
-
dataIndex: "tags",
|
|
120
|
-
key: "tags",
|
|
121
|
-
render: (_, doc) => (React.createElement("div", { className: "cell-content" },
|
|
122
|
-
React.createElement(TagView, { id: doc.id, tags: doc.tags, items: store.items, editable: false }))),
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
title: "",
|
|
126
|
-
key: "operate",
|
|
127
|
-
width: 90,
|
|
128
|
-
fixed: "end",
|
|
129
|
-
render: (_, doc) => (React.createElement("div", { className: "cell-content" },
|
|
130
|
-
React.createElement(DocumentToolbar, { id: doc.id },
|
|
131
|
-
React.createElement(Open, { url: meta.getRoute(doc) }),
|
|
132
|
-
doc.status === "Archived" && React.createElement(Restore, null),
|
|
133
|
-
React.createElement(Versions, null),
|
|
134
|
-
doc.type === "File" && React.createElement(Download, null)))),
|
|
135
|
-
className: "text-right",
|
|
136
|
-
},
|
|
137
|
-
];
|
|
138
57
|
return observe(() => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
React.createElement(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
58
|
+
const activeColumns = (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent) ? columnsSimpleList : columnsList;
|
|
59
|
+
const columns = activeColumns.map((col, index) => ({
|
|
60
|
+
...col,
|
|
61
|
+
render: index === 0
|
|
62
|
+
? (value, record) => (record === null || record === void 0 ? void 0 : record.isGroup) ? React.createElement(GroupTitle, { record: record }) : value
|
|
63
|
+
: col.render,
|
|
64
|
+
onCell: (record, rowIndex) => ({
|
|
65
|
+
record,
|
|
66
|
+
dataIndex: col.dataIndex,
|
|
67
|
+
firstDataIndex: activeColumns[0].dataIndex,
|
|
68
|
+
}),
|
|
69
|
+
}));
|
|
70
|
+
const treeRows = buildGroupTree(groups);
|
|
71
|
+
const expandedRowKeys = computeExpandedRowKeys(treeRows, collapsedKeys);
|
|
72
|
+
const loading = groups.some((g) => g.list.loading);
|
|
73
|
+
const hasMore = groups.some((g) => g.list.data.length < g.total);
|
|
74
|
+
const onLoadMore = () => groups.forEach((g) => {
|
|
75
|
+
if (g.list.data.length < g.total && !g.list.loading)
|
|
76
|
+
g.list.triggerNextPage();
|
|
77
|
+
});
|
|
78
|
+
/** 行选择配置:observe 内构建以订阅 batch 选中变化,驱动表格重渲染 */
|
|
79
|
+
const rowSelection = {
|
|
80
|
+
selectedRowKeys: batch.ids,
|
|
81
|
+
columnWidth: 45,
|
|
82
|
+
onChange: onSelectChange,
|
|
83
|
+
getCheckboxProps: (record) => ({ disabled: !!record.isGroup }),
|
|
84
|
+
onCell: (record) => ({ record }),
|
|
85
|
+
};
|
|
86
|
+
return (React.createElement("div", { className: "document-table-ui-hide-scrollbar h-full flex flex-col" },
|
|
87
|
+
React.createElement(BatchContext.Provider, { value: batch },
|
|
88
|
+
React.createElement(BatchHeader3, { buttons: [
|
|
89
|
+
React.createElement(DeleteButton, { execute: onDelete, key: "DeleteButton" }),
|
|
90
|
+
React.createElement(SelectButton, { execute: onMove, key: "SelectButton" }),
|
|
91
|
+
React.createElement(LockButton, { execute: onLock, key: "LockButton" }),
|
|
92
|
+
React.createElement(UnLockButton, { execute: onUnLock, key: "UnLockButton" }),
|
|
93
|
+
] }),
|
|
94
|
+
React.createElement(RegisterTable, { containerClassName: "[&_.ant-table-selection-column]:px-2!", columns: columns, dataSource: treeRows, loading: loading, onLoadMore: onLoadMore, hasMore: hasMore, components: { body: { cell: TableCell } }, expandable: {
|
|
95
|
+
expandedRowKeys,
|
|
96
|
+
indentSize: 0,
|
|
97
|
+
expandIcon: () => null,
|
|
98
|
+
onExpand: (_expanded, record) => {
|
|
99
|
+
setCollapsedKeys((prev) => toggleCollapsedKey(prev, record.id));
|
|
100
|
+
},
|
|
101
|
+
}, rowSelection: rowSelection, onRow: (record) => {
|
|
102
|
+
if (record.isGroup)
|
|
103
|
+
return { className: "bg-bg-blue" };
|
|
104
|
+
return {
|
|
105
|
+
onClick: (event) => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (!(event.target instanceof HTMLElement))
|
|
108
|
+
return;
|
|
109
|
+
if (!event.target.closest(".cell-content")) {
|
|
110
|
+
(_a = props.onItemClick) === null || _a === void 0 ? void 0 : _a.call(props, record.id);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
} }))));
|
|
186
115
|
});
|
|
187
116
|
};
|
|
188
117
|
export default TableView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/DocumentTableUI/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/DocumentTableUI/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,GACZ,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAEN,gBAAgB,EAChB,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,aAAa,MAA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gBAAgB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,EAAY,CAAC,CAAC,CAAC;wBAC3E,CAAC;qBACD,EACD,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,CAAC,MAAmB,EAAE,EAAE;wBAC9B,IAAI,MAAM,CAAC,OAAO;4BAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;wBACvD,OAAO;4BACN,OAAO,EAAE,CAAC,KAAuB,EAAE,EAAE;;gCACpC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,YAAY,WAAW,CAAC;oCAAE,OAAO;gCACnD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;oCAC5C,MAAA,KAAK,CAAC,WAAW,sDAAG,MAAM,CAAC,EAAE,CAAC,CAAC;gCAChC,CAAC;4BACF,CAAC;yBACD,CAAC;oBACH,CAAC,GACA,CACqB,CACnB,CACN,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import type { DocumentGroup } from "../documentGroups";
|
|
3
|
+
/** 根据当前视图类型(table/grid)切换分组视图 */
|
|
3
4
|
declare const DocumentViewClass: (props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
/** 分组列表(Star/Urgent/None) */
|
|
6
|
+
groups: DocumentGroup[];
|
|
7
|
+
/** 文档点击回调 */
|
|
8
|
+
onItemClick?: (id?: string) => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
9
10
|
export default DocumentViewClass;
|
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import { useDocumentViewContext } from "../../DocumentViewContext";
|
|
4
|
-
import QuickSearch from "@voplus/morpho-ui/es/components/layout/ListView/controls/QuickSearch";
|
|
5
4
|
import TableUI from "../DocumentTableUI";
|
|
6
5
|
import GridUI from "../GridUI";
|
|
6
|
+
/** 根据当前视图类型(table/grid)切换分组视图 */
|
|
7
7
|
const DocumentViewClass = (props) => {
|
|
8
|
-
const {
|
|
9
|
-
const [hasSearched, setHasSearched] = React.useState(false);
|
|
8
|
+
const { groups, onItemClick } = props;
|
|
10
9
|
const { viewType } = useDocumentViewContext();
|
|
11
|
-
|
|
12
|
-
const showContent = total !== undefined && total > 0;
|
|
13
|
-
return observe(() => (React.createElement(React.Fragment, null, showSection ? (React.createElement("div", { className: "mb-8" },
|
|
14
|
-
React.createElement("div", { className: "flex items-center justify-between mb-4" },
|
|
15
|
-
React.createElement("div", { className: "flex items-center gap-2" },
|
|
16
|
-
icon ? icon : null,
|
|
17
|
-
React.createElement("h2", { className: "text-xl font-bold text-slate-900" }, title),
|
|
18
|
-
React.createElement("span", { className: "text-sm text-slate-500" },
|
|
19
|
-
"(",
|
|
20
|
-
total || list.data.length,
|
|
21
|
-
")")),
|
|
22
|
-
React.createElement("div", { className: "flex items-center gap-2" }, search && (React.createElement(QuickSearch, { onChange: (val) => {
|
|
23
|
-
var _a;
|
|
24
|
-
setHasSearched(true);
|
|
25
|
-
(_a = props.onSearch) === null || _a === void 0 ? void 0 : _a.call(props, val);
|
|
26
|
-
} })))),
|
|
27
|
-
showContent ? (React.createElement("div", { className: "pinned-content" }, viewType === "table" ? React.createElement(TableUI, { ...props }) : React.createElement(GridUI, { ...props }))) : null)) : null)));
|
|
10
|
+
return observe(() => viewType === "table" ? (React.createElement(TableUI, { groups: groups, onItemClick: onItemClick })) : (React.createElement(GridUI, { groups: groups, onItemClick: onItemClick })));
|
|
28
11
|
};
|
|
29
12
|
export default DocumentViewClass;
|
|
30
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/DocumentViewClass/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/DocumentViewClass/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,iCAAiC;AACjC,MAAM,iBAAiB,GAAG,CAAC,KAK1B,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,EAAE,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CACnB,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CACtB,oBAAC,OAAO,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAI,CACrD,CAAC,CAAC,CAAC,CACH,oBAAC,MAAM,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAI,CACpD,CACD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { type DocumentGroup } from "../documentGroups";
|
|
3
|
+
/** 分组网格视图:按 Star/Urgent/None 顺序展示分组标题条与卡片网格 */
|
|
4
4
|
declare const GridView: (props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Page: number;
|
|
9
|
-
PageSize: number;
|
|
10
|
-
};
|
|
5
|
+
/** 分组列表(Star/Urgent/None) */
|
|
6
|
+
groups: DocumentGroup[];
|
|
7
|
+
/** 文档卡片点击回调 */
|
|
11
8
|
onItemClick?: (id?: string) => void;
|
|
12
|
-
onPageChange?: (page: number, pageSize: number) => void;
|
|
13
9
|
}) => React.JSX.Element;
|
|
14
10
|
export default GridView;
|
|
@@ -1,50 +1,62 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { Restore,
|
|
3
|
+
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
4
|
+
import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
|
|
5
|
+
import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
|
|
6
|
+
import { Restore, Versions, Download, } from "@voplus/morpho-document/es/controls/DocumentToolbar/buttons";
|
|
7
|
+
import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
|
|
7
8
|
import { useMetaStore, useDocumentStore } from "@voplus/morpho-document-core";
|
|
8
9
|
import ResponsiveGridContainer from "@voplus/morpho-ui/es/controls/ResponsiveGrid/ResponsiveGridContainer";
|
|
9
|
-
import DocumentDataIconBar from "@voplus/morpho-document/es/controls/DocumentDataIconBar";
|
|
10
10
|
import DocumentToolbar from "@voplus/morpho-document/es/controls/DocumentToolbar";
|
|
11
11
|
import GridColumn from "@voplus/morpho-ui/es/controls/ResponsiveGrid/GridColumn";
|
|
12
|
-
import
|
|
12
|
+
import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
|
|
13
13
|
import TagView from "@voplus/morpho-org/es/modules/tag/TagView";
|
|
14
|
+
import Scrollbars from "react-custom-scrollbars-2";
|
|
15
|
+
import { filterVisibleGroups } from "../documentGroups";
|
|
16
|
+
/** 分组网格视图:按 Star/Urgent/None 顺序展示分组标题条与卡片网格 */
|
|
14
17
|
const GridView = (props) => {
|
|
15
|
-
const {
|
|
16
|
-
const { user } = useApplicationContext();
|
|
18
|
+
const { groups } = props;
|
|
17
19
|
const meta = useMetaStore();
|
|
18
20
|
const store = useDocumentStore();
|
|
19
|
-
return observe(() =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
return observe(() => {
|
|
22
|
+
const visibleGroups = filterVisibleGroups(groups);
|
|
23
|
+
const loading = groups.some((g) => g.list.loading);
|
|
24
|
+
const hasMore = visibleGroups.some((g) => g.list.hasMore);
|
|
25
|
+
const loadMore = () => visibleGroups.forEach((g) => g.list.triggerNextPage());
|
|
26
|
+
return (React.createElement(Scrollbars, { autoHide: true },
|
|
27
|
+
React.createElement(InfiniteScrollView, { loading: loading, hasMore: hasMore, loadMore: loadMore, empty: visibleGroups.length === 0 }, visibleGroups.map((g) => (React.createElement("div", { key: g.flag },
|
|
28
|
+
React.createElement("div", { className: "h-14 flex items-center gap-2 text-sm text-font-primary font-semibold bg-bg-blue px-5" },
|
|
29
|
+
g.icon,
|
|
30
|
+
React.createElement("span", null,
|
|
31
|
+
g.title,
|
|
32
|
+
" (",
|
|
33
|
+
g.total,
|
|
34
|
+
")")),
|
|
35
|
+
React.createElement(ResponsiveGridContainer, { breakpoints: { xl: 4, lg: 4, md: 3, sm: 2, xs: 2 }, className: "px-5 py-5" }, ({ cols }) => (React.createElement(GridColumn, { cols: cols, className: "gap-4!" }, g.list.data.map((doc) => {
|
|
36
|
+
var _a;
|
|
37
|
+
return (React.createElement("article", { key: doc.id, className: "rounded-[10px] border border-border bg-white", onClick: () => { var _a; return (_a = props.onItemClick) === null || _a === void 0 ? void 0 : _a.call(props, doc.id); } },
|
|
38
|
+
React.createElement("div", { className: "flex items-start gap-3 px-4 pt-4" },
|
|
39
|
+
React.createElement("span", { className: "flex h-[44px] w-[44px] shrink-0 items-center justify-center rounded-base bg-bg-blue-data text-font-secondary" }, meta.getIcon(doc)),
|
|
40
|
+
React.createElement("div", { className: "min-w-0 flex-1" },
|
|
41
|
+
React.createElement("div", { className: "flex items-center gap-2" },
|
|
42
|
+
React.createElement("h3", { className: "truncate text-size-base font-bold uppercase tracking-[0.01em] text-font-primary" }, doc.name)),
|
|
43
|
+
React.createElement("p", { className: "mt-[3px] text-sm font-medium text-font-grey" },
|
|
44
|
+
"Created on",
|
|
45
|
+
React.createElement(UTCShortDate, { className: "ml-1", value: doc.createDate, format: "DD MMM YYYY" }))),
|
|
46
|
+
React.createElement(DocumentToolbar, { id: doc.id },
|
|
47
|
+
doc.status === "Archived" && React.createElement(Restore, null),
|
|
48
|
+
React.createElement(Versions, null),
|
|
49
|
+
doc.type === "File" && React.createElement(Download, null))),
|
|
50
|
+
React.createElement("div", { className: "flex items-center border-b border-border px-4 pb-4 pt-3" }, ((_a = doc.tags) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(TagView, { id: doc.id, tags: doc.tags, items: store.items, maxCount: 2, tagClassName: "primary-tag" })) : ("__")),
|
|
51
|
+
React.createElement("div", { className: "flex items-center justify-between gap-2 px-4 py-4" },
|
|
52
|
+
React.createElement("div", { className: "flex min-w-0 items-center gap-2 font-medium text-font-primary" },
|
|
53
|
+
doc.createdBy && (React.createElement("div", { className: "shrink-0 text-size-2xs!" },
|
|
54
|
+
React.createElement(UnitAvatar, { unit: doc.createdBy }))),
|
|
55
|
+
React.createElement("div", { className: "text-sm font-medium leading-6 uppercase min-w-0 whitespace-normal wrap-break-word line-clamp-2" }, doc.createdBy ? (React.createElement(UnitNameNoteAlert, { id: doc.createdBy.id, name: doc.createdBy.name })) : null)),
|
|
56
|
+
React.createElement("span", { className: "text-sm! text-font-disabled!" },
|
|
57
|
+
React.createElement(Open, { url: meta.getRoute(doc) })))));
|
|
58
|
+
}))))))))));
|
|
59
|
+
});
|
|
48
60
|
};
|
|
49
61
|
export default GridView;
|
|
50
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/GridUI/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/my-document/SectionTemplate/GridUI/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,UAAU,MAAM,8DAA8D,CAAC;AACtF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACR,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,0DAA0D,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,uBAAuB,MAAM,sEAAsE,CAAC;AAC3G,OAAO,eAAe,MAAM,qDAAqD,CAAC;AAClF,OAAO,UAAU,MAAM,yDAAyD,CAAC;AACjF,OAAO,kBAAkB,M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