@visactor/vtable-gantt 1.11.6-alpha.5 → 1.11.6-alpha.6
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/dist/vtable-gantt.js +46 -26
- 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/package.json +4 -4
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.11.6-alpha.
|
|
8
|
+
export declare const version = "1.11.6-alpha.6";
|
|
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,gBAAgB,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.11.6-alpha.
|
|
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,gBAAgB,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.11.6-alpha.6\";\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"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -48602,7 +48602,7 @@
|
|
|
48602
48602
|
constructor(container) {
|
|
48603
48603
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
48604
48604
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
48605
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.
|
|
48605
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.6", 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");
|
|
48606
48606
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
48607
48607
|
const {
|
|
48608
48608
|
frozenColCount = 0,
|
|
@@ -55748,22 +55748,42 @@
|
|
|
55748
55748
|
}
|
|
55749
55749
|
|
|
55750
55750
|
function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
|
|
55751
|
-
var _a, _b, _c, _d, _e
|
|
55752
|
-
|
|
55753
|
-
|
|
55754
|
-
|
|
55755
|
-
|
|
55756
|
-
|
|
55757
|
-
|
|
55758
|
-
|
|
55759
|
-
|
|
55760
|
-
|
|
55761
|
-
row:
|
|
55762
|
-
|
|
55763
|
-
|
|
55764
|
-
|
|
55765
|
-
|
|
55766
|
-
|
|
55751
|
+
var _a, _b, _c, _d, _e;
|
|
55752
|
+
if (progressBarDefine.dependField) {
|
|
55753
|
+
const dependField = getOrApply(progressBarDefine.dependField, {
|
|
55754
|
+
col: col,
|
|
55755
|
+
row: row,
|
|
55756
|
+
table: table,
|
|
55757
|
+
value: value,
|
|
55758
|
+
dataValue: dataValue,
|
|
55759
|
+
cellHeaderPaths: void 0
|
|
55760
|
+
});
|
|
55761
|
+
dataValue = null !== (_b = null === (_a = table.getCellOriginRecord(col, row)) || void 0 === _a ? void 0 : _a[dependField]) && void 0 !== _b ? _b : dataValue;
|
|
55762
|
+
}
|
|
55763
|
+
const barType = null !== (_c = getOrApply(progressBarDefine.barType, {
|
|
55764
|
+
col: col,
|
|
55765
|
+
row: row,
|
|
55766
|
+
table: table,
|
|
55767
|
+
value: value,
|
|
55768
|
+
dataValue: dataValue,
|
|
55769
|
+
cellHeaderPaths: void 0
|
|
55770
|
+
})) && void 0 !== _c ? _c : "default",
|
|
55771
|
+
min = null !== (_d = getOrApply(progressBarDefine.min, {
|
|
55772
|
+
col: col,
|
|
55773
|
+
row: row,
|
|
55774
|
+
table: table,
|
|
55775
|
+
value: value,
|
|
55776
|
+
dataValue: dataValue,
|
|
55777
|
+
cellHeaderPaths: void 0
|
|
55778
|
+
})) && void 0 !== _d ? _d : 0,
|
|
55779
|
+
max = null !== (_e = getOrApply(progressBarDefine.max, {
|
|
55780
|
+
col: col,
|
|
55781
|
+
row: row,
|
|
55782
|
+
table: table,
|
|
55783
|
+
value: value,
|
|
55784
|
+
dataValue: dataValue,
|
|
55785
|
+
cellHeaderPaths: void 0
|
|
55786
|
+
})) && void 0 !== _e ? _e : min + 100;
|
|
55767
55787
|
let height = 0;
|
|
55768
55788
|
height = range ? table.getRowsHeight(range.start.row, range.end.row) : table.getRowHeight(row);
|
|
55769
55789
|
let contentWidth = width,
|
|
@@ -55825,8 +55845,8 @@
|
|
|
55825
55845
|
str.endsWith(svalue, "%") && (svalue = svalue.substr(0, svalue.length - 1));
|
|
55826
55846
|
const num = Number(svalue);
|
|
55827
55847
|
if (isNaN(num)) return percentCompleteBarGroup;
|
|
55828
|
-
if ("default" === (null
|
|
55829
|
-
const percentile = num <
|
|
55848
|
+
if ("default" === (null != barType ? barType : "default")) {
|
|
55849
|
+
const percentile = num < min ? 0 : num > max ? 1 : (num - min) / (max - min),
|
|
55830
55850
|
barMaxWidth = contentWidth,
|
|
55831
55851
|
barTop = top + contentHeight - barHeight - barBottom;
|
|
55832
55852
|
let barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
|
|
@@ -55868,9 +55888,9 @@
|
|
|
55868
55888
|
fill: fillColor
|
|
55869
55889
|
});
|
|
55870
55890
|
percentCompleteBarGroup.addChild(barMain);
|
|
55871
|
-
} else if ("negative" ===
|
|
55872
|
-
const negativeRange =
|
|
55873
|
-
positiveRange =
|
|
55891
|
+
} else if ("negative" === barType) {
|
|
55892
|
+
const negativeRange = min < 0 ? -min : 0,
|
|
55893
|
+
positiveRange = max > 0 ? max : 0,
|
|
55874
55894
|
negativeFactor = negativeRange / (negativeRange + positiveRange),
|
|
55875
55895
|
positiveFactor = 1 - negativeFactor,
|
|
55876
55896
|
positiveRate = num > 0 ? num / positiveRange : 0,
|
|
@@ -56043,9 +56063,9 @@
|
|
|
56043
56063
|
});
|
|
56044
56064
|
percentCompleteBarGroup.addChild(barMark);
|
|
56045
56065
|
}
|
|
56046
|
-
} else if ("negative_no_axis" ===
|
|
56047
|
-
const _negativeRange =
|
|
56048
|
-
_positiveRange =
|
|
56066
|
+
} else if ("negative_no_axis" === barType) {
|
|
56067
|
+
const _negativeRange = min < 0 ? -min : 0,
|
|
56068
|
+
_positiveRange = max > 0 ? max : 0,
|
|
56049
56069
|
range = Math.max(_negativeRange, _positiveRange),
|
|
56050
56070
|
percentile = 0 === range ? 0 : Math.abs(num) / range,
|
|
56051
56071
|
barMaxWidth = contentWidth;
|
|
@@ -58552,7 +58572,7 @@
|
|
|
58552
58572
|
themes: themes$1
|
|
58553
58573
|
});
|
|
58554
58574
|
|
|
58555
|
-
const version = "1.11.6-alpha.
|
|
58575
|
+
const version = "1.11.6-alpha.6";
|
|
58556
58576
|
|
|
58557
58577
|
exports.Gantt = Gantt;
|
|
58558
58578
|
exports.TYPES = index$2;
|