@visactor/vtable-gantt 1.22.2 → 1.22.3
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/cjs/data/DataSource.js +7 -7
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-gantt.js +91 -30
- package/dist/vtable-gantt.min.js +2 -2
- package/es/data/DataSource.js +7 -7
- package/es/data/DataSource.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/es/data/DataSource.js
CHANGED
|
@@ -34,25 +34,25 @@ export class DataSource {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
adjustOrder(source_index, source_sub_task_index, target_index, target_sub_task_index) {
|
|
37
|
-
var _a, _b, _c, _d;
|
|
38
|
-
if (this._gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Arrange && this._gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Compact || source_index !== target_index) if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
38
|
+
if ((this._gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Arrange && this._gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Compact || source_index !== target_index) && !(target_index < 0 || target_sub_task_index < 0)) if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
|
|
39
39
|
if (isValid(source_sub_task_index) && isValid(target_sub_task_index) && isValid(source_index) && isValid(target_index)) {
|
|
40
40
|
const sub_task_record = this.records[source_index].children[source_sub_task_index];
|
|
41
|
-
this.records[source_index].children.splice(source_sub_task_index, 1), this.records[target_index].children || (this.records[target_index].children = []),
|
|
41
|
+
this.records[source_index].children.splice(source_sub_task_index, 1), (null === (_a = this.records[target_index]) || void 0 === _a ? void 0 : _a.children) || (this.records[target_index].children = []),
|
|
42
42
|
this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);
|
|
43
43
|
}
|
|
44
|
-
null === (
|
|
44
|
+
null === (_c = null === (_b = this.records[target_index]) || void 0 === _b ? void 0 : _b.children) || void 0 === _c || _c.sort(((a, b) => createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() - createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()));
|
|
45
45
|
} else if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {
|
|
46
46
|
if (isValid(source_sub_task_index) && isValid(target_sub_task_index) && isValid(source_index) && isValid(target_index)) {
|
|
47
47
|
this.records[source_index].type, TaskType.PROJECT;
|
|
48
48
|
const targetIsProject = this.records[target_index].type === TaskType.PROJECT, sub_task_record = this.records[source_index].children[source_sub_task_index];
|
|
49
|
-
this.records[source_index].children.splice(source_sub_task_index, 1), this.records[target_index].children || (this.records[target_index].children = []),
|
|
49
|
+
this.records[source_index].children.splice(source_sub_task_index, 1), (null === (_d = this.records[target_index]) || void 0 === _d ? void 0 : _d.children) || (this.records[target_index].children = []),
|
|
50
50
|
this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record),
|
|
51
|
-
targetIsProject && (null === (
|
|
51
|
+
targetIsProject && (null === (_f = null === (_e = this.records[target_index]) || void 0 === _e ? void 0 : _e.children) || void 0 === _f || _f.sort(((a, b) => createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() - createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime())));
|
|
52
52
|
}
|
|
53
53
|
} else if (isValid(source_sub_task_index) && isValid(target_sub_task_index) && isValid(source_index) && isValid(target_index)) {
|
|
54
54
|
const sub_task_record = this.records[source_index].children[source_sub_task_index];
|
|
55
|
-
this.records[source_index].children.splice(source_sub_task_index, 1), this.records[target_index].children || (this.records[target_index].children = []),
|
|
55
|
+
this.records[source_index].children.splice(source_sub_task_index, 1), (null === (_g = this.records[target_index]) || void 0 === _g ? void 0 : _g.children) || (this.records[target_index].children = []),
|
|
56
56
|
this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/data/DataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,OAAO,UAAU;IAGrB,YAAY,MAAa;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IACD,cAAc;QACZ,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QACjD,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QAEjD,IAAI,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACtC,IAAI,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACtC,IACE,CAAC,WAAW;YACV,WAAW;YACX,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,gBAAgB;YAC1E,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,KAAK,aAAa,CAAC,iBAAiB,CAAC;YAC9E,IAAI,CAAC,OAAO,CAAC,MAAM,EACnB;YACA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM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,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE;4BAC3E,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,CAC5E,CAAC;oBACJ,CAAC,CAAC,CAAC;iBACJ;aACF;SACF;aAAM;YACL,IACE,OAAO,CAAC,qBAAqB,CAAC;gBAC9B,OAAO,CAAC,qBAAqB,CAAC;gBAC9B,OAAO,CAAC,YAAY,CAAC;gBACrB,OAAO,CAAC,YAAY,CAAC,EACrB;gBACA,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;gBACnF,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;gBACrE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;oBACxC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC;iBAC1C;gBACD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;aACvF;SACF;IACH,CAAC;IACD,UAAU,CAAC,OAAc;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;CACF","file":"DataSource.js","sourcesContent":["import type { Gantt } from '../Gantt';\nimport { createDateAtMidnight, getEndDateByTimeUnit, getStartDateByTimeUnit } from '../tools/util';\nimport { TasksShowMode, TaskType } from '../ts-types/gantt-engine';\nimport { isValid } from '@visactor/vutils';\n\nexport class DataSource {\n records: any[];\n _gantt: Gantt;\n constructor(_gantt: Gantt) {\n this._gantt = _gantt;\n this.records = _gantt.records;\n this.processRecords();\n }\n processRecords() {\n const needMinDate = !this._gantt.options.minDate;\n const needMaxDate = !this._gantt.options.maxDate;\n\n let minDate = Number.MAX_SAFE_INTEGER;\n let maxDate = Number.MIN_SAFE_INTEGER;\n if (\n (needMinDate ||\n needMaxDate ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact) &&\n this.records.length\n ) {\n for (let i = 0; i < this.records.length; i++) {\n const record = this.records[i];\n if (needMinDate && record[this._gantt.parsedOptions.startDateField]) {\n const recordMinDate = createDateAtMidnight(record[this._gantt.parsedOptions.startDateField]);\n minDate = Math.min(minDate, recordMinDate.getTime());\n }\n if (needMaxDate && record[this._gantt.parsedOptions.endDateField]) {\n const recordMaxDate = createDateAtMidnight(record[this._gantt.parsedOptions.endDateField]);\n maxDate = Math.max(maxDate, recordMaxDate.getTime());\n }\n\n if (\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n // 将子任务按开始时间升序排列\n record.children &&\n record.children.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n }\n }\n\n const { unit: minTimeUnit, startOfWeek, step } = this._gantt.parsedOptions.reverseSortedTimelineScales[0];\n if (needMinDate) {\n this._gantt.parsedOptions.minDate = getStartDateByTimeUnit(new Date(minDate), minTimeUnit, startOfWeek);\n this._gantt.parsedOptions._minDateTime = this._gantt.parsedOptions.minDate.getTime();\n }\n\n // 提供了最大值,没有提供最小值,因为最大值依赖最小值,所以应该重新计算\n if (needMinDate && !needMaxDate) {\n this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(\n this._gantt.parsedOptions.minDate,\n new Date(this._gantt.options.maxDate),\n minTimeUnit,\n step\n );\n this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();\n }\n\n if (needMaxDate) {\n this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(\n this._gantt.parsedOptions.minDate,\n new Date(maxDate),\n minTimeUnit,\n step\n );\n this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();\n }\n }\n }\n adjustOrder(\n source_index: number,\n source_sub_task_index: number,\n target_index: number,\n target_sub_task_index: number\n ) {\n if (\n (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact) &&\n source_index === target_index\n ) {\n return;\n }\n if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n if (!this.records[target_index].children) {\n this.records[target_index].children = [];\n }\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n }\n this.records[target_index]?.children?.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n } else if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n // For Project_Sub_Tasks_Inline mode, we handle reordering based on whether tasks are projects\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n // Check if source and target are projects\n const sourceIsProject = this.records[source_index].type === TaskType.PROJECT;\n const targetIsProject = this.records[target_index].type === TaskType.PROJECT;\n\n // Moving subtask from a project to another project or normal task\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n\n if (!this.records[target_index].children) {\n this.records[target_index].children = [];\n }\n\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n\n // If target is a project, sort children by date\n if (targetIsProject) {\n this.records[target_index]?.children?.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n }\n }\n } else {\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n if (!this.records[target_index].children) {\n this.records[target_index].children = [];\n }\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n }\n }\n }\n setRecords(records: any[]) {\n this.records = records;\n this.processRecords();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/data/DataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,OAAO,UAAU;IAGrB,YAAY,MAAa;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IACD,cAAc;QACZ,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QACjD,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QAEjD,IAAI,OAAO,GAAG,MAAM,CAAC,gBAAgB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C;iBAC1C;gBACD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;aACvF;SACF;IACH,CAAC;IACD,UAAU,CAAC,OAAc;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;CACF","file":"DataSource.js","sourcesContent":["import type { Gantt } from '../Gantt';\nimport { createDateAtMidnight, getEndDateByTimeUnit, getStartDateByTimeUnit } from '../tools/util';\nimport { TasksShowMode, TaskType } from '../ts-types/gantt-engine';\nimport { isValid } from '@visactor/vutils';\n\nexport class DataSource {\n records: any[];\n _gantt: Gantt;\n constructor(_gantt: Gantt) {\n this._gantt = _gantt;\n this.records = _gantt.records;\n this.processRecords();\n }\n processRecords() {\n const needMinDate = !this._gantt.options.minDate;\n const needMaxDate = !this._gantt.options.maxDate;\n\n let minDate = Number.MAX_SAFE_INTEGER;\n let maxDate = Number.MIN_SAFE_INTEGER;\n if (\n (needMinDate ||\n needMaxDate ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact) &&\n this.records.length\n ) {\n for (let i = 0; i < this.records.length; i++) {\n const record = this.records[i];\n if (needMinDate && record[this._gantt.parsedOptions.startDateField]) {\n const recordMinDate = createDateAtMidnight(record[this._gantt.parsedOptions.startDateField]);\n minDate = Math.min(minDate, recordMinDate.getTime());\n }\n if (needMaxDate && record[this._gantt.parsedOptions.endDateField]) {\n const recordMaxDate = createDateAtMidnight(record[this._gantt.parsedOptions.endDateField]);\n maxDate = Math.max(maxDate, recordMaxDate.getTime());\n }\n\n if (\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n // 将子任务按开始时间升序排列\n record.children &&\n record.children.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n }\n }\n\n const { unit: minTimeUnit, startOfWeek, step } = this._gantt.parsedOptions.reverseSortedTimelineScales[0];\n if (needMinDate) {\n this._gantt.parsedOptions.minDate = getStartDateByTimeUnit(new Date(minDate), minTimeUnit, startOfWeek);\n this._gantt.parsedOptions._minDateTime = this._gantt.parsedOptions.minDate.getTime();\n }\n\n // 提供了最大值,没有提供最小值,因为最大值依赖最小值,所以应该重新计算\n if (needMinDate && !needMaxDate) {\n this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(\n this._gantt.parsedOptions.minDate,\n new Date(this._gantt.options.maxDate),\n minTimeUnit,\n step\n );\n this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();\n }\n\n if (needMaxDate) {\n this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(\n this._gantt.parsedOptions.minDate,\n new Date(maxDate),\n minTimeUnit,\n step\n );\n this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();\n }\n }\n }\n adjustOrder(\n source_index: number,\n source_sub_task_index: number,\n target_index: number,\n target_sub_task_index: number\n ) {\n if (\n (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact) &&\n source_index === target_index\n ) {\n return;\n }\n // Excluding scenarios where the target value exceeds the boundary\n if (target_index < 0 || target_sub_task_index < 0) {\n return;\n }\n\n if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n\n if (!this.records[target_index]?.children) {\n this.records[target_index].children = [];\n }\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n }\n this.records[target_index]?.children?.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n } else if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n // For Project_Sub_Tasks_Inline mode, we handle reordering based on whether tasks are projects\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n // Check if source and target are projects\n const sourceIsProject = this.records[source_index].type === TaskType.PROJECT;\n const targetIsProject = this.records[target_index].type === TaskType.PROJECT;\n\n // Moving subtask from a project to another project or normal task\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n if (!this.records[target_index]?.children) {\n this.records[target_index].children = [];\n }\n\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n\n // If target is a project, sort children by date\n if (targetIsProject) {\n this.records[target_index]?.children?.sort((a: any, b: any) => {\n return (\n createDateAtMidnight(a[this._gantt.parsedOptions.startDateField]).getTime() -\n createDateAtMidnight(b[this._gantt.parsedOptions.startDateField]).getTime()\n );\n });\n }\n }\n } else {\n if (\n isValid(source_sub_task_index) &&\n isValid(target_sub_task_index) &&\n isValid(source_index) &&\n isValid(target_index)\n ) {\n const sub_task_record = this.records[source_index].children[source_sub_task_index];\n this.records[source_index].children.splice(source_sub_task_index, 1);\n if (!this.records[target_index]?.children) {\n this.records[target_index].children = [];\n }\n this.records[target_index].children.splice(target_sub_task_index, 0, sub_task_record);\n }\n }\n }\n setRecords(records: any[]) {\n this.records = records;\n this.processRecords();\n }\n}\n"]}
|
package/es/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.22.
|
|
9
|
+
export declare const version = "1.22.3";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAcpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EACL,KAAK,EAEL,KAAK,EAYL,KAAK,EACL,OAAO,EACP,MAAM,EACN,OAAO,EACR,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAcpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EACL,KAAK,EAEL,KAAK,EAYL,KAAK,EACL,OAAO,EACP,MAAM,EACN,OAAO,EACR,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.3\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vtable-gantt",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.3",
|
|
4
4
|
"description": "canvas table width high performance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vtable-gantt",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@visactor/vscale": "~0.18.1",
|
|
42
42
|
"@visactor/vdataset": "~0.18.1",
|
|
43
43
|
"cssfontparser": "^1.2.1",
|
|
44
|
-
"@visactor/vtable": "1.22.
|
|
45
|
-
"@visactor/vtable-editors": "1.22.
|
|
44
|
+
"@visactor/vtable": "1.22.3",
|
|
45
|
+
"@visactor/vtable-editors": "1.22.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"cross-env": "^7.0.3",
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
"d3-hierarchy": "^3.1.1",
|
|
94
94
|
"@resvg/resvg-js": "^2.5.0",
|
|
95
95
|
"pikaday": "1.8.2",
|
|
96
|
+
"@internal/eslint-config": "0.0.1",
|
|
96
97
|
"@internal/bundler": "0.0.1",
|
|
97
|
-
"@internal/ts-config": "0.0.1"
|
|
98
|
-
"@internal/eslint-config": "0.0.1"
|
|
98
|
+
"@internal/ts-config": "0.0.1"
|
|
99
99
|
},
|
|
100
100
|
"unpkg": "latest",
|
|
101
101
|
"unpkgFiles": [
|