@univerjs/sheets-table 0.10.14 → 0.11.0-nightly.202511151013
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/index.js +1 -1
- package/lib/es/index.js +664 -604
- package/lib/index.js +664 -604
- package/lib/types/controllers/sheet-table-formula.controller.d.ts +9 -0
- package/lib/umd/index.js +1 -1
- package/package.json +6 -5
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (t, e, n) =>
|
|
4
|
-
import { CellValueType as
|
|
5
|
-
import { getSheetCommandTarget as $, SheetInterceptorService as
|
|
6
|
-
import { Subject as Y, BehaviorSubject as
|
|
7
|
-
|
|
1
|
+
var st = Object.defineProperty;
|
|
2
|
+
var rt = (t, e, n) => e in t ? st(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var b = (t, e, n) => rt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { CellValueType as J, BorderStyleTypes as at, createREGEXFromWildChar as Z, generateRandomId as L, IUniverInstanceService as B, Inject as _, LocaleService as be, Disposable as H, CommandType as N, IUndoRedoService as A, ICommandService as D, sequenceExecute as E, ILogService as Le, IResourceManagerService as ot, Rectangle as Re, RTree as it, InterceptorEffectEnum as lt, UniverInstanceType as z, customNameCharacterCheck as ut, Injector as We, IConfigService as He, Plugin as ct, merge as dt, registerDependencies as ht, touchDependencies as Me } from "@univerjs/core";
|
|
5
|
+
import { getSheetCommandTarget as $, SheetInterceptorService as Ce, INTERCEPTOR_POINT as Ve, RemoveSheetCommand as gt, CopySheetCommand as mt, AddRangeThemeMutation as Pe, RemoveRangeThemeMutation as qe, SheetRangeThemeModel as Je, SheetsSelectionsService as we, InsertRowMutation as ke, RemoveRowMutation as Qe, getMoveRangeUndoRedoMutations as fe, InsertColMutation as Ye, RemoveColMutation as Ge, IExclusiveRangeService as bt, RefRangeService as wt, RemoveColCommand as ft, RemoveRowCommand as pt, InsertColCommand as St, InsertRowCommand as Rt, SheetRangeThemeService as _t, RangeThemeStyle as Ct, ZebraCrossingCacheController as Tt } from "@univerjs/sheets";
|
|
6
|
+
import { Subject as Y, BehaviorSubject as ze, filter as pe, switchMap as ve } from "rxjs";
|
|
7
|
+
import { RemoveSuperTableMutation as Fe, SetSuperTableMutation as It } from "@univerjs/engine-formula";
|
|
8
|
+
var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), y = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(y || {}), je = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(je || {}), ne = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ne || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), 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 || {}), m = /* @__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))(m || {}), q = /* @__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))(q || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
|
|
8
9
|
function te(t, e) {
|
|
9
10
|
return `${e} ${t}`;
|
|
10
11
|
}
|
|
11
|
-
const
|
|
12
|
+
const ye = "TRUE", Ne = "FALSE", Mt = (t) => {
|
|
12
13
|
var n;
|
|
13
14
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
+
function Ke(t) {
|
|
16
17
|
if (t) {
|
|
17
18
|
const { v: e, t: n, p: s } = t;
|
|
18
|
-
return s ?
|
|
19
|
+
return s ? Mt(s) : (n === J.FORCE_STRING || n === J.STRING) && e !== void 0 && e !== null ? String(e) : n === J.BOOLEAN ? e ? ye : Ne : n === J.NUMBER ? String(e) : typeof e === "boolean" ? e ? ye : Ne : e == null ? "" : String(e);
|
|
19
20
|
}
|
|
20
21
|
return "";
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function vt(t, e) {
|
|
23
24
|
if (t != null)
|
|
24
25
|
switch (e) {
|
|
25
26
|
case G.Asc:
|
|
26
|
-
return
|
|
27
|
+
return q.FilteredSortAsc;
|
|
27
28
|
case G.Desc:
|
|
28
|
-
return
|
|
29
|
+
return q.FilteredSortDesc;
|
|
29
30
|
default:
|
|
30
|
-
return
|
|
31
|
+
return q.FilteredSortNone;
|
|
31
32
|
}
|
|
32
33
|
else
|
|
33
34
|
switch (e) {
|
|
34
35
|
case G.Asc:
|
|
35
|
-
return
|
|
36
|
+
return q.FilterNoneSortAsc;
|
|
36
37
|
case G.Desc:
|
|
37
|
-
return
|
|
38
|
+
return q.FilterNoneSortDesc;
|
|
38
39
|
default:
|
|
39
|
-
return
|
|
40
|
+
return q.FilterNoneSortNone;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function Ft(t) {
|
|
43
44
|
return t ? t.filterType === ne.condition : !1;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function ds(t) {
|
|
46
47
|
return t ? t.filterType === ne.manual : !1;
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
-
s:
|
|
49
|
+
const x = {
|
|
50
|
+
s: at.THIN,
|
|
50
51
|
cl: {
|
|
51
52
|
rgb: "rgb(95, 101, 116)"
|
|
52
53
|
}
|
|
53
|
-
},
|
|
54
|
+
}, Xe = "sheets-table.config", De = {}, hs = {
|
|
54
55
|
headerRowStyle: {
|
|
55
56
|
bd: {
|
|
56
|
-
t:
|
|
57
|
+
t: x
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
60
|
headerColumnStyle: {
|
|
60
61
|
bd: {
|
|
61
|
-
l:
|
|
62
|
+
l: x
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
lastColumnStyle: {
|
|
65
66
|
bd: {
|
|
66
|
-
r:
|
|
67
|
+
r: x
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
70
|
lastRowStyle: {
|
|
70
71
|
bd: {
|
|
71
|
-
b:
|
|
72
|
+
b: x
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
},
|
|
75
|
+
}, gs = (t, e) => {
|
|
75
76
|
if (t === "headerRowStyle") {
|
|
76
77
|
if (!e.bd)
|
|
77
78
|
return {
|
|
78
79
|
...e,
|
|
79
80
|
bd: {
|
|
80
|
-
t:
|
|
81
|
+
t: x
|
|
81
82
|
}
|
|
82
83
|
};
|
|
83
84
|
} else if (t === "lastRowStyle") {
|
|
@@ -85,7 +86,7 @@ const D = {
|
|
|
85
86
|
return {
|
|
86
87
|
...e,
|
|
87
88
|
bd: {
|
|
88
|
-
b:
|
|
89
|
+
b: x
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
92
|
} else if (t === "lastColumnStyle") {
|
|
@@ -93,26 +94,26 @@ const D = {
|
|
|
93
94
|
return {
|
|
94
95
|
...e,
|
|
95
96
|
bd: {
|
|
96
|
-
r:
|
|
97
|
+
r: x
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
100
|
} else if (t === "headerColumnStyle" && !e.bd)
|
|
100
101
|
return {
|
|
101
102
|
...e,
|
|
102
103
|
bd: {
|
|
103
|
-
l:
|
|
104
|
+
l: x
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
return e;
|
|
107
|
-
},
|
|
108
|
+
}, yt = [
|
|
108
109
|
[["#6280F9", "#FFFFFF", "#BAC6F8", "#D2DAFA"], ["#fff"]],
|
|
109
110
|
[["#16BDCA", "#FFFFFF", "#EDFAFA", "#AFECEF"], ["#000"]],
|
|
110
111
|
[["#31C48D", "#FFFFFF", "#F3FAF7", "#BCF0DA"], ["#fff"]],
|
|
111
112
|
[["#AC94FA", "#FFFFFF", "#F6F5FF", "#EDEBFE"], ["#fff"]],
|
|
112
113
|
[["#F17EBB", "#FFFFFF", "#FDF2F8", "#FCE8F3"], ["#fff"]],
|
|
113
114
|
[["#F98080", "#FFFFFF", "#FDF2F2", "#FDE8E8"], ["#fff"]]
|
|
114
|
-
],
|
|
115
|
-
const [n, s] = t, [r, a, o, u] = n, [
|
|
115
|
+
], Ze = yt.map((t, e) => {
|
|
116
|
+
const [n, s] = t, [r, a, o, u] = n, [l] = s;
|
|
116
117
|
return {
|
|
117
118
|
name: `table-default-${e}`,
|
|
118
119
|
style: {
|
|
@@ -121,15 +122,15 @@ const D = {
|
|
|
121
122
|
rgb: r
|
|
122
123
|
},
|
|
123
124
|
cl: {
|
|
124
|
-
rgb:
|
|
125
|
+
rgb: l
|
|
125
126
|
},
|
|
126
127
|
bd: {
|
|
127
|
-
t:
|
|
128
|
+
t: x
|
|
128
129
|
}
|
|
129
130
|
},
|
|
130
131
|
headerColumnStyle: {
|
|
131
132
|
bd: {
|
|
132
|
-
l:
|
|
133
|
+
l: x
|
|
133
134
|
}
|
|
134
135
|
},
|
|
135
136
|
firstRowStyle: {
|
|
@@ -147,12 +148,12 @@ const D = {
|
|
|
147
148
|
rgb: u
|
|
148
149
|
},
|
|
149
150
|
bd: {
|
|
150
|
-
b:
|
|
151
|
+
b: x
|
|
151
152
|
}
|
|
152
153
|
},
|
|
153
154
|
lastColumnStyle: {
|
|
154
155
|
bd: {
|
|
155
|
-
r:
|
|
156
|
+
r: x
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
}
|
|
@@ -166,7 +167,7 @@ class j {
|
|
|
166
167
|
b(this, "formula");
|
|
167
168
|
b(this, "meta");
|
|
168
169
|
b(this, "style");
|
|
169
|
-
this.id = e, this.displayName = n, this.dataType =
|
|
170
|
+
this.id = e, this.displayName = n, this.dataType = je.String, this.formula = "", this.meta = {}, this.style = {};
|
|
170
171
|
}
|
|
171
172
|
getMeta() {
|
|
172
173
|
return this.meta;
|
|
@@ -191,79 +192,79 @@ class j {
|
|
|
191
192
|
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
193
|
}
|
|
193
194
|
}
|
|
194
|
-
const
|
|
195
|
+
const Nt = (t) => t.getMonth() <= 2, Dt = (t) => {
|
|
195
196
|
const e = t.getMonth();
|
|
196
197
|
return e > 2 && e <= 5;
|
|
197
|
-
},
|
|
198
|
+
}, xt = (t) => {
|
|
198
199
|
const e = t.getMonth();
|
|
199
200
|
return e > 5 && e <= 8;
|
|
200
|
-
},
|
|
201
|
+
}, Ot = (t) => {
|
|
201
202
|
const e = t.getMonth();
|
|
202
203
|
return e > 8 && e <= 11;
|
|
203
|
-
},
|
|
204
|
+
}, Ut = (t) => t.getMonth() === 0, $t = (t) => t.getMonth() === 1, At = (t) => t.getMonth() === 2, Bt = (t) => t.getMonth() === 3, Et = (t) => t.getMonth() === 4, Lt = (t) => t.getMonth() === 5, Wt = (t) => t.getMonth() === 6, Ht = (t) => t.getMonth() === 7, Vt = (t) => t.getMonth() === 8, Pt = (t) => t.getMonth() === 9, qt = (t) => t.getMonth() === 10, Jt = (t) => t.getMonth() === 11, kt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Qt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
204
205
|
const n = new Date(e);
|
|
205
206
|
return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
|
|
206
|
-
},
|
|
207
|
+
}, Yt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
207
208
|
const n = new Date(e);
|
|
208
209
|
return n.setDate(n.getDate() - 1), t.toDateString() === n.toDateString();
|
|
209
210
|
}, K = (t) => {
|
|
210
211
|
const e = t.getDay(), n = t.getDate() - e + (e === 0 ? -6 : 1), s = new Date(t);
|
|
211
212
|
return s.setDate(n), s;
|
|
212
|
-
},
|
|
213
|
+
}, et = 10080 * 60 * 1e3, Gt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
213
214
|
const n = K(t), s = K(e);
|
|
214
215
|
return n.toDateString() === s.toDateString();
|
|
215
|
-
},
|
|
216
|
-
const n = K(t), s = new Date(K(e).getTime() +
|
|
216
|
+
}, zt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
217
|
+
const n = K(t), s = new Date(K(e).getTime() + et);
|
|
217
218
|
return n.toDateString() === s.toDateString();
|
|
218
|
-
},
|
|
219
|
-
const n = K(t), s = new Date(K(e).getTime() -
|
|
219
|
+
}, jt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
220
|
+
const n = K(t), s = new Date(K(e).getTime() - et);
|
|
220
221
|
return n.toDateString() === s.toDateString();
|
|
221
|
-
},
|
|
222
|
+
}, Kt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Xt = (t) => {
|
|
222
223
|
const e = new Date(t);
|
|
223
224
|
return e.setHours(0, 0, 0, 0), e.setDate(1), e;
|
|
224
|
-
},
|
|
225
|
+
}, Zt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
225
226
|
const n = new Date(e);
|
|
226
227
|
n.setHours(0, 0, 0, 0), n.setMonth(n.getMonth() + 1, 1);
|
|
227
228
|
const s = new Date(n);
|
|
228
229
|
s.setMonth(s.getMonth() + 1, 0);
|
|
229
230
|
const r = t.getTime();
|
|
230
231
|
return r >= n.getTime() && r < s.getTime();
|
|
231
|
-
},
|
|
232
|
-
const n =
|
|
232
|
+
}, en = (t, e = /* @__PURE__ */ new Date()) => {
|
|
233
|
+
const n = Xt(e), s = new Date(n);
|
|
233
234
|
s.setMonth(s.getMonth() + 1, 0);
|
|
234
235
|
const r = t.getTime();
|
|
235
236
|
return r >= n.getTime() && r < s.getTime();
|
|
236
|
-
},
|
|
237
|
+
}, Te = (t) => {
|
|
237
238
|
const e = new Date(t);
|
|
238
239
|
e.setHours(0, 0, 0, 0), e.setDate(1);
|
|
239
240
|
const n = e.getMonth();
|
|
240
241
|
return e.setMonth(n - n % 3), e;
|
|
241
|
-
},
|
|
242
|
-
const n =
|
|
242
|
+
}, tn = (t, e = /* @__PURE__ */ new Date()) => {
|
|
243
|
+
const n = Te(e), s = new Date(n);
|
|
243
244
|
s.setMonth(s.getMonth() + 3);
|
|
244
245
|
const r = t.getTime();
|
|
245
246
|
return r >= n.getTime() && r < s.getTime();
|
|
246
|
-
},
|
|
247
|
-
const n =
|
|
247
|
+
}, nn = (t, e = /* @__PURE__ */ new Date()) => {
|
|
248
|
+
const n = Te(e), s = new Date(n);
|
|
248
249
|
s.setMonth(s.getMonth() + 3);
|
|
249
250
|
const r = new Date(s);
|
|
250
251
|
r.setMonth(r.getMonth() + 3, 0);
|
|
251
252
|
const a = t.getTime();
|
|
252
253
|
return a >= s.getTime() && a < r.getTime();
|
|
253
|
-
},
|
|
254
|
-
const n =
|
|
254
|
+
}, sn = (t, e = /* @__PURE__ */ new Date()) => {
|
|
255
|
+
const n = Te(e), s = new Date(n);
|
|
255
256
|
s.setMonth(s.getMonth() - 3);
|
|
256
257
|
const r = new Date(n);
|
|
257
258
|
r.setDate(0);
|
|
258
259
|
const a = t.getTime();
|
|
259
260
|
return a >= s.getTime() && a < r.getTime();
|
|
260
|
-
},
|
|
261
|
+
}, rn = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), an = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, on = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, ln = (t, e = /* @__PURE__ */ new Date()) => {
|
|
261
262
|
const n = new Date(e);
|
|
262
263
|
n.setHours(0, 0, 0, 0), n.setMonth(0, 1);
|
|
263
264
|
const s = t.getTime();
|
|
264
265
|
return s >= n.getTime() && s < e.getTime();
|
|
265
266
|
};
|
|
266
|
-
function
|
|
267
|
+
function un(t) {
|
|
267
268
|
switch (t.compareType) {
|
|
268
269
|
case m.Equal: {
|
|
269
270
|
const e = new Date(t.expectedValue);
|
|
@@ -301,105 +302,105 @@ function rn(t) {
|
|
|
301
302
|
};
|
|
302
303
|
case m.Today: {
|
|
303
304
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
304
|
-
return (n) =>
|
|
305
|
+
return (n) => kt(n, e);
|
|
305
306
|
}
|
|
306
307
|
case m.Yesterday: {
|
|
307
308
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
308
|
-
return (n) =>
|
|
309
|
+
return (n) => Yt(n, e);
|
|
309
310
|
}
|
|
310
311
|
case m.Tomorrow: {
|
|
311
312
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
312
|
-
return (n) =>
|
|
313
|
+
return (n) => Qt(n, e);
|
|
313
314
|
}
|
|
314
315
|
case m.ThisWeek: {
|
|
315
316
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
316
|
-
return (n) =>
|
|
317
|
+
return (n) => Gt(n, e);
|
|
317
318
|
}
|
|
318
319
|
case m.LastWeek: {
|
|
319
320
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
320
|
-
return (n) =>
|
|
321
|
+
return (n) => jt(n, e);
|
|
321
322
|
}
|
|
322
323
|
case m.NextWeek: {
|
|
323
324
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
324
|
-
return (n) =>
|
|
325
|
+
return (n) => zt(n, e);
|
|
325
326
|
}
|
|
326
327
|
case m.ThisMonth: {
|
|
327
328
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
328
|
-
return (n) =>
|
|
329
|
+
return (n) => Kt(n, e);
|
|
329
330
|
}
|
|
330
331
|
case m.LastMonth: {
|
|
331
332
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
332
|
-
return (n) =>
|
|
333
|
+
return (n) => en(n, e);
|
|
333
334
|
}
|
|
334
335
|
case m.NextMonth: {
|
|
335
336
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
336
|
-
return (n) =>
|
|
337
|
+
return (n) => Zt(n, e);
|
|
337
338
|
}
|
|
338
339
|
case m.ThisQuarter: {
|
|
339
340
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
340
|
-
return (n) =>
|
|
341
|
+
return (n) => tn(n, e);
|
|
341
342
|
}
|
|
342
343
|
case m.LastQuarter: {
|
|
343
344
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
344
|
-
return (n) =>
|
|
345
|
+
return (n) => sn(n, e);
|
|
345
346
|
}
|
|
346
347
|
case m.NextQuarter: {
|
|
347
348
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
348
|
-
return (n) =>
|
|
349
|
+
return (n) => nn(n, e);
|
|
349
350
|
}
|
|
350
351
|
case m.ThisYear: {
|
|
351
352
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
352
|
-
return (n) =>
|
|
353
|
+
return (n) => rn(n, e);
|
|
353
354
|
}
|
|
354
355
|
case m.LastYear: {
|
|
355
356
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
356
|
-
return (n) =>
|
|
357
|
+
return (n) => on(n, e);
|
|
357
358
|
}
|
|
358
359
|
case m.NextYear: {
|
|
359
360
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
360
|
-
return (n) =>
|
|
361
|
+
return (n) => an(n, e);
|
|
361
362
|
}
|
|
362
363
|
case m.YearToDate: {
|
|
363
364
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
364
|
-
return (n) =>
|
|
365
|
+
return (n) => ln(n, e);
|
|
365
366
|
}
|
|
366
367
|
case m.M1:
|
|
367
|
-
return
|
|
368
|
+
return Ut;
|
|
368
369
|
case m.M2:
|
|
369
|
-
return
|
|
370
|
+
return $t;
|
|
370
371
|
case m.M3:
|
|
371
|
-
return
|
|
372
|
+
return At;
|
|
372
373
|
case m.M4:
|
|
373
|
-
return
|
|
374
|
+
return Bt;
|
|
374
375
|
case m.M5:
|
|
375
|
-
return
|
|
376
|
+
return Et;
|
|
376
377
|
case m.M6:
|
|
377
|
-
return
|
|
378
|
+
return Lt;
|
|
378
379
|
case m.M7:
|
|
379
|
-
return
|
|
380
|
+
return Wt;
|
|
380
381
|
case m.M8:
|
|
381
|
-
return
|
|
382
|
+
return Ht;
|
|
382
383
|
case m.M9:
|
|
383
|
-
return
|
|
384
|
+
return Vt;
|
|
384
385
|
case m.M10:
|
|
385
|
-
return
|
|
386
|
+
return Pt;
|
|
386
387
|
case m.M11:
|
|
387
|
-
return
|
|
388
|
+
return qt;
|
|
388
389
|
case m.M12:
|
|
389
|
-
return
|
|
390
|
+
return Jt;
|
|
390
391
|
case m.Q1:
|
|
391
|
-
return
|
|
392
|
+
return Nt;
|
|
392
393
|
case m.Q2:
|
|
393
|
-
return
|
|
394
|
+
return Dt;
|
|
394
395
|
case m.Q3:
|
|
395
|
-
return
|
|
396
|
+
return xt;
|
|
396
397
|
case m.Q4:
|
|
397
|
-
return
|
|
398
|
+
return Ot;
|
|
398
399
|
default:
|
|
399
400
|
throw new Error("Unsupported compare type");
|
|
400
401
|
}
|
|
401
402
|
}
|
|
402
|
-
class
|
|
403
|
+
class cn {
|
|
403
404
|
/**
|
|
404
405
|
* Initializes a new instance of the Heap class.
|
|
405
406
|
*/
|
|
@@ -463,7 +464,7 @@ class an {
|
|
|
463
464
|
return this.heap.includes(e);
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
|
-
class
|
|
467
|
+
class dn extends cn {
|
|
467
468
|
/**
|
|
468
469
|
* Initializes a new instance of the MinHeap class.
|
|
469
470
|
*/
|
|
@@ -502,13 +503,13 @@ class on extends an {
|
|
|
502
503
|
this.heap[0] = this.heap.pop(), this.shiftDown(0);
|
|
503
504
|
}
|
|
504
505
|
}
|
|
505
|
-
const
|
|
506
|
-
const n = new
|
|
506
|
+
const hn = (t, e) => {
|
|
507
|
+
const n = new dn();
|
|
507
508
|
for (const s of t)
|
|
508
509
|
n.insert(s), n.size() > e && n.pop();
|
|
509
510
|
return n.heap;
|
|
510
|
-
},
|
|
511
|
-
function
|
|
511
|
+
}, gn = (t, e) => t > e, mn = (t, e) => t < e, bn = (t, e, n) => hn(t, e).includes(n);
|
|
512
|
+
function wn(t, e) {
|
|
512
513
|
switch (t.compareType) {
|
|
513
514
|
case F.Equal: {
|
|
514
515
|
const n = Number(t.expectedValue);
|
|
@@ -544,56 +545,56 @@ function hn(t, e) {
|
|
|
544
545
|
}
|
|
545
546
|
case F.Above: {
|
|
546
547
|
const n = e.average;
|
|
547
|
-
return (s) =>
|
|
548
|
+
return (s) => gn(s, n);
|
|
548
549
|
}
|
|
549
550
|
case F.Below: {
|
|
550
551
|
const n = e.average;
|
|
551
|
-
return (s) =>
|
|
552
|
+
return (s) => mn(s, n);
|
|
552
553
|
}
|
|
553
554
|
case F.TopN: {
|
|
554
555
|
const n = e.list, s = Number(t.expectedValue);
|
|
555
|
-
return (r) =>
|
|
556
|
+
return (r) => bn(n, s, r);
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
|
-
const
|
|
560
|
-
function
|
|
560
|
+
const fn = (t, e) => Z(e).test(t), pn = (t, e) => !Z(e).test(t), Sn = (t, e) => Z(`*${e}*`).test(t), Rn = (t, e) => !Z(`*${e}*`).test(t), _n = (t, e) => Z(`${e}*`).test(t), Cn = (t, e) => Z(`*${e}`).test(t);
|
|
561
|
+
function Tn(t) {
|
|
561
562
|
switch (t.compareType) {
|
|
562
|
-
case
|
|
563
|
-
return (e) => gn(e, t.expectedValue);
|
|
564
|
-
case V.NotEqual:
|
|
565
|
-
return (e) => mn(e, t.expectedValue);
|
|
566
|
-
case V.Contains:
|
|
567
|
-
return (e) => bn(e, t.expectedValue);
|
|
568
|
-
case V.NotContains:
|
|
569
|
-
return (e) => wn(e, t.expectedValue);
|
|
570
|
-
case V.StartsWith:
|
|
563
|
+
case P.Equal:
|
|
571
564
|
return (e) => fn(e, t.expectedValue);
|
|
572
|
-
case
|
|
565
|
+
case P.NotEqual:
|
|
566
|
+
return (e) => pn(e, t.expectedValue);
|
|
567
|
+
case P.Contains:
|
|
568
|
+
return (e) => Sn(e, t.expectedValue);
|
|
569
|
+
case P.NotContains:
|
|
573
570
|
return (e) => Rn(e, t.expectedValue);
|
|
571
|
+
case P.StartsWith:
|
|
572
|
+
return (e) => _n(e, t.expectedValue);
|
|
573
|
+
case P.EndsWith:
|
|
574
|
+
return (e) => Cn(e, t.expectedValue);
|
|
574
575
|
default:
|
|
575
576
|
return console.error(`Unknown filter operator: ${t.compareType}`), (e) => !0;
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
|
-
const
|
|
579
|
+
const In = /* @__PURE__ */ new Set([
|
|
579
580
|
F.Above,
|
|
580
581
|
F.Below,
|
|
581
582
|
F.TopN
|
|
582
583
|
]);
|
|
583
584
|
m.Today, m.Yesterday, m.Tomorrow, m.ThisWeek, m.LastWeek, m.NextWeek, m.ThisMonth, m.LastMonth, m.NextMonth, m.ThisQuarter, m.LastQuarter, m.NextQuarter, m.NextYear, m.ThisYear, m.LastYear, m.YearToDate;
|
|
584
|
-
function
|
|
585
|
-
return
|
|
585
|
+
function tt(t) {
|
|
586
|
+
return In.has(t);
|
|
586
587
|
}
|
|
587
|
-
function
|
|
588
|
-
if (
|
|
588
|
+
function Mn(t, e) {
|
|
589
|
+
if (tt(t.filterInfo.compareType))
|
|
589
590
|
return (n) => !0;
|
|
590
591
|
switch (t.filterInfo.conditionType) {
|
|
591
592
|
case O.Date:
|
|
592
|
-
return
|
|
593
|
+
return un(t.filterInfo);
|
|
593
594
|
case O.Number:
|
|
594
|
-
return
|
|
595
|
+
return wn(t.filterInfo, e);
|
|
595
596
|
case O.String:
|
|
596
|
-
return
|
|
597
|
+
return Tn(t.filterInfo);
|
|
597
598
|
case O.Logic:
|
|
598
599
|
default:
|
|
599
600
|
return (n) => !0;
|
|
@@ -602,46 +603,46 @@ function pn(t, e) {
|
|
|
602
603
|
function ue(t, e, n, s) {
|
|
603
604
|
switch (s) {
|
|
604
605
|
case O.Date: {
|
|
605
|
-
const r =
|
|
606
|
-
return r ?
|
|
606
|
+
const r = xe(t, e, n);
|
|
607
|
+
return r ? yn(r) : null;
|
|
607
608
|
}
|
|
608
609
|
case O.Number:
|
|
609
|
-
return
|
|
610
|
+
return xe(t, e, n);
|
|
610
611
|
case O.String:
|
|
611
612
|
default:
|
|
612
|
-
return
|
|
613
|
+
return Fn(t, e, n);
|
|
613
614
|
}
|
|
614
615
|
}
|
|
615
|
-
const
|
|
616
|
+
const vn = (t) => {
|
|
616
617
|
var n;
|
|
617
618
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
618
619
|
};
|
|
619
|
-
function
|
|
620
|
+
function Fn(t, e, n) {
|
|
620
621
|
const s = t.getCell(e, n);
|
|
621
622
|
if (!s) return null;
|
|
622
623
|
const { v: r, t: a, p: o } = s;
|
|
623
624
|
if (o)
|
|
624
|
-
return
|
|
625
|
+
return vn(o);
|
|
625
626
|
if (typeof r == "string")
|
|
626
|
-
return a ===
|
|
627
|
+
return a === J.BOOLEAN ? r.toUpperCase() : r;
|
|
627
628
|
if (typeof r == "number")
|
|
628
|
-
return a ===
|
|
629
|
+
return a === J.BOOLEAN ? r ? "TRUE" : "FALSE" : r;
|
|
629
630
|
if (typeof r == "boolean") return r ? "TRUE" : "FALSE";
|
|
630
631
|
if (r !== void 0)
|
|
631
632
|
return String(r);
|
|
632
633
|
}
|
|
633
|
-
function
|
|
634
|
+
function xe(t, e, n) {
|
|
634
635
|
const s = t.getCell(e, n);
|
|
635
636
|
if (!s) return null;
|
|
636
637
|
const { v: r, t: a, p: o } = s;
|
|
637
|
-
return o ? null : typeof r == "string" && a ===
|
|
638
|
+
return o ? null : typeof r == "string" && a === J.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(r);
|
|
638
639
|
}
|
|
639
|
-
function
|
|
640
|
+
function yn(t) {
|
|
640
641
|
const e = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), n = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
|
|
641
642
|
let s = t - 1;
|
|
642
643
|
return s > (n.getTime() - e.getTime()) / (1e3 * 3600 * 24) && (s -= 1), s < 0 && (s = t), new Date(e.getTime() + s * (1e3 * 3600 * 24));
|
|
643
644
|
}
|
|
644
|
-
class
|
|
645
|
+
class Oe {
|
|
645
646
|
constructor() {
|
|
646
647
|
b(this, "_tableColumnFilterList");
|
|
647
648
|
b(this, "_tableSortInfo");
|
|
@@ -660,7 +661,7 @@ class De {
|
|
|
660
661
|
getFilterState(e) {
|
|
661
662
|
var s;
|
|
662
663
|
const n = ((s = this._tableSortInfo) == null ? void 0 : s.columnIndex) === e ? this._tableSortInfo.sortState : G.None;
|
|
663
|
-
return
|
|
664
|
+
return vt(this._tableColumnFilterList[e], n);
|
|
664
665
|
}
|
|
665
666
|
getSortState() {
|
|
666
667
|
var e;
|
|
@@ -684,23 +685,23 @@ class De {
|
|
|
684
685
|
doColumnFilter(e, n, s, r) {
|
|
685
686
|
const a = this._tableColumnFilterList[s];
|
|
686
687
|
if (a && e) {
|
|
687
|
-
const { startRow: o, endRow: u, startColumn:
|
|
688
|
+
const { startRow: o, endRow: u, startColumn: l } = n, i = l + s, h = this.getExecuteFunc(e, n, s, a);
|
|
688
689
|
for (let d = o; d <= u; d++) {
|
|
689
|
-
const c =
|
|
690
|
-
ue(e, d,
|
|
690
|
+
const c = Ft(a) ? a.filterInfo.conditionType : O.String;
|
|
691
|
+
ue(e, d, i, c) === null ? r.add(d) : h(ue(e, d, i, c)) || r.add(d);
|
|
691
692
|
}
|
|
692
693
|
}
|
|
693
694
|
}
|
|
694
695
|
_getNumberCalculatedOptions(e, n, s) {
|
|
695
|
-
const { startRow: r, endRow: a, startColumn: o } = n, u = o + s,
|
|
696
|
-
let
|
|
696
|
+
const { startRow: r, endRow: a, startColumn: o } = n, u = o + s, l = [];
|
|
697
|
+
let i = 0, h = 0;
|
|
697
698
|
for (let d = r; d <= a; d++) {
|
|
698
699
|
const c = ue(e, d, u, O.Number);
|
|
699
|
-
c !== null && (
|
|
700
|
+
c !== null && (l.push(c), i++, h += c);
|
|
700
701
|
}
|
|
701
702
|
return {
|
|
702
|
-
list:
|
|
703
|
-
average:
|
|
703
|
+
list: l,
|
|
704
|
+
average: i > 0 ? h / i : 0
|
|
704
705
|
};
|
|
705
706
|
}
|
|
706
707
|
getExecuteFunc(e, n, s, r) {
|
|
@@ -708,8 +709,8 @@ class De {
|
|
|
708
709
|
const a = new Set(r.values);
|
|
709
710
|
return (o) => a.has(o);
|
|
710
711
|
} else if (r.filterType === ne.condition) {
|
|
711
|
-
const o =
|
|
712
|
-
return
|
|
712
|
+
const o = tt(r.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, s) : void 0;
|
|
713
|
+
return Mn(r, o);
|
|
713
714
|
} else
|
|
714
715
|
return (a) => !0;
|
|
715
716
|
}
|
|
@@ -727,7 +728,7 @@ class De {
|
|
|
727
728
|
this._tableColumnFilterList = [];
|
|
728
729
|
}
|
|
729
730
|
}
|
|
730
|
-
class
|
|
731
|
+
class Ue {
|
|
731
732
|
constructor(e, n, s, r, a = {}) {
|
|
732
733
|
b(this, "_id");
|
|
733
734
|
b(this, "_name");
|
|
@@ -743,21 +744,21 @@ class xe {
|
|
|
743
744
|
b(this, "tableMeta");
|
|
744
745
|
b(this, "_tableFilters");
|
|
745
746
|
b(this, "_subUnitId");
|
|
746
|
-
this._id = e, this._range = s, this._name = n, this._tableFilters = new
|
|
747
|
+
this._id = e, this._range = s, this._name = n, this._tableFilters = new Oe(), this._init(r, a);
|
|
747
748
|
}
|
|
748
749
|
_init(e, n) {
|
|
749
750
|
var o, u;
|
|
750
751
|
this._tableStyleId = n == null ? void 0 : n.tableStyleId, this._showHeader = (o = n == null ? void 0 : n.showHeader) != null ? o : !0, this._showFooter = !1;
|
|
751
752
|
const s = this.getRange(), r = s.startColumn, a = s.endColumn;
|
|
752
|
-
for (let
|
|
753
|
-
const
|
|
753
|
+
for (let l = r; l <= a; l++) {
|
|
754
|
+
const i = l - r;
|
|
754
755
|
let h, d;
|
|
755
|
-
(u = n.columns) != null && u[
|
|
756
|
+
(u = n.columns) != null && u[i] ? (h = n.columns[i].id, d = n.columns[i].displayName) : (h = L(), d = e[l - r]);
|
|
756
757
|
const c = new j(h, d);
|
|
757
758
|
this._columns.set(h, c), this._columnOrder.push(h);
|
|
758
759
|
}
|
|
759
|
-
n.filters && n.filters.forEach((
|
|
760
|
-
|
|
760
|
+
n.filters && n.filters.forEach((i, h) => {
|
|
761
|
+
i && this._tableFilters.setColumnFilter(h, i);
|
|
761
762
|
});
|
|
762
763
|
}
|
|
763
764
|
setTableFilterColumn(e, n) {
|
|
@@ -770,11 +771,11 @@ class xe {
|
|
|
770
771
|
return this._tableFilters;
|
|
771
772
|
}
|
|
772
773
|
getTableFilterRange() {
|
|
773
|
-
const e = this.getRange(), n = this.isShowHeader(), s = this.isShowFooter(), { startRow: r, startColumn: a, endRow: o, endColumn: u } = e,
|
|
774
|
+
const e = this.getRange(), n = this.isShowHeader(), s = this.isShowFooter(), { startRow: r, startColumn: a, endRow: o, endColumn: u } = e, l = n ? r + 1 : r, i = s ? o - 1 : o;
|
|
774
775
|
return {
|
|
775
|
-
startRow:
|
|
776
|
+
startRow: l,
|
|
776
777
|
startColumn: a,
|
|
777
|
-
endRow:
|
|
778
|
+
endRow: i,
|
|
778
779
|
endColumn: u
|
|
779
780
|
};
|
|
780
781
|
}
|
|
@@ -841,7 +842,7 @@ class xe {
|
|
|
841
842
|
}
|
|
842
843
|
getTableStyleId() {
|
|
843
844
|
var e;
|
|
844
|
-
return (e = this._tableStyleId) != null ? e :
|
|
845
|
+
return (e = this._tableStyleId) != null ? e : Ze[0].name;
|
|
845
846
|
}
|
|
846
847
|
setTableStyleId(e) {
|
|
847
848
|
this._tableStyleId = e;
|
|
@@ -906,18 +907,18 @@ class xe {
|
|
|
906
907
|
this._id = e.id, this._name = e.name, this._range = e.range, this.tableMeta = e.meta, this._tableStyleId = e.options.tableStyleId || "", this._showHeader = (s = e.options.showHeader) != null ? s : !0, this._showFooter = (r = e.options.showFooter) != null ? r : !0, e.columns.forEach((a) => {
|
|
907
908
|
const o = new j(a.id, a.displayName);
|
|
908
909
|
o.fromJSON(a), this._columns.set(a.id, o), this._columnOrder.push(a.id);
|
|
909
|
-
}), this._tableFilters = new
|
|
910
|
+
}), this._tableFilters = new Oe(), this._tableFilters.fromJSON(e.filters);
|
|
910
911
|
}
|
|
911
912
|
dispose() {
|
|
912
913
|
this._id = "", this._name = "", this._tableStyleId = "", this._showHeader = !0, this._showFooter = !0, delete this._range, this._columns.clear(), this._columnOrder = [];
|
|
913
914
|
}
|
|
914
915
|
}
|
|
915
|
-
var
|
|
916
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
916
|
+
var Nn = Object.getOwnPropertyDescriptor, Dn = (t, e, n, s) => {
|
|
917
|
+
for (var r = s > 1 ? void 0 : s ? Nn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
917
918
|
(o = t[a]) && (r = o(r) || r);
|
|
918
919
|
return r;
|
|
919
|
-
},
|
|
920
|
-
let
|
|
920
|
+
}, $e = (t, e) => (n, s) => e(n, s, t);
|
|
921
|
+
let C = class extends H {
|
|
921
922
|
constructor(e, n) {
|
|
922
923
|
super();
|
|
923
924
|
b(this, "_tableMap");
|
|
@@ -933,7 +934,7 @@ let T = class extends Q {
|
|
|
933
934
|
b(this, "tableThemeChanged$", this._tableThemeChanged$.asObservable());
|
|
934
935
|
b(this, "_tableFilterChanged$", new Y());
|
|
935
936
|
b(this, "tableFilterChanged$", this._tableFilterChanged$.asObservable());
|
|
936
|
-
b(this, "_tableInitStatus", new
|
|
937
|
+
b(this, "_tableInitStatus", new ze(!1));
|
|
937
938
|
b(this, "tableInitStatus$", this._tableInitStatus.asObservable());
|
|
938
939
|
this._univerInstanceService = e, this._localeService = n, this._tableMap = /* @__PURE__ */ new Map();
|
|
939
940
|
}
|
|
@@ -942,10 +943,10 @@ let T = class extends Q {
|
|
|
942
943
|
}
|
|
943
944
|
getColumnHeader(e, n, s, r) {
|
|
944
945
|
var d;
|
|
945
|
-
const a = (d = this._univerInstanceService.getUnit(e)) == null ? void 0 : d.getSheetBySheetId(n), { startRow: o, startColumn: u, endColumn:
|
|
946
|
-
for (let c = u; c <=
|
|
947
|
-
|
|
948
|
-
return
|
|
946
|
+
const a = (d = this._univerInstanceService.getUnit(e)) == null ? void 0 : d.getSheetBySheetId(n), { startRow: o, startColumn: u, endColumn: l } = s, i = [], h = r != null ? r : "Column";
|
|
947
|
+
for (let c = u; c <= l; c++)
|
|
948
|
+
i.push(Ke(a == null ? void 0 : a.getCell(o, c)) || te(c - u + 1, h));
|
|
949
|
+
return i;
|
|
949
950
|
}
|
|
950
951
|
/**
|
|
951
952
|
* Add a table to univer.
|
|
@@ -960,23 +961,23 @@ let T = class extends Q {
|
|
|
960
961
|
*/
|
|
961
962
|
addTable(e, n, s, r, a, o, u) {
|
|
962
963
|
var c;
|
|
963
|
-
const
|
|
964
|
-
if (h.setSubunitId(n), this._ensureUnit(e).set(
|
|
964
|
+
const l = o != null ? o : L(), i = a || this.getColumnHeader(e, n, r), h = new Ue(l, s, r, i, u);
|
|
965
|
+
if (h.setSubunitId(n), this._ensureUnit(e).set(l, h), this._tableAdd$.next({
|
|
965
966
|
unitId: e,
|
|
966
967
|
subUnitId: n,
|
|
967
968
|
range: r,
|
|
968
969
|
tableName: s,
|
|
969
|
-
tableId:
|
|
970
|
+
tableId: l,
|
|
970
971
|
tableStyleId: u == null ? void 0 : u.tableStyleId
|
|
971
972
|
}), u != null && u.filters) {
|
|
972
973
|
const g = (c = this._univerInstanceService.getUnit(e)) == null ? void 0 : c.getSheetBySheetId(n);
|
|
973
974
|
h.getTableFilters().doFilter(g, r), this._tableFilterChanged$.next({
|
|
974
975
|
unitId: e,
|
|
975
976
|
subUnitId: n,
|
|
976
|
-
tableId:
|
|
977
|
+
tableId: l
|
|
977
978
|
});
|
|
978
979
|
}
|
|
979
|
-
return
|
|
980
|
+
return l;
|
|
980
981
|
}
|
|
981
982
|
addFilter(e, n, s, r) {
|
|
982
983
|
const a = this.getTable(e, n);
|
|
@@ -1068,13 +1069,13 @@ let T = class extends Q {
|
|
|
1068
1069
|
if (r) {
|
|
1069
1070
|
const a = r.getTableInfo(), o = r.getTableStyleId();
|
|
1070
1071
|
s == null || s.delete(n);
|
|
1071
|
-
const { subUnitId: u, range:
|
|
1072
|
+
const { subUnitId: u, range: l, name: i } = a;
|
|
1072
1073
|
this._tableDelete$.next({
|
|
1073
1074
|
unitId: e,
|
|
1074
1075
|
subUnitId: u,
|
|
1075
1076
|
tableId: n,
|
|
1076
|
-
range:
|
|
1077
|
-
tableName:
|
|
1077
|
+
range: l,
|
|
1078
|
+
tableName: i,
|
|
1078
1079
|
tableStyleId: o
|
|
1079
1080
|
});
|
|
1080
1081
|
}
|
|
@@ -1082,24 +1083,24 @@ let T = class extends Q {
|
|
|
1082
1083
|
operationTableRowCol(e, n, s) {
|
|
1083
1084
|
const r = this.getTableById(e, n);
|
|
1084
1085
|
if (!r) return;
|
|
1085
|
-
const { operationType: a, rowColType: o, index: u, count:
|
|
1086
|
+
const { operationType: a, rowColType: o, index: u, count: l, columnsJson: i } = s, h = r.getRange(), d = { ...h };
|
|
1086
1087
|
if (a === M.Insert) {
|
|
1087
1088
|
if (o === "row")
|
|
1088
|
-
d.endRow +=
|
|
1089
|
+
d.endRow += l;
|
|
1089
1090
|
else if (o === "column") {
|
|
1090
|
-
d.endColumn +=
|
|
1091
|
-
for (let c = 0; c <
|
|
1092
|
-
const g = this._localeService.t("sheets-table.columnPrefix"),
|
|
1093
|
-
|
|
1091
|
+
d.endColumn += l;
|
|
1092
|
+
for (let c = 0; c < l; c++) {
|
|
1093
|
+
const g = this._localeService.t("sheets-table.columnPrefix"), R = new j(L(), te(r.getColumnsCount() + 1 + c, g));
|
|
1094
|
+
i != null && i[c] && R.fromJSON(i[c]);
|
|
1094
1095
|
const w = u + c - h.startColumn;
|
|
1095
|
-
r.insertColumn(w,
|
|
1096
|
+
r.insertColumn(w, R);
|
|
1096
1097
|
}
|
|
1097
1098
|
}
|
|
1098
1099
|
} else if (o === "row")
|
|
1099
|
-
d.endRow -=
|
|
1100
|
+
d.endRow -= l;
|
|
1100
1101
|
else if (o === "column") {
|
|
1101
|
-
d.endColumn -=
|
|
1102
|
-
for (let c =
|
|
1102
|
+
d.endColumn -= l;
|
|
1103
|
+
for (let c = l - 1; c >= 0; c--) {
|
|
1103
1104
|
const g = u + c - h.startColumn;
|
|
1104
1105
|
r.removeColumn(g);
|
|
1105
1106
|
}
|
|
@@ -1117,25 +1118,25 @@ let T = class extends Q {
|
|
|
1117
1118
|
if (!r) return;
|
|
1118
1119
|
const a = r.getRange(), o = s.newRange;
|
|
1119
1120
|
if (o.startColumn < a.startColumn) {
|
|
1120
|
-
const u = a.startColumn - o.startColumn,
|
|
1121
|
-
for (let
|
|
1122
|
-
r.insertColumn(a.startColumn, new j(L(), te(r.getColumnsCount() + 1,
|
|
1121
|
+
const u = a.startColumn - o.startColumn, l = this._localeService.t("sheets-table.columnPrefix");
|
|
1122
|
+
for (let i = 0; i < u; i++)
|
|
1123
|
+
r.insertColumn(a.startColumn, new j(L(), te(r.getColumnsCount() + 1, l)));
|
|
1123
1124
|
} else if (o.startColumn > a.startColumn) {
|
|
1124
1125
|
const u = o.startColumn - a.startColumn;
|
|
1125
|
-
for (let
|
|
1126
|
-
const
|
|
1127
|
-
r.removeColumn(
|
|
1126
|
+
for (let l = u - 1; l >= 0; l--) {
|
|
1127
|
+
const i = o.startColumn + l - a.startColumn;
|
|
1128
|
+
r.removeColumn(i);
|
|
1128
1129
|
}
|
|
1129
1130
|
}
|
|
1130
1131
|
if (o.endColumn < a.endColumn) {
|
|
1131
1132
|
const u = a.endColumn - o.endColumn;
|
|
1132
|
-
for (let
|
|
1133
|
-
const
|
|
1134
|
-
r.removeColumn(
|
|
1133
|
+
for (let l = u - 1; l >= 0; l--) {
|
|
1134
|
+
const i = o.endColumn + l - a.startColumn;
|
|
1135
|
+
r.removeColumn(i);
|
|
1135
1136
|
}
|
|
1136
1137
|
} else if (o.endColumn > a.endColumn) {
|
|
1137
1138
|
const u = o.endColumn - a.endColumn;
|
|
1138
|
-
for (let
|
|
1139
|
+
for (let l = 0; l < u; l++)
|
|
1139
1140
|
r.insertColumn(a.endColumn, new j(L(), te(r.getColumnsCount() + 1, "Column")));
|
|
1140
1141
|
}
|
|
1141
1142
|
r.setRange(o), this._tableRangeChanged$.next({
|
|
@@ -1150,7 +1151,7 @@ let T = class extends Q {
|
|
|
1150
1151
|
var c;
|
|
1151
1152
|
const r = this._tableMap.get(e), a = r == null ? void 0 : r.get(n);
|
|
1152
1153
|
if (!a) return;
|
|
1153
|
-
const o = a.getSubunitId(), { name: u, updateRange:
|
|
1154
|
+
const o = a.getSubunitId(), { name: u, updateRange: l, rowColOperation: i, theme: h, options: d } = s;
|
|
1154
1155
|
if (u) {
|
|
1155
1156
|
const g = a.getDisplayName();
|
|
1156
1157
|
a.setDisplayName(u), this._tableNameChanged$.next({
|
|
@@ -1161,7 +1162,7 @@ let T = class extends Q {
|
|
|
1161
1162
|
oldTableName: g
|
|
1162
1163
|
});
|
|
1163
1164
|
}
|
|
1164
|
-
if (
|
|
1165
|
+
if (i && this.operationTableRowCol(e, n, i), l && this.updateTableRange(e, n, l), h) {
|
|
1165
1166
|
const g = (c = a.getTableStyleId()) != null ? c : "default";
|
|
1166
1167
|
a.setTableStyleId(h), this._tableThemeChanged$.next({
|
|
1167
1168
|
unitId: e,
|
|
@@ -1179,10 +1180,10 @@ let T = class extends Q {
|
|
|
1179
1180
|
const a = r.getSubunitId();
|
|
1180
1181
|
if (!n[a]) {
|
|
1181
1182
|
const o = /* @__PURE__ */ new Set();
|
|
1182
|
-
this.getTablesBySubunitId(e, a).forEach((
|
|
1183
|
-
const
|
|
1184
|
-
if (
|
|
1185
|
-
for (const h of
|
|
1183
|
+
this.getTablesBySubunitId(e, a).forEach((l) => {
|
|
1184
|
+
const i = l.getTableFilters().getFilterOutRows();
|
|
1185
|
+
if (i)
|
|
1186
|
+
for (const h of i)
|
|
1186
1187
|
o.add(h);
|
|
1187
1188
|
}), n[a] = {
|
|
1188
1189
|
tables: [],
|
|
@@ -1199,19 +1200,19 @@ let T = class extends Q {
|
|
|
1199
1200
|
if (!o)
|
|
1200
1201
|
return;
|
|
1201
1202
|
const u = o.worksheet;
|
|
1202
|
-
let
|
|
1203
|
-
n[a].tables ?
|
|
1204
|
-
const h = this.getColumnHeader(e, a,
|
|
1205
|
-
if (d.setTableMeta(
|
|
1203
|
+
let l;
|
|
1204
|
+
n[a].tables ? l = n[a].tables : Array.isArray(n[a]) && (l = n[a]), l && l.forEach((i) => {
|
|
1205
|
+
const h = this.getColumnHeader(e, a, i.range), d = new Ue(i.id, i.name, i.range, h, i.options);
|
|
1206
|
+
if (d.setTableMeta(i.meta), i.columns.length && d.setColumns(i.columns), i.filters) {
|
|
1206
1207
|
const c = d.getTableFilters();
|
|
1207
|
-
c.fromJSON(
|
|
1208
|
+
c.fromJSON(i.filters), c.doFilter(u, d.getTableFilterRange());
|
|
1208
1209
|
}
|
|
1209
|
-
d.setSubunitId(a), s.set(
|
|
1210
|
+
d.setSubunitId(a), s.set(i.id, d), this._tableAdd$.next({
|
|
1210
1211
|
unitId: e,
|
|
1211
1212
|
subUnitId: a,
|
|
1212
|
-
range:
|
|
1213
|
-
tableName:
|
|
1214
|
-
tableId:
|
|
1213
|
+
range: i.range,
|
|
1214
|
+
tableName: i.name,
|
|
1215
|
+
tableId: i.id
|
|
1215
1216
|
});
|
|
1216
1217
|
});
|
|
1217
1218
|
}), this._tableInitStatus.next(!0);
|
|
@@ -1225,16 +1226,16 @@ let T = class extends Q {
|
|
|
1225
1226
|
}), this._tableMap.clear();
|
|
1226
1227
|
}
|
|
1227
1228
|
};
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
],
|
|
1232
|
-
var
|
|
1233
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1229
|
+
C = Dn([
|
|
1230
|
+
$e(0, B),
|
|
1231
|
+
$e(1, _(be))
|
|
1232
|
+
], C);
|
|
1233
|
+
var xn = Object.getOwnPropertyDescriptor, On = (t, e, n, s) => {
|
|
1234
|
+
for (var r = s > 1 ? void 0 : s ? xn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1234
1235
|
(o = t[a]) && (r = o(r) || r);
|
|
1235
1236
|
return r;
|
|
1236
|
-
},
|
|
1237
|
-
let X = class extends
|
|
1237
|
+
}, Un = (t, e) => (n, s) => e(n, s, t);
|
|
1238
|
+
let X = class extends H {
|
|
1238
1239
|
constructor(t) {
|
|
1239
1240
|
super(), this._tableManager = t;
|
|
1240
1241
|
}
|
|
@@ -1278,54 +1279,52 @@ let X = class extends Q {
|
|
|
1278
1279
|
return ue(t, e, n, s);
|
|
1279
1280
|
}
|
|
1280
1281
|
};
|
|
1281
|
-
X =
|
|
1282
|
-
|
|
1282
|
+
X = On([
|
|
1283
|
+
Un(0, _(C))
|
|
1283
1284
|
], X);
|
|
1284
|
-
const
|
|
1285
|
+
const k = {
|
|
1285
1286
|
id: "sheet.mutation.add-table",
|
|
1286
1287
|
type: N.MUTATION,
|
|
1287
1288
|
handler: (t, e) => {
|
|
1288
|
-
const { tableId: n, unitId: s, subUnitId: r, name: a, range: o, header: u, options:
|
|
1289
|
-
return t.get(X).addTable(s, r, a, o, u, n,
|
|
1289
|
+
const { tableId: n, unitId: s, subUnitId: r, name: a, range: o, header: u, options: l } = e;
|
|
1290
|
+
return t.get(X).addTable(s, r, a, o, u, n, l), !0;
|
|
1290
1291
|
}
|
|
1291
|
-
},
|
|
1292
|
+
}, Q = {
|
|
1292
1293
|
id: "sheet.mutation.delete-table",
|
|
1293
1294
|
type: N.MUTATION,
|
|
1294
1295
|
handler: (t, e) => {
|
|
1295
1296
|
const { unitId: n, subUnitId: s, tableId: r } = e;
|
|
1296
1297
|
return t.get(X).deleteTable(n, s, r), !0;
|
|
1297
1298
|
}
|
|
1298
|
-
},
|
|
1299
|
+
}, $n = {
|
|
1299
1300
|
id: "sheet.command.add-table",
|
|
1300
1301
|
type: N.COMMAND,
|
|
1301
1302
|
handler: (t, e) => {
|
|
1302
1303
|
var w;
|
|
1303
1304
|
if (!e)
|
|
1304
1305
|
return !1;
|
|
1305
|
-
const n = t.get(A), s = t.get(
|
|
1306
|
+
const n = t.get(A), s = t.get(D), r = t.get(be), a = (w = e.id) != null ? w : L();
|
|
1306
1307
|
let o = e.name;
|
|
1307
1308
|
if (!o) {
|
|
1308
|
-
const f = t.get(
|
|
1309
|
+
const f = t.get(C).getTableList(e.unitId).length;
|
|
1309
1310
|
o = `${r.t("sheets-table.tablePrefix")}${f + 1}`;
|
|
1310
1311
|
}
|
|
1311
|
-
const u = [],
|
|
1312
|
-
return u.push({ id:
|
|
1312
|
+
const u = [], l = [], i = t.get(C), { unitId: h, subUnitId: d, range: c } = e, g = i.getColumnHeader(h, d, c, r.t("sheets-table.columnPrefix"));
|
|
1313
|
+
return u.push({ id: k.id, params: { ...e, tableId: a, name: o, header: g } }), l.push({ id: Q.id, params: { tableId: a, unitId: e.unitId } }), E(u, s) && n.pushUndoRedo({
|
|
1313
1314
|
unitID: e.unitId,
|
|
1314
|
-
undoMutations:
|
|
1315
|
+
undoMutations: l,
|
|
1315
1316
|
redoMutations: u
|
|
1316
1317
|
}), !0;
|
|
1317
1318
|
}
|
|
1318
|
-
},
|
|
1319
|
+
}, An = {
|
|
1319
1320
|
id: "sheet.command.delete-table",
|
|
1320
1321
|
type: N.COMMAND,
|
|
1321
1322
|
handler: (t, e) => {
|
|
1322
1323
|
if (!e)
|
|
1323
1324
|
return !1;
|
|
1324
|
-
const n = t.get(A), s = t.get(
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
return a.push({ id: k.id, params: { ...e } }), o.push({
|
|
1328
|
-
id: J.id,
|
|
1325
|
+
const n = t.get(A), s = t.get(D), r = t.get(C), a = t.get(Le), o = [], u = [], l = r.getTable(e.unitId, e.tableId), i = l == null ? void 0 : l.toJSON();
|
|
1326
|
+
return i ? (o.push({ id: Q.id, params: { ...e } }), u.push({
|
|
1327
|
+
id: k.id,
|
|
1329
1328
|
params: {
|
|
1330
1329
|
unitId: e.unitId,
|
|
1331
1330
|
subUnitId: e.subUnitId,
|
|
@@ -1334,39 +1333,39 @@ const J = {
|
|
|
1334
1333
|
range: i.range,
|
|
1335
1334
|
options: i.options
|
|
1336
1335
|
}
|
|
1337
|
-
}),
|
|
1336
|
+
}), E(o, s) && n.pushUndoRedo({
|
|
1338
1337
|
unitID: e.unitId,
|
|
1339
|
-
undoMutations:
|
|
1340
|
-
redoMutations:
|
|
1341
|
-
}), !0;
|
|
1338
|
+
undoMutations: u,
|
|
1339
|
+
redoMutations: o
|
|
1340
|
+
}), !0) : (a.error("[TableManager]: Table not found"), !1);
|
|
1342
1341
|
}
|
|
1343
|
-
},
|
|
1342
|
+
}, _e = {
|
|
1344
1343
|
id: "sheet.mutation.set-table-filter",
|
|
1345
1344
|
type: N.MUTATION,
|
|
1346
1345
|
handler: (t, e) => {
|
|
1347
1346
|
const { tableId: n, unitId: s, column: r, tableFilter: a } = e;
|
|
1348
|
-
return t.get(
|
|
1347
|
+
return t.get(C).addFilter(s, n, r, a), !0;
|
|
1349
1348
|
}
|
|
1350
|
-
},
|
|
1349
|
+
}, Bn = {
|
|
1351
1350
|
id: "sheet.command.set-table-filter",
|
|
1352
1351
|
type: N.COMMAND,
|
|
1353
1352
|
handler: (t, e) => {
|
|
1354
1353
|
if (!e)
|
|
1355
1354
|
return !1;
|
|
1356
|
-
const n = t.get(A), s = t.get(
|
|
1357
|
-
return a.push({ id:
|
|
1355
|
+
const n = t.get(A), s = t.get(D), r = e.tableId || L(), a = [], o = [];
|
|
1356
|
+
return a.push({ id: _e.id, params: { ...e, tableId: r } }), o.push({ id: _e.id, params: { ...e, tableId: r, tableFilter: void 0 } }), E(a, s) && n.pushUndoRedo({
|
|
1358
1357
|
unitID: e.unitId,
|
|
1359
1358
|
undoMutations: o,
|
|
1360
1359
|
redoMutations: a
|
|
1361
1360
|
}), !0;
|
|
1362
1361
|
}
|
|
1363
|
-
},
|
|
1364
|
-
var
|
|
1365
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1362
|
+
}, nt = "SHEET_TABLE_PLUGIN", re = "SHEET_TABLE", En = "table-custom";
|
|
1363
|
+
var Ln = Object.getOwnPropertyDescriptor, Wn = (t, e, n, s) => {
|
|
1364
|
+
for (var r = s > 1 ? void 0 : s ? Ln(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1366
1365
|
(o = t[a]) && (r = o(r) || r);
|
|
1367
1366
|
return r;
|
|
1368
1367
|
}, ae = (t, e) => (n, s) => e(n, s, t);
|
|
1369
|
-
let W = class extends
|
|
1368
|
+
let W = class extends H {
|
|
1370
1369
|
constructor(e, n, s, r) {
|
|
1371
1370
|
super();
|
|
1372
1371
|
b(this, "_tableRangeRTree", /* @__PURE__ */ new Map());
|
|
@@ -1374,14 +1373,14 @@ let W = class extends Q {
|
|
|
1374
1373
|
}
|
|
1375
1374
|
getContainerTableWithRange(e, n, s) {
|
|
1376
1375
|
const r = this._ensureTableRangeRTree(e), o = Array.from(r.bulkSearch([{ unitId: e, sheetId: n, range: s }])).find((u) => {
|
|
1377
|
-
const
|
|
1378
|
-
return
|
|
1376
|
+
const l = this._tableManager.getTable(e, String(u));
|
|
1377
|
+
return l ? Re.contains(l.getRange(), s) : !1;
|
|
1379
1378
|
});
|
|
1380
1379
|
if (o)
|
|
1381
1380
|
return this._tableManager.getTable(e, String(o));
|
|
1382
1381
|
}
|
|
1383
1382
|
_ensureTableRangeRTree(e) {
|
|
1384
|
-
return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new
|
|
1383
|
+
return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new it()), this._tableRangeRTree.get(e);
|
|
1385
1384
|
}
|
|
1386
1385
|
registerTableChangeEvent() {
|
|
1387
1386
|
this.disposeWithMe(
|
|
@@ -1423,12 +1422,12 @@ let W = class extends Q {
|
|
|
1423
1422
|
}
|
|
1424
1423
|
registerTableHeaderInterceptor() {
|
|
1425
1424
|
this.disposeWithMe(
|
|
1426
|
-
this._sheetInterceptorService.intercept(
|
|
1427
|
-
effect:
|
|
1425
|
+
this._sheetInterceptorService.intercept(Ve.CELL_CONTENT, {
|
|
1426
|
+
effect: lt.Value,
|
|
1428
1427
|
handler: (e, n, s) => {
|
|
1429
|
-
const { row: r, col: a, unitId: o, subUnitId: u } = n,
|
|
1430
|
-
if ((e == null ? void 0 : e.v) === void 0 &&
|
|
1431
|
-
const h = Array.from(
|
|
1428
|
+
const { row: r, col: a, unitId: o, subUnitId: u } = n, l = this._ensureTableRangeRTree(o);
|
|
1429
|
+
if ((e == null ? void 0 : e.v) === void 0 && l) {
|
|
1430
|
+
const h = Array.from(l.bulkSearch([{ unitId: o, sheetId: u, range: { startColumn: a, endColumn: a, startRow: r, endRow: r } }]));
|
|
1432
1431
|
if (h.length > 0) {
|
|
1433
1432
|
const d = this._tableManager.getTable(o, h[0]);
|
|
1434
1433
|
if (d) {
|
|
@@ -1467,7 +1466,7 @@ let W = class extends Q {
|
|
|
1467
1466
|
}
|
|
1468
1467
|
},
|
|
1469
1468
|
businesses: [z.UNIVER_SHEET],
|
|
1470
|
-
pluginName:
|
|
1469
|
+
pluginName: nt,
|
|
1471
1470
|
onLoad: (e, n) => {
|
|
1472
1471
|
this._fromJSON(e, n);
|
|
1473
1472
|
},
|
|
@@ -1483,25 +1482,25 @@ let W = class extends Q {
|
|
|
1483
1482
|
// eslint-disable-next-line max-lines-per-function
|
|
1484
1483
|
getMutations: (e) => {
|
|
1485
1484
|
var n;
|
|
1486
|
-
if (e.id ===
|
|
1485
|
+
if (e.id === gt.id) {
|
|
1487
1486
|
const s = e.params, r = s.unitId || this._univerInstanceService.getCurrentUnitOfType(z.UNIVER_SHEET).getUnitId(), a = s.subUnitId || ((n = this._univerInstanceService.getCurrentUnitOfType(z.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : n.getSheetId());
|
|
1488
1487
|
if (!r || !a)
|
|
1489
1488
|
return { redos: [], undos: [] };
|
|
1490
1489
|
const o = this._tableManager.getTablesBySubunitId(r, a);
|
|
1491
1490
|
if (o.length === 0)
|
|
1492
1491
|
return { redos: [], undos: [] };
|
|
1493
|
-
const u = [],
|
|
1494
|
-
return o.forEach((
|
|
1495
|
-
const h =
|
|
1492
|
+
const u = [], l = [];
|
|
1493
|
+
return o.forEach((i) => {
|
|
1494
|
+
const h = i.toJSON();
|
|
1496
1495
|
u.push({
|
|
1497
|
-
id:
|
|
1496
|
+
id: Q.id,
|
|
1498
1497
|
params: {
|
|
1499
1498
|
unitId: r,
|
|
1500
1499
|
subUnitId: a,
|
|
1501
1500
|
tableId: h.id
|
|
1502
1501
|
}
|
|
1503
|
-
}),
|
|
1504
|
-
id:
|
|
1502
|
+
}), l.push({
|
|
1503
|
+
id: k.id,
|
|
1505
1504
|
params: {
|
|
1506
1505
|
unitId: r,
|
|
1507
1506
|
subUnitId: a,
|
|
@@ -1515,19 +1514,19 @@ let W = class extends Q {
|
|
|
1515
1514
|
}
|
|
1516
1515
|
}
|
|
1517
1516
|
});
|
|
1518
|
-
}), { redos: u, undos:
|
|
1519
|
-
} else if (e.id ===
|
|
1517
|
+
}), { redos: u, undos: l };
|
|
1518
|
+
} else if (e.id === mt.id) {
|
|
1520
1519
|
const s = e.params, { unitId: r, subUnitId: a, targetSubUnitId: o } = s;
|
|
1521
1520
|
if (!r || !a || !o)
|
|
1522
1521
|
return { redos: [], undos: [] };
|
|
1523
1522
|
const u = this._tableManager.getTablesBySubunitId(r, a);
|
|
1524
1523
|
if (u.length === 0)
|
|
1525
1524
|
return { redos: [], undos: [] };
|
|
1526
|
-
const
|
|
1525
|
+
const l = [], i = [];
|
|
1527
1526
|
return u.forEach((h) => {
|
|
1528
1527
|
const d = h.toJSON(), c = L();
|
|
1529
|
-
|
|
1530
|
-
id:
|
|
1528
|
+
l.push({
|
|
1529
|
+
id: k.id,
|
|
1531
1530
|
params: {
|
|
1532
1531
|
unitId: r,
|
|
1533
1532
|
subUnitId: o,
|
|
@@ -1543,15 +1542,15 @@ let W = class extends Q {
|
|
|
1543
1542
|
filters: d.filters.tableColumnFilterList
|
|
1544
1543
|
}
|
|
1545
1544
|
}
|
|
1546
|
-
}),
|
|
1547
|
-
id:
|
|
1545
|
+
}), i.push({
|
|
1546
|
+
id: Q.id,
|
|
1548
1547
|
params: {
|
|
1549
1548
|
unitId: r,
|
|
1550
1549
|
subUnitId: o,
|
|
1551
1550
|
tableId: c
|
|
1552
1551
|
}
|
|
1553
1552
|
});
|
|
1554
|
-
}), { redos:
|
|
1553
|
+
}), { redos: l, undos: i };
|
|
1555
1554
|
}
|
|
1556
1555
|
return { redos: [], undos: [] };
|
|
1557
1556
|
}
|
|
@@ -1562,11 +1561,11 @@ let W = class extends Q {
|
|
|
1562
1561
|
super.dispose(), this._tableRangeRTree.clear();
|
|
1563
1562
|
}
|
|
1564
1563
|
};
|
|
1565
|
-
W =
|
|
1566
|
-
ae(0,
|
|
1567
|
-
ae(1,
|
|
1568
|
-
ae(2,
|
|
1569
|
-
ae(3,
|
|
1564
|
+
W = Wn([
|
|
1565
|
+
ae(0, _(B)),
|
|
1566
|
+
ae(1, _(Ce)),
|
|
1567
|
+
ae(2, _(C)),
|
|
1568
|
+
ae(3, _(ot))
|
|
1570
1569
|
], W);
|
|
1571
1570
|
const S = {
|
|
1572
1571
|
id: "sheet.mutation.set-sheet-table",
|
|
@@ -1575,29 +1574,29 @@ const S = {
|
|
|
1575
1574
|
if (!e)
|
|
1576
1575
|
return !1;
|
|
1577
1576
|
const { unitId: n, tableId: s, config: r } = e;
|
|
1578
|
-
return t.get(
|
|
1577
|
+
return t.get(C).setTableByConfig(n, s, r), !0;
|
|
1579
1578
|
}
|
|
1580
|
-
},
|
|
1579
|
+
}, Hn = {
|
|
1581
1580
|
id: "sheet.command.add-table-theme",
|
|
1582
1581
|
type: N.COMMAND,
|
|
1583
1582
|
handler: (t, e) => {
|
|
1584
1583
|
if (!e)
|
|
1585
1584
|
return !1;
|
|
1586
|
-
const n = t.get(
|
|
1587
|
-
if (!
|
|
1588
|
-
const
|
|
1585
|
+
const n = t.get(C), { unitId: s, tableId: r, themeStyle: a } = e, o = [], u = [], l = n.getTableById(s, r);
|
|
1586
|
+
if (!l) return !1;
|
|
1587
|
+
const i = l.getSubunitId();
|
|
1589
1588
|
o.push({
|
|
1590
|
-
id:
|
|
1589
|
+
id: Pe.id,
|
|
1591
1590
|
params: {
|
|
1592
1591
|
unitId: s,
|
|
1593
|
-
subUnitId:
|
|
1592
|
+
subUnitId: i,
|
|
1594
1593
|
styleJSON: a.toJson()
|
|
1595
1594
|
}
|
|
1596
1595
|
}), o.push({
|
|
1597
1596
|
id: S.id,
|
|
1598
1597
|
params: {
|
|
1599
1598
|
unitId: s,
|
|
1600
|
-
subUnitId:
|
|
1599
|
+
subUnitId: i,
|
|
1601
1600
|
tableId: r,
|
|
1602
1601
|
config: {
|
|
1603
1602
|
theme: a.getName()
|
|
@@ -1607,65 +1606,65 @@ const S = {
|
|
|
1607
1606
|
id: S.id,
|
|
1608
1607
|
params: {
|
|
1609
1608
|
unitId: s,
|
|
1610
|
-
subUnitId:
|
|
1609
|
+
subUnitId: i,
|
|
1611
1610
|
tableId: r,
|
|
1612
1611
|
config: {
|
|
1613
|
-
themeStyle:
|
|
1612
|
+
themeStyle: l.getTableStyleId()
|
|
1614
1613
|
}
|
|
1615
1614
|
}
|
|
1616
1615
|
}), u.push({
|
|
1617
|
-
id:
|
|
1616
|
+
id: qe.id,
|
|
1618
1617
|
params: {
|
|
1619
1618
|
unitId: s,
|
|
1620
|
-
subUnitId:
|
|
1619
|
+
subUnitId: i,
|
|
1621
1620
|
styleName: a.getName()
|
|
1622
1621
|
}
|
|
1623
1622
|
});
|
|
1624
|
-
const h = t.get(
|
|
1625
|
-
return
|
|
1623
|
+
const h = t.get(D);
|
|
1624
|
+
return E(o, h) && t.get(A).pushUndoRedo({
|
|
1626
1625
|
unitID: s,
|
|
1627
1626
|
undoMutations: u,
|
|
1628
1627
|
redoMutations: o
|
|
1629
1628
|
}), !0;
|
|
1630
1629
|
}
|
|
1631
|
-
},
|
|
1630
|
+
}, Vn = {
|
|
1632
1631
|
id: "sheet.command.remove-table-theme",
|
|
1633
1632
|
type: N.COMMAND,
|
|
1634
1633
|
handler: (t, e) => {
|
|
1635
1634
|
if (!e)
|
|
1636
1635
|
return !1;
|
|
1637
|
-
const { unitId: n, tableId: s, themeName: r } = e, a = t.get(
|
|
1636
|
+
const { unitId: n, tableId: s, themeName: r } = e, a = t.get(C), o = t.get(Je), u = a.getTableById(n, s);
|
|
1638
1637
|
if (!u) return !1;
|
|
1639
|
-
const
|
|
1640
|
-
let g = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith(
|
|
1641
|
-
g || (g = d[0]),
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
const w = t.get(
|
|
1645
|
-
return
|
|
1638
|
+
const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith("table-default"));
|
|
1639
|
+
let g = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith(En)).find((f) => f !== r);
|
|
1640
|
+
g || (g = d[0]), i.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: g } } }), i.push({ id: qe.id, params: { unitId: n, subUnitId: l, styleName: r } });
|
|
1641
|
+
const R = o.getDefaultRangeThemeStyle(r);
|
|
1642
|
+
R && (h.push({ id: Pe.id, params: { unitId: n, subUnitId: l, styleJSON: R.toJson() } }), h.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: r } } }));
|
|
1643
|
+
const w = t.get(D);
|
|
1644
|
+
return E(i, w) && t.get(A).pushUndoRedo({
|
|
1646
1645
|
unitID: n,
|
|
1647
|
-
redoMutations:
|
|
1646
|
+
redoMutations: i,
|
|
1648
1647
|
undoMutations: h
|
|
1649
1648
|
}), !0;
|
|
1650
1649
|
}
|
|
1651
|
-
},
|
|
1650
|
+
}, Pn = {
|
|
1652
1651
|
id: "sheet.command.set-table-config",
|
|
1653
1652
|
type: N.COMMAND,
|
|
1654
1653
|
// eslint-disable-next-line max-lines-per-function
|
|
1655
1654
|
handler: (t, e) => {
|
|
1656
1655
|
if (!e)
|
|
1657
1656
|
return !1;
|
|
1658
|
-
const { unitId: n, tableId: s, name: r, updateRange: a, rowColOperation: o, theme: u } = e,
|
|
1659
|
-
if (!
|
|
1660
|
-
const h = {}, d = {}, c = t.get(
|
|
1661
|
-
if (
|
|
1662
|
-
w.add(
|
|
1663
|
-
}),
|
|
1664
|
-
w.add(
|
|
1657
|
+
const { unitId: n, tableId: s, name: r, updateRange: a, rowColOperation: o, theme: u } = e, l = t.get(C), i = l.getTableById(n, s);
|
|
1658
|
+
if (!i) return !1;
|
|
1659
|
+
const h = {}, d = {}, c = t.get(be), R = t.get(B).getCurrentUnitOfType(z.UNIVER_SHEET), w = /* @__PURE__ */ new Set();
|
|
1660
|
+
if (R && (R.getSheets().forEach((T) => {
|
|
1661
|
+
w.add(T.getName());
|
|
1662
|
+
}), l.getTableList(n).forEach((T) => {
|
|
1663
|
+
w.add(T.name);
|
|
1665
1664
|
})), r) {
|
|
1666
|
-
if (!
|
|
1667
|
-
return t.get(
|
|
1668
|
-
h.name =
|
|
1665
|
+
if (!ut(r, w))
|
|
1666
|
+
return t.get(Le).warn(c.t("sheets-table.tableNameError")), !1;
|
|
1667
|
+
h.name = i.getDisplayName(), d.name = r;
|
|
1669
1668
|
}
|
|
1670
1669
|
o && (h.rowColOperation = {
|
|
1671
1670
|
operationType: o.operationType === M.Insert ? M.Delete : M.Insert,
|
|
@@ -1673,22 +1672,22 @@ const S = {
|
|
|
1673
1672
|
index: o.index,
|
|
1674
1673
|
count: o.count
|
|
1675
1674
|
}, d.rowColOperation = o), a && (h.updateRange = {
|
|
1676
|
-
newRange:
|
|
1677
|
-
}, d.updateRange = a), u && (h.theme =
|
|
1678
|
-
const
|
|
1675
|
+
newRange: i.getRange()
|
|
1676
|
+
}, d.updateRange = a), u && (h.theme = i.getTableStyleId(), d.theme = u);
|
|
1677
|
+
const p = {
|
|
1679
1678
|
unitId: n,
|
|
1680
|
-
subUnitId:
|
|
1679
|
+
subUnitId: i.getSubunitId(),
|
|
1681
1680
|
tableId: s,
|
|
1682
1681
|
config: d
|
|
1683
1682
|
};
|
|
1684
|
-
return t.get(
|
|
1683
|
+
return t.get(D).executeCommand(S.id, p), t.get(A).pushUndoRedo({
|
|
1685
1684
|
unitID: n,
|
|
1686
1685
|
undoMutations: [
|
|
1687
1686
|
{
|
|
1688
1687
|
id: S.id,
|
|
1689
1688
|
params: {
|
|
1690
1689
|
unitId: n,
|
|
1691
|
-
subUnitId:
|
|
1690
|
+
subUnitId: i.getSubunitId(),
|
|
1692
1691
|
tableId: s,
|
|
1693
1692
|
config: h
|
|
1694
1693
|
}
|
|
@@ -1697,28 +1696,28 @@ const S = {
|
|
|
1697
1696
|
redoMutations: [
|
|
1698
1697
|
{
|
|
1699
1698
|
id: S.id,
|
|
1700
|
-
params:
|
|
1699
|
+
params: p
|
|
1701
1700
|
}
|
|
1702
1701
|
]
|
|
1703
1702
|
}), !0;
|
|
1704
1703
|
}
|
|
1705
|
-
},
|
|
1704
|
+
}, qn = {
|
|
1706
1705
|
id: "sheet.command.table-insert-row",
|
|
1707
1706
|
type: N.COMMAND,
|
|
1708
1707
|
handler: (t) => {
|
|
1709
|
-
const e = t.get(
|
|
1708
|
+
const e = t.get(B), n = $(e);
|
|
1710
1709
|
if (!n)
|
|
1711
1710
|
return !1;
|
|
1712
|
-
const { workbook: s, worksheet: r, unitId: a, subUnitId: o } = n,
|
|
1713
|
-
if (!
|
|
1711
|
+
const { workbook: s, worksheet: r, unitId: a, subUnitId: o } = n, l = t.get(we).getCurrentSelections();
|
|
1712
|
+
if (!l.length || l.length > 1)
|
|
1714
1713
|
return !1;
|
|
1715
|
-
t.get(
|
|
1716
|
-
const h =
|
|
1714
|
+
t.get(C);
|
|
1715
|
+
const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
|
|
1717
1716
|
if (!c) return !1;
|
|
1718
|
-
const g = h.endRow - h.startRow + 1, w = r.getRowCount() - 1,
|
|
1719
|
-
if (w -
|
|
1717
|
+
const g = h.endRow - h.startRow + 1, w = r.getRowCount() - 1, p = r.getCellMatrix().getDataRange().endRow, f = [], I = [];
|
|
1718
|
+
if (w - p < g)
|
|
1720
1719
|
f.push({
|
|
1721
|
-
id:
|
|
1720
|
+
id: ke.id,
|
|
1722
1721
|
params: {
|
|
1723
1722
|
unitId: a,
|
|
1724
1723
|
subUnitId: o,
|
|
@@ -1752,7 +1751,7 @@ const S = {
|
|
|
1752
1751
|
}
|
|
1753
1752
|
}
|
|
1754
1753
|
}), I.push({
|
|
1755
|
-
id:
|
|
1754
|
+
id: Qe.id,
|
|
1756
1755
|
params: {
|
|
1757
1756
|
unitId: a,
|
|
1758
1757
|
subUnitId: o,
|
|
@@ -1789,14 +1788,14 @@ const S = {
|
|
|
1789
1788
|
}
|
|
1790
1789
|
}
|
|
1791
1790
|
});
|
|
1792
|
-
const ee =
|
|
1791
|
+
const ee = fe(
|
|
1793
1792
|
t,
|
|
1794
1793
|
{
|
|
1795
1794
|
unitId: a,
|
|
1796
1795
|
subUnitId: o,
|
|
1797
1796
|
range: {
|
|
1798
1797
|
startRow: h.startRow,
|
|
1799
|
-
endRow:
|
|
1798
|
+
endRow: p,
|
|
1800
1799
|
startColumn: v.startColumn,
|
|
1801
1800
|
endColumn: v.endColumn
|
|
1802
1801
|
}
|
|
@@ -1806,7 +1805,7 @@ const S = {
|
|
|
1806
1805
|
subUnitId: o,
|
|
1807
1806
|
range: {
|
|
1808
1807
|
startRow: h.startRow + g,
|
|
1809
|
-
endRow:
|
|
1808
|
+
endRow: p + g,
|
|
1810
1809
|
startColumn: v.startColumn,
|
|
1811
1810
|
endColumn: v.endColumn
|
|
1812
1811
|
}
|
|
@@ -1814,35 +1813,35 @@ const S = {
|
|
|
1814
1813
|
);
|
|
1815
1814
|
ee && (f.push(...ee.redos), I.push(...ee.undos));
|
|
1816
1815
|
}
|
|
1817
|
-
const U = t.get(
|
|
1818
|
-
return
|
|
1816
|
+
const U = t.get(D);
|
|
1817
|
+
return E(f, U) && t.get(A).pushUndoRedo({
|
|
1819
1818
|
unitID: a,
|
|
1820
1819
|
undoMutations: I,
|
|
1821
1820
|
redoMutations: f
|
|
1822
1821
|
}), !0;
|
|
1823
1822
|
}
|
|
1824
|
-
},
|
|
1823
|
+
}, Jn = {
|
|
1825
1824
|
id: "sheet.command.table-insert-col",
|
|
1826
1825
|
type: N.COMMAND,
|
|
1827
1826
|
handler: (t) => {
|
|
1828
|
-
const e = t.get(
|
|
1827
|
+
const e = t.get(B), n = $(e);
|
|
1829
1828
|
if (!n)
|
|
1830
1829
|
return !1;
|
|
1831
|
-
const { worksheet: s, unitId: r, subUnitId: a } = n, u = t.get(
|
|
1830
|
+
const { worksheet: s, unitId: r, subUnitId: a } = n, u = t.get(we).getCurrentSelections();
|
|
1832
1831
|
if (!u.length || u.length > 1)
|
|
1833
1832
|
return !1;
|
|
1834
|
-
const
|
|
1833
|
+
const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
|
|
1835
1834
|
if (!d) return !1;
|
|
1836
|
-
const c =
|
|
1837
|
-
if (
|
|
1838
|
-
|
|
1839
|
-
id:
|
|
1835
|
+
const c = i.endColumn - i.startColumn + 1, R = s.getColumnCount() - 1, w = s.getCellMatrix().getDataRange().endColumn, p = [], f = [];
|
|
1836
|
+
if (R - w < c)
|
|
1837
|
+
p.push({
|
|
1838
|
+
id: Ye.id,
|
|
1840
1839
|
params: {
|
|
1841
1840
|
unitId: r,
|
|
1842
1841
|
subUnitId: a,
|
|
1843
|
-
range: { ...
|
|
1842
|
+
range: { ...i }
|
|
1844
1843
|
}
|
|
1845
|
-
}),
|
|
1844
|
+
}), p.push({
|
|
1846
1845
|
id: S.id,
|
|
1847
1846
|
params: {
|
|
1848
1847
|
unitId: r,
|
|
@@ -1852,7 +1851,7 @@ const S = {
|
|
|
1852
1851
|
rowColOperation: {
|
|
1853
1852
|
operationType: M.Insert,
|
|
1854
1853
|
rowColType: y.Col,
|
|
1855
|
-
index:
|
|
1854
|
+
index: i.startColumn,
|
|
1856
1855
|
count: c
|
|
1857
1856
|
}
|
|
1858
1857
|
}
|
|
@@ -1867,22 +1866,22 @@ const S = {
|
|
|
1867
1866
|
rowColOperation: {
|
|
1868
1867
|
operationType: M.Delete,
|
|
1869
1868
|
rowColType: y.Col,
|
|
1870
|
-
index:
|
|
1869
|
+
index: i.startColumn,
|
|
1871
1870
|
count: c
|
|
1872
1871
|
}
|
|
1873
1872
|
}
|
|
1874
1873
|
}
|
|
1875
1874
|
}), f.push({
|
|
1876
|
-
id:
|
|
1875
|
+
id: Ge.id,
|
|
1877
1876
|
params: {
|
|
1878
1877
|
unitId: r,
|
|
1879
1878
|
subUnitId: a,
|
|
1880
|
-
range: { ...
|
|
1879
|
+
range: { ...i }
|
|
1881
1880
|
}
|
|
1882
1881
|
});
|
|
1883
1882
|
else {
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1883
|
+
const T = d.getRange();
|
|
1884
|
+
p.push({
|
|
1886
1885
|
id: S.id,
|
|
1887
1886
|
params: {
|
|
1888
1887
|
unitId: r,
|
|
@@ -1892,7 +1891,7 @@ const S = {
|
|
|
1892
1891
|
rowColOperation: {
|
|
1893
1892
|
operationType: M.Insert,
|
|
1894
1893
|
rowColType: y.Col,
|
|
1895
|
-
index:
|
|
1894
|
+
index: i.startColumn,
|
|
1896
1895
|
count: c
|
|
1897
1896
|
}
|
|
1898
1897
|
}
|
|
@@ -1907,21 +1906,21 @@ const S = {
|
|
|
1907
1906
|
rowColOperation: {
|
|
1908
1907
|
operationType: M.Delete,
|
|
1909
1908
|
rowColType: y.Col,
|
|
1910
|
-
index:
|
|
1909
|
+
index: i.startColumn,
|
|
1911
1910
|
count: c
|
|
1912
1911
|
}
|
|
1913
1912
|
}
|
|
1914
1913
|
}
|
|
1915
1914
|
});
|
|
1916
|
-
const v =
|
|
1915
|
+
const v = fe(
|
|
1917
1916
|
t,
|
|
1918
1917
|
{
|
|
1919
1918
|
unitId: r,
|
|
1920
1919
|
subUnitId: a,
|
|
1921
1920
|
range: {
|
|
1922
|
-
startRow:
|
|
1923
|
-
endRow:
|
|
1924
|
-
startColumn:
|
|
1921
|
+
startRow: T.startRow,
|
|
1922
|
+
endRow: T.endRow,
|
|
1923
|
+
startColumn: i.startColumn,
|
|
1925
1924
|
endColumn: w
|
|
1926
1925
|
}
|
|
1927
1926
|
},
|
|
@@ -1929,37 +1928,37 @@ const S = {
|
|
|
1929
1928
|
unitId: r,
|
|
1930
1929
|
subUnitId: a,
|
|
1931
1930
|
range: {
|
|
1932
|
-
startRow:
|
|
1933
|
-
endRow:
|
|
1934
|
-
startColumn:
|
|
1931
|
+
startRow: T.startRow,
|
|
1932
|
+
endRow: T.endRow,
|
|
1933
|
+
startColumn: i.startColumn + c,
|
|
1935
1934
|
endColumn: w + c
|
|
1936
1935
|
}
|
|
1937
1936
|
}
|
|
1938
1937
|
);
|
|
1939
|
-
v && (
|
|
1938
|
+
v && (p.push(...v.redos), f.push(...v.undos));
|
|
1940
1939
|
}
|
|
1941
|
-
const I = t.get(
|
|
1942
|
-
return
|
|
1940
|
+
const I = t.get(D);
|
|
1941
|
+
return E(p, I) && t.get(A).pushUndoRedo({
|
|
1943
1942
|
unitID: r,
|
|
1944
1943
|
undoMutations: f,
|
|
1945
|
-
redoMutations:
|
|
1944
|
+
redoMutations: p
|
|
1946
1945
|
}), !0;
|
|
1947
1946
|
}
|
|
1948
|
-
},
|
|
1947
|
+
}, kn = {
|
|
1949
1948
|
id: "sheet.command.table-remove-row",
|
|
1950
1949
|
type: N.COMMAND,
|
|
1951
1950
|
handler: (t, e) => {
|
|
1952
1951
|
if (!e)
|
|
1953
1952
|
return !1;
|
|
1954
|
-
const n = t.get(
|
|
1953
|
+
const n = t.get(B), s = $(n);
|
|
1955
1954
|
if (!s)
|
|
1956
1955
|
return !1;
|
|
1957
|
-
const { unitId: r, subUnitId: a } = s, u = t.get(
|
|
1956
|
+
const { unitId: r, subUnitId: a } = s, u = t.get(we).getCurrentSelections();
|
|
1958
1957
|
if (!u.length || u.length > 1)
|
|
1959
1958
|
return !1;
|
|
1960
|
-
const
|
|
1959
|
+
const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
|
|
1961
1960
|
if (!d) return !1;
|
|
1962
|
-
const c =
|
|
1961
|
+
const c = i.endRow - i.startRow + 1, g = [], R = [], w = d.getRange();
|
|
1963
1962
|
g.push({
|
|
1964
1963
|
id: S.id,
|
|
1965
1964
|
params: {
|
|
@@ -1975,7 +1974,7 @@ const S = {
|
|
|
1975
1974
|
}
|
|
1976
1975
|
}
|
|
1977
1976
|
}
|
|
1978
|
-
}),
|
|
1977
|
+
}), R.push({
|
|
1979
1978
|
id: S.id,
|
|
1980
1979
|
params: {
|
|
1981
1980
|
unitId: r,
|
|
@@ -1988,13 +1987,13 @@ const S = {
|
|
|
1988
1987
|
}
|
|
1989
1988
|
}
|
|
1990
1989
|
});
|
|
1991
|
-
const f = s.worksheet.getCellMatrix().getDataRange().endRow, I =
|
|
1990
|
+
const f = s.worksheet.getCellMatrix().getDataRange().endRow, I = fe(
|
|
1992
1991
|
t,
|
|
1993
1992
|
{
|
|
1994
1993
|
unitId: r,
|
|
1995
1994
|
subUnitId: a,
|
|
1996
1995
|
range: {
|
|
1997
|
-
startRow:
|
|
1996
|
+
startRow: i.endRow + 1,
|
|
1998
1997
|
endRow: f,
|
|
1999
1998
|
startColumn: w.startColumn,
|
|
2000
1999
|
endColumn: w.endColumn
|
|
@@ -2004,39 +2003,39 @@ const S = {
|
|
|
2004
2003
|
unitId: r,
|
|
2005
2004
|
subUnitId: a,
|
|
2006
2005
|
range: {
|
|
2007
|
-
startRow:
|
|
2006
|
+
startRow: i.startRow,
|
|
2008
2007
|
endRow: f - c,
|
|
2009
2008
|
startColumn: w.startColumn,
|
|
2010
2009
|
endColumn: w.endColumn
|
|
2011
2010
|
}
|
|
2012
2011
|
}
|
|
2013
2012
|
);
|
|
2014
|
-
I && (g.push(...I.redos),
|
|
2015
|
-
const U = t.get(
|
|
2016
|
-
return
|
|
2013
|
+
I && (g.push(...I.redos), R.push(...I.undos));
|
|
2014
|
+
const U = t.get(D);
|
|
2015
|
+
return E(g, U) && t.get(A).pushUndoRedo({
|
|
2017
2016
|
unitID: r,
|
|
2018
|
-
undoMutations:
|
|
2017
|
+
undoMutations: R,
|
|
2019
2018
|
redoMutations: g
|
|
2020
2019
|
}), !0;
|
|
2021
2020
|
}
|
|
2022
|
-
},
|
|
2021
|
+
}, Qn = {
|
|
2023
2022
|
id: "sheet.command.table-remove-col",
|
|
2024
2023
|
type: N.COMMAND,
|
|
2025
2024
|
handler: (t, e) => {
|
|
2026
2025
|
if (!e)
|
|
2027
2026
|
return !1;
|
|
2028
|
-
const n = t.get(
|
|
2027
|
+
const n = t.get(B), s = $(n);
|
|
2029
2028
|
if (!s)
|
|
2030
2029
|
return !1;
|
|
2031
2030
|
const { workbook: r, unitId: a, subUnitId: o } = s;
|
|
2032
|
-
t.get(
|
|
2033
|
-
const
|
|
2034
|
-
if (!
|
|
2031
|
+
t.get(C);
|
|
2032
|
+
const l = t.get(we).getCurrentSelections();
|
|
2033
|
+
if (!l.length || l.length > 1)
|
|
2035
2034
|
return !1;
|
|
2036
|
-
const h =
|
|
2035
|
+
const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
|
|
2037
2036
|
if (!c) return !1;
|
|
2038
|
-
const g = h.endColumn - h.startColumn + 1,
|
|
2039
|
-
|
|
2037
|
+
const g = h.endColumn - h.startColumn + 1, R = [], w = [], p = c.getRange();
|
|
2038
|
+
R.push({
|
|
2040
2039
|
id: S.id,
|
|
2041
2040
|
params: {
|
|
2042
2041
|
unitId: a,
|
|
@@ -2052,10 +2051,10 @@ const S = {
|
|
|
2052
2051
|
}
|
|
2053
2052
|
}
|
|
2054
2053
|
});
|
|
2055
|
-
const f = [], I = h.startColumn -
|
|
2054
|
+
const f = [], I = h.startColumn - p.startColumn;
|
|
2056
2055
|
for (let se = 0; se < g; se++) {
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2056
|
+
const Ie = c.getTableInfo().columns[I + se];
|
|
2057
|
+
Ie && f.push(Ie);
|
|
2059
2058
|
}
|
|
2060
2059
|
w.push({
|
|
2061
2060
|
id: S.id,
|
|
@@ -2074,44 +2073,103 @@ const S = {
|
|
|
2074
2073
|
}
|
|
2075
2074
|
}
|
|
2076
2075
|
});
|
|
2077
|
-
const
|
|
2076
|
+
const T = s.worksheet.getCellMatrix().getDataRange().endColumn, v = fe(
|
|
2078
2077
|
t,
|
|
2079
2078
|
{
|
|
2080
2079
|
unitId: a,
|
|
2081
2080
|
subUnitId: o,
|
|
2082
2081
|
range: {
|
|
2083
|
-
startRow:
|
|
2084
|
-
endRow:
|
|
2082
|
+
startRow: p.startRow,
|
|
2083
|
+
endRow: p.endRow,
|
|
2085
2084
|
startColumn: h.endColumn + 1,
|
|
2086
|
-
endColumn:
|
|
2085
|
+
endColumn: T
|
|
2087
2086
|
}
|
|
2088
2087
|
},
|
|
2089
2088
|
{
|
|
2090
2089
|
unitId: a,
|
|
2091
2090
|
subUnitId: o,
|
|
2092
2091
|
range: {
|
|
2093
|
-
startRow:
|
|
2094
|
-
endRow:
|
|
2092
|
+
startRow: p.startRow,
|
|
2093
|
+
endRow: p.endRow,
|
|
2095
2094
|
startColumn: h.startColumn,
|
|
2096
|
-
endColumn:
|
|
2095
|
+
endColumn: T - g
|
|
2097
2096
|
}
|
|
2098
2097
|
}
|
|
2099
2098
|
);
|
|
2100
|
-
v && (
|
|
2101
|
-
const ee = t.get(
|
|
2102
|
-
return
|
|
2099
|
+
v && (R.push(...v.redos), w.push(...v.undos));
|
|
2100
|
+
const ee = t.get(D);
|
|
2101
|
+
return E(R, ee) && t.get(A).pushUndoRedo({
|
|
2103
2102
|
unitID: a,
|
|
2104
2103
|
undoMutations: w,
|
|
2105
|
-
redoMutations:
|
|
2104
|
+
redoMutations: R
|
|
2106
2105
|
}), !0;
|
|
2107
2106
|
}
|
|
2108
2107
|
};
|
|
2109
|
-
var
|
|
2110
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
2108
|
+
var Yn = Object.getOwnPropertyDescriptor, Gn = (t, e, n, s) => {
|
|
2109
|
+
for (var r = s > 1 ? void 0 : s ? Yn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2110
|
+
(o = t[a]) && (r = o(r) || r);
|
|
2111
|
+
return r;
|
|
2112
|
+
}, Ae = (t, e) => (n, s) => e(n, s, t);
|
|
2113
|
+
let ce = class extends H {
|
|
2114
|
+
constructor(t, e) {
|
|
2115
|
+
super(), this._tableManager = t, this._commandService = e, this._initRangeListener();
|
|
2116
|
+
}
|
|
2117
|
+
_initRangeListener() {
|
|
2118
|
+
this.disposeWithMe(
|
|
2119
|
+
this._tableManager.tableRangeChanged$.subscribe((t) => {
|
|
2120
|
+
const { tableId: e, unitId: n } = t, s = this._tableManager.getTableById(n, e);
|
|
2121
|
+
s && this._updateSuperTable(n, s);
|
|
2122
|
+
})
|
|
2123
|
+
), this.disposeWithMe(
|
|
2124
|
+
this._tableManager.tableAdd$.subscribe((t) => {
|
|
2125
|
+
const { tableId: e, unitId: n } = t, s = this._tableManager.getTableById(n, e);
|
|
2126
|
+
s && this._updateSuperTable(n, s);
|
|
2127
|
+
})
|
|
2128
|
+
), this.disposeWithMe(
|
|
2129
|
+
this._tableManager.tableDelete$.subscribe((t) => {
|
|
2130
|
+
const { unitId: e, tableName: n } = t;
|
|
2131
|
+
this._commandService.executeCommand(Fe.id, {
|
|
2132
|
+
unitId: e,
|
|
2133
|
+
tableName: n
|
|
2134
|
+
});
|
|
2135
|
+
})
|
|
2136
|
+
), this.disposeWithMe(
|
|
2137
|
+
this._tableManager.tableNameChanged$.subscribe((t) => {
|
|
2138
|
+
const { tableId: e, unitId: n, oldTableName: s } = t;
|
|
2139
|
+
this._commandService.executeCommand(Fe.id, {
|
|
2140
|
+
unitId: n,
|
|
2141
|
+
tableName: s
|
|
2142
|
+
});
|
|
2143
|
+
const r = this._tableManager.getTableById(n, e);
|
|
2144
|
+
r && this._updateSuperTable(n, r);
|
|
2145
|
+
})
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2148
|
+
_updateSuperTable(t, e) {
|
|
2149
|
+
const n = e.getTableInfo(), s = n.name, r = n.columns, a = /* @__PURE__ */ new Map();
|
|
2150
|
+
r.forEach((o, u) => {
|
|
2151
|
+
a.set(o.displayName, u);
|
|
2152
|
+
}), this._commandService.executeCommand(It.id, {
|
|
2153
|
+
unitId: t,
|
|
2154
|
+
tableName: s,
|
|
2155
|
+
reference: {
|
|
2156
|
+
range: n.range,
|
|
2157
|
+
sheetId: n.subUnitId,
|
|
2158
|
+
titleMap: a
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
ce = Gn([
|
|
2164
|
+
Ae(0, _(C)),
|
|
2165
|
+
Ae(1, D)
|
|
2166
|
+
], ce);
|
|
2167
|
+
var zn = Object.getOwnPropertyDescriptor, jn = (t, e, n, s) => {
|
|
2168
|
+
for (var r = s > 1 ? void 0 : s ? zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2111
2169
|
(o = t[a]) && (r = o(r) || r);
|
|
2112
2170
|
return r;
|
|
2113
|
-
},
|
|
2114
|
-
let
|
|
2171
|
+
}, Be = (t, e) => (n, s) => e(n, s, t);
|
|
2172
|
+
let de = class extends H {
|
|
2115
2173
|
constructor(t, e) {
|
|
2116
2174
|
super(), this._tableManager = t, this._exclusiveRangeService = e, this._initRangeListener();
|
|
2117
2175
|
}
|
|
@@ -2140,16 +2198,16 @@ let ce = class extends Q {
|
|
|
2140
2198
|
);
|
|
2141
2199
|
}
|
|
2142
2200
|
};
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
],
|
|
2147
|
-
var
|
|
2148
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
2201
|
+
de = jn([
|
|
2202
|
+
Be(0, _(C)),
|
|
2203
|
+
Be(1, _(bt))
|
|
2204
|
+
], de);
|
|
2205
|
+
var Kn = Object.getOwnPropertyDescriptor, Xn = (t, e, n, s) => {
|
|
2206
|
+
for (var r = s > 1 ? void 0 : s ? Kn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2149
2207
|
(o = t[a]) && (r = o(r) || r);
|
|
2150
2208
|
return r;
|
|
2151
|
-
},
|
|
2152
|
-
let
|
|
2209
|
+
}, V = (t, e) => (n, s) => e(n, s, t);
|
|
2210
|
+
let he = class extends H {
|
|
2153
2211
|
constructor(t, e, n, s, r, a, o) {
|
|
2154
2212
|
super(), this._commandService = t, this._refRangeService = e, this._univerInstanceService = n, this._injector = s, this._sheetInterceptorService = r, this._tableManager = a, this._localeService = o, this._initCommandInterceptor(), this._initCommandListener();
|
|
2155
2213
|
}
|
|
@@ -2159,13 +2217,13 @@ let de = class extends Q {
|
|
|
2159
2217
|
getMutations(e) {
|
|
2160
2218
|
const n = { redos: [], undos: [] }, { id: s, params: r } = e;
|
|
2161
2219
|
switch (s) {
|
|
2162
|
-
case
|
|
2220
|
+
case Rt.id:
|
|
2163
2221
|
return t._generateTableMutationWithInsertRow(r);
|
|
2164
|
-
case
|
|
2222
|
+
case St.id:
|
|
2165
2223
|
return t._generateTableMutationWithInsertCol(r);
|
|
2166
|
-
case
|
|
2224
|
+
case pt.id:
|
|
2167
2225
|
return t._generateTableMutationWithRemoveRow(r);
|
|
2168
|
-
case
|
|
2226
|
+
case ft.id:
|
|
2169
2227
|
return t._generateTableMutationWithRemoveCol(r);
|
|
2170
2228
|
}
|
|
2171
2229
|
return n;
|
|
@@ -2180,21 +2238,21 @@ let de = class extends Q {
|
|
|
2180
2238
|
if (!o.length)
|
|
2181
2239
|
return { undos: e, redos: n };
|
|
2182
2240
|
const { range: u } = t;
|
|
2183
|
-
return o.forEach((
|
|
2184
|
-
const
|
|
2185
|
-
if (u.startRow >
|
|
2241
|
+
return o.forEach((l) => {
|
|
2242
|
+
const i = l.getRange();
|
|
2243
|
+
if (u.startRow > i.startRow && u.startRow <= i.endRow) {
|
|
2186
2244
|
const h = u.endRow - u.startRow + 1;
|
|
2187
2245
|
n.push({
|
|
2188
2246
|
id: S.id,
|
|
2189
2247
|
params: {
|
|
2190
2248
|
unitId: r,
|
|
2191
2249
|
subUnitId: a,
|
|
2192
|
-
tableId:
|
|
2250
|
+
tableId: l.getId(),
|
|
2193
2251
|
config: {
|
|
2194
2252
|
updateRange: {
|
|
2195
2253
|
newRange: {
|
|
2196
|
-
...
|
|
2197
|
-
endRow:
|
|
2254
|
+
...i,
|
|
2255
|
+
endRow: i.endRow + h
|
|
2198
2256
|
}
|
|
2199
2257
|
}
|
|
2200
2258
|
}
|
|
@@ -2204,11 +2262,11 @@ let de = class extends Q {
|
|
|
2204
2262
|
params: {
|
|
2205
2263
|
unitId: r,
|
|
2206
2264
|
subUnitId: a,
|
|
2207
|
-
tableId:
|
|
2265
|
+
tableId: l.getId(),
|
|
2208
2266
|
config: {
|
|
2209
2267
|
updateRange: {
|
|
2210
2268
|
newRange: {
|
|
2211
|
-
...
|
|
2269
|
+
...i
|
|
2212
2270
|
}
|
|
2213
2271
|
}
|
|
2214
2272
|
}
|
|
@@ -2225,16 +2283,16 @@ let de = class extends Q {
|
|
|
2225
2283
|
if (!o.length)
|
|
2226
2284
|
return { undos: e, redos: n };
|
|
2227
2285
|
const { range: u } = t;
|
|
2228
|
-
return o.forEach((
|
|
2229
|
-
const
|
|
2230
|
-
if (u.startColumn >
|
|
2286
|
+
return o.forEach((l) => {
|
|
2287
|
+
const i = l.getRange();
|
|
2288
|
+
if (u.startColumn > i.startColumn && u.startColumn <= i.endColumn) {
|
|
2231
2289
|
const h = u.endColumn - u.startColumn + 1;
|
|
2232
2290
|
n.push({
|
|
2233
2291
|
id: S.id,
|
|
2234
2292
|
params: {
|
|
2235
2293
|
unitId: r,
|
|
2236
2294
|
subUnitId: a,
|
|
2237
|
-
tableId:
|
|
2295
|
+
tableId: l.getId(),
|
|
2238
2296
|
config: {
|
|
2239
2297
|
rowColOperation: {
|
|
2240
2298
|
operationType: M.Insert,
|
|
@@ -2249,7 +2307,7 @@ let de = class extends Q {
|
|
|
2249
2307
|
params: {
|
|
2250
2308
|
unitId: r,
|
|
2251
2309
|
subUnitId: a,
|
|
2252
|
-
tableId:
|
|
2310
|
+
tableId: l.getId(),
|
|
2253
2311
|
config: {
|
|
2254
2312
|
rowColOperation: {
|
|
2255
2313
|
operationType: M.Delete,
|
|
@@ -2267,16 +2325,16 @@ let de = class extends Q {
|
|
|
2267
2325
|
const e = [], n = [], s = [], r = [], a = $(this._univerInstanceService);
|
|
2268
2326
|
if (!a)
|
|
2269
2327
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2270
|
-
const { unitId: o, subUnitId: u } = a,
|
|
2271
|
-
if (!
|
|
2328
|
+
const { unitId: o, subUnitId: u } = a, l = this._tableManager.getTablesBySubunitId(o, u);
|
|
2329
|
+
if (!l.length)
|
|
2272
2330
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2273
|
-
const { range:
|
|
2274
|
-
return
|
|
2331
|
+
const { range: i } = t, h = i.endRow - i.startRow + 1;
|
|
2332
|
+
return l.forEach((d) => {
|
|
2275
2333
|
const c = d.getRange();
|
|
2276
|
-
if (
|
|
2277
|
-
if (
|
|
2334
|
+
if (Re.intersects(c, i))
|
|
2335
|
+
if (i.startRow <= c.startRow && i.endRow >= c.startRow) {
|
|
2278
2336
|
s.push({
|
|
2279
|
-
id:
|
|
2337
|
+
id: Q.id,
|
|
2280
2338
|
params: {
|
|
2281
2339
|
unitId: o,
|
|
2282
2340
|
subUnitId: u,
|
|
@@ -2285,7 +2343,7 @@ let de = class extends Q {
|
|
|
2285
2343
|
});
|
|
2286
2344
|
const g = d.toJSON();
|
|
2287
2345
|
e.push({
|
|
2288
|
-
id:
|
|
2346
|
+
id: k.id,
|
|
2289
2347
|
params: {
|
|
2290
2348
|
unitId: o,
|
|
2291
2349
|
subUnitId: u,
|
|
@@ -2295,7 +2353,7 @@ let de = class extends Q {
|
|
|
2295
2353
|
options: g.options
|
|
2296
2354
|
}
|
|
2297
2355
|
});
|
|
2298
|
-
} else
|
|
2356
|
+
} else i.startRow > c.startRow && i.startRow <= c.endRow ? (n.push({
|
|
2299
2357
|
id: S.id,
|
|
2300
2358
|
params: {
|
|
2301
2359
|
unitId: o,
|
|
@@ -2324,7 +2382,7 @@ let de = class extends Q {
|
|
|
2324
2382
|
}
|
|
2325
2383
|
}
|
|
2326
2384
|
}
|
|
2327
|
-
})) :
|
|
2385
|
+
})) : i.startRow < c.endRow && i.endRow >= c.endRow && (n.push({
|
|
2328
2386
|
id: S.id,
|
|
2329
2387
|
params: {
|
|
2330
2388
|
unitId: o,
|
|
@@ -2334,7 +2392,7 @@ let de = class extends Q {
|
|
|
2334
2392
|
updateRange: {
|
|
2335
2393
|
newRange: {
|
|
2336
2394
|
...c,
|
|
2337
|
-
endRow:
|
|
2395
|
+
endRow: i.startRow - 1
|
|
2338
2396
|
}
|
|
2339
2397
|
}
|
|
2340
2398
|
}
|
|
@@ -2360,30 +2418,30 @@ let de = class extends Q {
|
|
|
2360
2418
|
const e = [], n = [], s = [], r = [], a = $(this._univerInstanceService);
|
|
2361
2419
|
if (!a)
|
|
2362
2420
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2363
|
-
const { unitId: o, subUnitId: u } = a,
|
|
2364
|
-
if (!
|
|
2421
|
+
const { unitId: o, subUnitId: u } = a, l = this._tableManager.getTablesBySubunitId(o, u);
|
|
2422
|
+
if (!l.length)
|
|
2365
2423
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2366
|
-
const { range:
|
|
2367
|
-
return
|
|
2424
|
+
const { range: i } = t, h = i.endColumn - i.startColumn + 1;
|
|
2425
|
+
return l.forEach((d) => {
|
|
2368
2426
|
const c = d.getRange();
|
|
2369
|
-
if (
|
|
2370
|
-
if (
|
|
2427
|
+
if (Re.intersects(c, i)) {
|
|
2428
|
+
if (i.startColumn <= c.startColumn && i.endColumn >= c.endColumn) {
|
|
2371
2429
|
s.push({
|
|
2372
|
-
id:
|
|
2430
|
+
id: Q.id,
|
|
2373
2431
|
params: {
|
|
2374
2432
|
unitId: o,
|
|
2375
2433
|
subUnitId: u,
|
|
2376
2434
|
tableId: d.getId()
|
|
2377
2435
|
}
|
|
2378
2436
|
});
|
|
2379
|
-
const g = d.toJSON(), { startRow:
|
|
2437
|
+
const g = d.toJSON(), { startRow: R, startColumn: w, endColumn: p } = g.range, f = this._univerInstanceService.getUnit(o), I = f == null ? void 0 : f.getSheetBySheetId(u);
|
|
2380
2438
|
if (!I)
|
|
2381
2439
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2382
2440
|
const U = [];
|
|
2383
|
-
for (let
|
|
2384
|
-
U.push(
|
|
2441
|
+
for (let T = w; T <= p; T++)
|
|
2442
|
+
U.push(Ke(I == null ? void 0 : I.getCell(R, T)) || te(T - w + 1, this._localeService.t("sheets-table.columnPrefix")));
|
|
2385
2443
|
e.push({
|
|
2386
|
-
id:
|
|
2444
|
+
id: k.id,
|
|
2387
2445
|
params: {
|
|
2388
2446
|
unitId: o,
|
|
2389
2447
|
subUnitId: u,
|
|
@@ -2394,8 +2452,8 @@ let de = class extends Q {
|
|
|
2394
2452
|
options: g.options
|
|
2395
2453
|
}
|
|
2396
2454
|
});
|
|
2397
|
-
} else if (
|
|
2398
|
-
const g =
|
|
2455
|
+
} else if (i.startColumn <= c.startColumn && i.endColumn >= c.startColumn) {
|
|
2456
|
+
const g = i.endColumn - c.startColumn + 1;
|
|
2399
2457
|
n.push({
|
|
2400
2458
|
id: S.id,
|
|
2401
2459
|
params: {
|
|
@@ -2412,10 +2470,10 @@ let de = class extends Q {
|
|
|
2412
2470
|
}
|
|
2413
2471
|
}
|
|
2414
2472
|
});
|
|
2415
|
-
const
|
|
2473
|
+
const R = [];
|
|
2416
2474
|
for (let w = 0; w < g; w++) {
|
|
2417
|
-
const
|
|
2418
|
-
|
|
2475
|
+
const p = d.getTableColumnByIndex(w);
|
|
2476
|
+
p && R.push(p.toJSON());
|
|
2419
2477
|
}
|
|
2420
2478
|
e.push({
|
|
2421
2479
|
id: S.id,
|
|
@@ -2429,13 +2487,13 @@ let de = class extends Q {
|
|
|
2429
2487
|
rowColType: y.Col,
|
|
2430
2488
|
index: c.startColumn,
|
|
2431
2489
|
count: g,
|
|
2432
|
-
columnsJson:
|
|
2490
|
+
columnsJson: R
|
|
2433
2491
|
}
|
|
2434
2492
|
}
|
|
2435
2493
|
}
|
|
2436
2494
|
});
|
|
2437
|
-
} else if (
|
|
2438
|
-
const g = c.endColumn -
|
|
2495
|
+
} else if (i.startColumn > c.startColumn && i.endColumn > c.endColumn) {
|
|
2496
|
+
const g = c.endColumn - i.startColumn + 1;
|
|
2439
2497
|
n.push({
|
|
2440
2498
|
id: S.id,
|
|
2441
2499
|
params: {
|
|
@@ -2446,16 +2504,16 @@ let de = class extends Q {
|
|
|
2446
2504
|
rowColOperation: {
|
|
2447
2505
|
operationType: M.Delete,
|
|
2448
2506
|
rowColType: y.Col,
|
|
2449
|
-
index:
|
|
2507
|
+
index: i.startColumn,
|
|
2450
2508
|
count: g
|
|
2451
2509
|
}
|
|
2452
2510
|
}
|
|
2453
2511
|
}
|
|
2454
2512
|
});
|
|
2455
|
-
const
|
|
2456
|
-
for (let
|
|
2457
|
-
const f = d.getTableColumnByIndex(
|
|
2458
|
-
f &&
|
|
2513
|
+
const R = [], w = i.startColumn - c.startColumn;
|
|
2514
|
+
for (let p = 0; p < g; p++) {
|
|
2515
|
+
const f = d.getTableColumnByIndex(p + w);
|
|
2516
|
+
f && R.push(f.toJSON());
|
|
2459
2517
|
}
|
|
2460
2518
|
e.push({
|
|
2461
2519
|
id: S.id,
|
|
@@ -2467,14 +2525,14 @@ let de = class extends Q {
|
|
|
2467
2525
|
rowColOperation: {
|
|
2468
2526
|
operationType: M.Insert,
|
|
2469
2527
|
rowColType: y.Col,
|
|
2470
|
-
index:
|
|
2528
|
+
index: i.startColumn,
|
|
2471
2529
|
count: h,
|
|
2472
|
-
columnsJson:
|
|
2530
|
+
columnsJson: R
|
|
2473
2531
|
}
|
|
2474
2532
|
}
|
|
2475
2533
|
}
|
|
2476
2534
|
});
|
|
2477
|
-
} else if (
|
|
2535
|
+
} else if (i.startColumn > c.startColumn && i.endColumn <= c.endColumn) {
|
|
2478
2536
|
n.push({
|
|
2479
2537
|
id: S.id,
|
|
2480
2538
|
params: {
|
|
@@ -2485,16 +2543,16 @@ let de = class extends Q {
|
|
|
2485
2543
|
rowColOperation: {
|
|
2486
2544
|
operationType: M.Delete,
|
|
2487
2545
|
rowColType: y.Col,
|
|
2488
|
-
index:
|
|
2546
|
+
index: i.startColumn,
|
|
2489
2547
|
count: h
|
|
2490
2548
|
}
|
|
2491
2549
|
}
|
|
2492
2550
|
}
|
|
2493
2551
|
});
|
|
2494
|
-
const g = [],
|
|
2552
|
+
const g = [], R = i.startColumn - c.startColumn;
|
|
2495
2553
|
for (let w = 0; w < h; w++) {
|
|
2496
|
-
const
|
|
2497
|
-
|
|
2554
|
+
const p = d.getTableColumnByIndex(w + R);
|
|
2555
|
+
p && g.push(p.toJSON());
|
|
2498
2556
|
}
|
|
2499
2557
|
e.push({
|
|
2500
2558
|
id: S.id,
|
|
@@ -2506,7 +2564,7 @@ let de = class extends Q {
|
|
|
2506
2564
|
rowColOperation: {
|
|
2507
2565
|
operationType: M.Insert,
|
|
2508
2566
|
rowColType: y.Col,
|
|
2509
|
-
index:
|
|
2567
|
+
index: i.startColumn,
|
|
2510
2568
|
count: h,
|
|
2511
2569
|
columnsJson: g
|
|
2512
2570
|
}
|
|
@@ -2519,51 +2577,51 @@ let de = class extends Q {
|
|
|
2519
2577
|
}
|
|
2520
2578
|
_initCommandListener() {
|
|
2521
2579
|
this._commandService.onCommandExecuted((t) => {
|
|
2522
|
-
if (t.id ===
|
|
2580
|
+
if (t.id === ke.id) {
|
|
2523
2581
|
const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endRow - r.startRow + 1;
|
|
2524
2582
|
this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
|
|
2525
|
-
const
|
|
2526
|
-
r.startRow <=
|
|
2583
|
+
const l = u.getRange();
|
|
2584
|
+
r.startRow <= l.startRow && this._tableManager.updateTableRange(n, u.getId(), {
|
|
2527
2585
|
newRange: {
|
|
2528
|
-
...
|
|
2529
|
-
startRow:
|
|
2530
|
-
endRow:
|
|
2586
|
+
...l,
|
|
2587
|
+
startRow: l.startRow + a,
|
|
2588
|
+
endRow: l.endRow + a
|
|
2531
2589
|
}
|
|
2532
2590
|
});
|
|
2533
2591
|
});
|
|
2534
|
-
} else if (t.id ===
|
|
2592
|
+
} else if (t.id === Ye.id) {
|
|
2535
2593
|
const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endColumn - r.startColumn + 1;
|
|
2536
2594
|
this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
|
|
2537
|
-
const
|
|
2538
|
-
r.startColumn <=
|
|
2595
|
+
const l = u.getRange();
|
|
2596
|
+
r.startColumn <= l.startColumn && this._tableManager.updateTableRange(n, u.getId(), {
|
|
2539
2597
|
newRange: {
|
|
2540
|
-
...
|
|
2541
|
-
startColumn:
|
|
2542
|
-
endColumn:
|
|
2598
|
+
...l,
|
|
2599
|
+
startColumn: l.startColumn + a,
|
|
2600
|
+
endColumn: l.endColumn + a
|
|
2543
2601
|
}
|
|
2544
2602
|
});
|
|
2545
2603
|
});
|
|
2546
|
-
} else if (t.id ===
|
|
2604
|
+
} else if (t.id === Qe.id) {
|
|
2547
2605
|
const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endRow - r.startRow + 1;
|
|
2548
2606
|
this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
|
|
2549
|
-
const
|
|
2550
|
-
r.startRow <
|
|
2607
|
+
const l = u.getRange();
|
|
2608
|
+
r.startRow < l.startRow && this._tableManager.updateTableRange(n, u.getId(), {
|
|
2551
2609
|
newRange: {
|
|
2552
|
-
...
|
|
2553
|
-
startRow:
|
|
2554
|
-
endRow:
|
|
2610
|
+
...l,
|
|
2611
|
+
startRow: l.startRow - a,
|
|
2612
|
+
endRow: l.endRow - a
|
|
2555
2613
|
}
|
|
2556
2614
|
});
|
|
2557
2615
|
});
|
|
2558
|
-
} else if (t.id ===
|
|
2616
|
+
} else if (t.id === Ge.id) {
|
|
2559
2617
|
const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endColumn - r.startColumn + 1;
|
|
2560
2618
|
this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
|
|
2561
|
-
const
|
|
2562
|
-
r.startColumn <
|
|
2619
|
+
const l = u.getRange();
|
|
2620
|
+
r.startColumn < l.startColumn && this._tableManager.updateTableRange(n, u.getId(), {
|
|
2563
2621
|
newRange: {
|
|
2564
|
-
...
|
|
2565
|
-
startColumn:
|
|
2566
|
-
endColumn:
|
|
2622
|
+
...l,
|
|
2623
|
+
startColumn: l.startColumn - a,
|
|
2624
|
+
endColumn: l.endColumn - a
|
|
2567
2625
|
}
|
|
2568
2626
|
});
|
|
2569
2627
|
});
|
|
@@ -2571,21 +2629,21 @@ let de = class extends Q {
|
|
|
2571
2629
|
});
|
|
2572
2630
|
}
|
|
2573
2631
|
};
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
],
|
|
2583
|
-
var
|
|
2584
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
2632
|
+
he = Xn([
|
|
2633
|
+
V(0, _(D)),
|
|
2634
|
+
V(1, _(wt)),
|
|
2635
|
+
V(2, _(B)),
|
|
2636
|
+
V(3, _(We)),
|
|
2637
|
+
V(4, _(Ce)),
|
|
2638
|
+
V(5, _(C)),
|
|
2639
|
+
V(6, _(be))
|
|
2640
|
+
], he);
|
|
2641
|
+
var Zn = Object.getOwnPropertyDescriptor, es = (t, e, n, s) => {
|
|
2642
|
+
for (var r = s > 1 ? void 0 : s ? Zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2585
2643
|
(o = t[a]) && (r = o(r) || r);
|
|
2586
2644
|
return r;
|
|
2587
2645
|
}, oe = (t, e) => (n, s) => e(n, s, t);
|
|
2588
|
-
let
|
|
2646
|
+
let ge = class extends H {
|
|
2589
2647
|
constructor(e, n, s, r) {
|
|
2590
2648
|
super();
|
|
2591
2649
|
b(this, "_defaultThemeIndex", 0);
|
|
@@ -2595,8 +2653,8 @@ let he = class extends Q {
|
|
|
2595
2653
|
registerTableChangeEvent() {
|
|
2596
2654
|
this.disposeWithMe(
|
|
2597
2655
|
this._tableManager.tableAdd$.subscribe((e) => {
|
|
2598
|
-
const { range: n, tableId: s, unitId: r, subUnitId: a, tableStyleId: o } = e, u = this._tableManager.getTable(r, s),
|
|
2599
|
-
u.setTableStyleId(
|
|
2656
|
+
const { range: n, tableId: s, unitId: r, subUnitId: a, tableStyleId: o } = e, u = this._tableManager.getTable(r, s), l = o || this._allThemes[this._defaultThemeIndex].name;
|
|
2657
|
+
u.setTableStyleId(l), this._sheetRangeThemeService.registerRangeThemeStyle(l, {
|
|
2600
2658
|
unitId: r,
|
|
2601
2659
|
subUnitId: a,
|
|
2602
2660
|
range: { ...n }
|
|
@@ -2605,12 +2663,12 @@ let he = class extends Q {
|
|
|
2605
2663
|
), this.disposeWithMe(
|
|
2606
2664
|
this._tableManager.tableRangeChanged$.subscribe((e) => {
|
|
2607
2665
|
const { range: n, oldRange: s, tableId: r, unitId: a, subUnitId: o } = e, u = this._tableManager.getTable(a, r);
|
|
2608
|
-
let
|
|
2609
|
-
|
|
2666
|
+
let l = u.getTableStyleId();
|
|
2667
|
+
l || (l = this._allThemes[this._defaultThemeIndex].name, u.setTableStyleId(l)), this._sheetRangeThemeService.removeRangeThemeRule(l, {
|
|
2610
2668
|
unitId: a,
|
|
2611
2669
|
subUnitId: o,
|
|
2612
2670
|
range: { ...s }
|
|
2613
|
-
}), this._sheetRangeThemeService.registerRangeThemeStyle(
|
|
2671
|
+
}), this._sheetRangeThemeService.registerRangeThemeStyle(l, {
|
|
2614
2672
|
unitId: a,
|
|
2615
2673
|
subUnitId: o,
|
|
2616
2674
|
range: { ...n }
|
|
@@ -2618,15 +2676,15 @@ let he = class extends Q {
|
|
|
2618
2676
|
})
|
|
2619
2677
|
), this.disposeWithMe(
|
|
2620
2678
|
this._tableManager.tableThemeChanged$.subscribe((e) => {
|
|
2621
|
-
const { theme: n, oldTheme: s, tableId: r, unitId: a, subUnitId: o } = e,
|
|
2679
|
+
const { theme: n, oldTheme: s, tableId: r, unitId: a, subUnitId: o } = e, l = this._tableManager.getTable(a, r).getRange();
|
|
2622
2680
|
this._sheetRangeThemeService.removeRangeThemeRule(s, {
|
|
2623
2681
|
unitId: a,
|
|
2624
2682
|
subUnitId: o,
|
|
2625
|
-
range: { ...
|
|
2683
|
+
range: { ...l }
|
|
2626
2684
|
}), this._sheetRangeThemeService.registerRangeThemeStyle(n, {
|
|
2627
2685
|
unitId: a,
|
|
2628
2686
|
subUnitId: o,
|
|
2629
|
-
range: { ...
|
|
2687
|
+
range: { ...l }
|
|
2630
2688
|
});
|
|
2631
2689
|
})
|
|
2632
2690
|
), this.disposeWithMe(
|
|
@@ -2641,12 +2699,12 @@ let he = class extends Q {
|
|
|
2641
2699
|
);
|
|
2642
2700
|
}
|
|
2643
2701
|
_initUserTableTheme() {
|
|
2644
|
-
const e = this._configService.getConfig(
|
|
2645
|
-
this._defaultThemeIndex = n, this._allThemes = s.concat(
|
|
2702
|
+
const e = this._configService.getConfig(Xe) || {}, n = e.defaultThemeIndex || 0, s = e.userThemes || [];
|
|
2703
|
+
this._defaultThemeIndex = n, this._allThemes = s.concat(Ze);
|
|
2646
2704
|
}
|
|
2647
2705
|
_initDefaultTableTheme() {
|
|
2648
2706
|
for (let e = 0; e < this._allThemes.length; e++) {
|
|
2649
|
-
const { name: n, style: s } = this._allThemes[e], r = new
|
|
2707
|
+
const { name: n, style: s } = this._allThemes[e], r = new Ct(n, s);
|
|
2650
2708
|
this._sheetRangeThemeModel.registerDefaultRangeTheme(r);
|
|
2651
2709
|
}
|
|
2652
2710
|
}
|
|
@@ -2654,21 +2712,21 @@ let he = class extends Q {
|
|
|
2654
2712
|
super.dispose(), this._allThemes = [], this._defaultThemeIndex = 0;
|
|
2655
2713
|
}
|
|
2656
2714
|
};
|
|
2657
|
-
|
|
2658
|
-
oe(0,
|
|
2659
|
-
oe(1,
|
|
2660
|
-
oe(2,
|
|
2661
|
-
oe(3,
|
|
2662
|
-
],
|
|
2663
|
-
var
|
|
2664
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
2715
|
+
ge = es([
|
|
2716
|
+
oe(0, _(C)),
|
|
2717
|
+
oe(1, _(_t)),
|
|
2718
|
+
oe(2, _(Je)),
|
|
2719
|
+
oe(3, He)
|
|
2720
|
+
], ge);
|
|
2721
|
+
var ts = Object.getOwnPropertyDescriptor, ns = (t, e, n, s) => {
|
|
2722
|
+
for (var r = s > 1 ? void 0 : s ? ts(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2665
2723
|
(o = t[a]) && (r = o(r) || r);
|
|
2666
2724
|
return r;
|
|
2667
2725
|
}, ie = (t, e) => (n, s) => e(n, s, t);
|
|
2668
|
-
let
|
|
2726
|
+
let me = class extends H {
|
|
2669
2727
|
constructor(e, n, s, r) {
|
|
2670
2728
|
super();
|
|
2671
|
-
b(this, "_tableFilteredOutRows$", new
|
|
2729
|
+
b(this, "_tableFilteredOutRows$", new ze(/* @__PURE__ */ new Set()));
|
|
2672
2730
|
b(this, "tableFilteredOutRows$", this._tableFilteredOutRows$.asObservable());
|
|
2673
2731
|
b(this, "_subscription", null);
|
|
2674
2732
|
this._tableManager = e, this._sheetInterceptorService = n, this._univerInstanceService = s, this._zebraCrossingCacheController = r, this.registerFilterChangeEvent(), this.initTableHiddenRowIntercept(), this._initFilteredOutRows();
|
|
@@ -2680,7 +2738,7 @@ let ge = class extends Q {
|
|
|
2680
2738
|
this._tableFilteredOutRows$.next(e);
|
|
2681
2739
|
}
|
|
2682
2740
|
initTableHiddenRowIntercept() {
|
|
2683
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
2741
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(Ve.ROW_FILTERED, {
|
|
2684
2742
|
// 这里需要保证优先级高于sheet的筛选,因为筛选没有next,低于筛选的不会触发interceptor
|
|
2685
2743
|
priority: 100,
|
|
2686
2744
|
handler: (e, n, s) => {
|
|
@@ -2692,11 +2750,11 @@ let ge = class extends Q {
|
|
|
2692
2750
|
}
|
|
2693
2751
|
_initFilteredOutRows() {
|
|
2694
2752
|
this._tableManager.tableInitStatus$.pipe(
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2753
|
+
pe((e) => e),
|
|
2754
|
+
ve(() => this._univerInstanceService.getCurrentTypeOfUnit$(z.UNIVER_SHEET)),
|
|
2755
|
+
pe((e) => e != null),
|
|
2756
|
+
ve((e) => e.activeSheet$),
|
|
2757
|
+
pe((e) => e != null)
|
|
2700
2758
|
).subscribe(() => {
|
|
2701
2759
|
const e = $(this._univerInstanceService);
|
|
2702
2760
|
if (!e)
|
|
@@ -2713,8 +2771,8 @@ let ge = class extends Q {
|
|
|
2713
2771
|
registerFilterChangeEvent() {
|
|
2714
2772
|
this.disposeWithMe(
|
|
2715
2773
|
this._tableManager.tableFilterChanged$.subscribe((e) => {
|
|
2716
|
-
var
|
|
2717
|
-
const { unitId: n, subUnitId: s, tableId: r } = e, a = (
|
|
2774
|
+
var i;
|
|
2775
|
+
const { unitId: n, subUnitId: s, tableId: r } = e, a = (i = this._univerInstanceService.getUnit(n)) == null ? void 0 : i.getSheetBySheetId(s), o = this._tableManager.getTable(n, r);
|
|
2718
2776
|
if (!a || !o)
|
|
2719
2777
|
return;
|
|
2720
2778
|
this.tableFilteredOutRows.clear(), o.getTableFilters().doFilter(a, o.getTableFilterRange()), this._tableManager.getTablesBySubunitId(n, s).forEach((h) => {
|
|
@@ -2731,104 +2789,106 @@ let ge = class extends Q {
|
|
|
2731
2789
|
super.dispose(), (e = this._subscription) == null || e.unsubscribe();
|
|
2732
2790
|
}
|
|
2733
2791
|
};
|
|
2734
|
-
|
|
2735
|
-
ie(0,
|
|
2736
|
-
ie(1,
|
|
2737
|
-
ie(2,
|
|
2738
|
-
ie(3,
|
|
2739
|
-
],
|
|
2740
|
-
var
|
|
2741
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
2792
|
+
me = ns([
|
|
2793
|
+
ie(0, _(C)),
|
|
2794
|
+
ie(1, _(Ce)),
|
|
2795
|
+
ie(2, _(B)),
|
|
2796
|
+
ie(3, _(Tt))
|
|
2797
|
+
], me);
|
|
2798
|
+
var ss = Object.getOwnPropertyDescriptor, rs = (t, e, n, s) => {
|
|
2799
|
+
for (var r = s > 1 ? void 0 : s ? ss(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2742
2800
|
(o = t[a]) && (r = o(r) || r);
|
|
2743
2801
|
return r;
|
|
2744
|
-
},
|
|
2745
|
-
let
|
|
2746
|
-
constructor(t =
|
|
2802
|
+
}, Se = (t, e) => (n, s) => e(n, s, t), le;
|
|
2803
|
+
let Ee = (le = class extends ct {
|
|
2804
|
+
constructor(t = De, e, n, s) {
|
|
2747
2805
|
super(), this._config = t, this._injector = e, this._configService = n, this._commandService = s;
|
|
2748
|
-
const { ...r } =
|
|
2806
|
+
const { ...r } = dt(
|
|
2749
2807
|
{},
|
|
2750
|
-
|
|
2808
|
+
De,
|
|
2751
2809
|
this._config
|
|
2752
2810
|
);
|
|
2753
|
-
this._configService.setConfig(
|
|
2811
|
+
this._configService.setConfig(Xe, r), this._initRegisterCommand();
|
|
2754
2812
|
}
|
|
2755
2813
|
onStarting() {
|
|
2756
|
-
|
|
2757
|
-
[
|
|
2758
|
-
[
|
|
2814
|
+
ht(this._injector, [
|
|
2815
|
+
[C],
|
|
2816
|
+
[ge],
|
|
2759
2817
|
[W],
|
|
2760
2818
|
[X],
|
|
2761
|
-
[
|
|
2762
|
-
[ce],
|
|
2763
|
-
[de]
|
|
2764
|
-
]), Ie(this._injector, [
|
|
2765
|
-
[ce],
|
|
2819
|
+
[me],
|
|
2766
2820
|
[de],
|
|
2767
2821
|
[he],
|
|
2768
|
-
[
|
|
2769
|
-
[X],
|
|
2770
|
-
[ge]
|
|
2822
|
+
[ce]
|
|
2771
2823
|
]);
|
|
2772
2824
|
}
|
|
2773
2825
|
onReady() {
|
|
2774
|
-
|
|
2775
|
-
[
|
|
2826
|
+
Me(this._injector, [
|
|
2827
|
+
[ce],
|
|
2828
|
+
[de],
|
|
2829
|
+
[he],
|
|
2830
|
+
[ge],
|
|
2831
|
+
[W],
|
|
2832
|
+
[X],
|
|
2833
|
+
[me]
|
|
2834
|
+
]), Me(this._injector, [
|
|
2835
|
+
[C]
|
|
2776
2836
|
]);
|
|
2777
2837
|
}
|
|
2778
2838
|
_initRegisterCommand() {
|
|
2779
2839
|
[
|
|
2780
|
-
|
|
2781
|
-
J,
|
|
2782
|
-
xn,
|
|
2840
|
+
$n,
|
|
2783
2841
|
k,
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
S,
|
|
2788
|
-
En,
|
|
2842
|
+
An,
|
|
2843
|
+
Q,
|
|
2844
|
+
_e,
|
|
2789
2845
|
Bn,
|
|
2790
|
-
|
|
2846
|
+
Pn,
|
|
2847
|
+
S,
|
|
2791
2848
|
Hn,
|
|
2792
2849
|
Vn,
|
|
2793
|
-
|
|
2850
|
+
qn,
|
|
2851
|
+
Jn,
|
|
2852
|
+
kn,
|
|
2853
|
+
Qn
|
|
2794
2854
|
].forEach((t) => this._commandService.registerCommand(t));
|
|
2795
2855
|
}
|
|
2796
|
-
}, b(le, "pluginName",
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
],
|
|
2856
|
+
}, b(le, "pluginName", nt), b(le, "type", z.UNIVER_SHEET), le);
|
|
2857
|
+
Ee = rs([
|
|
2858
|
+
Se(1, _(We)),
|
|
2859
|
+
Se(2, He),
|
|
2860
|
+
Se(3, _(D))
|
|
2861
|
+
], Ee);
|
|
2802
2862
|
export {
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2863
|
+
$n as AddSheetTableCommand,
|
|
2864
|
+
k as AddSheetTableMutation,
|
|
2865
|
+
Hn as AddTableThemeCommand,
|
|
2866
|
+
An as DeleteSheetTableCommand,
|
|
2867
|
+
Q as DeleteSheetTableMutation,
|
|
2868
|
+
Vn as RemoveTableThemeCommand,
|
|
2869
|
+
En as SHEET_TABLE_CUSTOM_THEME_PREFIX,
|
|
2870
|
+
Pn as SetSheetTableCommand,
|
|
2871
|
+
Bn as SetSheetTableFilterCommand,
|
|
2872
|
+
_e as SetSheetTableFilterMutation,
|
|
2813
2873
|
S as SetSheetTableMutation,
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2874
|
+
Jn as SheetTableInsertColCommand,
|
|
2875
|
+
qn as SheetTableInsertRowCommand,
|
|
2876
|
+
Qn as SheetTableRemoveColCommand,
|
|
2877
|
+
kn as SheetTableRemoveRowCommand,
|
|
2818
2878
|
X as SheetTableService,
|
|
2819
|
-
|
|
2879
|
+
q as SheetsTableButtonStateEnum,
|
|
2820
2880
|
W as SheetsTableController,
|
|
2821
2881
|
G as SheetsTableSortStateEnum,
|
|
2822
|
-
|
|
2882
|
+
je as TableColumnDataTypeEnum,
|
|
2823
2883
|
ne as TableColumnFilterTypeEnum,
|
|
2824
2884
|
O as TableConditionTypeEnum,
|
|
2825
2885
|
m as TableDateCompareTypeEnum,
|
|
2826
|
-
|
|
2886
|
+
C as TableManager,
|
|
2827
2887
|
F as TableNumberCompareTypeEnum,
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2888
|
+
P as TableStringCompareTypeEnum,
|
|
2889
|
+
Ee as UniverSheetsTablePlugin,
|
|
2890
|
+
hs as customEmptyThemeWithBorderStyle,
|
|
2891
|
+
Ft as isConditionFilter,
|
|
2892
|
+
ds as isManualFilter,
|
|
2893
|
+
gs as processStyleWithBorderStyle
|
|
2834
2894
|
};
|