@ai-matrx/office 0.8.27 → 0.8.29
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 +27 -1
- package/dist/univer-collab.cjs +28 -0
- package/dist/univer-collab.cjs.map +1 -1
- package/dist/univer-collab.d.cts +7 -0
- package/dist/univer-collab.d.ts +7 -0
- package/dist/univer-collab.js +28 -0
- package/dist/univer-collab.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.8.
|
|
3
|
+
## 0.8.29
|
|
4
4
|
|
|
5
5
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
6
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/office/src`.
|
|
7
7
|
|
|
8
|
+
## 0.8.28
|
|
9
|
+
|
|
10
|
+
Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 0c69bc7f5b 01daf620b4 -- apps/shared/office/src`
|
|
11
|
+
has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
|
|
12
|
+
|
|
13
|
+
## 0.8.27
|
|
14
|
+
|
|
15
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
16
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
17
|
+
Diff: `git diff 5f2e7d1bcc 0c69bc7f5b -- apps/shared/office/src`
|
|
18
|
+
|
|
19
|
+
Changed shipped source files (16):
|
|
20
|
+
- `apps/shared/office/src/collab/sheets/comment-anchor-transform.ts`
|
|
21
|
+
- `apps/shared/office/src/collab/sheets/transform/formula.ts`
|
|
22
|
+
- `apps/shared/office/src/collab/sheets/transform/fuzz/corpus.ts`
|
|
23
|
+
- `apps/shared/office/src/collab/sheets/transform/fuzz/seats.ts`
|
|
24
|
+
- `apps/shared/office/src/collab/sheets/transform/ranged-resources.ts`
|
|
25
|
+
- `apps/shared/office/src/collab/sheets/transform/registry.ts`
|
|
26
|
+
- `apps/shared/office/src/collab/sheets/transform/transform.ts`
|
|
27
|
+
- `apps/shared/office/src/docs/comment-anchors.ts`
|
|
28
|
+
- `apps/shared/office/src/docs/document-ot-room.ts`
|
|
29
|
+
- `apps/shared/office/src/sheets/comment-anchors.ts`
|
|
30
|
+
- `apps/shared/office/src/sheets/workbook-ot-room.ts`
|
|
31
|
+
- `apps/shared/office/src/univer/collab/docs-ot/room.ts`
|
|
32
|
+
- ...and 4 more
|
|
33
|
+
|
|
8
34
|
## 0.8.26
|
|
9
35
|
|
|
10
36
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/univer-collab.cjs
CHANGED
|
@@ -4108,6 +4108,7 @@ var ADD_MERGE = "sheet.mutation.add-worksheet-merge";
|
|
|
4108
4108
|
var REMOVE_MERGE = "sheet.mutation.remove-worksheet-merge";
|
|
4109
4109
|
var SHEET_NAME = "sheet.mutation.set-worksheet-name";
|
|
4110
4110
|
var INSERT_SHEET = "sheet.mutation.insert-sheet";
|
|
4111
|
+
var FILTER_RANGE = "sheet.mutation.set-filter-range";
|
|
4111
4112
|
var RESHAPE = /* @__PURE__ */ new Set(["sheet.mutation.set-worksheet-row-count", "sheet.mutation.set-worksheet-column-count", "sheet.mutation.remove-sheet", INSERT_SHEET]);
|
|
4112
4113
|
var UNDO = "univer.command.undo";
|
|
4113
4114
|
var REDO = "univer.command.redo";
|
|
@@ -4149,6 +4150,17 @@ function univerSheetsOtPort(o) {
|
|
|
4149
4150
|
return out;
|
|
4150
4151
|
};
|
|
4151
4152
|
const sheetOrder = () => (o.workbook()?.getSheets() ?? []).map((ws) => ws.getSheetId());
|
|
4153
|
+
const filterOf = (sheet) => {
|
|
4154
|
+
const u = unitId();
|
|
4155
|
+
if (!u || !o.filterRange) return null;
|
|
4156
|
+
try {
|
|
4157
|
+
const r = o.filterRange(u, sheet);
|
|
4158
|
+
return r ? { startRow: r.startRow, endRow: r.endRow, startColumn: r.startColumn, endColumn: r.endColumn } : null;
|
|
4159
|
+
} catch {
|
|
4160
|
+
return null;
|
|
4161
|
+
}
|
|
4162
|
+
};
|
|
4163
|
+
const sameRange = (a, b) => !a && !b || !!a && !!b && a.startRow === b.startRow && a.endRow === b.endRow && a.startColumn === b.startColumn && a.endColumn === b.endColumn;
|
|
4152
4164
|
const openGroup = (label2) => ({ label: label2, order: sheetOrder(), sheets: sheetNames(), names: definedNames(), mutations: [], inverses: [], notShared: null });
|
|
4153
4165
|
const emit = (e) => {
|
|
4154
4166
|
for (const l of [...listeners]) {
|
|
@@ -4198,6 +4210,7 @@ function univerSheetsOtPort(o) {
|
|
|
4198
4210
|
if (copy && "s" in copy) copy.s = styleObject(copy.s);
|
|
4199
4211
|
record.cells.set(`${r}:${c}`, copy);
|
|
4200
4212
|
}
|
|
4213
|
+
record.filter = filterOf(String(p.subUnitId ?? ""));
|
|
4201
4214
|
}
|
|
4202
4215
|
if (info.id === SHEET_NAME) record.name = ws.getName();
|
|
4203
4216
|
pre.set(p, record);
|
|
@@ -4351,6 +4364,15 @@ function univerSheetsOtPort(o) {
|
|
|
4351
4364
|
g.mutations.push(r.m);
|
|
4352
4365
|
g.inverses.push(r.inverse);
|
|
4353
4366
|
}
|
|
4367
|
+
const was = info.id === VALUES ? pre.get(info.params)?.filter : void 0;
|
|
4368
|
+
if (was && !g.notShared) {
|
|
4369
|
+
const sheet = String(info.params.subUnitId ?? "");
|
|
4370
|
+
const now = filterOf(sheet);
|
|
4371
|
+
if (now && !sameRange(was, now)) {
|
|
4372
|
+
g.mutations.push({ id: FILTER_RANGE, params: { subUnitId: sheet, range: json(now), derived: true } });
|
|
4373
|
+
g.inverses.push([{ id: FILTER_RANGE, params: { subUnitId: sheet, range: json(was) } }]);
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4354
4376
|
}
|
|
4355
4377
|
const owedAdd = pre.get(info.params)?.addAfter;
|
|
4356
4378
|
if (owedAdd?.length) runOwn(ADD_MERGE, String(info.params.subUnitId ?? ""), owedAdd, REMOVE_MERGE);
|
|
@@ -4406,8 +4428,14 @@ function univerSheetsOtPort(o) {
|
|
|
4406
4428
|
const a = forApply(m);
|
|
4407
4429
|
applying = true;
|
|
4408
4430
|
try {
|
|
4431
|
+
const sheet = String(a.params.subUnitId ?? "");
|
|
4432
|
+
const filterWas = a.id === VALUES ? filterOf(sheet) : null;
|
|
4409
4433
|
const ok3 = cs.syncExecuteCommand(a.id, { ...json(a.params), unitId: u }, { fromCollab: true });
|
|
4410
4434
|
if (ok3 === false) throw new Error(`"${m.id}" was refused by the editor`);
|
|
4435
|
+
if (filterWas) {
|
|
4436
|
+
const now = filterOf(sheet);
|
|
4437
|
+
if (now && !sameRange(filterWas, now)) cs.syncExecuteCommand(FILTER_RANGE, { unitId: u, subUnitId: sheet, range: filterWas }, { onlyLocal: true });
|
|
4438
|
+
}
|
|
4411
4439
|
if (a.id.startsWith("sheet.mutation.set-filter") || isStructuralMutation(a)) {
|
|
4412
4440
|
try {
|
|
4413
4441
|
cs.syncExecuteCommand("sheet.mutation.re-calc-filter", { unitId: u, subUnitId: a.params.subUnitId }, { onlyLocal: true });
|