@visactor/vtable-gantt 1.15.2-alpha.2 → 1.15.2
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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/task-creation-button.js +2 -1
- package/cjs/state/gantt-table-sync.js +0 -1
- package/cjs/tools/debounce.js +2 -1
- package/cjs/tools/inertia.js +1 -2
- package/dist/vtable-gantt.js +47 -27
- package/dist/vtable-gantt.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/task-creation-button.js +2 -1
- package/es/state/gantt-table-sync.js +1 -2
- package/es/tools/debounce.js +2 -1
- package/es/tools/inertia.js +1 -2
- package/package.json +6 -6
package/cjs/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
|
|
|
5
5
|
import * as tools from './tools';
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
|
-
export declare const version = "1.15.2
|
|
8
|
+
export declare const version = "1.15.2";
|
|
9
9
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,QAAQ,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';\nexport const version = \"1.15.2\";\n/**\n * @namespace VTable\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};\n"]}
|
|
@@ -84,7 +84,6 @@ function _syncTableSize(gantt) {
|
|
|
84
84
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
//# sourceMappingURL=gantt-table-sync.js.map
|
|
88
87
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
89
88
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
90
89
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
package/cjs/tools/debounce.js
CHANGED
package/cjs/tools/inertia.js
CHANGED
package/dist/vtable-gantt.js
CHANGED
|
@@ -51332,7 +51332,7 @@
|
|
|
51332
51332
|
constructor(container) {
|
|
51333
51333
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51334
51334
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
51335
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.15.2
|
|
51335
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.15.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
51336
51336
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
51337
51337
|
const {
|
|
51338
51338
|
frozenColCount = 0,
|
|
@@ -58205,7 +58205,7 @@
|
|
|
58205
58205
|
width: 100,
|
|
58206
58206
|
height: 100
|
|
58207
58207
|
}
|
|
58208
|
-
}, this.isReleased = !1, this.table = table,
|
|
58208
|
+
}, this.isReleased = !1, this.table = table, this._emptyTipOption = Object.assign(this._emptyTipOption, !0 === emptyTipOption ? {} : emptyTipOption), isValid$3(this._emptyTipOption.displayMode) || (this.table.isListTable() ? this._emptyTipOption.displayMode = "basedOnTable" : this._emptyTipOption.displayMode = "basedOnContainer"), this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());
|
|
58209
58209
|
}
|
|
58210
58210
|
_createOrUpdateEmptyTipComponent(attrs) {
|
|
58211
58211
|
if (this._emptyTipComponent) isEqual(attrs, this._cacheAttrs) || this._emptyTipComponent.setAttributes(attrs);else {
|
|
@@ -60398,22 +60398,42 @@
|
|
|
60398
60398
|
}
|
|
60399
60399
|
|
|
60400
60400
|
function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
|
|
60401
|
-
var _a, _b, _c, _d, _e
|
|
60402
|
-
|
|
60403
|
-
|
|
60404
|
-
|
|
60405
|
-
|
|
60406
|
-
|
|
60407
|
-
|
|
60408
|
-
|
|
60409
|
-
|
|
60410
|
-
|
|
60411
|
-
row:
|
|
60412
|
-
|
|
60413
|
-
|
|
60414
|
-
|
|
60415
|
-
|
|
60416
|
-
|
|
60401
|
+
var _a, _b, _c, _d, _e;
|
|
60402
|
+
if (progressBarDefine.dependField) {
|
|
60403
|
+
const dependField = getOrApply(progressBarDefine.dependField, {
|
|
60404
|
+
col: col,
|
|
60405
|
+
row: row,
|
|
60406
|
+
table: table,
|
|
60407
|
+
value: value,
|
|
60408
|
+
dataValue: dataValue,
|
|
60409
|
+
cellHeaderPaths: void 0
|
|
60410
|
+
});
|
|
60411
|
+
dataValue = null !== (_b = null === (_a = table.getCellOriginRecord(col, row)) || void 0 === _a ? void 0 : _a[dependField]) && void 0 !== _b ? _b : dataValue;
|
|
60412
|
+
}
|
|
60413
|
+
const barType = null !== (_c = getOrApply(progressBarDefine.barType, {
|
|
60414
|
+
col: col,
|
|
60415
|
+
row: row,
|
|
60416
|
+
table: table,
|
|
60417
|
+
value: value,
|
|
60418
|
+
dataValue: dataValue,
|
|
60419
|
+
cellHeaderPaths: void 0
|
|
60420
|
+
})) && void 0 !== _c ? _c : "default",
|
|
60421
|
+
min = null !== (_d = getOrApply(progressBarDefine.min, {
|
|
60422
|
+
col: col,
|
|
60423
|
+
row: row,
|
|
60424
|
+
table: table,
|
|
60425
|
+
value: value,
|
|
60426
|
+
dataValue: dataValue,
|
|
60427
|
+
cellHeaderPaths: void 0
|
|
60428
|
+
})) && void 0 !== _d ? _d : 0,
|
|
60429
|
+
max = null !== (_e = getOrApply(progressBarDefine.max, {
|
|
60430
|
+
col: col,
|
|
60431
|
+
row: row,
|
|
60432
|
+
table: table,
|
|
60433
|
+
value: value,
|
|
60434
|
+
dataValue: dataValue,
|
|
60435
|
+
cellHeaderPaths: void 0
|
|
60436
|
+
})) && void 0 !== _e ? _e : min + 100;
|
|
60417
60437
|
let height = 0;
|
|
60418
60438
|
height = range ? table.getRowsHeight(range.start.row, range.end.row) : table.getRowHeight(row);
|
|
60419
60439
|
let contentWidth = width,
|
|
@@ -60475,8 +60495,8 @@
|
|
|
60475
60495
|
str.endsWith(svalue, "%") && (svalue = svalue.substr(0, svalue.length - 1));
|
|
60476
60496
|
const num = Number(svalue);
|
|
60477
60497
|
if (isNaN(num)) return percentCompleteBarGroup;
|
|
60478
|
-
if ("default" === (null
|
|
60479
|
-
const percentile = num <
|
|
60498
|
+
if ("default" === (null != barType ? barType : "default")) {
|
|
60499
|
+
const percentile = num < min ? 0 : num > max ? 1 : (num - min) / (max - min),
|
|
60480
60500
|
barMaxWidth = contentWidth,
|
|
60481
60501
|
barTop = top + contentHeight - barHeight - barBottom;
|
|
60482
60502
|
let barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
|
|
@@ -60518,9 +60538,9 @@
|
|
|
60518
60538
|
fill: fillColor
|
|
60519
60539
|
});
|
|
60520
60540
|
percentCompleteBarGroup.addChild(barMain);
|
|
60521
|
-
} else if ("negative" ===
|
|
60522
|
-
const negativeRange =
|
|
60523
|
-
positiveRange =
|
|
60541
|
+
} else if ("negative" === barType) {
|
|
60542
|
+
const negativeRange = min < 0 ? -min : 0,
|
|
60543
|
+
positiveRange = max > 0 ? max : 0,
|
|
60524
60544
|
negativeFactor = negativeRange / (negativeRange + positiveRange),
|
|
60525
60545
|
positiveFactor = 1 - negativeFactor,
|
|
60526
60546
|
positiveRate = num > 0 ? num / positiveRange : 0,
|
|
@@ -60693,9 +60713,9 @@
|
|
|
60693
60713
|
});
|
|
60694
60714
|
percentCompleteBarGroup.addChild(barMark);
|
|
60695
60715
|
}
|
|
60696
|
-
} else if ("negative_no_axis" ===
|
|
60697
|
-
const _negativeRange =
|
|
60698
|
-
_positiveRange =
|
|
60716
|
+
} else if ("negative_no_axis" === barType) {
|
|
60717
|
+
const _negativeRange = min < 0 ? -min : 0,
|
|
60718
|
+
_positiveRange = max > 0 ? max : 0,
|
|
60699
60719
|
range = Math.max(_negativeRange, _positiveRange),
|
|
60700
60720
|
percentile = 0 === range ? 0 : Math.abs(num) / range,
|
|
60701
60721
|
barMaxWidth = contentWidth;
|
|
@@ -63822,7 +63842,7 @@
|
|
|
63822
63842
|
themes: themes$1
|
|
63823
63843
|
});
|
|
63824
63844
|
|
|
63825
|
-
const version = "1.15.2
|
|
63845
|
+
const version = "1.15.2";
|
|
63826
63846
|
|
|
63827
63847
|
exports.Gantt = Gantt;
|
|
63828
63848
|
exports.TYPES = index$3;
|