@xpyjs/gantt-core 0.0.1-rc.2 → 0.0.1-rc.4
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/dist/x-gantt.js +982 -932
- package/dist/x-gantt.umd.cjs +2 -2
- package/package.json +1 -1
- package/types/XGantt.d.ts +11 -0
- package/types/store/DataManager.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpyjs/gantt-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.1-rc.
|
|
4
|
+
"version": "0.0.1-rc.4",
|
|
5
5
|
"description": "A powerful and flexible Gantt chart component library for modern web applications with TypeScript support",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/x-gantt.umd.cjs",
|
package/types/XGantt.d.ts
CHANGED
|
@@ -339,4 +339,15 @@ export declare class XGantt {
|
|
|
339
339
|
* 获取当前数据量总数。该数量为所有数据展开后的数据条数
|
|
340
340
|
*/
|
|
341
341
|
getDataSize(): number;
|
|
342
|
+
/**
|
|
343
|
+
* 移除指定 ID 的数据。该操作会直接修改当前数据源,并且不可逆,请谨慎使用
|
|
344
|
+
* @param id 数据 ID
|
|
345
|
+
* @returns 是否成功移除
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```typescript
|
|
349
|
+
* const success = gantt.removeDataById('task-1');
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
removeDataById(id: string): boolean;
|
|
342
353
|
}
|
|
@@ -58,10 +58,16 @@ export declare class DataManager {
|
|
|
58
58
|
* 获取所有任务
|
|
59
59
|
*/
|
|
60
60
|
getTasks(asTree?: boolean): Task[];
|
|
61
|
+
/** 获取数据规模 */
|
|
62
|
+
getDataSize(): number;
|
|
61
63
|
/**
|
|
62
64
|
* 通过 ID 获取任务
|
|
63
65
|
*/
|
|
64
66
|
getTaskById(id: string): Task | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* 删除某个任务数据
|
|
69
|
+
*/
|
|
70
|
+
deleteTaskById(id: string): boolean;
|
|
65
71
|
/**
|
|
66
72
|
* 移动任务位置
|
|
67
73
|
*/
|