@univerjs/sheets-sort-ui 0.8.0 → 0.8.1-nightly.202506131607
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 +174 -177
- package/lib/index.css +1 -1
- package/lib/index.js +174 -177
- package/lib/types/services/sheets-sort-ui.service.d.ts +2 -3
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var Ve = Object.defineProperty;
|
|
2
2
|
var Ge = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var K = (e, t, n) => Ge(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { LocaleService as P, IUniverInstanceService as xe,
|
|
5
|
-
import { SheetsSortService as we, SortType as U, SortRangeCommand as
|
|
6
|
-
import { serializeRange as
|
|
7
|
-
import { getCurrentRangeDisable$ as
|
|
8
|
-
import { useDependency as E, IConfirmService as
|
|
9
|
-
import { BehaviorSubject as
|
|
4
|
+
import { LocaleService as P, IUniverInstanceService as xe, Inject as R, ICommandService as _e, Disposable as We, UniverInstanceType as Y, Tools as ze, LocaleType as J, CommandType as M, throttle as Ye, Injector as Ie, RxDisposable as qe, DependentOn as Xe, IConfigService as Ke, Plugin as Je, merge as Qe } from "@univerjs/core";
|
|
5
|
+
import { SheetsSortService as we, SortType as U, SortRangeCommand as et, UniverSheetsSortPlugin as tt } from "@univerjs/sheets-sort";
|
|
6
|
+
import { serializeRange as rt } from "@univerjs/engine-formula";
|
|
7
|
+
import { getCurrentRangeDisable$ as O, getCurrentExclusiveRangeInterest$ as nt, SheetsRenderService as ot, SheetsUIPart as it } from "@univerjs/sheets-ui";
|
|
8
|
+
import { useDependency as E, IConfirmService as st, useObservable as ct, MenuItemType as S, getMenuHiddenObservable as Me, ContextMenuPosition as at, ContextMenuGroup as lt, RibbonDataGroup as dt, IMenuManagerService as ut, IDialogService as ht, ILayoutService as gt, IUIPartsService as Ct, ComponentManager as mt, connectInjector as vt } from "@univerjs/ui";
|
|
9
|
+
import { BehaviorSubject as ft, takeUntil as St } from "rxjs";
|
|
10
10
|
import { jsxs as C, jsx as c } from "react/jsx-runtime";
|
|
11
|
-
import { SheetsSelectionsService as
|
|
12
|
-
import { RadioGroup as Re, Radio as V, Checkbox as
|
|
13
|
-
import { forwardRef as y, useRef as
|
|
14
|
-
const
|
|
11
|
+
import { SheetsSelectionsService as pt, getPrimaryForRange as yt, SetSelectionsOperation as xt, expandToContinuousRange as fe, getSheetCommandTarget as _t, RangeProtectionPermissionEditPoint as N, WorksheetSortPermission as k, WorksheetEditPermission as L, WorkbookEditablePermission as D } from "@univerjs/sheets";
|
|
12
|
+
import { RadioGroup as Re, Radio as V, Checkbox as It, clsx as Ee, DraggableList as wt, scrollbarClassName as Te, Button as G, Dropdown as Mt, ButtonGroup as Rt } from "@univerjs/design";
|
|
13
|
+
import { forwardRef as y, useRef as be, createElement as x, useState as Z, useCallback as b, useEffect as Oe } from "react";
|
|
14
|
+
const Et = "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++) {
|
|
@@ -28,15 +28,15 @@ var f = function() {
|
|
|
28
28
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
29
29
|
return n;
|
|
30
30
|
}, _ = y(function(e, t) {
|
|
31
|
-
var n = e.icon, r = e.id, o = e.className, i = e.extend, s = Tt(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l =
|
|
31
|
+
var n = e.icon, r = e.id, o = e.className, i = e.extend, s = Tt(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = be("_".concat(Nt()));
|
|
32
32
|
return Ne(n, "".concat(r), { defIds: n.defIds, idSuffix: l.current }, f({ ref: t, className: a }, s), i);
|
|
33
33
|
});
|
|
34
34
|
function Ne(e, t, n, r, o) {
|
|
35
|
-
return x(e.tag, f(f({ key: t },
|
|
35
|
+
return x(e.tag, f(f({ key: t }, bt(e, n, o)), r), (Ot(e, n).children || []).map(function(i, s) {
|
|
36
36
|
return Ne(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
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
42
|
var s = i[0], a = i[1];
|
|
@@ -48,97 +48,97 @@ function Ot(e, t, n) {
|
|
|
48
48
|
typeof a == "string" && (r[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
49
49
|
})), r;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ot(e, t) {
|
|
52
52
|
var n, r = t.defIds;
|
|
53
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
54
|
return typeof o.attrs.id == "string" && r && r.includes(o.attrs.id) ? f(f({}, o), { attrs: f(f({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
55
55
|
}) }) : e;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Nt() {
|
|
58
58
|
return Math.random().toString(36).substring(2, 8);
|
|
59
59
|
}
|
|
60
60
|
_.displayName = "UniverIcon";
|
|
61
|
-
var
|
|
61
|
+
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: "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
62
|
return x(_, Object.assign({}, e, {
|
|
63
63
|
id: "ascending-icon",
|
|
64
64
|
ref: t,
|
|
65
|
-
icon:
|
|
65
|
+
icon: kt
|
|
66
66
|
}));
|
|
67
67
|
});
|
|
68
68
|
ee.displayName = "AscendingIcon";
|
|
69
|
-
var
|
|
69
|
+
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: "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" } }] }, ke = y(function(e, t) {
|
|
70
70
|
return x(_, Object.assign({}, e, {
|
|
71
71
|
id: "check-mark-icon",
|
|
72
72
|
ref: t,
|
|
73
|
-
icon:
|
|
73
|
+
icon: Lt
|
|
74
74
|
}));
|
|
75
75
|
});
|
|
76
76
|
ke.displayName = "CheckMarkIcon";
|
|
77
|
-
var
|
|
77
|
+
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: "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" } }] }, Le = y(function(e, t) {
|
|
78
78
|
return x(_, Object.assign({}, e, {
|
|
79
79
|
id: "custom-sort-icon",
|
|
80
80
|
ref: t,
|
|
81
|
-
icon:
|
|
81
|
+
icon: Dt
|
|
82
82
|
}));
|
|
83
83
|
});
|
|
84
84
|
Le.displayName = "CustomSortIcon";
|
|
85
|
-
var
|
|
85
|
+
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: "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" } }] }, De = y(function(e, t) {
|
|
86
86
|
return x(_, Object.assign({}, e, {
|
|
87
87
|
id: "delete-empty-icon",
|
|
88
88
|
ref: t,
|
|
89
|
-
icon:
|
|
89
|
+
icon: Ht
|
|
90
90
|
}));
|
|
91
91
|
});
|
|
92
92
|
De.displayName = "DeleteEmptyIcon";
|
|
93
|
-
var
|
|
93
|
+
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: "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
94
|
return x(_, Object.assign({}, e, {
|
|
95
95
|
id: "descending-icon",
|
|
96
96
|
ref: t,
|
|
97
|
-
icon:
|
|
97
|
+
icon: Ut
|
|
98
98
|
}));
|
|
99
99
|
});
|
|
100
100
|
te.displayName = "DescendingIcon";
|
|
101
|
-
var
|
|
101
|
+
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 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" } }] }, He = y(function(e, t) {
|
|
102
102
|
return x(_, Object.assign({}, e, {
|
|
103
103
|
id: "expand-ascending-icon",
|
|
104
104
|
ref: t,
|
|
105
|
-
icon:
|
|
105
|
+
icon: Pt
|
|
106
106
|
}));
|
|
107
107
|
});
|
|
108
108
|
He.displayName = "ExpandAscendingIcon";
|
|
109
|
-
var
|
|
109
|
+
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: "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" } }] }, Ue = y(function(e, t) {
|
|
110
110
|
return x(_, Object.assign({}, e, {
|
|
111
111
|
id: "expand-descending-icon",
|
|
112
112
|
ref: t,
|
|
113
|
-
icon:
|
|
113
|
+
icon: At
|
|
114
114
|
}));
|
|
115
115
|
});
|
|
116
116
|
Ue.displayName = "ExpandDescendingIcon";
|
|
117
|
-
var
|
|
117
|
+
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: "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
118
|
return x(_, Object.assign({}, e, {
|
|
119
119
|
id: "increase-icon",
|
|
120
120
|
ref: t,
|
|
121
|
-
icon:
|
|
121
|
+
icon: $t
|
|
122
122
|
}));
|
|
123
123
|
});
|
|
124
124
|
Q.displayName = "IncreaseIcon";
|
|
125
|
-
var
|
|
125
|
+
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: "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" } }] }, Pe = y(function(e, t) {
|
|
126
126
|
return x(_, Object.assign({}, e, {
|
|
127
127
|
id: "more-down-icon",
|
|
128
128
|
ref: t,
|
|
129
|
-
icon:
|
|
129
|
+
icon: Zt
|
|
130
130
|
}));
|
|
131
131
|
});
|
|
132
132
|
Pe.displayName = "MoreDownIcon";
|
|
133
|
-
var
|
|
133
|
+
var jt = { 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" } }] }] }, Ae = y(function(e, t) {
|
|
134
134
|
return x(_, Object.assign({}, e, {
|
|
135
135
|
id: "sequence-icon",
|
|
136
136
|
ref: t,
|
|
137
|
-
icon:
|
|
137
|
+
icon: jt
|
|
138
138
|
}));
|
|
139
139
|
});
|
|
140
140
|
Ae.displayName = "SequenceIcon";
|
|
141
|
-
const
|
|
141
|
+
const Bt = (e) => {
|
|
142
142
|
const [t, n] = Z("0"), r = E(P);
|
|
143
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") }),
|
|
@@ -159,23 +159,23 @@ const Ft = (e) => {
|
|
|
159
159
|
)
|
|
160
160
|
] });
|
|
161
161
|
};
|
|
162
|
-
var
|
|
163
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
162
|
+
var Ft = Object.getOwnPropertyDescriptor, Vt = (e, t, n, r) => {
|
|
163
|
+
for (var o = r > 1 ? void 0 : r ? Ft(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
164
164
|
(s = e[i]) && (o = s(o) || o);
|
|
165
165
|
return o;
|
|
166
|
-
},
|
|
166
|
+
}, H = (e, t) => (n, r) => t(n, r, e);
|
|
167
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, o, i, s
|
|
173
|
+
let g = class extends We {
|
|
174
|
+
constructor(t, n, r, o, i, s) {
|
|
175
175
|
super();
|
|
176
|
-
K(this, "_customSortState$", new
|
|
176
|
+
K(this, "_customSortState$", new ft(null));
|
|
177
177
|
K(this, "customSortState$", this._customSortState$.asObservable());
|
|
178
|
-
this._univerInstanceService = t, this._confirmService = n, this.
|
|
178
|
+
this._univerInstanceService = t, this._confirmService = n, this._selectionManagerService = r, this._sheetsSortService = o, this._localeService = i, this._commandService = s;
|
|
179
179
|
}
|
|
180
180
|
async triggerSortDirectly(t, n, r) {
|
|
181
181
|
const o = r || await this._detectSortLocation(n);
|
|
@@ -205,13 +205,13 @@ let g = class extends ze {
|
|
|
205
205
|
const { unitId: r, subUnitId: o, range: i } = n, s = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
206
206
|
if (!s)
|
|
207
207
|
return [];
|
|
208
|
-
const a =
|
|
208
|
+
const a = Gt(this._localeService);
|
|
209
209
|
return Array.from({ length: i.endColumn - i.startColumn + 1 }, (I, v) => {
|
|
210
210
|
var m;
|
|
211
|
-
const
|
|
211
|
+
const T = (m = s.getCell(i.startRow, v + i.startColumn)) == null ? void 0 : m.v;
|
|
212
212
|
return {
|
|
213
213
|
index: v + i.startColumn,
|
|
214
|
-
label: t ? `${
|
|
214
|
+
label: t ? `${T != null ? T : a(v + i.startColumn)}` : a(v + i.startColumn)
|
|
215
215
|
};
|
|
216
216
|
});
|
|
217
217
|
}
|
|
@@ -223,9 +223,9 @@ let g = class extends ze {
|
|
|
223
223
|
const i = {
|
|
224
224
|
unitId: t,
|
|
225
225
|
subUnitId: n,
|
|
226
|
-
selections: [{ range: r, primary:
|
|
226
|
+
selections: [{ range: r, primary: yt(r, o), style: null }]
|
|
227
227
|
};
|
|
228
|
-
this._commandService.executeCommand(
|
|
228
|
+
this._commandService.executeCommand(xt.id, i);
|
|
229
229
|
}
|
|
230
230
|
async showCheckError(t) {
|
|
231
231
|
return await this._confirmService.confirm({
|
|
@@ -235,7 +235,9 @@ let g = class extends ze {
|
|
|
235
235
|
},
|
|
236
236
|
children: {
|
|
237
237
|
title: /* @__PURE__ */ c("div", { children: this._localeService.t(t) })
|
|
238
|
-
}
|
|
238
|
+
},
|
|
239
|
+
cancelText: this._localeService.t("sheets-sort.dialog.cancel"),
|
|
240
|
+
confirmText: this._localeService.t("sheets-sort.dialog.confirm")
|
|
239
241
|
});
|
|
240
242
|
}
|
|
241
243
|
async showExtendConfirm() {
|
|
@@ -247,7 +249,7 @@ let g = class extends ze {
|
|
|
247
249
|
},
|
|
248
250
|
children: {
|
|
249
251
|
title: /* @__PURE__ */ c(
|
|
250
|
-
|
|
252
|
+
Bt,
|
|
251
253
|
{
|
|
252
254
|
onChange: (r) => {
|
|
253
255
|
t = r === "1";
|
|
@@ -255,7 +257,9 @@ let g = class extends ze {
|
|
|
255
257
|
}
|
|
256
258
|
)
|
|
257
259
|
},
|
|
258
|
-
width: 400
|
|
260
|
+
width: 400,
|
|
261
|
+
cancelText: this._localeService.t("sheets-sort.dialog.cancel"),
|
|
262
|
+
confirmText: this._localeService.t("sheets-sort.dialog.confirm")
|
|
259
263
|
}) ? t ? "extend" : "keep" : "cancel";
|
|
260
264
|
}
|
|
261
265
|
showCustomSortPanel(t) {
|
|
@@ -290,18 +294,17 @@ let g = class extends ze {
|
|
|
290
294
|
};
|
|
291
295
|
}
|
|
292
296
|
};
|
|
293
|
-
g =
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
T(6, _e)
|
|
297
|
+
g = Vt([
|
|
298
|
+
H(0, xe),
|
|
299
|
+
H(1, st),
|
|
300
|
+
H(2, R(pt)),
|
|
301
|
+
H(3, R(we)),
|
|
302
|
+
H(4, R(P)),
|
|
303
|
+
H(5, _e)
|
|
301
304
|
], g);
|
|
302
|
-
function
|
|
305
|
+
function Gt(e) {
|
|
303
306
|
return (t) => {
|
|
304
|
-
const n =
|
|
307
|
+
const n = ze.chatAtABC(t);
|
|
305
308
|
switch (e.getCurrentLocale()) {
|
|
306
309
|
case J.ZH_CN:
|
|
307
310
|
return `"${n}"列`;
|
|
@@ -353,39 +356,39 @@ const re = {
|
|
|
353
356
|
type: M.COMMAND,
|
|
354
357
|
handler: async (e) => await e.get(g).triggerSortCustomize()
|
|
355
358
|
};
|
|
356
|
-
function
|
|
357
|
-
const e = E(g), t =
|
|
358
|
-
return !t || !t.location ? null : /* @__PURE__ */ c(
|
|
359
|
+
function Wt() {
|
|
360
|
+
const e = E(g), t = ct(e.customSortState$);
|
|
361
|
+
return !t || !t.location ? null : /* @__PURE__ */ c(zt, { state: t });
|
|
359
362
|
}
|
|
360
|
-
function
|
|
361
|
-
const t = E(we), n = E(P), r = E(g), [o, i] = Z(!1), [s, a] = Z(0), l =
|
|
363
|
+
function zt({ state: e }) {
|
|
364
|
+
const t = E(we), n = E(P), r = E(g), [o, i] = Z(!1), [s, a] = Z(0), l = be(null), { range: u, unitId: I, subUnitId: v } = e.location, T = r.getTitles(o), [m, A] = Z([
|
|
362
365
|
{ type: U.ASC, colIndex: u.startColumn }
|
|
363
|
-
]), q =
|
|
366
|
+
]), q = b((d, p) => {
|
|
364
367
|
const $ = [...m];
|
|
365
368
|
p === null ? $.splice(d, 1) : $[d] = p, A($);
|
|
366
|
-
}, [m]), B =
|
|
367
|
-
|
|
368
|
-
const d = [...m], p =
|
|
369
|
+
}, [m]), B = b(
|
|
370
|
+
Ye(() => {
|
|
371
|
+
const d = [...m], p = qt(u, m);
|
|
369
372
|
p !== null && (d.push({ type: U.ASC, colIndex: p }), A(d));
|
|
370
373
|
}, 200),
|
|
371
374
|
[m, u]
|
|
372
|
-
), h =
|
|
375
|
+
), h = b((d, p) => {
|
|
373
376
|
t.applySort({ range: u, orderRules: d, hasTitle: p }), r.closeCustomSortPanel();
|
|
374
|
-
}, [t, r, u]), X =
|
|
377
|
+
}, [t, r, u]), X = b(() => {
|
|
375
378
|
r.closeCustomSortPanel();
|
|
376
|
-
}, [r]), Be =
|
|
379
|
+
}, [r]), Be = b((d) => {
|
|
377
380
|
i(d), d ? r.setSelection(I, v, { ...u, startRow: u.startRow + 1 }) : r.setSelection(I, v, u);
|
|
378
381
|
}, [r, u, v, I]);
|
|
379
382
|
Oe(() => {
|
|
380
383
|
l.current && m.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
381
384
|
}, [m]);
|
|
382
|
-
const Fe = m.length <
|
|
385
|
+
const Fe = m.length < T.length, ve = m.map((d) => ({ ...d, id: `${d.colIndex}` }));
|
|
383
386
|
return /* @__PURE__ */ C("div", { children: [
|
|
384
387
|
/* @__PURE__ */ C("div", { onMouseDown: (d) => {
|
|
385
388
|
d.stopPropagation();
|
|
386
389
|
}, children: [
|
|
387
390
|
/* @__PURE__ */ C("div", { className: "univer-flex univer-items-center univer-justify-between", children: [
|
|
388
|
-
/* @__PURE__ */ c(
|
|
391
|
+
/* @__PURE__ */ c(It, { checked: o, onChange: (d) => Be(!!d), children: n.t("sheets-sort.dialog.first-row-check") }),
|
|
389
392
|
Fe ? /* @__PURE__ */ C(
|
|
390
393
|
"div",
|
|
391
394
|
{
|
|
@@ -411,22 +414,22 @@ function Yt({ state: e }) {
|
|
|
411
414
|
"div",
|
|
412
415
|
{
|
|
413
416
|
ref: l,
|
|
414
|
-
className: Ee("univer-max-h-[310px] univer-overflow-y-auto univer-overflow-x-hidden",
|
|
417
|
+
className: Ee("univer-max-h-[310px] univer-overflow-y-auto univer-overflow-x-hidden", Te),
|
|
415
418
|
onScroll: (d) => {
|
|
416
419
|
const p = d.currentTarget.scrollTop;
|
|
417
420
|
a(p);
|
|
418
421
|
},
|
|
419
422
|
children: /* @__PURE__ */ c(
|
|
420
|
-
|
|
423
|
+
wt,
|
|
421
424
|
{
|
|
422
425
|
list: ve,
|
|
423
426
|
onListChange: A,
|
|
424
427
|
idKey: "id",
|
|
425
428
|
draggableHandle: "[data-u-comp=sort-panel-item-handler]",
|
|
426
429
|
itemRender: (d) => /* @__PURE__ */ c(
|
|
427
|
-
|
|
430
|
+
Yt,
|
|
428
431
|
{
|
|
429
|
-
titles:
|
|
432
|
+
titles: T,
|
|
430
433
|
list: ve,
|
|
431
434
|
item: d,
|
|
432
435
|
onChange: (p, $) => q($, p),
|
|
@@ -461,11 +464,11 @@ function Yt({ state: e }) {
|
|
|
461
464
|
] })
|
|
462
465
|
] });
|
|
463
466
|
}
|
|
464
|
-
function
|
|
467
|
+
function Yt(e) {
|
|
465
468
|
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 =
|
|
469
|
+
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 = b((h) => {
|
|
467
470
|
o({ ...n, colIndex: h.index }, l), v(!1);
|
|
468
|
-
}, [l, n, o]), [I, v] = Z(!1),
|
|
471
|
+
}, [l, n, o]), [I, v] = Z(!1), T = (h) => {
|
|
469
472
|
v(h);
|
|
470
473
|
};
|
|
471
474
|
Oe(() => {
|
|
@@ -483,18 +486,18 @@ function qt(e) {
|
|
|
483
486
|
}
|
|
484
487
|
),
|
|
485
488
|
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
486
|
-
|
|
489
|
+
Mt,
|
|
487
490
|
{
|
|
488
491
|
align: "start",
|
|
489
492
|
overlay: /* @__PURE__ */ c(
|
|
490
493
|
"ul",
|
|
491
494
|
{
|
|
492
|
-
className: Ee("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",
|
|
495
|
+
className: Ee("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", Te),
|
|
493
496
|
children: a.map((h) => /* @__PURE__ */ C(
|
|
494
497
|
"li",
|
|
495
498
|
{
|
|
496
499
|
onClick: () => u(h),
|
|
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
|
|
500
|
+
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 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
|
|
498
501
|
children: [
|
|
499
502
|
/* @__PURE__ */ c("span", { className: "univer-max-w-[220px] univer-truncate", children: h.label }),
|
|
500
503
|
/* @__PURE__ */ c("span", { children: h.index === n.colIndex && /* @__PURE__ */ c(ke, {}) })
|
|
@@ -505,7 +508,7 @@ function qt(e) {
|
|
|
505
508
|
}
|
|
506
509
|
),
|
|
507
510
|
open: I,
|
|
508
|
-
onOpenChange:
|
|
511
|
+
onOpenChange: T,
|
|
509
512
|
children: /* @__PURE__ */ C(
|
|
510
513
|
"div",
|
|
511
514
|
{
|
|
@@ -539,19 +542,19 @@ function qt(e) {
|
|
|
539
542
|
]
|
|
540
543
|
}
|
|
541
544
|
) }),
|
|
542
|
-
/* @__PURE__ */ c("div", { className: "univer-absolute univer-right-0 univer-cursor-pointer univer-text-sm
|
|
545
|
+
/* @__PURE__ */ c("div", { className: "univer-s-[14px] univer-absolute univer-right-0 univer-cursor-pointer univer-text-sm", children: m && /* @__PURE__ */ c(De, { onClick: () => o(null, l) }) })
|
|
543
546
|
] });
|
|
544
547
|
}
|
|
545
|
-
function
|
|
548
|
+
function qt(e, t) {
|
|
546
549
|
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((i) => i == null ? void 0 : i.colIndex));
|
|
547
550
|
for (let i = n; i <= r; i++)
|
|
548
551
|
if (!o.has(i))
|
|
549
552
|
return i;
|
|
550
553
|
return null;
|
|
551
554
|
}
|
|
552
|
-
function
|
|
553
|
-
const { range: t, colIndex: n, onClose: r } = e, o = E(g), i = E(xe), s = E(P), a =
|
|
554
|
-
const { unitId: u, subUnitId: I } =
|
|
555
|
+
function Xt(e) {
|
|
556
|
+
const { range: t, colIndex: n, onClose: r } = e, o = E(g), i = E(xe), s = E(P), a = b((l) => {
|
|
557
|
+
const { unitId: u, subUnitId: I } = _t(i) || {};
|
|
555
558
|
if (t && u && I) {
|
|
556
559
|
const v = { ...t, startRow: t.startRow + 1 };
|
|
557
560
|
o.triggerSortDirectly(l, !1, { unitId: u, subUnitId: I, range: v, colIndex: n });
|
|
@@ -559,44 +562,38 @@ function Kt(e) {
|
|
|
559
562
|
throw new Error(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${I}, range: ${t}, colIndex: ${n}`);
|
|
560
563
|
r();
|
|
561
564
|
}, [t, n, o, i, r]);
|
|
562
|
-
return /* @__PURE__ */ C(
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
/* @__PURE__ */ c(te, {}),
|
|
573
|
-
s.t("sheets-sort.general.sort-desc")
|
|
574
|
-
] })
|
|
575
|
-
]
|
|
576
|
-
}
|
|
577
|
-
);
|
|
565
|
+
return /* @__PURE__ */ C(Rt, { className: "univer-mb-3 univer-w-full univer-grid-cols-2", children: [
|
|
566
|
+
/* @__PURE__ */ C(G, { onClick: () => a(!0), children: [
|
|
567
|
+
/* @__PURE__ */ c(ee, {}),
|
|
568
|
+
s.t("sheets-sort.general.sort-asc")
|
|
569
|
+
] }),
|
|
570
|
+
/* @__PURE__ */ C(G, { onClick: () => a(!1), children: [
|
|
571
|
+
/* @__PURE__ */ c(te, {}),
|
|
572
|
+
s.t("sheets-sort.general.sort-desc")
|
|
573
|
+
] })
|
|
574
|
+
] });
|
|
578
575
|
}
|
|
579
576
|
const $e = "sheet.menu.sheets-sort", Ze = "sheet.menu.sheets-sort-ctx", j = "AscendingIcon", he = "ExpandAscendingIcon", ge = "DescendingIcon", Ce = "ExpandDescendingIcon", me = "CustomSortIcon";
|
|
580
|
-
function
|
|
577
|
+
function Kt(e) {
|
|
581
578
|
return {
|
|
582
579
|
id: $e,
|
|
583
580
|
type: S.SUBITEMS,
|
|
584
581
|
icon: j,
|
|
585
582
|
tooltip: "sheets-sort.general.sort",
|
|
586
583
|
hidden$: Me(e, Y.UNIVER_SHEET),
|
|
587
|
-
disabled$:
|
|
584
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
588
585
|
};
|
|
589
586
|
}
|
|
590
|
-
function
|
|
587
|
+
function Jt(e) {
|
|
591
588
|
return {
|
|
592
589
|
id: re.id,
|
|
593
590
|
icon: j,
|
|
594
591
|
title: "sheets-sort.general.sort-asc-cur",
|
|
595
592
|
type: S.BUTTON,
|
|
596
|
-
hidden$:
|
|
593
|
+
hidden$: nt(e)
|
|
597
594
|
};
|
|
598
595
|
}
|
|
599
|
-
function
|
|
596
|
+
function Qt(e) {
|
|
600
597
|
return {
|
|
601
598
|
id: ne.id,
|
|
602
599
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -604,7 +601,7 @@ function er(e) {
|
|
|
604
601
|
type: S.BUTTON
|
|
605
602
|
};
|
|
606
603
|
}
|
|
607
|
-
function
|
|
604
|
+
function er(e) {
|
|
608
605
|
return {
|
|
609
606
|
id: oe.id,
|
|
610
607
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -612,7 +609,7 @@ function tr(e) {
|
|
|
612
609
|
type: S.BUTTON
|
|
613
610
|
};
|
|
614
611
|
}
|
|
615
|
-
function
|
|
612
|
+
function tr(e) {
|
|
616
613
|
return {
|
|
617
614
|
id: ie.id,
|
|
618
615
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -620,7 +617,7 @@ function rr(e) {
|
|
|
620
617
|
type: S.BUTTON
|
|
621
618
|
};
|
|
622
619
|
}
|
|
623
|
-
function
|
|
620
|
+
function rr(e) {
|
|
624
621
|
return {
|
|
625
622
|
id: se.id,
|
|
626
623
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -628,133 +625,133 @@ function nr(e) {
|
|
|
628
625
|
icon: me
|
|
629
626
|
};
|
|
630
627
|
}
|
|
631
|
-
function
|
|
628
|
+
function nr(e) {
|
|
632
629
|
return {
|
|
633
630
|
id: Ze,
|
|
634
631
|
title: "sheets-sort.general.sort",
|
|
635
632
|
type: S.SUBITEMS,
|
|
636
633
|
icon: j,
|
|
637
634
|
hidden$: Me(e, Y.UNIVER_SHEET),
|
|
638
|
-
disabled$:
|
|
639
|
-
workbookTypes: [
|
|
640
|
-
worksheetTypes: [
|
|
641
|
-
rangeTypes: [
|
|
635
|
+
disabled$: O(e, {
|
|
636
|
+
workbookTypes: [D],
|
|
637
|
+
worksheetTypes: [k, L],
|
|
638
|
+
rangeTypes: [N]
|
|
642
639
|
})
|
|
643
640
|
};
|
|
644
641
|
}
|
|
645
|
-
function
|
|
642
|
+
function or(e) {
|
|
646
643
|
return {
|
|
647
644
|
id: ce.id,
|
|
648
645
|
title: "sheets-sort.general.sort-asc-cur",
|
|
649
646
|
type: S.BUTTON,
|
|
650
647
|
icon: j,
|
|
651
|
-
disabled$:
|
|
648
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
652
649
|
};
|
|
653
650
|
}
|
|
654
|
-
function
|
|
651
|
+
function ir(e) {
|
|
655
652
|
return {
|
|
656
653
|
id: ae.id,
|
|
657
654
|
title: "sheets-sort.general.sort-asc-ext",
|
|
658
655
|
type: S.BUTTON,
|
|
659
656
|
icon: he,
|
|
660
|
-
disabled$:
|
|
657
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
661
658
|
};
|
|
662
659
|
}
|
|
663
|
-
function
|
|
660
|
+
function sr(e) {
|
|
664
661
|
return {
|
|
665
662
|
id: le.id,
|
|
666
663
|
title: "sheets-sort.general.sort-desc-cur",
|
|
667
664
|
type: S.BUTTON,
|
|
668
665
|
icon: ge,
|
|
669
|
-
disabled$:
|
|
666
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
670
667
|
};
|
|
671
668
|
}
|
|
672
|
-
function
|
|
669
|
+
function cr(e) {
|
|
673
670
|
return {
|
|
674
671
|
id: de.id,
|
|
675
672
|
title: "sheets-sort.general.sort-desc-ext",
|
|
676
673
|
type: S.BUTTON,
|
|
677
674
|
icon: Ce,
|
|
678
|
-
disabled$:
|
|
675
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
679
676
|
};
|
|
680
677
|
}
|
|
681
|
-
function
|
|
678
|
+
function ar(e) {
|
|
682
679
|
return {
|
|
683
680
|
id: ue.id,
|
|
684
681
|
title: "sheets-sort.general.sort-custom",
|
|
685
682
|
type: S.BUTTON,
|
|
686
683
|
icon: me,
|
|
687
|
-
disabled$:
|
|
684
|
+
disabled$: O(e, { workbookTypes: [D], worksheetTypes: [k, L], rangeTypes: [N] })
|
|
688
685
|
};
|
|
689
686
|
}
|
|
690
|
-
const
|
|
691
|
-
[
|
|
687
|
+
const lr = {
|
|
688
|
+
[dt.ORGANIZATION]: {
|
|
692
689
|
[$e]: {
|
|
693
690
|
order: 3,
|
|
694
|
-
menuItemFactory:
|
|
691
|
+
menuItemFactory: Kt,
|
|
695
692
|
[re.id]: {
|
|
696
693
|
order: 0,
|
|
697
|
-
menuItemFactory:
|
|
694
|
+
menuItemFactory: Jt
|
|
698
695
|
},
|
|
699
696
|
[ne.id]: {
|
|
700
697
|
order: 1,
|
|
701
|
-
menuItemFactory:
|
|
698
|
+
menuItemFactory: Qt
|
|
702
699
|
},
|
|
703
700
|
[oe.id]: {
|
|
704
701
|
order: 2,
|
|
705
|
-
menuItemFactory:
|
|
702
|
+
menuItemFactory: er
|
|
706
703
|
},
|
|
707
704
|
[ie.id]: {
|
|
708
705
|
order: 3,
|
|
709
|
-
menuItemFactory:
|
|
706
|
+
menuItemFactory: tr
|
|
710
707
|
},
|
|
711
708
|
[se.id]: {
|
|
712
709
|
order: 4,
|
|
713
|
-
menuItemFactory:
|
|
710
|
+
menuItemFactory: rr
|
|
714
711
|
}
|
|
715
712
|
}
|
|
716
713
|
},
|
|
717
|
-
[
|
|
718
|
-
[
|
|
714
|
+
[at.MAIN_AREA]: {
|
|
715
|
+
[lt.DATA]: {
|
|
719
716
|
[Ze]: {
|
|
720
717
|
order: 0,
|
|
721
|
-
menuItemFactory:
|
|
718
|
+
menuItemFactory: nr,
|
|
722
719
|
[ce.id]: {
|
|
723
720
|
order: 0,
|
|
724
|
-
menuItemFactory:
|
|
721
|
+
menuItemFactory: or
|
|
725
722
|
},
|
|
726
723
|
[ae.id]: {
|
|
727
724
|
order: 1,
|
|
728
|
-
menuItemFactory:
|
|
725
|
+
menuItemFactory: ir
|
|
729
726
|
},
|
|
730
727
|
[le.id]: {
|
|
731
728
|
order: 2,
|
|
732
|
-
menuItemFactory:
|
|
729
|
+
menuItemFactory: sr
|
|
733
730
|
},
|
|
734
731
|
[de.id]: {
|
|
735
732
|
order: 3,
|
|
736
|
-
menuItemFactory:
|
|
733
|
+
menuItemFactory: cr
|
|
737
734
|
},
|
|
738
735
|
[ue.id]: {
|
|
739
736
|
order: 4,
|
|
740
|
-
menuItemFactory:
|
|
737
|
+
menuItemFactory: ar
|
|
741
738
|
}
|
|
742
739
|
}
|
|
743
740
|
}
|
|
744
741
|
}
|
|
745
742
|
};
|
|
746
|
-
var
|
|
747
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
743
|
+
var dr = Object.getOwnPropertyDescriptor, ur = (e, t, n, r) => {
|
|
744
|
+
for (var o = r > 1 ? void 0 : r ? dr(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
748
745
|
(s = e[i]) && (o = s(o) || o);
|
|
749
746
|
return o;
|
|
750
747
|
}, w = (e, t) => (n, r) => t(n, r, e);
|
|
751
|
-
const pe = "custom-sort-dialog",
|
|
752
|
-
let W = class extends
|
|
748
|
+
const pe = "custom-sort-dialog", hr = 560;
|
|
749
|
+
let W = class extends qe {
|
|
753
750
|
constructor(e, t, n, r, o, i, s, a, l, u) {
|
|
754
751
|
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();
|
|
755
752
|
}
|
|
756
753
|
_initMenu() {
|
|
757
|
-
this._menuManagerService.mergeMenu(
|
|
754
|
+
this._menuManagerService.mergeMenu(lr);
|
|
758
755
|
}
|
|
759
756
|
_initCommands() {
|
|
760
757
|
[
|
|
@@ -768,13 +765,13 @@ let W = class extends Xe {
|
|
|
768
765
|
le,
|
|
769
766
|
de,
|
|
770
767
|
ue
|
|
771
|
-
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(
|
|
768
|
+
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(et.id));
|
|
772
769
|
}
|
|
773
770
|
_initUI() {
|
|
774
771
|
this.disposeWithMe(
|
|
775
|
-
this._uiPartsService.registerComponent(
|
|
772
|
+
this._uiPartsService.registerComponent(it.FILTER_PANEL_EMBED_POINT, () => vt(Xt, this._injector))
|
|
776
773
|
), [
|
|
777
|
-
["CustomSortPanel",
|
|
774
|
+
["CustomSortPanel", Wt],
|
|
778
775
|
[j, ee],
|
|
779
776
|
[he, He],
|
|
780
777
|
[ge, te],
|
|
@@ -784,7 +781,7 @@ let W = class extends Xe {
|
|
|
784
781
|
this.disposeWithMe(
|
|
785
782
|
this._componentManager.register(e, t)
|
|
786
783
|
);
|
|
787
|
-
}), this._sheetsSortUIService.customSortState$.pipe(
|
|
784
|
+
}), this._sheetsSortUIService.customSortState$.pipe(St(this.dispose$)).subscribe((e) => {
|
|
788
785
|
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
789
786
|
});
|
|
790
787
|
}
|
|
@@ -792,11 +789,11 @@ let W = class extends Xe {
|
|
|
792
789
|
this._dialogService.open({
|
|
793
790
|
id: pe,
|
|
794
791
|
draggable: !0,
|
|
795
|
-
width:
|
|
796
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${
|
|
792
|
+
width: hr,
|
|
793
|
+
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${rt(e.range)}` },
|
|
797
794
|
children: { label: "CustomSortPanel" },
|
|
798
795
|
destroyOnClose: !0,
|
|
799
|
-
defaultPosition:
|
|
796
|
+
defaultPosition: gr(),
|
|
800
797
|
preservePositionOnDestroy: !1,
|
|
801
798
|
onClose: () => this._closePanel(),
|
|
802
799
|
mask: !0
|
|
@@ -806,36 +803,36 @@ let W = class extends Xe {
|
|
|
806
803
|
this._dialogService.close(pe), queueMicrotask(() => this._layoutService.focus());
|
|
807
804
|
}
|
|
808
805
|
};
|
|
809
|
-
W =
|
|
806
|
+
W = ur([
|
|
810
807
|
w(0, _e),
|
|
811
|
-
w(1,
|
|
812
|
-
w(2,
|
|
813
|
-
w(3,
|
|
814
|
-
w(4,
|
|
815
|
-
w(5, R(
|
|
808
|
+
w(1, ut),
|
|
809
|
+
w(2, ht),
|
|
810
|
+
w(3, gt),
|
|
811
|
+
w(4, Ct),
|
|
812
|
+
w(5, R(ot)),
|
|
816
813
|
w(6, R(P)),
|
|
817
814
|
w(7, R(g)),
|
|
818
815
|
w(8, R(Ie)),
|
|
819
|
-
w(9, R(
|
|
816
|
+
w(9, R(mt))
|
|
820
817
|
], W);
|
|
821
|
-
function
|
|
818
|
+
function gr() {
|
|
822
819
|
return { x: 0, y: 0 };
|
|
823
820
|
}
|
|
824
|
-
var
|
|
825
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
821
|
+
var Cr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, vr = (e, t, n) => t in e ? Cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, fr = (e, t, n, r) => {
|
|
822
|
+
for (var o = r > 1 ? void 0 : r ? mr(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
826
823
|
(s = e[i]) && (o = s(o) || o);
|
|
827
824
|
return o;
|
|
828
|
-
}, ye = (e, t) => (n, r) => t(n, r, e), je = (e, t, n) =>
|
|
829
|
-
const
|
|
830
|
-
let z = class extends
|
|
825
|
+
}, ye = (e, t) => (n, r) => t(n, r, e), je = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
826
|
+
const Sr = "SHEET_SORT_UI_PLUGIN";
|
|
827
|
+
let z = class extends Je {
|
|
831
828
|
constructor(e = Se, t, n) {
|
|
832
829
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
833
|
-
const { ...r } =
|
|
830
|
+
const { ...r } = Qe(
|
|
834
831
|
{},
|
|
835
832
|
Se,
|
|
836
833
|
this._config
|
|
837
834
|
);
|
|
838
|
-
this._configService.setConfig(
|
|
835
|
+
this._configService.setConfig(Et, r);
|
|
839
836
|
}
|
|
840
837
|
onStarting() {
|
|
841
838
|
[
|
|
@@ -848,11 +845,11 @@ let z = class extends Qe {
|
|
|
848
845
|
}
|
|
849
846
|
};
|
|
850
847
|
je(z, "type", Y.UNIVER_SHEET);
|
|
851
|
-
je(z, "pluginName",
|
|
852
|
-
z =
|
|
853
|
-
|
|
848
|
+
je(z, "pluginName", Sr);
|
|
849
|
+
z = fr([
|
|
850
|
+
Xe(tt),
|
|
854
851
|
ye(1, R(Ie)),
|
|
855
|
-
ye(2,
|
|
852
|
+
ye(2, Ke)
|
|
856
853
|
], z);
|
|
857
854
|
export {
|
|
858
855
|
re as SortRangeAscCommand,
|