@univerjs/sheets-sort-ui 0.5.1 → 0.5.2
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 +4 -4
- package/lib/es/index.js +207 -203
- package/lib/index.css +1 -1
- package/lib/umd/index.js +4 -4
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var X = (e, t, n) =>
|
|
4
|
-
import { useDependency as O, LocaleService as H, Inject as E, Disposable as
|
|
5
|
-
import { SheetsSortService as
|
|
6
|
-
import { serializeRange as
|
|
7
|
-
import { getCurrentRangeDisable$ as w, getCurrentExclusiveRangeInterest$ as
|
|
8
|
-
import { IConfirmService as
|
|
9
|
-
import { BehaviorSubject as
|
|
10
|
-
import
|
|
11
|
-
import { SheetsSelectionsService as
|
|
12
|
-
import { RadioGroup as
|
|
13
|
-
const
|
|
1
|
+
var We = Object.defineProperty;
|
|
2
|
+
var qe = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var X = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { useDependency as O, LocaleService as H, Inject as E, Disposable as Ye, UniverInstanceType as q, IUniverInstanceService as Me, ILogService as Je, ICommandService as be, Tools as Xe, LocaleType as Q, CommandType as b, throttle as Ke, Injector as Ee, RxDisposable as Qe, connectInjector as et, DependentOn as tt, Plugin as nt, merge as rt, IConfigService as ot } from "@univerjs/core";
|
|
5
|
+
import { SheetsSortService as Oe, SortType as k, SortRangeCommand as st, UniverSheetsSortPlugin as it } from "@univerjs/sheets-sort";
|
|
6
|
+
import { serializeRange as ct } from "@univerjs/engine-formula";
|
|
7
|
+
import { getCurrentRangeDisable$ as w, getCurrentExclusiveRangeInterest$ as at, SheetsRenderService as lt, SheetsUIPart as dt } from "@univerjs/sheets-ui";
|
|
8
|
+
import { IConfirmService as ut, MenuItemType as _, getMenuHiddenObservable as Te, RibbonStartGroup as mt, ContextMenuPosition as ht, ContextMenuGroup as gt, ComponentManager as Ct, IMenuManagerService as St, IDialogService as ft, ILayoutService as pt, IUIPartsService as vt } from "@univerjs/ui";
|
|
9
|
+
import { BehaviorSubject as _t, takeUntil as xt } from "rxjs";
|
|
10
|
+
import It, { forwardRef as I, useRef as Pe, createElement as y, useState as B, useCallback as P, useEffect as we } from "react";
|
|
11
|
+
import { SheetsSelectionsService as yt, getPrimaryForRange as Rt, SetSelectionsOperation as Mt, expandToContinuousRange as pe, getSheetCommandTarget as bt, WorkbookEditablePermission as N, WorksheetSortPermission as L, WorksheetEditPermission as j, RangeProtectionPermissionEditPoint as D } from "@univerjs/sheets";
|
|
12
|
+
import { RadioGroup as Ne, Radio as Z, Checkbox as Et, DraggableList as Ot, Button as ve, DropdownLegacy as Tt } from "@univerjs/design";
|
|
13
|
+
const Pt = "sheets-sort-ui.config", _e = {};
|
|
14
14
|
var v = function() {
|
|
15
15
|
return v = Object.assign || function(e) {
|
|
16
16
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
@@ -19,7 +19,7 @@ var v = function() {
|
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
}, v.apply(this, arguments);
|
|
22
|
-
},
|
|
22
|
+
}, wt = function(e, t) {
|
|
23
23
|
var n = {};
|
|
24
24
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
25
25
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -27,15 +27,15 @@ var v = function() {
|
|
|
27
27
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
28
28
|
return n;
|
|
29
29
|
}, R = I(function(e, t) {
|
|
30
|
-
var n = e.icon, r = e.id, o = e.className, s = e.extend, c =
|
|
31
|
-
return
|
|
30
|
+
var n = e.icon, r = e.id, o = e.className, s = e.extend, c = wt(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), d = Pe("_".concat(jt()));
|
|
31
|
+
return Le(n, "".concat(r), { defIds: n.defIds, idSuffix: d.current }, v({ ref: t, className: l }, c), s);
|
|
32
32
|
});
|
|
33
|
-
function
|
|
34
|
-
return y(e.tag, v(v({ key: t },
|
|
35
|
-
return
|
|
33
|
+
function Le(e, t, n, r, o) {
|
|
34
|
+
return y(e.tag, v(v({ key: t }, Nt(e, n, o)), r), (Lt(e, n).children || []).map(function(s, c) {
|
|
35
|
+
return Le(s, "".concat(t, "-").concat(e.tag, "-").concat(c), n, void 0, o);
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Nt(e, t, n) {
|
|
39
39
|
var r = v({}, e.attrs);
|
|
40
40
|
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
|
|
41
41
|
var o = t.defIds;
|
|
@@ -44,96 +44,96 @@ function wt(e, t, n) {
|
|
|
44
44
|
typeof l == "string" && (r[c] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
45
45
|
})), r;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Lt(e, t) {
|
|
48
48
|
var n, r = t.defIds;
|
|
49
49
|
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? v(v({}, e), { children: e.children.map(function(o) {
|
|
50
50
|
return typeof o.attrs.id == "string" && r && r.indexOf(o.attrs.id) > -1 ? v(v({}, o), { attrs: v(v({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
51
51
|
}) }) : e;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function jt() {
|
|
54
54
|
return Math.random().toString(36).substring(2, 8);
|
|
55
55
|
}
|
|
56
56
|
R.displayName = "UniverIcon";
|
|
57
|
-
var
|
|
57
|
+
var Dt = { 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.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.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.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, te = I(function(e, t) {
|
|
58
58
|
return y(R, Object.assign({}, e, {
|
|
59
59
|
id: "ascending- single",
|
|
60
60
|
ref: t,
|
|
61
|
-
icon:
|
|
61
|
+
icon: Dt
|
|
62
62
|
}));
|
|
63
63
|
});
|
|
64
64
|
te.displayName = "AscendingSingle";
|
|
65
|
-
var
|
|
65
|
+
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" } }] }, je = I(function(e, t) {
|
|
66
66
|
return y(R, Object.assign({}, e, {
|
|
67
67
|
id: "check-mark-single",
|
|
68
68
|
ref: t,
|
|
69
|
-
icon:
|
|
69
|
+
icon: kt
|
|
70
70
|
}));
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
var
|
|
72
|
+
je.displayName = "CheckMarkSingle";
|
|
73
|
+
var Ht = { 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.5574 8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507 9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661 11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306zM6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512 7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574 6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588 4.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" } }] }, De = I(function(e, t) {
|
|
74
74
|
return y(R, Object.assign({}, e, {
|
|
75
75
|
id: "custom-sort-single",
|
|
76
76
|
ref: t,
|
|
77
|
-
icon:
|
|
77
|
+
icon: Ht
|
|
78
78
|
}));
|
|
79
79
|
});
|
|
80
|
-
|
|
81
|
-
var
|
|
80
|
+
De.displayName = "CustomSortSingle";
|
|
81
|
+
var Ut = { 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.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.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.64443 14.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 = I(function(e, t) {
|
|
82
82
|
return y(R, Object.assign({}, e, {
|
|
83
83
|
id: "delete-empty-single",
|
|
84
84
|
ref: t,
|
|
85
|
-
icon:
|
|
85
|
+
icon: Ut
|
|
86
86
|
}));
|
|
87
87
|
});
|
|
88
|
-
|
|
89
|
-
var
|
|
88
|
+
ke.displayName = "DeleteEmptySingle";
|
|
89
|
+
var $t = { 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.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.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.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ne = I(function(e, t) {
|
|
90
90
|
return y(R, Object.assign({}, e, {
|
|
91
91
|
id: "descending-single",
|
|
92
92
|
ref: t,
|
|
93
|
-
icon:
|
|
93
|
+
icon: $t
|
|
94
94
|
}));
|
|
95
95
|
});
|
|
96
96
|
ne.displayName = "DescendingSingle";
|
|
97
|
-
var
|
|
97
|
+
var At = { 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" } }] }, He = I(function(e, t) {
|
|
98
98
|
return y(R, Object.assign({}, e, {
|
|
99
99
|
id: "expand-ascending-single",
|
|
100
100
|
ref: t,
|
|
101
|
-
icon:
|
|
101
|
+
icon: At
|
|
102
102
|
}));
|
|
103
103
|
});
|
|
104
|
-
|
|
105
|
-
var
|
|
104
|
+
He.displayName = "ExpandAscendingSingle";
|
|
105
|
+
var Bt = { 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" } }] }, Ue = I(function(e, t) {
|
|
106
106
|
return y(R, Object.assign({}, e, {
|
|
107
107
|
id: "expand-descending-single",
|
|
108
108
|
ref: t,
|
|
109
|
-
icon:
|
|
109
|
+
icon: Bt
|
|
110
110
|
}));
|
|
111
111
|
});
|
|
112
|
-
|
|
113
|
-
var
|
|
112
|
+
Ue.displayName = "ExpandDescendingSingle";
|
|
113
|
+
var Ft = { 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" } }] }, ee = I(function(e, t) {
|
|
114
114
|
return y(R, Object.assign({}, e, {
|
|
115
115
|
id: "increase-single",
|
|
116
116
|
ref: t,
|
|
117
|
-
icon:
|
|
117
|
+
icon: Ft
|
|
118
118
|
}));
|
|
119
119
|
});
|
|
120
120
|
ee.displayName = "IncreaseSingle";
|
|
121
|
-
var
|
|
121
|
+
var Vt = { 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" } }] }, $e = I(function(e, t) {
|
|
122
122
|
return y(R, Object.assign({}, e, {
|
|
123
123
|
id: "more-down-single",
|
|
124
124
|
ref: t,
|
|
125
|
-
icon:
|
|
125
|
+
icon: Vt
|
|
126
126
|
}));
|
|
127
127
|
});
|
|
128
|
-
|
|
129
|
-
var
|
|
128
|
+
$e.displayName = "MoreDownSingle";
|
|
129
|
+
var zt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, 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 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Ae = I(function(e, t) {
|
|
130
130
|
return y(R, Object.assign({}, e, {
|
|
131
131
|
id: "sequence-single",
|
|
132
132
|
ref: t,
|
|
133
|
-
icon:
|
|
133
|
+
icon: zt
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
|
|
136
|
+
Ae.displayName = "SequenceSingle";
|
|
137
137
|
var K = { exports: {} }, A = {};
|
|
138
138
|
/**
|
|
139
139
|
* @license React
|
|
@@ -144,11 +144,11 @@ var K = { exports: {} }, A = {};
|
|
|
144
144
|
* This source code is licensed under the MIT license found in the
|
|
145
145
|
* LICENSE file in the root directory of this source tree.
|
|
146
146
|
*/
|
|
147
|
-
var
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
var e =
|
|
147
|
+
var xe;
|
|
148
|
+
function Zt() {
|
|
149
|
+
if (xe) return A;
|
|
150
|
+
xe = 1;
|
|
151
|
+
var e = It, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
152
152
|
function c(l, d, u) {
|
|
153
153
|
var h, g = {}, p = null, S = null;
|
|
154
154
|
u !== void 0 && (p = "" + u), d.key !== void 0 && (p = "" + d.key), d.ref !== void 0 && (S = d.ref);
|
|
@@ -158,45 +158,45 @@ function zt() {
|
|
|
158
158
|
}
|
|
159
159
|
return A.Fragment = n, A.jsx = c, A.jsxs = c, A;
|
|
160
160
|
}
|
|
161
|
-
var
|
|
162
|
-
function
|
|
163
|
-
return
|
|
161
|
+
var Ie;
|
|
162
|
+
function Gt() {
|
|
163
|
+
return Ie || (Ie = 1, K.exports = Zt()), K.exports;
|
|
164
164
|
}
|
|
165
|
-
var i =
|
|
166
|
-
const
|
|
167
|
-
extendConfirmContent:
|
|
168
|
-
extendConfirmRadioGroup:
|
|
169
|
-
customSortPanelContainer:
|
|
170
|
-
customSortPanelExt:
|
|
171
|
-
addCondition:
|
|
172
|
-
addConditionText:
|
|
173
|
-
addConditionDisable:
|
|
174
|
-
customSortPanelFooter:
|
|
175
|
-
customSortPanelFooterBtn:
|
|
176
|
-
customSortPanelItem:
|
|
177
|
-
customSortPanelItemHead:
|
|
178
|
-
customSortPanelItemHandler:
|
|
179
|
-
customSortPanelItemRemove:
|
|
180
|
-
customSortPanelItemColumnInput:
|
|
181
|
-
customSortPanelItemColumnInputDropdown:
|
|
182
|
-
customSortPanelItemColumnInputText:
|
|
183
|
-
customSortPanelItemOrderRadio:
|
|
184
|
-
customSortPanelItemOrderRadioCn:
|
|
185
|
-
conditionList:
|
|
186
|
-
embedSortBtnContainer:
|
|
187
|
-
embedSortBtn:
|
|
188
|
-
embedSortBtnAsc:
|
|
189
|
-
embedSortBtnDesc:
|
|
190
|
-
embedSortBtnIcon:
|
|
191
|
-
customSortColMenu:
|
|
192
|
-
customSortColMenuItem:
|
|
193
|
-
customSortColMenuItemDesc:
|
|
194
|
-
},
|
|
165
|
+
var i = Gt();
|
|
166
|
+
const Wt = "univer-extend-confirm-content", qt = "univer-extend-confirm-radio-group", Yt = "univer-custom-sort-panel-container", Jt = "univer-custom-sort-panel-ext", Xt = "univer-add-condition", Kt = "univer-add-condition-text", Qt = "univer-add-condition-disable", en = "univer-custom-sort-panel-footer", tn = "univer-custom-sort-panel-footer-btn", nn = "univer-custom-sort-panel-item", rn = "univer-custom-sort-panel-item-head", on = "univer-custom-sort-panel-item-handler", sn = "univer-custom-sort-panel-item-remove", cn = "univer-custom-sort-panel-item-column-input", an = "univer-custom-sort-panel-item-column-input-dropdown", ln = "univer-custom-sort-panel-item-column-input-text", dn = "univer-custom-sort-panel-item-order-radio", un = "univer-custom-sort-panel-item-order-radio-cn", mn = "univer-condition-list", hn = "univer-embed-sort-btn-container", gn = "univer-embed-sort-btn", Cn = "univer-embed-sort-btn-asc", Sn = "univer-embed-sort-btn-desc", fn = "univer-embed-sort-btn-icon", pn = "univer-custom-sort-col-menu", vn = "univer-custom-sort-col-menu-item", _n = "univer-custom-sort-col-menu-item-desc", a = {
|
|
167
|
+
extendConfirmContent: Wt,
|
|
168
|
+
extendConfirmRadioGroup: qt,
|
|
169
|
+
customSortPanelContainer: Yt,
|
|
170
|
+
customSortPanelExt: Jt,
|
|
171
|
+
addCondition: Xt,
|
|
172
|
+
addConditionText: Kt,
|
|
173
|
+
addConditionDisable: Qt,
|
|
174
|
+
customSortPanelFooter: en,
|
|
175
|
+
customSortPanelFooterBtn: tn,
|
|
176
|
+
customSortPanelItem: nn,
|
|
177
|
+
customSortPanelItemHead: rn,
|
|
178
|
+
customSortPanelItemHandler: on,
|
|
179
|
+
customSortPanelItemRemove: sn,
|
|
180
|
+
customSortPanelItemColumnInput: cn,
|
|
181
|
+
customSortPanelItemColumnInputDropdown: an,
|
|
182
|
+
customSortPanelItemColumnInputText: ln,
|
|
183
|
+
customSortPanelItemOrderRadio: dn,
|
|
184
|
+
customSortPanelItemOrderRadioCn: un,
|
|
185
|
+
conditionList: mn,
|
|
186
|
+
embedSortBtnContainer: hn,
|
|
187
|
+
embedSortBtn: gn,
|
|
188
|
+
embedSortBtnAsc: Cn,
|
|
189
|
+
embedSortBtnDesc: Sn,
|
|
190
|
+
embedSortBtnIcon: fn,
|
|
191
|
+
customSortColMenu: pn,
|
|
192
|
+
customSortColMenuItem: vn,
|
|
193
|
+
customSortColMenuItemDesc: _n
|
|
194
|
+
}, xn = (e) => {
|
|
195
195
|
const [t, n] = B("0"), r = O(H);
|
|
196
196
|
return /* @__PURE__ */ i.jsxs("div", { className: a.extendConfirmContent, children: [
|
|
197
197
|
/* @__PURE__ */ i.jsx("div", { className: "extend-confirm-desc", children: r.t("sheets-sort.dialog.sort-reminder-desc") }),
|
|
198
198
|
/* @__PURE__ */ i.jsxs(
|
|
199
|
-
|
|
199
|
+
Ne,
|
|
200
200
|
{
|
|
201
201
|
className: a.extendConfirmRadioGroup,
|
|
202
202
|
value: t,
|
|
@@ -218,10 +218,10 @@ const Gt = "univer-extend-confirm-content", Wt = "univer-extend-confirm-radio-gr
|
|
|
218
218
|
)
|
|
219
219
|
] });
|
|
220
220
|
};
|
|
221
|
-
var
|
|
222
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
221
|
+
var In = Object.defineProperty, yn = Object.getOwnPropertyDescriptor, Rn = (e, t, n, r) => {
|
|
222
|
+
for (var o = r > 1 ? void 0 : r ? yn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
223
223
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
224
|
-
return r && o &&
|
|
224
|
+
return r && o && In(t, n, o), o;
|
|
225
225
|
}, T = (e, t) => (n, r) => t(n, r, e);
|
|
226
226
|
const z = {
|
|
227
227
|
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
@@ -229,10 +229,10 @@ const z = {
|
|
|
229
229
|
SINGLE_ERROR: "sheets-sort.error.single",
|
|
230
230
|
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
231
231
|
};
|
|
232
|
-
let f = class extends
|
|
232
|
+
let f = class extends Ye {
|
|
233
233
|
constructor(t, n, r, o, s, c, l) {
|
|
234
234
|
super();
|
|
235
|
-
X(this, "_customSortState$", new
|
|
235
|
+
X(this, "_customSortState$", new _t(null));
|
|
236
236
|
X(this, "customSortState$", this._customSortState$.asObservable());
|
|
237
237
|
this._univerInstanceService = t, this._confirmService = n, this._logService = r, this._selectionManagerService = o, this._sheetsSortService = s, this._localeService = c, this._commandService = l;
|
|
238
238
|
}
|
|
@@ -264,7 +264,7 @@ let f = class extends qe {
|
|
|
264
264
|
const { unitId: r, subUnitId: o, range: s } = n, c = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
265
265
|
if (!c)
|
|
266
266
|
return [];
|
|
267
|
-
const l =
|
|
267
|
+
const l = Mn(this._localeService);
|
|
268
268
|
return Array.from(
|
|
269
269
|
{ length: s.endColumn - s.startColumn + 1 },
|
|
270
270
|
(h, g) => {
|
|
@@ -285,9 +285,9 @@ let f = class extends qe {
|
|
|
285
285
|
const s = {
|
|
286
286
|
unitId: t,
|
|
287
287
|
subUnitId: n,
|
|
288
|
-
selections: [{ range: r, primary:
|
|
288
|
+
selections: [{ range: r, primary: Rt(r, o), style: null }]
|
|
289
289
|
};
|
|
290
|
-
this._commandService.executeCommand(
|
|
290
|
+
this._commandService.executeCommand(Mt.id, s);
|
|
291
291
|
}
|
|
292
292
|
async showCheckError(t) {
|
|
293
293
|
return await this._confirmService.confirm({
|
|
@@ -309,7 +309,7 @@ let f = class extends qe {
|
|
|
309
309
|
},
|
|
310
310
|
children: {
|
|
311
311
|
title: /* @__PURE__ */ i.jsx(
|
|
312
|
-
|
|
312
|
+
xn,
|
|
313
313
|
{
|
|
314
314
|
onChange: (r) => {
|
|
315
315
|
t = r === "1";
|
|
@@ -352,18 +352,18 @@ let f = class extends qe {
|
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
|
-
f =
|
|
356
|
-
T(0,
|
|
357
|
-
T(1,
|
|
358
|
-
T(2,
|
|
359
|
-
T(3, E(
|
|
360
|
-
T(4, E(
|
|
355
|
+
f = Rn([
|
|
356
|
+
T(0, Me),
|
|
357
|
+
T(1, ut),
|
|
358
|
+
T(2, Je),
|
|
359
|
+
T(3, E(yt)),
|
|
360
|
+
T(4, E(Oe)),
|
|
361
361
|
T(5, E(H)),
|
|
362
|
-
T(6,
|
|
362
|
+
T(6, be)
|
|
363
363
|
], f);
|
|
364
|
-
function
|
|
364
|
+
function Mn(e) {
|
|
365
365
|
return (t) => {
|
|
366
|
-
const n =
|
|
366
|
+
const n = Xe.chatAtABC(t);
|
|
367
367
|
switch (e.getCurrentLocale()) {
|
|
368
368
|
case Q.ZH_CN:
|
|
369
369
|
return `"${n}"列`;
|
|
@@ -415,8 +415,8 @@ const re = {
|
|
|
415
415
|
type: b.COMMAND,
|
|
416
416
|
handler: async (e) => await e.get(f).triggerSortCustomize()
|
|
417
417
|
};
|
|
418
|
-
function
|
|
419
|
-
const e = O(f), t = O(
|
|
418
|
+
function bn() {
|
|
419
|
+
const e = O(f), t = O(Oe), n = O(H), [r, o] = B(!1), [s, c] = B(0), l = Pe(null), d = e.customSortState();
|
|
420
420
|
if (!d || !d.location)
|
|
421
421
|
return null;
|
|
422
422
|
const { range: u, unitId: h, subUnitId: g } = d.location, p = e.getTitles(r), [S, U] = B([
|
|
@@ -425,8 +425,8 @@ function Mn() {
|
|
|
425
425
|
const $ = [...S];
|
|
426
426
|
x === null ? $.splice(m, 1) : $[m] = x, U($);
|
|
427
427
|
}, [S]), V = P(
|
|
428
|
-
|
|
429
|
-
const m = [...S], x =
|
|
428
|
+
Ke(() => {
|
|
429
|
+
const m = [...S], x = On(u, S);
|
|
430
430
|
x !== null && (m.push({ type: k.ASC, colIndex: x }), U(m));
|
|
431
431
|
}, 200),
|
|
432
432
|
[S, u]
|
|
@@ -434,20 +434,20 @@ function Mn() {
|
|
|
434
434
|
t.applySort({ range: u, orderRules: m, hasTitle: x }), e.closeCustomSortPanel();
|
|
435
435
|
}, [t, e, u]), J = P(() => {
|
|
436
436
|
e.closeCustomSortPanel();
|
|
437
|
-
}, [e]),
|
|
437
|
+
}, [e]), Ze = P((m) => {
|
|
438
438
|
o(m), m ? e.setSelection(h, g, { ...u, startRow: u.startRow + 1 }) : e.setSelection(h, g, u);
|
|
439
439
|
}, [e, u, g, h]);
|
|
440
|
-
|
|
440
|
+
we(() => {
|
|
441
441
|
l.current && S.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
442
442
|
}, [S]);
|
|
443
|
-
const
|
|
443
|
+
const Ge = S.length < p.length, fe = S.map((m) => ({ ...m, id: `${m.colIndex}` }));
|
|
444
444
|
return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContainer, children: [
|
|
445
445
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContent, onMouseDown: (m) => {
|
|
446
446
|
m.stopPropagation();
|
|
447
447
|
}, children: [
|
|
448
448
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelExt, children: [
|
|
449
|
-
/* @__PURE__ */ i.jsx("div", { className: a.firstRowCheck, children: /* @__PURE__ */ i.jsx(
|
|
450
|
-
|
|
449
|
+
/* @__PURE__ */ i.jsx("div", { className: a.firstRowCheck, children: /* @__PURE__ */ i.jsx(Et, { checked: r, onChange: (m) => Ze(!!m), children: n.t("sheets-sort.dialog.first-row-check") }) }),
|
|
450
|
+
Ge ? /* @__PURE__ */ i.jsxs("div", { className: a.addCondition, onClick: V, children: [
|
|
451
451
|
/* @__PURE__ */ i.jsx(ee, {}),
|
|
452
452
|
/* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
|
|
453
453
|
] }) : /* @__PURE__ */ i.jsxs(
|
|
@@ -474,14 +474,14 @@ function Mn() {
|
|
|
474
474
|
},
|
|
475
475
|
ref: l,
|
|
476
476
|
children: /* @__PURE__ */ i.jsx(
|
|
477
|
-
|
|
477
|
+
Ot,
|
|
478
478
|
{
|
|
479
479
|
list: fe,
|
|
480
480
|
onListChange: U,
|
|
481
481
|
idKey: "id",
|
|
482
482
|
draggableHandle: `.${a.customSortPanelItemHandler}`,
|
|
483
483
|
itemRender: (m) => /* @__PURE__ */ i.jsx(
|
|
484
|
-
|
|
484
|
+
En,
|
|
485
485
|
{
|
|
486
486
|
titles: p,
|
|
487
487
|
list: fe,
|
|
@@ -503,22 +503,22 @@ function Mn() {
|
|
|
503
503
|
] })
|
|
504
504
|
] });
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function En(e) {
|
|
507
507
|
var V;
|
|
508
508
|
const { list: t, item: n, titles: r, onChange: o, scrollPosition: s } = e, c = O(H), l = r.filter((C) => !t.some((J) => J.colIndex === C.index) || C.index === n.colIndex), d = t.findIndex((C) => C.colIndex === n.colIndex), u = P((C) => {
|
|
509
509
|
o({ ...n, colIndex: C.index }, d), g(!1);
|
|
510
510
|
}, [d, n, o]), [h, g] = B(!1), p = (C) => {
|
|
511
511
|
g(C);
|
|
512
512
|
};
|
|
513
|
-
|
|
513
|
+
we(() => {
|
|
514
514
|
g(!1);
|
|
515
515
|
}, [s]);
|
|
516
516
|
const S = t.length > 1, U = (V = r.find((C) => C.index === n.colIndex)) == null ? void 0 : V.label, Y = c.getCurrentLocale() === Q.ZH_CN ? a.customSortPanelItemOrderRadioCn : a.customSortPanelItemOrderRadio;
|
|
517
517
|
return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItem, children: [
|
|
518
518
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemHead, children: [
|
|
519
|
-
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemHandler, children: /* @__PURE__ */ i.jsx(
|
|
519
|
+
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemHandler, children: /* @__PURE__ */ i.jsx(Ae, {}) }),
|
|
520
520
|
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemColumn, children: /* @__PURE__ */ i.jsx(
|
|
521
|
-
|
|
521
|
+
Tt,
|
|
522
522
|
{
|
|
523
523
|
placement: "bottomLeft",
|
|
524
524
|
trigger: ["click"],
|
|
@@ -531,20 +531,20 @@ function bn(e) {
|
|
|
531
531
|
className: a.customSortColMenuItem,
|
|
532
532
|
children: [
|
|
533
533
|
/* @__PURE__ */ i.jsx("span", { className: a.customSortColMenuItemDesc, children: C.label }),
|
|
534
|
-
/* @__PURE__ */ i.jsx("span", { className: a.customSortColMenuItemCheck, children: C.index === n.colIndex && /* @__PURE__ */ i.jsx(
|
|
534
|
+
/* @__PURE__ */ i.jsx("span", { className: a.customSortColMenuItemCheck, children: C.index === n.colIndex && /* @__PURE__ */ i.jsx(je, {}) })
|
|
535
535
|
]
|
|
536
536
|
},
|
|
537
537
|
C.index
|
|
538
538
|
)) }),
|
|
539
539
|
children: /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemColumnInput, children: [
|
|
540
540
|
/* @__PURE__ */ i.jsx("span", { className: a.customSortPanelItemColumnInputText, children: U }),
|
|
541
|
-
/* @__PURE__ */ i.jsx(
|
|
541
|
+
/* @__PURE__ */ i.jsx($e, { className: a.customSortPanelItemColumnInputDropdown })
|
|
542
542
|
] })
|
|
543
543
|
}
|
|
544
544
|
) })
|
|
545
545
|
] }),
|
|
546
546
|
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemOrder, children: /* @__PURE__ */ i.jsxs(
|
|
547
|
-
|
|
547
|
+
Ne,
|
|
548
548
|
{
|
|
549
549
|
className: Y,
|
|
550
550
|
value: n.type,
|
|
@@ -557,19 +557,19 @@ function bn(e) {
|
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
) }),
|
|
560
|
-
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemRemove, children: S && /* @__PURE__ */ i.jsx(
|
|
560
|
+
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemRemove, children: S && /* @__PURE__ */ i.jsx(ke, { onClick: () => o(null, d) }) })
|
|
561
561
|
] });
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function On(e, t) {
|
|
564
564
|
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((s) => s == null ? void 0 : s.colIndex));
|
|
565
565
|
for (let s = n; s <= r; s++)
|
|
566
566
|
if (!o.has(s))
|
|
567
567
|
return s;
|
|
568
568
|
return null;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
const { range: t, colIndex: n, onClose: r } = e, o = O(f), s = O(
|
|
572
|
-
const { unitId: u, subUnitId: h } =
|
|
570
|
+
function Tn(e) {
|
|
571
|
+
const { range: t, colIndex: n, onClose: r } = e, o = O(f), s = O(Me), c = O(H), l = P((d) => {
|
|
572
|
+
const { unitId: u, subUnitId: h } = bt(s) || {};
|
|
573
573
|
if (t && u && h) {
|
|
574
574
|
const g = { ...t, startRow: t.startRow + 1 };
|
|
575
575
|
o.triggerSortDirectly(d, !1, { unitId: u, subUnitId: h, range: g, colIndex: n });
|
|
@@ -608,27 +608,27 @@ function On(e) {
|
|
|
608
608
|
)
|
|
609
609
|
] });
|
|
610
610
|
}
|
|
611
|
-
const
|
|
612
|
-
function
|
|
611
|
+
const Be = "sheet.menu.sheets-sort", Fe = "sheet.menu.sheets-sort-ctx", F = "AscendingSingle", he = "ExpandAscendingSingle", ge = "DescendingSingle", Ce = "ExpandDescendingSingle", Se = "CustomSortSingle";
|
|
612
|
+
function Pn(e) {
|
|
613
613
|
return {
|
|
614
|
-
id:
|
|
614
|
+
id: Be,
|
|
615
615
|
type: _.SUBITEMS,
|
|
616
616
|
icon: F,
|
|
617
617
|
tooltip: "sheets-sort.general.sort",
|
|
618
|
-
hidden$:
|
|
618
|
+
hidden$: Te(e, q.UNIVER_SHEET),
|
|
619
619
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function wn(e) {
|
|
623
623
|
return {
|
|
624
624
|
id: re.id,
|
|
625
625
|
icon: F,
|
|
626
626
|
title: "sheets-sort.general.sort-asc-cur",
|
|
627
627
|
type: _.BUTTON,
|
|
628
|
-
hidden$:
|
|
628
|
+
hidden$: at(e)
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Nn(e) {
|
|
632
632
|
return {
|
|
633
633
|
id: oe.id,
|
|
634
634
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -636,7 +636,7 @@ function wn(e) {
|
|
|
636
636
|
type: _.BUTTON
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Ln(e) {
|
|
640
640
|
return {
|
|
641
641
|
id: se.id,
|
|
642
642
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -644,7 +644,7 @@ function Nn(e) {
|
|
|
644
644
|
type: _.BUTTON
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function jn(e) {
|
|
648
648
|
return {
|
|
649
649
|
id: ie.id,
|
|
650
650
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -652,7 +652,7 @@ function Ln(e) {
|
|
|
652
652
|
type: _.BUTTON
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Dn(e) {
|
|
656
656
|
return {
|
|
657
657
|
id: ce.id,
|
|
658
658
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -660,13 +660,13 @@ function jn(e) {
|
|
|
660
660
|
icon: Se
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function kn(e) {
|
|
664
664
|
return {
|
|
665
|
-
id:
|
|
665
|
+
id: Fe,
|
|
666
666
|
title: "sheets-sort.general.sort",
|
|
667
667
|
type: _.SUBITEMS,
|
|
668
668
|
icon: F,
|
|
669
|
-
hidden$:
|
|
669
|
+
hidden$: Te(e, q.UNIVER_SHEET),
|
|
670
670
|
disabled$: w(e, {
|
|
671
671
|
workbookTypes: [N],
|
|
672
672
|
worksheetTypes: [L, j],
|
|
@@ -674,7 +674,7 @@ function Dn(e) {
|
|
|
674
674
|
})
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Hn(e) {
|
|
678
678
|
return {
|
|
679
679
|
id: ae.id,
|
|
680
680
|
title: "sheets-sort.general.sort-asc-cur",
|
|
@@ -683,7 +683,7 @@ function kn(e) {
|
|
|
683
683
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Un(e) {
|
|
687
687
|
return {
|
|
688
688
|
id: le.id,
|
|
689
689
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -692,7 +692,7 @@ function Hn(e) {
|
|
|
692
692
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function $n(e) {
|
|
696
696
|
return {
|
|
697
697
|
id: de.id,
|
|
698
698
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -701,7 +701,7 @@ function Un(e) {
|
|
|
701
701
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function An(e) {
|
|
705
705
|
return {
|
|
706
706
|
id: ue.id,
|
|
707
707
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -710,7 +710,7 @@ function $n(e) {
|
|
|
710
710
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function Bn(e) {
|
|
714
714
|
return {
|
|
715
715
|
id: me.id,
|
|
716
716
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -719,74 +719,74 @@ function An(e) {
|
|
|
719
719
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
|
-
const
|
|
723
|
-
[
|
|
724
|
-
[
|
|
722
|
+
const Fn = {
|
|
723
|
+
[mt.FORMULAS_INSERT]: {
|
|
724
|
+
[Be]: {
|
|
725
725
|
order: 2,
|
|
726
|
-
menuItemFactory:
|
|
726
|
+
menuItemFactory: Pn,
|
|
727
727
|
[re.id]: {
|
|
728
728
|
order: 0,
|
|
729
|
-
menuItemFactory:
|
|
729
|
+
menuItemFactory: wn
|
|
730
730
|
},
|
|
731
731
|
[oe.id]: {
|
|
732
732
|
order: 1,
|
|
733
|
-
menuItemFactory:
|
|
733
|
+
menuItemFactory: Nn
|
|
734
734
|
},
|
|
735
735
|
[se.id]: {
|
|
736
736
|
order: 2,
|
|
737
|
-
menuItemFactory:
|
|
737
|
+
menuItemFactory: Ln
|
|
738
738
|
},
|
|
739
739
|
[ie.id]: {
|
|
740
740
|
order: 3,
|
|
741
|
-
menuItemFactory:
|
|
741
|
+
menuItemFactory: jn
|
|
742
742
|
},
|
|
743
743
|
[ce.id]: {
|
|
744
744
|
order: 4,
|
|
745
|
-
menuItemFactory:
|
|
745
|
+
menuItemFactory: Dn
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
},
|
|
749
|
-
[
|
|
750
|
-
[
|
|
751
|
-
[
|
|
749
|
+
[ht.MAIN_AREA]: {
|
|
750
|
+
[gt.DATA]: {
|
|
751
|
+
[Fe]: {
|
|
752
752
|
order: 0,
|
|
753
|
-
menuItemFactory:
|
|
753
|
+
menuItemFactory: kn,
|
|
754
754
|
[ae.id]: {
|
|
755
755
|
order: 0,
|
|
756
|
-
menuItemFactory:
|
|
756
|
+
menuItemFactory: Hn
|
|
757
757
|
},
|
|
758
758
|
[le.id]: {
|
|
759
759
|
order: 1,
|
|
760
|
-
menuItemFactory:
|
|
760
|
+
menuItemFactory: Un
|
|
761
761
|
},
|
|
762
762
|
[de.id]: {
|
|
763
763
|
order: 2,
|
|
764
|
-
menuItemFactory:
|
|
764
|
+
menuItemFactory: $n
|
|
765
765
|
},
|
|
766
766
|
[ue.id]: {
|
|
767
767
|
order: 3,
|
|
768
|
-
menuItemFactory:
|
|
768
|
+
menuItemFactory: An
|
|
769
769
|
},
|
|
770
770
|
[me.id]: {
|
|
771
771
|
order: 4,
|
|
772
|
-
menuItemFactory:
|
|
772
|
+
menuItemFactory: Bn
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
};
|
|
778
|
-
var
|
|
779
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
778
|
+
var Vn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Zn = (e, t, n, r) => {
|
|
779
|
+
for (var o = r > 1 ? void 0 : r ? zn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
780
780
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
781
|
-
return r && o &&
|
|
781
|
+
return r && o && Vn(t, n, o), o;
|
|
782
782
|
}, M = (e, t) => (n, r) => t(n, r, e);
|
|
783
|
-
const
|
|
784
|
-
let G = class extends
|
|
783
|
+
const ye = "custom-sort-dialog", Gn = 560;
|
|
784
|
+
let G = class extends Qe {
|
|
785
785
|
constructor(e, t, n, r, o, s, c, l, d, u) {
|
|
786
786
|
super(), this._commandService = e, this._menuManagerService = t, this._dialogService = n, this._layoutService = r, this._uiPartsService = o, this._sheetRenderService = s, this._localeService = c, this._sheetsSortUIService = l, this._injector = d, this._componentManager = u, this._initCommands(), this._initMenu(), this._initUI();
|
|
787
787
|
}
|
|
788
788
|
_initMenu() {
|
|
789
|
-
this._menuManagerService.mergeMenu(
|
|
789
|
+
this._menuManagerService.mergeMenu(Fn);
|
|
790
790
|
}
|
|
791
791
|
_initCommands() {
|
|
792
792
|
[
|
|
@@ -800,57 +800,61 @@ let G = class extends Ke {
|
|
|
800
800
|
de,
|
|
801
801
|
ue,
|
|
802
802
|
me
|
|
803
|
-
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(
|
|
803
|
+
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(st.id));
|
|
804
804
|
}
|
|
805
805
|
_initUI() {
|
|
806
|
-
this.disposeWithMe(this._componentManager.register("CustomSortPanel",
|
|
806
|
+
this.disposeWithMe(this._componentManager.register("CustomSortPanel", bn)), this.disposeWithMe(this._uiPartsService.registerComponent(dt.FILTER_PANEL_EMBED_POINT, () => et(Tn, this._injector))), this.disposeWithMe(this._componentManager.register(F, te)), this.disposeWithMe(this._componentManager.register(he, He)), this.disposeWithMe(this._componentManager.register(ge, ne)), this.disposeWithMe(this._componentManager.register(Ce, Ue)), this.disposeWithMe(this._componentManager.register(Se, De)), this._sheetsSortUIService.customSortState$.pipe(xt(this.dispose$)).subscribe((e) => {
|
|
807
807
|
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
810
|
_openCustomSortPanel(e) {
|
|
811
811
|
this._dialogService.open({
|
|
812
|
-
id:
|
|
812
|
+
id: ye,
|
|
813
813
|
draggable: !0,
|
|
814
|
-
width:
|
|
815
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${
|
|
814
|
+
width: Gn,
|
|
815
|
+
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${ct(e.range)}` },
|
|
816
816
|
children: { label: "CustomSortPanel" },
|
|
817
817
|
destroyOnClose: !0,
|
|
818
|
-
defaultPosition:
|
|
818
|
+
defaultPosition: Wn(),
|
|
819
819
|
preservePositionOnDestroy: !1,
|
|
820
820
|
onClose: () => this._closePanel(),
|
|
821
821
|
mask: !0
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
_closePanel() {
|
|
825
|
-
this._dialogService.close(
|
|
825
|
+
this._dialogService.close(ye), queueMicrotask(() => this._layoutService.focus());
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
|
-
G =
|
|
829
|
-
M(0,
|
|
830
|
-
M(1,
|
|
831
|
-
M(2,
|
|
832
|
-
M(3,
|
|
833
|
-
M(4,
|
|
834
|
-
M(5, E(
|
|
828
|
+
G = Zn([
|
|
829
|
+
M(0, be),
|
|
830
|
+
M(1, St),
|
|
831
|
+
M(2, ft),
|
|
832
|
+
M(3, pt),
|
|
833
|
+
M(4, vt),
|
|
834
|
+
M(5, E(lt)),
|
|
835
835
|
M(6, E(H)),
|
|
836
836
|
M(7, E(f)),
|
|
837
|
-
M(8, E(
|
|
838
|
-
M(9, E(
|
|
837
|
+
M(8, E(Ee)),
|
|
838
|
+
M(9, E(Ct))
|
|
839
839
|
], G);
|
|
840
|
-
function
|
|
840
|
+
function Wn() {
|
|
841
841
|
return { x: 0, y: 0 };
|
|
842
842
|
}
|
|
843
|
-
var
|
|
844
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
843
|
+
var Ve = Object.defineProperty, qn = Object.getOwnPropertyDescriptor, Yn = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jn = (e, t, n, r) => {
|
|
844
|
+
for (var o = r > 1 ? void 0 : r ? qn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
845
845
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
846
|
-
return r && o &&
|
|
847
|
-
},
|
|
848
|
-
const
|
|
849
|
-
let W = class extends
|
|
850
|
-
constructor(e =
|
|
846
|
+
return r && o && Ve(t, n, o), o;
|
|
847
|
+
}, Re = (e, t) => (n, r) => t(n, r, e), ze = (e, t, n) => Yn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
848
|
+
const Xn = "SHEET_SORT_UI_PLUGIN";
|
|
849
|
+
let W = class extends nt {
|
|
850
|
+
constructor(e = _e, t, n) {
|
|
851
851
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
852
|
-
const { ...r } =
|
|
853
|
-
|
|
852
|
+
const { ...r } = rt(
|
|
853
|
+
{},
|
|
854
|
+
_e,
|
|
855
|
+
this._config
|
|
856
|
+
);
|
|
857
|
+
this._configService.setConfig(Pt, r);
|
|
854
858
|
}
|
|
855
859
|
onStarting() {
|
|
856
860
|
[
|
|
@@ -862,12 +866,12 @@ let W = class extends tt {
|
|
|
862
866
|
this._injector.get(G);
|
|
863
867
|
}
|
|
864
868
|
};
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
W =
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
869
|
+
ze(W, "type", q.UNIVER_SHEET);
|
|
870
|
+
ze(W, "pluginName", Xn);
|
|
871
|
+
W = Jn([
|
|
872
|
+
tt(it),
|
|
873
|
+
Re(1, E(Ee)),
|
|
874
|
+
Re(2, ot)
|
|
871
875
|
], W);
|
|
872
876
|
export {
|
|
873
877
|
re as SortRangeAscCommand,
|