@visactor/vtable-gantt 1.22.11-alpha.7 → 1.22.11-alpha.9
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/event/EventTarget.js +1 -2
- package/cjs/event/touch.js +1 -0
- 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 +29 -12
- package/dist/vtable-gantt.min.js +2 -2
- package/es/event/EventTarget.js +1 -2
- package/es/event/touch.js +2 -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/cjs/event/EventTarget.js
CHANGED
package/cjs/event/touch.js
CHANGED
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.22.11-alpha.
|
|
9
|
+
export declare const version = "1.22.11-alpha.9";
|
|
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.22.11-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.22.11-alpha.9\";\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/dist/vtable-gantt.js
CHANGED
|
@@ -40897,8 +40897,17 @@
|
|
|
40897
40897
|
return null == index || index > length ? length : index < 0 ? 0 : index;
|
|
40898
40898
|
}
|
|
40899
40899
|
_mapViewInsertIndexToRawInsertIndex(rawRecords, viewIndex) {
|
|
40900
|
-
if (
|
|
40901
|
-
if (viewIndex <= 0)
|
|
40900
|
+
if (0 === this.records.length) return rawRecords.length;
|
|
40901
|
+
if (viewIndex <= 0) {
|
|
40902
|
+
const firstVisibleRecord = this.records[0],
|
|
40903
|
+
rawIndex = rawRecords.indexOf(firstVisibleRecord);
|
|
40904
|
+
return rawIndex >= 0 ? rawIndex : 0;
|
|
40905
|
+
}
|
|
40906
|
+
if (viewIndex >= this.records.length) {
|
|
40907
|
+
const lastVisibleRecord = this.records[this.records.length - 1],
|
|
40908
|
+
rawIndex = rawRecords.indexOf(lastVisibleRecord);
|
|
40909
|
+
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
40910
|
+
}
|
|
40902
40911
|
const prevRecord = this.records[viewIndex - 1],
|
|
40903
40912
|
rawIndex = rawRecords.indexOf(prevRecord);
|
|
40904
40913
|
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
@@ -40931,7 +40940,7 @@
|
|
|
40931
40940
|
if (!rawRecords) return;
|
|
40932
40941
|
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
|
|
40933
40942
|
rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
40934
|
-
rawRecords.splice(rawInsertIndex, 0, record), this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.added) && this.dataSourceObj.added(rawInsertIndex, 1);
|
|
40943
|
+
rawRecords.splice(rawInsertIndex, 0, record), syncToOriginalRecords && this._hasFilterInEffect() && this.markForceVisibleRecord(record), this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.added) && this.dataSourceObj.added(rawInsertIndex, 1);
|
|
40935
40944
|
}
|
|
40936
40945
|
addRecords(recordArr, index, syncToOriginalRecords = !1) {
|
|
40937
40946
|
var _a, _b, _c;
|
|
@@ -40959,7 +40968,8 @@
|
|
|
40959
40968
|
if (!rawRecords || !Array.isArray(recordArr) || 0 === recordArr.length) return;
|
|
40960
40969
|
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
|
|
40961
40970
|
rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
40962
|
-
rawRecords.splice(rawInsertIndex, 0, ...recordArr),
|
|
40971
|
+
if (rawRecords.splice(rawInsertIndex, 0, ...recordArr), syncToOriginalRecords && this._hasFilterInEffect()) for (let i = 0; i < recordArr.length; i++) this.markForceVisibleRecord(recordArr[i]);
|
|
40972
|
+
this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.added) && this.dataSourceObj.added(rawInsertIndex, recordArr.length);
|
|
40963
40973
|
}
|
|
40964
40974
|
addRecordForSorted(record) {
|
|
40965
40975
|
Array.isArray(this.records) && (this.beforeChangedRecordsMap.clear(), this.records.push(record), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1, this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength));
|
|
@@ -41126,23 +41136,30 @@
|
|
|
41126
41136
|
setSortedIndexMap(field, filedMap) {
|
|
41127
41137
|
this.sortedIndexMap.set(field, filedMap);
|
|
41128
41138
|
}
|
|
41139
|
+
markForceVisibleRecord(record) {
|
|
41140
|
+
!record || "object" != typeof record && "function" != typeof record || (this._forceVisibleRecords || (this._forceVisibleRecords = new WeakSet()), this._forceVisibleRecords.add(record));
|
|
41141
|
+
}
|
|
41142
|
+
clearForceVisibleRecords() {
|
|
41143
|
+
this._forceVisibleRecords = void 0;
|
|
41144
|
+
}
|
|
41129
41145
|
clearFilteredChildren(record) {
|
|
41130
41146
|
var _a, _b;
|
|
41131
41147
|
record.filteredChildren = void 0;
|
|
41132
41148
|
for (let i = 0; i < (null !== (_b = null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0); i++) this.clearFilteredChildren(record.children[i]);
|
|
41133
41149
|
}
|
|
41134
41150
|
filterRecord(record) {
|
|
41135
|
-
var _a, _b, _c;
|
|
41151
|
+
var _a, _b, _c, _d;
|
|
41152
|
+
if (null === (_a = this._forceVisibleRecords) || void 0 === _a ? void 0 : _a.has(record)) return !0;
|
|
41136
41153
|
let isReserved = !0;
|
|
41137
|
-
for (let i = 0; i < (null === (
|
|
41138
|
-
const filterRule = null === (
|
|
41154
|
+
for (let i = 0; i < (null === (_b = this.dataConfig.filterRules) || void 0 === _b ? void 0 : _b.length); i++) {
|
|
41155
|
+
const filterRule = null === (_c = this.dataConfig) || void 0 === _c ? void 0 : _c.filterRules[i];
|
|
41139
41156
|
if (filterRule.filterKey) {
|
|
41140
41157
|
const filterValue = record[filterRule.filterKey];
|
|
41141
41158
|
if (-1 === filterRule.filteredValues.indexOf(filterValue)) {
|
|
41142
41159
|
isReserved = !1;
|
|
41143
41160
|
break;
|
|
41144
41161
|
}
|
|
41145
|
-
} else if (!(null === (
|
|
41162
|
+
} else if (!(null === (_d = filterRule.filterFunc) || void 0 === _d ? void 0 : _d.call(filterRule, record))) {
|
|
41146
41163
|
isReserved = !1;
|
|
41147
41164
|
break;
|
|
41148
41165
|
}
|
|
@@ -60030,7 +60047,7 @@
|
|
|
60030
60047
|
}
|
|
60031
60048
|
constructor(container, options = {}) {
|
|
60032
60049
|
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;
|
|
60033
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.
|
|
60050
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.9", 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");
|
|
60034
60051
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
60035
60052
|
options: options,
|
|
60036
60053
|
container: container
|
|
@@ -65083,8 +65100,8 @@
|
|
|
65083
65100
|
updateFilterRules(filterRules, options = {
|
|
65084
65101
|
clearRowHeightCache: !0
|
|
65085
65102
|
}) {
|
|
65086
|
-
var _a;
|
|
65087
|
-
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (
|
|
65103
|
+
var _a, _b, _c;
|
|
65104
|
+
this.scenegraph.clearCells(), null === (_b = (_a = this.dataSource).clearForceVisibleRecords) || void 0 === _b || _b.call(_a), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible(), this.resize();
|
|
65088
65105
|
}
|
|
65089
65106
|
getFilteredRecords() {
|
|
65090
65107
|
return this.dataSource.records;
|
|
@@ -76542,7 +76559,7 @@
|
|
|
76542
76559
|
PluginManager: PluginManager
|
|
76543
76560
|
});
|
|
76544
76561
|
|
|
76545
|
-
const version = "1.22.11-alpha.
|
|
76562
|
+
const version = "1.22.11-alpha.9";
|
|
76546
76563
|
|
|
76547
76564
|
exports.Gantt = Gantt;
|
|
76548
76565
|
exports.TYPES = index$4;
|