@visactor/vtable-sheet 1.20.1 → 1.20.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/formula/formula-autocomplete.d.ts +2 -0
- package/cjs/formula/formula-autocomplete.js +34 -11
- package/cjs/formula/formula-autocomplete.js.map +1 -1
- package/cjs/formula/formula-editor.d.ts +1 -0
- package/cjs/formula/formula-editor.js +9 -1
- package/cjs/formula/formula-editor.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-sheet.js +103 -40
- package/dist/vtable-sheet.min.js +1 -1
- package/es/formula/formula-autocomplete.d.ts +2 -0
- package/es/formula/formula-autocomplete.js +34 -11
- package/es/formula/formula-autocomplete.js.map +1 -1
- package/es/formula/formula-editor.d.ts +1 -0
- package/es/formula/formula-editor.js +9 -1
- package/es/formula/formula-editor.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 +4 -4
package/dist/vtable-sheet.js
CHANGED
|
@@ -1976,6 +1976,7 @@
|
|
|
1976
1976
|
items = [];
|
|
1977
1977
|
selectedIndex = -1;
|
|
1978
1978
|
isVisible = false;
|
|
1979
|
+
originalEditingEditor = null;
|
|
1979
1980
|
inputElement = null;
|
|
1980
1981
|
sheet;
|
|
1981
1982
|
onSelectCallback;
|
|
@@ -1996,9 +1997,9 @@
|
|
|
1996
1997
|
this.onSelectCallback = onSelect;
|
|
1997
1998
|
this.customPositioning = customPositioning;
|
|
1998
1999
|
input.addEventListener('input', this.handleInput.bind(this));
|
|
1999
|
-
input.addEventListener('keydown', this.handleKeydown.bind(this));
|
|
2000
|
+
input.addEventListener('keydown', this.handleKeydown.bind(this), true);
|
|
2000
2001
|
input.addEventListener('blur', () => {
|
|
2001
|
-
setTimeout(() => this.hide(),
|
|
2002
|
+
setTimeout(() => this.hide(), 10);
|
|
2002
2003
|
});
|
|
2003
2004
|
}
|
|
2004
2005
|
handleInput(event) {
|
|
@@ -2169,7 +2170,7 @@
|
|
|
2169
2170
|
descEl.textContent = item.description;
|
|
2170
2171
|
itemEl.appendChild(descEl);
|
|
2171
2172
|
}
|
|
2172
|
-
itemEl.addEventListener('
|
|
2173
|
+
itemEl.addEventListener('mousedown', () => this.selectItem(globalIndex));
|
|
2173
2174
|
itemEl.addEventListener('mouseenter', () => {
|
|
2174
2175
|
this.selectedIndex = globalIndex;
|
|
2175
2176
|
this.renderDropdown();
|
|
@@ -2247,11 +2248,13 @@
|
|
|
2247
2248
|
event.preventDefault();
|
|
2248
2249
|
this.selectedIndex = Math.min(this.selectedIndex + 1, this.items.length - 1);
|
|
2249
2250
|
this.renderDropdown();
|
|
2251
|
+
this.scrollToSelectedItem();
|
|
2250
2252
|
break;
|
|
2251
2253
|
case 'ArrowUp':
|
|
2252
2254
|
event.preventDefault();
|
|
2253
2255
|
this.selectedIndex = Math.max(this.selectedIndex - 1, 0);
|
|
2254
2256
|
this.renderDropdown();
|
|
2257
|
+
this.scrollToSelectedItem();
|
|
2255
2258
|
break;
|
|
2256
2259
|
case 'Enter':
|
|
2257
2260
|
if (this.selectedIndex >= 0) {
|
|
@@ -2260,16 +2263,36 @@
|
|
|
2260
2263
|
}
|
|
2261
2264
|
break;
|
|
2262
2265
|
case 'Escape':
|
|
2266
|
+
event.preventDefault();
|
|
2263
2267
|
this.hide();
|
|
2268
|
+
if (this.inputElement) {
|
|
2269
|
+
this.inputElement.focus();
|
|
2270
|
+
}
|
|
2264
2271
|
break;
|
|
2265
2272
|
case 'Tab':
|
|
2266
2273
|
if (this.selectedIndex >= 0) {
|
|
2267
2274
|
event.preventDefault();
|
|
2268
2275
|
this.selectItem(this.selectedIndex);
|
|
2269
2276
|
}
|
|
2277
|
+
else {
|
|
2278
|
+
this.hide();
|
|
2279
|
+
}
|
|
2270
2280
|
break;
|
|
2271
2281
|
}
|
|
2272
2282
|
}
|
|
2283
|
+
scrollToSelectedItem() {
|
|
2284
|
+
if (!this.dropdown || this.selectedIndex < 0) {
|
|
2285
|
+
return;
|
|
2286
|
+
}
|
|
2287
|
+
const items = this.dropdown.querySelectorAll('.vtable-formula-autocomplete-item');
|
|
2288
|
+
if (items[this.selectedIndex]) {
|
|
2289
|
+
const selectedItem = items[this.selectedIndex];
|
|
2290
|
+
selectedItem.scrollIntoView({
|
|
2291
|
+
behavior: 'smooth',
|
|
2292
|
+
block: 'nearest'
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2273
2296
|
selectItem(index) {
|
|
2274
2297
|
const item = this.items[index];
|
|
2275
2298
|
if (!item || !this.inputElement) {
|
|
@@ -2289,11 +2312,20 @@
|
|
|
2289
2312
|
this.inputElement.value = newValue;
|
|
2290
2313
|
const newCursorPos = context.insertPosition + item.value.length + (item.type === 'function' ? 1 : 0);
|
|
2291
2314
|
this.inputElement.setSelectionRange(newCursorPos, newCursorPos);
|
|
2315
|
+
const inputEvent = new Event('input', { bubbles: true });
|
|
2316
|
+
this.inputElement.dispatchEvent(inputEvent);
|
|
2292
2317
|
}
|
|
2293
2318
|
this.hide();
|
|
2319
|
+
if (this.inputElement) {
|
|
2320
|
+
setTimeout(() => {
|
|
2321
|
+
this.inputElement.focus();
|
|
2322
|
+
}, 50);
|
|
2323
|
+
}
|
|
2294
2324
|
}
|
|
2295
2325
|
show() {
|
|
2296
2326
|
if (this.dropdown && this.items.length > 0) {
|
|
2327
|
+
this.originalEditingEditor = this.sheet.getActiveSheet().tableInstance.editorManager.editingEditor;
|
|
2328
|
+
this.sheet.getActiveSheet().tableInstance.editorManager.editingEditor = null;
|
|
2297
2329
|
this.dropdown.style.display = 'block';
|
|
2298
2330
|
this.isVisible = true;
|
|
2299
2331
|
this.selectedIndex = 0;
|
|
@@ -2301,6 +2333,10 @@
|
|
|
2301
2333
|
}
|
|
2302
2334
|
}
|
|
2303
2335
|
hide() {
|
|
2336
|
+
if (this.originalEditingEditor) {
|
|
2337
|
+
this.sheet.getActiveSheet().tableInstance.editorManager.editingEditor = this.originalEditingEditor;
|
|
2338
|
+
this.originalEditingEditor = null;
|
|
2339
|
+
}
|
|
2304
2340
|
if (this.dropdown) {
|
|
2305
2341
|
this.dropdown.style.display = 'none';
|
|
2306
2342
|
this.isVisible = false;
|
|
@@ -2413,7 +2449,20 @@
|
|
|
2413
2449
|
dropdown.style.boxShadow = '0 2px 8px rgba(0, 0, 0, 0.15)';
|
|
2414
2450
|
}
|
|
2415
2451
|
};
|
|
2416
|
-
this.formulaAutocomplete.attachTo(this.element,
|
|
2452
|
+
this.formulaAutocomplete.attachTo(this.element, item => {
|
|
2453
|
+
this.handleAutocompleteSelect(item);
|
|
2454
|
+
}, customPositioning);
|
|
2455
|
+
}
|
|
2456
|
+
handleAutocompleteSelect(item) {
|
|
2457
|
+
if (!this.element || !this.sheet) {
|
|
2458
|
+
return;
|
|
2459
|
+
}
|
|
2460
|
+
this.element.value = '=' + item.value;
|
|
2461
|
+
this.sheet.formulaUIManager.formulaInput.value = this.element.value;
|
|
2462
|
+
const highlightManager = this.sheet.formulaManager.cellHighlightManager;
|
|
2463
|
+
if (highlightManager && this.element.value.startsWith('=')) {
|
|
2464
|
+
highlightManager.highlightFormulaCells(this.element.value);
|
|
2465
|
+
}
|
|
2417
2466
|
}
|
|
2418
2467
|
onStart(context) {
|
|
2419
2468
|
const formula = this.sheet.formulaManager.getCellFormula({
|
|
@@ -34641,7 +34690,7 @@
|
|
|
34641
34690
|
width: width,
|
|
34642
34691
|
height: height
|
|
34643
34692
|
} = item.attribute;
|
|
34644
|
-
contentWidth < startX + width && (startX = 0, startY += height + spaceRow, pages += 1), index > 0 && item.setAttributes({
|
|
34693
|
+
contentWidth < startX + width && index > 0 && (startX = 0, startY += height + spaceRow, pages += 1), index > 0 && item.setAttributes({
|
|
34645
34694
|
x: startX,
|
|
34646
34695
|
y: startY
|
|
34647
34696
|
}), startX += spaceCol + width;
|
|
@@ -34652,9 +34701,10 @@
|
|
|
34652
34701
|
if (compWidth = this._itemMaxWidth * maxCol + (maxCol - 1) * spaceCol, compHeight = maxHeight, contentWidth = compWidth, comp = this._createPager(compStyle), this._pagerComponent = comp, this._innerView.add(comp), contentHeight = maxHeight - comp.AABBBounds.height() - pagerSpace - renderStartY, contentHeight <= 0) return this._innerView.removeChild(comp), !1;
|
|
34653
34702
|
itemsContainer.getChildren().forEach((item, index) => {
|
|
34654
34703
|
const {
|
|
34704
|
+
width: width,
|
|
34655
34705
|
height: height
|
|
34656
34706
|
} = item.attribute;
|
|
34657
|
-
contentHeight < startY + height && (startY = 0, startX += this._itemMaxWidth + spaceCol, pages += 1), index > 0 && item.setAttributes({
|
|
34707
|
+
contentHeight < startY + height && index > 0 && (startY = 0, startX += this._itemMaxWidth + spaceCol, pages += 1), index > 0 && item.setAttributes({
|
|
34658
34708
|
x: startX,
|
|
34659
34709
|
y: startY
|
|
34660
34710
|
}), startY += spaceRow + height;
|
|
@@ -53289,7 +53339,7 @@
|
|
|
53289
53339
|
return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.bottomFrozenRowCount, col - 1) : 0;
|
|
53290
53340
|
}
|
|
53291
53341
|
getCellGroupY(row) {
|
|
53292
|
-
return row < this.table.frozenRowCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.
|
|
53342
|
+
return row < this.table.frozenRowCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.columnHeaderLevelCount, row - 1) : row < this.table.rowCount ? this.table.getRowsHeight(this.table.rowCount - this.table.bottomFrozenRowCount, row - 1) : 0;
|
|
53293
53343
|
}
|
|
53294
53344
|
getCellGroupX(col) {
|
|
53295
53345
|
return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.rightFrozenColCount, col - 1) : 0;
|
|
@@ -60022,7 +60072,7 @@
|
|
|
60022
60072
|
}
|
|
60023
60073
|
constructor(container, options = {}) {
|
|
60024
60074
|
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;
|
|
60025
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.20.
|
|
60075
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.20.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.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");
|
|
60026
60076
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
60027
60077
|
options: options,
|
|
60028
60078
|
container: container
|
|
@@ -71505,7 +71555,7 @@
|
|
|
71505
71555
|
row: row
|
|
71506
71556
|
} = this.table.stateManager.select.cellPos;
|
|
71507
71557
|
if (!this.table.editorManager.editingEditor || "Enter" !== event.key && "Tab" !== event.key) {
|
|
71508
|
-
if ("Delete" === event.key || "Backspace" === event.key) {
|
|
71558
|
+
if (!this.table.editorManager.editingEditor && ("Delete" === event.key || "Backspace" === event.key)) {
|
|
71509
71559
|
const selectCells = this.table.getSelectedCellInfos();
|
|
71510
71560
|
(null == selectCells ? void 0 : selectCells.length) > 0 && deleteSelectRange(selectCells, this.table), event.stopPropagation(), event.preventDefault();
|
|
71511
71561
|
}
|
|
@@ -71793,7 +71843,7 @@
|
|
|
71793
71843
|
|
|
71794
71844
|
var MenuKey;
|
|
71795
71845
|
!function (MenuKey) {
|
|
71796
|
-
MenuKey
|
|
71846
|
+
MenuKey.EMPTY = "", MenuKey.COPY = "copy", MenuKey.CUT = "cut", MenuKey.PASTE = "paste", MenuKey.INSERT_COLUMN_LEFT = "insert_column_left", MenuKey.INSERT_COLUMN_RIGHT = "insert_column_right", MenuKey.INSERT_ROW_ABOVE = "insert_row_above", MenuKey.INSERT_ROW_BELOW = "insert_row_below", MenuKey.DELETE_ROW = "delete_row", MenuKey.DELETE_COLUMN = "delete_column", MenuKey.FREEZE_TO_THIS_ROW = "freeze_to_this_row", MenuKey.FREEZE_TO_THIS_COLUMN = "freeze_to_this_column", MenuKey.FREEZE_TO_THIS_ROW_AND_COLUMN = "freeze_to_this_row_and_column", MenuKey.UNFREEZE = "unfreeze", MenuKey.MERGE_CELLS = "merge_cells", MenuKey.UNMERGE_CELLS = "unmerge_cells", MenuKey.HIDE_COLUMN = "hide_column", MenuKey.SORT = "sort";
|
|
71797
71847
|
}(MenuKey || (MenuKey = {}));
|
|
71798
71848
|
const DEFAULT_MENU_ITEMS = {
|
|
71799
71849
|
[MenuKey.COPY]: {
|
|
@@ -72986,9 +73036,7 @@
|
|
|
72986
73036
|
colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;
|
|
72987
73037
|
options.contentOffsetX = rowSeriesNumberColWidth, options.contentOffsetY = colSeriesNumberRowHeight;
|
|
72988
73038
|
} else if (runTime === TABLE_EVENT_TYPE.INITIALIZED || runTime === TABLE_EVENT_TYPE.UPDATED) {
|
|
72989
|
-
this.table = args[2], this.table.options.customConfig || (this.table.options.customConfig = {}), this.table.options.customConfig.cancelSelectCellHook = e => {
|
|
72990
|
-
if (e.target.isDescendantsOf(this.seriesNumberComponent)) return !1;
|
|
72991
|
-
}, this.seriesNumberComponent.setAttributes({
|
|
73039
|
+
this.table = args[2], this.table.options.customConfig || (this.table.options.customConfig = {}), this.table.options.customConfig.cancelSelectCellHook = e => !e.target.isDescendantsOf(this.seriesNumberComponent), this.seriesNumberComponent.setAttributes({
|
|
72992
73040
|
rowCount: this.table.rowCount,
|
|
72993
73041
|
colCount: this.table.colCount,
|
|
72994
73042
|
frozenRowCount: this.table.frozenRowCount,
|
|
@@ -75379,7 +75427,9 @@
|
|
|
75379
75427
|
const index = (i - 1) % data.length,
|
|
75380
75428
|
d = deepClone(data[index]);
|
|
75381
75429
|
removeCellCustom(d);
|
|
75382
|
-
const
|
|
75430
|
+
const lastValue = Number(null === (_b = data[data.length - 1]) || void 0 === _b ? void 0 : _b.v),
|
|
75431
|
+
firstValue = Number(null === (_c = data[0]) || void 0 === _c ? void 0 : _c.v),
|
|
75432
|
+
num = lastValue * (Number(null === (_d = data[1]) || void 0 === _d ? void 0 : _d.v) / firstValue) ** i;
|
|
75383
75433
|
d && (d.v = converter ? converter.fromNumber(num, d.f) : num, applyData.push(d));
|
|
75384
75434
|
} else {
|
|
75385
75435
|
const xArr = getXArr(data.length);
|
|
@@ -75411,14 +75461,14 @@
|
|
|
75411
75461
|
return Math.round(1e5 * (a + b * x)) / 1e5;
|
|
75412
75462
|
}
|
|
75413
75463
|
function fillExtendNumber(data, len, step) {
|
|
75414
|
-
var _a;
|
|
75464
|
+
var _a, _b;
|
|
75415
75465
|
const applyData = [],
|
|
75416
75466
|
reg = /0|([1-9]+[0-9]*)/g;
|
|
75417
75467
|
for (let i = 1; i <= len; i++) {
|
|
75418
75468
|
const index = (i - 1) % data.length,
|
|
75419
75469
|
d = deepClone(data[index]);
|
|
75420
75470
|
removeCellCustom(d);
|
|
75421
|
-
const last = `${null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v}`;
|
|
75471
|
+
const last = `${null !== (_b = null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v) && void 0 !== _b ? _b : ""}`;
|
|
75422
75472
|
if (!last) continue;
|
|
75423
75473
|
const match = null == last ? void 0 : last.match(reg),
|
|
75424
75474
|
lastTxt = null == match ? void 0 : match[match.length - 1];
|
|
@@ -75431,7 +75481,7 @@
|
|
|
75431
75481
|
return applyData;
|
|
75432
75482
|
}
|
|
75433
75483
|
function fillChnWeek(data, len, step, weekType = 0) {
|
|
75434
|
-
var _a, _b;
|
|
75484
|
+
var _a, _b, _c;
|
|
75435
75485
|
const keywordMap = [["日", "一", "二", "三", "四", "五", "六"], ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]];
|
|
75436
75486
|
if (weekType >= keywordMap.length) return [];
|
|
75437
75487
|
const keyword = keywordMap[weekType],
|
|
@@ -75442,7 +75492,7 @@
|
|
|
75442
75492
|
removeCellCustom(d);
|
|
75443
75493
|
let num = 0;
|
|
75444
75494
|
if ((null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v) === keyword[0]) num = 7 + step * i;else {
|
|
75445
|
-
const last = `${null === (_b = data[data.length - 1]) || void 0 === _b ? void 0 : _b.v}`;
|
|
75495
|
+
const last = `${null !== (_c = null === (_b = data[data.length - 1]) || void 0 === _b ? void 0 : _b.v) && void 0 !== _c ? _c : ""}`;
|
|
75446
75496
|
if (last) {
|
|
75447
75497
|
num = chineseToNumber(last.substr(last.length - 1, 1)) + step * i;
|
|
75448
75498
|
}
|
|
@@ -75454,13 +75504,13 @@
|
|
|
75454
75504
|
return applyData;
|
|
75455
75505
|
}
|
|
75456
75506
|
function fillChnNumber(data, len, step) {
|
|
75457
|
-
var _a;
|
|
75507
|
+
var _a, _b;
|
|
75458
75508
|
const applyData = [];
|
|
75459
75509
|
for (let i = 1; i <= len; i++) {
|
|
75460
75510
|
const index = (i - 1) % data.length,
|
|
75461
75511
|
d = deepClone(data[index]);
|
|
75462
75512
|
removeCellCustom(d);
|
|
75463
|
-
const num = chineseToNumber(`${null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v}`) + step * i;
|
|
75513
|
+
const num = chineseToNumber(`${null !== (_b = null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v) && void 0 !== _b ? _b : ""}`) + step * i;
|
|
75464
75514
|
let txt;
|
|
75465
75515
|
txt = num <= 0 ? "零" : numberToChinese(num), d && (d.v = txt, applyData.push(d));
|
|
75466
75516
|
}
|
|
@@ -75496,14 +75546,14 @@
|
|
|
75496
75546
|
};
|
|
75497
75547
|
}
|
|
75498
75548
|
function fillLoopSeries(data, len, step, series) {
|
|
75499
|
-
var _a;
|
|
75549
|
+
var _a, _b;
|
|
75500
75550
|
const seriesLen = series.length,
|
|
75501
75551
|
applyData = [];
|
|
75502
75552
|
for (let i = 1; i <= len; i++) {
|
|
75503
75553
|
const index = (i - 1) % data.length,
|
|
75504
75554
|
d = deepClone(data[index]);
|
|
75505
75555
|
removeCellCustom(d);
|
|
75506
|
-
const last = `${null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v}`;
|
|
75556
|
+
const last = `${null !== (_b = null === (_a = data[data.length - 1]) || void 0 === _a ? void 0 : _a.v) && void 0 !== _b ? _b : ""}`;
|
|
75507
75557
|
let num = series.indexOf(last) + step * i;
|
|
75508
75558
|
num < 0 && (num += Math.abs(step) * seriesLen);
|
|
75509
75559
|
const rsd = num % seriesLen;
|
|
@@ -75695,18 +75745,21 @@
|
|
|
75695
75745
|
const extendNumberRule = {
|
|
75696
75746
|
type: DATA_TYPE.EXTEND_NUMBER,
|
|
75697
75747
|
priority: 900,
|
|
75698
|
-
match: cellData =>
|
|
75699
|
-
isContinue: (prev, cur) => {
|
|
75748
|
+
match: cellData => {
|
|
75700
75749
|
var _a;
|
|
75750
|
+
return matchExtendNumber(`${null !== (_a = null == cellData ? void 0 : cellData.v) && void 0 !== _a ? _a : ""}` || "").isExtendNumber;
|
|
75751
|
+
},
|
|
75752
|
+
isContinue: (prev, cur) => {
|
|
75753
|
+
var _a, _b, _c;
|
|
75701
75754
|
if (prev.type === DATA_TYPE.EXTEND_NUMBER) {
|
|
75702
75755
|
const {
|
|
75703
75756
|
beforeTxt: beforeTxt,
|
|
75704
75757
|
afterTxt: afterTxt
|
|
75705
|
-
} = matchExtendNumber(`${null === (_a = prev.cellData) || void 0 === _a ? void 0 : _a.v}` || ""),
|
|
75758
|
+
} = matchExtendNumber(`${null !== (_b = null === (_a = prev.cellData) || void 0 === _a ? void 0 : _a.v) && void 0 !== _b ? _b : ""}` || ""),
|
|
75706
75759
|
{
|
|
75707
75760
|
beforeTxt: curBeforeTxt,
|
|
75708
75761
|
afterTxt: curAfterTxt
|
|
75709
|
-
} = matchExtendNumber(`${null == cur ? void 0 : cur.v}` || "");
|
|
75762
|
+
} = matchExtendNumber(`${null !== (_c = null == cur ? void 0 : cur.v) && void 0 !== _c ? _c : ""}` || "");
|
|
75710
75763
|
if (beforeTxt === curBeforeTxt && afterTxt === curAfterTxt) return !0;
|
|
75711
75764
|
}
|
|
75712
75765
|
return !1;
|
|
@@ -75732,7 +75785,10 @@
|
|
|
75732
75785
|
const chnNumberRule = {
|
|
75733
75786
|
type: DATA_TYPE.CHN_NUMBER,
|
|
75734
75787
|
priority: 830,
|
|
75735
|
-
match: cellData =>
|
|
75788
|
+
match: cellData => {
|
|
75789
|
+
var _a;
|
|
75790
|
+
return !!isChnNumber(`${null !== (_a = null == cellData ? void 0 : cellData.v) && void 0 !== _a ? _a : ""}` || "");
|
|
75791
|
+
},
|
|
75736
75792
|
isContinue: (prev, cur) => prev.type === DATA_TYPE.CHN_NUMBER,
|
|
75737
75793
|
applyFunctions: {
|
|
75738
75794
|
[APPLY_TYPE.SERIES]: (dataWithIndex, len, direction) => {
|
|
@@ -75769,7 +75825,10 @@
|
|
|
75769
75825
|
const chnWeek2Rule = {
|
|
75770
75826
|
type: DATA_TYPE.CHN_WEEK2,
|
|
75771
75827
|
priority: 820,
|
|
75772
|
-
match: cellData =>
|
|
75828
|
+
match: cellData => {
|
|
75829
|
+
var _a;
|
|
75830
|
+
return !!isChnWeek2(`${null !== (_a = null == cellData ? void 0 : cellData.v) && void 0 !== _a ? _a : ""}` || "");
|
|
75831
|
+
},
|
|
75773
75832
|
isContinue: (prev, cur) => prev.type === DATA_TYPE.CHN_WEEK2,
|
|
75774
75833
|
applyFunctions: {
|
|
75775
75834
|
[APPLY_TYPE.SERIES]: (dataWithIndex, len, direction) => {
|
|
@@ -75800,7 +75859,10 @@
|
|
|
75800
75859
|
const chnWeek3Rule = {
|
|
75801
75860
|
type: DATA_TYPE.CHN_WEEK3,
|
|
75802
75861
|
priority: 810,
|
|
75803
|
-
match: cellData =>
|
|
75862
|
+
match: cellData => {
|
|
75863
|
+
var _a;
|
|
75864
|
+
return isChnWeek3(`${null !== (_a = null == cellData ? void 0 : cellData.v) && void 0 !== _a ? _a : ""}` || "");
|
|
75865
|
+
},
|
|
75804
75866
|
isContinue: (prev, cur) => prev.type === DATA_TYPE.CHN_WEEK3,
|
|
75805
75867
|
applyFunctions: {
|
|
75806
75868
|
[APPLY_TYPE.SERIES]: (dataWithIndex, len, direction) => {
|
|
@@ -75833,10 +75895,13 @@
|
|
|
75833
75895
|
const loopSeriesRule = {
|
|
75834
75896
|
type: DATA_TYPE.LOOP_SERIES,
|
|
75835
75897
|
priority: 800,
|
|
75836
|
-
match: cellData =>
|
|
75837
|
-
isContinue: (prev, cur) => {
|
|
75898
|
+
match: cellData => {
|
|
75838
75899
|
var _a;
|
|
75839
|
-
return
|
|
75900
|
+
return isLoopSeries(`${null !== (_a = null == cellData ? void 0 : cellData.v) && void 0 !== _a ? _a : ""}` || "");
|
|
75901
|
+
},
|
|
75902
|
+
isContinue: (prev, cur) => {
|
|
75903
|
+
var _a, _b, _c;
|
|
75904
|
+
return prev.type === DATA_TYPE.LOOP_SERIES && getLoopSeriesInfo(`${null !== (_b = null === (_a = prev.cellData) || void 0 === _a ? void 0 : _a.v) && void 0 !== _b ? _b : ""}` || "").name === getLoopSeriesInfo(`${null !== (_c = null == cur ? void 0 : cur.v) && void 0 !== _c ? _c : ""}` || "").name;
|
|
75840
75905
|
},
|
|
75841
75906
|
applyFunctions: {
|
|
75842
75907
|
[APPLY_TYPE.SERIES]: (dataWithIndex, len, direction) => {
|
|
@@ -76119,9 +76184,7 @@
|
|
|
76119
76184
|
});
|
|
76120
76185
|
for (let i = 0; i < untransformedApplyDatas[0].length; i++) {
|
|
76121
76186
|
const row = [];
|
|
76122
|
-
for (let j = 0; j < untransformedApplyDatas.length; j++) row.push(
|
|
76123
|
-
s: null
|
|
76124
|
-
}, untransformedApplyDatas[j][i]));
|
|
76187
|
+
for (let j = 0; j < untransformedApplyDatas.length; j++) row.push(untransformedApplyDatas[j][i]);
|
|
76125
76188
|
applyDatas.push(row);
|
|
76126
76189
|
}
|
|
76127
76190
|
} else {
|
|
@@ -76130,9 +76193,7 @@
|
|
|
76130
76193
|
const copyD = sourceData[i],
|
|
76131
76194
|
applyData = this.getApplyData(copyD, csLen, asLen, direction, applyType, location),
|
|
76132
76195
|
row = [];
|
|
76133
|
-
for (let j = 0; j < applyData.length; j++) row.push(
|
|
76134
|
-
s: null
|
|
76135
|
-
}, applyData[j]));
|
|
76196
|
+
for (let j = 0; j < applyData.length; j++) row.push(applyData[j]);
|
|
76136
76197
|
applyDatas.push(row);
|
|
76137
76198
|
});
|
|
76138
76199
|
}
|
|
@@ -76140,8 +76201,9 @@
|
|
|
76140
76201
|
targetRows.forEach((row, rowIndex) => {
|
|
76141
76202
|
const rowValues = [];
|
|
76142
76203
|
targetCols.forEach((col, colIndex) => {
|
|
76204
|
+
var _a;
|
|
76143
76205
|
const range = isMergeCell(this.tableInstance, col, row);
|
|
76144
|
-
range && this.tableInstance.unmergeCells(range.start.col, range.start.row, range.end.col, range.end.row), applyDatas[rowIndex][colIndex] && rowValues.push(applyDatas[rowIndex][colIndex].v + "");
|
|
76206
|
+
range && this.tableInstance.unmergeCells(range.start.col, range.start.row, range.end.col, range.end.row), applyDatas[rowIndex][colIndex] && rowValues.push((null === (_a = applyDatas[rowIndex][colIndex]) || void 0 === _a ? void 0 : _a.v) + "");
|
|
76145
76207
|
}), values.push(rowValues);
|
|
76146
76208
|
});
|
|
76147
76209
|
const minRow = Math.min(...targetRows),
|
|
@@ -76195,6 +76257,7 @@
|
|
|
76195
76257
|
const custom = null == customApplyFunctions ? void 0 : customApplyFunctions[APPLY_TYPE.SERIES];
|
|
76196
76258
|
return custom ? custom(copySquad, len, direction, sourceDataPiece) : (isReverse && data.reverse(), (null == customApplyFunctions ? void 0 : customApplyFunctions[APPLY_TYPE.COPY]) ? customApplyFunctions[APPLY_TYPE.COPY](copySquad, len, direction, sourceDataPiece, location) : fillCopy(data, len));
|
|
76197
76259
|
}
|
|
76260
|
+
return [];
|
|
76198
76261
|
}
|
|
76199
76262
|
}
|
|
76200
76263
|
|
|
@@ -79074,7 +79137,7 @@
|
|
|
79074
79137
|
importStyle();
|
|
79075
79138
|
}
|
|
79076
79139
|
|
|
79077
|
-
const version = "1.20.
|
|
79140
|
+
const version = "1.20.2";
|
|
79078
79141
|
importStyles();
|
|
79079
79142
|
|
|
79080
79143
|
exports.TYPES = index;
|