@univerjs/sheets-filter 0.6.3 → 0.6.4-nightly.202503101606
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/facade.js +43 -26
- package/lib/es/index.js +360 -302
- package/lib/types/facade/f-filter.d.ts +43 -26
- package/lib/types/facade/f-range.d.ts +2 -2
- package/lib/types/services/sheet-filter-formula.service.d.ts +14 -0
- package/lib/umd/index.js +1 -1
- package/package.json +7 -6
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (i, r, e) =>
|
|
4
|
-
import { isNumeric as
|
|
5
|
-
import { SheetInterceptorService as
|
|
6
|
-
import { BehaviorSubject as L, merge as
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var Me = (i, r, e) => r in i ? ve(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var w = (i, r, e) => Me(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { isNumeric as Ee, Disposable as B, Rectangle as K, mergeSets as Q, Tools as te, extractPureTextFromCell as ye, CellValueType as X, UniverInstanceType as D, fromCallback as Oe, CommandType as E, IResourceManagerService as Ae, IUniverInstanceService as T, ICommandService as N, Inject as $, DisposableCollection as Te, moveMatrixArray as re, Plugin as Ne, merge as xe, touchDependencies as Ie, Injector as $e, IConfigService as Ue, IUndoRedoService as k, sequenceExecute as Pe, ErrorService as De, LocaleService as Le } from "@univerjs/core";
|
|
5
|
+
import { SheetInterceptorService as Be, RefRangeService as be, SetWorksheetActiveOperation as He, CopySheetCommand as ze, RemoveSheetCommand as We, INTERCEPTOR_POINT as Ve, RemoveRowMutation as je, InsertRowMutation as ke, SetRangeValuesMutation as qe, expandToContinuousRange as ue, getSheetCommandTarget as b, MoveRowsCommand as Qe, MoveRangeCommand as Ge, EffectRefRangId as ne, RemoveRowCommand as Je, RemoveColCommand as Ye, InsertColCommand as Ke, InsertRowCommand as Xe, SheetsSelectionsService as Ze, isSingleCellSelection as et } from "@univerjs/sheets";
|
|
6
|
+
import { BehaviorSubject as L, merge as tt, filter as rt, switchMap as nt, of as it } from "rxjs";
|
|
7
|
+
import { IActiveDirtyManagerService as st } from "@univerjs/engine-formula";
|
|
8
|
+
const ot = "sheets-filter.config", ie = {}, de = "sheet.mutation.set-filter-range", he = "sheet.mutation.set-filter-criteria", me = "sheet.mutation.remove-filter", fe = "sheet.mutation.re-calc-filter", ge = /* @__PURE__ */ new Set([
|
|
9
9
|
de,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
he,
|
|
11
|
+
me,
|
|
12
|
+
fe
|
|
12
13
|
]);
|
|
13
|
-
var
|
|
14
|
-
const
|
|
15
|
-
operator:
|
|
16
|
-
fn: (i, r) =>
|
|
17
|
-
},
|
|
18
|
-
operator:
|
|
19
|
-
fn: (i, r) =>
|
|
20
|
-
},
|
|
21
|
-
operator:
|
|
22
|
-
fn: (i, r) =>
|
|
23
|
-
},
|
|
24
|
-
operator:
|
|
25
|
-
fn: (i, r) =>
|
|
26
|
-
},
|
|
27
|
-
operator:
|
|
28
|
-
fn: (i, r) =>
|
|
29
|
-
},
|
|
30
|
-
operator:
|
|
14
|
+
var x = /* @__PURE__ */ ((i) => (i.EQUAL = "equal", i.GREATER_THAN = "greaterThan", i.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", i.LESS_THAN = "lessThan", i.LESS_THAN_OR_EQUAL = "lessThanOrEqual", i.NOT_EQUALS = "notEqual", i))(x || {});
|
|
15
|
+
const lt = {
|
|
16
|
+
operator: x.GREATER_THAN,
|
|
17
|
+
fn: (i, r) => U(i) ? i > r : !1
|
|
18
|
+
}, at = {
|
|
19
|
+
operator: x.GREATER_THAN_OR_EQUAL,
|
|
20
|
+
fn: (i, r) => U(i) ? i >= r : !1
|
|
21
|
+
}, ct = {
|
|
22
|
+
operator: x.LESS_THAN,
|
|
23
|
+
fn: (i, r) => U(i) ? i < r : !1
|
|
24
|
+
}, ut = {
|
|
25
|
+
operator: x.LESS_THAN_OR_EQUAL,
|
|
26
|
+
fn: (i, r) => U(i) ? i <= r : !1
|
|
27
|
+
}, dt = {
|
|
28
|
+
operator: x.EQUAL,
|
|
29
|
+
fn: (i, r) => U(i) ? i === r : !1
|
|
30
|
+
}, _e = {
|
|
31
|
+
operator: x.NOT_EQUALS,
|
|
31
32
|
fn: (i, r) => {
|
|
32
33
|
if (typeof r == "string") {
|
|
33
34
|
if (r === " ")
|
|
34
35
|
return i != null;
|
|
35
|
-
const e =
|
|
36
|
-
return e &&
|
|
36
|
+
const e = Ce(i);
|
|
37
|
+
return e && gt(r) ? !pe(r).test(e) : e !== r;
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
+
return U(i) ? i !== r : !0;
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
}, Re = /* @__PURE__ */ new Map([]), ht = [lt, at, ct, ut, dt, _e];
|
|
42
|
+
ht.forEach((i) => {
|
|
43
|
+
Re.set(i.operator, i);
|
|
43
44
|
});
|
|
44
|
-
function
|
|
45
|
+
function mt(i) {
|
|
45
46
|
return !!i;
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
+
const ft = {
|
|
48
49
|
fn: (i, r) => {
|
|
49
|
-
const e =
|
|
50
|
-
return e === null ? r === "" :
|
|
50
|
+
const e = Ce(i);
|
|
51
|
+
return e === null ? r === "" : pe(r).test(e);
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
|
-
function
|
|
54
|
-
return i ?
|
|
54
|
+
function se(i) {
|
|
55
|
+
return i ? Re.get(i) : ft;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function U(i) {
|
|
57
58
|
return typeof i == "number";
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
return !!(typeof i == "number" || typeof i == "string" &&
|
|
60
|
+
function oe(i) {
|
|
61
|
+
return !!(typeof i == "number" || typeof i == "string" && Ee(i));
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function Ce(i) {
|
|
63
64
|
return typeof i == "boolean" || i == null ? null : typeof i == "string" ? i : i.toString();
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function gt(i) {
|
|
66
67
|
return typeof i == "number" ? !1 : i.indexOf("*") !== -1 || i.indexOf("?") !== -1;
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function pe(i) {
|
|
69
70
|
const r = i.replace(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("?", ".").replace(/[*]/g, ".$&");
|
|
70
71
|
return new RegExp(`^${r}$`);
|
|
71
72
|
}
|
|
72
|
-
const
|
|
73
|
-
class
|
|
73
|
+
const G = () => /* @__PURE__ */ new Set();
|
|
74
|
+
class W extends B {
|
|
74
75
|
constructor(e, t, n) {
|
|
75
76
|
super();
|
|
76
|
-
w(this, "_filteredOutRows$", new L(
|
|
77
|
+
w(this, "_filteredOutRows$", new L(G()));
|
|
77
78
|
/** An observable value. A set of filtered out rows. */
|
|
78
79
|
w(this, "filteredOutRows$", this._filteredOutRows$.asObservable());
|
|
79
80
|
// TODO: we may need to update which cols have criteria rather than simple boolean
|
|
80
81
|
w(this, "_hasCriteria$", new L(!1));
|
|
81
82
|
w(this, "hasCriteria$", this._hasCriteria$.asObservable());
|
|
82
83
|
w(this, "_filterColumnByIndex", /* @__PURE__ */ new Map());
|
|
83
|
-
w(this, "_alreadyFilteredOutRows",
|
|
84
|
+
w(this, "_alreadyFilteredOutRows", G());
|
|
84
85
|
w(this, "_range");
|
|
85
86
|
this.unitId = e, this.subUnitId = t, this._worksheet = n;
|
|
86
87
|
}
|
|
@@ -98,7 +99,7 @@ class D extends V {
|
|
|
98
99
|
*/
|
|
99
100
|
serialize() {
|
|
100
101
|
const e = {
|
|
101
|
-
ref:
|
|
102
|
+
ref: K.clone(this._range),
|
|
102
103
|
filterColumns: this._getAllFilterColumns(!0).sort(([t], [n]) => t - n).map(([t, n]) => n.serialize())
|
|
103
104
|
};
|
|
104
105
|
return this._alreadyFilteredOutRows && (e.cachedFilteredOut = Array.from(this._alreadyFilteredOutRows).sort()), e;
|
|
@@ -111,7 +112,7 @@ class D extends V {
|
|
|
111
112
|
* @param autoFilter auto filter data
|
|
112
113
|
*/
|
|
113
114
|
static deserialize(e, t, n, s) {
|
|
114
|
-
const o = new
|
|
115
|
+
const o = new W(e, t, n);
|
|
115
116
|
return o._dump(s), o;
|
|
116
117
|
}
|
|
117
118
|
_dump(e) {
|
|
@@ -134,7 +135,7 @@ class D extends V {
|
|
|
134
135
|
getFilteredOutRowsExceptCol(e) {
|
|
135
136
|
return this._getAllFilterColumns(!0).filter(([t]) => t !== e).reduce((t, [, n]) => {
|
|
136
137
|
const s = n.calc({ getAlreadyFilteredOutRows: () => t });
|
|
137
|
-
return s ?
|
|
138
|
+
return s ? Q(t, s) : t;
|
|
138
139
|
}, /* @__PURE__ */ new Set());
|
|
139
140
|
}
|
|
140
141
|
/**
|
|
@@ -178,7 +179,7 @@ class D extends V {
|
|
|
178
179
|
return e ? t : t.map(([n, s]) => s);
|
|
179
180
|
}
|
|
180
181
|
_reCalcAllColumns() {
|
|
181
|
-
this._alreadyFilteredOutRows =
|
|
182
|
+
this._alreadyFilteredOutRows = G(), this._getAllFilterColumns().forEach((e) => e.__clearCache()), this._reCalcWithNoCacheColumns();
|
|
182
183
|
}
|
|
183
184
|
_setCriteriaWithoutReCalc(e, t) {
|
|
184
185
|
const n = this._range;
|
|
@@ -188,7 +189,7 @@ class D extends V {
|
|
|
188
189
|
if (e > o || e < s)
|
|
189
190
|
throw new Error(`[FilterModel] could not set criteria on column ${e} which is out of range!`);
|
|
190
191
|
let l;
|
|
191
|
-
this._filterColumnByIndex.has(e) ? l = this._filterColumnByIndex.get(e) : (l = new
|
|
192
|
+
this._filterColumnByIndex.has(e) ? l = this._filterColumnByIndex.get(e) : (l = new _t(
|
|
192
193
|
this.unitId,
|
|
193
194
|
this.subUnitId,
|
|
194
195
|
this._worksheet,
|
|
@@ -207,18 +208,18 @@ class D extends V {
|
|
|
207
208
|
this._hasCriteria$.next(this._filterColumnByIndex.size > 0);
|
|
208
209
|
}
|
|
209
210
|
_rebuildAlreadyFilteredOutRowsWithCache() {
|
|
210
|
-
const e = this._getAllFilterColumns().filter((t) => t.hasCache()).reduce((t, n) =>
|
|
211
|
+
const e = this._getAllFilterColumns().filter((t) => t.hasCache()).reduce((t, n) => Q(t, n.filteredOutRows), /* @__PURE__ */ new Set());
|
|
211
212
|
this._alreadyFilteredOutRows = e;
|
|
212
213
|
}
|
|
213
214
|
_reCalcWithNoCacheColumns() {
|
|
214
215
|
const e = this._getAllFilterColumns().filter((t) => !t.hasCache());
|
|
215
216
|
for (const t of e) {
|
|
216
217
|
const n = t.reCalc();
|
|
217
|
-
n && (this._alreadyFilteredOutRows =
|
|
218
|
+
n && (this._alreadyFilteredOutRows = Q(this._alreadyFilteredOutRows, n));
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
|
-
class
|
|
222
|
+
class _t extends B {
|
|
222
223
|
constructor(e, t, n, s, o) {
|
|
223
224
|
super();
|
|
224
225
|
w(this, "_filteredOutRows", null);
|
|
@@ -244,7 +245,7 @@ class ht extends V {
|
|
|
244
245
|
serialize() {
|
|
245
246
|
if (!this._criteria)
|
|
246
247
|
throw new Error("[FilterColumn]: could not serialize without a filter column!");
|
|
247
|
-
return
|
|
248
|
+
return te.deepClone({
|
|
248
249
|
...this._criteria,
|
|
249
250
|
colId: this._column
|
|
250
251
|
});
|
|
@@ -260,7 +261,7 @@ class ht extends V {
|
|
|
260
261
|
this._criteria = e, this._generateFilterFn(), this._filteredOutRows = null;
|
|
261
262
|
}
|
|
262
263
|
getColumnData() {
|
|
263
|
-
return
|
|
264
|
+
return te.deepClone(this._criteria);
|
|
264
265
|
}
|
|
265
266
|
/**
|
|
266
267
|
* Trigger new calculation on this `FilterModel` instance.
|
|
@@ -283,75 +284,75 @@ class ht extends V {
|
|
|
283
284
|
const { row: a, rowSpan: c, col: h } = l;
|
|
284
285
|
if (o.has(a) && (!c || c === 1))
|
|
285
286
|
continue;
|
|
286
|
-
const
|
|
287
|
-
if (!this._filterFn(
|
|
288
|
-
for (let
|
|
289
|
-
s.add(a +
|
|
287
|
+
const u = this._filterByValues ? ye(this._worksheet.getCell(a, h)) : Mt(this._worksheet, a, h);
|
|
288
|
+
if (!this._filterFn(u) && (s.add(a), c))
|
|
289
|
+
for (let d = 1; d < c; d++)
|
|
290
|
+
s.add(a + d);
|
|
290
291
|
}
|
|
291
292
|
return s;
|
|
292
293
|
}
|
|
293
294
|
_generateFilterFn() {
|
|
294
|
-
this._criteria && (this._filterFn =
|
|
295
|
+
this._criteria && (this._filterFn = Rt(this._criteria), this._filterByValues = !!this._criteria.filters);
|
|
295
296
|
}
|
|
296
297
|
}
|
|
297
|
-
function
|
|
298
|
+
function Rt(i) {
|
|
298
299
|
if (i.filters)
|
|
299
|
-
return
|
|
300
|
+
return Ct(i.filters);
|
|
300
301
|
if (i.customFilters)
|
|
301
|
-
return
|
|
302
|
+
return pt(i.customFilters);
|
|
302
303
|
throw new Error("[FilterModel]: other types of filters are not supported yet.");
|
|
303
304
|
}
|
|
304
|
-
function
|
|
305
|
+
function Ct(i) {
|
|
305
306
|
const r = !!i.blank, e = new Set(i.filters);
|
|
306
307
|
return (t) => t === void 0 || t === "" ? r : e.has(typeof t == "string" ? t : `${t}`);
|
|
307
308
|
}
|
|
308
|
-
function
|
|
309
|
-
const r = i.customFilters.map((e) =>
|
|
310
|
-
return
|
|
309
|
+
function pt(i) {
|
|
310
|
+
const r = i.customFilters.map((e) => vt(e));
|
|
311
|
+
return St(r) ? i.and ? Ft(r) : wt(r) : r[0];
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
+
function Ft(i) {
|
|
313
314
|
const [r, e] = i;
|
|
314
315
|
return (t) => r(t) && e(t);
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
+
function wt(i) {
|
|
317
318
|
const [r, e] = i;
|
|
318
319
|
return (t) => r(t) || e(t);
|
|
319
320
|
}
|
|
320
|
-
function
|
|
321
|
+
function St(i) {
|
|
321
322
|
return i.length === 2;
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function vt(i) {
|
|
324
325
|
const r = i.val;
|
|
325
|
-
if (i.operator ===
|
|
326
|
-
return (n) =>
|
|
327
|
-
if (
|
|
328
|
-
if (!
|
|
329
|
-
const n =
|
|
326
|
+
if (i.operator === x.NOT_EQUALS && !oe(r))
|
|
327
|
+
return (n) => _e.fn(n, r);
|
|
328
|
+
if (mt(i.operator)) {
|
|
329
|
+
if (!oe(r)) return () => !1;
|
|
330
|
+
const n = se(i.operator), s = Number(r);
|
|
330
331
|
return (o) => n.fn(o, s);
|
|
331
332
|
}
|
|
332
|
-
const e =
|
|
333
|
+
const e = se(i.operator);
|
|
333
334
|
return (t) => e.fn(t, r);
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
+
function Mt(i, r, e) {
|
|
336
337
|
const t = i.getCell(r, e);
|
|
337
338
|
if (!t) return null;
|
|
338
339
|
const n = i.getCellRaw(r, e);
|
|
339
|
-
return t && !n ?
|
|
340
|
+
return t && !n ? le(t) : n ? t.t === X.NUMBER && typeof t.v == "string" ? n.v : le(n) : null;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
+
function le(i) {
|
|
342
343
|
var t, n;
|
|
343
344
|
const r = (n = (t = i.p) == null ? void 0 : t.body) == null ? void 0 : n.dataStream;
|
|
344
345
|
if (r) return r.trimEnd();
|
|
345
346
|
const e = i.v;
|
|
346
|
-
return typeof e == "string" ? i.t ===
|
|
347
|
+
return typeof e == "string" ? i.t === X.BOOLEAN ? e.toUpperCase() : e : typeof e == "number" ? i.t === X.BOOLEAN ? e ? "TRUE" : "FALSE" : e : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : "";
|
|
347
348
|
}
|
|
348
|
-
var
|
|
349
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
349
|
+
var Et = Object.getOwnPropertyDescriptor, yt = (i, r, e, t) => {
|
|
350
|
+
for (var n = t > 1 ? void 0 : t ? Et(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
350
351
|
(o = i[s]) && (n = o(n) || n);
|
|
351
352
|
return n;
|
|
352
|
-
},
|
|
353
|
-
const
|
|
354
|
-
let M = class extends
|
|
353
|
+
}, J = (i, r) => (e, t) => r(e, t, i);
|
|
354
|
+
const Fe = "SHEET_FILTER_PLUGIN";
|
|
355
|
+
let M = class extends B {
|
|
355
356
|
constructor(r, e, t) {
|
|
356
357
|
super();
|
|
357
358
|
w(this, "_filterModels", /* @__PURE__ */ new Map());
|
|
@@ -383,7 +384,7 @@ let M = class extends V {
|
|
|
383
384
|
const s = n.getSheetBySheetId(e);
|
|
384
385
|
if (!s)
|
|
385
386
|
throw new Error(`[SheetsFilterService]: could not create "FilterModel" on a non-existing worksheet ${e}!`);
|
|
386
|
-
const o = new
|
|
387
|
+
const o = new W(r, e, s);
|
|
387
388
|
return this._cacheFilterModel(r, e, o), o;
|
|
388
389
|
}
|
|
389
390
|
getFilterModel(r, e) {
|
|
@@ -400,7 +401,7 @@ let M = class extends V {
|
|
|
400
401
|
_updateActiveFilterModel() {
|
|
401
402
|
let r;
|
|
402
403
|
try {
|
|
403
|
-
if (r = this._univerInstanceService.getCurrentUnitForType(
|
|
404
|
+
if (r = this._univerInstanceService.getCurrentUnitForType(D.UNIVER_SHEET), !r) {
|
|
404
405
|
this._activeFilterModel$.next(null);
|
|
405
406
|
return;
|
|
406
407
|
}
|
|
@@ -418,13 +419,13 @@ let M = class extends V {
|
|
|
418
419
|
}
|
|
419
420
|
_initActiveFilterModel() {
|
|
420
421
|
this.disposeWithMe(
|
|
421
|
-
|
|
422
|
+
tt(
|
|
422
423
|
// source1: executing filter related mutations
|
|
423
|
-
|
|
424
|
+
Oe(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(rt(([r]) => r.type === E.MUTATION && ge.has(r.id))),
|
|
424
425
|
// source2: activate sheet changes
|
|
425
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(
|
|
426
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(D.UNIVER_SHEET).pipe(nt((r) => {
|
|
426
427
|
var e;
|
|
427
|
-
return (e = r == null ? void 0 : r.activeSheet$) != null ? e :
|
|
428
|
+
return (e = r == null ? void 0 : r.activeSheet$) != null ? e : it(null);
|
|
428
429
|
}))
|
|
429
430
|
).subscribe(() => this._updateActiveFilterModel())
|
|
430
431
|
);
|
|
@@ -441,14 +442,14 @@ let M = class extends V {
|
|
|
441
442
|
_deserializeAutoFiltersForUnit(r, e) {
|
|
442
443
|
const t = this._univerInstanceService.getUniverSheetInstance(r);
|
|
443
444
|
Object.keys(e).forEach((n) => {
|
|
444
|
-
const s = e[n], o =
|
|
445
|
+
const s = e[n], o = W.deserialize(r, n, t.getSheetBySheetId(n), s);
|
|
445
446
|
this._cacheFilterModel(r, n, o);
|
|
446
447
|
});
|
|
447
448
|
}
|
|
448
449
|
_initModel() {
|
|
449
450
|
this._resourcesManagerService.registerPluginResource({
|
|
450
|
-
pluginName:
|
|
451
|
-
businesses: [
|
|
451
|
+
pluginName: Fe,
|
|
452
|
+
businesses: [D.UNIVER_SHEET],
|
|
452
453
|
toJson: (r) => this._serializeAutoFiltersForUnit(r),
|
|
453
454
|
parseJson: (r) => JSON.parse(r),
|
|
454
455
|
onLoad: (r, e) => {
|
|
@@ -464,41 +465,41 @@ let M = class extends V {
|
|
|
464
465
|
this._filterModels.has(r) || this._filterModels.set(r, /* @__PURE__ */ new Map()), this._filterModels.get(r).set(e, t);
|
|
465
466
|
}
|
|
466
467
|
};
|
|
467
|
-
M =
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
468
|
+
M = yt([
|
|
469
|
+
J(0, Ae),
|
|
470
|
+
J(1, T),
|
|
471
|
+
J(2, N)
|
|
471
472
|
], M);
|
|
472
473
|
const R = {
|
|
473
|
-
id:
|
|
474
|
+
id: de,
|
|
474
475
|
type: E.MUTATION,
|
|
475
476
|
handler: (i, r) => {
|
|
476
477
|
const { subUnitId: e, unitId: t, range: n } = r;
|
|
477
478
|
return i.get(M).ensureFilterModel(t, e).setRange(n), !0;
|
|
478
479
|
}
|
|
479
480
|
}, p = {
|
|
480
|
-
id:
|
|
481
|
+
id: he,
|
|
481
482
|
type: E.MUTATION,
|
|
482
483
|
handler: (i, r) => {
|
|
483
484
|
const { subUnitId: e, unitId: t, criteria: n, col: s, reCalc: o = !0 } = r, a = i.get(M).getFilterModel(t, e);
|
|
484
485
|
return a ? (a.setCriteria(s, n, o), !0) : !1;
|
|
485
486
|
}
|
|
486
|
-
},
|
|
487
|
-
id:
|
|
487
|
+
}, y = {
|
|
488
|
+
id: me,
|
|
488
489
|
type: E.MUTATION,
|
|
489
490
|
handler: (i, r) => {
|
|
490
491
|
const { unitId: e, subUnitId: t } = r;
|
|
491
492
|
return i.get(M).removeFilterModel(e, t);
|
|
492
493
|
}
|
|
493
|
-
},
|
|
494
|
-
id:
|
|
494
|
+
}, z = {
|
|
495
|
+
id: fe,
|
|
495
496
|
type: E.MUTATION,
|
|
496
497
|
handler: (i, r) => {
|
|
497
498
|
const { unitId: e, subUnitId: t } = r, s = i.get(M).getFilterModel(e, t);
|
|
498
499
|
return s ? (s.reCalc(), !0) : !1;
|
|
499
500
|
}
|
|
500
501
|
};
|
|
501
|
-
function
|
|
502
|
+
function Ot(i, r) {
|
|
502
503
|
for (let e = 0; e < i.length; e++) {
|
|
503
504
|
let t = e;
|
|
504
505
|
if (i[e])
|
|
@@ -508,32 +509,32 @@ function vt(i, r) {
|
|
|
508
509
|
return i.filter((e) => e !== null);
|
|
509
510
|
}
|
|
510
511
|
function I(i) {
|
|
511
|
-
return
|
|
512
|
+
return Ot(i, (r, e) => r.id === p.id && e.id === p.id && r.params.unitId === e.params.unitId && r.params.subUnitId === e.params.subUnitId && r.params.col === e.params.col);
|
|
512
513
|
}
|
|
513
|
-
var
|
|
514
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
514
|
+
var At = Object.getOwnPropertyDescriptor, Tt = (i, r, e, t) => {
|
|
515
|
+
for (var n = t > 1 ? void 0 : t ? At(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
515
516
|
(o = i[s]) && (n = o(n) || n);
|
|
516
517
|
return n;
|
|
517
|
-
},
|
|
518
|
-
let
|
|
518
|
+
}, P = (i, r) => (e, t) => r(e, t, i);
|
|
519
|
+
let V = class extends B {
|
|
519
520
|
constructor(r, e, t, n, s) {
|
|
520
521
|
super();
|
|
521
|
-
w(this, "_disposableCollection", new
|
|
522
|
+
w(this, "_disposableCollection", new Te());
|
|
522
523
|
this._commandService = r, this._sheetInterceptorService = e, this._sheetsFilterService = t, this._univerInstanceService = n, this._refRangeService = s, this._initCommands(), this._initRowFilteredInterceptor(), this._initInterceptors(), this._commandExecutedListener(), this._initErrorHandling();
|
|
523
524
|
}
|
|
524
525
|
_initCommands() {
|
|
525
526
|
[
|
|
526
527
|
p,
|
|
527
528
|
R,
|
|
528
|
-
|
|
529
|
-
|
|
529
|
+
z,
|
|
530
|
+
y
|
|
530
531
|
].forEach((r) => this.disposeWithMe(this._commandService.registerCommand(r)));
|
|
531
532
|
}
|
|
532
533
|
_initInterceptors() {
|
|
533
534
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
534
535
|
getMutations: (r) => this._getUpdateFilter(r)
|
|
535
536
|
})), this.disposeWithMe(this._commandService.onCommandExecuted((r) => {
|
|
536
|
-
if (r.id ===
|
|
537
|
+
if (r.id === He.id) {
|
|
537
538
|
const e = r.params, t = e.subUnitId, n = e.unitId;
|
|
538
539
|
if (!t || !n)
|
|
539
540
|
return;
|
|
@@ -559,31 +560,31 @@ let W = class extends V {
|
|
|
559
560
|
if (!t || !n) return;
|
|
560
561
|
const s = (l = this._sheetsFilterService.getFilterModel(r, e)) == null ? void 0 : l.getRange(), o = (a) => {
|
|
561
562
|
switch (a.id) {
|
|
562
|
-
case
|
|
563
|
-
const c = a.params, h = c.unitId || r,
|
|
564
|
-
return this._handleInsertRowCommand(c, h,
|
|
563
|
+
case Xe.id: {
|
|
564
|
+
const c = a.params, h = c.unitId || r, u = c.subUnitId || e;
|
|
565
|
+
return this._handleInsertRowCommand(c, h, u);
|
|
565
566
|
}
|
|
566
|
-
case
|
|
567
|
-
const c = a.params, h = c.unitId || r,
|
|
568
|
-
return this._handleInsertColCommand(c, h,
|
|
567
|
+
case Ke.id: {
|
|
568
|
+
const c = a.params, h = c.unitId || r, u = c.subUnitId || e;
|
|
569
|
+
return this._handleInsertColCommand(c, h, u);
|
|
569
570
|
}
|
|
570
|
-
case
|
|
571
|
+
case Ye.id: {
|
|
571
572
|
const c = a.params;
|
|
572
573
|
return this._handleRemoveColCommand(c, r, e);
|
|
573
574
|
}
|
|
574
|
-
case
|
|
575
|
+
case Je.id: {
|
|
575
576
|
const c = a.params;
|
|
576
577
|
return this._handleRemoveRowCommand(c, r, e);
|
|
577
578
|
}
|
|
578
|
-
case
|
|
579
|
+
case ne.MoveColsCommandId: {
|
|
579
580
|
const c = a.params;
|
|
580
581
|
return this._handleMoveColsCommand(c, r, e);
|
|
581
582
|
}
|
|
582
|
-
case
|
|
583
|
+
case ne.MoveRowsCommandId: {
|
|
583
584
|
const c = a.params;
|
|
584
585
|
return this._handleMoveRowsCommand(c, r, e);
|
|
585
586
|
}
|
|
586
|
-
case
|
|
587
|
+
case Ge.id: {
|
|
587
588
|
const c = a.params;
|
|
588
589
|
return this._handleMoveRangeCommand(c, r, e);
|
|
589
590
|
}
|
|
@@ -595,11 +596,11 @@ let W = class extends V {
|
|
|
595
596
|
_getUpdateFilter(r) {
|
|
596
597
|
const { id: e } = r;
|
|
597
598
|
switch (e) {
|
|
598
|
-
case
|
|
599
|
+
case We.id: {
|
|
599
600
|
const t = r.params;
|
|
600
601
|
return this._handleRemoveSheetCommand(t, t.unitId, t.subUnitId);
|
|
601
602
|
}
|
|
602
|
-
case
|
|
603
|
+
case ze.id: {
|
|
603
604
|
const t = r.params, { targetSubUnitId: n, unitId: s, subUnitId: o } = t;
|
|
604
605
|
return !s || !o || !n ? this._handleNull() : this._handleCopySheetCommand(s, o, n);
|
|
605
606
|
}
|
|
@@ -617,7 +618,7 @@ let W = class extends V {
|
|
|
617
618
|
const { startColumn: o, endColumn: l } = s, { startColumn: a, endColumn: c } = r.range, h = c - a + 1;
|
|
618
619
|
if (c > l)
|
|
619
620
|
return this._handleNull();
|
|
620
|
-
const
|
|
621
|
+
const u = [], d = [], f = a, g = {
|
|
621
622
|
unitId: e,
|
|
622
623
|
subUnitId: t,
|
|
623
624
|
range: {
|
|
@@ -630,13 +631,13 @@ let W = class extends V {
|
|
|
630
631
|
subUnitId: t,
|
|
631
632
|
range: s
|
|
632
633
|
};
|
|
633
|
-
|
|
634
|
+
u.push({ id: R.id, params: g }), d.push({ id: R.id, params: C });
|
|
634
635
|
const F = n.getAllFilterColumns().filter((m) => m[0] >= f);
|
|
635
636
|
if (F.length !== 0) {
|
|
636
637
|
const { newRange: m, oldRange: v } = this._moveCriteria(e, t, F, h);
|
|
637
|
-
|
|
638
|
+
u.push(...m.redos, ...v.redos), d.push(...m.undos, ...v.undos);
|
|
638
639
|
}
|
|
639
|
-
return { redos: I(
|
|
640
|
+
return { redos: I(u), undos: I(d) };
|
|
640
641
|
}
|
|
641
642
|
_handleInsertRowCommand(r, e, t) {
|
|
642
643
|
var C;
|
|
@@ -646,7 +647,7 @@ let W = class extends V {
|
|
|
646
647
|
const { startRow: o, endRow: l } = s, { startRow: a, endRow: c } = r.range, h = c - a + 1;
|
|
647
648
|
if (c > l)
|
|
648
649
|
return this._handleNull();
|
|
649
|
-
const
|
|
650
|
+
const u = [], d = [], f = {
|
|
650
651
|
unitId: e,
|
|
651
652
|
subUnitId: t,
|
|
652
653
|
range: {
|
|
@@ -659,9 +660,9 @@ let W = class extends V {
|
|
|
659
660
|
subUnitId: t,
|
|
660
661
|
range: s
|
|
661
662
|
};
|
|
662
|
-
return
|
|
663
|
-
redos: I(
|
|
664
|
-
undos: I(
|
|
663
|
+
return u.push({ id: R.id, params: f }), d.push({ id: R.id, params: g }), {
|
|
664
|
+
redos: I(u),
|
|
665
|
+
undos: I(d)
|
|
665
666
|
};
|
|
666
667
|
}
|
|
667
668
|
_handleRemoveColCommand(r, e, t) {
|
|
@@ -672,10 +673,10 @@ let W = class extends V {
|
|
|
672
673
|
const { startColumn: o, endColumn: l } = s, { startColumn: a, endColumn: c } = r.range;
|
|
673
674
|
if (a > l)
|
|
674
675
|
return this._handleNull();
|
|
675
|
-
const h = [],
|
|
676
|
+
const h = [], u = [], d = c < o ? 0 : Math.min(c, l) - Math.max(a, o) + 1, f = c - a + 1, g = n.getAllFilterColumns();
|
|
676
677
|
g.forEach((_) => {
|
|
677
678
|
const [m, v] = _;
|
|
678
|
-
m <= c && m >= a && (h.push({ id: p.id, params: { unitId: e, subUnitId: t, col: m, criteria: null } }),
|
|
679
|
+
m <= c && m >= a && (h.push({ id: p.id, params: { unitId: e, subUnitId: t, col: m, criteria: null } }), u.push({ id: p.id, params: { unitId: e, subUnitId: t, col: m, criteria: { ...v.serialize(), colId: m } } }));
|
|
679
680
|
});
|
|
680
681
|
const C = g.filter((_) => {
|
|
681
682
|
const [m, v] = _;
|
|
@@ -684,24 +685,24 @@ let W = class extends V {
|
|
|
684
685
|
let S = { undos: [], redos: [] };
|
|
685
686
|
if (C.length > 0) {
|
|
686
687
|
const { oldRange: _, newRange: m } = this._moveCriteria(e, t, C, -f);
|
|
687
|
-
S = m, h.push(..._.redos),
|
|
688
|
+
S = m, h.push(..._.redos), u.unshift(..._.undos);
|
|
688
689
|
}
|
|
689
|
-
if (
|
|
690
|
+
if (d === l - o + 1) {
|
|
690
691
|
const _ = {
|
|
691
692
|
unitId: e,
|
|
692
693
|
subUnitId: t
|
|
693
694
|
};
|
|
694
|
-
h.push({ id:
|
|
695
|
+
h.push({ id: y.id, params: _ }), u.unshift({ id: R.id, params: { range: s, unitId: e, subUnitId: t } });
|
|
695
696
|
} else {
|
|
696
|
-
const _ = o <= a ? o :
|
|
697
|
+
const _ = o <= a ? o : d === 0 ? o - f : a, m = o <= a ? l - d : l - f, v = {
|
|
697
698
|
unitId: e,
|
|
698
699
|
subUnitId: t,
|
|
699
700
|
range: { ...s, startColumn: _, endColumn: m }
|
|
700
701
|
};
|
|
701
|
-
h.push({ id: R.id, params: v }),
|
|
702
|
+
h.push({ id: R.id, params: v }), u.unshift({ id: R.id, params: { range: s, unitId: e, subUnitId: t } }), h.push(...S.redos), u.unshift(...S.undos);
|
|
702
703
|
}
|
|
703
704
|
return {
|
|
704
|
-
undos:
|
|
705
|
+
undos: u,
|
|
705
706
|
redos: h
|
|
706
707
|
};
|
|
707
708
|
}
|
|
@@ -729,30 +730,30 @@ let W = class extends V {
|
|
|
729
730
|
}
|
|
730
731
|
}]
|
|
731
732
|
};
|
|
732
|
-
const h = [],
|
|
733
|
-
|
|
733
|
+
const h = [], u = [], d = n.getAllFilterColumns(), f = o <= c && o >= a;
|
|
734
|
+
u.push({ id: R.id, params: { range: s, unitId: e, subUnitId: t } });
|
|
734
735
|
const g = Math.min(c, l) - Math.max(a, o) + 1;
|
|
735
736
|
if (g === l - o + 1 || f) {
|
|
736
737
|
const S = {
|
|
737
738
|
unitId: e,
|
|
738
739
|
subUnitId: t
|
|
739
740
|
};
|
|
740
|
-
h.push({ id:
|
|
741
|
+
h.push({ id: y.id, params: S }), d.forEach((F) => {
|
|
741
742
|
const [_, m] = F, v = {
|
|
742
743
|
unitId: e,
|
|
743
744
|
subUnitId: t,
|
|
744
745
|
col: _,
|
|
745
746
|
criteria: { ...m.serialize(), colId: _ }
|
|
746
747
|
};
|
|
747
|
-
|
|
748
|
+
u.push({ id: p.id, params: v });
|
|
748
749
|
});
|
|
749
750
|
} else {
|
|
750
751
|
const S = (C = this._univerInstanceService.getUniverSheetInstance(e)) == null ? void 0 : C.getSheetBySheetId(t);
|
|
751
752
|
if (!S)
|
|
752
753
|
return this._handleNull();
|
|
753
754
|
const F = [];
|
|
754
|
-
for (let
|
|
755
|
-
S.getRowFiltered(
|
|
755
|
+
for (let O = a; O <= c; O++)
|
|
756
|
+
S.getRowFiltered(O) && F.push(O);
|
|
756
757
|
const _ = Math.min(o, a), m = _ + (l - o) - g + F.length, v = {
|
|
757
758
|
unitId: e,
|
|
758
759
|
subUnitId: t,
|
|
@@ -765,7 +766,7 @@ let W = class extends V {
|
|
|
765
766
|
h.push({ id: R.id, params: v });
|
|
766
767
|
}
|
|
767
768
|
return {
|
|
768
|
-
undos: I(
|
|
769
|
+
undos: I(u),
|
|
769
770
|
redos: I(h)
|
|
770
771
|
};
|
|
771
772
|
}
|
|
@@ -778,42 +779,42 @@ let W = class extends V {
|
|
|
778
779
|
const { startColumn: o, endColumn: l } = s, { fromRange: a, toRange: c } = r;
|
|
779
780
|
if (a.endColumn < o && c.startColumn <= o || a.startColumn > l && c.endColumn > l)
|
|
780
781
|
return this._handleNull();
|
|
781
|
-
const h = [],
|
|
782
|
+
const h = [], u = [], d = {};
|
|
782
783
|
for (let m = o; m <= l; m++)
|
|
783
|
-
|
|
784
|
+
d[m] = {
|
|
784
785
|
colIndex: m,
|
|
785
786
|
filter: n.getFilterColumn(m)
|
|
786
787
|
};
|
|
787
|
-
|
|
788
|
+
re(a.startColumn, a.endColumn - a.startColumn + 1, c.startColumn, d);
|
|
788
789
|
let f = s.startColumn, g = s.endColumn;
|
|
789
790
|
o >= a.startColumn && o <= a.endColumn && c.startColumn > a.startColumn && a.endColumn < l && (f = a.endColumn + 1), l >= a.startColumn && l <= a.endColumn && c.startColumn < a.startColumn && a.startColumn > o && (g = a.startColumn - 1);
|
|
790
|
-
const C = Object.keys(
|
|
791
|
+
const C = Object.keys(d).map((m) => Number(m)), S = C.find((m) => d[m].colIndex === g), F = C.find((m) => d[m].colIndex === f);
|
|
791
792
|
if (C.forEach((m) => {
|
|
792
|
-
var
|
|
793
|
-
const { colIndex: v, filter:
|
|
794
|
-
if (
|
|
793
|
+
var Z, ee;
|
|
794
|
+
const { colIndex: v, filter: O } = d[m], A = m;
|
|
795
|
+
if (O) {
|
|
795
796
|
if (A >= F && A <= S) {
|
|
796
|
-
const
|
|
797
|
+
const q = {
|
|
797
798
|
unitId: e,
|
|
798
799
|
subUnitId: t,
|
|
799
800
|
col: A,
|
|
800
|
-
criteria: { ...
|
|
801
|
-
},
|
|
801
|
+
criteria: { ...O.serialize(), colId: A }
|
|
802
|
+
}, Se = {
|
|
802
803
|
unitId: e,
|
|
803
804
|
subUnitId: t,
|
|
804
805
|
col: A,
|
|
805
|
-
criteria: n.getFilterColumn(A) ? { ...(
|
|
806
|
+
criteria: n.getFilterColumn(A) ? { ...(Z = n.getFilterColumn(A)) == null ? void 0 : Z.serialize(), colId: A } : null
|
|
806
807
|
};
|
|
807
|
-
h.push({ id: p.id, params:
|
|
808
|
+
h.push({ id: p.id, params: q }), u.push({ id: p.id, params: Se });
|
|
808
809
|
}
|
|
809
|
-
if (!((
|
|
810
|
-
const
|
|
810
|
+
if (!((ee = d[v]) != null && ee.filter)) {
|
|
811
|
+
const q = {
|
|
811
812
|
unitId: e,
|
|
812
813
|
subUnitId: t,
|
|
813
814
|
col: v,
|
|
814
815
|
criteria: null
|
|
815
816
|
};
|
|
816
|
-
h.push({ id: p.id, params:
|
|
817
|
+
h.push({ id: p.id, params: q }), u.push({ id: p.id, params: { unitId: e, subUnitId: t, col: v, criteria: { ...O.serialize(), colId: v } } });
|
|
817
818
|
}
|
|
818
819
|
}
|
|
819
820
|
}), o !== F || l !== S) {
|
|
@@ -826,10 +827,10 @@ let W = class extends V {
|
|
|
826
827
|
endColumn: S
|
|
827
828
|
}
|
|
828
829
|
};
|
|
829
|
-
h.unshift({ id: R.id, params: m }),
|
|
830
|
+
h.unshift({ id: R.id, params: m }), u.unshift({ id: R.id, params: { range: s, unitId: e, subUnitId: t } });
|
|
830
831
|
}
|
|
831
832
|
return {
|
|
832
|
-
undos:
|
|
833
|
+
undos: u,
|
|
833
834
|
redos: h
|
|
834
835
|
};
|
|
835
836
|
}
|
|
@@ -841,15 +842,15 @@ let W = class extends V {
|
|
|
841
842
|
const { startRow: o, endRow: l } = s, { fromRange: a, toRange: c } = r;
|
|
842
843
|
if (a.endRow < o && c.startRow <= o || a.startRow > l && c.endRow > l)
|
|
843
844
|
return this._handleNull();
|
|
844
|
-
const h = [],
|
|
845
|
+
const h = [], u = [], d = {};
|
|
845
846
|
for (let m = o; m <= l; m++)
|
|
846
|
-
|
|
847
|
+
d[m] = {
|
|
847
848
|
oldIndex: m
|
|
848
849
|
};
|
|
849
850
|
const f = o;
|
|
850
851
|
let g = l;
|
|
851
|
-
l >= a.startRow && l <= a.endRow && c.startRow < a.startRow && a.startRow > o && (g = a.startRow - 1),
|
|
852
|
-
const C = Object.keys(
|
|
852
|
+
l >= a.startRow && l <= a.endRow && c.startRow < a.startRow && a.startRow > o && (g = a.startRow - 1), re(a.startRow, a.endRow - a.startRow + 1, c.startRow, d);
|
|
853
|
+
const C = Object.keys(d).map((m) => Number(m)), S = C.find((m) => d[m].oldIndex === g), F = C.find((m) => d[m].oldIndex === f);
|
|
853
854
|
if (o !== F || l !== S) {
|
|
854
855
|
const m = {
|
|
855
856
|
unitId: e,
|
|
@@ -860,11 +861,11 @@ let W = class extends V {
|
|
|
860
861
|
endRow: S
|
|
861
862
|
}
|
|
862
863
|
};
|
|
863
|
-
h.push({ id: R.id, params: m }, { id:
|
|
864
|
+
h.push({ id: R.id, params: m }, { id: z.id, params: { unitId: e, subUnitId: t } }), u.push({ id: R.id, params: { range: s, unitId: e, subUnitId: t } }, { id: z.id, params: { unitId: e, subUnitId: t } });
|
|
864
865
|
}
|
|
865
866
|
return {
|
|
866
867
|
redos: h,
|
|
867
|
-
undos:
|
|
868
|
+
undos: u
|
|
868
869
|
};
|
|
869
870
|
}
|
|
870
871
|
_handleMoveRangeCommand(r, e, t) {
|
|
@@ -875,26 +876,26 @@ let W = class extends V {
|
|
|
875
876
|
if (!l)
|
|
876
877
|
return this._handleNull();
|
|
877
878
|
const a = [], c = [];
|
|
878
|
-
if (
|
|
879
|
-
const h = l.startRow - n.startRow,
|
|
879
|
+
if (K.contains(n, l)) {
|
|
880
|
+
const h = l.startRow - n.startRow, u = l.startColumn - n.startColumn, d = {
|
|
880
881
|
startRow: s.startRow + h,
|
|
881
|
-
startColumn: s.startColumn +
|
|
882
|
+
startColumn: s.startColumn + u,
|
|
882
883
|
endRow: s.startRow + h + (l.endRow - l.startRow),
|
|
883
|
-
endColumn: s.startColumn +
|
|
884
|
+
endColumn: s.startColumn + u + (l.endColumn - l.startColumn)
|
|
884
885
|
}, f = {
|
|
885
|
-
id:
|
|
886
|
+
id: y.id,
|
|
886
887
|
params: {
|
|
887
888
|
unitId: e,
|
|
888
889
|
subUnitId: t
|
|
889
890
|
}
|
|
890
|
-
}, g = { id: R.id, params: { unitId: e, subUnitId: t, range:
|
|
891
|
+
}, g = { id: R.id, params: { unitId: e, subUnitId: t, range: d } }, C = { id: R.id, params: { unitId: e, subUnitId: t, range: l } };
|
|
891
892
|
a.push(f, g), c.push(f, C);
|
|
892
893
|
const S = o.getAllFilterColumns(), F = s.startColumn - n.startColumn;
|
|
893
894
|
S.forEach((_) => {
|
|
894
895
|
const [m, v] = _;
|
|
895
896
|
v && (a.push({ id: p.id, params: { unitId: e, subUnitId: t, col: m + F, criteria: { ...v.serialize(), colId: m + F } } }), c.push({ id: p.id, params: { unitId: e, subUnitId: t, col: m, criteria: { ...v.serialize(), colId: m } } }));
|
|
896
897
|
});
|
|
897
|
-
} else if (
|
|
898
|
+
} else if (K.intersects(s, l)) {
|
|
898
899
|
const h = {
|
|
899
900
|
...l,
|
|
900
901
|
endRow: Math.max(l.endRow, s.endRow)
|
|
@@ -916,7 +917,7 @@ let W = class extends V {
|
|
|
916
917
|
const o = [], l = [];
|
|
917
918
|
return n.getAllFilterColumns().forEach(([c, h]) => {
|
|
918
919
|
l.push({ id: p.id, params: { unitId: e, subUnitId: t, col: c, criteria: { ...h.serialize(), colId: c } } });
|
|
919
|
-
}), o.push({ id:
|
|
920
|
+
}), o.push({ id: y.id, params: { unitId: e, subUnitId: t, range: s } }), l.unshift({ id: R.id, params: { range: s, unitId: e, subUnitId: t } }), {
|
|
920
921
|
undos: l,
|
|
921
922
|
redos: o
|
|
922
923
|
};
|
|
@@ -929,9 +930,9 @@ let W = class extends V {
|
|
|
929
930
|
if (!s)
|
|
930
931
|
return this._handleNull();
|
|
931
932
|
const o = [], l = [], a = [], c = [];
|
|
932
|
-
return n.getAllFilterColumns().forEach(([
|
|
933
|
-
o.push({ id: p.id, params: { unitId: r, subUnitId: t, col:
|
|
934
|
-
}), a.push({ id:
|
|
933
|
+
return n.getAllFilterColumns().forEach(([u, d]) => {
|
|
934
|
+
o.push({ id: p.id, params: { unitId: r, subUnitId: t, col: u, criteria: { ...d.serialize(), colId: u } } }), a.push({ id: p.id, params: { unitId: r, subUnitId: t, col: u, criteria: null } });
|
|
935
|
+
}), a.push({ id: y.id, params: { unitId: r, subUnitId: t, range: s } }), o.unshift({ id: R.id, params: { range: s, unitId: r, subUnitId: t } }), {
|
|
935
936
|
undos: l,
|
|
936
937
|
redos: o,
|
|
937
938
|
preUndos: a,
|
|
@@ -942,7 +943,7 @@ let W = class extends V {
|
|
|
942
943
|
return { redos: [], undos: [] };
|
|
943
944
|
}
|
|
944
945
|
_initRowFilteredInterceptor() {
|
|
945
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
946
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(Ve.ROW_FILTERED, {
|
|
946
947
|
// sheet-interceptor.service.ts
|
|
947
948
|
handler: (r, e) => {
|
|
948
949
|
var t, n;
|
|
@@ -961,35 +962,35 @@ let W = class extends V {
|
|
|
961
962
|
col: -1
|
|
962
963
|
}, o = [], l = [], a = [], c = [];
|
|
963
964
|
return t.forEach((h) => {
|
|
964
|
-
const [
|
|
965
|
+
const [u, d] = h;
|
|
965
966
|
l.push({
|
|
966
967
|
id: p.id,
|
|
967
968
|
params: {
|
|
968
969
|
...s,
|
|
969
|
-
col:
|
|
970
|
+
col: u
|
|
970
971
|
}
|
|
971
972
|
}), o.push({
|
|
972
973
|
id: p.id,
|
|
973
974
|
params: {
|
|
974
975
|
...s,
|
|
975
|
-
col:
|
|
976
|
-
criteria: { ...
|
|
976
|
+
col: u,
|
|
977
|
+
criteria: { ...d.serialize(), colId: u }
|
|
977
978
|
}
|
|
978
979
|
});
|
|
979
980
|
}), t.forEach((h) => {
|
|
980
|
-
const [
|
|
981
|
+
const [u, d] = h;
|
|
981
982
|
c.push({
|
|
982
983
|
id: p.id,
|
|
983
984
|
params: {
|
|
984
985
|
...s,
|
|
985
|
-
col:
|
|
986
|
-
criteria: { ...
|
|
986
|
+
col: u + n,
|
|
987
|
+
criteria: { ...d.serialize(), colId: u + n }
|
|
987
988
|
}
|
|
988
989
|
}), a.push({
|
|
989
990
|
id: p.id,
|
|
990
991
|
params: {
|
|
991
992
|
...s,
|
|
992
|
-
col:
|
|
993
|
+
col: u + n,
|
|
993
994
|
criteria: null
|
|
994
995
|
}
|
|
995
996
|
});
|
|
@@ -1009,37 +1010,37 @@ let W = class extends V {
|
|
|
1009
1010
|
var c, h;
|
|
1010
1011
|
const { unitId: t, subUnitId: n } = r.params || {}, s = this._sheetsFilterService.getFilterModel(t, n);
|
|
1011
1012
|
if (!s) return;
|
|
1012
|
-
const o = Array.from(s.filteredOutRows).sort((
|
|
1013
|
+
const o = Array.from(s.filteredOutRows).sort((u, d) => u - d), l = [];
|
|
1013
1014
|
let a = !1;
|
|
1014
|
-
if (r.id ===
|
|
1015
|
-
const { startRow:
|
|
1015
|
+
if (r.id === je.id) {
|
|
1016
|
+
const { startRow: u, endRow: d } = r.params.range, f = o.filter((g) => g >= u && g <= d);
|
|
1016
1017
|
o.forEach((g) => {
|
|
1017
|
-
if (g <
|
|
1018
|
+
if (g < u)
|
|
1018
1019
|
l.push(g);
|
|
1019
|
-
else if (a = !0, g <=
|
|
1020
|
-
const C = Math.max(
|
|
1020
|
+
else if (a = !0, g <= d) {
|
|
1021
|
+
const C = Math.max(u, l.length ? l[l.length - 1] + 1 : u);
|
|
1021
1022
|
l.push(C);
|
|
1022
1023
|
} else
|
|
1023
|
-
l.push(g - (
|
|
1024
|
+
l.push(g - (d - u + 1 - f.length));
|
|
1024
1025
|
});
|
|
1025
1026
|
}
|
|
1026
|
-
if (r.id ===
|
|
1027
|
-
const { startRow:
|
|
1027
|
+
if (r.id === ke.id) {
|
|
1028
|
+
const { startRow: u, endRow: d } = r.params.range;
|
|
1028
1029
|
o.forEach((f) => {
|
|
1029
|
-
f >=
|
|
1030
|
+
f >= u ? (a = !0, l.push(f + (d - u + 1))) : l.push(f);
|
|
1030
1031
|
});
|
|
1031
1032
|
}
|
|
1032
|
-
if (a && (s.filteredOutRows = new Set(l)), r.id ===
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
const
|
|
1036
|
-
if (
|
|
1037
|
-
for (let f =
|
|
1038
|
-
const g = (c =
|
|
1033
|
+
if (a && (s.filteredOutRows = new Set(l)), r.id === qe.id && !(e != null && e.onlyLocal)) {
|
|
1034
|
+
const u = this._getExtendRegion(t, n);
|
|
1035
|
+
if (u) {
|
|
1036
|
+
const d = r.params.cellValue;
|
|
1037
|
+
if (d)
|
|
1038
|
+
for (let f = u.startColumn; f <= u.endColumn; f++) {
|
|
1039
|
+
const g = (c = d == null ? void 0 : d[u.startRow]) == null ? void 0 : c[f];
|
|
1039
1040
|
if (g && this._cellHasValue(g)) {
|
|
1040
1041
|
const C = (h = this._univerInstanceService.getUnit(t)) == null ? void 0 : h.getSheetBySheetId(n);
|
|
1041
1042
|
if (C) {
|
|
1042
|
-
const S =
|
|
1043
|
+
const S = ue(u, { down: !0 }, C), F = this._sheetsFilterService.getFilterModel(t, n), _ = F.getRange();
|
|
1043
1044
|
F.setRange({
|
|
1044
1045
|
..._,
|
|
1045
1046
|
endRow: S.endRow
|
|
@@ -1080,7 +1081,7 @@ let W = class extends V {
|
|
|
1080
1081
|
const { subUnitId: n, unitId: s } = t, o = this._sheetsFilterService.getFilterModel(s, n);
|
|
1081
1082
|
if (!o) return;
|
|
1082
1083
|
const l = o.getRange();
|
|
1083
|
-
if (r.id ===
|
|
1084
|
+
if (r.id === Qe.id && e.fromRange.startRow <= l.startRow && e.fromRange.endRow < l.endRow && e.fromRange.endRow >= l.startRow)
|
|
1084
1085
|
throw this._sheetsFilterService.setFilterErrorMsg("sheets-filter.msg.filter-header-forbidden"), new Error("[SheetsFilterController]: Cannot move header row of filter");
|
|
1085
1086
|
}));
|
|
1086
1087
|
}
|
|
@@ -1089,101 +1090,158 @@ let W = class extends V {
|
|
|
1089
1090
|
return !(e.length === 0 || e.every((t) => t == null));
|
|
1090
1091
|
}
|
|
1091
1092
|
};
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
],
|
|
1099
|
-
var
|
|
1100
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
1093
|
+
V = Tt([
|
|
1094
|
+
P(0, N),
|
|
1095
|
+
P(1, $(Be)),
|
|
1096
|
+
P(2, $(M)),
|
|
1097
|
+
P(3, T),
|
|
1098
|
+
P(4, $(be))
|
|
1099
|
+
], V);
|
|
1100
|
+
var Nt = Object.getOwnPropertyDescriptor, xt = (i, r, e, t) => {
|
|
1101
|
+
for (var n = t > 1 ? void 0 : t ? Nt(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
1102
|
+
(o = i[s]) && (n = o(n) || n);
|
|
1103
|
+
return n;
|
|
1104
|
+
}, Y = (i, r) => (e, t) => r(e, t, i);
|
|
1105
|
+
let j = class extends B {
|
|
1106
|
+
constructor(i, r, e) {
|
|
1107
|
+
super(), this._activeDirtyManagerService = i, this._sheetsFilterService = r, this._univerInstanceService = e, this._initFormulaDirtyRange();
|
|
1108
|
+
}
|
|
1109
|
+
_initFormulaDirtyRange() {
|
|
1110
|
+
ge.forEach((i) => {
|
|
1111
|
+
this._activeDirtyManagerService.register(
|
|
1112
|
+
i,
|
|
1113
|
+
{
|
|
1114
|
+
commandId: i,
|
|
1115
|
+
getDirtyData: (r) => {
|
|
1116
|
+
const e = r.params, { unitId: t, subUnitId: n } = e;
|
|
1117
|
+
return {
|
|
1118
|
+
dirtyRanges: this._getHideRowMutation(t, n),
|
|
1119
|
+
clearDependencyTreeCache: {
|
|
1120
|
+
[t]: {
|
|
1121
|
+
[n]: "1"
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
);
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
_getHideRowMutation(i, r) {
|
|
1131
|
+
var l, a;
|
|
1132
|
+
const e = (l = this._sheetsFilterService.getFilterModel(i, r)) == null ? void 0 : l.getRange(), t = (a = this._univerInstanceService.getUnit(i)) == null ? void 0 : a.getSheetBySheetId(r);
|
|
1133
|
+
if (e == null || t == null)
|
|
1134
|
+
return [];
|
|
1135
|
+
const { startRow: n, endRow: s } = e;
|
|
1136
|
+
return [{
|
|
1137
|
+
unitId: i,
|
|
1138
|
+
sheetId: r,
|
|
1139
|
+
range: {
|
|
1140
|
+
startRow: n,
|
|
1141
|
+
startColumn: 0,
|
|
1142
|
+
endRow: s,
|
|
1143
|
+
endColumn: t.getColumnCount() - 1
|
|
1144
|
+
}
|
|
1145
|
+
}];
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
j = xt([
|
|
1149
|
+
Y(0, $(st)),
|
|
1150
|
+
Y(1, $(M)),
|
|
1151
|
+
Y(2, T)
|
|
1152
|
+
], j);
|
|
1153
|
+
var It = Object.getOwnPropertyDescriptor, $t = (i, r, e, t) => {
|
|
1154
|
+
for (var n = t > 1 ? void 0 : t ? It(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
1101
1155
|
(o = i[s]) && (n = o(n) || n);
|
|
1102
1156
|
return n;
|
|
1103
|
-
},
|
|
1104
|
-
let
|
|
1105
|
-
constructor(i =
|
|
1157
|
+
}, ae = (i, r) => (e, t) => r(e, t, i), H;
|
|
1158
|
+
let ce = (H = class extends Ne {
|
|
1159
|
+
constructor(i = ie, r, e) {
|
|
1106
1160
|
super(), this._config = i, this._injector = r, this._configService = e;
|
|
1107
|
-
const { ...t } =
|
|
1161
|
+
const { ...t } = xe(
|
|
1108
1162
|
{},
|
|
1109
|
-
|
|
1163
|
+
ie,
|
|
1110
1164
|
this._config
|
|
1111
1165
|
);
|
|
1112
|
-
this._configService.setConfig(
|
|
1166
|
+
this._configService.setConfig(ot, t);
|
|
1113
1167
|
}
|
|
1114
1168
|
onStarting() {
|
|
1115
1169
|
[
|
|
1170
|
+
[j],
|
|
1116
1171
|
[M],
|
|
1117
|
-
[
|
|
1172
|
+
[V]
|
|
1118
1173
|
].forEach((i) => this._injector.add(i));
|
|
1119
1174
|
}
|
|
1120
1175
|
onReady() {
|
|
1121
|
-
this._injector
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1176
|
+
Ie(this._injector, [
|
|
1177
|
+
[j],
|
|
1178
|
+
[V]
|
|
1179
|
+
]);
|
|
1180
|
+
}
|
|
1181
|
+
}, w(H, "type", D.UNIVER_SHEET), w(H, "pluginName", Fe), H);
|
|
1182
|
+
ce = $t([
|
|
1183
|
+
ae(1, $($e)),
|
|
1184
|
+
ae(2, Ue)
|
|
1185
|
+
], ce);
|
|
1186
|
+
const Ut = {
|
|
1129
1187
|
id: "sheet.command.set-filter-range",
|
|
1130
1188
|
type: E.COMMAND,
|
|
1131
1189
|
handler: (i, r) => {
|
|
1132
|
-
const e = i.get(M), t = i.get(
|
|
1190
|
+
const e = i.get(M), t = i.get(N), n = i.get(k), s = i.get(T), { unitId: o, subUnitId: l, range: a } = r;
|
|
1133
1191
|
if (!b(s, r) || e.getFilterModel(o, l)) return !1;
|
|
1134
1192
|
if (a.endRow === a.startRow) {
|
|
1135
|
-
const f = i.get(
|
|
1193
|
+
const f = i.get(De), g = i.get(Le);
|
|
1136
1194
|
return f.emit(g.t("sheets-filter.command.not-valid-filter-range")), !1;
|
|
1137
1195
|
}
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1196
|
+
const u = { id: R.id, params: { unitId: o, subUnitId: l, range: a } }, d = t.syncExecuteCommand(u.id, u.params);
|
|
1197
|
+
return d && n.pushUndoRedo({
|
|
1140
1198
|
unitID: o,
|
|
1141
|
-
undoMutations: [{ id:
|
|
1142
|
-
redoMutations: [
|
|
1143
|
-
}),
|
|
1199
|
+
undoMutations: [{ id: y.id, params: { unitId: o, subUnitId: l } }],
|
|
1200
|
+
redoMutations: [u]
|
|
1201
|
+
}), d;
|
|
1144
1202
|
}
|
|
1145
|
-
},
|
|
1203
|
+
}, Pt = {
|
|
1146
1204
|
id: "sheet.command.remove-sheet-filter",
|
|
1147
1205
|
type: E.COMMAND,
|
|
1148
1206
|
handler: (i, r) => {
|
|
1149
|
-
const e = i.get(
|
|
1207
|
+
const e = i.get(T), t = i.get(M), n = i.get(N), s = i.get(k), o = b(e, r);
|
|
1150
1208
|
if (!o) return !1;
|
|
1151
1209
|
const { unitId: l, subUnitId: a } = o, c = t.getFilterModel(l, a);
|
|
1152
1210
|
if (!c) return !1;
|
|
1153
|
-
const h = c == null ? void 0 : c.serialize(),
|
|
1154
|
-
return
|
|
1211
|
+
const h = c == null ? void 0 : c.serialize(), u = Dt(l, a, h), d = n.syncExecuteCommand(y.id, { unitId: l, subUnitId: a });
|
|
1212
|
+
return d && s.pushUndoRedo({
|
|
1155
1213
|
unitID: l,
|
|
1156
|
-
undoMutations:
|
|
1157
|
-
redoMutations: [{ id:
|
|
1158
|
-
}),
|
|
1214
|
+
undoMutations: u,
|
|
1215
|
+
redoMutations: [{ id: y.id, params: { unitId: l, subUnitId: a } }]
|
|
1216
|
+
}), d;
|
|
1159
1217
|
}
|
|
1160
|
-
},
|
|
1218
|
+
}, jt = {
|
|
1161
1219
|
id: "sheet.command.smart-toggle-filter",
|
|
1162
1220
|
type: E.COMMAND,
|
|
1163
1221
|
handler: async (i) => {
|
|
1164
|
-
const r = i.get(
|
|
1222
|
+
const r = i.get(T), e = i.get(M), t = i.get(N), n = r.getCurrentUnitForType(D.UNIVER_SHEET), s = n == null ? void 0 : n.getActiveSheet();
|
|
1165
1223
|
if (!s || !n) return !1;
|
|
1166
1224
|
const o = n.getUnitId(), l = s.getSheetId();
|
|
1167
1225
|
if (e.getFilterModel(o, l))
|
|
1168
|
-
return t.executeCommand(
|
|
1169
|
-
const h = i.get(
|
|
1226
|
+
return t.executeCommand(Pt.id, { unitId: o, subUnitId: l });
|
|
1227
|
+
const h = i.get(Ze).getCurrentLastSelection();
|
|
1170
1228
|
if (!h) return !1;
|
|
1171
|
-
const
|
|
1172
|
-
return t.executeCommand(
|
|
1229
|
+
const u = h.range, d = et(h) ? ue(u, { left: !0, right: !0, up: !0, down: !0 }, s) : u;
|
|
1230
|
+
return t.executeCommand(Ut.id, {
|
|
1173
1231
|
unitId: o,
|
|
1174
1232
|
subUnitId: l,
|
|
1175
|
-
range:
|
|
1233
|
+
range: d
|
|
1176
1234
|
});
|
|
1177
1235
|
}
|
|
1178
|
-
},
|
|
1236
|
+
}, kt = {
|
|
1179
1237
|
id: "sheet.command.set-filter-criteria",
|
|
1180
1238
|
type: E.COMMAND,
|
|
1181
1239
|
handler: (i, r) => {
|
|
1182
|
-
const e = i.get(M), t = i.get(
|
|
1240
|
+
const e = i.get(M), t = i.get(N), n = i.get(k), { unitId: s, subUnitId: o, col: l, criteria: a } = r, c = e.getFilterModel(s, o);
|
|
1183
1241
|
if (!c) return !1;
|
|
1184
1242
|
const h = c.getRange();
|
|
1185
1243
|
if (!h || l < h.startColumn || l > h.endColumn) return !1;
|
|
1186
|
-
const
|
|
1244
|
+
const u = c.getFilterColumn(l), d = Bt(s, o, l, u), f = {
|
|
1187
1245
|
id: p.id,
|
|
1188
1246
|
params: {
|
|
1189
1247
|
unitId: s,
|
|
@@ -1194,36 +1252,36 @@ const At = {
|
|
|
1194
1252
|
}, g = t.syncExecuteCommand(f.id, f.params);
|
|
1195
1253
|
return g && n.pushUndoRedo({
|
|
1196
1254
|
unitID: s,
|
|
1197
|
-
undoMutations: [
|
|
1255
|
+
undoMutations: [d],
|
|
1198
1256
|
redoMutations: [f]
|
|
1199
1257
|
}), g;
|
|
1200
1258
|
}
|
|
1201
|
-
},
|
|
1259
|
+
}, qt = {
|
|
1202
1260
|
id: "sheet.command.clear-filter-criteria",
|
|
1203
1261
|
type: E.COMMAND,
|
|
1204
1262
|
handler: (i, r) => {
|
|
1205
|
-
const e = i.get(M), t = i.get(
|
|
1263
|
+
const e = i.get(M), t = i.get(k), n = i.get(N), s = i.get(T), o = b(s, r);
|
|
1206
1264
|
if (!o) return !1;
|
|
1207
1265
|
const { unitId: l, subUnitId: a } = o, c = e.getFilterModel(o.unitId, o.subUnitId);
|
|
1208
1266
|
if (!c) return !1;
|
|
1209
|
-
const h = c.serialize(),
|
|
1210
|
-
return
|
|
1267
|
+
const h = c.serialize(), u = we(l, a, h), d = Lt(l, a, h);
|
|
1268
|
+
return Pe(d, n).result ? (t.pushUndoRedo({
|
|
1211
1269
|
unitID: l,
|
|
1212
|
-
undoMutations:
|
|
1213
|
-
redoMutations:
|
|
1270
|
+
undoMutations: u,
|
|
1271
|
+
redoMutations: d
|
|
1214
1272
|
}), !0) : !1;
|
|
1215
1273
|
}
|
|
1216
|
-
},
|
|
1274
|
+
}, Qt = {
|
|
1217
1275
|
id: "sheet.command.re-calc-filter",
|
|
1218
1276
|
type: E.COMMAND,
|
|
1219
1277
|
handler: (i, r) => {
|
|
1220
|
-
const e = i.get(M), t = i.get(
|
|
1278
|
+
const e = i.get(M), t = i.get(N), n = i.get(T), s = b(n, r);
|
|
1221
1279
|
if (!s) return !1;
|
|
1222
1280
|
const { unitId: o, subUnitId: l } = s;
|
|
1223
|
-
return e.getFilterModel(s.unitId, s.subUnitId) ? t.executeCommand(
|
|
1281
|
+
return e.getFilterModel(s.unitId, s.subUnitId) ? t.executeCommand(z.id, { unitId: o, subUnitId: l }) : !1;
|
|
1224
1282
|
}
|
|
1225
1283
|
};
|
|
1226
|
-
function
|
|
1284
|
+
function Dt(i, r, e) {
|
|
1227
1285
|
const t = [], n = {
|
|
1228
1286
|
id: R.id,
|
|
1229
1287
|
params: {
|
|
@@ -1232,9 +1290,9 @@ function Nt(i, r, e) {
|
|
|
1232
1290
|
range: e.ref
|
|
1233
1291
|
}
|
|
1234
1292
|
};
|
|
1235
|
-
return t.push(n),
|
|
1293
|
+
return t.push(n), we(i, r, e).forEach((o) => t.push(o)), t;
|
|
1236
1294
|
}
|
|
1237
|
-
function
|
|
1295
|
+
function we(i, r, e) {
|
|
1238
1296
|
var n;
|
|
1239
1297
|
const t = [];
|
|
1240
1298
|
return (n = e.filterColumns) == null || n.forEach((s) => {
|
|
@@ -1250,7 +1308,7 @@ function Ce(i, r, e) {
|
|
|
1250
1308
|
t.push(o);
|
|
1251
1309
|
}), t;
|
|
1252
1310
|
}
|
|
1253
|
-
function
|
|
1311
|
+
function Lt(i, r, e) {
|
|
1254
1312
|
var n;
|
|
1255
1313
|
const t = [];
|
|
1256
1314
|
return (n = e.filterColumns) == null || n.forEach((s) => {
|
|
@@ -1266,7 +1324,7 @@ function xt(i, r, e) {
|
|
|
1266
1324
|
t.push(o);
|
|
1267
1325
|
}), t;
|
|
1268
1326
|
}
|
|
1269
|
-
function
|
|
1327
|
+
function Bt(i, r, e, t) {
|
|
1270
1328
|
if (!t)
|
|
1271
1329
|
return {
|
|
1272
1330
|
id: p.id,
|
|
@@ -1289,28 +1347,28 @@ function It(i, r, e, t) {
|
|
|
1289
1347
|
};
|
|
1290
1348
|
}
|
|
1291
1349
|
export {
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1350
|
+
qt as ClearSheetsFilterCriteriaCommand,
|
|
1351
|
+
x as CustomFilterOperator,
|
|
1352
|
+
ge as FILTER_MUTATIONS,
|
|
1353
|
+
_t as FilterColumn,
|
|
1354
|
+
W as FilterModel,
|
|
1355
|
+
Qt as ReCalcSheetsFilterCommand,
|
|
1356
|
+
z as ReCalcSheetsFilterMutation,
|
|
1357
|
+
Pt as RemoveSheetFilterCommand,
|
|
1358
|
+
y as RemoveSheetsFilterMutation,
|
|
1359
|
+
Fe as SHEET_FILTER_SNAPSHOT_ID,
|
|
1360
|
+
Ut as SetSheetFilterRangeCommand,
|
|
1361
|
+
kt as SetSheetsFilterCriteriaCommand,
|
|
1304
1362
|
p as SetSheetsFilterCriteriaMutation,
|
|
1305
1363
|
R as SetSheetsFilterRangeMutation,
|
|
1306
1364
|
M as SheetsFilterService,
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1365
|
+
jt as SmartToggleSheetsFilterCommand,
|
|
1366
|
+
ce as UniverSheetsFilterPlugin,
|
|
1367
|
+
dt as equals,
|
|
1368
|
+
se as getCustomFilterFn,
|
|
1369
|
+
lt as greaterThan,
|
|
1370
|
+
at as greaterThanOrEqualTo,
|
|
1371
|
+
ct as lessThan,
|
|
1372
|
+
ut as lessThanOrEqualTo,
|
|
1373
|
+
_e as notEquals
|
|
1316
1374
|
};
|