@xpyjs/gantt-core 0.0.1-alpha.4 → 0.0.1-alpha.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xpyjs/gantt-core",
3
3
  "private": false,
4
- "version": "0.0.1-alpha.4",
4
+ "version": "0.0.1-alpha.5",
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",
@@ -74,4 +74,5 @@ export declare class Task {
74
74
  getEmitData(): EmitData;
75
75
  getAllChildren(): Task[];
76
76
  isMilestone(): boolean;
77
+ isSummary(): boolean;
77
78
  }
@@ -50,6 +50,7 @@ export declare class LinkGroup {
50
50
  */
51
51
  private calculateLinks;
52
52
  private createId;
53
+ private getPoints;
53
54
  /** 生成 FS 连线 */
54
55
  private createFS;
55
56
  /** 生成 FF 连线 */
@@ -63,6 +63,18 @@ export interface IGanttOptions {
63
63
  key: string;
64
64
  /** 是否展示关联线。不支持单独配置 */
65
65
  show: boolean;
66
+ /** 移动相关设置 */
67
+ move: {
68
+ /**
69
+ * 是否允许移动连线到新节点。
70
+ *
71
+ * @default false
72
+ *
73
+ * @description 开启时,所有连线将按照 from 与 to 属性规则允许移动
74
+ * @description 需要注意的是,开启移动后,需要主动添加对应 'update:link' 事件,否则会导致显示异常
75
+ */
76
+ enabled: boolean;
77
+ };
66
78
  /** 创建相关设置 */
67
79
  create: {
68
80
  /**
@@ -387,6 +399,34 @@ export interface IGanttOptions {
387
399
  };
388
400
  };
389
401
 
402
+ /** 汇总集合配置 */
403
+ summary: {
404
+ /**
405
+ * 是否启用汇总集合
406
+ *
407
+ * @default false
408
+ *
409
+ * @description 启用后,所有标记为汇总集合的任务将会被特殊处理。
410
+ */
411
+ show: boolean;
412
+ /** 汇总集合的颜色。默认与 bar 颜色保持一致 */
413
+ color?: string | ((row: EmitData) => string | undefined);
414
+ /** 移动相关配置 */
415
+ move: {
416
+ /** 是否启用移动。默认情况,汇总是不允许主动移动的 */
417
+ enabled: boolean;
418
+ };
419
+ /**
420
+ * 展示模式
421
+ *
422
+ * @default 'expand'
423
+ *
424
+ * - 'always' 永远展示为汇总集合形式
425
+ * - 'expand' 展开时展示为汇总集合形式,当任务收起后,展示为普通类型
426
+ */
427
+ mode: "always" | "expand"
428
+ };
429
+
390
430
  /** 主色调。默认 #eca710 */
391
431
  primaryColor: string;
392
432