@visactor/vtable-gantt 1.19.10-alpha.4 → 1.19.10-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/cjs/scenegraph/timeline-header.js +1 -2
- package/cjs/state/gantt-table-sync.js +1 -0
- package/dist/vtable-gantt.js +27 -14
- package/dist/vtable-gantt.min.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/timeline-header.js +1 -2
- package/es/state/gantt-table-sync.js +2 -1
- package/package.json +5 -5
package/cjs/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.19.10-alpha.
|
|
9
|
+
export declare const version = "1.19.10-alpha.6";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,iBAAiB,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.19.10-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,iBAAiB,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.19.10-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 plugins\n};\n"]}
|
|
@@ -89,6 +89,7 @@ function _syncTableSize(gantt) {
|
|
|
89
89
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
//# sourceMappingURL=gantt-table-sync.js.map
|
|
92
93
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
93
94
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
94
95
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -1342,11 +1342,11 @@
|
|
|
1342
1342
|
const isValidNumber$2 = value => isNumber$6(value) && Number.isFinite(value);
|
|
1343
1343
|
var isValidNumber$3 = isValidNumber$2;
|
|
1344
1344
|
|
|
1345
|
-
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
1346
|
-
var isValidUrl$
|
|
1345
|
+
const isValidUrl$2 = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
1346
|
+
var isValidUrl$3 = isValidUrl$2;
|
|
1347
1347
|
|
|
1348
|
-
const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
1349
|
-
var isBase64$
|
|
1348
|
+
const isBase64$2 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
1349
|
+
var isBase64$3 = isBase64$2;
|
|
1350
1350
|
|
|
1351
1351
|
const getType$2 = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
|
|
1352
1352
|
var getType$3 = getType$2;
|
|
@@ -9766,7 +9766,7 @@
|
|
|
9766
9766
|
data: "init",
|
|
9767
9767
|
state: null
|
|
9768
9768
|
};
|
|
9769
|
-
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$
|
|
9769
|
+
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$3(image) || image.includes("/") || isBase64$3(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$a(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
|
|
9770
9770
|
}
|
|
9771
9771
|
setShadowGraphic(graphic) {
|
|
9772
9772
|
if (graphic) {
|
|
@@ -33909,6 +33909,12 @@
|
|
|
33909
33909
|
const isValidNumber = value => isNumber$4(value) && Number.isFinite(value);
|
|
33910
33910
|
var isValidNumber$1 = isValidNumber;
|
|
33911
33911
|
|
|
33912
|
+
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
33913
|
+
var isValidUrl$1 = isValidUrl;
|
|
33914
|
+
|
|
33915
|
+
const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
33916
|
+
var isBase64$1 = isBase64;
|
|
33917
|
+
|
|
33912
33918
|
const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
|
|
33913
33919
|
var getType$1 = getType;
|
|
33914
33920
|
|
|
@@ -35963,7 +35969,7 @@
|
|
|
35963
35969
|
}(IconPosition || (IconPosition = {}));
|
|
35964
35970
|
var IconFuncTypeEnum;
|
|
35965
35971
|
!function (IconFuncTypeEnum) {
|
|
35966
|
-
IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
|
|
35972
|
+
IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.imageDamagePic = "imageDamagePic", IconFuncTypeEnum.videoDamagePic = "videoDamagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
|
|
35967
35973
|
}(IconFuncTypeEnum || (IconFuncTypeEnum = {}));
|
|
35968
35974
|
var InternalIconName;
|
|
35969
35975
|
!function (InternalIconName) {
|
|
@@ -43469,7 +43475,7 @@
|
|
|
43469
43475
|
image: value,
|
|
43470
43476
|
cursor: "pointer"
|
|
43471
43477
|
});
|
|
43472
|
-
|
|
43478
|
+
if (image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, keepAspectRatio || imageAutoSizing ? image.resources && image.resources.has(image.attribute.image) && "success" === image.resources.get(image.attribute.image).state ? (image.setAttribute("opacity", 0), setTimeout(() => {
|
|
43473
43479
|
image.setAttribute("opacity", 1), updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
|
|
43474
43480
|
}, 0)) : image.successCallback = () => {
|
|
43475
43481
|
updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
|
|
@@ -43477,8 +43483,12 @@
|
|
|
43477
43483
|
updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, table);
|
|
43478
43484
|
}, image.failCallback = () => {
|
|
43479
43485
|
const regedIcons = get$2();
|
|
43480
|
-
image.image = regedIcons.damage_pic.svg;
|
|
43481
|
-
},
|
|
43486
|
+
image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
|
|
43487
|
+
}, "string" == typeof value && !(value.startsWith("<svg") || isValidUrl$1(value) || value.includes("/") || isBase64$1(value))) {
|
|
43488
|
+
const regedIcons = get$2();
|
|
43489
|
+
image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
|
|
43490
|
+
}
|
|
43491
|
+
return cellGroup.appendChild(image), cellGroup;
|
|
43482
43492
|
}
|
|
43483
43493
|
function _adjustWidthHeight(col, row, width, height, scene, padding, cellGroup) {
|
|
43484
43494
|
let needInvalidate = !1,
|
|
@@ -43622,7 +43632,7 @@
|
|
|
43622
43632
|
}
|
|
43623
43633
|
function isDamagePic(image) {
|
|
43624
43634
|
const regedIcons = get$2();
|
|
43625
|
-
return image.attribute.image === regedIcons.damage_pic.svg;
|
|
43635
|
+
return image.attribute.image === regedIcons.damage_pic.svg || regedIcons.image_damage_pic && image.attribute.image === regedIcons.image_damage_pic.svg || regedIcons.video_damage_pic && image.attribute.image === regedIcons.video_damage_pic.svg;
|
|
43626
43636
|
}
|
|
43627
43637
|
|
|
43628
43638
|
function dealPromiseData(dataPromise, tabel, callback) {
|
|
@@ -57791,7 +57801,7 @@
|
|
|
57791
57801
|
}
|
|
57792
57802
|
constructor(container, options = {}) {
|
|
57793
57803
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
57794
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.19.10-alpha.
|
|
57804
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.10-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
57795
57805
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
57796
57806
|
options: options,
|
|
57797
57807
|
container: container
|
|
@@ -67468,7 +67478,8 @@
|
|
|
67468
67478
|
});
|
|
67469
67479
|
playIcon.name = "play-icon", cellGroup.appendChild(playIcon), table.scenegraph.updateNextFrame();
|
|
67470
67480
|
}), video.onerror = () => {
|
|
67471
|
-
|
|
67481
|
+
const regedIcons = get$2();
|
|
67482
|
+
image.image = regedIcons.video_damage_pic ? regedIcons.video_damage_pic.svg : regedIcons.damage_pic.svg;
|
|
67472
67483
|
}, video.src = value, video.setAttribute("preload", "auto");
|
|
67473
67484
|
const image = createImage({
|
|
67474
67485
|
x: padding[3],
|
|
@@ -67478,7 +67489,9 @@
|
|
|
67478
67489
|
image: video,
|
|
67479
67490
|
cursor: "pointer"
|
|
67480
67491
|
});
|
|
67481
|
-
return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image),
|
|
67492
|
+
return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), image.successCallback = () => {
|
|
67493
|
+
isDamagePic(image) && (updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame());
|
|
67494
|
+
}, cellGroup;
|
|
67482
67495
|
}
|
|
67483
67496
|
|
|
67484
67497
|
function createMark(marked, cellGroup, table) {
|
|
@@ -74449,7 +74462,7 @@
|
|
|
74449
74462
|
PluginManager: PluginManager
|
|
74450
74463
|
});
|
|
74451
74464
|
|
|
74452
|
-
const version = "1.19.10-alpha.
|
|
74465
|
+
const version = "1.19.10-alpha.6";
|
|
74453
74466
|
|
|
74454
74467
|
exports.Gantt = Gantt;
|
|
74455
74468
|
exports.TYPES = index$4;
|