dsh-workbench-tasks 5.2.26 → 5.2.27
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/lib/client.js +14 -18
- package/lib/index.js +1 -1
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -9508,6 +9508,7 @@ var require_timeline_styles = __commonJS({
|
|
|
9508
9508
|
".wbt-timeline-option:focus-visible,.wbt-timeline-view button:focus-visible,.wbt-timeline-modal button:focus-visible{outline:2px solid var(--wbt-accent);outline-offset:2px}.wbt-timeline-option input[type=checkbox],.wbt-timeline-single input{appearance:auto;width:15px;height:15px;flex:none;accent-color:var(--wbt-accent)}",
|
|
9509
9509
|
".wbt-timeline-pager{justify-content:space-between;font-size:12px;margin-top:12px}.wbt-timeline-right h3,.wbt-timeline-summary h4{font-size:15px;font-weight:600;margin:0 0 8px;overflow-wrap:anywhere}.wbt-timeline-eyebrow{font-size:11.5px;opacity:.55;margin-bottom:4px;overflow-wrap:anywhere}",
|
|
9510
9510
|
".wbt-timeline-summary{min-width:0}.wbt-timeline-desc{max-height:64px;overflow:hidden;margin:0 0 8px;white-space:pre-wrap;overflow-wrap:anywhere}.wbt-timeline-actions{margin:8px 0}.wbt-timeline-actions>.wbt-act-del{margin-left:auto}",
|
|
9511
|
+
".wbt-timeline-right>.wbt-timeline-members{min-height:0;max-height:65vh;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}",
|
|
9511
9512
|
// Scoped reset defeats ordinary host button surfaces without touching unrelated task controls.
|
|
9512
9513
|
":is(.wbt-timeline-view,.wbt-timeline-modal) button:is(.wbt-timeline-member,.wbt-timeline-remove,.wbt-timeline-id){appearance:none;background:transparent;background-image:none;color:inherit;border:0;box-shadow:none;border-radius:var(--wb-radius-sm,6px);font:inherit;cursor:pointer;min-width:0;min-height:0;width:auto;margin:0}",
|
|
9513
9514
|
":is(.wbt-timeline-view,.wbt-timeline-modal) .wbt-timeline-id{display:inline-flex;align-items:center;gap:4px;padding:4px;max-width:180px}.wbt-timeline-id code{font-size:11.5px;opacity:.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
@@ -11802,8 +11803,7 @@ var require_timeline_view = __commonJS({
|
|
|
11802
11803
|
var busyS = React.useState(true), busy = busyS[0], setBusy = busyS[1];
|
|
11803
11804
|
var errorS = React.useState(""), error = errorS[0], setError = errorS[1];
|
|
11804
11805
|
var activeS = React.useState(null), active = activeS[0], setActive = activeS[1];
|
|
11805
|
-
var
|
|
11806
|
-
var membersS = React.useState({ records: [], total: 0 }), members = membersS[0], setMembers = membersS[1];
|
|
11806
|
+
var membersS = React.useState(null), loaded = membersS[0], setMembers = membersS[1];
|
|
11807
11807
|
var memberBusyS = React.useState(false), memberBusy = memberBusyS[0], setMemberBusy = memberBusyS[1];
|
|
11808
11808
|
var memberErrorS = React.useState(""), memberError = memberErrorS[0], setMemberError = memberErrorS[1];
|
|
11809
11809
|
var refreshS = React.useState(0), refresh = refreshS[0], setRefresh = refreshS[1];
|
|
@@ -11815,6 +11815,7 @@ var require_timeline_view = __commonJS({
|
|
|
11815
11815
|
var listRef = React.useRef(null), mergeButton = React.useRef(null), detailTrigger = React.useRef(null);
|
|
11816
11816
|
var createdRef = React.useRef(null);
|
|
11817
11817
|
var activeKey = active && active.timelineKey;
|
|
11818
|
+
var members = loaded && loaded.key === activeKey ? loaded.rows : [];
|
|
11818
11819
|
var heading = splitTitle(active && active.title);
|
|
11819
11820
|
var editorS = React.useState(null), editor = editorS[0], setEditor = editorS[1];
|
|
11820
11821
|
var addS = React.useState(false), adding = addS[0], setAdding = addS[1];
|
|
@@ -11859,24 +11860,20 @@ var require_timeline_view = __commonJS({
|
|
|
11859
11860
|
cancelled = true;
|
|
11860
11861
|
};
|
|
11861
11862
|
}, [api, query, single, page, refresh]);
|
|
11862
|
-
React.useEffect(function() {
|
|
11863
|
-
setMemberPage(1);
|
|
11864
|
-
}, [activeKey]);
|
|
11865
11863
|
React.useEffect(function() {
|
|
11866
11864
|
var cancelled = false;
|
|
11867
11865
|
setMemberError("");
|
|
11868
|
-
setMembers(
|
|
11866
|
+
setMembers(null);
|
|
11869
11867
|
if (!activeKey) {
|
|
11870
11868
|
setMemberBusy(false);
|
|
11871
11869
|
return;
|
|
11872
11870
|
}
|
|
11873
11871
|
setMemberBusy(true);
|
|
11874
|
-
api.call("tasks.timeline", { timelineKey: activeKey
|
|
11875
|
-
if (cancelled)
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
if (memberPage > 1 && !next.records.length) setMemberPage(Math.max(1, Math.ceil(next.total / 20)));
|
|
11872
|
+
api.call("tasks.timeline", { timelineKey: activeKey }).then(result).then(function(rows) {
|
|
11873
|
+
if (!cancelled) {
|
|
11874
|
+
setMembers({ key: activeKey, rows });
|
|
11875
|
+
setMemberBusy(false);
|
|
11876
|
+
}
|
|
11880
11877
|
}).catch(function(e) {
|
|
11881
11878
|
if (!cancelled) {
|
|
11882
11879
|
setMemberBusy(false);
|
|
@@ -11886,7 +11883,7 @@ var require_timeline_view = __commonJS({
|
|
|
11886
11883
|
return function() {
|
|
11887
11884
|
cancelled = true;
|
|
11888
11885
|
};
|
|
11889
|
-
}, [api, activeKey,
|
|
11886
|
+
}, [api, activeKey, refresh]);
|
|
11890
11887
|
React.useEffect(function() {
|
|
11891
11888
|
if (!editTask && !createState) return;
|
|
11892
11889
|
var cancelled = false;
|
|
@@ -11915,7 +11912,6 @@ var require_timeline_view = __commonJS({
|
|
|
11915
11912
|
function choose(item, toggle) {
|
|
11916
11913
|
if (busy) return;
|
|
11917
11914
|
setActive(item);
|
|
11918
|
-
setMemberPage(1);
|
|
11919
11915
|
if (toggle && item.taskCount > 0) setSelected(function(old) {
|
|
11920
11916
|
return old.some(function(x) {
|
|
11921
11917
|
return x.timelineKey === item.timelineKey;
|
|
@@ -12129,7 +12125,7 @@ var require_timeline_view = __commonJS({
|
|
|
12129
12125
|
) : null,
|
|
12130
12126
|
memberError ? h("p", { role: "alert", className: "wbt-err" }, t.error + memberError) : null,
|
|
12131
12127
|
memberBusy ? h("p", { role: "status" }, t.loading) : h(MemberRows, {
|
|
12132
|
-
rows: members
|
|
12128
|
+
rows: members,
|
|
12133
12129
|
lang,
|
|
12134
12130
|
disabled: writing,
|
|
12135
12131
|
onOpen: function(task, e) {
|
|
@@ -12148,8 +12144,8 @@ var require_timeline_view = __commonJS({
|
|
|
12148
12144
|
});
|
|
12149
12145
|
}
|
|
12150
12146
|
}),
|
|
12151
|
-
!memberBusy && !memberError && !members.
|
|
12152
|
-
active ? h("div", { className: "wbt-timeline-member-footer" }, h("span", null, t.timelineOrder), h(
|
|
12147
|
+
!memberBusy && !memberError && !members.length ? h("p", { className: "wbt-empty" }, active ? tr("\u6682\u65E0\u53EF\u663E\u793A\u6210\u5458") : t.timelineEmpty) : null,
|
|
12148
|
+
active ? h("div", { className: "wbt-timeline-member-footer" }, h("span", null, t.timelineOrder), loaded && loaded.key === activeKey ? h("span", null, t.total + " " + members.length) : null) : null
|
|
12153
12149
|
)
|
|
12154
12150
|
),
|
|
12155
12151
|
editor ? h(controls.Editor, { api, t, item: editor.timelineKey ? editor : null, onClose: function() {
|
|
@@ -12795,7 +12791,7 @@ var init_list_checks = __esm({
|
|
|
12795
12791
|
var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configView, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
|
|
12796
12792
|
host.registerAddon({
|
|
12797
12793
|
id: "wb-addon-tasks",
|
|
12798
|
-
version: "5.2.
|
|
12794
|
+
version: "5.2.27",
|
|
12799
12795
|
icon: (init_list_checks(), __toCommonJS(list_checks_exports)).default,
|
|
12800
12796
|
views: [
|
|
12801
12797
|
{ id: "stats", icon: tabIcon("chart"), title: { zh: "\u7EDF\u8BA1", en: "Stats" }, component: statsView.TasksStatsView, keepAlive: true },
|
package/lib/index.js
CHANGED
|
@@ -129,7 +129,7 @@ export function apply(ctx) {
|
|
|
129
129
|
id: "wb-addon-tasks",
|
|
130
130
|
title: "任务",
|
|
131
131
|
description: "任务树 + 统计/记录/时间线/配置/数据五个视图:紧急/已关闭/已开启/已完成/总览,可按标签筛选(需安装标签插件),附统计报表与只读数据浏览",
|
|
132
|
-
version: "5.2.
|
|
132
|
+
version: "5.2.27",
|
|
133
133
|
tables: ["task", "task_node", "task_timeline", "task_timeline_link", "task_workspace", "task_workspace_link"],
|
|
134
134
|
sync: taskSync,
|
|
135
135
|
views: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-tasks",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.27",
|
|
4
4
|
"description": "个人工作台任务插件:任务树、优先级、截止日、时间线与重启",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"id": "wb-addon-tasks",
|
|
18
18
|
"title": "任务",
|
|
19
19
|
"description": "任务树 + 统计/记录/时间线/工作区/配置/数据/命令/Action 八个视图:紧急/已关闭/已开启/已完成/总览,可按标签筛选,附统计报表与表数据浏览",
|
|
20
|
-
"version": "5.2.
|
|
20
|
+
"version": "5.2.27",
|
|
21
21
|
"minShell": "0.8.0",
|
|
22
22
|
"tables": [
|
|
23
23
|
"task",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"./package.json": "./package.json"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"dsh-workbench-host": "^0.8.
|
|
104
|
+
"dsh-workbench-host": "^0.8.1"
|
|
105
105
|
},
|
|
106
106
|
"dsh": {
|
|
107
107
|
"bundle": {
|