@univerjs/sheets-table 0.10.0-nightly.202507310307 → 0.10.1-nightly.202508020912
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +61 -44
- package/lib/es/index.js +360 -339
- package/lib/facade.js +61 -44
- package/lib/index.js +360 -339
- package/lib/types/facade/f-worksheet.d.ts +4 -4
- package/lib/types/types/type.d.ts +8 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
var Ke = Object.defineProperty;
|
|
2
2
|
var Xe = (t, e, n) => e in t ? Ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var b = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { CellValueType as
|
|
5
|
-
import { getSheetCommandTarget as
|
|
6
|
-
import { Subject as Q, BehaviorSubject as ke, filter as
|
|
7
|
-
var
|
|
4
|
+
import { CellValueType as q, BorderStyleTypes as Ze, generateRandomId as L, IUniverInstanceService as W, Inject as C, LocaleService as de, Disposable as k, CommandType as N, IUndoRedoService as A, ICommandService as x, sequenceExecute as B, IResourceManagerService as et, Rectangle as Se, RTree as tt, InterceptorEffectEnum as nt, UniverInstanceType as he, customNameCharacterCheck as rt, ILogService as st, Injector as Be, Plugin as at, merge as ot, registerDependencies as it, touchDependencies as Me, IConfigService as lt } from "@univerjs/core";
|
|
5
|
+
import { getSheetCommandTarget as $, SheetInterceptorService as _e, INTERCEPTOR_POINT as Le, AddRangeThemeMutation as Ee, RemoveRangeThemeMutation as We, SheetRangeThemeModel as He, SheetsSelectionsService as ge, InsertRowMutation as Pe, RemoveRowMutation as Ve, getMoveRangeUndoRedoMutations as me, InsertColMutation as qe, RemoveColMutation as Je, IExclusiveRangeService as ut, RefRangeService as ct, RemoveColCommand as dt, RemoveRowCommand as ht, InsertColCommand as gt, InsertRowCommand as mt, SheetRangeThemeService as bt, RangeThemeStyle as wt } from "@univerjs/sheets";
|
|
6
|
+
import { Subject as Q, BehaviorSubject as ke, filter as be, switchMap as ve } from "rxjs";
|
|
7
|
+
var I = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(I || {}), D = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(D || {}), Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), ee = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ee || {}), U = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(U || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), P = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(P || {}), g = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(g || {}), V = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(V || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
|
|
8
8
|
function Z(t, e) {
|
|
9
9
|
return `${e} ${t}`;
|
|
10
10
|
}
|
|
11
|
-
const Fe = "TRUE", De = "FALSE",
|
|
11
|
+
const Fe = "TRUE", De = "FALSE", Rt = (t) => {
|
|
12
12
|
var n;
|
|
13
13
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
14
14
|
};
|
|
15
15
|
function Ye(t) {
|
|
16
16
|
if (t) {
|
|
17
17
|
const { v: e, t: n, p: r } = t;
|
|
18
|
-
return r ?
|
|
18
|
+
return r ? Rt(r) : (n === q.FORCE_STRING || n === q.STRING) && e !== void 0 && e !== null ? String(e) : n === q.BOOLEAN ? e ? Fe : De : n === q.NUMBER ? String(e) : typeof e === "boolean" ? e ? Fe : De : e == null ? "" : String(e);
|
|
19
19
|
}
|
|
20
20
|
return "";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
if (t
|
|
22
|
+
function ft(t, e) {
|
|
23
|
+
if (t != null)
|
|
24
24
|
switch (e) {
|
|
25
25
|
case G.Asc:
|
|
26
|
-
return
|
|
26
|
+
return V.FilteredSortAsc;
|
|
27
27
|
case G.Desc:
|
|
28
|
-
return
|
|
28
|
+
return V.FilteredSortDesc;
|
|
29
29
|
default:
|
|
30
|
-
return
|
|
30
|
+
return V.FilteredSortNone;
|
|
31
31
|
}
|
|
32
32
|
else
|
|
33
33
|
switch (e) {
|
|
34
34
|
case G.Asc:
|
|
35
|
-
return
|
|
35
|
+
return V.FilterNoneSortAsc;
|
|
36
36
|
case G.Desc:
|
|
37
|
-
return
|
|
37
|
+
return V.FilterNoneSortDesc;
|
|
38
38
|
default:
|
|
39
|
-
return
|
|
39
|
+
return V.FilterNoneSortNone;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function pt(t) {
|
|
43
43
|
return t ? t.filterType === ee.condition : !1;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function tr(t) {
|
|
46
46
|
return t ? t.filterType === ee.manual : !1;
|
|
47
47
|
}
|
|
48
48
|
const y = {
|
|
@@ -50,7 +50,7 @@ const y = {
|
|
|
50
50
|
cl: {
|
|
51
51
|
rgb: "rgb(95 101 116)"
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, nr = {
|
|
54
54
|
headerRowStyle: {
|
|
55
55
|
bd: {
|
|
56
56
|
t: y
|
|
@@ -71,7 +71,7 @@ const y = {
|
|
|
71
71
|
b: y
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, rr = (t, e) => {
|
|
75
75
|
if (t === "headerRowStyle") {
|
|
76
76
|
if (!e.bd)
|
|
77
77
|
return {
|
|
@@ -104,14 +104,14 @@ const y = {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
return e;
|
|
107
|
-
},
|
|
107
|
+
}, St = [
|
|
108
108
|
[["#6280F9", "#FFFFFF", "#BAC6F8", "#D2DAFA"], ["#fff"]],
|
|
109
109
|
[["#16BDCA", "#FFFFFF", "#EDFAFA", "#AFECEF"], ["#000"]],
|
|
110
110
|
[["#31C48D", "#FFFFFF", "#F3FAF7", "#BCF0DA"], ["#fff"]],
|
|
111
111
|
[["#AC94FA", "#FFFFFF", "#F6F5FF", "#EDEBFE"], ["#fff"]],
|
|
112
112
|
[["#F17EBB", "#FFFFFF", "#FDF2F8", "#FCE8F3"], ["#fff"]],
|
|
113
113
|
[["#F98080", "#FFFFFF", "#FDF2F2", "#FDE8E8"], ["#fff"]]
|
|
114
|
-
], Y =
|
|
114
|
+
], Y = St.map((t, e) => {
|
|
115
115
|
const [n, r] = t, [s, a, o, l] = n, [u] = r;
|
|
116
116
|
return {
|
|
117
117
|
name: `table-default-${e}`,
|
|
@@ -158,7 +158,7 @@ const y = {
|
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
});
|
|
161
|
-
class
|
|
161
|
+
class J {
|
|
162
162
|
constructor(e, n) {
|
|
163
163
|
b(this, "dataType");
|
|
164
164
|
b(this, "id");
|
|
@@ -191,45 +191,45 @@ class q {
|
|
|
191
191
|
this.id = e.id, this.displayName = e.displayName, this.dataType = e.dataType, this.formula = e.formula, this.meta = e.meta, this.style = e.style;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
const
|
|
194
|
+
const Ct = (t) => t.getMonth() <= 2, _t = (t) => {
|
|
195
195
|
const e = t.getMonth();
|
|
196
196
|
return e > 2 && e <= 5;
|
|
197
|
-
},
|
|
197
|
+
}, Tt = (t) => {
|
|
198
198
|
const e = t.getMonth();
|
|
199
199
|
return e > 5 && e <= 8;
|
|
200
|
-
},
|
|
200
|
+
}, It = (t) => {
|
|
201
201
|
const e = t.getMonth();
|
|
202
202
|
return e > 8 && e <= 11;
|
|
203
|
-
},
|
|
203
|
+
}, Mt = (t) => t.getMonth() === 0, vt = (t) => t.getMonth() === 1, Ft = (t) => t.getMonth() === 2, Dt = (t) => t.getMonth() === 3, Nt = (t) => t.getMonth() === 4, yt = (t) => t.getMonth() === 5, xt = (t) => t.getMonth() === 6, Ot = (t) => t.getMonth() === 7, Ut = (t) => t.getMonth() === 8, $t = (t) => t.getMonth() === 9, At = (t) => t.getMonth() === 10, Bt = (t) => t.getMonth() === 11, Lt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Et = (t, e = /* @__PURE__ */ new Date()) => {
|
|
204
204
|
const n = new Date(e);
|
|
205
205
|
return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
|
|
206
|
-
},
|
|
206
|
+
}, Wt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
207
207
|
const n = new Date(e);
|
|
208
208
|
return n.setDate(n.getDate() - 1), t.toDateString() === n.toDateString();
|
|
209
209
|
}, j = (t) => {
|
|
210
210
|
const e = t.getDay(), n = t.getDate() - e + (e === 0 ? -6 : 1), r = new Date(t);
|
|
211
211
|
return r.setDate(n), r;
|
|
212
|
-
}, Ge = 10080 * 60 * 1e3,
|
|
212
|
+
}, Ge = 10080 * 60 * 1e3, Ht = (t, e = /* @__PURE__ */ new Date()) => {
|
|
213
213
|
const n = j(t), r = j(e);
|
|
214
214
|
return n.toDateString() === r.toDateString();
|
|
215
|
-
},
|
|
215
|
+
}, Pt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
216
216
|
const n = j(t), r = new Date(j(e).getTime() + Ge);
|
|
217
217
|
return n.toDateString() === r.toDateString();
|
|
218
|
-
},
|
|
218
|
+
}, Vt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
219
219
|
const n = j(t), r = new Date(j(e).getTime() - Ge);
|
|
220
220
|
return n.toDateString() === r.toDateString();
|
|
221
|
-
},
|
|
221
|
+
}, qt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Jt = (t) => {
|
|
222
222
|
const e = new Date(t);
|
|
223
223
|
return e.setHours(0, 0, 0, 0), e.setDate(1), e;
|
|
224
|
-
},
|
|
224
|
+
}, kt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
225
225
|
const n = new Date(e);
|
|
226
226
|
n.setHours(0, 0, 0, 0), n.setMonth(n.getMonth() + 1, 1);
|
|
227
227
|
const r = new Date(n);
|
|
228
228
|
r.setMonth(r.getMonth() + 1, 0);
|
|
229
229
|
const s = t.getTime();
|
|
230
230
|
return s >= n.getTime() && s < r.getTime();
|
|
231
|
-
},
|
|
232
|
-
const n =
|
|
231
|
+
}, Qt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
232
|
+
const n = Jt(e), r = new Date(n);
|
|
233
233
|
r.setMonth(r.getMonth() + 1, 0);
|
|
234
234
|
const s = t.getTime();
|
|
235
235
|
return s >= n.getTime() && s < r.getTime();
|
|
@@ -238,32 +238,32 @@ const ft = (t) => t.getMonth() <= 2, Ct = (t) => {
|
|
|
238
238
|
e.setHours(0, 0, 0, 0), e.setDate(1);
|
|
239
239
|
const n = e.getMonth();
|
|
240
240
|
return e.setMonth(n - n % 3), e;
|
|
241
|
-
},
|
|
241
|
+
}, Yt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
242
242
|
const n = Te(e), r = new Date(n);
|
|
243
243
|
r.setMonth(r.getMonth() + 3);
|
|
244
244
|
const s = t.getTime();
|
|
245
245
|
return s >= n.getTime() && s < r.getTime();
|
|
246
|
-
},
|
|
246
|
+
}, Gt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
247
247
|
const n = Te(e), r = new Date(n);
|
|
248
248
|
r.setMonth(r.getMonth() + 3);
|
|
249
249
|
const s = new Date(r);
|
|
250
250
|
s.setMonth(s.getMonth() + 3, 0);
|
|
251
251
|
const a = t.getTime();
|
|
252
252
|
return a >= r.getTime() && a < s.getTime();
|
|
253
|
-
},
|
|
253
|
+
}, jt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
254
254
|
const n = Te(e), r = new Date(n);
|
|
255
255
|
r.setMonth(r.getMonth() - 3);
|
|
256
256
|
const s = new Date(n);
|
|
257
257
|
s.setDate(0);
|
|
258
258
|
const a = t.getTime();
|
|
259
259
|
return a >= r.getTime() && a < s.getTime();
|
|
260
|
-
},
|
|
260
|
+
}, zt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), Kt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, Xt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, Zt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
261
261
|
const n = new Date(e);
|
|
262
262
|
n.setHours(0, 0, 0, 0), n.setMonth(0, 1);
|
|
263
263
|
const r = t.getTime();
|
|
264
264
|
return r >= n.getTime() && r < e.getTime();
|
|
265
265
|
};
|
|
266
|
-
function
|
|
266
|
+
function en(t) {
|
|
267
267
|
switch (t.compareType) {
|
|
268
268
|
case g.Equal: {
|
|
269
269
|
const e = new Date(t.expectedValue);
|
|
@@ -301,105 +301,105 @@ function Xt(t) {
|
|
|
301
301
|
};
|
|
302
302
|
case g.Today: {
|
|
303
303
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
304
|
-
return (n) =>
|
|
304
|
+
return (n) => Lt(n, e);
|
|
305
305
|
}
|
|
306
306
|
case g.Yesterday: {
|
|
307
307
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
308
|
-
return (n) =>
|
|
308
|
+
return (n) => Wt(n, e);
|
|
309
309
|
}
|
|
310
310
|
case g.Tomorrow: {
|
|
311
311
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
312
|
-
return (n) =>
|
|
312
|
+
return (n) => Et(n, e);
|
|
313
313
|
}
|
|
314
314
|
case g.ThisWeek: {
|
|
315
315
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
316
|
-
return (n) =>
|
|
316
|
+
return (n) => Ht(n, e);
|
|
317
317
|
}
|
|
318
318
|
case g.LastWeek: {
|
|
319
319
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
320
|
-
return (n) =>
|
|
320
|
+
return (n) => Vt(n, e);
|
|
321
321
|
}
|
|
322
322
|
case g.NextWeek: {
|
|
323
323
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
324
|
-
return (n) =>
|
|
324
|
+
return (n) => Pt(n, e);
|
|
325
325
|
}
|
|
326
326
|
case g.ThisMonth: {
|
|
327
327
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
328
|
-
return (n) =>
|
|
328
|
+
return (n) => qt(n, e);
|
|
329
329
|
}
|
|
330
330
|
case g.LastMonth: {
|
|
331
331
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
332
|
-
return (n) =>
|
|
332
|
+
return (n) => Qt(n, e);
|
|
333
333
|
}
|
|
334
334
|
case g.NextMonth: {
|
|
335
335
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
336
|
-
return (n) =>
|
|
336
|
+
return (n) => kt(n, e);
|
|
337
337
|
}
|
|
338
338
|
case g.ThisQuarter: {
|
|
339
339
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
340
|
-
return (n) =>
|
|
340
|
+
return (n) => Yt(n, e);
|
|
341
341
|
}
|
|
342
342
|
case g.LastQuarter: {
|
|
343
343
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
344
|
-
return (n) =>
|
|
344
|
+
return (n) => jt(n, e);
|
|
345
345
|
}
|
|
346
346
|
case g.NextQuarter: {
|
|
347
347
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
348
|
-
return (n) =>
|
|
348
|
+
return (n) => Gt(n, e);
|
|
349
349
|
}
|
|
350
350
|
case g.ThisYear: {
|
|
351
351
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
352
|
-
return (n) =>
|
|
352
|
+
return (n) => zt(n, e);
|
|
353
353
|
}
|
|
354
354
|
case g.LastYear: {
|
|
355
355
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
356
|
-
return (n) =>
|
|
356
|
+
return (n) => Xt(n, e);
|
|
357
357
|
}
|
|
358
358
|
case g.NextYear: {
|
|
359
359
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
360
|
-
return (n) =>
|
|
360
|
+
return (n) => Kt(n, e);
|
|
361
361
|
}
|
|
362
362
|
case g.YearToDate: {
|
|
363
363
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
364
|
-
return (n) =>
|
|
364
|
+
return (n) => Zt(n, e);
|
|
365
365
|
}
|
|
366
366
|
case g.M1:
|
|
367
|
-
return
|
|
367
|
+
return Mt;
|
|
368
368
|
case g.M2:
|
|
369
|
-
return
|
|
369
|
+
return vt;
|
|
370
370
|
case g.M3:
|
|
371
|
-
return
|
|
371
|
+
return Ft;
|
|
372
372
|
case g.M4:
|
|
373
|
-
return
|
|
373
|
+
return Dt;
|
|
374
374
|
case g.M5:
|
|
375
|
-
return
|
|
375
|
+
return Nt;
|
|
376
376
|
case g.M6:
|
|
377
|
-
return
|
|
377
|
+
return yt;
|
|
378
378
|
case g.M7:
|
|
379
|
-
return
|
|
379
|
+
return xt;
|
|
380
380
|
case g.M8:
|
|
381
|
-
return
|
|
381
|
+
return Ot;
|
|
382
382
|
case g.M9:
|
|
383
|
-
return
|
|
383
|
+
return Ut;
|
|
384
384
|
case g.M10:
|
|
385
|
-
return
|
|
385
|
+
return $t;
|
|
386
386
|
case g.M11:
|
|
387
|
-
return
|
|
387
|
+
return At;
|
|
388
388
|
case g.M12:
|
|
389
|
-
return
|
|
389
|
+
return Bt;
|
|
390
390
|
case g.Q1:
|
|
391
|
-
return ft;
|
|
392
|
-
case g.Q2:
|
|
393
391
|
return Ct;
|
|
392
|
+
case g.Q2:
|
|
393
|
+
return _t;
|
|
394
394
|
case g.Q3:
|
|
395
|
-
return
|
|
395
|
+
return Tt;
|
|
396
396
|
case g.Q4:
|
|
397
|
-
return
|
|
397
|
+
return It;
|
|
398
398
|
default:
|
|
399
399
|
throw new Error("Unsupported compare type");
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class tn {
|
|
403
403
|
/**
|
|
404
404
|
* Initializes a new instance of the Heap class.
|
|
405
405
|
*/
|
|
@@ -463,7 +463,7 @@ class Zt {
|
|
|
463
463
|
return this.heap.includes(e);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class nn extends tn {
|
|
467
467
|
/**
|
|
468
468
|
* Initializes a new instance of the MinHeap class.
|
|
469
469
|
*/
|
|
@@ -502,13 +502,13 @@ class en extends Zt {
|
|
|
502
502
|
this.heap[0] = this.heap.pop(), this.shiftDown(0);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
const n = new
|
|
505
|
+
const rn = (t, e) => {
|
|
506
|
+
const n = new nn();
|
|
507
507
|
for (const r of t)
|
|
508
508
|
n.insert(r), n.size() > e && n.pop();
|
|
509
509
|
return n.heap;
|
|
510
|
-
},
|
|
511
|
-
function
|
|
510
|
+
}, sn = (t, e) => t > e, an = (t, e) => t < e, on = (t, e, n) => rn(t, e).includes(n);
|
|
511
|
+
function ln(t, e) {
|
|
512
512
|
switch (t.compareType) {
|
|
513
513
|
case F.Equal: {
|
|
514
514
|
const n = Number(t.expectedValue);
|
|
@@ -544,94 +544,94 @@ function an(t, e) {
|
|
|
544
544
|
}
|
|
545
545
|
case F.Above: {
|
|
546
546
|
const n = e.average;
|
|
547
|
-
return (r) =>
|
|
547
|
+
return (r) => sn(r, n);
|
|
548
548
|
}
|
|
549
549
|
case F.Below: {
|
|
550
550
|
const n = e.average;
|
|
551
|
-
return (r) =>
|
|
551
|
+
return (r) => an(r, n);
|
|
552
552
|
}
|
|
553
553
|
case F.TopN: {
|
|
554
554
|
const n = e.list, r = Number(t.expectedValue);
|
|
555
|
-
return (s) =>
|
|
555
|
+
return (s) => on(n, r, s);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
const K = (t) => {
|
|
560
560
|
const n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\*/g, ".*").replace(/\\\?/g, ".");
|
|
561
561
|
return new RegExp(`^${n}$`);
|
|
562
|
-
},
|
|
563
|
-
function
|
|
562
|
+
}, un = (t, e) => K(e).test(t), cn = (t, e) => !K(e).test(t), dn = (t, e) => K(`*${e}*`).test(t), hn = (t, e) => !K(`*${e}*`).test(t), gn = (t, e) => K(`${e}*`).test(t), mn = (t, e) => K(`*${e}`).test(t);
|
|
563
|
+
function bn(t) {
|
|
564
564
|
switch (t.compareType) {
|
|
565
|
-
case
|
|
566
|
-
return (e) => on(e, t.expectedValue);
|
|
567
|
-
case H.NotEqual:
|
|
568
|
-
return (e) => ln(e, t.expectedValue);
|
|
569
|
-
case H.Contains:
|
|
565
|
+
case P.Equal:
|
|
570
566
|
return (e) => un(e, t.expectedValue);
|
|
571
|
-
case
|
|
567
|
+
case P.NotEqual:
|
|
572
568
|
return (e) => cn(e, t.expectedValue);
|
|
573
|
-
case
|
|
569
|
+
case P.Contains:
|
|
574
570
|
return (e) => dn(e, t.expectedValue);
|
|
575
|
-
case
|
|
571
|
+
case P.NotContains:
|
|
576
572
|
return (e) => hn(e, t.expectedValue);
|
|
573
|
+
case P.StartsWith:
|
|
574
|
+
return (e) => gn(e, t.expectedValue);
|
|
575
|
+
case P.EndsWith:
|
|
576
|
+
return (e) => mn(e, t.expectedValue);
|
|
577
577
|
default:
|
|
578
578
|
return console.error(`Unknown filter operator: ${t.compareType}`), (e) => !0;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const wn = /* @__PURE__ */ new Set([
|
|
582
582
|
F.Above,
|
|
583
583
|
F.Below,
|
|
584
584
|
F.TopN
|
|
585
585
|
]);
|
|
586
586
|
g.Today, g.Yesterday, g.Tomorrow, g.ThisWeek, g.LastWeek, g.NextWeek, g.ThisMonth, g.LastMonth, g.NextMonth, g.ThisQuarter, g.LastQuarter, g.NextQuarter, g.NextYear, g.ThisYear, g.LastYear, g.YearToDate;
|
|
587
587
|
function je(t) {
|
|
588
|
-
return
|
|
588
|
+
return wn.has(t);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Rn(t, e) {
|
|
591
591
|
if (je(t.filterInfo.compareType))
|
|
592
592
|
return (n) => !0;
|
|
593
593
|
switch (t.filterInfo.conditionType) {
|
|
594
|
-
case
|
|
595
|
-
return
|
|
596
|
-
case
|
|
597
|
-
return
|
|
598
|
-
case
|
|
599
|
-
return
|
|
600
|
-
case
|
|
594
|
+
case U.Date:
|
|
595
|
+
return en(t.filterInfo);
|
|
596
|
+
case U.Number:
|
|
597
|
+
return ln(t.filterInfo, e);
|
|
598
|
+
case U.String:
|
|
599
|
+
return bn(t.filterInfo);
|
|
600
|
+
case U.Logic:
|
|
601
601
|
default:
|
|
602
602
|
return (n) => !0;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function oe(t, e, n, r) {
|
|
606
606
|
switch (r) {
|
|
607
|
-
case
|
|
607
|
+
case U.Date: {
|
|
608
608
|
const s = Ne(t, e, n);
|
|
609
|
-
return s ?
|
|
609
|
+
return s ? Sn(s) : null;
|
|
610
610
|
}
|
|
611
|
-
case
|
|
611
|
+
case U.Number:
|
|
612
612
|
return Ne(t, e, n);
|
|
613
|
-
case
|
|
613
|
+
case U.String:
|
|
614
614
|
default:
|
|
615
|
-
return
|
|
615
|
+
return pn(t, e, n);
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const fn = (t) => {
|
|
619
619
|
var n;
|
|
620
620
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
621
621
|
};
|
|
622
|
-
function
|
|
622
|
+
function pn(t, e, n) {
|
|
623
623
|
const r = t.getCell(e, n);
|
|
624
624
|
if (!r) return null;
|
|
625
625
|
const { v: s, t: a, p: o } = r;
|
|
626
|
-
return o ?
|
|
626
|
+
return o ? fn(o) : typeof s == "string" ? a === q.BOOLEAN ? s.toUpperCase() : s : typeof s == "number" ? a === q.BOOLEAN ? s ? "TRUE" : "FALSE" : s : typeof s == "boolean" ? s ? "TRUE" : "FALSE" : s === void 0 ? "(空白)" : String(s);
|
|
627
627
|
}
|
|
628
628
|
function Ne(t, e, n) {
|
|
629
629
|
const r = t.getCell(e, n);
|
|
630
630
|
if (!r) return null;
|
|
631
631
|
const { v: s, t: a, p: o } = r;
|
|
632
|
-
return o ? null : typeof s == "string" && a ===
|
|
632
|
+
return o ? null : typeof s == "string" && a === q.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(s);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Sn(t) {
|
|
635
635
|
const e = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), n = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
|
|
636
636
|
let r = t - 1;
|
|
637
637
|
return r > (n.getTime() - e.getTime()) / (1e3 * 3600 * 24) && (r -= 1), r < 0 && (r = t), new Date(e.getTime() + r * (1e3 * 3600 * 24));
|
|
@@ -655,7 +655,7 @@ class ye {
|
|
|
655
655
|
getFilterState(e) {
|
|
656
656
|
var r;
|
|
657
657
|
const n = ((r = this._tableSortInfo) == null ? void 0 : r.columnIndex) === e ? this._tableSortInfo.sortState : G.None;
|
|
658
|
-
return
|
|
658
|
+
return ft(this._tableColumnFilterList[e], n);
|
|
659
659
|
}
|
|
660
660
|
getSortState() {
|
|
661
661
|
var e;
|
|
@@ -681,7 +681,7 @@ class ye {
|
|
|
681
681
|
if (a && e) {
|
|
682
682
|
const { startRow: o, endRow: l, startColumn: u } = n, i = u + r, h = this.getExecuteFunc(e, n, r, a);
|
|
683
683
|
for (let d = o; d <= l; d++) {
|
|
684
|
-
const c =
|
|
684
|
+
const c = pt(a) ? a.filterInfo.conditionType : U.String;
|
|
685
685
|
oe(e, d, i, c) === null ? s.add(d) : h(oe(e, d, i, c)) || s.add(d);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
@@ -690,7 +690,7 @@ class ye {
|
|
|
690
690
|
const { startRow: s, endRow: a, startColumn: o } = n, l = o + r, u = [];
|
|
691
691
|
let i = 0, h = 0;
|
|
692
692
|
for (let d = s; d <= a; d++) {
|
|
693
|
-
const c = oe(e, d, l,
|
|
693
|
+
const c = oe(e, d, l, U.Number);
|
|
694
694
|
c !== null && (u.push(c), i++, h += c);
|
|
695
695
|
}
|
|
696
696
|
return {
|
|
@@ -704,7 +704,7 @@ class ye {
|
|
|
704
704
|
return (o) => a.has(o);
|
|
705
705
|
} else if (s.filterType === ee.condition) {
|
|
706
706
|
const o = je(s.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, r) : void 0;
|
|
707
|
-
return
|
|
707
|
+
return Rn(s, o);
|
|
708
708
|
} else
|
|
709
709
|
return (a) => !0;
|
|
710
710
|
}
|
|
@@ -744,13 +744,13 @@ class xe {
|
|
|
744
744
|
var r;
|
|
745
745
|
if (this._tableStyleId = n == null ? void 0 : n.tableStyleId, this._showHeader = (r = n == null ? void 0 : n.showHeader) != null ? r : !0, this._showFooter = !1, n.columns)
|
|
746
746
|
n.columns.forEach((s) => {
|
|
747
|
-
const a = s.id || L(), o = new
|
|
747
|
+
const a = s.id || L(), o = new J(a, s.displayName);
|
|
748
748
|
o.fromJSON(s), this._columns.set(a, o), this._columnOrder.push(a);
|
|
749
749
|
});
|
|
750
750
|
else {
|
|
751
751
|
const s = this.getRange(), a = s.startColumn, o = s.endColumn;
|
|
752
752
|
for (let l = a; l <= o; l++) {
|
|
753
|
-
const u = L(), i = new
|
|
753
|
+
const u = L(), i = new J(u, e[l - a]);
|
|
754
754
|
this._columns.set(u, i), this._columnOrder.push(u);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
@@ -778,7 +778,7 @@ class xe {
|
|
|
778
778
|
}
|
|
779
779
|
setColumns(e) {
|
|
780
780
|
this._columns.clear(), this._columnOrder = [], e.forEach((n) => {
|
|
781
|
-
const r = new
|
|
781
|
+
const r = new J(n.id, n.displayName);
|
|
782
782
|
r.fromJSON(n), this._columns.set(n.id, r), this._columnOrder.push(n.id);
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -901,7 +901,7 @@ class xe {
|
|
|
901
901
|
}
|
|
902
902
|
fromJSON(e) {
|
|
903
903
|
this._id = e.id, this._name = e.name, this._range = e.range, this.tableMeta = e.meta, this._tableStyleId = e.options.tableStyleId || "", this._showHeader = e.options.showHeader || !0, this._showFooter = e.options.showFooter || !0, e.columns.forEach((r) => {
|
|
904
|
-
const s = new
|
|
904
|
+
const s = new J(r.id, r.displayName);
|
|
905
905
|
s.fromJSON(r), this._columns.set(r.id, s), this._columnOrder.push(r.id);
|
|
906
906
|
}), this._tableFilters = new ye(), this._tableFilters.fromJSON(e.filters);
|
|
907
907
|
}
|
|
@@ -909,8 +909,8 @@ class xe {
|
|
|
909
909
|
this._id = "", this._name = "", this._tableStyleId = "", this._showHeader = !0, this._showFooter = !0, delete this._range, this._columns.clear(), this._columnOrder = [];
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
var
|
|
913
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
912
|
+
var Cn = Object.getOwnPropertyDescriptor, _n = (t, e, n, r) => {
|
|
913
|
+
for (var s = r > 1 ? void 0 : r ? Cn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
914
914
|
(o = t[a]) && (s = o(s) || s);
|
|
915
915
|
return s;
|
|
916
916
|
}, Oe = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -1068,16 +1068,16 @@ let _ = class extends k {
|
|
|
1068
1068
|
const s = this.getTableById(e, n);
|
|
1069
1069
|
if (!s) return;
|
|
1070
1070
|
const { operationType: a, rowColType: o, index: l, count: u, columnsJson: i } = r, h = s.getRange(), d = { ...h };
|
|
1071
|
-
if (a ===
|
|
1071
|
+
if (a === I.Insert) {
|
|
1072
1072
|
if (o === "row")
|
|
1073
1073
|
d.endRow += u;
|
|
1074
1074
|
else if (o === "column") {
|
|
1075
1075
|
d.endColumn += u;
|
|
1076
1076
|
for (let c = 0; c < u; c++) {
|
|
1077
|
-
const m = this._localeService.t("sheets-table.columnPrefix"),
|
|
1078
|
-
i != null && i[c] &&
|
|
1077
|
+
const m = this._localeService.t("sheets-table.columnPrefix"), S = new J(L(), Z(s.getColumnsCount() + 1 + c, m));
|
|
1078
|
+
i != null && i[c] && S.fromJSON(i[c]);
|
|
1079
1079
|
const w = l + c - h.startColumn;
|
|
1080
|
-
s.insertColumn(w,
|
|
1080
|
+
s.insertColumn(w, S);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
} else if (o === "row")
|
|
@@ -1104,7 +1104,7 @@ let _ = class extends k {
|
|
|
1104
1104
|
if (o.startColumn < a.startColumn) {
|
|
1105
1105
|
const l = a.startColumn - o.startColumn, u = this._localeService.t("sheets-table.columnPrefix");
|
|
1106
1106
|
for (let i = 0; i < l; i++)
|
|
1107
|
-
s.insertColumn(a.startColumn, new
|
|
1107
|
+
s.insertColumn(a.startColumn, new J(L(), Z(s.getColumnsCount() + 1, u)));
|
|
1108
1108
|
} else if (o.startColumn > a.startColumn) {
|
|
1109
1109
|
const l = o.startColumn - a.startColumn;
|
|
1110
1110
|
for (let u = l - 1; u >= 0; u--) {
|
|
@@ -1121,7 +1121,7 @@ let _ = class extends k {
|
|
|
1121
1121
|
} else if (o.endColumn > a.endColumn) {
|
|
1122
1122
|
const l = o.endColumn - a.endColumn;
|
|
1123
1123
|
for (let u = 0; u < l; u++)
|
|
1124
|
-
s.insertColumn(a.endColumn, new
|
|
1124
|
+
s.insertColumn(a.endColumn, new J(L(), Z(s.getColumnsCount() + 1, "Column")));
|
|
1125
1125
|
}
|
|
1126
1126
|
s.setRange(o), this._tableRangeChanged$.next({
|
|
1127
1127
|
unitId: e,
|
|
@@ -1162,17 +1162,30 @@ let _ = class extends k {
|
|
|
1162
1162
|
const n = {}, r = this._tableMap.get(e);
|
|
1163
1163
|
return r && r.forEach((s) => {
|
|
1164
1164
|
const a = s.getSubunitId();
|
|
1165
|
-
|
|
1165
|
+
if (!n[a]) {
|
|
1166
|
+
const o = /* @__PURE__ */ new Set();
|
|
1167
|
+
this.getTablesBySubunitId(e, a).forEach((u) => {
|
|
1168
|
+
const i = u.getTableFilters().getFilterOutRows();
|
|
1169
|
+
if (i)
|
|
1170
|
+
for (const h of i)
|
|
1171
|
+
o.add(h);
|
|
1172
|
+
}), n[a] = {
|
|
1173
|
+
tables: [],
|
|
1174
|
+
tableFilteredOutRows: Array.from(o)
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
n[a].tables.push(s.toJSON());
|
|
1166
1178
|
}), n;
|
|
1167
1179
|
}
|
|
1168
1180
|
fromJSON(e, n) {
|
|
1169
1181
|
const r = this._ensureUnit(e);
|
|
1170
1182
|
Object.keys(n).forEach((a) => {
|
|
1171
|
-
const o =
|
|
1183
|
+
const o = $(this._univerInstanceService, { unitId: e, subUnitId: a });
|
|
1172
1184
|
if (!o)
|
|
1173
1185
|
return;
|
|
1174
1186
|
const l = o.worksheet;
|
|
1175
|
-
|
|
1187
|
+
let u;
|
|
1188
|
+
n[a].tables ? u = n[a].tables : Array.isArray(n[a]) && (u = n[a]), u && u.forEach((i) => {
|
|
1176
1189
|
const h = this.getColumnHeader(e, a, i.range), d = new xe(i.id, i.name, i.range, h, i.options);
|
|
1177
1190
|
if (d.setTableMeta(i.meta), i.columns.length && d.setColumns(i.columns), i.filters) {
|
|
1178
1191
|
const c = d.getTableFilters();
|
|
@@ -1197,15 +1210,15 @@ let _ = class extends k {
|
|
|
1197
1210
|
}), this._tableMap.clear();
|
|
1198
1211
|
}
|
|
1199
1212
|
};
|
|
1200
|
-
_ =
|
|
1201
|
-
Oe(0,
|
|
1202
|
-
Oe(1,
|
|
1213
|
+
_ = _n([
|
|
1214
|
+
Oe(0, W),
|
|
1215
|
+
Oe(1, C(de))
|
|
1203
1216
|
], _);
|
|
1204
|
-
var
|
|
1205
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1217
|
+
var Tn = Object.getOwnPropertyDescriptor, In = (t, e, n, r) => {
|
|
1218
|
+
for (var s = r > 1 ? void 0 : r ? Tn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1206
1219
|
(o = t[a]) && (s = o(s) || s);
|
|
1207
1220
|
return s;
|
|
1208
|
-
},
|
|
1221
|
+
}, Mn = (t, e) => (n, r) => e(n, r, t);
|
|
1209
1222
|
let z = class extends k {
|
|
1210
1223
|
constructor(t) {
|
|
1211
1224
|
super(), this._tableManager = t;
|
|
@@ -1246,12 +1259,12 @@ let z = class extends k {
|
|
|
1246
1259
|
addFilter(t, e, n, r) {
|
|
1247
1260
|
this._tableManager.addFilter(t, e, n, r);
|
|
1248
1261
|
}
|
|
1249
|
-
getCellValueWithConditionType(t, e, n, r =
|
|
1262
|
+
getCellValueWithConditionType(t, e, n, r = U.String) {
|
|
1250
1263
|
return oe(t, e, n, r);
|
|
1251
1264
|
}
|
|
1252
1265
|
};
|
|
1253
|
-
z =
|
|
1254
|
-
|
|
1266
|
+
z = In([
|
|
1267
|
+
Mn(0, C(_))
|
|
1255
1268
|
], z);
|
|
1256
1269
|
const te = {
|
|
1257
1270
|
id: "sheet.mutation.add-table",
|
|
@@ -1267,33 +1280,33 @@ const te = {
|
|
|
1267
1280
|
const { unitId: n, subUnitId: r, tableId: s } = e;
|
|
1268
1281
|
return t.get(z).deleteTable(n, r, s), !0;
|
|
1269
1282
|
}
|
|
1270
|
-
},
|
|
1283
|
+
}, vn = {
|
|
1271
1284
|
id: "sheet.command.add-table",
|
|
1272
1285
|
type: N.COMMAND,
|
|
1273
1286
|
handler: (t, e) => {
|
|
1274
1287
|
var w;
|
|
1275
1288
|
if (!e)
|
|
1276
1289
|
return !1;
|
|
1277
|
-
const n = t.get(
|
|
1290
|
+
const n = t.get(A), r = t.get(x), s = t.get(de), a = (w = e.id) != null ? w : L();
|
|
1278
1291
|
let o = e.name;
|
|
1279
1292
|
if (!o) {
|
|
1280
1293
|
const R = t.get(_).getTableList(e.unitId).length;
|
|
1281
|
-
o = `${s.t("sheets-table.tablePrefix")}
|
|
1294
|
+
o = `${s.t("sheets-table.tablePrefix")}${R + 1}`;
|
|
1282
1295
|
}
|
|
1283
1296
|
const l = [], u = [], i = t.get(_), { unitId: h, subUnitId: d, range: c } = e, m = i.getColumnHeader(h, d, c, s.t("sheets-table.columnPrefix"));
|
|
1284
|
-
return l.push({ id: te.id, params: { ...e, tableId: a, name: o, header: m } }), u.push({ id: ne.id, params: { tableId: a, unitId: e.unitId } }),
|
|
1297
|
+
return l.push({ id: te.id, params: { ...e, tableId: a, name: o, header: m } }), u.push({ id: ne.id, params: { tableId: a, unitId: e.unitId } }), B(l, r) && n.pushUndoRedo({
|
|
1285
1298
|
unitID: e.unitId,
|
|
1286
1299
|
undoMutations: u,
|
|
1287
1300
|
redoMutations: l
|
|
1288
1301
|
}), !0;
|
|
1289
1302
|
}
|
|
1290
|
-
},
|
|
1303
|
+
}, Fn = {
|
|
1291
1304
|
id: "sheet.command.delete-table",
|
|
1292
1305
|
type: N.COMMAND,
|
|
1293
1306
|
handler: (t, e) => {
|
|
1294
1307
|
if (!e)
|
|
1295
1308
|
return !1;
|
|
1296
|
-
const n = t.get(
|
|
1309
|
+
const n = t.get(A), r = t.get(x), s = t.get(_), a = [], o = [], l = s.getTable(e.unitId, e.tableId), u = l == null ? void 0 : l.toJSON();
|
|
1297
1310
|
if (!u)
|
|
1298
1311
|
throw new Error("[TableManager]: Table not found");
|
|
1299
1312
|
return a.push({ id: ne.id, params: { ...e } }), o.push({
|
|
@@ -1306,39 +1319,39 @@ const te = {
|
|
|
1306
1319
|
range: u.range,
|
|
1307
1320
|
options: u.options
|
|
1308
1321
|
}
|
|
1309
|
-
}),
|
|
1322
|
+
}), B(a, r) && n.pushUndoRedo({
|
|
1310
1323
|
unitID: e.unitId,
|
|
1311
1324
|
undoMutations: o,
|
|
1312
1325
|
redoMutations: a
|
|
1313
1326
|
}), !0;
|
|
1314
1327
|
}
|
|
1315
|
-
},
|
|
1328
|
+
}, Ce = {
|
|
1316
1329
|
id: "sheet.mutation.set-table-filter",
|
|
1317
1330
|
type: N.MUTATION,
|
|
1318
1331
|
handler: (t, e) => {
|
|
1319
1332
|
const { tableId: n, unitId: r, column: s, tableFilter: a } = e;
|
|
1320
1333
|
return t.get(_).addFilter(r, n, s, a), !0;
|
|
1321
1334
|
}
|
|
1322
|
-
},
|
|
1335
|
+
}, Dn = {
|
|
1323
1336
|
id: "sheet.command.set-table-filter",
|
|
1324
1337
|
type: N.COMMAND,
|
|
1325
1338
|
handler: (t, e) => {
|
|
1326
1339
|
if (!e)
|
|
1327
1340
|
return !1;
|
|
1328
|
-
const n = t.get(
|
|
1329
|
-
return a.push({ id:
|
|
1341
|
+
const n = t.get(A), r = t.get(x), s = e.tableId || L(), a = [], o = [];
|
|
1342
|
+
return a.push({ id: Ce.id, params: { ...e, tableId: s } }), o.push({ id: Ce.id, params: { ...e, tableId: s, tableFilter: void 0 } }), B(a, r) && n.pushUndoRedo({
|
|
1330
1343
|
unitID: e.unitId,
|
|
1331
1344
|
undoMutations: o,
|
|
1332
1345
|
redoMutations: a
|
|
1333
1346
|
}), !0;
|
|
1334
1347
|
}
|
|
1335
|
-
}, ze = "SHEET_TABLE_PLUGIN", se = "SHEET_TABLE",
|
|
1336
|
-
var
|
|
1337
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1348
|
+
}, ze = "SHEET_TABLE_PLUGIN", se = "SHEET_TABLE", Nn = "table-custom";
|
|
1349
|
+
var yn = Object.getOwnPropertyDescriptor, xn = (t, e, n, r) => {
|
|
1350
|
+
for (var s = r > 1 ? void 0 : r ? yn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1338
1351
|
(o = t[a]) && (s = o(s) || s);
|
|
1339
1352
|
return s;
|
|
1340
|
-
},
|
|
1341
|
-
let
|
|
1353
|
+
}, we = (t, e) => (n, r) => e(n, r, t);
|
|
1354
|
+
let E = class extends k {
|
|
1342
1355
|
constructor(e, n, r) {
|
|
1343
1356
|
super();
|
|
1344
1357
|
b(this, "_tableRangeRTree", /* @__PURE__ */ new Map());
|
|
@@ -1347,7 +1360,7 @@ let W = class extends k {
|
|
|
1347
1360
|
getContainerTableWithRange(e, n, r) {
|
|
1348
1361
|
const s = this._ensureTableRangeRTree(e), o = Array.from(s.bulkSearch([{ unitId: e, sheetId: n, range: r }])).find((l) => {
|
|
1349
1362
|
const u = this._tableManager.getTable(e, String(l));
|
|
1350
|
-
return u ?
|
|
1363
|
+
return u ? Se.contains(u.getRange(), r) : !1;
|
|
1351
1364
|
});
|
|
1352
1365
|
if (o)
|
|
1353
1366
|
return this._tableManager.getTable(e, String(o));
|
|
@@ -1438,7 +1451,7 @@ let W = class extends k {
|
|
|
1438
1451
|
return {};
|
|
1439
1452
|
}
|
|
1440
1453
|
},
|
|
1441
|
-
businesses: [
|
|
1454
|
+
businesses: [he.UNIVER_SHEET],
|
|
1442
1455
|
pluginName: ze,
|
|
1443
1456
|
onLoad: (e, n) => {
|
|
1444
1457
|
this._fromJSON(e, n);
|
|
@@ -1452,11 +1465,11 @@ let W = class extends k {
|
|
|
1452
1465
|
super.dispose(), this._tableRangeRTree.clear();
|
|
1453
1466
|
}
|
|
1454
1467
|
};
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
],
|
|
1468
|
+
E = xn([
|
|
1469
|
+
we(0, C(_e)),
|
|
1470
|
+
we(1, C(_)),
|
|
1471
|
+
we(2, C(et))
|
|
1472
|
+
], E);
|
|
1460
1473
|
const p = {
|
|
1461
1474
|
id: "sheet.mutation.set-sheet-table",
|
|
1462
1475
|
type: N.MUTATION,
|
|
@@ -1466,7 +1479,7 @@ const p = {
|
|
|
1466
1479
|
const { unitId: n, tableId: r, config: s } = e;
|
|
1467
1480
|
return t.get(_).setTableByConfig(n, r, s), !0;
|
|
1468
1481
|
}
|
|
1469
|
-
},
|
|
1482
|
+
}, On = {
|
|
1470
1483
|
id: "sheet.command.add-table-theme",
|
|
1471
1484
|
type: N.COMMAND,
|
|
1472
1485
|
handler: (t, e) => {
|
|
@@ -1476,7 +1489,7 @@ const p = {
|
|
|
1476
1489
|
if (!u) return !1;
|
|
1477
1490
|
const i = u.getSubunitId();
|
|
1478
1491
|
o.push({
|
|
1479
|
-
id:
|
|
1492
|
+
id: Ee.id,
|
|
1480
1493
|
params: {
|
|
1481
1494
|
unitId: r,
|
|
1482
1495
|
subUnitId: i,
|
|
@@ -1503,7 +1516,7 @@ const p = {
|
|
|
1503
1516
|
}
|
|
1504
1517
|
}
|
|
1505
1518
|
}), l.push({
|
|
1506
|
-
id:
|
|
1519
|
+
id: We.id,
|
|
1507
1520
|
params: {
|
|
1508
1521
|
unitId: r,
|
|
1509
1522
|
subUnitId: i,
|
|
@@ -1511,13 +1524,13 @@ const p = {
|
|
|
1511
1524
|
}
|
|
1512
1525
|
});
|
|
1513
1526
|
const h = t.get(x);
|
|
1514
|
-
return
|
|
1527
|
+
return B(o, h) && t.get(A).pushUndoRedo({
|
|
1515
1528
|
unitID: r,
|
|
1516
1529
|
undoMutations: l,
|
|
1517
1530
|
redoMutations: o
|
|
1518
1531
|
}), !0;
|
|
1519
1532
|
}
|
|
1520
|
-
},
|
|
1533
|
+
}, Un = {
|
|
1521
1534
|
id: "sheet.command.remove-table-theme",
|
|
1522
1535
|
type: N.COMMAND,
|
|
1523
1536
|
handler: (t, e) => {
|
|
@@ -1526,41 +1539,49 @@ const p = {
|
|
|
1526
1539
|
const { unitId: n, tableId: r, themeName: s } = e, a = t.get(_), o = t.get(He), l = a.getTableById(n, r);
|
|
1527
1540
|
if (!l) return !1;
|
|
1528
1541
|
const u = l.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith("table-default"));
|
|
1529
|
-
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(
|
|
1530
|
-
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id:
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1542
|
+
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(Nn)).find((R) => R !== s);
|
|
1543
|
+
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id: We.id, params: { unitId: n, subUnitId: u, styleName: s } });
|
|
1544
|
+
const S = o.getDefaultRangeThemeStyle(s);
|
|
1545
|
+
S && (h.push({ id: Ee.id, params: { unitId: n, subUnitId: u, styleJSON: S.toJson() } }), h.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: s } } }));
|
|
1533
1546
|
const w = t.get(x);
|
|
1534
|
-
return
|
|
1547
|
+
return B(i, w) && t.get(A).pushUndoRedo({
|
|
1535
1548
|
unitID: n,
|
|
1536
1549
|
redoMutations: i,
|
|
1537
1550
|
undoMutations: h
|
|
1538
1551
|
}), !0;
|
|
1539
1552
|
}
|
|
1540
|
-
},
|
|
1553
|
+
}, $n = {
|
|
1541
1554
|
id: "sheet.command.set-table-config",
|
|
1542
1555
|
type: N.COMMAND,
|
|
1556
|
+
// eslint-disable-next-line max-lines-per-function
|
|
1543
1557
|
handler: (t, e) => {
|
|
1544
1558
|
if (!e)
|
|
1545
1559
|
return !1;
|
|
1546
1560
|
const { unitId: n, tableId: r, name: s, updateRange: a, rowColOperation: o, theme: l } = e, i = t.get(_).getTableById(n, r);
|
|
1547
1561
|
if (!i) return !1;
|
|
1548
|
-
const h = {}, d = {};
|
|
1549
|
-
|
|
1550
|
-
|
|
1562
|
+
const h = {}, d = {}, c = t.get(de), S = t.get(W).getCurrentUnitOfType(he.UNIVER_SHEET), w = /* @__PURE__ */ new Set();
|
|
1563
|
+
if (S && S.getSheets().forEach((O) => {
|
|
1564
|
+
w.add(O.getName());
|
|
1565
|
+
}), s) {
|
|
1566
|
+
if (!rt(s, w))
|
|
1567
|
+
return t.get(st).warn(c.t("sheets-table.tableNameError")), !1;
|
|
1568
|
+
h.name = i.getDisplayName(), d.name = s;
|
|
1569
|
+
}
|
|
1570
|
+
o && (h.rowColOperation = {
|
|
1571
|
+
operationType: o.operationType === I.Insert ? I.Delete : I.Insert,
|
|
1551
1572
|
rowColType: o.rowColType,
|
|
1552
1573
|
index: o.index,
|
|
1553
1574
|
count: o.count
|
|
1554
1575
|
}, d.rowColOperation = o), a && (h.updateRange = {
|
|
1555
1576
|
newRange: i.getRange()
|
|
1556
1577
|
}, d.updateRange = a), l && (h.theme = i.getTableStyleId(), d.theme = l);
|
|
1557
|
-
const
|
|
1578
|
+
const f = {
|
|
1558
1579
|
unitId: n,
|
|
1559
1580
|
subUnitId: i.getSubunitId(),
|
|
1560
1581
|
tableId: r,
|
|
1561
1582
|
config: d
|
|
1562
1583
|
};
|
|
1563
|
-
return t.get(x).executeCommand(p.id,
|
|
1584
|
+
return t.get(x).executeCommand(p.id, f), t.get(A).pushUndoRedo({
|
|
1564
1585
|
unitID: n,
|
|
1565
1586
|
undoMutations: [
|
|
1566
1587
|
{
|
|
@@ -1576,25 +1597,25 @@ const p = {
|
|
|
1576
1597
|
redoMutations: [
|
|
1577
1598
|
{
|
|
1578
1599
|
id: p.id,
|
|
1579
|
-
params:
|
|
1600
|
+
params: f
|
|
1580
1601
|
}
|
|
1581
1602
|
]
|
|
1582
1603
|
}), !0;
|
|
1583
1604
|
}
|
|
1584
|
-
},
|
|
1605
|
+
}, An = {
|
|
1585
1606
|
id: "sheet.command.table-insert-row",
|
|
1586
1607
|
type: N.COMMAND,
|
|
1587
1608
|
handler: (t) => {
|
|
1588
|
-
const e = t.get(
|
|
1609
|
+
const e = t.get(W), n = $(e);
|
|
1589
1610
|
if (!n)
|
|
1590
1611
|
return !1;
|
|
1591
|
-
const { workbook: r, worksheet: s, unitId: a, subUnitId: o } = n, u = t.get(
|
|
1612
|
+
const { workbook: r, worksheet: s, unitId: a, subUnitId: o } = n, u = t.get(ge).getCurrentSelections();
|
|
1592
1613
|
if (!u.length || u.length > 1)
|
|
1593
1614
|
return !1;
|
|
1594
1615
|
t.get(_);
|
|
1595
|
-
const h = u[0].range, c = t.get(
|
|
1616
|
+
const h = u[0].range, c = t.get(E).getContainerTableWithRange(a, o, h);
|
|
1596
1617
|
if (!c) return !1;
|
|
1597
|
-
const m = h.endRow - h.startRow + 1, w = s.getRowCount() - 1, f = s.getCellMatrix().getDataRange().endRow, R = [],
|
|
1618
|
+
const m = h.endRow - h.startRow + 1, w = s.getRowCount() - 1, f = s.getCellMatrix().getDataRange().endRow, R = [], T = [];
|
|
1598
1619
|
if (w - f < m)
|
|
1599
1620
|
R.push({
|
|
1600
1621
|
id: Pe.id,
|
|
@@ -1618,7 +1639,7 @@ const p = {
|
|
|
1618
1639
|
}
|
|
1619
1640
|
}
|
|
1620
1641
|
}
|
|
1621
|
-
}),
|
|
1642
|
+
}), T.push({
|
|
1622
1643
|
id: p.id,
|
|
1623
1644
|
params: {
|
|
1624
1645
|
unitId: a,
|
|
@@ -1630,7 +1651,7 @@ const p = {
|
|
|
1630
1651
|
}
|
|
1631
1652
|
}
|
|
1632
1653
|
}
|
|
1633
|
-
}),
|
|
1654
|
+
}), T.push({
|
|
1634
1655
|
id: Ve.id,
|
|
1635
1656
|
params: {
|
|
1636
1657
|
unitId: a,
|
|
@@ -1655,7 +1676,7 @@ const p = {
|
|
|
1655
1676
|
}
|
|
1656
1677
|
}
|
|
1657
1678
|
}
|
|
1658
|
-
}),
|
|
1679
|
+
}), T.push({
|
|
1659
1680
|
id: p.id,
|
|
1660
1681
|
params: {
|
|
1661
1682
|
unitId: a,
|
|
@@ -1668,7 +1689,7 @@ const p = {
|
|
|
1668
1689
|
}
|
|
1669
1690
|
}
|
|
1670
1691
|
});
|
|
1671
|
-
const X =
|
|
1692
|
+
const X = me(
|
|
1672
1693
|
t,
|
|
1673
1694
|
{
|
|
1674
1695
|
unitId: a,
|
|
@@ -1691,29 +1712,29 @@ const p = {
|
|
|
1691
1712
|
}
|
|
1692
1713
|
}
|
|
1693
1714
|
);
|
|
1694
|
-
X && (R.push(...X.redos),
|
|
1715
|
+
X && (R.push(...X.redos), T.push(...X.undos));
|
|
1695
1716
|
}
|
|
1696
|
-
const
|
|
1697
|
-
return
|
|
1717
|
+
const O = t.get(x);
|
|
1718
|
+
return B(R, O) && t.get(A).pushUndoRedo({
|
|
1698
1719
|
unitID: a,
|
|
1699
|
-
undoMutations:
|
|
1720
|
+
undoMutations: T,
|
|
1700
1721
|
redoMutations: R
|
|
1701
1722
|
}), !0;
|
|
1702
1723
|
}
|
|
1703
|
-
},
|
|
1724
|
+
}, Bn = {
|
|
1704
1725
|
id: "sheet.command.table-insert-col",
|
|
1705
1726
|
type: N.COMMAND,
|
|
1706
1727
|
handler: (t) => {
|
|
1707
|
-
const e = t.get(
|
|
1728
|
+
const e = t.get(W), n = $(e);
|
|
1708
1729
|
if (!n)
|
|
1709
1730
|
return !1;
|
|
1710
|
-
const { worksheet: r, unitId: s, subUnitId: a } = n, l = t.get(
|
|
1731
|
+
const { worksheet: r, unitId: s, subUnitId: a } = n, l = t.get(ge).getCurrentSelections();
|
|
1711
1732
|
if (!l.length || l.length > 1)
|
|
1712
1733
|
return !1;
|
|
1713
|
-
const i = l[0].range, d = t.get(
|
|
1734
|
+
const i = l[0].range, d = t.get(E).getContainerTableWithRange(s, a, i);
|
|
1714
1735
|
if (!d) return !1;
|
|
1715
|
-
const c = i.endColumn - i.startColumn + 1,
|
|
1716
|
-
if (
|
|
1736
|
+
const c = i.endColumn - i.startColumn + 1, S = r.getColumnCount() - 1, w = r.getCellMatrix().getDataRange().endColumn, f = [], R = [];
|
|
1737
|
+
if (S - w < c)
|
|
1717
1738
|
f.push({
|
|
1718
1739
|
id: qe.id,
|
|
1719
1740
|
params: {
|
|
@@ -1729,7 +1750,7 @@ const p = {
|
|
|
1729
1750
|
tableId: d.getId(),
|
|
1730
1751
|
config: {
|
|
1731
1752
|
rowColOperation: {
|
|
1732
|
-
operationType:
|
|
1753
|
+
operationType: I.Insert,
|
|
1733
1754
|
rowColType: D.Col,
|
|
1734
1755
|
index: i.startColumn,
|
|
1735
1756
|
count: c
|
|
@@ -1744,7 +1765,7 @@ const p = {
|
|
|
1744
1765
|
tableId: d.getId(),
|
|
1745
1766
|
config: {
|
|
1746
1767
|
rowColOperation: {
|
|
1747
|
-
operationType:
|
|
1768
|
+
operationType: I.Delete,
|
|
1748
1769
|
rowColType: D.Col,
|
|
1749
1770
|
index: i.startColumn,
|
|
1750
1771
|
count: c
|
|
@@ -1769,7 +1790,7 @@ const p = {
|
|
|
1769
1790
|
tableId: d.getId(),
|
|
1770
1791
|
config: {
|
|
1771
1792
|
rowColOperation: {
|
|
1772
|
-
operationType:
|
|
1793
|
+
operationType: I.Insert,
|
|
1773
1794
|
rowColType: D.Col,
|
|
1774
1795
|
index: i.startColumn,
|
|
1775
1796
|
count: c
|
|
@@ -1784,7 +1805,7 @@ const p = {
|
|
|
1784
1805
|
tableId: d.getId(),
|
|
1785
1806
|
config: {
|
|
1786
1807
|
rowColOperation: {
|
|
1787
|
-
operationType:
|
|
1808
|
+
operationType: I.Delete,
|
|
1788
1809
|
rowColType: D.Col,
|
|
1789
1810
|
index: i.startColumn,
|
|
1790
1811
|
count: c
|
|
@@ -1792,7 +1813,7 @@ const p = {
|
|
|
1792
1813
|
}
|
|
1793
1814
|
}
|
|
1794
1815
|
});
|
|
1795
|
-
const M =
|
|
1816
|
+
const M = me(
|
|
1796
1817
|
t,
|
|
1797
1818
|
{
|
|
1798
1819
|
unitId: s,
|
|
@@ -1817,28 +1838,28 @@ const p = {
|
|
|
1817
1838
|
);
|
|
1818
1839
|
M && (f.push(...M.redos), R.push(...M.undos));
|
|
1819
1840
|
}
|
|
1820
|
-
const
|
|
1821
|
-
return
|
|
1841
|
+
const T = t.get(x);
|
|
1842
|
+
return B(f, T) && t.get(A).pushUndoRedo({
|
|
1822
1843
|
unitID: s,
|
|
1823
1844
|
undoMutations: R,
|
|
1824
1845
|
redoMutations: f
|
|
1825
1846
|
}), !0;
|
|
1826
1847
|
}
|
|
1827
|
-
},
|
|
1848
|
+
}, Ln = {
|
|
1828
1849
|
id: "sheet.command.table-remove-row",
|
|
1829
1850
|
type: N.COMMAND,
|
|
1830
1851
|
handler: (t, e) => {
|
|
1831
1852
|
if (!e)
|
|
1832
1853
|
return !1;
|
|
1833
|
-
const n = t.get(
|
|
1854
|
+
const n = t.get(W), r = $(n);
|
|
1834
1855
|
if (!r)
|
|
1835
1856
|
return !1;
|
|
1836
|
-
const { unitId: s, subUnitId: a } = r, l = t.get(
|
|
1857
|
+
const { unitId: s, subUnitId: a } = r, l = t.get(ge).getCurrentSelections();
|
|
1837
1858
|
if (!l.length || l.length > 1)
|
|
1838
1859
|
return !1;
|
|
1839
|
-
const i = l[0].range, d = t.get(
|
|
1860
|
+
const i = l[0].range, d = t.get(E).getContainerTableWithRange(s, a, i);
|
|
1840
1861
|
if (!d) return !1;
|
|
1841
|
-
const c = i.endRow - i.startRow + 1, m = [],
|
|
1862
|
+
const c = i.endRow - i.startRow + 1, m = [], S = [], w = d.getRange();
|
|
1842
1863
|
m.push({
|
|
1843
1864
|
id: p.id,
|
|
1844
1865
|
params: {
|
|
@@ -1854,7 +1875,7 @@ const p = {
|
|
|
1854
1875
|
}
|
|
1855
1876
|
}
|
|
1856
1877
|
}
|
|
1857
|
-
}),
|
|
1878
|
+
}), S.push({
|
|
1858
1879
|
id: p.id,
|
|
1859
1880
|
params: {
|
|
1860
1881
|
unitId: s,
|
|
@@ -1867,7 +1888,7 @@ const p = {
|
|
|
1867
1888
|
}
|
|
1868
1889
|
}
|
|
1869
1890
|
});
|
|
1870
|
-
const R = r.worksheet.getCellMatrix().getDataRange().endRow,
|
|
1891
|
+
const R = r.worksheet.getCellMatrix().getDataRange().endRow, T = me(
|
|
1871
1892
|
t,
|
|
1872
1893
|
{
|
|
1873
1894
|
unitId: s,
|
|
@@ -1890,32 +1911,32 @@ const p = {
|
|
|
1890
1911
|
}
|
|
1891
1912
|
}
|
|
1892
1913
|
);
|
|
1893
|
-
|
|
1894
|
-
const
|
|
1895
|
-
return
|
|
1914
|
+
T && (m.push(...T.redos), S.push(...T.undos));
|
|
1915
|
+
const O = t.get(x);
|
|
1916
|
+
return B(m, O) && t.get(A).pushUndoRedo({
|
|
1896
1917
|
unitID: s,
|
|
1897
|
-
undoMutations:
|
|
1918
|
+
undoMutations: S,
|
|
1898
1919
|
redoMutations: m
|
|
1899
1920
|
}), !0;
|
|
1900
1921
|
}
|
|
1901
|
-
},
|
|
1922
|
+
}, En = {
|
|
1902
1923
|
id: "sheet.command.table-remove-col",
|
|
1903
1924
|
type: N.COMMAND,
|
|
1904
1925
|
handler: (t, e) => {
|
|
1905
1926
|
if (!e)
|
|
1906
1927
|
return !1;
|
|
1907
|
-
const n = t.get(
|
|
1928
|
+
const n = t.get(W), r = $(n);
|
|
1908
1929
|
if (!r)
|
|
1909
1930
|
return !1;
|
|
1910
1931
|
const { workbook: s, unitId: a, subUnitId: o } = r;
|
|
1911
1932
|
t.get(_);
|
|
1912
|
-
const u = t.get(
|
|
1933
|
+
const u = t.get(ge).getCurrentSelections();
|
|
1913
1934
|
if (!u.length || u.length > 1)
|
|
1914
1935
|
return !1;
|
|
1915
|
-
const h = u[0].range, c = t.get(
|
|
1936
|
+
const h = u[0].range, c = t.get(E).getContainerTableWithRange(a, o, h);
|
|
1916
1937
|
if (!c) return !1;
|
|
1917
|
-
const m = h.endColumn - h.startColumn + 1,
|
|
1918
|
-
|
|
1938
|
+
const m = h.endColumn - h.startColumn + 1, S = [], w = [], f = c.getRange();
|
|
1939
|
+
S.push({
|
|
1919
1940
|
id: p.id,
|
|
1920
1941
|
params: {
|
|
1921
1942
|
unitId: a,
|
|
@@ -1923,7 +1944,7 @@ const p = {
|
|
|
1923
1944
|
tableId: c.getId(),
|
|
1924
1945
|
config: {
|
|
1925
1946
|
rowColOperation: {
|
|
1926
|
-
operationType:
|
|
1947
|
+
operationType: I.Delete,
|
|
1927
1948
|
rowColType: D.Col,
|
|
1928
1949
|
index: h.startColumn,
|
|
1929
1950
|
count: m
|
|
@@ -1931,9 +1952,9 @@ const p = {
|
|
|
1931
1952
|
}
|
|
1932
1953
|
}
|
|
1933
1954
|
});
|
|
1934
|
-
const R = [],
|
|
1955
|
+
const R = [], T = h.startColumn - f.startColumn;
|
|
1935
1956
|
for (let re = 0; re < m; re++) {
|
|
1936
|
-
const Ie = c.getTableInfo().columns[
|
|
1957
|
+
const Ie = c.getTableInfo().columns[T + re];
|
|
1937
1958
|
Ie && R.push(Ie);
|
|
1938
1959
|
}
|
|
1939
1960
|
w.push({
|
|
@@ -1944,7 +1965,7 @@ const p = {
|
|
|
1944
1965
|
tableId: c.getId(),
|
|
1945
1966
|
config: {
|
|
1946
1967
|
rowColOperation: {
|
|
1947
|
-
operationType:
|
|
1968
|
+
operationType: I.Insert,
|
|
1948
1969
|
rowColType: D.Col,
|
|
1949
1970
|
index: h.startColumn,
|
|
1950
1971
|
count: m,
|
|
@@ -1953,7 +1974,7 @@ const p = {
|
|
|
1953
1974
|
}
|
|
1954
1975
|
}
|
|
1955
1976
|
});
|
|
1956
|
-
const v = r.worksheet.getCellMatrix().getDataRange().endColumn, M =
|
|
1977
|
+
const v = r.worksheet.getCellMatrix().getDataRange().endColumn, M = me(
|
|
1957
1978
|
t,
|
|
1958
1979
|
{
|
|
1959
1980
|
unitId: a,
|
|
@@ -1976,17 +1997,17 @@ const p = {
|
|
|
1976
1997
|
}
|
|
1977
1998
|
}
|
|
1978
1999
|
);
|
|
1979
|
-
M && (
|
|
2000
|
+
M && (S.push(...M.redos), w.push(...M.undos));
|
|
1980
2001
|
const X = t.get(x);
|
|
1981
|
-
return
|
|
2002
|
+
return B(S, X) && t.get(A).pushUndoRedo({
|
|
1982
2003
|
unitID: a,
|
|
1983
2004
|
undoMutations: w,
|
|
1984
|
-
redoMutations:
|
|
2005
|
+
redoMutations: S
|
|
1985
2006
|
}), !0;
|
|
1986
2007
|
}
|
|
1987
|
-
},
|
|
1988
|
-
var
|
|
1989
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2008
|
+
}, Wn = "sheets-table.config", Ue = {};
|
|
2009
|
+
var Hn = Object.getOwnPropertyDescriptor, Pn = (t, e, n, r) => {
|
|
2010
|
+
for (var s = r > 1 ? void 0 : r ? Hn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1990
2011
|
(o = t[a]) && (s = o(s) || s);
|
|
1991
2012
|
return s;
|
|
1992
2013
|
}, $e = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -2019,15 +2040,15 @@ let ie = class extends k {
|
|
|
2019
2040
|
);
|
|
2020
2041
|
}
|
|
2021
2042
|
};
|
|
2022
|
-
ie =
|
|
2023
|
-
$e(0,
|
|
2024
|
-
$e(1,
|
|
2043
|
+
ie = Pn([
|
|
2044
|
+
$e(0, C(_)),
|
|
2045
|
+
$e(1, C(ut))
|
|
2025
2046
|
], ie);
|
|
2026
|
-
var
|
|
2027
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2047
|
+
var Vn = Object.getOwnPropertyDescriptor, qn = (t, e, n, r) => {
|
|
2048
|
+
for (var s = r > 1 ? void 0 : r ? Vn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2028
2049
|
(o = t[a]) && (s = o(s) || s);
|
|
2029
2050
|
return s;
|
|
2030
|
-
},
|
|
2051
|
+
}, H = (t, e) => (n, r) => e(n, r, t);
|
|
2031
2052
|
let le = class extends k {
|
|
2032
2053
|
constructor(t, e, n, r, s, a, o) {
|
|
2033
2054
|
super(), this._commandService = t, this._refRangeService = e, this._univerInstanceService = n, this._injector = r, this._sheetInterceptorService = s, this._tableManager = a, this._localeService = o, this._initCommandInterceptor(), this._initCommandListener();
|
|
@@ -2038,13 +2059,13 @@ let le = class extends k {
|
|
|
2038
2059
|
getMutations(e) {
|
|
2039
2060
|
const n = { redos: [], undos: [] }, { id: r, params: s } = e;
|
|
2040
2061
|
switch (r) {
|
|
2041
|
-
case
|
|
2062
|
+
case mt.id:
|
|
2042
2063
|
return t._generateTableMutationWithInsertRow(s);
|
|
2043
|
-
case
|
|
2064
|
+
case gt.id:
|
|
2044
2065
|
return t._generateTableMutationWithInsertCol(s);
|
|
2045
|
-
case
|
|
2066
|
+
case ht.id:
|
|
2046
2067
|
return t._generateTableMutationWithRemoveRow(s);
|
|
2047
|
-
case
|
|
2068
|
+
case dt.id:
|
|
2048
2069
|
return t._generateTableMutationWithRemoveCol(s);
|
|
2049
2070
|
}
|
|
2050
2071
|
return n;
|
|
@@ -2052,7 +2073,7 @@ let le = class extends k {
|
|
|
2052
2073
|
});
|
|
2053
2074
|
}
|
|
2054
2075
|
_generateTableMutationWithInsertRow(t) {
|
|
2055
|
-
const e = [], n = [], r =
|
|
2076
|
+
const e = [], n = [], r = $(this._univerInstanceService);
|
|
2056
2077
|
if (!r)
|
|
2057
2078
|
return { undos: e, redos: n };
|
|
2058
2079
|
const { unitId: s, subUnitId: a } = r, o = this._tableManager.getTablesBySubunitId(s, a);
|
|
@@ -2097,7 +2118,7 @@ let le = class extends k {
|
|
|
2097
2118
|
}), { undos: e, redos: n };
|
|
2098
2119
|
}
|
|
2099
2120
|
_generateTableMutationWithInsertCol(t) {
|
|
2100
|
-
const e = [], n = [], r =
|
|
2121
|
+
const e = [], n = [], r = $(this._univerInstanceService);
|
|
2101
2122
|
if (!r)
|
|
2102
2123
|
return { undos: e, redos: n };
|
|
2103
2124
|
const { unitId: s, subUnitId: a } = r, o = this._tableManager.getTablesBySubunitId(s, a);
|
|
@@ -2116,7 +2137,7 @@ let le = class extends k {
|
|
|
2116
2137
|
tableId: u.getId(),
|
|
2117
2138
|
config: {
|
|
2118
2139
|
rowColOperation: {
|
|
2119
|
-
operationType:
|
|
2140
|
+
operationType: I.Insert,
|
|
2120
2141
|
rowColType: D.Col,
|
|
2121
2142
|
index: l.startColumn,
|
|
2122
2143
|
count: h
|
|
@@ -2131,7 +2152,7 @@ let le = class extends k {
|
|
|
2131
2152
|
tableId: u.getId(),
|
|
2132
2153
|
config: {
|
|
2133
2154
|
rowColOperation: {
|
|
2134
|
-
operationType:
|
|
2155
|
+
operationType: I.Delete,
|
|
2135
2156
|
rowColType: D.Col,
|
|
2136
2157
|
index: l.startColumn,
|
|
2137
2158
|
count: h
|
|
@@ -2143,7 +2164,7 @@ let le = class extends k {
|
|
|
2143
2164
|
}), { undos: e, redos: n };
|
|
2144
2165
|
}
|
|
2145
2166
|
_generateTableMutationWithRemoveRow(t) {
|
|
2146
|
-
const e = [], n = [], r = [], s = [], a =
|
|
2167
|
+
const e = [], n = [], r = [], s = [], a = $(this._univerInstanceService);
|
|
2147
2168
|
if (!a)
|
|
2148
2169
|
return { undos: e, redos: n, preRedos: r, preUndos: s };
|
|
2149
2170
|
const { unitId: o, subUnitId: l } = a, u = this._tableManager.getTablesBySubunitId(o, l);
|
|
@@ -2152,7 +2173,7 @@ let le = class extends k {
|
|
|
2152
2173
|
const { range: i } = t, h = i.endRow - i.startRow + 1;
|
|
2153
2174
|
return u.forEach((d) => {
|
|
2154
2175
|
const c = d.getRange();
|
|
2155
|
-
if (
|
|
2176
|
+
if (Se.intersects(c, i))
|
|
2156
2177
|
if (i.startRow <= c.startRow && i.endRow >= c.startRow) {
|
|
2157
2178
|
r.push({
|
|
2158
2179
|
id: ne.id,
|
|
@@ -2236,7 +2257,7 @@ let le = class extends k {
|
|
|
2236
2257
|
}), { undos: e, redos: n, preRedos: r, preUndos: s };
|
|
2237
2258
|
}
|
|
2238
2259
|
_generateTableMutationWithRemoveCol(t) {
|
|
2239
|
-
const e = [], n = [], r = [], s = [], a =
|
|
2260
|
+
const e = [], n = [], r = [], s = [], a = $(this._univerInstanceService);
|
|
2240
2261
|
if (!a)
|
|
2241
2262
|
return { undos: e, redos: n, preRedos: r, preUndos: s };
|
|
2242
2263
|
const { unitId: o, subUnitId: l } = a, u = this._tableManager.getTablesBySubunitId(o, l);
|
|
@@ -2245,7 +2266,7 @@ let le = class extends k {
|
|
|
2245
2266
|
const { range: i } = t, h = i.endColumn - i.startColumn + 1;
|
|
2246
2267
|
return u.forEach((d) => {
|
|
2247
2268
|
const c = d.getRange();
|
|
2248
|
-
if (
|
|
2269
|
+
if (Se.intersects(c, i)) {
|
|
2249
2270
|
if (i.startColumn <= c.startColumn && i.endColumn >= c.endColumn) {
|
|
2250
2271
|
r.push({
|
|
2251
2272
|
id: ne.id,
|
|
@@ -2255,12 +2276,12 @@ let le = class extends k {
|
|
|
2255
2276
|
tableId: d.getId()
|
|
2256
2277
|
}
|
|
2257
2278
|
});
|
|
2258
|
-
const m = d.toJSON(), { startRow:
|
|
2259
|
-
if (!
|
|
2279
|
+
const m = d.toJSON(), { startRow: S, startColumn: w, endColumn: f } = m.range, R = this._univerInstanceService.getUnit(o), T = R == null ? void 0 : R.getSheetBySheetId(l);
|
|
2280
|
+
if (!T)
|
|
2260
2281
|
return { undos: e, redos: n, preRedos: r, preUndos: s };
|
|
2261
|
-
const
|
|
2282
|
+
const O = [];
|
|
2262
2283
|
for (let v = w; v <= f; v++)
|
|
2263
|
-
|
|
2284
|
+
O.push(Ye(T == null ? void 0 : T.getCell(S, v)) || Z(v - w + 1, this._localeService.t("sheets-table.columnPrefix")));
|
|
2264
2285
|
e.push({
|
|
2265
2286
|
id: te.id,
|
|
2266
2287
|
params: {
|
|
@@ -2268,7 +2289,7 @@ let le = class extends k {
|
|
|
2268
2289
|
subUnitId: l,
|
|
2269
2290
|
tableId: m.id,
|
|
2270
2291
|
name: m.name,
|
|
2271
|
-
header:
|
|
2292
|
+
header: O,
|
|
2272
2293
|
range: m.range,
|
|
2273
2294
|
options: m.options
|
|
2274
2295
|
}
|
|
@@ -2283,7 +2304,7 @@ let le = class extends k {
|
|
|
2283
2304
|
tableId: d.getId(),
|
|
2284
2305
|
config: {
|
|
2285
2306
|
rowColOperation: {
|
|
2286
|
-
operationType:
|
|
2307
|
+
operationType: I.Delete,
|
|
2287
2308
|
rowColType: D.Col,
|
|
2288
2309
|
index: c.startColumn,
|
|
2289
2310
|
count: m
|
|
@@ -2291,10 +2312,10 @@ let le = class extends k {
|
|
|
2291
2312
|
}
|
|
2292
2313
|
}
|
|
2293
2314
|
});
|
|
2294
|
-
const
|
|
2315
|
+
const S = [];
|
|
2295
2316
|
for (let w = 0; w < m; w++) {
|
|
2296
2317
|
const f = d.getTableColumnByIndex(w);
|
|
2297
|
-
f &&
|
|
2318
|
+
f && S.push(f.toJSON());
|
|
2298
2319
|
}
|
|
2299
2320
|
e.push({
|
|
2300
2321
|
id: p.id,
|
|
@@ -2304,11 +2325,11 @@ let le = class extends k {
|
|
|
2304
2325
|
tableId: d.getId(),
|
|
2305
2326
|
config: {
|
|
2306
2327
|
rowColOperation: {
|
|
2307
|
-
operationType:
|
|
2328
|
+
operationType: I.Insert,
|
|
2308
2329
|
rowColType: D.Col,
|
|
2309
2330
|
index: c.startColumn,
|
|
2310
2331
|
count: m,
|
|
2311
|
-
columnsJson:
|
|
2332
|
+
columnsJson: S
|
|
2312
2333
|
}
|
|
2313
2334
|
}
|
|
2314
2335
|
}
|
|
@@ -2323,7 +2344,7 @@ let le = class extends k {
|
|
|
2323
2344
|
tableId: d.getId(),
|
|
2324
2345
|
config: {
|
|
2325
2346
|
rowColOperation: {
|
|
2326
|
-
operationType:
|
|
2347
|
+
operationType: I.Delete,
|
|
2327
2348
|
rowColType: D.Col,
|
|
2328
2349
|
index: i.startColumn,
|
|
2329
2350
|
count: m
|
|
@@ -2331,10 +2352,10 @@ let le = class extends k {
|
|
|
2331
2352
|
}
|
|
2332
2353
|
}
|
|
2333
2354
|
});
|
|
2334
|
-
const
|
|
2355
|
+
const S = [], w = i.startColumn - c.startColumn;
|
|
2335
2356
|
for (let f = 0; f < m; f++) {
|
|
2336
2357
|
const R = d.getTableColumnByIndex(f + w);
|
|
2337
|
-
R &&
|
|
2358
|
+
R && S.push(R.toJSON());
|
|
2338
2359
|
}
|
|
2339
2360
|
e.push({
|
|
2340
2361
|
id: p.id,
|
|
@@ -2344,11 +2365,11 @@ let le = class extends k {
|
|
|
2344
2365
|
tableId: d.getId(),
|
|
2345
2366
|
config: {
|
|
2346
2367
|
rowColOperation: {
|
|
2347
|
-
operationType:
|
|
2368
|
+
operationType: I.Insert,
|
|
2348
2369
|
rowColType: D.Col,
|
|
2349
2370
|
index: i.startColumn,
|
|
2350
2371
|
count: h,
|
|
2351
|
-
columnsJson:
|
|
2372
|
+
columnsJson: S
|
|
2352
2373
|
}
|
|
2353
2374
|
}
|
|
2354
2375
|
}
|
|
@@ -2362,7 +2383,7 @@ let le = class extends k {
|
|
|
2362
2383
|
tableId: d.getId(),
|
|
2363
2384
|
config: {
|
|
2364
2385
|
rowColOperation: {
|
|
2365
|
-
operationType:
|
|
2386
|
+
operationType: I.Delete,
|
|
2366
2387
|
rowColType: D.Col,
|
|
2367
2388
|
index: i.startColumn,
|
|
2368
2389
|
count: h
|
|
@@ -2370,9 +2391,9 @@ let le = class extends k {
|
|
|
2370
2391
|
}
|
|
2371
2392
|
}
|
|
2372
2393
|
});
|
|
2373
|
-
const m = [],
|
|
2394
|
+
const m = [], S = i.startColumn - c.startColumn;
|
|
2374
2395
|
for (let w = 0; w < h; w++) {
|
|
2375
|
-
const f = d.getTableColumnByIndex(w +
|
|
2396
|
+
const f = d.getTableColumnByIndex(w + S);
|
|
2376
2397
|
f && m.push(f.toJSON());
|
|
2377
2398
|
}
|
|
2378
2399
|
e.push({
|
|
@@ -2383,7 +2404,7 @@ let le = class extends k {
|
|
|
2383
2404
|
tableId: d.getId(),
|
|
2384
2405
|
config: {
|
|
2385
2406
|
rowColOperation: {
|
|
2386
|
-
operationType:
|
|
2407
|
+
operationType: I.Insert,
|
|
2387
2408
|
rowColType: D.Col,
|
|
2388
2409
|
index: i.startColumn,
|
|
2389
2410
|
count: h,
|
|
@@ -2450,20 +2471,20 @@ let le = class extends k {
|
|
|
2450
2471
|
});
|
|
2451
2472
|
}
|
|
2452
2473
|
};
|
|
2453
|
-
le =
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2474
|
+
le = qn([
|
|
2475
|
+
H(0, C(x)),
|
|
2476
|
+
H(1, C(ct)),
|
|
2477
|
+
H(2, C(W)),
|
|
2478
|
+
H(3, C(Be)),
|
|
2479
|
+
H(4, C(_e)),
|
|
2480
|
+
H(5, C(_)),
|
|
2481
|
+
H(6, C(de))
|
|
2461
2482
|
], le);
|
|
2462
|
-
var
|
|
2463
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2483
|
+
var Jn = Object.getOwnPropertyDescriptor, kn = (t, e, n, r) => {
|
|
2484
|
+
for (var s = r > 1 ? void 0 : r ? Jn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2464
2485
|
(o = t[a]) && (s = o(s) || s);
|
|
2465
2486
|
return s;
|
|
2466
|
-
},
|
|
2487
|
+
}, Re = (t, e) => (n, r) => e(n, r, t);
|
|
2467
2488
|
let ue = class extends k {
|
|
2468
2489
|
constructor(t, e, n) {
|
|
2469
2490
|
super(), this._tableManager = t, this._sheetRangeThemeService = e, this._sheetRangeThemeModel = n, this.registerTableChangeEvent(), this._initDefaultTableTheme();
|
|
@@ -2517,7 +2538,7 @@ let ue = class extends k {
|
|
|
2517
2538
|
}
|
|
2518
2539
|
_initDefaultTableTheme() {
|
|
2519
2540
|
for (let t = 0; t < Y.length; t++) {
|
|
2520
|
-
const { name: e, style: n } = Y[t], r = new
|
|
2541
|
+
const { name: e, style: n } = Y[t], r = new wt(e, n);
|
|
2521
2542
|
this._sheetRangeThemeModel.registerDefaultRangeTheme(r);
|
|
2522
2543
|
}
|
|
2523
2544
|
}
|
|
@@ -2525,16 +2546,16 @@ let ue = class extends k {
|
|
|
2525
2546
|
super.dispose();
|
|
2526
2547
|
}
|
|
2527
2548
|
};
|
|
2528
|
-
ue =
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2549
|
+
ue = kn([
|
|
2550
|
+
Re(0, C(_)),
|
|
2551
|
+
Re(1, C(bt)),
|
|
2552
|
+
Re(2, C(He))
|
|
2532
2553
|
], ue);
|
|
2533
|
-
var
|
|
2534
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2554
|
+
var Qn = Object.getOwnPropertyDescriptor, Yn = (t, e, n, r) => {
|
|
2555
|
+
for (var s = r > 1 ? void 0 : r ? Qn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2535
2556
|
(o = t[a]) && (s = o(s) || s);
|
|
2536
2557
|
return s;
|
|
2537
|
-
},
|
|
2558
|
+
}, fe = (t, e) => (n, r) => e(n, r, t);
|
|
2538
2559
|
let ce = class extends k {
|
|
2539
2560
|
constructor(e, n, r) {
|
|
2540
2561
|
super();
|
|
@@ -2562,13 +2583,13 @@ let ce = class extends k {
|
|
|
2562
2583
|
}
|
|
2563
2584
|
_initFilteredOutRows() {
|
|
2564
2585
|
this._tableManager.tableInitStatus$.pipe(
|
|
2565
|
-
|
|
2566
|
-
ve(() => this._univerInstanceService.getCurrentTypeOfUnit$(
|
|
2567
|
-
|
|
2586
|
+
be((e) => e),
|
|
2587
|
+
ve(() => this._univerInstanceService.getCurrentTypeOfUnit$(he.UNIVER_SHEET)),
|
|
2588
|
+
be((e) => e != null),
|
|
2568
2589
|
ve((e) => e.activeSheet$),
|
|
2569
|
-
|
|
2590
|
+
be((e) => e != null)
|
|
2570
2591
|
).subscribe(() => {
|
|
2571
|
-
const e =
|
|
2592
|
+
const e = $(this._univerInstanceService);
|
|
2572
2593
|
if (!e)
|
|
2573
2594
|
return;
|
|
2574
2595
|
const { unitId: n, subUnitId: r } = e;
|
|
@@ -2601,31 +2622,31 @@ let ce = class extends k {
|
|
|
2601
2622
|
super.dispose(), (e = this._subscription) == null || e.unsubscribe();
|
|
2602
2623
|
}
|
|
2603
2624
|
};
|
|
2604
|
-
ce =
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2625
|
+
ce = Yn([
|
|
2626
|
+
fe(0, C(_)),
|
|
2627
|
+
fe(1, C(_e)),
|
|
2628
|
+
fe(2, C(W))
|
|
2608
2629
|
], ce);
|
|
2609
|
-
var
|
|
2610
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2630
|
+
var Gn = Object.getOwnPropertyDescriptor, jn = (t, e, n, r) => {
|
|
2631
|
+
for (var s = r > 1 ? void 0 : r ? Gn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2611
2632
|
(o = t[a]) && (s = o(s) || s);
|
|
2612
2633
|
return s;
|
|
2613
|
-
},
|
|
2614
|
-
let Ae = (ae = class extends
|
|
2634
|
+
}, pe = (t, e) => (n, r) => e(n, r, t), ae;
|
|
2635
|
+
let Ae = (ae = class extends at {
|
|
2615
2636
|
constructor(t = Ue, e, n, r) {
|
|
2616
2637
|
super(), this._config = t, this._injector = e, this._configService = n, this._commandService = r;
|
|
2617
|
-
const { ...s } =
|
|
2638
|
+
const { ...s } = ot(
|
|
2618
2639
|
{},
|
|
2619
2640
|
Ue,
|
|
2620
2641
|
this._config
|
|
2621
2642
|
);
|
|
2622
|
-
this._configService.setConfig(
|
|
2643
|
+
this._configService.setConfig(Wn, s), this._initRegisterCommand();
|
|
2623
2644
|
}
|
|
2624
2645
|
onStarting() {
|
|
2625
|
-
|
|
2646
|
+
it(this._injector, [
|
|
2626
2647
|
[_],
|
|
2627
2648
|
[ue],
|
|
2628
|
-
[
|
|
2649
|
+
[E],
|
|
2629
2650
|
[z],
|
|
2630
2651
|
[ce],
|
|
2631
2652
|
[ie],
|
|
@@ -2634,7 +2655,7 @@ let Ae = (ae = class extends rt {
|
|
|
2634
2655
|
[ie],
|
|
2635
2656
|
[le],
|
|
2636
2657
|
[ue],
|
|
2637
|
-
[
|
|
2658
|
+
[E],
|
|
2638
2659
|
[z],
|
|
2639
2660
|
[ce]
|
|
2640
2661
|
]);
|
|
@@ -2646,58 +2667,58 @@ let Ae = (ae = class extends rt {
|
|
|
2646
2667
|
}
|
|
2647
2668
|
_initRegisterCommand() {
|
|
2648
2669
|
[
|
|
2649
|
-
|
|
2670
|
+
vn,
|
|
2650
2671
|
te,
|
|
2651
|
-
|
|
2672
|
+
Fn,
|
|
2652
2673
|
ne,
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2674
|
+
Ce,
|
|
2675
|
+
Dn,
|
|
2676
|
+
$n,
|
|
2656
2677
|
p,
|
|
2657
|
-
|
|
2658
|
-
xn,
|
|
2678
|
+
On,
|
|
2659
2679
|
Un,
|
|
2660
|
-
$n,
|
|
2661
2680
|
An,
|
|
2662
|
-
Bn
|
|
2681
|
+
Bn,
|
|
2682
|
+
Ln,
|
|
2683
|
+
En
|
|
2663
2684
|
].forEach((t) => this._commandService.registerCommand(t));
|
|
2664
2685
|
}
|
|
2665
|
-
}, b(ae, "pluginName", ze), b(ae, "type",
|
|
2666
|
-
Ae =
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2686
|
+
}, b(ae, "pluginName", ze), b(ae, "type", he.UNIVER_SHEET), ae);
|
|
2687
|
+
Ae = jn([
|
|
2688
|
+
pe(1, C(Be)),
|
|
2689
|
+
pe(2, lt),
|
|
2690
|
+
pe(3, C(x))
|
|
2670
2691
|
], Ae);
|
|
2671
2692
|
export {
|
|
2672
|
-
|
|
2693
|
+
vn as AddSheetTableCommand,
|
|
2673
2694
|
te as AddSheetTableMutation,
|
|
2674
|
-
|
|
2675
|
-
|
|
2695
|
+
On as AddTableThemeCommand,
|
|
2696
|
+
Fn as DeleteSheetTableCommand,
|
|
2676
2697
|
ne as DeleteSheetTableMutation,
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2698
|
+
Un as RemoveTableThemeCommand,
|
|
2699
|
+
Nn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
|
|
2700
|
+
$n as SetSheetTableCommand,
|
|
2701
|
+
Dn as SetSheetTableFilterCommand,
|
|
2702
|
+
Ce as SetSheetTableFilterMutation,
|
|
2682
2703
|
p as SetSheetTableMutation,
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2704
|
+
Bn as SheetTableInsertColCommand,
|
|
2705
|
+
An as SheetTableInsertRowCommand,
|
|
2706
|
+
En as SheetTableRemoveColCommand,
|
|
2707
|
+
Ln as SheetTableRemoveRowCommand,
|
|
2687
2708
|
z as SheetTableService,
|
|
2688
|
-
|
|
2689
|
-
|
|
2709
|
+
V as SheetsTableButtonStateEnum,
|
|
2710
|
+
E as SheetsTableController,
|
|
2690
2711
|
G as SheetsTableSortStateEnum,
|
|
2691
2712
|
Qe as TableColumnDataTypeEnum,
|
|
2692
2713
|
ee as TableColumnFilterTypeEnum,
|
|
2693
|
-
|
|
2714
|
+
U as TableConditionTypeEnum,
|
|
2694
2715
|
g as TableDateCompareTypeEnum,
|
|
2695
2716
|
_ as TableManager,
|
|
2696
2717
|
F as TableNumberCompareTypeEnum,
|
|
2697
|
-
|
|
2718
|
+
P as TableStringCompareTypeEnum,
|
|
2698
2719
|
Ae as UniverSheetsTablePlugin,
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2720
|
+
nr as customEmptyThemeWithBorderStyle,
|
|
2721
|
+
pt as isConditionFilter,
|
|
2722
|
+
tr as isManualFilter,
|
|
2723
|
+
rr as processStyleWithBorderStyle
|
|
2703
2724
|
};
|