@ai-matrx/office 0.8.29 → 0.8.30
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/CHANGELOG.md +11 -1
- package/dist/docs.cjs +123 -116
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.d.cts +5 -0
- package/dist/docs.d.ts +5 -0
- package/dist/docs.js +104 -97
- package/dist/docs.js.map +1 -1
- package/dist/sheets-comment-anchors.cjs +13 -4
- package/dist/sheets-comment-anchors.cjs.map +1 -1
- package/dist/sheets-comment-anchors.js +13 -4
- package/dist/sheets-comment-anchors.js.map +1 -1
- package/dist/univer-collab.cjs +22 -6
- package/dist/univer-collab.cjs.map +1 -1
- package/dist/univer-collab.js +22 -6
- package/dist/univer-collab.js.map +1 -1
- package/package.json +2 -2
package/dist/univer-collab.js
CHANGED
|
@@ -4331,6 +4331,27 @@ function univerSheetsOtPort(o) {
|
|
|
4331
4331
|
console.warn("[sheets-ot] could not keep this seat's selection inside the sheet after its own row or column change", err);
|
|
4332
4332
|
}
|
|
4333
4333
|
};
|
|
4334
|
+
const recalcDue = /* @__PURE__ */ new Set();
|
|
4335
|
+
let recalcQueued = false;
|
|
4336
|
+
const recalcFilterSoon = (sheet) => {
|
|
4337
|
+
recalcDue.add(sheet);
|
|
4338
|
+
if (recalcQueued) return;
|
|
4339
|
+
recalcQueued = true;
|
|
4340
|
+
queueMicrotask(() => {
|
|
4341
|
+
recalcQueued = false;
|
|
4342
|
+
const sheets = [...recalcDue];
|
|
4343
|
+
recalcDue.clear();
|
|
4344
|
+
const u = unitId();
|
|
4345
|
+
if (!u) return;
|
|
4346
|
+
for (const s of sheets) {
|
|
4347
|
+
if (o.filterRange && !filterOf(s)) continue;
|
|
4348
|
+
try {
|
|
4349
|
+
cs.syncExecuteCommand("sheet.mutation.re-calc-filter", { unitId: u, subUnitId: s }, { onlyLocal: true });
|
|
4350
|
+
} catch {
|
|
4351
|
+
}
|
|
4352
|
+
}
|
|
4353
|
+
});
|
|
4354
|
+
};
|
|
4334
4355
|
const followSelection = (m) => {
|
|
4335
4356
|
const sel = o.selections;
|
|
4336
4357
|
if (!sel || !axisOpOf(m) && !RESHAPE.has(m.id)) return;
|
|
@@ -4373,12 +4394,7 @@ function univerSheetsOtPort(o) {
|
|
|
4373
4394
|
const now = filterOf(sheet);
|
|
4374
4395
|
if (now && !sameRange(filterWas, now)) cs.syncExecuteCommand(FILTER_RANGE, { unitId: u, subUnitId: sheet, range: filterWas }, { onlyLocal: true });
|
|
4375
4396
|
}
|
|
4376
|
-
if (a.id.startsWith("sheet.mutation.set-filter") || isStructuralMutation(a))
|
|
4377
|
-
try {
|
|
4378
|
-
cs.syncExecuteCommand("sheet.mutation.re-calc-filter", { unitId: u, subUnitId: a.params.subUnitId }, { onlyLocal: true });
|
|
4379
|
-
} catch {
|
|
4380
|
-
}
|
|
4381
|
-
}
|
|
4397
|
+
if (a.id.startsWith("sheet.mutation.set-filter") || isStructuralMutation(a)) recalcFilterSoon(sheet);
|
|
4382
4398
|
} finally {
|
|
4383
4399
|
applying = false;
|
|
4384
4400
|
}
|