@univerjs/sheets-filter 0.5.0 → 0.5.1-nightly.202411301606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +205 -205
- package/lib/types/common/const.d.ts +20 -0
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/sheet-filter.service.d.ts +0 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,94 +1,71 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (i, r, e) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: E.MUTATION,
|
|
17
|
-
handler: (i, r) => {
|
|
18
|
-
const { subUnitId: e, unitId: t, criteria: n, col: s, reCalc: o = !0 } = r, a = i.get(M).getFilterModel(t, e);
|
|
19
|
-
return a ? (a.setCriteria(s, n, o), !0) : !1;
|
|
20
|
-
}
|
|
21
|
-
}, O = {
|
|
22
|
-
id: "sheet.mutation.remove-filter",
|
|
23
|
-
type: E.MUTATION,
|
|
24
|
-
handler: (i, r) => {
|
|
25
|
-
const { unitId: e, subUnitId: t } = r;
|
|
26
|
-
return i.get(M).removeFilterModel(e, t);
|
|
27
|
-
}
|
|
28
|
-
}, L = {
|
|
29
|
-
id: "sheet.mutation.re-calc-filter",
|
|
30
|
-
type: E.MUTATION,
|
|
31
|
-
handler: (i, r) => {
|
|
32
|
-
const { unitId: e, subUnitId: t } = r, s = i.get(M).getFilterModel(e, t);
|
|
33
|
-
return s ? (s.reCalc(), !0) : !1;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var T = /* @__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))(T || {});
|
|
37
|
-
const Ye = {
|
|
38
|
-
operator: T.GREATER_THAN,
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var Fe = (i, r, e) => r in i ? pe(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var w = (i, r, e) => Fe(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { isNumeric as we, Disposable as V, Rectangle as Y, mergeSets as Q, Tools as k, extractPureTextFromCell as Se, CellValueType as K, UniverInstanceType as U, fromCallback as ve, CommandType as E, IResourceManagerService as Me, IUniverInstanceService as x, ICommandService as T, Inject as z, DisposableCollection as Ee, moveMatrixArray as ee, Plugin as Oe, Injector as ye, IConfigService as Ae, IUndoRedoService as j, ErrorService as Te, LocaleService as Ne, sequenceExecute as xe } from "@univerjs/core";
|
|
5
|
+
import { SheetInterceptorService as Ie, RefRangeService as $e, SetWorksheetActiveOperation as Pe, CopySheetCommand as Ue, RemoveSheetCommand as be, INTERCEPTOR_POINT as Le, RemoveRowMutation as Be, InsertRowMutation as ze, SetRangeValuesMutation as He, expandToContinuousRange as le, getSheetCommandTarget as L, MoveRowsCommand as De, MoveRangeCommand as We, EffectRefRangId as te, RemoveRowCommand as Ve, RemoveColCommand as je, InsertColCommand as qe, InsertRowCommand as Qe, SheetsSelectionsService as Ge, isSingleCellSelection as Je } from "@univerjs/sheets";
|
|
6
|
+
import { BehaviorSubject as b, merge as Ye, filter as Ke, switchMap as Xe, of as Ze } from "rxjs";
|
|
7
|
+
const ke = "sheets-filter.config", et = {}, ae = "sheet.mutation.set-filter-range", ce = "sheet.mutation.set-filter-criteria", de = "sheet.mutation.remove-filter", ue = "sheet.mutation.re-calc-filter", tt = /* @__PURE__ */ new Set([
|
|
8
|
+
ae,
|
|
9
|
+
ce,
|
|
10
|
+
de,
|
|
11
|
+
ue
|
|
12
|
+
]);
|
|
13
|
+
var N = /* @__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))(N || {});
|
|
14
|
+
const rt = {
|
|
15
|
+
operator: N.GREATER_THAN,
|
|
39
16
|
fn: (i, r) => $(i) ? i > r : !1
|
|
40
|
-
},
|
|
41
|
-
operator:
|
|
17
|
+
}, nt = {
|
|
18
|
+
operator: N.GREATER_THAN_OR_EQUAL,
|
|
42
19
|
fn: (i, r) => $(i) ? i >= r : !1
|
|
43
|
-
},
|
|
44
|
-
operator:
|
|
20
|
+
}, it = {
|
|
21
|
+
operator: N.LESS_THAN,
|
|
45
22
|
fn: (i, r) => $(i) ? i < r : !1
|
|
46
|
-
},
|
|
47
|
-
operator:
|
|
23
|
+
}, st = {
|
|
24
|
+
operator: N.LESS_THAN_OR_EQUAL,
|
|
48
25
|
fn: (i, r) => $(i) ? i <= r : !1
|
|
49
|
-
},
|
|
50
|
-
operator:
|
|
26
|
+
}, ot = {
|
|
27
|
+
operator: N.EQUAL,
|
|
51
28
|
fn: (i, r) => $(i) ? i === r : !1
|
|
52
|
-
},
|
|
53
|
-
operator:
|
|
29
|
+
}, he = {
|
|
30
|
+
operator: N.NOT_EQUALS,
|
|
54
31
|
fn: (i, r) => {
|
|
55
32
|
if (typeof r == "string") {
|
|
56
33
|
if (r === " ")
|
|
57
34
|
return i != null;
|
|
58
|
-
const e =
|
|
59
|
-
return e &&
|
|
35
|
+
const e = me(i);
|
|
36
|
+
return e && dt(r) ? !ge(r).test(e) : e !== r;
|
|
60
37
|
}
|
|
61
38
|
return $(i) ? i !== r : !0;
|
|
62
39
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
40
|
+
}, fe = /* @__PURE__ */ new Map([]), lt = [rt, nt, it, st, ot, he];
|
|
41
|
+
lt.forEach((i) => {
|
|
42
|
+
fe.set(i.operator, i);
|
|
66
43
|
});
|
|
67
|
-
function
|
|
44
|
+
function at(i) {
|
|
68
45
|
return !!i;
|
|
69
46
|
}
|
|
70
|
-
const
|
|
47
|
+
const ct = {
|
|
71
48
|
fn: (i, r) => {
|
|
72
|
-
const e =
|
|
73
|
-
return e === null ? r === "" :
|
|
49
|
+
const e = me(i);
|
|
50
|
+
return e === null ? r === "" : ge(r).test(e);
|
|
74
51
|
}
|
|
75
52
|
};
|
|
76
53
|
function re(i) {
|
|
77
|
-
return i ?
|
|
54
|
+
return i ? fe.get(i) : ct;
|
|
78
55
|
}
|
|
79
56
|
function $(i) {
|
|
80
57
|
return typeof i == "number";
|
|
81
58
|
}
|
|
82
59
|
function ne(i) {
|
|
83
|
-
return !!(typeof i == "number" || typeof i == "string" &&
|
|
60
|
+
return !!(typeof i == "number" || typeof i == "string" && we(i));
|
|
84
61
|
}
|
|
85
|
-
function
|
|
62
|
+
function me(i) {
|
|
86
63
|
return typeof i == "boolean" || i == null ? null : typeof i == "string" ? i : i.toString();
|
|
87
64
|
}
|
|
88
|
-
function
|
|
65
|
+
function dt(i) {
|
|
89
66
|
return typeof i == "number" ? !1 : i.indexOf("*") !== -1 || i.indexOf("?") !== -1;
|
|
90
67
|
}
|
|
91
|
-
function
|
|
68
|
+
function ge(i) {
|
|
92
69
|
const r = i.replace(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("?", ".").replace(/[*]/g, ".$&");
|
|
93
70
|
return new RegExp(`^${r}$`);
|
|
94
71
|
}
|
|
@@ -211,7 +188,7 @@ class D extends V {
|
|
|
211
188
|
if (e > o || e < s)
|
|
212
189
|
throw new Error(`[FilterModel] could not set criteria on column ${e} which is out of range!`);
|
|
213
190
|
let l;
|
|
214
|
-
this._filterColumnByIndex.has(e) ? l = this._filterColumnByIndex.get(e) : (l = new
|
|
191
|
+
this._filterColumnByIndex.has(e) ? l = this._filterColumnByIndex.get(e) : (l = new ut(
|
|
215
192
|
this.unitId,
|
|
216
193
|
this.subUnitId,
|
|
217
194
|
this._worksheet,
|
|
@@ -241,7 +218,7 @@ class D extends V {
|
|
|
241
218
|
}
|
|
242
219
|
}
|
|
243
220
|
}
|
|
244
|
-
class
|
|
221
|
+
class ut extends V {
|
|
245
222
|
constructor(e, t, n, s, o) {
|
|
246
223
|
super();
|
|
247
224
|
w(this, "_filteredOutRows", null);
|
|
@@ -306,7 +283,7 @@ class it extends V {
|
|
|
306
283
|
const { row: a, rowSpan: c, col: h } = l;
|
|
307
284
|
if (o.has(a) && (!c || c === 1))
|
|
308
285
|
continue;
|
|
309
|
-
const d = this._filterByValues ?
|
|
286
|
+
const d = this._filterByValues ? Se(this._worksheet.getCell(a, h)) : pt(this._worksheet, a, h);
|
|
310
287
|
if (!this._filterFn(d) && (s.add(a), c))
|
|
311
288
|
for (let u = 1; u < c; u++)
|
|
312
289
|
s.add(a + u);
|
|
@@ -314,40 +291,40 @@ class it extends V {
|
|
|
314
291
|
return s;
|
|
315
292
|
}
|
|
316
293
|
_generateFilterFn() {
|
|
317
|
-
this._criteria && (this._filterFn =
|
|
294
|
+
this._criteria && (this._filterFn = ht(this._criteria), this._filterByValues = !!this._criteria.filters);
|
|
318
295
|
}
|
|
319
296
|
}
|
|
320
|
-
function
|
|
297
|
+
function ht(i) {
|
|
321
298
|
if (i.filters)
|
|
322
|
-
return
|
|
299
|
+
return ft(i.filters);
|
|
323
300
|
if (i.customFilters)
|
|
324
|
-
return
|
|
301
|
+
return mt(i.customFilters);
|
|
325
302
|
throw new Error("[FilterModel]: other types of filters are not supported yet.");
|
|
326
303
|
}
|
|
327
|
-
function
|
|
304
|
+
function ft(i) {
|
|
328
305
|
const r = !!i.blank, e = new Set(i.filters);
|
|
329
306
|
return (t) => t === void 0 || t === "" ? r : e.has(typeof t == "string" ? t : `${t}`);
|
|
330
307
|
}
|
|
331
|
-
function
|
|
332
|
-
const r = i.customFilters.map((e) =>
|
|
333
|
-
return
|
|
308
|
+
function mt(i) {
|
|
309
|
+
const r = i.customFilters.map((e) => Ct(e));
|
|
310
|
+
return Rt(r) ? i.and ? gt(r) : _t(r) : r[0];
|
|
334
311
|
}
|
|
335
|
-
function
|
|
312
|
+
function gt(i) {
|
|
336
313
|
const [r, e] = i;
|
|
337
314
|
return (t) => r(t) && e(t);
|
|
338
315
|
}
|
|
339
|
-
function
|
|
316
|
+
function _t(i) {
|
|
340
317
|
const [r, e] = i;
|
|
341
318
|
return (t) => r(t) || e(t);
|
|
342
319
|
}
|
|
343
|
-
function
|
|
320
|
+
function Rt(i) {
|
|
344
321
|
return i.length === 2;
|
|
345
322
|
}
|
|
346
|
-
function
|
|
323
|
+
function Ct(i) {
|
|
347
324
|
const r = i.val;
|
|
348
|
-
if (i.operator ===
|
|
349
|
-
return (n) =>
|
|
350
|
-
if (
|
|
325
|
+
if (i.operator === N.NOT_EQUALS && !ne(r))
|
|
326
|
+
return (n) => he.fn(n, r);
|
|
327
|
+
if (at(i.operator)) {
|
|
351
328
|
if (!ne(r)) return () => !1;
|
|
352
329
|
const n = re(i.operator), s = Number(r);
|
|
353
330
|
return (o) => n.fn(o, s);
|
|
@@ -355,7 +332,7 @@ function ut(i) {
|
|
|
355
332
|
const e = re(i.operator);
|
|
356
333
|
return (t) => e.fn(t, r);
|
|
357
334
|
}
|
|
358
|
-
function
|
|
335
|
+
function pt(i, r, e) {
|
|
359
336
|
const t = i.getCell(r, e);
|
|
360
337
|
if (!t) return null;
|
|
361
338
|
const n = i.getCellRaw(r, e);
|
|
@@ -368,17 +345,12 @@ function ie(i) {
|
|
|
368
345
|
const e = i.v;
|
|
369
346
|
return typeof e == "string" ? i.t === K.BOOLEAN ? e.toUpperCase() : e : typeof e == "number" ? i.t === K.BOOLEAN ? e ? "TRUE" : "FALSE" : e : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : "";
|
|
370
347
|
}
|
|
371
|
-
var
|
|
372
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
348
|
+
var Ft = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, St = (i, r, e, t) => {
|
|
349
|
+
for (var n = t > 1 ? void 0 : t ? wt(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
373
350
|
(o = i[s]) && (n = (t ? o(r, e, n) : o(n)) || n);
|
|
374
|
-
return t && n &&
|
|
351
|
+
return t && n && Ft(r, e, n), n;
|
|
375
352
|
}, J = (i, r) => (e, t) => r(e, t, i);
|
|
376
|
-
const
|
|
377
|
-
R.id,
|
|
378
|
-
C.id,
|
|
379
|
-
O.id,
|
|
380
|
-
L.id
|
|
381
|
-
]), he = "SHEET_FILTER_PLUGIN";
|
|
353
|
+
const _e = "SHEET_FILTER_PLUGIN";
|
|
382
354
|
let M = class extends V {
|
|
383
355
|
constructor(r, e, t) {
|
|
384
356
|
super();
|
|
@@ -446,13 +418,13 @@ let M = class extends V {
|
|
|
446
418
|
}
|
|
447
419
|
_initActiveFilterModel() {
|
|
448
420
|
this.disposeWithMe(
|
|
449
|
-
|
|
421
|
+
Ye(
|
|
450
422
|
// source1: executing filter related mutations
|
|
451
|
-
|
|
423
|
+
ve(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(Ke(([r]) => r.type === E.MUTATION && tt.has(r.id))),
|
|
452
424
|
// source2: activate sheet changes
|
|
453
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(U.UNIVER_SHEET).pipe(
|
|
425
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(U.UNIVER_SHEET).pipe(Xe((r) => {
|
|
454
426
|
var e;
|
|
455
|
-
return (e = r == null ? void 0 : r.activeSheet$) != null ? e :
|
|
427
|
+
return (e = r == null ? void 0 : r.activeSheet$) != null ? e : Ze(null);
|
|
456
428
|
}))
|
|
457
429
|
).subscribe(() => this._updateActiveFilterModel())
|
|
458
430
|
);
|
|
@@ -475,7 +447,7 @@ let M = class extends V {
|
|
|
475
447
|
}
|
|
476
448
|
_initModel() {
|
|
477
449
|
this._resourcesManagerService.registerPluginResource({
|
|
478
|
-
pluginName:
|
|
450
|
+
pluginName: _e,
|
|
479
451
|
businesses: [U.UNIVER_SHEET],
|
|
480
452
|
toJson: (r) => this._serializeAutoFiltersForUnit(r),
|
|
481
453
|
parseJson: (r) => JSON.parse(r),
|
|
@@ -492,12 +464,41 @@ let M = class extends V {
|
|
|
492
464
|
this._filterModels.has(r) || this._filterModels.set(r, /* @__PURE__ */ new Map()), this._filterModels.get(r).set(e, t);
|
|
493
465
|
}
|
|
494
466
|
};
|
|
495
|
-
M =
|
|
496
|
-
J(0,
|
|
467
|
+
M = St([
|
|
468
|
+
J(0, Me),
|
|
497
469
|
J(1, x),
|
|
498
|
-
J(2,
|
|
470
|
+
J(2, T)
|
|
499
471
|
], M);
|
|
500
|
-
|
|
472
|
+
const R = {
|
|
473
|
+
id: ae,
|
|
474
|
+
type: E.MUTATION,
|
|
475
|
+
handler: (i, r) => {
|
|
476
|
+
const { subUnitId: e, unitId: t, range: n } = r;
|
|
477
|
+
return i.get(M).ensureFilterModel(t, e).setRange(n), !0;
|
|
478
|
+
}
|
|
479
|
+
}, p = {
|
|
480
|
+
id: ce,
|
|
481
|
+
type: E.MUTATION,
|
|
482
|
+
handler: (i, r) => {
|
|
483
|
+
const { subUnitId: e, unitId: t, criteria: n, col: s, reCalc: o = !0 } = r, a = i.get(M).getFilterModel(t, e);
|
|
484
|
+
return a ? (a.setCriteria(s, n, o), !0) : !1;
|
|
485
|
+
}
|
|
486
|
+
}, O = {
|
|
487
|
+
id: de,
|
|
488
|
+
type: E.MUTATION,
|
|
489
|
+
handler: (i, r) => {
|
|
490
|
+
const { unitId: e, subUnitId: t } = r;
|
|
491
|
+
return i.get(M).removeFilterModel(e, t);
|
|
492
|
+
}
|
|
493
|
+
}, H = {
|
|
494
|
+
id: ue,
|
|
495
|
+
type: E.MUTATION,
|
|
496
|
+
handler: (i, r) => {
|
|
497
|
+
const { unitId: e, subUnitId: t } = r, s = i.get(M).getFilterModel(e, t);
|
|
498
|
+
return s ? (s.reCalc(), !0) : !1;
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
function vt(i, r) {
|
|
501
502
|
for (let e = 0; e < i.length; e++) {
|
|
502
503
|
let t = e;
|
|
503
504
|
if (i[e])
|
|
@@ -507,24 +508,24 @@ function Rt(i, r) {
|
|
|
507
508
|
return i.filter((e) => e !== null);
|
|
508
509
|
}
|
|
509
510
|
function I(i) {
|
|
510
|
-
return
|
|
511
|
+
return vt(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);
|
|
511
512
|
}
|
|
512
|
-
var
|
|
513
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
513
|
+
var Mt = Object.defineProperty, Et = Object.getOwnPropertyDescriptor, Ot = (i, r, e, t) => {
|
|
514
|
+
for (var n = t > 1 ? void 0 : t ? Et(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
514
515
|
(o = i[s]) && (n = (t ? o(r, e, n) : o(n)) || n);
|
|
515
|
-
return t && n &&
|
|
516
|
+
return t && n && Mt(r, e, n), n;
|
|
516
517
|
}, P = (i, r) => (e, t) => r(e, t, i);
|
|
517
518
|
let W = class extends V {
|
|
518
519
|
constructor(r, e, t, n, s) {
|
|
519
520
|
super();
|
|
520
|
-
w(this, "_disposableCollection", new
|
|
521
|
+
w(this, "_disposableCollection", new Ee());
|
|
521
522
|
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();
|
|
522
523
|
}
|
|
523
524
|
_initCommands() {
|
|
524
525
|
[
|
|
525
|
-
|
|
526
|
+
p,
|
|
526
527
|
R,
|
|
527
|
-
|
|
528
|
+
H,
|
|
528
529
|
O
|
|
529
530
|
].forEach((r) => this.disposeWithMe(this._commandService.registerCommand(r)));
|
|
530
531
|
}
|
|
@@ -624,12 +625,12 @@ let W = class extends V {
|
|
|
624
625
|
startColumn: a <= o ? o + h : o,
|
|
625
626
|
endColumn: l + h
|
|
626
627
|
}
|
|
627
|
-
},
|
|
628
|
+
}, C = {
|
|
628
629
|
unitId: e,
|
|
629
630
|
subUnitId: t,
|
|
630
631
|
range: s
|
|
631
632
|
};
|
|
632
|
-
d.push({ id: R.id, params: g }), u.push({ id: R.id, params:
|
|
633
|
+
d.push({ id: R.id, params: g }), u.push({ id: R.id, params: C });
|
|
633
634
|
const F = n.getAllFilterColumns().filter((f) => f[0] >= m);
|
|
634
635
|
if (F.length !== 0) {
|
|
635
636
|
const { newRange: f, oldRange: v } = this.moveCriteria(e, t, F, h);
|
|
@@ -638,8 +639,8 @@ let W = class extends V {
|
|
|
638
639
|
return { redos: I(d), undos: I(u) };
|
|
639
640
|
}
|
|
640
641
|
_handleInsertRowCommand(r, e, t) {
|
|
641
|
-
var
|
|
642
|
-
const n = this._sheetsFilterService.getFilterModel(e, t), s = (
|
|
642
|
+
var C;
|
|
643
|
+
const n = this._sheetsFilterService.getFilterModel(e, t), s = (C = n == null ? void 0 : n.getRange()) != null ? C : null;
|
|
643
644
|
if (!n || !s)
|
|
644
645
|
return this._handleNull();
|
|
645
646
|
const { startRow: o, endRow: l } = s, { startRow: a, endRow: c } = r.range, h = c - a + 1;
|
|
@@ -674,15 +675,15 @@ let W = class extends V {
|
|
|
674
675
|
const h = [], d = [], u = c < o ? 0 : Math.min(c, l) - Math.max(a, o) + 1, m = c - a + 1, g = n.getAllFilterColumns();
|
|
675
676
|
g.forEach((_) => {
|
|
676
677
|
const [f, v] = _;
|
|
677
|
-
f <= c && f >= a && (h.push({ id:
|
|
678
|
+
f <= c && f >= a && (h.push({ id: p.id, params: { unitId: e, subUnitId: t, col: f, criteria: null } }), d.push({ id: p.id, params: { unitId: e, subUnitId: t, col: f, criteria: { ...v.serialize(), colId: f } } }));
|
|
678
679
|
});
|
|
679
|
-
const
|
|
680
|
+
const C = g.filter((_) => {
|
|
680
681
|
const [f, v] = _;
|
|
681
682
|
return f > c;
|
|
682
683
|
});
|
|
683
684
|
let S = { undos: [], redos: [] };
|
|
684
|
-
if (
|
|
685
|
-
const { oldRange: _, newRange: f } = this.moveCriteria(e, t,
|
|
685
|
+
if (C.length > 0) {
|
|
686
|
+
const { oldRange: _, newRange: f } = this.moveCriteria(e, t, C, -m);
|
|
686
687
|
S = f, h.push(..._.redos), d.unshift(..._.undos);
|
|
687
688
|
}
|
|
688
689
|
if (u === l - o + 1) {
|
|
@@ -705,7 +706,7 @@ let W = class extends V {
|
|
|
705
706
|
};
|
|
706
707
|
}
|
|
707
708
|
_handleRemoveRowCommand(r, e, t) {
|
|
708
|
-
var
|
|
709
|
+
var C;
|
|
709
710
|
const n = this._sheetsFilterService.getFilterModel(e, t);
|
|
710
711
|
if (!n)
|
|
711
712
|
return this._handleNull();
|
|
@@ -743,10 +744,10 @@ let W = class extends V {
|
|
|
743
744
|
col: _,
|
|
744
745
|
criteria: { ...f.serialize(), colId: _ }
|
|
745
746
|
};
|
|
746
|
-
d.push({ id:
|
|
747
|
+
d.push({ id: p.id, params: v });
|
|
747
748
|
});
|
|
748
749
|
} else {
|
|
749
|
-
const S = (
|
|
750
|
+
const S = (C = this._univerInstanceService.getUniverSheetInstance(e)) == null ? void 0 : C.getSheetBySheetId(t);
|
|
750
751
|
if (!S)
|
|
751
752
|
return this._handleNull();
|
|
752
753
|
const F = [];
|
|
@@ -786,8 +787,8 @@ let W = class extends V {
|
|
|
786
787
|
ee(a.startColumn, a.endColumn - a.startColumn + 1, c.startColumn, u);
|
|
787
788
|
let m = s.startColumn, g = s.endColumn;
|
|
788
789
|
o >= a.startColumn && o <= a.endColumn && c.startColumn > a.startColumn && a.endColumn < l && (m = a.endColumn + 1), l >= a.startColumn && l <= a.endColumn && c.startColumn < a.startColumn && a.startColumn > o && (g = a.startColumn - 1);
|
|
789
|
-
const
|
|
790
|
-
if (
|
|
790
|
+
const C = Object.keys(u).map((f) => Number(f)), S = C.find((f) => u[f].colIndex === g), F = C.find((f) => u[f].colIndex === m);
|
|
791
|
+
if (C.forEach((f) => {
|
|
791
792
|
var X, Z;
|
|
792
793
|
const { colIndex: v, filter: y } = u[f], A = f;
|
|
793
794
|
if (y) {
|
|
@@ -797,13 +798,13 @@ let W = class extends V {
|
|
|
797
798
|
subUnitId: t,
|
|
798
799
|
col: A,
|
|
799
800
|
criteria: { ...y.serialize(), colId: A }
|
|
800
|
-
},
|
|
801
|
+
}, Ce = {
|
|
801
802
|
unitId: e,
|
|
802
803
|
subUnitId: t,
|
|
803
804
|
col: A,
|
|
804
805
|
criteria: n.getFilterColumn(A) ? { ...(X = n.getFilterColumn(A)) == null ? void 0 : X.serialize(), colId: A } : null
|
|
805
806
|
};
|
|
806
|
-
h.push({ id:
|
|
807
|
+
h.push({ id: p.id, params: q }), d.push({ id: p.id, params: Ce });
|
|
807
808
|
}
|
|
808
809
|
if (!((Z = u[v]) != null && Z.filter)) {
|
|
809
810
|
const q = {
|
|
@@ -812,7 +813,7 @@ let W = class extends V {
|
|
|
812
813
|
col: v,
|
|
813
814
|
criteria: null
|
|
814
815
|
};
|
|
815
|
-
h.push({ id:
|
|
816
|
+
h.push({ id: p.id, params: q }), d.push({ id: p.id, params: { unitId: e, subUnitId: t, col: v, criteria: { ...y.serialize(), colId: v } } });
|
|
816
817
|
}
|
|
817
818
|
}
|
|
818
819
|
}), o !== F || l !== S) {
|
|
@@ -848,7 +849,7 @@ let W = class extends V {
|
|
|
848
849
|
const m = o;
|
|
849
850
|
let g = l;
|
|
850
851
|
l >= a.startRow && l <= a.endRow && c.startRow < a.startRow && a.startRow > o && (g = a.startRow - 1), ee(a.startRow, a.endRow - a.startRow + 1, c.startRow, u);
|
|
851
|
-
const
|
|
852
|
+
const C = Object.keys(u).map((f) => Number(f)), S = C.find((f) => u[f].oldIndex === g), F = C.find((f) => u[f].oldIndex === m);
|
|
852
853
|
if (o !== F || l !== S) {
|
|
853
854
|
const f = {
|
|
854
855
|
unitId: e,
|
|
@@ -859,7 +860,7 @@ let W = class extends V {
|
|
|
859
860
|
endRow: S
|
|
860
861
|
}
|
|
861
862
|
};
|
|
862
|
-
h.push({ id: R.id, params: f }, { id:
|
|
863
|
+
h.push({ id: R.id, params: f }, { id: H.id, params: { unitId: e, subUnitId: t } }), d.push({ id: R.id, params: { range: s, unitId: e, subUnitId: t } }, { id: H.id, params: { unitId: e, subUnitId: t } });
|
|
863
864
|
}
|
|
864
865
|
return {
|
|
865
866
|
redos: h,
|
|
@@ -886,12 +887,12 @@ let W = class extends V {
|
|
|
886
887
|
unitId: e,
|
|
887
888
|
subUnitId: t
|
|
888
889
|
}
|
|
889
|
-
}, g = { id: R.id, params: { unitId: e, subUnitId: t, range: u } },
|
|
890
|
-
a.push(m, g), c.push(m,
|
|
890
|
+
}, g = { id: R.id, params: { unitId: e, subUnitId: t, range: u } }, C = { id: R.id, params: { unitId: e, subUnitId: t, range: l } };
|
|
891
|
+
a.push(m, g), c.push(m, C);
|
|
891
892
|
const S = o.getAllFilterColumns(), F = s.startColumn - n.startColumn;
|
|
892
893
|
S.forEach((_) => {
|
|
893
894
|
const [f, v] = _;
|
|
894
|
-
v && (a.push({ id:
|
|
895
|
+
v && (a.push({ id: p.id, params: { unitId: e, subUnitId: t, col: f + F, criteria: { ...v.serialize(), colId: f + F } } }), c.push({ id: p.id, params: { unitId: e, subUnitId: t, col: f, criteria: { ...v.serialize(), colId: f } } }));
|
|
895
896
|
});
|
|
896
897
|
} else if (Y.intersects(s, l)) {
|
|
897
898
|
const h = {
|
|
@@ -914,7 +915,7 @@ let W = class extends V {
|
|
|
914
915
|
return this._handleNull();
|
|
915
916
|
const o = [], l = [];
|
|
916
917
|
return n.getAllFilterColumns().forEach(([c, h]) => {
|
|
917
|
-
l.push({ id:
|
|
918
|
+
l.push({ id: p.id, params: { unitId: e, subUnitId: t, col: c, criteria: { ...h.serialize(), colId: c } } });
|
|
918
919
|
}), o.push({ id: O.id, params: { unitId: e, subUnitId: t, range: s } }), l.unshift({ id: R.id, params: { range: s, unitId: e, subUnitId: t } }), {
|
|
919
920
|
undos: l,
|
|
920
921
|
redos: o
|
|
@@ -929,7 +930,7 @@ let W = class extends V {
|
|
|
929
930
|
return this._handleNull();
|
|
930
931
|
const o = [], l = [], a = [], c = [];
|
|
931
932
|
return n.getAllFilterColumns().forEach(([d, u]) => {
|
|
932
|
-
o.push({ id:
|
|
933
|
+
o.push({ id: p.id, params: { unitId: r, subUnitId: t, col: d, criteria: { ...u.serialize(), colId: d } } }), a.push({ id: p.id, params: { unitId: r, subUnitId: t, col: d, criteria: null } });
|
|
933
934
|
}), a.push({ id: O.id, params: { unitId: r, subUnitId: t, range: s } }), o.unshift({ id: R.id, params: { range: s, unitId: r, subUnitId: t } }), {
|
|
934
935
|
undos: l,
|
|
935
936
|
redos: o,
|
|
@@ -962,13 +963,13 @@ let W = class extends V {
|
|
|
962
963
|
return t.forEach((h) => {
|
|
963
964
|
const [d, u] = h;
|
|
964
965
|
l.push({
|
|
965
|
-
id:
|
|
966
|
+
id: p.id,
|
|
966
967
|
params: {
|
|
967
968
|
...s,
|
|
968
969
|
col: d
|
|
969
970
|
}
|
|
970
971
|
}), o.push({
|
|
971
|
-
id:
|
|
972
|
+
id: p.id,
|
|
972
973
|
params: {
|
|
973
974
|
...s,
|
|
974
975
|
col: d,
|
|
@@ -978,14 +979,14 @@ let W = class extends V {
|
|
|
978
979
|
}), t.forEach((h) => {
|
|
979
980
|
const [d, u] = h;
|
|
980
981
|
c.push({
|
|
981
|
-
id:
|
|
982
|
+
id: p.id,
|
|
982
983
|
params: {
|
|
983
984
|
...s,
|
|
984
985
|
col: d + n,
|
|
985
986
|
criteria: { ...u.serialize(), colId: d + n }
|
|
986
987
|
}
|
|
987
988
|
}), a.push({
|
|
988
|
-
id:
|
|
989
|
+
id: p.id,
|
|
989
990
|
params: {
|
|
990
991
|
...s,
|
|
991
992
|
col: d + n,
|
|
@@ -1016,8 +1017,8 @@ let W = class extends V {
|
|
|
1016
1017
|
if (g < d)
|
|
1017
1018
|
l.push(g);
|
|
1018
1019
|
else if (a = !0, g <= u) {
|
|
1019
|
-
const
|
|
1020
|
-
l.push(
|
|
1020
|
+
const C = Math.max(d, l.length ? l[l.length - 1] + 1 : d);
|
|
1021
|
+
l.push(C);
|
|
1021
1022
|
} else
|
|
1022
1023
|
l.push(g - (u - d + 1 - m.length));
|
|
1023
1024
|
});
|
|
@@ -1036,9 +1037,9 @@ let W = class extends V {
|
|
|
1036
1037
|
for (let m = d.startColumn; m <= d.endColumn; m++) {
|
|
1037
1038
|
const g = (c = u == null ? void 0 : u[d.startRow]) == null ? void 0 : c[m];
|
|
1038
1039
|
if (g && this._cellHasValue(g)) {
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1041
|
-
const S = le(d, { down: !0 },
|
|
1040
|
+
const C = (h = this._univerInstanceService.getUnit(t)) == null ? void 0 : h.getSheetBySheetId(n);
|
|
1041
|
+
if (C) {
|
|
1042
|
+
const S = le(d, { down: !0 }, C), F = this._sheetsFilterService.getFilterModel(t, n), _ = F.getRange();
|
|
1042
1043
|
F.setRange({
|
|
1043
1044
|
..._,
|
|
1044
1045
|
endRow: S.endRow
|
|
@@ -1074,7 +1075,7 @@ let W = class extends V {
|
|
|
1074
1075
|
}
|
|
1075
1076
|
_initErrorHandling() {
|
|
1076
1077
|
this.disposeWithMe(this._commandService.beforeCommandExecuted((r) => {
|
|
1077
|
-
const e = r.params, t =
|
|
1078
|
+
const e = r.params, t = L(this._univerInstanceService);
|
|
1078
1079
|
if (!t) return;
|
|
1079
1080
|
const { subUnitId: n, unitId: s } = t, o = this._sheetsFilterService.getFilterModel(s, n);
|
|
1080
1081
|
if (!o) return;
|
|
@@ -1088,24 +1089,23 @@ let W = class extends V {
|
|
|
1088
1089
|
return !(e.length === 0 || e.every((t) => t == null));
|
|
1089
1090
|
}
|
|
1090
1091
|
};
|
|
1091
|
-
W =
|
|
1092
|
-
P(0,
|
|
1093
|
-
P(1,
|
|
1094
|
-
P(2,
|
|
1092
|
+
W = Ot([
|
|
1093
|
+
P(0, T),
|
|
1094
|
+
P(1, z(Ie)),
|
|
1095
|
+
P(2, z(M)),
|
|
1095
1096
|
P(3, x),
|
|
1096
|
-
P(4,
|
|
1097
|
+
P(4, z($e))
|
|
1097
1098
|
], W);
|
|
1098
|
-
|
|
1099
|
-
var
|
|
1100
|
-
for (var n = t > 1 ? void 0 : t ? Mt(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
1099
|
+
var yt = Object.defineProperty, At = Object.getOwnPropertyDescriptor, Tt = (i, r, e, t) => {
|
|
1100
|
+
for (var n = t > 1 ? void 0 : t ? At(r, e) : r, s = i.length - 1, o; s >= 0; s--)
|
|
1101
1101
|
(o = i[s]) && (n = (t ? o(r, e, n) : o(n)) || n);
|
|
1102
|
-
return t && n &&
|
|
1103
|
-
}, se = (i, r) => (e, t) => r(e, t, i),
|
|
1104
|
-
let oe = (
|
|
1105
|
-
constructor(i =
|
|
1102
|
+
return t && n && yt(r, e, n), n;
|
|
1103
|
+
}, se = (i, r) => (e, t) => r(e, t, i), B;
|
|
1104
|
+
let oe = (B = class extends Oe {
|
|
1105
|
+
constructor(i = et, r, e) {
|
|
1106
1106
|
super(), this._config = i, this._injector = r, this._configService = e;
|
|
1107
1107
|
const { ...t } = this._config;
|
|
1108
|
-
this._configService.setConfig(
|
|
1108
|
+
this._configService.setConfig(ke, t);
|
|
1109
1109
|
}
|
|
1110
1110
|
onStarting() {
|
|
1111
1111
|
[
|
|
@@ -1116,19 +1116,19 @@ let oe = (z = class extends Se {
|
|
|
1116
1116
|
onReady() {
|
|
1117
1117
|
this._injector.get(W);
|
|
1118
1118
|
}
|
|
1119
|
-
}, w(
|
|
1120
|
-
oe =
|
|
1121
|
-
se(1,
|
|
1122
|
-
se(2,
|
|
1119
|
+
}, w(B, "type", U.UNIVER_SHEET), w(B, "pluginName", _e), B);
|
|
1120
|
+
oe = Tt([
|
|
1121
|
+
se(1, z(ye)),
|
|
1122
|
+
se(2, Ae)
|
|
1123
1123
|
], oe);
|
|
1124
|
-
const
|
|
1124
|
+
const Nt = {
|
|
1125
1125
|
id: "sheet.command.set-filter-range",
|
|
1126
1126
|
type: E.COMMAND,
|
|
1127
1127
|
handler: (i, r) => {
|
|
1128
|
-
const e = i.get(M), t = i.get(
|
|
1129
|
-
if (!
|
|
1128
|
+
const e = i.get(M), t = i.get(T), n = i.get(j), s = i.get(x), { unitId: o, subUnitId: l, range: a } = r;
|
|
1129
|
+
if (!L(s, r) || e.getFilterModel(o, l)) return !1;
|
|
1130
1130
|
if (a.endRow === a.startRow) {
|
|
1131
|
-
const m = i.get(
|
|
1131
|
+
const m = i.get(Te), g = i.get(Ne);
|
|
1132
1132
|
return m.emit(g.t("sheets-filter.command.not-valid-filter-range")), !1;
|
|
1133
1133
|
}
|
|
1134
1134
|
const d = { id: R.id, params: { unitId: o, subUnitId: l, range: a } }, u = t.syncExecuteCommand(d.id, d.params);
|
|
@@ -1138,49 +1138,49 @@ const Ot = {
|
|
|
1138
1138
|
redoMutations: [d]
|
|
1139
1139
|
}), u;
|
|
1140
1140
|
}
|
|
1141
|
-
},
|
|
1141
|
+
}, xt = {
|
|
1142
1142
|
id: "sheet.command.remove-sheet-filter",
|
|
1143
1143
|
type: E.COMMAND,
|
|
1144
1144
|
handler: (i, r) => {
|
|
1145
|
-
const e = i.get(x), t = i.get(M), n = i.get(
|
|
1145
|
+
const e = i.get(x), t = i.get(M), n = i.get(T), s = i.get(j), o = L(e, r);
|
|
1146
1146
|
if (!o) return !1;
|
|
1147
1147
|
const { unitId: l, subUnitId: a } = o, c = t.getFilterModel(l, a);
|
|
1148
1148
|
if (!c) return !1;
|
|
1149
|
-
const h = c == null ? void 0 : c.serialize(), d =
|
|
1149
|
+
const h = c == null ? void 0 : c.serialize(), d = It(l, a, h), u = n.syncExecuteCommand(O.id, { unitId: l, subUnitId: a });
|
|
1150
1150
|
return u && s.pushUndoRedo({
|
|
1151
1151
|
unitID: l,
|
|
1152
1152
|
undoMutations: d,
|
|
1153
1153
|
redoMutations: [{ id: O.id, params: { unitId: l, subUnitId: a } }]
|
|
1154
1154
|
}), u;
|
|
1155
1155
|
}
|
|
1156
|
-
},
|
|
1156
|
+
}, zt = {
|
|
1157
1157
|
id: "sheet.command.smart-toggle-filter",
|
|
1158
1158
|
type: E.COMMAND,
|
|
1159
1159
|
handler: async (i) => {
|
|
1160
|
-
const r = i.get(x), e = i.get(M), t = i.get(
|
|
1160
|
+
const r = i.get(x), e = i.get(M), t = i.get(T), n = r.getCurrentUnitForType(U.UNIVER_SHEET), s = n == null ? void 0 : n.getActiveSheet();
|
|
1161
1161
|
if (!s || !n) return !1;
|
|
1162
1162
|
const o = n.getUnitId(), l = s.getSheetId();
|
|
1163
1163
|
if (e.getFilterModel(o, l))
|
|
1164
|
-
return t.executeCommand(
|
|
1164
|
+
return t.executeCommand(xt.id, { unitId: o, subUnitId: l });
|
|
1165
1165
|
const h = i.get(Ge).getCurrentLastSelection();
|
|
1166
1166
|
if (!h) return !1;
|
|
1167
1167
|
const d = h.range, u = Je(h) ? le(d, { left: !0, right: !0, up: !0, down: !0 }, s) : d;
|
|
1168
|
-
return t.executeCommand(
|
|
1168
|
+
return t.executeCommand(Nt.id, {
|
|
1169
1169
|
unitId: o,
|
|
1170
1170
|
subUnitId: l,
|
|
1171
1171
|
range: u
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
|
-
},
|
|
1174
|
+
}, Ht = {
|
|
1175
1175
|
id: "sheet.command.set-filter-criteria",
|
|
1176
1176
|
type: E.COMMAND,
|
|
1177
1177
|
handler: async (i, r) => {
|
|
1178
|
-
const e = i.get(M), t = i.get(
|
|
1178
|
+
const e = i.get(M), t = i.get(T), n = i.get(j), { unitId: s, subUnitId: o, col: l, criteria: a } = r, c = e.getFilterModel(s, o);
|
|
1179
1179
|
if (!c) return !1;
|
|
1180
1180
|
const h = c.getRange();
|
|
1181
1181
|
if (!h || l < h.startColumn || l > h.endColumn) return !1;
|
|
1182
|
-
const d = c.getFilterColumn(l), u =
|
|
1183
|
-
id:
|
|
1182
|
+
const d = c.getFilterColumn(l), u = Pt(s, o, l, d), m = {
|
|
1183
|
+
id: p.id,
|
|
1184
1184
|
params: {
|
|
1185
1185
|
unitId: s,
|
|
1186
1186
|
subUnitId: o,
|
|
@@ -1194,32 +1194,32 @@ const Ot = {
|
|
|
1194
1194
|
redoMutations: [m]
|
|
1195
1195
|
}), g;
|
|
1196
1196
|
}
|
|
1197
|
-
},
|
|
1197
|
+
}, Dt = {
|
|
1198
1198
|
id: "sheet.command.clear-filter-criteria",
|
|
1199
1199
|
type: E.COMMAND,
|
|
1200
1200
|
handler: (i, r) => {
|
|
1201
|
-
const e = i.get(M), t = i.get(j), n = i.get(
|
|
1201
|
+
const e = i.get(M), t = i.get(j), n = i.get(T), s = i.get(x), o = L(s, r);
|
|
1202
1202
|
if (!o) return !1;
|
|
1203
1203
|
const { unitId: l, subUnitId: a } = o, c = e.getFilterModel(o.unitId, o.subUnitId);
|
|
1204
1204
|
if (!c) return !1;
|
|
1205
|
-
const h = c.serialize(), d =
|
|
1206
|
-
return
|
|
1205
|
+
const h = c.serialize(), d = Re(l, a, h), u = $t(l, a, h);
|
|
1206
|
+
return xe(u, n).result ? (t.pushUndoRedo({
|
|
1207
1207
|
unitID: l,
|
|
1208
1208
|
undoMutations: d,
|
|
1209
1209
|
redoMutations: u
|
|
1210
1210
|
}), !0) : !1;
|
|
1211
1211
|
}
|
|
1212
|
-
},
|
|
1212
|
+
}, Wt = {
|
|
1213
1213
|
id: "sheet.command.re-calc-filter",
|
|
1214
1214
|
type: E.COMMAND,
|
|
1215
1215
|
handler: (i, r) => {
|
|
1216
|
-
const e = i.get(M), t = i.get(
|
|
1216
|
+
const e = i.get(M), t = i.get(T), n = i.get(x), s = L(n, r);
|
|
1217
1217
|
if (!s) return !1;
|
|
1218
1218
|
const { unitId: o, subUnitId: l } = s;
|
|
1219
|
-
return e.getFilterModel(s.unitId, s.subUnitId) ? t.executeCommand(
|
|
1219
|
+
return e.getFilterModel(s.unitId, s.subUnitId) ? t.executeCommand(H.id, { unitId: o, subUnitId: l }) : !1;
|
|
1220
1220
|
}
|
|
1221
1221
|
};
|
|
1222
|
-
function
|
|
1222
|
+
function It(i, r, e) {
|
|
1223
1223
|
const t = [], n = {
|
|
1224
1224
|
id: R.id,
|
|
1225
1225
|
params: {
|
|
@@ -1228,14 +1228,14 @@ function At(i, r, e) {
|
|
|
1228
1228
|
range: e.ref
|
|
1229
1229
|
}
|
|
1230
1230
|
};
|
|
1231
|
-
return t.push(n),
|
|
1231
|
+
return t.push(n), Re(i, r, e).forEach((o) => t.push(o)), t;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function Re(i, r, e) {
|
|
1234
1234
|
var n;
|
|
1235
1235
|
const t = [];
|
|
1236
1236
|
return (n = e.filterColumns) == null || n.forEach((s) => {
|
|
1237
1237
|
const o = {
|
|
1238
|
-
id:
|
|
1238
|
+
id: p.id,
|
|
1239
1239
|
params: {
|
|
1240
1240
|
unitId: i,
|
|
1241
1241
|
subUnitId: r,
|
|
@@ -1246,12 +1246,12 @@ function fe(i, r, e) {
|
|
|
1246
1246
|
t.push(o);
|
|
1247
1247
|
}), t;
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function $t(i, r, e) {
|
|
1250
1250
|
var n;
|
|
1251
1251
|
const t = [];
|
|
1252
1252
|
return (n = e.filterColumns) == null || n.forEach((s) => {
|
|
1253
1253
|
const o = {
|
|
1254
|
-
id:
|
|
1254
|
+
id: p.id,
|
|
1255
1255
|
params: {
|
|
1256
1256
|
unitId: i,
|
|
1257
1257
|
subUnitId: r,
|
|
@@ -1262,10 +1262,10 @@ function Nt(i, r, e) {
|
|
|
1262
1262
|
t.push(o);
|
|
1263
1263
|
}), t;
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function Pt(i, r, e, t) {
|
|
1266
1266
|
if (!t)
|
|
1267
1267
|
return {
|
|
1268
|
-
id:
|
|
1268
|
+
id: p.id,
|
|
1269
1269
|
params: {
|
|
1270
1270
|
unitId: i,
|
|
1271
1271
|
subUnitId: r,
|
|
@@ -1275,7 +1275,7 @@ function Tt(i, r, e, t) {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
const n = t.serialize();
|
|
1277
1277
|
return {
|
|
1278
|
-
id:
|
|
1278
|
+
id: p.id,
|
|
1279
1279
|
params: {
|
|
1280
1280
|
unitId: i,
|
|
1281
1281
|
subUnitId: r,
|
|
@@ -1285,28 +1285,28 @@ function Tt(i, r, e, t) {
|
|
|
1285
1285
|
};
|
|
1286
1286
|
}
|
|
1287
1287
|
export {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1288
|
+
Dt as ClearSheetsFilterCriteriaCommand,
|
|
1289
|
+
N as CustomFilterOperator,
|
|
1290
|
+
tt as FILTER_MUTATIONS,
|
|
1291
|
+
ut as FilterColumn,
|
|
1292
1292
|
D as FilterModel,
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1293
|
+
Wt as ReCalcSheetsFilterCommand,
|
|
1294
|
+
H as ReCalcSheetsFilterMutation,
|
|
1295
|
+
xt as RemoveSheetFilterCommand,
|
|
1296
1296
|
O as RemoveSheetsFilterMutation,
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1297
|
+
_e as SHEET_FILTER_SNAPSHOT_ID,
|
|
1298
|
+
Nt as SetSheetFilterRangeCommand,
|
|
1299
|
+
Ht as SetSheetsFilterCriteriaCommand,
|
|
1300
|
+
p as SetSheetsFilterCriteriaMutation,
|
|
1301
1301
|
R as SetSheetsFilterRangeMutation,
|
|
1302
1302
|
M as SheetsFilterService,
|
|
1303
|
-
|
|
1303
|
+
zt as SmartToggleSheetsFilterCommand,
|
|
1304
1304
|
oe as UniverSheetsFilterPlugin,
|
|
1305
|
-
|
|
1305
|
+
ot as equals,
|
|
1306
1306
|
re as getCustomFilterFn,
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1307
|
+
rt as greaterThan,
|
|
1308
|
+
nt as greaterThanOrEqualTo,
|
|
1309
|
+
it as lessThan,
|
|
1310
|
+
st as lessThanOrEqualTo,
|
|
1311
|
+
he as notEquals
|
|
1312
1312
|
};
|