dsh-workbench-tasks 5.2.40 → 5.2.42
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/cordis.patch.yml +9 -4
- package/lib/client.js +323 -177
- package/package.json +3 -3
package/cordis.patch.yml
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# 任务插件:插入宿主行和本插件自己的插件行。
|
|
2
|
+
#
|
|
3
|
+
# 宿主行必须由子插件插入:宿主是传递依赖,DSH 只把 profile 的直接依赖选进
|
|
4
|
+
# dsh.profile.bundles,所以单独装一个子插件时宿主不会被自动选入,只能靠这行加载。
|
|
5
|
+
# 但宿主行用块式写法时,插件市场会把它算进本插件的 insertedIds,任何第二个
|
|
6
|
+
# dsh-workbench 系插件都会被判「和已安装的插件冲突」并整次回滚;写成流式(flow style)
|
|
7
|
+
# 既能被 js-yaml 和 DSH 正常解析、插入同一行,又不会被市场那套逐行正则数到。
|
|
8
|
+
# 详见 docs/AGENTS规范/03-安装与交付.md。
|
|
1
9
|
- insert:
|
|
2
|
-
- id: workbench
|
|
3
|
-
name: 'dsh-workbench-host'
|
|
4
|
-
config:
|
|
5
|
-
enabled: true
|
|
10
|
+
- { id: workbench, name: 'dsh-workbench-host', config: { enabled: true } }
|
|
6
11
|
- id: workbench-tasks
|
|
7
12
|
name: 'dsh-workbench-tasks'
|
package/lib/client.js
CHANGED
|
@@ -186,13 +186,266 @@ var require_filter_checklist = __commonJS({
|
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
+
// packages/addons/lib/search-picker.cjs
|
|
190
|
+
var require_search_picker = __commonJS({
|
|
191
|
+
"packages/addons/lib/search-picker.cjs"(exports2, module2) {
|
|
192
|
+
"use strict";
|
|
193
|
+
var React = require("react");
|
|
194
|
+
var h = React.createElement;
|
|
195
|
+
var FilterChecklist = require_filter_checklist();
|
|
196
|
+
var DEFAULT_TEXTS = {
|
|
197
|
+
all: "\u5168\u90E8",
|
|
198
|
+
selected: "\u5DF2\u9009",
|
|
199
|
+
clear: "\u6E05\u7A7A",
|
|
200
|
+
searchPlaceholder: "\u641C\u7D22",
|
|
201
|
+
empty: "\u6682\u65E0\u6570\u636E",
|
|
202
|
+
noMatch: "\u6CA1\u6709\u5339\u914D\u9879",
|
|
203
|
+
loading: "\u52A0\u8F7D\u4E2D\u2026",
|
|
204
|
+
noMore: "\u6CA1\u6709\u66F4\u591A"
|
|
205
|
+
};
|
|
206
|
+
function asText(x) {
|
|
207
|
+
return String(x == null ? "" : x).toLowerCase();
|
|
208
|
+
}
|
|
209
|
+
function filterLocal(items, query) {
|
|
210
|
+
var q = String(query || "").trim();
|
|
211
|
+
if (!q) return items;
|
|
212
|
+
var needle = asText(q);
|
|
213
|
+
return items.filter(function(x) {
|
|
214
|
+
return asText(x.name).indexOf(needle) >= 0 || asText(x.meta).indexOf(needle) >= 0;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function useRemoteSource(conf) {
|
|
218
|
+
var RT = conf.React || React;
|
|
219
|
+
var open = conf.open;
|
|
220
|
+
var query = conf.query;
|
|
221
|
+
var fetchPage = conf.fetchPage;
|
|
222
|
+
var pageSize = conf.pageSize;
|
|
223
|
+
var debounce = conf.debounce;
|
|
224
|
+
var dedupe = conf.dedupe;
|
|
225
|
+
var mapPage = conf.mapPage;
|
|
226
|
+
var reloadKey = conf.reloadKey;
|
|
227
|
+
var rowsS = RT.useState([]);
|
|
228
|
+
var totalS = RT.useState(0);
|
|
229
|
+
var pageS = RT.useState(0);
|
|
230
|
+
var moreS = RT.useState(false);
|
|
231
|
+
var loadS = RT.useState(false);
|
|
232
|
+
var seq = RT.useRef ? RT.useRef(0) : { current: 0 };
|
|
233
|
+
function load(q, pageNumber, append) {
|
|
234
|
+
var mine = ++seq.current;
|
|
235
|
+
loadS[1](true);
|
|
236
|
+
return Promise.resolve(fetchPage(q, pageNumber)).then(function(raw) {
|
|
237
|
+
if (mine !== seq.current) return;
|
|
238
|
+
loadS[1](false);
|
|
239
|
+
var next = mapPage ? mapPage(raw, pageNumber) : raw || {};
|
|
240
|
+
var list = next.rows || [];
|
|
241
|
+
rowsS[1](function(prev) {
|
|
242
|
+
if (!append) return list;
|
|
243
|
+
var joined = dedupe === false ? prev.concat(list) : prev.concat(list);
|
|
244
|
+
if (dedupe === false) return joined;
|
|
245
|
+
var seen = {};
|
|
246
|
+
return joined.filter(function(x) {
|
|
247
|
+
var key = String(x.id);
|
|
248
|
+
if (seen[key]) return false;
|
|
249
|
+
seen[key] = true;
|
|
250
|
+
return true;
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
totalS[1](typeof next.total === "number" ? next.total : list.length);
|
|
254
|
+
pageS[1](next.page || pageNumber);
|
|
255
|
+
moreS[1](!!next.hasMore);
|
|
256
|
+
}).catch(function() {
|
|
257
|
+
if (mine === seq.current) loadS[1](false);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
RT.useEffect(
|
|
261
|
+
function() {
|
|
262
|
+
if (!open) return void 0;
|
|
263
|
+
var timer = setTimeout(
|
|
264
|
+
function() {
|
|
265
|
+
load(query, 1, false);
|
|
266
|
+
},
|
|
267
|
+
query ? debounce : 0
|
|
268
|
+
);
|
|
269
|
+
return function() {
|
|
270
|
+
clearTimeout(timer);
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
[open, query, reloadKey]
|
|
274
|
+
);
|
|
275
|
+
return {
|
|
276
|
+
rows: rowsS[0],
|
|
277
|
+
total: totalS[0],
|
|
278
|
+
page: pageS[0],
|
|
279
|
+
hasMore: moreS[0],
|
|
280
|
+
loading: loadS[0],
|
|
281
|
+
loadQuery: load,
|
|
282
|
+
reset: function() {
|
|
283
|
+
seq.current += 1;
|
|
284
|
+
rowsS[1]([]);
|
|
285
|
+
totalS[1](0);
|
|
286
|
+
pageS[1](0);
|
|
287
|
+
moreS[1](false);
|
|
288
|
+
loadS[1](false);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function SearchPicker(props) {
|
|
293
|
+
var RT = props.React || React;
|
|
294
|
+
var texts = Object.assign({}, DEFAULT_TEXTS, props.texts || {});
|
|
295
|
+
var classes = props.classes || {};
|
|
296
|
+
var mode = props.mode === "single" ? "single" : "multi";
|
|
297
|
+
var disabled = props.disabled === true;
|
|
298
|
+
var selected = (props.selected || []).map(String);
|
|
299
|
+
var items = props.items || null;
|
|
300
|
+
var fetchPage = props.fetchPage || null;
|
|
301
|
+
var pageSize = props.pageSize || 20;
|
|
302
|
+
var debounce = props.debounce === void 0 ? 200 : props.debounce;
|
|
303
|
+
var allItems = items || [];
|
|
304
|
+
var openS = RT.useState(false);
|
|
305
|
+
var open = openS[0];
|
|
306
|
+
var queryS = RT.useState("");
|
|
307
|
+
var query = queryS[0];
|
|
308
|
+
var boxRef = RT.useRef ? RT.useRef(null) : { current: null };
|
|
309
|
+
var remote = fetchPage ? useRemoteSource({
|
|
310
|
+
React: RT,
|
|
311
|
+
open,
|
|
312
|
+
query,
|
|
313
|
+
fetchPage,
|
|
314
|
+
pageSize,
|
|
315
|
+
debounce,
|
|
316
|
+
dedupe: props.dedupe,
|
|
317
|
+
mapPage: props.mapPage,
|
|
318
|
+
reloadKey: props.reloadKey
|
|
319
|
+
}) : null;
|
|
320
|
+
var rows = remote ? remote.rows : filterLocal(allItems, query);
|
|
321
|
+
var loading = remote ? remote.loading : false;
|
|
322
|
+
var total = remote ? remote.total : rows.length;
|
|
323
|
+
var hasMore = remote ? remote.hasMore : false;
|
|
324
|
+
RT.useEffect(function() {
|
|
325
|
+
if (!open || typeof document === "undefined") return void 0;
|
|
326
|
+
function onDown(e) {
|
|
327
|
+
var box = boxRef.current;
|
|
328
|
+
if (box && !box.contains(e.target)) openS[1](false);
|
|
329
|
+
}
|
|
330
|
+
function onKey(e) {
|
|
331
|
+
if (e.key === "Escape") openS[1](false);
|
|
332
|
+
}
|
|
333
|
+
document.addEventListener("mousedown", onDown);
|
|
334
|
+
document.addEventListener("keydown", onKey);
|
|
335
|
+
return function() {
|
|
336
|
+
document.removeEventListener("mousedown", onDown);
|
|
337
|
+
document.removeEventListener("keydown", onKey);
|
|
338
|
+
};
|
|
339
|
+
}, [open]);
|
|
340
|
+
function commit(next) {
|
|
341
|
+
if (props.onChange) props.onChange(next);
|
|
342
|
+
}
|
|
343
|
+
function toggle(id) {
|
|
344
|
+
if (disabled) return;
|
|
345
|
+
var key = String(id);
|
|
346
|
+
if (mode === "single") {
|
|
347
|
+
openS[1](false);
|
|
348
|
+
if (props.onPick) props.onPick(key, rowOf(key));
|
|
349
|
+
commit([key]);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
var next = selected.slice();
|
|
353
|
+
var i = next.indexOf(key);
|
|
354
|
+
if (i >= 0) next.splice(i, 1);
|
|
355
|
+
else next.push(key);
|
|
356
|
+
commit(next);
|
|
357
|
+
}
|
|
358
|
+
function rowOf(id) {
|
|
359
|
+
var hit = rows.filter(function(x) {
|
|
360
|
+
return String(x.id) === String(id);
|
|
361
|
+
})[0];
|
|
362
|
+
if (hit) return hit;
|
|
363
|
+
return (allItems || []).filter(function(x) {
|
|
364
|
+
return String(x.id) === String(id);
|
|
365
|
+
})[0] || null;
|
|
366
|
+
}
|
|
367
|
+
var label = props.label || texts.all;
|
|
368
|
+
var caret = props.caret === void 0 ? "\u25BE" : props.caret;
|
|
369
|
+
var count = selected.length;
|
|
370
|
+
var chips = props.renderSelected ? props.renderSelected({ ids: selected, toggle, nameOf: props.nameOf || rowOf, texts }) : null;
|
|
371
|
+
return h(
|
|
372
|
+
"div",
|
|
373
|
+
{ className: classes.root, ref: boxRef },
|
|
374
|
+
h(
|
|
375
|
+
"button",
|
|
376
|
+
{
|
|
377
|
+
type: "button",
|
|
378
|
+
className: classes.btn + (count ? " " + (classes.btnOn || "is-on") : ""),
|
|
379
|
+
"aria-haspopup": "dialog",
|
|
380
|
+
"aria-expanded": open ? "true" : "false",
|
|
381
|
+
disabled,
|
|
382
|
+
onClick: function(e) {
|
|
383
|
+
if (props.stopPropagation) e.stopPropagation();
|
|
384
|
+
openS[1](!open);
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
props.icon ? props.icon : null,
|
|
388
|
+
label + (count ? " \xB7 " + count : ""),
|
|
389
|
+
typeof caret === "function" ? caret : caret
|
|
390
|
+
),
|
|
391
|
+
chips,
|
|
392
|
+
open ? h(
|
|
393
|
+
"div",
|
|
394
|
+
{
|
|
395
|
+
className: classes.menu,
|
|
396
|
+
role: props.menuRole,
|
|
397
|
+
style: props.menuStyle,
|
|
398
|
+
onClick: props.stopPropagation ? function(e) {
|
|
399
|
+
e.stopPropagation();
|
|
400
|
+
} : void 0
|
|
401
|
+
},
|
|
402
|
+
h(FilterChecklist, {
|
|
403
|
+
mode,
|
|
404
|
+
items: rows,
|
|
405
|
+
selected,
|
|
406
|
+
onToggle: toggle,
|
|
407
|
+
onPick: toggle,
|
|
408
|
+
query,
|
|
409
|
+
onQuery: queryS[1],
|
|
410
|
+
title: props.title || label,
|
|
411
|
+
total,
|
|
412
|
+
selectedText: texts.selected,
|
|
413
|
+
clearText: texts.clear,
|
|
414
|
+
onClear: function() {
|
|
415
|
+
commit([]);
|
|
416
|
+
queryS[1]("");
|
|
417
|
+
},
|
|
418
|
+
searchPlaceholder: texts.searchPlaceholder,
|
|
419
|
+
loading,
|
|
420
|
+
hasMore,
|
|
421
|
+
onLoadMore: remote ? function() {
|
|
422
|
+
remote.loadQuery(query, (remote.page || 1) + 1, true);
|
|
423
|
+
} : void 0,
|
|
424
|
+
emptyText: texts.empty,
|
|
425
|
+
noMatchText: texts.noMatch,
|
|
426
|
+
loadingText: texts.loading,
|
|
427
|
+
noMoreText: texts.noMore,
|
|
428
|
+
groupLabel: props.title || label,
|
|
429
|
+
autoFocus: props.autoFocus,
|
|
430
|
+
beforeHead: props.beforeHead || null
|
|
431
|
+
}),
|
|
432
|
+
props.footer || null
|
|
433
|
+
) : null
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
module2.exports = SearchPicker;
|
|
437
|
+
module2.exports.filterLocal = filterLocal;
|
|
438
|
+
module2.exports.DEFAULT_TEXTS = DEFAULT_TEXTS;
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
|
|
189
442
|
// packages/addons/lib/tag-filter.cjs
|
|
190
443
|
var require_tag_filter = __commonJS({
|
|
191
444
|
"packages/addons/lib/tag-filter.cjs"(exports2, module2) {
|
|
192
445
|
"use strict";
|
|
193
446
|
var React = require("react");
|
|
194
447
|
var h = React.createElement;
|
|
195
|
-
var
|
|
448
|
+
var SearchPicker = require_search_picker();
|
|
196
449
|
module2.exports = function createTagFilter(options) {
|
|
197
450
|
var conf = options || {};
|
|
198
451
|
var classes = conf.classes || {};
|
|
@@ -228,99 +481,26 @@ var require_tag_filter = __commonJS({
|
|
|
228
481
|
var ids = props.ids || [];
|
|
229
482
|
var onChange = props.onChange || function() {
|
|
230
483
|
};
|
|
231
|
-
var
|
|
232
|
-
var availS = React.useState(true);
|
|
233
|
-
var openS = React.useState(false);
|
|
234
|
-
var open = openS[0];
|
|
235
|
-
var setOpen = openS[1];
|
|
236
|
-
var queryS = React.useState("");
|
|
237
|
-
var query = queryS[0];
|
|
238
|
-
var setQuery = queryS[1];
|
|
239
|
-
var rowsS = React.useState([]);
|
|
240
|
-
var rows = rowsS[0];
|
|
241
|
-
var setRows = rowsS[1];
|
|
242
|
-
var totalS = React.useState(0);
|
|
243
|
-
var total = totalS[0];
|
|
244
|
-
var setTotal = totalS[1];
|
|
245
|
-
var pageS = React.useState(0);
|
|
246
|
-
var page = pageS[0];
|
|
247
|
-
var setPage = pageS[1];
|
|
248
|
-
var hasMoreS = React.useState(false);
|
|
249
|
-
var hasMore = hasMoreS[0];
|
|
250
|
-
var setHasMore = hasMoreS[1];
|
|
251
|
-
var loadingS = React.useState(false);
|
|
252
|
-
var loading = loadingS[0];
|
|
253
|
-
var setLoading = loadingS[1];
|
|
484
|
+
var tx = text(props);
|
|
254
485
|
var namesS = React.useState({});
|
|
255
486
|
var names = namesS[0];
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
var next = mapPage(r.result || {}, pageNumber);
|
|
267
|
-
setRows(function(prev) {
|
|
268
|
-
if (!append) return next.rows;
|
|
269
|
-
if (!dedupe) return prev.concat(next.rows);
|
|
270
|
-
var seen = {};
|
|
271
|
-
var out = [];
|
|
272
|
-
prev.concat(next.rows).forEach(function(x) {
|
|
273
|
-
var key = String(x.id);
|
|
274
|
-
if (seen[key]) return;
|
|
275
|
-
seen[key] = true;
|
|
276
|
-
out.push(x);
|
|
277
|
-
});
|
|
278
|
-
return out;
|
|
279
|
-
});
|
|
280
|
-
setTotal(next.total);
|
|
281
|
-
setPage(next.page);
|
|
282
|
-
setHasMore(next.hasMore);
|
|
283
|
-
setNames(function(prev) {
|
|
284
|
-
var map = Object.assign({}, prev);
|
|
285
|
-
next.rows.forEach(function(x) {
|
|
286
|
-
map[String(x.id)] = x.name;
|
|
287
|
-
});
|
|
288
|
-
return map;
|
|
289
|
-
});
|
|
290
|
-
}).catch(function() {
|
|
291
|
-
if (mine === seq.current) setLoading(false);
|
|
292
|
-
});
|
|
293
|
-
},
|
|
294
|
-
[api]
|
|
295
|
-
);
|
|
296
|
-
React.useEffect(
|
|
297
|
-
function() {
|
|
298
|
-
if (!open) return void 0;
|
|
299
|
-
var timer = setTimeout(
|
|
300
|
-
function() {
|
|
301
|
-
load(query, 1, false);
|
|
302
|
-
},
|
|
303
|
-
query ? debounce : 0
|
|
304
|
-
);
|
|
305
|
-
return function() {
|
|
306
|
-
clearTimeout(timer);
|
|
307
|
-
};
|
|
308
|
-
},
|
|
309
|
-
[open, query, load, props.reloadKey]
|
|
310
|
-
);
|
|
311
|
-
React.useEffect(
|
|
312
|
-
function() {
|
|
313
|
-
if (!conf.probe) return;
|
|
314
|
-
api.call(conf.probe.action || conf.action, conf.probe.args || {}).then(function(r) {
|
|
315
|
-
if (r && r.ok) availS[1](!!(conf.probe.available && conf.probe.available(r.result)));
|
|
316
|
-
}).catch(function() {
|
|
487
|
+
function mergeNames(rows) {
|
|
488
|
+
if (!rows || !rows.length) return;
|
|
489
|
+
namesS[1](function(prev) {
|
|
490
|
+
var next = Object.assign({}, prev);
|
|
491
|
+
var changed = false;
|
|
492
|
+
rows.forEach(function(x) {
|
|
493
|
+
if (next[String(x.id)] !== x.name) {
|
|
494
|
+
next[String(x.id)] = x.name;
|
|
495
|
+
changed = true;
|
|
496
|
+
}
|
|
317
497
|
});
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
498
|
+
return changed ? next : prev;
|
|
499
|
+
});
|
|
500
|
+
}
|
|
321
501
|
React.useEffect(
|
|
322
502
|
function() {
|
|
323
|
-
if (!
|
|
503
|
+
if (!ids.length || !conf.names) return;
|
|
324
504
|
var wanted = ids.filter(function(id) {
|
|
325
505
|
return !names[String(id)];
|
|
326
506
|
});
|
|
@@ -328,99 +508,65 @@ var require_tag_filter = __commonJS({
|
|
|
328
508
|
var args = conf.names.args ? conf.names.args(wanted) : { ids: wanted };
|
|
329
509
|
api.call(conf.names.action, args).then(function(r) {
|
|
330
510
|
if (!r || !r.ok) return;
|
|
331
|
-
|
|
332
|
-
(r.result && r.result.records || []).forEach(function(x) {
|
|
333
|
-
map[String(x.id)] = x.name;
|
|
334
|
-
});
|
|
335
|
-
if (!Object.keys(map).length) return;
|
|
336
|
-
setNames(function(prev) {
|
|
337
|
-
return Object.assign({}, prev, map);
|
|
338
|
-
});
|
|
511
|
+
mergeNames(r.result && r.result.records || []);
|
|
339
512
|
}).catch(function() {
|
|
340
513
|
});
|
|
341
514
|
},
|
|
342
|
-
[
|
|
515
|
+
[ids.join(",")]
|
|
343
516
|
);
|
|
344
|
-
|
|
345
|
-
function() {
|
|
346
|
-
if (!
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
[open]
|
|
356
|
-
);
|
|
357
|
-
function toggle(id) {
|
|
358
|
-
var key = String(id);
|
|
359
|
-
var next = ids.slice();
|
|
360
|
-
var i = next.indexOf(key);
|
|
361
|
-
if (i >= 0) next.splice(i, 1);
|
|
362
|
-
else next.push(key);
|
|
363
|
-
onChange(next);
|
|
517
|
+
function fetchPage(q, pageNumber) {
|
|
518
|
+
return api.call(conf.action, { text: q || "", pageNumber, pageSize }).then(function(r) {
|
|
519
|
+
if (!r || !r.ok) return { rows: [], total: 0, page: pageNumber, hasMore: false };
|
|
520
|
+
var next = mapPage(r.result || {}, pageNumber);
|
|
521
|
+
mergeNames(next.rows);
|
|
522
|
+
return { rows: items(next.rows), total: next.total, page: next.page, hasMore: next.hasMore };
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
function nameOf(id) {
|
|
526
|
+
return names[String(id)] || String(id).slice(0, 6);
|
|
364
527
|
}
|
|
365
528
|
if (!enabled(props)) return null;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
"
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
onClear: function() {
|
|
408
|
-
onChange([]);
|
|
409
|
-
setQuery("");
|
|
410
|
-
},
|
|
411
|
-
searchPlaceholder: t.searchPlaceholder,
|
|
412
|
-
loading,
|
|
413
|
-
hasMore,
|
|
414
|
-
onLoadMore: function() {
|
|
415
|
-
load(query, (page || 1) + 1, true);
|
|
416
|
-
},
|
|
417
|
-
emptyText: t.empty,
|
|
418
|
-
noMatchText: t.noMatch,
|
|
419
|
-
loadingText: t.loading,
|
|
420
|
-
noMoreText: t.noMore
|
|
421
|
-
})
|
|
422
|
-
) : null
|
|
423
|
-
);
|
|
529
|
+
return h(SearchPicker, {
|
|
530
|
+
h,
|
|
531
|
+
React,
|
|
532
|
+
mode: "multi",
|
|
533
|
+
label: tx.label,
|
|
534
|
+
title: tx.all,
|
|
535
|
+
fetchPage,
|
|
536
|
+
pageSize,
|
|
537
|
+
debounce,
|
|
538
|
+
dedupe,
|
|
539
|
+
classes,
|
|
540
|
+
menuRole: conf.menuRole,
|
|
541
|
+
menuStyle: conf.menuStyle,
|
|
542
|
+
stopPropagation: conf.stopPropagation,
|
|
543
|
+
reloadKey: props.reloadKey,
|
|
544
|
+
texts: {
|
|
545
|
+
all: tx.all,
|
|
546
|
+
selected: tx.selected,
|
|
547
|
+
clear: tx.clear,
|
|
548
|
+
searchPlaceholder: tx.searchPlaceholder,
|
|
549
|
+
empty: tx.empty,
|
|
550
|
+
noMatch: tx.noMatch,
|
|
551
|
+
loading: tx.loading,
|
|
552
|
+
noMore: tx.noMore
|
|
553
|
+
},
|
|
554
|
+
icon: icon(props, "tag", 13),
|
|
555
|
+
caret: typeof caret === "function" ? caret(props) : caret,
|
|
556
|
+
selected: ids,
|
|
557
|
+
onChange,
|
|
558
|
+
nameOf,
|
|
559
|
+
renderSelected: renderSelected ? function(ctx) {
|
|
560
|
+
return renderSelected({
|
|
561
|
+
ids: ctx.ids,
|
|
562
|
+
names,
|
|
563
|
+
toggle: ctx.toggle,
|
|
564
|
+
text: tx,
|
|
565
|
+
classes,
|
|
566
|
+
h
|
|
567
|
+
});
|
|
568
|
+
} : null
|
|
569
|
+
});
|
|
424
570
|
};
|
|
425
571
|
};
|
|
426
572
|
}
|
|
@@ -14724,7 +14870,7 @@ var require_timeline_view = __commonJS({
|
|
|
14724
14870
|
var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configView, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
|
|
14725
14871
|
host.registerAddon({
|
|
14726
14872
|
id: "wb-addon-tasks",
|
|
14727
|
-
version: "5.2.
|
|
14873
|
+
version: "5.2.42",
|
|
14728
14874
|
icon: ICONS["list-checks"],
|
|
14729
14875
|
// 贡献声明写在 registerAddon 里:卸载任务插件时宿主按 addonId 一起撤销,
|
|
14730
14876
|
// 不会在邮件里留一个渲染即报错的孤儿按钮。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-tasks",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.42",
|
|
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.42",
|
|
21
21
|
"minShell": "0.8.4",
|
|
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.
|
|
104
|
+
"dsh-workbench-host": "^0.10.0"
|
|
105
105
|
},
|
|
106
106
|
"dsh": {
|
|
107
107
|
"bundle": {
|