@univerjs/sheets-table 0.7.0-nightly.202505121607 → 0.7.0-nightly.202505141607
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/README.md +2 -2
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +279 -272
- package/lib/index.js +279 -272
- package/lib/types/controllers/config.schema.d.ts +20 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/plugin.d.ts +4 -3
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (t, e, n) =>
|
|
4
|
-
import { CellValueType as V, BorderStyleTypes as
|
|
5
|
-
import { getSheetCommandTarget as U, AddRangeThemeMutation as
|
|
6
|
-
import { Subject as Q, BehaviorSubject as
|
|
7
|
-
var
|
|
1
|
+
var Ke = Object.defineProperty;
|
|
2
|
+
var Xe = (t, e, n) => e in t ? Ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var b = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { CellValueType as V, BorderStyleTypes as Ze, generateRandomId as L, IUniverInstanceService as J, Inject as S, LocaleService as Ce, Disposable as k, CommandType as N, IUndoRedoService as $, ICommandService as x, sequenceExecute as A, IResourceManagerService as et, Rectangle as pe, RTree as tt, InterceptorEffectEnum as nt, UniverInstanceType as Se, Injector as Be, Plugin as rt, merge as st, registerDependencies as at, touchDependencies as Me, IConfigService as ot } from "@univerjs/core";
|
|
5
|
+
import { getSheetCommandTarget as U, AddRangeThemeMutation as Le, RemoveRangeThemeMutation as We, SheetRangeThemeModel as Ee, SheetInterceptorService as _e, INTERCEPTOR_POINT as He, SheetsSelectionsService as de, InsertRowMutation as Pe, RemoveRowMutation as Ve, getMoveRangeUndoRedoMutations as he, InsertColMutation as qe, RemoveColMutation as Je, IExclusiveRangeService as it, RefRangeService as lt, RemoveColCommand as ut, RemoveRowCommand as ct, InsertColCommand as dt, InsertRowCommand as ht, SheetRangeThemeService as gt, RangeThemeStyle as mt } from "@univerjs/sheets";
|
|
6
|
+
import { Subject as Q, BehaviorSubject as ke, filter as ge, switchMap as ve } from "rxjs";
|
|
7
|
+
var Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), ee = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ee || {}), 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 || {}), H = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(H || {}), g = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(g || {}), P = /* @__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))(P || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {}), T = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(T || {}), D = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(D || {});
|
|
8
8
|
function Z(t, e) {
|
|
9
9
|
return `${e} ${t}`;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const Fe = "TRUE", De = "FALSE", bt = (t) => {
|
|
12
12
|
var n;
|
|
13
13
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function Ye(t) {
|
|
16
16
|
if (t) {
|
|
17
17
|
const { v: e, t: n, p: r } = t;
|
|
18
|
-
return r ?
|
|
18
|
+
return r ? bt(r) : (n === V.FORCE_STRING || n === V.STRING) && e !== void 0 && e !== null ? String(e) : n === V.BOOLEAN ? e ? Fe : De : n === V.NUMBER ? String(e) : typeof e === "boolean" ? e ? Fe : De : e == null ? "" : String(e);
|
|
19
19
|
}
|
|
20
20
|
return "";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function wt(t, e) {
|
|
23
23
|
if (t !== void 0)
|
|
24
24
|
switch (e) {
|
|
25
25
|
case G.Asc:
|
|
@@ -39,45 +39,45 @@ function gt(t, e) {
|
|
|
39
39
|
return P.FilterNoneSortNone;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Rt(t) {
|
|
43
43
|
return t ? t.filterType === ee.condition : !1;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Zn(t) {
|
|
46
46
|
return t ? t.filterType === ee.manual : !1;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
s:
|
|
48
|
+
const y = {
|
|
49
|
+
s: Ze.THIN,
|
|
50
50
|
cl: {
|
|
51
51
|
rgb: "rgb(95 101 116)"
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, er = {
|
|
54
54
|
headerRowStyle: {
|
|
55
55
|
bd: {
|
|
56
|
-
t:
|
|
56
|
+
t: y
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
headerColumnStyle: {
|
|
60
60
|
bd: {
|
|
61
|
-
l:
|
|
61
|
+
l: y
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
lastColumnStyle: {
|
|
65
65
|
bd: {
|
|
66
|
-
r:
|
|
66
|
+
r: y
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
lastRowStyle: {
|
|
70
70
|
bd: {
|
|
71
|
-
b:
|
|
71
|
+
b: y
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, tr = (t, e) => {
|
|
75
75
|
if (t === "headerRowStyle") {
|
|
76
76
|
if (!e.bd)
|
|
77
77
|
return {
|
|
78
78
|
...e,
|
|
79
79
|
bd: {
|
|
80
|
-
t:
|
|
80
|
+
t: y
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
} else if (t === "lastRowStyle") {
|
|
@@ -85,7 +85,7 @@ const N = {
|
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
87
|
bd: {
|
|
88
|
-
b:
|
|
88
|
+
b: y
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
} else if (t === "lastColumnStyle") {
|
|
@@ -93,25 +93,25 @@ const N = {
|
|
|
93
93
|
return {
|
|
94
94
|
...e,
|
|
95
95
|
bd: {
|
|
96
|
-
r:
|
|
96
|
+
r: y
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
} else if (t === "headerColumnStyle" && !e.bd)
|
|
100
100
|
return {
|
|
101
101
|
...e,
|
|
102
102
|
bd: {
|
|
103
|
-
l:
|
|
103
|
+
l: y
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
return e;
|
|
107
|
-
},
|
|
107
|
+
}, pt = [
|
|
108
108
|
[["#6280F9", "#FFFFFF", "#BAC6F8", "#D2DAFA"], ["#fff"]],
|
|
109
109
|
[["#16BDCA", "#FFFFFF", "#EDFAFA", "#AFECEF"], ["#000"]],
|
|
110
110
|
[["#31C48D", "#FFFFFF", "#F3FAF7", "#BCF0DA"], ["#fff"]],
|
|
111
111
|
[["#AC94FA", "#FFFFFF", "#F6F5FF", "#EDEBFE"], ["#fff"]],
|
|
112
112
|
[["#F17EBB", "#FFFFFF", "#FDF2F8", "#FCE8F3"], ["#fff"]],
|
|
113
113
|
[["#F98080", "#FFFFFF", "#FDF2F2", "#FDE8E8"], ["#fff"]]
|
|
114
|
-
], Y =
|
|
114
|
+
], Y = pt.map((t, e) => {
|
|
115
115
|
const [n, r] = t, [s, a, o, l] = n, [u] = r;
|
|
116
116
|
return {
|
|
117
117
|
name: `table-default-${e}`,
|
|
@@ -124,12 +124,12 @@ const N = {
|
|
|
124
124
|
rgb: u
|
|
125
125
|
},
|
|
126
126
|
bd: {
|
|
127
|
-
t:
|
|
127
|
+
t: y
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
headerColumnStyle: {
|
|
131
131
|
bd: {
|
|
132
|
-
l:
|
|
132
|
+
l: y
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
firstRowStyle: {
|
|
@@ -147,12 +147,12 @@ const N = {
|
|
|
147
147
|
rgb: l
|
|
148
148
|
},
|
|
149
149
|
bd: {
|
|
150
|
-
b:
|
|
150
|
+
b: y
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
lastColumnStyle: {
|
|
154
154
|
bd: {
|
|
155
|
-
r:
|
|
155
|
+
r: y
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -166,7 +166,7 @@ class q {
|
|
|
166
166
|
b(this, "formula");
|
|
167
167
|
b(this, "meta");
|
|
168
168
|
b(this, "style");
|
|
169
|
-
this.id = e, this.displayName = n, this.dataType =
|
|
169
|
+
this.id = e, this.displayName = n, this.dataType = Qe.String, this.formula = "", this.meta = {}, this.style = {};
|
|
170
170
|
}
|
|
171
171
|
getMeta() {
|
|
172
172
|
return this.meta;
|
|
@@ -191,79 +191,79 @@ class q {
|
|
|
191
191
|
this.id = e.id, this.displayName = e.displayName, this.dataType = e.dataType, this.formula = e.formula, this.meta = e.meta, this.style = e.style;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
const
|
|
194
|
+
const ft = (t) => t.getMonth() <= 2, Ct = (t) => {
|
|
195
195
|
const e = t.getMonth();
|
|
196
196
|
return e > 2 && e <= 5;
|
|
197
|
-
},
|
|
197
|
+
}, St = (t) => {
|
|
198
198
|
const e = t.getMonth();
|
|
199
199
|
return e > 5 && e <= 8;
|
|
200
|
-
},
|
|
200
|
+
}, _t = (t) => {
|
|
201
201
|
const e = t.getMonth();
|
|
202
202
|
return e > 8 && e <= 11;
|
|
203
|
-
},
|
|
203
|
+
}, Tt = (t) => t.getMonth() === 0, It = (t) => t.getMonth() === 1, Mt = (t) => t.getMonth() === 2, vt = (t) => t.getMonth() === 3, Ft = (t) => t.getMonth() === 4, Dt = (t) => t.getMonth() === 5, Nt = (t) => t.getMonth() === 6, yt = (t) => t.getMonth() === 7, xt = (t) => t.getMonth() === 8, Ot = (t) => t.getMonth() === 9, Ut = (t) => t.getMonth() === 10, $t = (t) => t.getMonth() === 11, At = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Bt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
204
204
|
const n = new Date(e);
|
|
205
205
|
return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
|
|
206
|
-
},
|
|
206
|
+
}, Lt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
207
207
|
const n = new Date(e);
|
|
208
208
|
return n.setDate(n.getDate() - 1), t.toDateString() === n.toDateString();
|
|
209
209
|
}, j = (t) => {
|
|
210
210
|
const e = t.getDay(), n = t.getDate() - e + (e === 0 ? -6 : 1), r = new Date(t);
|
|
211
211
|
return r.setDate(n), r;
|
|
212
|
-
},
|
|
212
|
+
}, Ge = 7 * 24 * 60 * 60 * 1e3, Wt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
213
213
|
const n = j(t), r = j(e);
|
|
214
214
|
return n.toDateString() === r.toDateString();
|
|
215
|
-
},
|
|
216
|
-
const n = j(t), r = new Date(j(e).getTime() +
|
|
215
|
+
}, Et = (t, e = /* @__PURE__ */ new Date()) => {
|
|
216
|
+
const n = j(t), r = new Date(j(e).getTime() + Ge);
|
|
217
217
|
return n.toDateString() === r.toDateString();
|
|
218
|
-
},
|
|
219
|
-
const n = j(t), r = new Date(j(e).getTime() -
|
|
218
|
+
}, Ht = (t, e = /* @__PURE__ */ new Date()) => {
|
|
219
|
+
const n = j(t), r = new Date(j(e).getTime() - Ge);
|
|
220
220
|
return n.toDateString() === r.toDateString();
|
|
221
|
-
},
|
|
221
|
+
}, Pt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Vt = (t) => {
|
|
222
222
|
const e = new Date(t);
|
|
223
223
|
return e.setHours(0, 0, 0, 0), e.setDate(1), e;
|
|
224
|
-
},
|
|
224
|
+
}, qt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
225
225
|
const n = new Date(e);
|
|
226
226
|
n.setHours(0, 0, 0, 0), n.setMonth(n.getMonth() + 1, 1);
|
|
227
227
|
const r = new Date(n);
|
|
228
228
|
r.setMonth(r.getMonth() + 1, 0);
|
|
229
229
|
const s = t.getTime();
|
|
230
230
|
return s >= n.getTime() && s < r.getTime();
|
|
231
|
-
},
|
|
232
|
-
const n =
|
|
231
|
+
}, Jt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
232
|
+
const n = Vt(e), r = new Date(n);
|
|
233
233
|
r.setMonth(r.getMonth() + 1, 0);
|
|
234
234
|
const s = t.getTime();
|
|
235
235
|
return s >= n.getTime() && s < r.getTime();
|
|
236
|
-
},
|
|
236
|
+
}, Te = (t) => {
|
|
237
237
|
const e = new Date(t);
|
|
238
238
|
e.setHours(0, 0, 0, 0), e.setDate(1);
|
|
239
239
|
const n = e.getMonth();
|
|
240
240
|
return e.setMonth(n - n % 3), e;
|
|
241
|
-
},
|
|
242
|
-
const n =
|
|
241
|
+
}, kt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
242
|
+
const n = Te(e), r = new Date(n);
|
|
243
243
|
r.setMonth(r.getMonth() + 3);
|
|
244
244
|
const s = t.getTime();
|
|
245
245
|
return s >= n.getTime() && s < r.getTime();
|
|
246
|
-
},
|
|
247
|
-
const n =
|
|
246
|
+
}, Qt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
247
|
+
const n = Te(e), r = new Date(n);
|
|
248
248
|
r.setMonth(r.getMonth() + 3);
|
|
249
249
|
const s = new Date(r);
|
|
250
250
|
s.setMonth(s.getMonth() + 3, 0);
|
|
251
251
|
const a = t.getTime();
|
|
252
252
|
return a >= r.getTime() && a < s.getTime();
|
|
253
|
-
},
|
|
254
|
-
const n =
|
|
253
|
+
}, Yt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
254
|
+
const n = Te(e), r = new Date(n);
|
|
255
255
|
r.setMonth(r.getMonth() - 3);
|
|
256
256
|
const s = new Date(n);
|
|
257
257
|
s.setDate(0);
|
|
258
258
|
const a = t.getTime();
|
|
259
259
|
return a >= r.getTime() && a < s.getTime();
|
|
260
|
-
},
|
|
260
|
+
}, Gt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), jt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, zt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, Kt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
261
261
|
const n = new Date(e);
|
|
262
262
|
n.setHours(0, 0, 0, 0), n.setMonth(0, 1);
|
|
263
263
|
const r = t.getTime();
|
|
264
264
|
return r >= n.getTime() && r < e.getTime();
|
|
265
265
|
};
|
|
266
|
-
function
|
|
266
|
+
function Xt(t) {
|
|
267
267
|
switch (t.compareType) {
|
|
268
268
|
case g.Equal: {
|
|
269
269
|
const e = t.expectedValue;
|
|
@@ -301,105 +301,105 @@ function jt(t) {
|
|
|
301
301
|
};
|
|
302
302
|
case g.Today: {
|
|
303
303
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
304
|
-
return (n) =>
|
|
304
|
+
return (n) => At(n, e);
|
|
305
305
|
}
|
|
306
306
|
case g.Yesterday: {
|
|
307
307
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
308
|
-
return (n) =>
|
|
308
|
+
return (n) => Lt(n, e);
|
|
309
309
|
}
|
|
310
310
|
case g.Tomorrow: {
|
|
311
311
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
312
|
-
return (n) =>
|
|
312
|
+
return (n) => Bt(n, e);
|
|
313
313
|
}
|
|
314
314
|
case g.ThisWeek: {
|
|
315
315
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
316
|
-
return (n) =>
|
|
316
|
+
return (n) => Wt(n, e);
|
|
317
317
|
}
|
|
318
318
|
case g.LastWeek: {
|
|
319
319
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
320
|
-
return (n) =>
|
|
320
|
+
return (n) => Ht(n, e);
|
|
321
321
|
}
|
|
322
322
|
case g.NextWeek: {
|
|
323
323
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
324
|
-
return (n) =>
|
|
324
|
+
return (n) => Et(n, e);
|
|
325
325
|
}
|
|
326
326
|
case g.ThisMonth: {
|
|
327
327
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
328
|
-
return (n) =>
|
|
328
|
+
return (n) => Pt(n, e);
|
|
329
329
|
}
|
|
330
330
|
case g.LastMonth: {
|
|
331
331
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
332
|
-
return (n) =>
|
|
332
|
+
return (n) => Jt(n, e);
|
|
333
333
|
}
|
|
334
334
|
case g.NextMonth: {
|
|
335
335
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
336
|
-
return (n) =>
|
|
336
|
+
return (n) => qt(n, e);
|
|
337
337
|
}
|
|
338
338
|
case g.ThisQuarter: {
|
|
339
339
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
340
|
-
return (n) =>
|
|
340
|
+
return (n) => kt(n, e);
|
|
341
341
|
}
|
|
342
342
|
case g.LastQuarter: {
|
|
343
343
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
344
|
-
return (n) =>
|
|
344
|
+
return (n) => Yt(n, e);
|
|
345
345
|
}
|
|
346
346
|
case g.NextQuarter: {
|
|
347
347
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
348
|
-
return (n) =>
|
|
348
|
+
return (n) => Qt(n, e);
|
|
349
349
|
}
|
|
350
350
|
case g.ThisYear: {
|
|
351
351
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
352
|
-
return (n) =>
|
|
352
|
+
return (n) => Gt(n, e);
|
|
353
353
|
}
|
|
354
354
|
case g.LastYear: {
|
|
355
355
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
356
|
-
return (n) =>
|
|
356
|
+
return (n) => zt(n, e);
|
|
357
357
|
}
|
|
358
358
|
case g.NextYear: {
|
|
359
359
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
360
|
-
return (n) =>
|
|
360
|
+
return (n) => jt(n, e);
|
|
361
361
|
}
|
|
362
362
|
case g.YearToDate: {
|
|
363
363
|
const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
|
|
364
|
-
return (n) =>
|
|
364
|
+
return (n) => Kt(n, e);
|
|
365
365
|
}
|
|
366
366
|
case g.M1:
|
|
367
|
-
return
|
|
367
|
+
return Tt;
|
|
368
368
|
case g.M2:
|
|
369
|
-
return
|
|
369
|
+
return It;
|
|
370
370
|
case g.M3:
|
|
371
|
-
return
|
|
371
|
+
return Mt;
|
|
372
372
|
case g.M4:
|
|
373
|
-
return
|
|
373
|
+
return vt;
|
|
374
374
|
case g.M5:
|
|
375
|
-
return
|
|
375
|
+
return Ft;
|
|
376
376
|
case g.M6:
|
|
377
|
-
return
|
|
377
|
+
return Dt;
|
|
378
378
|
case g.M7:
|
|
379
|
-
return
|
|
379
|
+
return Nt;
|
|
380
380
|
case g.M8:
|
|
381
|
-
return
|
|
381
|
+
return yt;
|
|
382
382
|
case g.M9:
|
|
383
|
-
return
|
|
383
|
+
return xt;
|
|
384
384
|
case g.M10:
|
|
385
|
-
return
|
|
385
|
+
return Ot;
|
|
386
386
|
case g.M11:
|
|
387
|
-
return
|
|
387
|
+
return Ut;
|
|
388
388
|
case g.M12:
|
|
389
|
-
return
|
|
389
|
+
return $t;
|
|
390
390
|
case g.Q1:
|
|
391
|
-
return
|
|
391
|
+
return ft;
|
|
392
392
|
case g.Q2:
|
|
393
|
-
return
|
|
393
|
+
return Ct;
|
|
394
394
|
case g.Q3:
|
|
395
|
-
return
|
|
395
|
+
return St;
|
|
396
396
|
case g.Q4:
|
|
397
|
-
return
|
|
397
|
+
return _t;
|
|
398
398
|
default:
|
|
399
399
|
throw new Error("Unsupported compare type");
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Zt {
|
|
403
403
|
/**
|
|
404
404
|
* Initializes a new instance of the Heap class.
|
|
405
405
|
*/
|
|
@@ -463,7 +463,7 @@ class zt {
|
|
|
463
463
|
return this.heap.includes(e);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class en extends Zt {
|
|
467
467
|
/**
|
|
468
468
|
* Initializes a new instance of the MinHeap class.
|
|
469
469
|
*/
|
|
@@ -502,13 +502,13 @@ class Kt extends zt {
|
|
|
502
502
|
this.heap[0] = this.heap.pop(), this.shiftDown(0);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
const n = new
|
|
505
|
+
const tn = (t, e) => {
|
|
506
|
+
const n = new en();
|
|
507
507
|
for (const r of t)
|
|
508
508
|
n.insert(r), n.size() > e && n.pop();
|
|
509
509
|
return n.heap;
|
|
510
|
-
},
|
|
511
|
-
function
|
|
510
|
+
}, nn = (t, e) => t > e, rn = (t, e) => t < e, sn = (t, e, n) => tn(t, e).includes(n);
|
|
511
|
+
function an(t, e) {
|
|
512
512
|
switch (t.compareType) {
|
|
513
513
|
case F.Equal: {
|
|
514
514
|
const n = Number(t.expectedValue);
|
|
@@ -544,59 +544,59 @@ function nn(t, e) {
|
|
|
544
544
|
}
|
|
545
545
|
case F.Above: {
|
|
546
546
|
const n = e.average;
|
|
547
|
-
return (r) =>
|
|
547
|
+
return (r) => nn(r, n);
|
|
548
548
|
}
|
|
549
549
|
case F.Below: {
|
|
550
550
|
const n = e.average;
|
|
551
|
-
return (r) =>
|
|
551
|
+
return (r) => rn(r, n);
|
|
552
552
|
}
|
|
553
553
|
case F.TopN: {
|
|
554
554
|
const n = e.list, r = Number(t.expectedValue);
|
|
555
|
-
return (s) =>
|
|
555
|
+
return (s) => sn(n, r, s);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
const K = (t) => {
|
|
560
560
|
const n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\*/g, ".*").replace(/\\\?/g, ".");
|
|
561
561
|
return new RegExp(`^${n}$`);
|
|
562
|
-
},
|
|
563
|
-
function
|
|
562
|
+
}, on = (t, e) => K(e).test(t), ln = (t, e) => !K(e).test(t), un = (t, e) => K(`*${e}*`).test(t), cn = (t, e) => !K(`*${e}*`).test(t), dn = (t, e) => K(`${e}*`).test(t), hn = (t, e) => K(`*${e}`).test(t);
|
|
563
|
+
function gn(t) {
|
|
564
564
|
switch (t.compareType) {
|
|
565
565
|
case H.Equal:
|
|
566
|
-
return (e) =>
|
|
566
|
+
return (e) => on(e, t.expectedValue);
|
|
567
567
|
case H.NotEqual:
|
|
568
|
-
return (e) =>
|
|
568
|
+
return (e) => ln(e, t.expectedValue);
|
|
569
569
|
case H.Contains:
|
|
570
|
-
return (e) =>
|
|
570
|
+
return (e) => un(e, t.expectedValue);
|
|
571
571
|
case H.NotContains:
|
|
572
|
-
return (e) =>
|
|
572
|
+
return (e) => cn(e, t.expectedValue);
|
|
573
573
|
case H.StartsWith:
|
|
574
|
-
return (e) =>
|
|
574
|
+
return (e) => dn(e, t.expectedValue);
|
|
575
575
|
case H.EndsWith:
|
|
576
|
-
return (e) =>
|
|
576
|
+
return (e) => hn(e, t.expectedValue);
|
|
577
577
|
default:
|
|
578
578
|
return console.error(`Unknown filter operator: ${t.compareType}`), (e) => !0;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const mn = /* @__PURE__ */ new Set([
|
|
582
582
|
F.Above,
|
|
583
583
|
F.Below,
|
|
584
584
|
F.TopN
|
|
585
585
|
]);
|
|
586
586
|
g.Today, g.Yesterday, g.Tomorrow, g.ThisWeek, g.LastWeek, g.NextWeek, g.ThisMonth, g.LastMonth, g.NextMonth, g.ThisQuarter, g.LastQuarter, g.NextQuarter, g.NextYear, g.ThisYear, g.LastYear, g.YearToDate;
|
|
587
|
-
function
|
|
588
|
-
return
|
|
587
|
+
function je(t) {
|
|
588
|
+
return mn.has(t);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
if (
|
|
590
|
+
function bn(t, e) {
|
|
591
|
+
if (je(t.filterInfo.compareType))
|
|
592
592
|
return (n) => !0;
|
|
593
593
|
switch (t.filterInfo.conditionType) {
|
|
594
594
|
case O.Date:
|
|
595
|
-
return
|
|
595
|
+
return Xt(t.filterInfo);
|
|
596
596
|
case O.Number:
|
|
597
|
-
return
|
|
597
|
+
return an(t.filterInfo, e);
|
|
598
598
|
case O.String:
|
|
599
|
-
return
|
|
599
|
+
return gn(t.filterInfo);
|
|
600
600
|
case O.Logic:
|
|
601
601
|
default:
|
|
602
602
|
return (n) => !0;
|
|
@@ -605,33 +605,33 @@ function hn(t, e) {
|
|
|
605
605
|
function oe(t, e, n, r) {
|
|
606
606
|
switch (r) {
|
|
607
607
|
case O.Date: {
|
|
608
|
-
const s =
|
|
609
|
-
return s ?
|
|
608
|
+
const s = Ne(t, e, n);
|
|
609
|
+
return s ? pn(s) : null;
|
|
610
610
|
}
|
|
611
611
|
case O.Number:
|
|
612
|
-
return
|
|
612
|
+
return Ne(t, e, n);
|
|
613
613
|
case O.String:
|
|
614
614
|
default:
|
|
615
|
-
return
|
|
615
|
+
return Rn(t, e, n);
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const wn = (t) => {
|
|
619
619
|
var n;
|
|
620
620
|
return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
|
|
621
621
|
};
|
|
622
|
-
function
|
|
622
|
+
function Rn(t, e, n) {
|
|
623
623
|
const r = t.getCell(e, n);
|
|
624
624
|
if (!r) return null;
|
|
625
625
|
const { v: s, t: a, p: o } = r;
|
|
626
|
-
return o ?
|
|
626
|
+
return o ? wn(o) : typeof s == "string" ? a === V.BOOLEAN ? s.toUpperCase() : s : typeof s == "number" ? a === V.BOOLEAN ? s ? "TRUE" : "FALSE" : s : typeof s == "boolean" ? s ? "TRUE" : "FALSE" : s === void 0 ? "(空白)" : String(s);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Ne(t, e, n) {
|
|
629
629
|
const r = t.getCell(e, n);
|
|
630
630
|
if (!r) return null;
|
|
631
631
|
const { v: s, t: a, p: o } = r;
|
|
632
632
|
return o ? null : typeof s == "string" && a === V.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(s);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function pn(t) {
|
|
635
635
|
const e = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), n = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
|
|
636
636
|
let r = t - 1;
|
|
637
637
|
return r > (n.getTime() - e.getTime()) / (1e3 * 3600 * 24) && (r -= 1), r < 0 && (r = t), new Date(e.getTime() + r * (1e3 * 3600 * 24));
|
|
@@ -655,7 +655,7 @@ class ye {
|
|
|
655
655
|
getFilterState(e) {
|
|
656
656
|
var r;
|
|
657
657
|
const n = ((r = this._tableSortInfo) == null ? void 0 : r.columnIndex) === e ? this._tableSortInfo.sortState : G.None;
|
|
658
|
-
return
|
|
658
|
+
return wt(this._tableColumnFilterList[e], n);
|
|
659
659
|
}
|
|
660
660
|
getSortState() {
|
|
661
661
|
var e;
|
|
@@ -681,7 +681,7 @@ class ye {
|
|
|
681
681
|
if (a && e) {
|
|
682
682
|
const { startRow: o, endRow: l, startColumn: u } = n, i = u + r, h = this.getExecuteFunc(e, n, r, a);
|
|
683
683
|
for (let d = o; d <= l; d++) {
|
|
684
|
-
const c =
|
|
684
|
+
const c = Rt(a) ? a.filterInfo.conditionType : O.String;
|
|
685
685
|
oe(e, d, i, c) === null ? s.add(d) : h(oe(e, d, i, c)) || s.add(d);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
@@ -703,8 +703,8 @@ class ye {
|
|
|
703
703
|
const a = new Set(s.values);
|
|
704
704
|
return (o) => a.has(o);
|
|
705
705
|
} else if (s.filterType === ee.condition) {
|
|
706
|
-
const o =
|
|
707
|
-
return
|
|
706
|
+
const o = je(s.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, r) : void 0;
|
|
707
|
+
return bn(s, o);
|
|
708
708
|
} else
|
|
709
709
|
return (a) => !0;
|
|
710
710
|
}
|
|
@@ -722,7 +722,7 @@ class ye {
|
|
|
722
722
|
this._tableColumnFilterList = [];
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
class
|
|
725
|
+
class xe {
|
|
726
726
|
constructor(e, n, r, s, a = {}) {
|
|
727
727
|
b(this, "_id");
|
|
728
728
|
b(this, "_name");
|
|
@@ -909,11 +909,11 @@ class Ne {
|
|
|
909
909
|
this._id = "", this._name = "", this._tableStyleId = "", this._showHeader = !0, this._showFooter = !0, delete this._range, this._columns.clear(), this._columnOrder = [];
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
var
|
|
913
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
912
|
+
var fn = Object.getOwnPropertyDescriptor, Cn = (t, e, n, r) => {
|
|
913
|
+
for (var s = r > 1 ? void 0 : r ? fn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
914
914
|
(o = t[a]) && (s = o(s) || s);
|
|
915
915
|
return s;
|
|
916
|
-
},
|
|
916
|
+
}, Oe = (t, e) => (n, r) => e(n, r, t);
|
|
917
917
|
let _ = class extends k {
|
|
918
918
|
constructor(e, n) {
|
|
919
919
|
super();
|
|
@@ -930,7 +930,7 @@ let _ = class extends k {
|
|
|
930
930
|
b(this, "tableThemeChanged$", this._tableThemeChanged$.asObservable());
|
|
931
931
|
b(this, "_tableFilterChanged$", new Q());
|
|
932
932
|
b(this, "tableFilterChanged$", this._tableFilterChanged$.asObservable());
|
|
933
|
-
b(this, "_tableInitStatus", new
|
|
933
|
+
b(this, "_tableInitStatus", new ke(!1));
|
|
934
934
|
b(this, "tableInitStatus$", this._tableInitStatus.asObservable());
|
|
935
935
|
this._univerInstanceService = e, this._localeService = n, this._tableMap = /* @__PURE__ */ new Map();
|
|
936
936
|
}
|
|
@@ -941,7 +941,7 @@ let _ = class extends k {
|
|
|
941
941
|
var d;
|
|
942
942
|
const a = (d = this._univerInstanceService.getUnit(e)) == null ? void 0 : d.getSheetBySheetId(n), { startRow: o, startColumn: l, endColumn: u } = r, i = [], h = s != null ? s : "Column";
|
|
943
943
|
for (let c = l; c <= u; c++)
|
|
944
|
-
i.push(
|
|
944
|
+
i.push(Ye(a == null ? void 0 : a.getCell(o, c)) || Z(c - l + 1, h));
|
|
945
945
|
return i;
|
|
946
946
|
}
|
|
947
947
|
/**
|
|
@@ -954,7 +954,7 @@ let _ = class extends k {
|
|
|
954
954
|
* @returns {string} The table id.
|
|
955
955
|
*/
|
|
956
956
|
addTable(e, n, r, s, a, o, l) {
|
|
957
|
-
const u = o != null ? o : L(), i = a || this.getColumnHeader(e, n, s), h = new
|
|
957
|
+
const u = o != null ? o : L(), i = a || this.getColumnHeader(e, n, s), h = new xe(u, r, s, i, l);
|
|
958
958
|
return h.setSubunitId(n), this._ensureUnit(e).set(u, h), this._tableAdd$.next({
|
|
959
959
|
unitId: e,
|
|
960
960
|
subUnitId: n,
|
|
@@ -1173,7 +1173,7 @@ let _ = class extends k {
|
|
|
1173
1173
|
return;
|
|
1174
1174
|
const l = o.worksheet;
|
|
1175
1175
|
n[a].forEach((i) => {
|
|
1176
|
-
const h = this.getColumnHeader(e, a, i.range), d = new
|
|
1176
|
+
const h = this.getColumnHeader(e, a, i.range), d = new xe(i.id, i.name, i.range, h, i.options);
|
|
1177
1177
|
if (d.setTableMeta(i.meta), i.columns.length && d.setColumns(i.columns), i.filters) {
|
|
1178
1178
|
const c = d.getTableFilters();
|
|
1179
1179
|
c.fromJSON(i.filters), c.doFilter(l, d.getTableFilterRange());
|
|
@@ -1197,15 +1197,15 @@ let _ = class extends k {
|
|
|
1197
1197
|
}), this._tableMap.clear();
|
|
1198
1198
|
}
|
|
1199
1199
|
};
|
|
1200
|
-
_ =
|
|
1201
|
-
|
|
1202
|
-
|
|
1200
|
+
_ = Cn([
|
|
1201
|
+
Oe(0, J),
|
|
1202
|
+
Oe(1, S(Ce))
|
|
1203
1203
|
], _);
|
|
1204
|
-
var
|
|
1205
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1204
|
+
var Sn = Object.getOwnPropertyDescriptor, _n = (t, e, n, r) => {
|
|
1205
|
+
for (var s = r > 1 ? void 0 : r ? Sn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1206
1206
|
(o = t[a]) && (s = o(s) || s);
|
|
1207
1207
|
return s;
|
|
1208
|
-
},
|
|
1208
|
+
}, Tn = (t, e) => (n, r) => e(n, r, t);
|
|
1209
1209
|
let z = class extends k {
|
|
1210
1210
|
constructor(t) {
|
|
1211
1211
|
super(), this._tableManager = t;
|
|
@@ -1250,31 +1250,31 @@ let z = class extends k {
|
|
|
1250
1250
|
return oe(t, e, n, r);
|
|
1251
1251
|
}
|
|
1252
1252
|
};
|
|
1253
|
-
z =
|
|
1254
|
-
|
|
1253
|
+
z = _n([
|
|
1254
|
+
Tn(0, S(_))
|
|
1255
1255
|
], z);
|
|
1256
1256
|
const te = {
|
|
1257
1257
|
id: "sheet.mutation.add-table",
|
|
1258
|
-
type:
|
|
1258
|
+
type: N.MUTATION,
|
|
1259
1259
|
handler: (t, e) => {
|
|
1260
1260
|
const { tableId: n, unitId: r, subUnitId: s, name: a, range: o, header: l, options: u } = e;
|
|
1261
1261
|
return t.get(z).addTable(r, s, a, o, l, n, u), !0;
|
|
1262
1262
|
}
|
|
1263
1263
|
}, ne = {
|
|
1264
1264
|
id: "sheet.mutation.delete-table",
|
|
1265
|
-
type:
|
|
1265
|
+
type: N.MUTATION,
|
|
1266
1266
|
handler: (t, e) => {
|
|
1267
1267
|
const { unitId: n, subUnitId: r, tableId: s } = e;
|
|
1268
1268
|
return t.get(z).deleteTable(n, r, s), !0;
|
|
1269
1269
|
}
|
|
1270
|
-
},
|
|
1270
|
+
}, In = {
|
|
1271
1271
|
id: "sheet.command.add-table",
|
|
1272
|
-
type:
|
|
1272
|
+
type: N.COMMAND,
|
|
1273
1273
|
handler: (t, e) => {
|
|
1274
1274
|
var w;
|
|
1275
1275
|
if (!e)
|
|
1276
1276
|
return !1;
|
|
1277
|
-
const n = t.get($), r = t.get(x), s = t.get(
|
|
1277
|
+
const n = t.get($), r = t.get(x), s = t.get(Ce), a = (w = e.id) != null ? w : L();
|
|
1278
1278
|
let o = e.name;
|
|
1279
1279
|
if (!o) {
|
|
1280
1280
|
const R = t.get(_).getTableList(e.unitId).length;
|
|
@@ -1289,16 +1289,16 @@ const te = {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
}, p = {
|
|
1291
1291
|
id: "sheet.mutation.set-sheet-table",
|
|
1292
|
-
type:
|
|
1292
|
+
type: N.MUTATION,
|
|
1293
1293
|
handler: (t, e) => {
|
|
1294
1294
|
if (!e)
|
|
1295
1295
|
return !1;
|
|
1296
1296
|
const { unitId: n, tableId: r, config: s } = e;
|
|
1297
1297
|
return t.get(_).setTableByConfig(n, r, s), !0;
|
|
1298
1298
|
}
|
|
1299
|
-
},
|
|
1299
|
+
}, Mn = {
|
|
1300
1300
|
id: "sheet.command.add-table-theme",
|
|
1301
|
-
type:
|
|
1301
|
+
type: N.COMMAND,
|
|
1302
1302
|
handler: (t, e) => {
|
|
1303
1303
|
if (!e)
|
|
1304
1304
|
return !1;
|
|
@@ -1306,7 +1306,7 @@ const te = {
|
|
|
1306
1306
|
if (!u) return !1;
|
|
1307
1307
|
const i = u.getSubunitId();
|
|
1308
1308
|
o.push({
|
|
1309
|
-
id:
|
|
1309
|
+
id: Le.id,
|
|
1310
1310
|
params: {
|
|
1311
1311
|
unitId: r,
|
|
1312
1312
|
subUnitId: i,
|
|
@@ -1333,7 +1333,7 @@ const te = {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
}), l.push({
|
|
1336
|
-
id:
|
|
1336
|
+
id: We.id,
|
|
1337
1337
|
params: {
|
|
1338
1338
|
unitId: r,
|
|
1339
1339
|
subUnitId: i,
|
|
@@ -1347,9 +1347,9 @@ const te = {
|
|
|
1347
1347
|
redoMutations: o
|
|
1348
1348
|
}), !0;
|
|
1349
1349
|
}
|
|
1350
|
-
},
|
|
1350
|
+
}, vn = {
|
|
1351
1351
|
id: "sheet.command.delete-table",
|
|
1352
|
-
type:
|
|
1352
|
+
type: N.COMMAND,
|
|
1353
1353
|
handler: (t, e) => {
|
|
1354
1354
|
if (!e)
|
|
1355
1355
|
return !1;
|
|
@@ -1372,19 +1372,19 @@ const te = {
|
|
|
1372
1372
|
redoMutations: a
|
|
1373
1373
|
}), !0;
|
|
1374
1374
|
}
|
|
1375
|
-
},
|
|
1375
|
+
}, ze = "SHEET_TABLE_PLUGIN", se = "SHEET_TABLE", Fn = "table-custom", Dn = {
|
|
1376
1376
|
id: "sheet.command.remove-table-theme",
|
|
1377
|
-
type:
|
|
1377
|
+
type: N.COMMAND,
|
|
1378
1378
|
handler: (t, e) => {
|
|
1379
1379
|
if (!e)
|
|
1380
1380
|
return !1;
|
|
1381
|
-
const { unitId: n, tableId: r, themeName: s } = e, a = t.get(_), o = t.get(
|
|
1381
|
+
const { unitId: n, tableId: r, themeName: s } = e, a = t.get(_), o = t.get(Ee), l = a.getTableById(n, r);
|
|
1382
1382
|
if (!l) return !1;
|
|
1383
1383
|
const u = l.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith("table-default"));
|
|
1384
|
-
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(
|
|
1385
|
-
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id:
|
|
1384
|
+
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(Fn)).find((R) => R !== s);
|
|
1385
|
+
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id: We.id, params: { unitId: n, subUnitId: u, styleName: s } });
|
|
1386
1386
|
const C = o.getDefaultRangeThemeStyle(s);
|
|
1387
|
-
C && (h.push({ id:
|
|
1387
|
+
C && (h.push({ id: Le.id, params: { unitId: n, subUnitId: u, styleJSON: C.toJson() } }), h.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: s } } }));
|
|
1388
1388
|
const w = t.get(x);
|
|
1389
1389
|
return A(i, w) && t.get($).pushUndoRedo({
|
|
1390
1390
|
unitID: n,
|
|
@@ -1392,9 +1392,9 @@ const te = {
|
|
|
1392
1392
|
undoMutations: h
|
|
1393
1393
|
}), !0;
|
|
1394
1394
|
}
|
|
1395
|
-
},
|
|
1395
|
+
}, Nn = {
|
|
1396
1396
|
id: "sheet.command.set-table-config",
|
|
1397
|
-
type:
|
|
1397
|
+
type: N.COMMAND,
|
|
1398
1398
|
handler: (t, e) => {
|
|
1399
1399
|
if (!e)
|
|
1400
1400
|
return !1;
|
|
@@ -1436,29 +1436,29 @@ const te = {
|
|
|
1436
1436
|
]
|
|
1437
1437
|
}), !0;
|
|
1438
1438
|
}
|
|
1439
|
-
},
|
|
1439
|
+
}, fe = {
|
|
1440
1440
|
id: "sheet.mutation.set-table-filter",
|
|
1441
|
-
type:
|
|
1441
|
+
type: N.MUTATION,
|
|
1442
1442
|
handler: (t, e) => {
|
|
1443
1443
|
const { tableId: n, unitId: r, column: s, tableFilter: a } = e;
|
|
1444
1444
|
return t.get(_).addFilter(r, n, s, a), !0;
|
|
1445
1445
|
}
|
|
1446
|
-
},
|
|
1446
|
+
}, yn = {
|
|
1447
1447
|
id: "sheet.command.set-table-filter",
|
|
1448
|
-
type:
|
|
1448
|
+
type: N.COMMAND,
|
|
1449
1449
|
handler: (t, e) => {
|
|
1450
1450
|
if (!e)
|
|
1451
1451
|
return !1;
|
|
1452
1452
|
const n = t.get($), r = t.get(x), s = e.tableId || L(), a = [], o = [];
|
|
1453
|
-
return a.push({ id:
|
|
1453
|
+
return a.push({ id: fe.id, params: { ...e, tableId: s } }), o.push({ id: fe.id, params: { ...e, tableId: s, tableFilter: void 0 } }), A(a, r) && n.pushUndoRedo({
|
|
1454
1454
|
unitID: e.unitId,
|
|
1455
1455
|
undoMutations: o,
|
|
1456
1456
|
redoMutations: a
|
|
1457
1457
|
}), !0;
|
|
1458
1458
|
}
|
|
1459
1459
|
};
|
|
1460
|
-
var
|
|
1461
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1460
|
+
var xn = Object.getOwnPropertyDescriptor, On = (t, e, n, r) => {
|
|
1461
|
+
for (var s = r > 1 ? void 0 : r ? xn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1462
1462
|
(o = t[a]) && (s = o(s) || s);
|
|
1463
1463
|
return s;
|
|
1464
1464
|
}, me = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -1471,13 +1471,13 @@ let W = class extends k {
|
|
|
1471
1471
|
getContainerTableWithRange(e, n, r) {
|
|
1472
1472
|
const s = this._ensureTableRangeRTree(e), o = Array.from(s.bulkSearch([{ unitId: e, sheetId: n, range: r }])).find((l) => {
|
|
1473
1473
|
const u = this._tableManager.getTable(e, String(l));
|
|
1474
|
-
return u ?
|
|
1474
|
+
return u ? pe.contains(u.getRange(), r) : !1;
|
|
1475
1475
|
});
|
|
1476
1476
|
if (o)
|
|
1477
1477
|
return this._tableManager.getTable(e, String(o));
|
|
1478
1478
|
}
|
|
1479
1479
|
_ensureTableRangeRTree(e) {
|
|
1480
|
-
return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new
|
|
1480
|
+
return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new tt()), this._tableRangeRTree.get(e);
|
|
1481
1481
|
}
|
|
1482
1482
|
registerTableChangeEvent() {
|
|
1483
1483
|
this.disposeWithMe(
|
|
@@ -1519,8 +1519,8 @@ let W = class extends k {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
registerTableHeaderInterceptor() {
|
|
1521
1521
|
this.disposeWithMe(
|
|
1522
|
-
this._sheetInterceptorService.intercept(
|
|
1523
|
-
effect:
|
|
1522
|
+
this._sheetInterceptorService.intercept(He.CELL_CONTENT, {
|
|
1523
|
+
effect: nt.Value,
|
|
1524
1524
|
handler: (e, n, r) => {
|
|
1525
1525
|
const { row: s, col: a, unitId: o, subUnitId: l } = n, u = this._ensureTableRangeRTree(o);
|
|
1526
1526
|
if ((e == null ? void 0 : e.v) === void 0 && u) {
|
|
@@ -1562,8 +1562,8 @@ let W = class extends k {
|
|
|
1562
1562
|
return {};
|
|
1563
1563
|
}
|
|
1564
1564
|
},
|
|
1565
|
-
businesses: [
|
|
1566
|
-
pluginName:
|
|
1565
|
+
businesses: [Se.UNIVER_SHEET],
|
|
1566
|
+
pluginName: ze,
|
|
1567
1567
|
onLoad: (e, n) => {
|
|
1568
1568
|
this._fromJSON(e, n);
|
|
1569
1569
|
},
|
|
@@ -1576,14 +1576,14 @@ let W = class extends k {
|
|
|
1576
1576
|
super.dispose(), this._tableRangeRTree.clear();
|
|
1577
1577
|
}
|
|
1578
1578
|
};
|
|
1579
|
-
W =
|
|
1580
|
-
me(0, S(
|
|
1579
|
+
W = On([
|
|
1580
|
+
me(0, S(_e)),
|
|
1581
1581
|
me(1, S(_)),
|
|
1582
|
-
me(2, S(
|
|
1582
|
+
me(2, S(et))
|
|
1583
1583
|
], W);
|
|
1584
|
-
const
|
|
1584
|
+
const Un = {
|
|
1585
1585
|
id: "sheet.command.table-insert-row",
|
|
1586
|
-
type:
|
|
1586
|
+
type: N.COMMAND,
|
|
1587
1587
|
handler: (t) => {
|
|
1588
1588
|
const e = t.get(J), n = U(e);
|
|
1589
1589
|
if (!n)
|
|
@@ -1597,7 +1597,7 @@ const Nn = {
|
|
|
1597
1597
|
const m = h.endRow - h.startRow + 1, w = s.getRowCount() - 1, f = s.getCellMatrix().getDataRange().endRow, R = [], I = [];
|
|
1598
1598
|
if (w - f < m)
|
|
1599
1599
|
R.push({
|
|
1600
|
-
id:
|
|
1600
|
+
id: Pe.id,
|
|
1601
1601
|
params: {
|
|
1602
1602
|
unitId: a,
|
|
1603
1603
|
subUnitId: o,
|
|
@@ -1631,7 +1631,7 @@ const Nn = {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
1633
|
}), I.push({
|
|
1634
|
-
id:
|
|
1634
|
+
id: Ve.id,
|
|
1635
1635
|
params: {
|
|
1636
1636
|
unitId: a,
|
|
1637
1637
|
subUnitId: o,
|
|
@@ -1700,9 +1700,9 @@ const Nn = {
|
|
|
1700
1700
|
redoMutations: R
|
|
1701
1701
|
}), !0;
|
|
1702
1702
|
}
|
|
1703
|
-
},
|
|
1703
|
+
}, $n = {
|
|
1704
1704
|
id: "sheet.command.table-insert-col",
|
|
1705
|
-
type:
|
|
1705
|
+
type: N.COMMAND,
|
|
1706
1706
|
handler: (t) => {
|
|
1707
1707
|
const e = t.get(J), n = U(e);
|
|
1708
1708
|
if (!n)
|
|
@@ -1715,7 +1715,7 @@ const Nn = {
|
|
|
1715
1715
|
const c = i.endColumn - i.startColumn + 1, C = r.getColumnCount() - 1, w = r.getCellMatrix().getDataRange().endColumn, f = [], R = [];
|
|
1716
1716
|
if (C - w < c)
|
|
1717
1717
|
f.push({
|
|
1718
|
-
id:
|
|
1718
|
+
id: qe.id,
|
|
1719
1719
|
params: {
|
|
1720
1720
|
unitId: s,
|
|
1721
1721
|
subUnitId: a,
|
|
@@ -1752,7 +1752,7 @@ const Nn = {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
}), R.push({
|
|
1755
|
-
id:
|
|
1755
|
+
id: Je.id,
|
|
1756
1756
|
params: {
|
|
1757
1757
|
unitId: s,
|
|
1758
1758
|
subUnitId: a,
|
|
@@ -1824,9 +1824,9 @@ const Nn = {
|
|
|
1824
1824
|
redoMutations: f
|
|
1825
1825
|
}), !0;
|
|
1826
1826
|
}
|
|
1827
|
-
},
|
|
1827
|
+
}, An = {
|
|
1828
1828
|
id: "sheet.command.table-remove-row",
|
|
1829
|
-
type:
|
|
1829
|
+
type: N.COMMAND,
|
|
1830
1830
|
handler: (t, e) => {
|
|
1831
1831
|
if (!e)
|
|
1832
1832
|
return !1;
|
|
@@ -1898,9 +1898,9 @@ const Nn = {
|
|
|
1898
1898
|
redoMutations: m
|
|
1899
1899
|
}), !0;
|
|
1900
1900
|
}
|
|
1901
|
-
},
|
|
1901
|
+
}, Bn = {
|
|
1902
1902
|
id: "sheet.command.table-remove-col",
|
|
1903
|
-
type:
|
|
1903
|
+
type: N.COMMAND,
|
|
1904
1904
|
handler: (t, e) => {
|
|
1905
1905
|
if (!e)
|
|
1906
1906
|
return !1;
|
|
@@ -1933,8 +1933,8 @@ const Nn = {
|
|
|
1933
1933
|
});
|
|
1934
1934
|
const R = [], I = h.startColumn - f.startColumn;
|
|
1935
1935
|
for (let re = 0; re < m; re++) {
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1936
|
+
const Ie = c.getTableInfo().columns[I + re];
|
|
1937
|
+
Ie && R.push(Ie);
|
|
1938
1938
|
}
|
|
1939
1939
|
w.push({
|
|
1940
1940
|
id: p.id,
|
|
@@ -1984,12 +1984,12 @@ const Nn = {
|
|
|
1984
1984
|
redoMutations: C
|
|
1985
1985
|
}), !0;
|
|
1986
1986
|
}
|
|
1987
|
-
};
|
|
1988
|
-
var
|
|
1989
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1987
|
+
}, Ln = "sheets-table.config", Ue = {};
|
|
1988
|
+
var Wn = Object.getOwnPropertyDescriptor, En = (t, e, n, r) => {
|
|
1989
|
+
for (var s = r > 1 ? void 0 : r ? Wn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1990
1990
|
(o = t[a]) && (s = o(s) || s);
|
|
1991
1991
|
return s;
|
|
1992
|
-
},
|
|
1992
|
+
}, $e = (t, e) => (n, r) => e(n, r, t);
|
|
1993
1993
|
let ie = class extends k {
|
|
1994
1994
|
constructor(t, e) {
|
|
1995
1995
|
super(), this._tableManager = t, this._exclusiveRangeService = e, this._initRangeListener();
|
|
@@ -2019,12 +2019,12 @@ let ie = class extends k {
|
|
|
2019
2019
|
);
|
|
2020
2020
|
}
|
|
2021
2021
|
};
|
|
2022
|
-
ie =
|
|
2023
|
-
|
|
2024
|
-
|
|
2022
|
+
ie = En([
|
|
2023
|
+
$e(0, S(_)),
|
|
2024
|
+
$e(1, S(it))
|
|
2025
2025
|
], ie);
|
|
2026
|
-
var
|
|
2027
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2026
|
+
var Hn = Object.getOwnPropertyDescriptor, Pn = (t, e, n, r) => {
|
|
2027
|
+
for (var s = r > 1 ? void 0 : r ? Hn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2028
2028
|
(o = t[a]) && (s = o(s) || s);
|
|
2029
2029
|
return s;
|
|
2030
2030
|
}, E = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -2038,13 +2038,13 @@ let le = class extends k {
|
|
|
2038
2038
|
getMutations(e) {
|
|
2039
2039
|
const n = { redos: [], undos: [] }, { id: r, params: s } = e;
|
|
2040
2040
|
switch (r) {
|
|
2041
|
-
case
|
|
2041
|
+
case ht.id:
|
|
2042
2042
|
return t._generateTableMutationWithInsertRow(s);
|
|
2043
|
-
case
|
|
2043
|
+
case dt.id:
|
|
2044
2044
|
return t._generateTableMutationWithInsertCol(s);
|
|
2045
|
-
case
|
|
2045
|
+
case ct.id:
|
|
2046
2046
|
return t._generateTableMutationWithRemoveRow(s);
|
|
2047
|
-
case
|
|
2047
|
+
case ut.id:
|
|
2048
2048
|
return t._generateTableMutationWithRemoveCol(s);
|
|
2049
2049
|
}
|
|
2050
2050
|
return n;
|
|
@@ -2152,7 +2152,7 @@ let le = class extends k {
|
|
|
2152
2152
|
const { range: i } = t, h = i.endRow - i.startRow + 1;
|
|
2153
2153
|
return u.forEach((d) => {
|
|
2154
2154
|
const c = d.getRange();
|
|
2155
|
-
if (
|
|
2155
|
+
if (pe.intersects(c, i))
|
|
2156
2156
|
if (i.startRow <= c.startRow && i.endRow >= c.startRow) {
|
|
2157
2157
|
r.push({
|
|
2158
2158
|
id: ne.id,
|
|
@@ -2245,7 +2245,7 @@ let le = class extends k {
|
|
|
2245
2245
|
const { range: i } = t, h = i.endColumn - i.startColumn + 1;
|
|
2246
2246
|
return u.forEach((d) => {
|
|
2247
2247
|
const c = d.getRange();
|
|
2248
|
-
if (
|
|
2248
|
+
if (pe.intersects(c, i)) {
|
|
2249
2249
|
if (i.startColumn <= c.startColumn && i.endColumn >= c.endColumn) {
|
|
2250
2250
|
r.push({
|
|
2251
2251
|
id: ne.id,
|
|
@@ -2260,7 +2260,7 @@ let le = class extends k {
|
|
|
2260
2260
|
return { undos: e, redos: n, preRedos: r, preUndos: s };
|
|
2261
2261
|
const B = [];
|
|
2262
2262
|
for (let v = w; v <= f; v++)
|
|
2263
|
-
B.push(
|
|
2263
|
+
B.push(Ye(I == null ? void 0 : I.getCell(C, v)) || Z(v - w + 1, this._localeService.t("sheets-table.columnPrefix")));
|
|
2264
2264
|
e.push({
|
|
2265
2265
|
id: te.id,
|
|
2266
2266
|
params: {
|
|
@@ -2398,7 +2398,7 @@ let le = class extends k {
|
|
|
2398
2398
|
}
|
|
2399
2399
|
_initCommandListener() {
|
|
2400
2400
|
this._commandService.onCommandExecuted((t) => {
|
|
2401
|
-
if (t.id ===
|
|
2401
|
+
if (t.id === Pe.id) {
|
|
2402
2402
|
const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endRow - s.startRow + 1;
|
|
2403
2403
|
this._tableManager.getTablesBySubunitId(n, r).forEach((l) => {
|
|
2404
2404
|
const u = l.getRange();
|
|
@@ -2410,7 +2410,7 @@ let le = class extends k {
|
|
|
2410
2410
|
}
|
|
2411
2411
|
});
|
|
2412
2412
|
});
|
|
2413
|
-
} else if (t.id ===
|
|
2413
|
+
} else if (t.id === qe.id) {
|
|
2414
2414
|
const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endColumn - s.startColumn + 1;
|
|
2415
2415
|
this._tableManager.getTablesBySubunitId(n, r).forEach((l) => {
|
|
2416
2416
|
const u = l.getRange();
|
|
@@ -2422,7 +2422,7 @@ let le = class extends k {
|
|
|
2422
2422
|
}
|
|
2423
2423
|
});
|
|
2424
2424
|
});
|
|
2425
|
-
} else if (t.id ===
|
|
2425
|
+
} else if (t.id === Ve.id) {
|
|
2426
2426
|
const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endRow - s.startRow + 1;
|
|
2427
2427
|
this._tableManager.getTablesBySubunitId(n, r).forEach((l) => {
|
|
2428
2428
|
const u = l.getRange();
|
|
@@ -2434,7 +2434,7 @@ let le = class extends k {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
});
|
|
2436
2436
|
});
|
|
2437
|
-
} else if (t.id ===
|
|
2437
|
+
} else if (t.id === Je.id) {
|
|
2438
2438
|
const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endColumn - s.startColumn + 1;
|
|
2439
2439
|
this._tableManager.getTablesBySubunitId(n, r).forEach((l) => {
|
|
2440
2440
|
const u = l.getRange();
|
|
@@ -2450,17 +2450,17 @@ let le = class extends k {
|
|
|
2450
2450
|
});
|
|
2451
2451
|
}
|
|
2452
2452
|
};
|
|
2453
|
-
le =
|
|
2453
|
+
le = Pn([
|
|
2454
2454
|
E(0, S(x)),
|
|
2455
|
-
E(1, S(
|
|
2455
|
+
E(1, S(lt)),
|
|
2456
2456
|
E(2, S(J)),
|
|
2457
|
-
E(3, S(
|
|
2458
|
-
E(4, S(
|
|
2457
|
+
E(3, S(Be)),
|
|
2458
|
+
E(4, S(_e)),
|
|
2459
2459
|
E(5, S(_)),
|
|
2460
|
-
E(6, S(
|
|
2460
|
+
E(6, S(Ce))
|
|
2461
2461
|
], le);
|
|
2462
|
-
var
|
|
2463
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2462
|
+
var Vn = Object.getOwnPropertyDescriptor, qn = (t, e, n, r) => {
|
|
2463
|
+
for (var s = r > 1 ? void 0 : r ? Vn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2464
2464
|
(o = t[a]) && (s = o(s) || s);
|
|
2465
2465
|
return s;
|
|
2466
2466
|
}, be = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -2517,7 +2517,7 @@ let ue = class extends k {
|
|
|
2517
2517
|
}
|
|
2518
2518
|
_initDefaultTableTheme() {
|
|
2519
2519
|
for (let t = 0; t < Y.length; t++) {
|
|
2520
|
-
const { name: e, style: n } = Y[t], r = new
|
|
2520
|
+
const { name: e, style: n } = Y[t], r = new mt(e, n);
|
|
2521
2521
|
this._sheetRangeThemeModel.registerDefaultRangeTheme(r);
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
@@ -2525,20 +2525,20 @@ let ue = class extends k {
|
|
|
2525
2525
|
super.dispose();
|
|
2526
2526
|
}
|
|
2527
2527
|
};
|
|
2528
|
-
ue =
|
|
2528
|
+
ue = qn([
|
|
2529
2529
|
be(0, S(_)),
|
|
2530
|
-
be(1, S(
|
|
2531
|
-
be(2, S(
|
|
2530
|
+
be(1, S(gt)),
|
|
2531
|
+
be(2, S(Ee))
|
|
2532
2532
|
], ue);
|
|
2533
|
-
var
|
|
2534
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2533
|
+
var Jn = Object.getOwnPropertyDescriptor, kn = (t, e, n, r) => {
|
|
2534
|
+
for (var s = r > 1 ? void 0 : r ? Jn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2535
2535
|
(o = t[a]) && (s = o(s) || s);
|
|
2536
2536
|
return s;
|
|
2537
2537
|
}, we = (t, e) => (n, r) => e(n, r, t);
|
|
2538
2538
|
let ce = class extends k {
|
|
2539
2539
|
constructor(e, n, r) {
|
|
2540
2540
|
super();
|
|
2541
|
-
b(this, "_tableFilteredOutRows$", new
|
|
2541
|
+
b(this, "_tableFilteredOutRows$", new ke(/* @__PURE__ */ new Set()));
|
|
2542
2542
|
b(this, "tableFilteredOutRows$", this._tableFilteredOutRows$.asObservable());
|
|
2543
2543
|
b(this, "_subscription", null);
|
|
2544
2544
|
this._tableManager = e, this._sheetInterceptorService = n, this._univerInstanceService = r, this.registerFilterChangeEvent(), this.initTableHiddenRowIntercept(), this._initFilteredOutRows();
|
|
@@ -2550,7 +2550,7 @@ let ce = class extends k {
|
|
|
2550
2550
|
this._tableFilteredOutRows$.next(e);
|
|
2551
2551
|
}
|
|
2552
2552
|
initTableHiddenRowIntercept() {
|
|
2553
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
2553
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(He.ROW_FILTERED, {
|
|
2554
2554
|
// 这里需要保证优先级高于sheet的筛选,因为筛选没有next,低于筛选的不会触发interceptor
|
|
2555
2555
|
priority: 100,
|
|
2556
2556
|
handler: (e, n, r) => {
|
|
@@ -2563,9 +2563,9 @@ let ce = class extends k {
|
|
|
2563
2563
|
_initFilteredOutRows() {
|
|
2564
2564
|
this._tableManager.tableInitStatus$.pipe(
|
|
2565
2565
|
ge((e) => e),
|
|
2566
|
-
|
|
2566
|
+
ve(() => this._univerInstanceService.getCurrentTypeOfUnit$(Se.UNIVER_SHEET)),
|
|
2567
2567
|
ge((e) => e != null),
|
|
2568
|
-
|
|
2568
|
+
ve((e) => e.activeSheet$),
|
|
2569
2569
|
ge((e) => e != null)
|
|
2570
2570
|
).subscribe(() => {
|
|
2571
2571
|
const e = U(this._univerInstanceService);
|
|
@@ -2601,22 +2601,28 @@ let ce = class extends k {
|
|
|
2601
2601
|
super.dispose(), (e = this._subscription) == null || e.unsubscribe();
|
|
2602
2602
|
}
|
|
2603
2603
|
};
|
|
2604
|
-
ce =
|
|
2604
|
+
ce = kn([
|
|
2605
2605
|
we(0, S(_)),
|
|
2606
|
-
we(1, S(
|
|
2606
|
+
we(1, S(_e)),
|
|
2607
2607
|
we(2, S(J))
|
|
2608
2608
|
], ce);
|
|
2609
|
-
var
|
|
2610
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
2609
|
+
var Qn = Object.getOwnPropertyDescriptor, Yn = (t, e, n, r) => {
|
|
2610
|
+
for (var s = r > 1 ? void 0 : r ? Qn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2611
2611
|
(o = t[a]) && (s = o(s) || s);
|
|
2612
2612
|
return s;
|
|
2613
|
-
},
|
|
2614
|
-
let
|
|
2615
|
-
constructor(t =
|
|
2616
|
-
super(), this._config = t, this._injector = e, this.
|
|
2613
|
+
}, Re = (t, e) => (n, r) => e(n, r, t), ae;
|
|
2614
|
+
let Ae = (ae = class extends rt {
|
|
2615
|
+
constructor(t = Ue, e, n, r) {
|
|
2616
|
+
super(), this._config = t, this._injector = e, this._configService = n, this._commandService = r;
|
|
2617
|
+
const { ...s } = st(
|
|
2618
|
+
{},
|
|
2619
|
+
Ue,
|
|
2620
|
+
this._config
|
|
2621
|
+
);
|
|
2622
|
+
this._configService.setConfig(Ln, s), this._initRegisterCommand();
|
|
2617
2623
|
}
|
|
2618
2624
|
onStarting() {
|
|
2619
|
-
|
|
2625
|
+
at(this._injector, [
|
|
2620
2626
|
[_],
|
|
2621
2627
|
[ue],
|
|
2622
2628
|
[W],
|
|
@@ -2624,7 +2630,7 @@ let $e = (ae = class extends nt {
|
|
|
2624
2630
|
[ce],
|
|
2625
2631
|
[ie],
|
|
2626
2632
|
[le]
|
|
2627
|
-
]),
|
|
2633
|
+
]), Me(this._injector, [
|
|
2628
2634
|
[ie],
|
|
2629
2635
|
[le],
|
|
2630
2636
|
[ue],
|
|
@@ -2634,63 +2640,64 @@ let $e = (ae = class extends nt {
|
|
|
2634
2640
|
]);
|
|
2635
2641
|
}
|
|
2636
2642
|
onReady() {
|
|
2637
|
-
|
|
2643
|
+
Me(this._injector, [
|
|
2638
2644
|
[_]
|
|
2639
2645
|
]);
|
|
2640
2646
|
}
|
|
2641
2647
|
_initRegisterCommand() {
|
|
2642
2648
|
[
|
|
2643
|
-
|
|
2649
|
+
In,
|
|
2644
2650
|
te,
|
|
2645
|
-
Tn,
|
|
2646
|
-
ne,
|
|
2647
|
-
pe,
|
|
2648
|
-
Fn,
|
|
2649
2651
|
vn,
|
|
2652
|
+
ne,
|
|
2653
|
+
fe,
|
|
2654
|
+
yn,
|
|
2655
|
+
Nn,
|
|
2650
2656
|
p,
|
|
2651
|
-
_n,
|
|
2652
2657
|
Mn,
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2658
|
+
Dn,
|
|
2659
|
+
Un,
|
|
2660
|
+
$n,
|
|
2661
|
+
An,
|
|
2662
|
+
Bn
|
|
2657
2663
|
].forEach((t) => this._commandService.registerCommand(t));
|
|
2658
2664
|
}
|
|
2659
|
-
}, b(ae, "pluginName",
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2665
|
+
}, b(ae, "pluginName", ze), b(ae, "type", Se.UNIVER_SHEET), ae);
|
|
2666
|
+
Ae = Yn([
|
|
2667
|
+
Re(1, S(Be)),
|
|
2668
|
+
Re(2, ot),
|
|
2669
|
+
Re(3, S(x))
|
|
2670
|
+
], Ae);
|
|
2664
2671
|
export {
|
|
2665
|
-
|
|
2672
|
+
In as AddSheetTableCommand,
|
|
2666
2673
|
te as AddSheetTableMutation,
|
|
2667
|
-
|
|
2668
|
-
|
|
2674
|
+
Mn as AddTableThemeCommand,
|
|
2675
|
+
vn as DeleteSheetTableCommand,
|
|
2669
2676
|
ne as DeleteSheetTableMutation,
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2677
|
+
Dn as RemoveTableThemeCommand,
|
|
2678
|
+
Fn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
|
|
2679
|
+
Nn as SetSheetTableCommand,
|
|
2680
|
+
yn as SetSheetTableFilterCommand,
|
|
2681
|
+
fe as SetSheetTableFilterMutation,
|
|
2675
2682
|
p as SetSheetTableMutation,
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2683
|
+
$n as SheetTableInsertColCommand,
|
|
2684
|
+
Un as SheetTableInsertRowCommand,
|
|
2685
|
+
Bn as SheetTableRemoveColCommand,
|
|
2686
|
+
An as SheetTableRemoveRowCommand,
|
|
2680
2687
|
z as SheetTableService,
|
|
2681
2688
|
P as SheetsTableButtonStateEnum,
|
|
2682
2689
|
W as SheetsTableController,
|
|
2683
2690
|
G as SheetsTableSortStateEnum,
|
|
2684
|
-
|
|
2691
|
+
Qe as TableColumnDataTypeEnum,
|
|
2685
2692
|
ee as TableColumnFilterTypeEnum,
|
|
2686
2693
|
O as TableConditionTypeEnum,
|
|
2687
2694
|
g as TableDateCompareTypeEnum,
|
|
2688
2695
|
_ as TableManager,
|
|
2689
2696
|
F as TableNumberCompareTypeEnum,
|
|
2690
2697
|
H as TableStringCompareTypeEnum,
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2698
|
+
Ae as UniverSheetsTablePlugin,
|
|
2699
|
+
er as customEmptyThemeWithBorderStyle,
|
|
2700
|
+
Rt as isConditionFilter,
|
|
2701
|
+
Zn as isManualFilter,
|
|
2702
|
+
tr as processStyleWithBorderStyle
|
|
2696
2703
|
};
|