@univerjs/sheets-sort-ui 0.8.0-beta.0 → 0.8.0-nightly.202505271607
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 +304 -304
- package/lib/index.js +304 -304
- package/lib/types/controllers/sheets-sort.menu.d.ts +5 -5
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var K = (e, t, n) =>
|
|
4
|
-
import { LocaleService as P, IUniverInstanceService as
|
|
5
|
-
import { SheetsSortService as
|
|
1
|
+
var Be = Object.defineProperty;
|
|
2
|
+
var Fe = (e, t, n) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var K = (e, t, n) => Fe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { LocaleService as P, IUniverInstanceService as xe, ILogService as Ve, Inject as R, ICommandService as _e, Disposable as Ge, UniverInstanceType as Y, Tools as We, LocaleType as J, CommandType as M, throttle as ze, Injector as Ie, RxDisposable as Ye, DependentOn as qe, IConfigService as Xe, Plugin as Ke, merge as Je } from "@univerjs/core";
|
|
5
|
+
import { SheetsSortService as we, SortType as U, SortRangeCommand as Qe, UniverSheetsSortPlugin as et } from "@univerjs/sheets-sort";
|
|
6
6
|
import { serializeRange as tt } from "@univerjs/engine-formula";
|
|
7
|
-
import { getCurrentRangeDisable$ as N, getCurrentExclusiveRangeInterest$ as rt, SheetsRenderService as nt, SheetsUIPart as
|
|
8
|
-
import { useDependency as E, IConfirmService as
|
|
9
|
-
import { BehaviorSubject as
|
|
10
|
-
import { jsxs as
|
|
11
|
-
import { SheetsSelectionsService as St, getPrimaryForRange as pt, SetSelectionsOperation as yt, expandToContinuousRange as fe, getSheetCommandTarget as
|
|
12
|
-
import { RadioGroup as
|
|
13
|
-
import { forwardRef as y, useRef as Ee, createElement as
|
|
14
|
-
const
|
|
7
|
+
import { getCurrentRangeDisable$ as N, getCurrentExclusiveRangeInterest$ as rt, SheetsRenderService as nt, SheetsUIPart as ot } from "@univerjs/sheets-ui";
|
|
8
|
+
import { useDependency as E, IConfirmService as it, useObservable as st, MenuItemType as S, getMenuHiddenObservable as Me, ContextMenuPosition as ct, ContextMenuGroup as at, RibbonDataGroup as lt, IMenuManagerService as dt, IDialogService as ut, ILayoutService as ht, IUIPartsService as gt, ComponentManager as Ct, connectInjector as vt } from "@univerjs/ui";
|
|
9
|
+
import { BehaviorSubject as mt, takeUntil as ft } from "rxjs";
|
|
10
|
+
import { jsxs as C, jsx as c } from "react/jsx-runtime";
|
|
11
|
+
import { SheetsSelectionsService as St, getPrimaryForRange as pt, SetSelectionsOperation as yt, expandToContinuousRange as fe, getSheetCommandTarget as xt, RangeProtectionPermissionEditPoint as k, WorksheetSortPermission as L, WorksheetEditPermission as D, WorkbookEditablePermission as H } from "@univerjs/sheets";
|
|
12
|
+
import { RadioGroup as Re, Radio as V, Checkbox as _t, DraggableList as It, Button as G, Dropdown as wt, ButtonGroup as Mt } from "@univerjs/design";
|
|
13
|
+
import { forwardRef as y, useRef as Ee, createElement as x, useState as Z, useCallback as O, useEffect as be } from "react";
|
|
14
|
+
const Rt = "sheets-sort-ui.config", Se = {};
|
|
15
15
|
var f = function() {
|
|
16
16
|
return f = Object.assign || function(e) {
|
|
17
17
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
18
18
|
t = arguments[n];
|
|
19
|
-
for (var
|
|
19
|
+
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
}, f.apply(this, arguments);
|
|
@@ -24,171 +24,171 @@ var f = function() {
|
|
|
24
24
|
var n = {};
|
|
25
25
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
26
26
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
27
|
-
for (var
|
|
28
|
-
t.indexOf(r[
|
|
27
|
+
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
28
|
+
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
29
29
|
return n;
|
|
30
|
-
},
|
|
31
|
-
var n = e.icon, r = e.id,
|
|
32
|
-
return
|
|
30
|
+
}, _ = y(function(e, t) {
|
|
31
|
+
var n = e.icon, r = e.id, o = e.className, i = e.extend, s = Et(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = Ee("_".concat(Ot()));
|
|
32
|
+
return Te(n, "".concat(r), { defIds: n.defIds, idSuffix: l.current }, f({ ref: t, className: a }, s), i);
|
|
33
33
|
});
|
|
34
|
-
function
|
|
35
|
-
return
|
|
36
|
-
return
|
|
34
|
+
function Te(e, t, n, r, o) {
|
|
35
|
+
return x(e.tag, f(f({ key: t }, bt(e, n, o)), r), (Tt(e, n).children || []).map(function(i, s) {
|
|
36
|
+
return Te(i, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, o);
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function bt(e, t, n) {
|
|
40
40
|
var r = f({}, e.attrs);
|
|
41
|
-
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(function(
|
|
42
|
-
var
|
|
43
|
-
|
|
41
|
+
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(function(i) {
|
|
42
|
+
var s = i[0], a = i[1];
|
|
43
|
+
s === "mask" && typeof a == "string" && (r[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
44
44
|
});
|
|
45
|
-
var
|
|
46
|
-
return !
|
|
47
|
-
var
|
|
48
|
-
typeof a == "string" && (r[
|
|
45
|
+
var o = t.defIds;
|
|
46
|
+
return !o || o.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(function(i) {
|
|
47
|
+
var s = i[0], a = i[1];
|
|
48
|
+
typeof a == "string" && (r[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
49
49
|
})), r;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Tt(e, t) {
|
|
52
52
|
var n, r = t.defIds;
|
|
53
|
-
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? f(f({}, e), { children: e.children.map(function(
|
|
54
|
-
return typeof
|
|
53
|
+
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? f(f({}, e), { children: e.children.map(function(o) {
|
|
54
|
+
return typeof o.attrs.id == "string" && r && r.indexOf(o.attrs.id) > -1 ? f(f({}, o), { attrs: f(f({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
55
55
|
}) }) : e;
|
|
56
56
|
}
|
|
57
57
|
function Ot() {
|
|
58
58
|
return Math.random().toString(36).substring(2, 8);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
var Nt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.
|
|
62
|
-
return _
|
|
63
|
-
id: "ascending-
|
|
60
|
+
_.displayName = "UniverIcon";
|
|
61
|
+
var Nt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ee = y(function(e, t) {
|
|
62
|
+
return x(_, Object.assign({}, e, {
|
|
63
|
+
id: "ascending-icon",
|
|
64
64
|
ref: t,
|
|
65
65
|
icon: Nt
|
|
66
66
|
}));
|
|
67
67
|
});
|
|
68
|
-
ee.displayName = "
|
|
69
|
-
var kt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oe = y(function(e, t) {
|
|
70
|
-
return _
|
|
71
|
-
id: "check-mark-
|
|
68
|
+
ee.displayName = "AscendingIcon";
|
|
69
|
+
var kt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oe = y(function(e, t) {
|
|
70
|
+
return x(_, Object.assign({}, e, {
|
|
71
|
+
id: "check-mark-icon",
|
|
72
72
|
ref: t,
|
|
73
73
|
icon: kt
|
|
74
74
|
}));
|
|
75
75
|
});
|
|
76
|
-
Oe.displayName = "
|
|
77
|
-
var Lt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.
|
|
78
|
-
return _
|
|
79
|
-
id: "custom-sort-
|
|
76
|
+
Oe.displayName = "CheckMarkIcon";
|
|
77
|
+
var Lt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.5574C8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507C9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661C11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512C7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574C6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588C4.88808 9.55156 5.26798 9.55156 5.50229 9.78588L6.22584 10.5094Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.14014 3.73989C1.14014 2.30396 2.3042 1.13989 3.74014 1.13989H12.2601C13.6961 1.13989 14.8601 2.30395 14.8601 3.73989V12.2599C14.8601 13.6958 13.6961 14.8599 12.2601 14.8599H3.74014C2.3042 14.8599 1.14014 13.6958 1.14014 12.2599V3.73989ZM2.34014 5.86724V12.2599C2.34014 13.0331 2.96694 13.6599 3.74014 13.6599H12.2601C13.0333 13.6599 13.6601 13.0331 13.6601 12.2599V5.86724H2.34014ZM13.6601 4.66724H2.34014V3.73989C2.34014 2.9667 2.96694 2.33989 3.74014 2.33989H12.2601C13.0333 2.33989 13.6601 2.96669 13.6601 3.73989V4.66724Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ne = y(function(e, t) {
|
|
78
|
+
return x(_, Object.assign({}, e, {
|
|
79
|
+
id: "custom-sort-icon",
|
|
80
80
|
ref: t,
|
|
81
81
|
icon: Lt
|
|
82
82
|
}));
|
|
83
83
|
});
|
|
84
|
-
Ne.displayName = "
|
|
85
|
-
var Dt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.
|
|
86
|
-
return _
|
|
87
|
-
id: "delete-empty-
|
|
84
|
+
Ne.displayName = "CustomSortIcon";
|
|
85
|
+
var Dt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V13.1332C3.15332 14.2377 4.04875 15.1332 5.15332 15.1332H10.8465C11.9511 15.1332 12.8465 14.2377 12.8465 13.1331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V13.1331C11.6465 13.575 11.2884 13.9331 10.8465 13.9331H5.15332C4.71149 13.9331 4.35332 13.575 4.35332 13.1332V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ke = y(function(e, t) {
|
|
86
|
+
return x(_, Object.assign({}, e, {
|
|
87
|
+
id: "delete-empty-icon",
|
|
88
88
|
ref: t,
|
|
89
89
|
icon: Dt
|
|
90
90
|
}));
|
|
91
91
|
});
|
|
92
|
-
ke.displayName = "
|
|
93
|
-
var Ht = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.
|
|
94
|
-
return _
|
|
95
|
-
id: "descending-
|
|
92
|
+
ke.displayName = "DeleteEmptyIcon";
|
|
93
|
+
var Ht = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, te = y(function(e, t) {
|
|
94
|
+
return x(_, Object.assign({}, e, {
|
|
95
|
+
id: "descending-icon",
|
|
96
96
|
ref: t,
|
|
97
97
|
icon: Ht
|
|
98
98
|
}));
|
|
99
99
|
});
|
|
100
|
-
te.displayName = "
|
|
101
|
-
var Ut = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 3.20024C1.57503 3.20024 1.3064 2.93161 1.3064 2.60024C1.3064 2.26887 1.57503 2.00024 1.9064 2.00024H4.57306C4.90443 2.00024 5.17306 2.26887 5.17306 2.60024C5.17306 2.93161 4.90443 3.20024 4.57306 3.20024H1.9064ZM1.3064 6.19985C1.3064 6.53122 1.57503 6.79985 1.9064 6.79985H5.9064C6.23777 6.79985 6.5064 6.53122 6.5064 6.19985C6.5064 5.86848 6.23777 5.59985 5.9064 5.59985H1.9064C1.57503 5.59985 1.3064 5.86848 1.3064 6.19985ZM1.9064 10.3997C1.57503 10.3997 1.3064 10.1311 1.3064 9.79971C1.3064 9.46834 1.57503 9.19971 1.9064 9.19971H7.23973C7.5711 9.19971 7.83973 9.46834 7.83973 9.79971C7.83973 10.1311 7.5711 10.3997 7.23973 10.3997H1.9064ZM1.9064 13.9996C1.57503 13.9996 1.3064 13.7309 1.3064 13.3996C1.3064 13.0682 1.57503 12.7996 1.9064 12.7996H8.57306C8.90443 12.7996 9.17306 13.0682 9.17306 13.3996C9.17306 13.7309 8.90443 13.9996 8.57306 13.9996H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 14.2667C12.4267 14.5981 12.1581 14.8667 11.8267 14.8667C11.4953 14.8667 11.2267 14.5981 11.2267 14.2667V3.18198L9.98447 4.42422C9.75015 4.65853 9.37026 4.65853 9.13594 4.42422C8.90163 4.1899 8.90163 3.81 9.13594 3.57569L11.4026 1.30902C11.6369 1.07471 12.0168 1.07471 12.2511 1.30902L14.5178 3.57569C14.7521 3.81 14.7521 4.1899 14.5178 4.42422C14.2835 4.65853 13.9036 4.65853 13.6693 4.42422L12.4267 3.18165V14.2667Z" } }] }, Le = y(function(e, t) {
|
|
102
|
-
return _
|
|
103
|
-
id: "expand-ascending-
|
|
100
|
+
te.displayName = "DescendingIcon";
|
|
101
|
+
var Ut = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 3.20024C1.57503 3.20024 1.3064 2.93161 1.3064 2.60024C1.3064 2.26887 1.57503 2.00024 1.9064 2.00024H4.57306C4.90443 2.00024 5.17306 2.26887 5.17306 2.60024C5.17306 2.93161 4.90443 3.20024 4.57306 3.20024H1.9064ZM1.3064 6.19985C1.3064 6.53122 1.57503 6.79985 1.9064 6.79985H5.9064C6.23777 6.79985 6.5064 6.53122 6.5064 6.19985C6.5064 5.86848 6.23777 5.59985 5.9064 5.59985H1.9064C1.57503 5.59985 1.3064 5.86848 1.3064 6.19985ZM1.9064 10.3997C1.57503 10.3997 1.3064 10.1311 1.3064 9.79971C1.3064 9.46834 1.57503 9.19971 1.9064 9.19971H7.23973C7.5711 9.19971 7.83973 9.46834 7.83973 9.79971C7.83973 10.1311 7.5711 10.3997 7.23973 10.3997H1.9064ZM1.9064 13.9996C1.57503 13.9996 1.3064 13.7309 1.3064 13.3996C1.3064 13.0682 1.57503 12.7996 1.9064 12.7996H8.57306C8.90443 12.7996 9.17306 13.0682 9.17306 13.3996C9.17306 13.7309 8.90443 13.9996 8.57306 13.9996H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 14.2667C12.4267 14.5981 12.1581 14.8667 11.8267 14.8667C11.4953 14.8667 11.2267 14.5981 11.2267 14.2667V3.18198L9.98447 4.42422C9.75015 4.65853 9.37026 4.65853 9.13594 4.42422C8.90163 4.1899 8.90163 3.81 9.13594 3.57569L11.4026 1.30902C11.6369 1.07471 12.0168 1.07471 12.2511 1.30902L14.5178 3.57569C14.7521 3.81 14.7521 4.1899 14.5178 4.42422C14.2835 4.65853 13.9036 4.65853 13.6693 4.42422L12.4267 3.18165V14.2667Z" } }] }, Le = y(function(e, t) {
|
|
102
|
+
return x(_, Object.assign({}, e, {
|
|
103
|
+
id: "expand-ascending-icon",
|
|
104
104
|
ref: t,
|
|
105
105
|
icon: Ut
|
|
106
106
|
}));
|
|
107
107
|
});
|
|
108
|
-
Le.displayName = "
|
|
109
|
-
var Pt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 12.7998C1.57503 12.7998 1.3064 13.0684 1.3064 13.3998C1.3064 13.7311 1.57503 13.9998 1.9064 13.9998H4.57306C4.90443 13.9998 5.17306 13.7311 5.17306 13.3998C5.17306 13.0684 4.90443 12.7998 4.57306 12.7998H1.9064ZM1.3064 9.80015C1.3064 9.46878 1.57503 9.20015 1.9064 9.20015H5.9064C6.23777 9.20015 6.5064 9.46878 6.5064 9.80015C6.5064 10.1315 6.23777 10.4001 5.9064 10.4001H1.9064C1.57503 10.4001 1.3064 10.1315 1.3064 9.80015ZM1.9064 5.60029C1.57503 5.60029 1.3064 5.86892 1.3064 6.20029C1.3064 6.53166 1.57503 6.80029 1.9064 6.80029H7.23973C7.5711 6.80029 7.83973 6.53166 7.83973 6.20029C7.83973 5.86892 7.5711 5.60029 7.23973 5.60029H1.9064ZM1.9064 2.00044C1.57503 2.00044 1.3064 2.26907 1.3064 2.60044C1.3064 2.93181 1.57503 3.20044 1.9064 3.20044H8.57306C8.90443 3.20044 9.17306 2.93181 9.17306 2.60044C9.17306 2.26907 8.90443 2.00044 8.57306 2.00044H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 1.7333C12.4267 1.40193 12.1581 1.1333 11.8267 1.1333C11.4953 1.1333 11.2267 1.40193 11.2267 1.7333V12.818L9.98447 11.5758C9.75015 11.3415 9.37026 11.3415 9.13594 11.5758C8.90163 11.8101 8.90163 12.19 9.13594 12.4243L11.4026 14.691C11.6369 14.9253 12.0168 14.9253 12.2511 14.691L14.5178 12.4243C14.7521 12.19 14.7521 11.8101 14.5178 11.5758C14.2835 11.3415 13.9036 11.3415 13.6693 11.5758L12.4267 12.8183V1.7333Z" } }] }, De = y(function(e, t) {
|
|
110
|
-
return _
|
|
111
|
-
id: "expand-descending-
|
|
108
|
+
Le.displayName = "ExpandAscendingIcon";
|
|
109
|
+
var Pt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 12.7998C1.57503 12.7998 1.3064 13.0684 1.3064 13.3998C1.3064 13.7311 1.57503 13.9998 1.9064 13.9998H4.57306C4.90443 13.9998 5.17306 13.7311 5.17306 13.3998C5.17306 13.0684 4.90443 12.7998 4.57306 12.7998H1.9064ZM1.3064 9.80015C1.3064 9.46878 1.57503 9.20015 1.9064 9.20015H5.9064C6.23777 9.20015 6.5064 9.46878 6.5064 9.80015C6.5064 10.1315 6.23777 10.4001 5.9064 10.4001H1.9064C1.57503 10.4001 1.3064 10.1315 1.3064 9.80015ZM1.9064 5.60029C1.57503 5.60029 1.3064 5.86892 1.3064 6.20029C1.3064 6.53166 1.57503 6.80029 1.9064 6.80029H7.23973C7.5711 6.80029 7.83973 6.53166 7.83973 6.20029C7.83973 5.86892 7.5711 5.60029 7.23973 5.60029H1.9064ZM1.9064 2.00044C1.57503 2.00044 1.3064 2.26907 1.3064 2.60044C1.3064 2.93181 1.57503 3.20044 1.9064 3.20044H8.57306C8.90443 3.20044 9.17306 2.93181 9.17306 2.60044C9.17306 2.26907 8.90443 2.00044 8.57306 2.00044H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 1.7333C12.4267 1.40193 12.1581 1.1333 11.8267 1.1333C11.4953 1.1333 11.2267 1.40193 11.2267 1.7333V12.818L9.98447 11.5758C9.75015 11.3415 9.37026 11.3415 9.13594 11.5758C8.90163 11.8101 8.90163 12.19 9.13594 12.4243L11.4026 14.691C11.6369 14.9253 12.0168 14.9253 12.2511 14.691L14.5178 12.4243C14.7521 12.19 14.7521 11.8101 14.5178 11.5758C14.2835 11.3415 13.9036 11.3415 13.6693 11.5758L12.4267 12.8183V1.7333Z" } }] }, De = y(function(e, t) {
|
|
110
|
+
return x(_, Object.assign({}, e, {
|
|
111
|
+
id: "expand-descending-icon",
|
|
112
112
|
ref: t,
|
|
113
113
|
icon: Pt
|
|
114
114
|
}));
|
|
115
115
|
});
|
|
116
|
-
De.displayName = "
|
|
117
|
-
var At = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Q = y(function(e, t) {
|
|
118
|
-
return _
|
|
119
|
-
id: "increase-
|
|
116
|
+
De.displayName = "ExpandDescendingIcon";
|
|
117
|
+
var At = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Q = y(function(e, t) {
|
|
118
|
+
return x(_, Object.assign({}, e, {
|
|
119
|
+
id: "increase-icon",
|
|
120
120
|
ref: t,
|
|
121
121
|
icon: At
|
|
122
122
|
}));
|
|
123
123
|
});
|
|
124
|
-
Q.displayName = "
|
|
125
|
-
var $t = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, He = y(function(e, t) {
|
|
126
|
-
return _
|
|
127
|
-
id: "more-down-
|
|
124
|
+
Q.displayName = "IncreaseIcon";
|
|
125
|
+
var $t = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, He = y(function(e, t) {
|
|
126
|
+
return x(_, Object.assign({}, e, {
|
|
127
|
+
id: "more-down-icon",
|
|
128
128
|
ref: t,
|
|
129
129
|
icon: $t
|
|
130
130
|
}));
|
|
131
131
|
});
|
|
132
|
-
He.displayName = "
|
|
133
|
-
var
|
|
134
|
-
return _
|
|
135
|
-
id: "sequence-
|
|
132
|
+
He.displayName = "MoreDownIcon";
|
|
133
|
+
var Zt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Ue = y(function(e, t) {
|
|
134
|
+
return x(_, Object.assign({}, e, {
|
|
135
|
+
id: "sequence-icon",
|
|
136
136
|
ref: t,
|
|
137
|
-
icon:
|
|
137
|
+
icon: Zt
|
|
138
138
|
}));
|
|
139
139
|
});
|
|
140
|
-
Ue.displayName = "
|
|
141
|
-
const
|
|
142
|
-
const [t, n] =
|
|
143
|
-
return /* @__PURE__ */
|
|
140
|
+
Ue.displayName = "SequenceIcon";
|
|
141
|
+
const jt = (e) => {
|
|
142
|
+
const [t, n] = Z("0"), r = E(P);
|
|
143
|
+
return /* @__PURE__ */ C("div", { className: "univer-text-sm", children: [
|
|
144
144
|
/* @__PURE__ */ c("div", { className: "extend-confirm-desc", children: r.t("sheets-sort.dialog.sort-reminder-desc") }),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
|
|
145
|
+
/* @__PURE__ */ C(
|
|
146
|
+
Re,
|
|
147
147
|
{
|
|
148
148
|
className: "univer-mt-4",
|
|
149
149
|
value: t,
|
|
150
150
|
direction: "vertical",
|
|
151
|
-
onChange: (
|
|
152
|
-
n(
|
|
151
|
+
onChange: (o) => {
|
|
152
|
+
n(o), e.onChange(o);
|
|
153
153
|
},
|
|
154
154
|
children: [
|
|
155
|
-
/* @__PURE__ */ c(
|
|
156
|
-
/* @__PURE__ */ c(
|
|
155
|
+
/* @__PURE__ */ c(V, { value: "0", children: r.t("sheets-sort.dialog.sort-reminder-no") }),
|
|
156
|
+
/* @__PURE__ */ c(V, { value: "1", children: r.t("sheets-sort.dialog.sort-reminder-ext") })
|
|
157
157
|
]
|
|
158
158
|
}
|
|
159
159
|
)
|
|
160
160
|
] });
|
|
161
161
|
};
|
|
162
|
-
var
|
|
163
|
-
for (var
|
|
164
|
-
(
|
|
165
|
-
return
|
|
166
|
-
},
|
|
167
|
-
const
|
|
162
|
+
var Bt = Object.getOwnPropertyDescriptor, Ft = (e, t, n, r) => {
|
|
163
|
+
for (var o = r > 1 ? void 0 : r ? Bt(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
164
|
+
(s = e[i]) && (o = s(o) || o);
|
|
165
|
+
return o;
|
|
166
|
+
}, T = (e, t) => (n, r) => t(n, r, e);
|
|
167
|
+
const F = {
|
|
168
168
|
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
169
169
|
EMPTY_ERROR: "sheets-sort.error.empty",
|
|
170
170
|
SINGLE_ERROR: "sheets-sort.error.single",
|
|
171
171
|
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
172
172
|
};
|
|
173
|
-
let g = class extends
|
|
174
|
-
constructor(t, n, r, i, s,
|
|
173
|
+
let g = class extends Ge {
|
|
174
|
+
constructor(t, n, r, o, i, s, a) {
|
|
175
175
|
super();
|
|
176
|
-
K(this, "_customSortState$", new
|
|
176
|
+
K(this, "_customSortState$", new mt(null));
|
|
177
177
|
K(this, "customSortState$", this._customSortState$.asObservable());
|
|
178
|
-
this._univerInstanceService = t, this._confirmService = n, this._logService = r, this._selectionManagerService =
|
|
178
|
+
this._univerInstanceService = t, this._confirmService = n, this._logService = r, this._selectionManagerService = o, this._sheetsSortService = i, this._localeService = s, this._commandService = a;
|
|
179
179
|
}
|
|
180
180
|
async triggerSortDirectly(t, n, r) {
|
|
181
|
-
const
|
|
182
|
-
if (!
|
|
181
|
+
const o = r || await this._detectSortLocation(n);
|
|
182
|
+
if (!o || !this._check(o))
|
|
183
183
|
return !1;
|
|
184
|
-
const
|
|
184
|
+
const s = {
|
|
185
185
|
orderRules: [{
|
|
186
186
|
type: t ? U.ASC : U.DESC,
|
|
187
|
-
colIndex:
|
|
187
|
+
colIndex: o.colIndex
|
|
188
188
|
}],
|
|
189
|
-
range:
|
|
189
|
+
range: o.range
|
|
190
190
|
};
|
|
191
|
-
return this._sheetsSortService.applySort(
|
|
191
|
+
return this._sheetsSortService.applySort(s, o.unitId, o.subUnitId), !0;
|
|
192
192
|
}
|
|
193
193
|
async triggerSortCustomize() {
|
|
194
194
|
const t = await this._detectSortLocation();
|
|
@@ -198,34 +198,34 @@ let g = class extends ze {
|
|
|
198
198
|
return this._customSortState$.getValue();
|
|
199
199
|
}
|
|
200
200
|
getTitles(t) {
|
|
201
|
-
var l,
|
|
201
|
+
var l, u;
|
|
202
202
|
const n = (l = this.customSortState()) == null ? void 0 : l.location;
|
|
203
203
|
if (!n)
|
|
204
204
|
return [];
|
|
205
|
-
const { unitId: r, subUnitId:
|
|
206
|
-
if (!
|
|
205
|
+
const { unitId: r, subUnitId: o, range: i } = n, s = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
206
|
+
if (!s)
|
|
207
207
|
return [];
|
|
208
|
-
const a =
|
|
209
|
-
return Array.from({ length:
|
|
208
|
+
const a = Vt(this._localeService);
|
|
209
|
+
return Array.from({ length: i.endColumn - i.startColumn + 1 }, (I, m) => {
|
|
210
210
|
var v;
|
|
211
|
-
const
|
|
211
|
+
const b = (v = s.getCell(i.startRow, m + i.startColumn)) == null ? void 0 : v.v;
|
|
212
212
|
return {
|
|
213
|
-
index:
|
|
214
|
-
label: t ? `${
|
|
213
|
+
index: m + i.startColumn,
|
|
214
|
+
label: t ? `${b != null ? b : a(m + i.startColumn)}` : a(m + i.startColumn)
|
|
215
215
|
};
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
setSelection(t, n, r) {
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
if (!
|
|
219
|
+
var s;
|
|
220
|
+
const o = (s = this._univerInstanceService.getUnit(t)) == null ? void 0 : s.getSheetBySheetId(n);
|
|
221
|
+
if (!o)
|
|
222
222
|
return;
|
|
223
|
-
const
|
|
223
|
+
const i = {
|
|
224
224
|
unitId: t,
|
|
225
225
|
subUnitId: n,
|
|
226
|
-
selections: [{ range: r, primary: pt(r,
|
|
226
|
+
selections: [{ range: r, primary: pt(r, o), style: null }]
|
|
227
227
|
};
|
|
228
|
-
this._commandService.executeCommand(yt.id,
|
|
228
|
+
this._commandService.executeCommand(yt.id, i);
|
|
229
229
|
}
|
|
230
230
|
async showCheckError(t) {
|
|
231
231
|
return await this._confirmService.confirm({
|
|
@@ -247,7 +247,7 @@ let g = class extends ze {
|
|
|
247
247
|
},
|
|
248
248
|
children: {
|
|
249
249
|
title: /* @__PURE__ */ c(
|
|
250
|
-
|
|
250
|
+
jt,
|
|
251
251
|
{
|
|
252
252
|
onChange: (r) => {
|
|
253
253
|
t = r === "1";
|
|
@@ -265,43 +265,43 @@ let g = class extends ze {
|
|
|
265
265
|
this._customSortState$.next({ show: !1 });
|
|
266
266
|
}
|
|
267
267
|
_check(t) {
|
|
268
|
-
return this._sheetsSortService.singleCheck(t) ? this._sheetsSortService.mergeCheck(t) ? this._sheetsSortService.formulaCheck(t) ? this._sheetsSortService.emptyCheck(t) ? !0 : (this.showCheckError(
|
|
268
|
+
return this._sheetsSortService.singleCheck(t) ? this._sheetsSortService.mergeCheck(t) ? this._sheetsSortService.formulaCheck(t) ? this._sheetsSortService.emptyCheck(t) ? !0 : (this.showCheckError(F.EMPTY_ERROR), !1) : (this.showCheckError(F.FORMULA_ARRAY), !1) : (this.showCheckError(F.MERGE_ERROR), !1) : (this.showCheckError(F.SINGLE_ERROR), !1);
|
|
269
269
|
}
|
|
270
270
|
async _detectSortLocation(t) {
|
|
271
|
-
const n = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), r = n.getActiveSheet(),
|
|
272
|
-
if (!
|
|
271
|
+
const n = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), r = n.getActiveSheet(), o = n.getUnitId(), i = r.getSheetId(), s = this._selectionManagerService.getCurrentLastSelection();
|
|
272
|
+
if (!s)
|
|
273
273
|
return null;
|
|
274
274
|
let a;
|
|
275
275
|
if (t === !0)
|
|
276
|
-
a = fe(
|
|
276
|
+
a = fe(s.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, i, a);
|
|
277
277
|
else if (t === !1)
|
|
278
|
-
a =
|
|
278
|
+
a = s.range;
|
|
279
279
|
else {
|
|
280
280
|
const l = await this.showExtendConfirm();
|
|
281
281
|
if (l === "cancel")
|
|
282
282
|
return null;
|
|
283
|
-
l === "keep" ? a =
|
|
283
|
+
l === "keep" ? a = s.range : (a = fe(s.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, i, a));
|
|
284
284
|
}
|
|
285
285
|
return {
|
|
286
286
|
range: a,
|
|
287
|
-
unitId:
|
|
288
|
-
subUnitId:
|
|
289
|
-
colIndex:
|
|
287
|
+
unitId: o,
|
|
288
|
+
subUnitId: i,
|
|
289
|
+
colIndex: s.primary.actualColumn
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
|
-
g =
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
293
|
+
g = Ft([
|
|
294
|
+
T(0, xe),
|
|
295
|
+
T(1, it),
|
|
296
|
+
T(2, Ve),
|
|
297
|
+
T(3, R(St)),
|
|
298
|
+
T(4, R(we)),
|
|
299
|
+
T(5, R(P)),
|
|
300
|
+
T(6, _e)
|
|
301
301
|
], g);
|
|
302
|
-
function
|
|
302
|
+
function Vt(e) {
|
|
303
303
|
return (t) => {
|
|
304
|
-
const n =
|
|
304
|
+
const n = We.chatAtABC(t);
|
|
305
305
|
switch (e.getCurrentLocale()) {
|
|
306
306
|
case J.ZH_CN:
|
|
307
307
|
return `"${n}"列`;
|
|
@@ -314,89 +314,89 @@ function Zt(e) {
|
|
|
314
314
|
}
|
|
315
315
|
const re = {
|
|
316
316
|
id: "sheet.command.sort-range-asc",
|
|
317
|
-
type:
|
|
317
|
+
type: M.COMMAND,
|
|
318
318
|
handler: async (e) => await e.get(g).triggerSortDirectly(!0, !1)
|
|
319
319
|
}, ne = {
|
|
320
320
|
id: "sheet.command.sort-range-asc-ext",
|
|
321
|
-
type:
|
|
321
|
+
type: M.COMMAND,
|
|
322
322
|
handler: async (e) => await e.get(g).triggerSortDirectly(!0, !0)
|
|
323
|
-
},
|
|
323
|
+
}, oe = {
|
|
324
324
|
id: "sheet.command.sort-range-desc",
|
|
325
|
-
type:
|
|
325
|
+
type: M.COMMAND,
|
|
326
326
|
handler: async (e) => await e.get(g).triggerSortDirectly(!1, !1)
|
|
327
|
-
},
|
|
327
|
+
}, ie = {
|
|
328
328
|
id: "sheet.command.sort-range-desc-ext",
|
|
329
|
-
type:
|
|
329
|
+
type: M.COMMAND,
|
|
330
330
|
handler: async (e) => await e.get(g).triggerSortDirectly(!1, !0)
|
|
331
|
-
},
|
|
331
|
+
}, se = {
|
|
332
332
|
id: "sheet.command.sort-range-custom",
|
|
333
|
-
type:
|
|
333
|
+
type: M.COMMAND,
|
|
334
334
|
handler: async (e) => await e.get(g).triggerSortCustomize()
|
|
335
335
|
}, ce = {
|
|
336
336
|
id: "sheet.command.sort-range-asc-ctx",
|
|
337
|
-
type:
|
|
337
|
+
type: M.COMMAND,
|
|
338
338
|
handler: async (e) => await e.get(g).triggerSortDirectly(!0, !1)
|
|
339
339
|
}, ae = {
|
|
340
340
|
id: "sheet.command.sort-range-asc-ext-ctx",
|
|
341
|
-
type:
|
|
341
|
+
type: M.COMMAND,
|
|
342
342
|
handler: async (e) => await e.get(g).triggerSortDirectly(!0, !0)
|
|
343
343
|
}, le = {
|
|
344
344
|
id: "sheet.command.sort-range-desc-ctx",
|
|
345
|
-
type:
|
|
345
|
+
type: M.COMMAND,
|
|
346
346
|
handler: async (e) => await e.get(g).triggerSortDirectly(!1, !1)
|
|
347
|
-
},
|
|
347
|
+
}, de = {
|
|
348
348
|
id: "sheet.command.sort-range-desc-ext-ctx",
|
|
349
|
-
type:
|
|
349
|
+
type: M.COMMAND,
|
|
350
350
|
handler: async (e) => await e.get(g).triggerSortDirectly(!1, !0)
|
|
351
|
-
},
|
|
351
|
+
}, ue = {
|
|
352
352
|
id: "sheet.command.sort-range-custom-ctx",
|
|
353
|
-
type:
|
|
353
|
+
type: M.COMMAND,
|
|
354
354
|
handler: async (e) => await e.get(g).triggerSortCustomize()
|
|
355
355
|
};
|
|
356
|
-
function
|
|
357
|
-
const e = E(g), t =
|
|
358
|
-
return !t || !t.location ? null : /* @__PURE__ */ c(
|
|
356
|
+
function Gt() {
|
|
357
|
+
const e = E(g), t = st(e.customSortState$);
|
|
358
|
+
return !t || !t.location ? null : /* @__PURE__ */ c(Wt, { state: t });
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const t = E(
|
|
362
|
-
{ type: U.ASC, colIndex:
|
|
363
|
-
]), q = O((
|
|
360
|
+
function Wt({ state: e }) {
|
|
361
|
+
const t = E(we), n = E(P), r = E(g), [o, i] = Z(!1), [s, a] = Z(0), l = Ee(null), { range: u, unitId: I, subUnitId: m } = e.location, b = r.getTitles(o), [v, A] = Z([
|
|
362
|
+
{ type: U.ASC, colIndex: u.startColumn }
|
|
363
|
+
]), q = O((d, p) => {
|
|
364
364
|
const $ = [...v];
|
|
365
|
-
p === null ? $.splice(
|
|
366
|
-
}, [v]),
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
p !== null && (
|
|
365
|
+
p === null ? $.splice(d, 1) : $[d] = p, A($);
|
|
366
|
+
}, [v]), B = O(
|
|
367
|
+
ze(() => {
|
|
368
|
+
const d = [...v], p = Yt(u, v);
|
|
369
|
+
p !== null && (d.push({ type: U.ASC, colIndex: p }), A(d));
|
|
370
370
|
}, 200),
|
|
371
|
-
[v,
|
|
372
|
-
), h = O((
|
|
373
|
-
t.applySort({ range:
|
|
374
|
-
}, [t, r,
|
|
371
|
+
[v, u]
|
|
372
|
+
), h = O((d, p) => {
|
|
373
|
+
t.applySort({ range: u, orderRules: d, hasTitle: p }), r.closeCustomSortPanel();
|
|
374
|
+
}, [t, r, u]), X = O(() => {
|
|
375
375
|
r.closeCustomSortPanel();
|
|
376
|
-
}, [r]),
|
|
377
|
-
|
|
378
|
-
}, [r,
|
|
379
|
-
|
|
376
|
+
}, [r]), Ze = O((d) => {
|
|
377
|
+
i(d), d ? r.setSelection(I, m, { ...u, startRow: u.startRow + 1 }) : r.setSelection(I, m, u);
|
|
378
|
+
}, [r, u, m, I]);
|
|
379
|
+
be(() => {
|
|
380
380
|
l.current && v.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
381
381
|
}, [v]);
|
|
382
|
-
const
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
|
|
382
|
+
const je = v.length < b.length, me = v.map((d) => ({ ...d, id: `${d.colIndex}` }));
|
|
383
|
+
return /* @__PURE__ */ C("div", { children: [
|
|
384
|
+
/* @__PURE__ */ C("div", { onMouseDown: (d) => {
|
|
385
|
+
d.stopPropagation();
|
|
386
386
|
}, children: [
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */ c(
|
|
389
|
-
|
|
387
|
+
/* @__PURE__ */ C("div", { className: "univer-flex univer-items-center univer-justify-between", children: [
|
|
388
|
+
/* @__PURE__ */ c(_t, { checked: o, onChange: (d) => Ze(!!d), children: n.t("sheets-sort.dialog.first-row-check") }),
|
|
389
|
+
je ? /* @__PURE__ */ C(
|
|
390
390
|
"div",
|
|
391
391
|
{
|
|
392
392
|
className: "univer-flex univer-cursor-pointer univer-select-none univer-items-center univer-text-base",
|
|
393
|
-
onClick:
|
|
393
|
+
onClick: B,
|
|
394
394
|
children: [
|
|
395
395
|
/* @__PURE__ */ c(Q, {}),
|
|
396
396
|
/* @__PURE__ */ c("span", { className: "univer-ml-1.5", children: n.t("sheets-sort.dialog.add-condition") })
|
|
397
397
|
]
|
|
398
398
|
}
|
|
399
|
-
) : /* @__PURE__ */
|
|
399
|
+
) : /* @__PURE__ */ C(
|
|
400
400
|
"div",
|
|
401
401
|
{
|
|
402
402
|
className: "univer-flex univer-cursor-pointer univer-select-none univer-items-center univer-text-base univer-text-primary-500 disabled:univer-cursor-not-allowed disabled:univer-divide-opacity-30 disabled:univer-text-gray-800",
|
|
@@ -411,26 +411,26 @@ function Gt({ state: e }) {
|
|
|
411
411
|
"div",
|
|
412
412
|
{
|
|
413
413
|
className: "univer-max-h-[310px] univer-overflow-y-auto univer-overflow-x-hidden",
|
|
414
|
-
onScroll: (
|
|
415
|
-
const p =
|
|
414
|
+
onScroll: (d) => {
|
|
415
|
+
const p = d.currentTarget.scrollTop;
|
|
416
416
|
a(p);
|
|
417
417
|
},
|
|
418
418
|
ref: l,
|
|
419
419
|
children: /* @__PURE__ */ c(
|
|
420
420
|
It,
|
|
421
421
|
{
|
|
422
|
-
list:
|
|
422
|
+
list: me,
|
|
423
423
|
onListChange: A,
|
|
424
424
|
idKey: "id",
|
|
425
425
|
draggableHandle: "[data-u-comp=sort-panel-item-handler]",
|
|
426
|
-
itemRender: (
|
|
427
|
-
|
|
426
|
+
itemRender: (d) => /* @__PURE__ */ c(
|
|
427
|
+
zt,
|
|
428
428
|
{
|
|
429
|
-
titles:
|
|
430
|
-
list:
|
|
431
|
-
item:
|
|
429
|
+
titles: b,
|
|
430
|
+
list: me,
|
|
431
|
+
item: d,
|
|
432
432
|
onChange: (p, $) => q($, p),
|
|
433
|
-
scrollPosition:
|
|
433
|
+
scrollPosition: s
|
|
434
434
|
}
|
|
435
435
|
),
|
|
436
436
|
rowHeight: 32,
|
|
@@ -440,9 +440,9 @@ function Gt({ state: e }) {
|
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] }),
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ C("div", { className: "univer-mt-5 univer-flex univer-justify-end", children: [
|
|
444
444
|
/* @__PURE__ */ c(
|
|
445
|
-
|
|
445
|
+
G,
|
|
446
446
|
{
|
|
447
447
|
className: "univer-ml-3",
|
|
448
448
|
onClick: () => X(),
|
|
@@ -450,30 +450,30 @@ function Gt({ state: e }) {
|
|
|
450
450
|
}
|
|
451
451
|
),
|
|
452
452
|
/* @__PURE__ */ c(
|
|
453
|
-
|
|
453
|
+
G,
|
|
454
454
|
{
|
|
455
455
|
className: "univer-ml-3",
|
|
456
456
|
variant: "primary",
|
|
457
|
-
onClick: () => h(v,
|
|
457
|
+
onClick: () => h(v, o),
|
|
458
458
|
children: n.t("sheets-sort.dialog.confirm")
|
|
459
459
|
}
|
|
460
460
|
)
|
|
461
461
|
] })
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
var
|
|
466
|
-
const { list: t, item: n, titles: r, onChange:
|
|
467
|
-
|
|
468
|
-
}, [l, n,
|
|
469
|
-
|
|
464
|
+
function zt(e) {
|
|
465
|
+
var B;
|
|
466
|
+
const { list: t, item: n, titles: r, onChange: o, scrollPosition: i } = e, s = E(P), a = r.filter((h) => !t.some((X) => X.colIndex === h.index) || h.index === n.colIndex), l = t.findIndex((h) => h.colIndex === n.colIndex), u = O((h) => {
|
|
467
|
+
o({ ...n, colIndex: h.index }, l), m(!1);
|
|
468
|
+
}, [l, n, o]), [I, m] = Z(!1), b = (h) => {
|
|
469
|
+
m(h);
|
|
470
470
|
};
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}, [
|
|
474
|
-
const v = t.length > 1, A = (
|
|
475
|
-
return /* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
471
|
+
be(() => {
|
|
472
|
+
m(!1);
|
|
473
|
+
}, [i]);
|
|
474
|
+
const v = t.length > 1, A = (B = r.find((h) => h.index === n.colIndex)) == null ? void 0 : B.label, q = s.getCurrentLocale() === J.ZH_CN ? "univer-flex univer-px-5" : "univer-flex univer-px-2.5";
|
|
475
|
+
return /* @__PURE__ */ C("div", { className: "univer-flex univer-items-center", children: [
|
|
476
|
+
/* @__PURE__ */ C("div", { className: "univer-flex univer-items-center", children: [
|
|
477
477
|
/* @__PURE__ */ c(
|
|
478
478
|
"div",
|
|
479
479
|
{
|
|
@@ -483,17 +483,17 @@ function Wt(e) {
|
|
|
483
483
|
}
|
|
484
484
|
),
|
|
485
485
|
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
486
|
-
|
|
486
|
+
wt,
|
|
487
487
|
{
|
|
488
488
|
align: "start",
|
|
489
489
|
overlay: /* @__PURE__ */ c(
|
|
490
490
|
"ul",
|
|
491
491
|
{
|
|
492
492
|
className: "univer-my-0 univer-box-border univer-grid univer-max-h-[310px] univer-items-center univer-gap-1 univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border univer-bg-white univer-p-1 univer-text-base univer-shadow-lg",
|
|
493
|
-
children: a.map((h) => /* @__PURE__ */
|
|
493
|
+
children: a.map((h) => /* @__PURE__ */ C(
|
|
494
494
|
"li",
|
|
495
495
|
{
|
|
496
|
-
onClick: () =>
|
|
496
|
+
onClick: () => u(h),
|
|
497
497
|
className: "univer-relative univer-box-border univer-flex univer-h-7 univer-cursor-pointer univer-list-none univer-items-center univer-justify-between univer-rounded univer-px-2 univer-text-sm univer-transition-all dark:hover:!univer-bg-gray-700 hover:univer-bg-gray-100",
|
|
498
498
|
children: [
|
|
499
499
|
/* @__PURE__ */ c(
|
|
@@ -511,8 +511,8 @@ function Wt(e) {
|
|
|
511
511
|
}
|
|
512
512
|
),
|
|
513
513
|
open: I,
|
|
514
|
-
onOpenChange:
|
|
515
|
-
children: /* @__PURE__ */
|
|
514
|
+
onOpenChange: b,
|
|
515
|
+
children: /* @__PURE__ */ C(
|
|
516
516
|
"div",
|
|
517
517
|
{
|
|
518
518
|
className: "univer-ml-2 univer-flex univer-w-[236px] univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-md univer-border univer-border-gray-200 univer-px-2.5 univer-py-1.5 univer-text-sm univer-text-gray-900 dark:!univer-text-white",
|
|
@@ -531,72 +531,72 @@ function Wt(e) {
|
|
|
531
531
|
}
|
|
532
532
|
) })
|
|
533
533
|
] }),
|
|
534
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */
|
|
535
|
-
|
|
534
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ C(
|
|
535
|
+
Re,
|
|
536
536
|
{
|
|
537
537
|
className: q,
|
|
538
538
|
value: n.type,
|
|
539
539
|
onChange: (h) => {
|
|
540
|
-
|
|
540
|
+
o({ ...n, type: h }, l);
|
|
541
541
|
},
|
|
542
542
|
children: [
|
|
543
|
-
/* @__PURE__ */ c(
|
|
544
|
-
/* @__PURE__ */ c(
|
|
543
|
+
/* @__PURE__ */ c(V, { value: U.ASC, children: s.t("sheets-sort.general.sort-asc") }),
|
|
544
|
+
/* @__PURE__ */ c(V, { value: U.DESC, children: s.t("sheets-sort.general.sort-desc") })
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
) }),
|
|
548
|
-
/* @__PURE__ */ c("div", { className: "univer-absolute univer-right-0 univer-cursor-pointer univer-text-sm univer-s-[14px]", children: v && /* @__PURE__ */ c(ke, { onClick: () =>
|
|
548
|
+
/* @__PURE__ */ c("div", { className: "univer-absolute univer-right-0 univer-cursor-pointer univer-text-sm univer-s-[14px]", children: v && /* @__PURE__ */ c(ke, { onClick: () => o(null, l) }) })
|
|
549
549
|
] });
|
|
550
550
|
}
|
|
551
551
|
function Yt(e, t) {
|
|
552
|
-
const { startColumn: n, endColumn: r } = e,
|
|
553
|
-
for (let
|
|
554
|
-
if (!
|
|
555
|
-
return
|
|
552
|
+
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((i) => i == null ? void 0 : i.colIndex));
|
|
553
|
+
for (let i = n; i <= r; i++)
|
|
554
|
+
if (!o.has(i))
|
|
555
|
+
return i;
|
|
556
556
|
return null;
|
|
557
557
|
}
|
|
558
558
|
function qt(e) {
|
|
559
|
-
const { range: t, colIndex: n, onClose: r } = e,
|
|
560
|
-
const { unitId:
|
|
561
|
-
if (t &&
|
|
562
|
-
const
|
|
563
|
-
|
|
559
|
+
const { range: t, colIndex: n, onClose: r } = e, o = E(g), i = E(xe), s = E(P), a = O((l) => {
|
|
560
|
+
const { unitId: u, subUnitId: I } = xt(i) || {};
|
|
561
|
+
if (t && u && I) {
|
|
562
|
+
const m = { ...t, startRow: t.startRow + 1 };
|
|
563
|
+
o.triggerSortDirectly(l, !1, { unitId: u, subUnitId: I, range: m, colIndex: n });
|
|
564
564
|
} else
|
|
565
|
-
throw new Error(`Cannot find the target to sort. unitId: ${
|
|
565
|
+
throw new Error(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${I}, range: ${t}, colIndex: ${n}`);
|
|
566
566
|
r();
|
|
567
|
-
}, [t, n,
|
|
568
|
-
return /* @__PURE__ */
|
|
569
|
-
|
|
567
|
+
}, [t, n, o, i, r]);
|
|
568
|
+
return /* @__PURE__ */ C(
|
|
569
|
+
Mt,
|
|
570
570
|
{
|
|
571
571
|
className: "univer-mb-3 univer-grid univer-w-full univer-grid-flow-col univer-grid-cols-2 univer-gap-2",
|
|
572
572
|
children: [
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ C(G, { onClick: () => a(!0), children: [
|
|
574
574
|
/* @__PURE__ */ c(ee, {}),
|
|
575
|
-
|
|
575
|
+
s.t("sheets-sort.general.sort-asc")
|
|
576
576
|
] }),
|
|
577
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ C(G, { onClick: () => a(!1), children: [
|
|
578
578
|
/* @__PURE__ */ c(te, {}),
|
|
579
|
-
|
|
579
|
+
s.t("sheets-sort.general.sort-desc")
|
|
580
580
|
] })
|
|
581
581
|
]
|
|
582
582
|
}
|
|
583
583
|
);
|
|
584
584
|
}
|
|
585
|
-
const Pe = "sheet.menu.sheets-sort", Ae = "sheet.menu.sheets-sort-ctx",
|
|
585
|
+
const Pe = "sheet.menu.sheets-sort", Ae = "sheet.menu.sheets-sort-ctx", j = "AscendingIcon", he = "ExpandAscendingIcon", ge = "DescendingIcon", Ce = "ExpandDescendingIcon", ve = "CustomSortIcon";
|
|
586
586
|
function Xt(e) {
|
|
587
587
|
return {
|
|
588
588
|
id: Pe,
|
|
589
589
|
type: S.SUBITEMS,
|
|
590
|
-
icon:
|
|
590
|
+
icon: j,
|
|
591
591
|
tooltip: "sheets-sort.general.sort",
|
|
592
|
-
hidden$:
|
|
592
|
+
hidden$: Me(e, Y.UNIVER_SHEET),
|
|
593
593
|
disabled$: N(e, { workbookTypes: [H], worksheetTypes: [L, D], rangeTypes: [k] })
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
596
|
function Kt(e) {
|
|
597
597
|
return {
|
|
598
598
|
id: re.id,
|
|
599
|
-
icon:
|
|
599
|
+
icon: j,
|
|
600
600
|
title: "sheets-sort.general.sort-asc-cur",
|
|
601
601
|
type: S.BUTTON,
|
|
602
602
|
hidden$: rt(e)
|
|
@@ -612,7 +612,7 @@ function Jt(e) {
|
|
|
612
612
|
}
|
|
613
613
|
function Qt(e) {
|
|
614
614
|
return {
|
|
615
|
-
id:
|
|
615
|
+
id: oe.id,
|
|
616
616
|
title: "sheets-sort.general.sort-desc-cur",
|
|
617
617
|
icon: ge,
|
|
618
618
|
type: S.BUTTON
|
|
@@ -620,15 +620,15 @@ function Qt(e) {
|
|
|
620
620
|
}
|
|
621
621
|
function er(e) {
|
|
622
622
|
return {
|
|
623
|
-
id:
|
|
623
|
+
id: ie.id,
|
|
624
624
|
title: "sheets-sort.general.sort-desc-ext",
|
|
625
|
-
icon:
|
|
625
|
+
icon: Ce,
|
|
626
626
|
type: S.BUTTON
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
function tr(e) {
|
|
630
630
|
return {
|
|
631
|
-
id:
|
|
631
|
+
id: se.id,
|
|
632
632
|
title: "sheets-sort.general.sort-custom",
|
|
633
633
|
type: S.BUTTON,
|
|
634
634
|
icon: ve
|
|
@@ -639,8 +639,8 @@ function rr(e) {
|
|
|
639
639
|
id: Ae,
|
|
640
640
|
title: "sheets-sort.general.sort",
|
|
641
641
|
type: S.SUBITEMS,
|
|
642
|
-
icon:
|
|
643
|
-
hidden$:
|
|
642
|
+
icon: j,
|
|
643
|
+
hidden$: Me(e, Y.UNIVER_SHEET),
|
|
644
644
|
disabled$: N(e, {
|
|
645
645
|
workbookTypes: [H],
|
|
646
646
|
worksheetTypes: [L, D],
|
|
@@ -653,11 +653,11 @@ function nr(e) {
|
|
|
653
653
|
id: ce.id,
|
|
654
654
|
title: "sheets-sort.general.sort-asc-cur",
|
|
655
655
|
type: S.BUTTON,
|
|
656
|
-
icon:
|
|
656
|
+
icon: j,
|
|
657
657
|
disabled$: N(e, { workbookTypes: [H], worksheetTypes: [L, D], rangeTypes: [k] })
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function or(e) {
|
|
661
661
|
return {
|
|
662
662
|
id: ae.id,
|
|
663
663
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -666,7 +666,7 @@ function ir(e) {
|
|
|
666
666
|
disabled$: N(e, { workbookTypes: [H], worksheetTypes: [L, D], rangeTypes: [k] })
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function ir(e) {
|
|
670
670
|
return {
|
|
671
671
|
id: le.id,
|
|
672
672
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -675,18 +675,18 @@ function sr(e) {
|
|
|
675
675
|
disabled$: N(e, { workbookTypes: [H], worksheetTypes: [L, D], rangeTypes: [k] })
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function sr(e) {
|
|
679
679
|
return {
|
|
680
|
-
id:
|
|
680
|
+
id: de.id,
|
|
681
681
|
title: "sheets-sort.general.sort-desc-ext",
|
|
682
682
|
type: S.BUTTON,
|
|
683
|
-
icon:
|
|
683
|
+
icon: Ce,
|
|
684
684
|
disabled$: N(e, { workbookTypes: [H], worksheetTypes: [L, D], rangeTypes: [k] })
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
687
|
function cr(e) {
|
|
688
688
|
return {
|
|
689
|
-
id:
|
|
689
|
+
id: ue.id,
|
|
690
690
|
title: "sheets-sort.general.sort-custom",
|
|
691
691
|
type: S.BUTTON,
|
|
692
692
|
icon: ve,
|
|
@@ -706,15 +706,15 @@ const ar = {
|
|
|
706
706
|
order: 1,
|
|
707
707
|
menuItemFactory: Jt
|
|
708
708
|
},
|
|
709
|
-
[
|
|
709
|
+
[oe.id]: {
|
|
710
710
|
order: 2,
|
|
711
711
|
menuItemFactory: Qt
|
|
712
712
|
},
|
|
713
|
-
[
|
|
713
|
+
[ie.id]: {
|
|
714
714
|
order: 3,
|
|
715
715
|
menuItemFactory: er
|
|
716
716
|
},
|
|
717
|
-
[
|
|
717
|
+
[se.id]: {
|
|
718
718
|
order: 4,
|
|
719
719
|
menuItemFactory: tr
|
|
720
720
|
}
|
|
@@ -731,17 +731,17 @@ const ar = {
|
|
|
731
731
|
},
|
|
732
732
|
[ae.id]: {
|
|
733
733
|
order: 1,
|
|
734
|
-
menuItemFactory:
|
|
734
|
+
menuItemFactory: or
|
|
735
735
|
},
|
|
736
736
|
[le.id]: {
|
|
737
737
|
order: 2,
|
|
738
|
-
menuItemFactory:
|
|
738
|
+
menuItemFactory: ir
|
|
739
739
|
},
|
|
740
|
-
[
|
|
740
|
+
[de.id]: {
|
|
741
741
|
order: 3,
|
|
742
|
-
menuItemFactory:
|
|
742
|
+
menuItemFactory: sr
|
|
743
743
|
},
|
|
744
|
-
[
|
|
744
|
+
[ue.id]: {
|
|
745
745
|
order: 4,
|
|
746
746
|
menuItemFactory: cr
|
|
747
747
|
}
|
|
@@ -749,15 +749,15 @@ const ar = {
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
|
-
var lr = Object.getOwnPropertyDescriptor,
|
|
753
|
-
for (var
|
|
754
|
-
(
|
|
755
|
-
return
|
|
756
|
-
},
|
|
757
|
-
const pe = "custom-sort-dialog",
|
|
758
|
-
let
|
|
759
|
-
constructor(e, t, n, r, i, s,
|
|
760
|
-
super(), this._commandService = e, this._menuManagerService = t, this._dialogService = n, this._layoutService = r, this._uiPartsService =
|
|
752
|
+
var lr = Object.getOwnPropertyDescriptor, dr = (e, t, n, r) => {
|
|
753
|
+
for (var o = r > 1 ? void 0 : r ? lr(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
754
|
+
(s = e[i]) && (o = s(o) || o);
|
|
755
|
+
return o;
|
|
756
|
+
}, w = (e, t) => (n, r) => t(n, r, e);
|
|
757
|
+
const pe = "custom-sort-dialog", ur = 560;
|
|
758
|
+
let W = class extends Ye {
|
|
759
|
+
constructor(e, t, n, r, o, i, s, a, l, u) {
|
|
760
|
+
super(), this._commandService = e, this._menuManagerService = t, this._dialogService = n, this._layoutService = r, this._uiPartsService = o, this._sheetRenderService = i, this._localeService = s, this._sheetsSortUIService = a, this._injector = l, this._componentManager = u, this._initCommands(), this._initMenu(), this._initUI();
|
|
761
761
|
}
|
|
762
762
|
_initMenu() {
|
|
763
763
|
this._menuManagerService.mergeMenu(ar);
|
|
@@ -766,25 +766,25 @@ let G = class extends Ye {
|
|
|
766
766
|
[
|
|
767
767
|
re,
|
|
768
768
|
ne,
|
|
769
|
+
oe,
|
|
769
770
|
ie,
|
|
770
771
|
se,
|
|
771
|
-
oe,
|
|
772
772
|
ce,
|
|
773
773
|
ae,
|
|
774
774
|
le,
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
de,
|
|
776
|
+
ue
|
|
777
777
|
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(Qe.id));
|
|
778
778
|
}
|
|
779
779
|
_initUI() {
|
|
780
780
|
this.disposeWithMe(
|
|
781
|
-
this._uiPartsService.registerComponent(
|
|
781
|
+
this._uiPartsService.registerComponent(ot.FILTER_PANEL_EMBED_POINT, () => vt(qt, this._injector))
|
|
782
782
|
), [
|
|
783
|
-
["CustomSortPanel",
|
|
784
|
-
[
|
|
783
|
+
["CustomSortPanel", Gt],
|
|
784
|
+
[j, ee],
|
|
785
785
|
[he, Le],
|
|
786
786
|
[ge, te],
|
|
787
|
-
[
|
|
787
|
+
[Ce, De],
|
|
788
788
|
[ve, Ne]
|
|
789
789
|
].forEach(([e, t]) => {
|
|
790
790
|
this.disposeWithMe(
|
|
@@ -798,7 +798,7 @@ let G = class extends Ye {
|
|
|
798
798
|
this._dialogService.open({
|
|
799
799
|
id: pe,
|
|
800
800
|
draggable: !0,
|
|
801
|
-
width:
|
|
801
|
+
width: ur,
|
|
802
802
|
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${tt(e.range)}` },
|
|
803
803
|
children: { label: "CustomSortPanel" },
|
|
804
804
|
destroyOnClose: !0,
|
|
@@ -812,28 +812,28 @@ let G = class extends Ye {
|
|
|
812
812
|
this._dialogService.close(pe), queueMicrotask(() => this._layoutService.focus());
|
|
813
813
|
}
|
|
814
814
|
};
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
],
|
|
815
|
+
W = dr([
|
|
816
|
+
w(0, _e),
|
|
817
|
+
w(1, dt),
|
|
818
|
+
w(2, ut),
|
|
819
|
+
w(3, ht),
|
|
820
|
+
w(4, gt),
|
|
821
|
+
w(5, R(nt)),
|
|
822
|
+
w(6, R(P)),
|
|
823
|
+
w(7, R(g)),
|
|
824
|
+
w(8, R(Ie)),
|
|
825
|
+
w(9, R(Ct))
|
|
826
|
+
], W);
|
|
827
827
|
function hr() {
|
|
828
828
|
return { x: 0, y: 0 };
|
|
829
829
|
}
|
|
830
|
-
var gr = Object.defineProperty,
|
|
831
|
-
for (var
|
|
832
|
-
(
|
|
833
|
-
return
|
|
830
|
+
var gr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, vr = (e, t, n) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mr = (e, t, n, r) => {
|
|
831
|
+
for (var o = r > 1 ? void 0 : r ? Cr(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
832
|
+
(s = e[i]) && (o = s(o) || o);
|
|
833
|
+
return o;
|
|
834
834
|
}, ye = (e, t) => (n, r) => t(n, r, e), $e = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
835
835
|
const fr = "SHEET_SORT_UI_PLUGIN";
|
|
836
|
-
let
|
|
836
|
+
let z = class extends Ke {
|
|
837
837
|
constructor(e = Se, t, n) {
|
|
838
838
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
839
839
|
const { ...r } = Je(
|
|
@@ -841,35 +841,35 @@ let W = class extends Ke {
|
|
|
841
841
|
Se,
|
|
842
842
|
this._config
|
|
843
843
|
);
|
|
844
|
-
this._configService.setConfig(
|
|
844
|
+
this._configService.setConfig(Rt, r);
|
|
845
845
|
}
|
|
846
846
|
onStarting() {
|
|
847
847
|
[
|
|
848
848
|
[g],
|
|
849
|
-
[
|
|
849
|
+
[W]
|
|
850
850
|
].forEach((e) => this._injector.add(e));
|
|
851
851
|
}
|
|
852
852
|
onRendered() {
|
|
853
|
-
this._injector.get(
|
|
853
|
+
this._injector.get(W);
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
|
-
$e(
|
|
857
|
-
$e(
|
|
858
|
-
|
|
856
|
+
$e(z, "type", Y.UNIVER_SHEET);
|
|
857
|
+
$e(z, "pluginName", fr);
|
|
858
|
+
z = mr([
|
|
859
859
|
qe(et),
|
|
860
|
-
ye(1,
|
|
860
|
+
ye(1, R(Ie)),
|
|
861
861
|
ye(2, Xe)
|
|
862
|
-
],
|
|
862
|
+
], z);
|
|
863
863
|
export {
|
|
864
864
|
re as SortRangeAscCommand,
|
|
865
865
|
ne as SortRangeAscExtCommand,
|
|
866
866
|
ae as SortRangeAscExtInCtxMenuCommand,
|
|
867
867
|
ce as SortRangeAscInCtxMenuCommand,
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
868
|
+
se as SortRangeCustomCommand,
|
|
869
|
+
ue as SortRangeCustomInCtxMenuCommand,
|
|
870
|
+
oe as SortRangeDescCommand,
|
|
871
|
+
ie as SortRangeDescExtCommand,
|
|
872
|
+
de as SortRangeDescExtInCtxMenuCommand,
|
|
873
873
|
le as SortRangeDescInCtxMenuCommand,
|
|
874
|
-
|
|
874
|
+
z as UniverSheetsSortUIPlugin
|
|
875
875
|
};
|