@univerjs/sheets-sort-ui 0.5.0 → 0.5.1
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 +11 -2
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/es/index.js +444 -409
- package/lib/es/locale/fr-FR.js +33 -0
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/views/CustomSortPanel.d.ts +1 -1
- package/lib/types/views/EmbedSortBtn.d.ts +1 -1
- package/lib/umd/index.js +11 -2
- package/lib/umd/locale/fr-FR.js +1 -0
- package/package.json +16 -14
package/lib/es/index.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useDependency as O, LocaleService as H, Inject 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
|
|
14
|
-
var
|
|
15
|
-
return
|
|
1
|
+
var Ge = Object.defineProperty;
|
|
2
|
+
var We = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var X = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { useDependency as O, LocaleService as H, Inject as E, Disposable as qe, UniverInstanceType as q, IUniverInstanceService as Re, ILogService as Ye, ICommandService as Me, Tools as Je, LocaleType as Q, CommandType as b, throttle as Xe, Injector as be, RxDisposable as Ke, connectInjector as Qe, DependentOn as et, Plugin as tt, IConfigService as nt } from "@univerjs/core";
|
|
5
|
+
import { SheetsSortService as Ee, SortType as k, SortRangeCommand as rt, UniverSheetsSortPlugin as ot } from "@univerjs/sheets-sort";
|
|
6
|
+
import { serializeRange as st } from "@univerjs/engine-formula";
|
|
7
|
+
import { getCurrentRangeDisable$ as w, getCurrentExclusiveRangeInterest$ as it, SheetsRenderService as ct, SheetsUIPart as at } from "@univerjs/sheets-ui";
|
|
8
|
+
import { IConfirmService as lt, MenuItemType as _, getMenuHiddenObservable as Oe, RibbonStartGroup as dt, ContextMenuPosition as ut, ContextMenuGroup as mt, ComponentManager as ht, IMenuManagerService as gt, IDialogService as Ct, ILayoutService as St, IUIPartsService as ft } from "@univerjs/ui";
|
|
9
|
+
import { BehaviorSubject as pt, takeUntil as vt } from "rxjs";
|
|
10
|
+
import _t, { forwardRef as I, useRef as Te, createElement as y, useState as B, useCallback as P, useEffect as Pe } from "react";
|
|
11
|
+
import { SheetsSelectionsService as xt, getPrimaryForRange as It, SetSelectionsOperation as yt, expandToContinuousRange as pe, getSheetCommandTarget as Rt, WorkbookEditablePermission as N, WorksheetSortPermission as L, WorksheetEditPermission as j, RangeProtectionPermissionEditPoint as D } from "@univerjs/sheets";
|
|
12
|
+
import { RadioGroup as we, Radio as Z, Checkbox as Mt, DraggableList as bt, Button as ve, Dropdown as Et } from "@univerjs/design";
|
|
13
|
+
const Ot = "sheets-sort-ui.config", Tt = {};
|
|
14
|
+
var v = function() {
|
|
15
|
+
return v = Object.assign || function(e) {
|
|
16
16
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
17
17
|
t = arguments[n];
|
|
18
18
|
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
22
|
-
},
|
|
21
|
+
}, v.apply(this, arguments);
|
|
22
|
+
}, Pt = 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")
|
|
26
26
|
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
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
|
-
},
|
|
30
|
-
var n = e.icon, r = e.id, o = e.className, s = e.extend, c =
|
|
31
|
-
return
|
|
29
|
+
}, R = I(function(e, t) {
|
|
30
|
+
var n = e.icon, r = e.id, o = e.className, s = e.extend, c = Pt(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), d = Te("_".concat(Lt()));
|
|
31
|
+
return Ne(n, "".concat(r), { defIds: n.defIds, idSuffix: d.current }, v({ ref: t, className: l }, c), s);
|
|
32
32
|
});
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
return
|
|
33
|
+
function Ne(e, t, n, r, o) {
|
|
34
|
+
return y(e.tag, v(v({ key: t }, wt(e, n, o)), r), (Nt(e, n).children || []).map(function(s, c) {
|
|
35
|
+
return Ne(s, "".concat(t, "-").concat(e.tag, "-").concat(c), n, void 0, o);
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
var r =
|
|
38
|
+
function wt(e, t, n) {
|
|
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;
|
|
42
42
|
return !o || o.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(function(s) {
|
|
@@ -44,97 +44,97 @@ function Pt(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 Nt(e, t) {
|
|
48
48
|
var n, r = t.defIds;
|
|
49
|
-
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ?
|
|
50
|
-
return typeof o.attrs.id == "string" && r && r.indexOf(o.attrs.id) > -1 ?
|
|
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
|
+
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 Lt() {
|
|
54
54
|
return Math.random().toString(36).substring(2, 8);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
return
|
|
56
|
+
R.displayName = "UniverIcon";
|
|
57
|
+
var jt = { 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
|
+
return y(R, Object.assign({}, e, {
|
|
59
59
|
id: "ascending- single",
|
|
60
60
|
ref: t,
|
|
61
|
-
icon:
|
|
61
|
+
icon: jt
|
|
62
62
|
}));
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
return
|
|
64
|
+
te.displayName = "AscendingSingle";
|
|
65
|
+
var Dt = { 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" } }] }, Le = I(function(e, t) {
|
|
66
|
+
return y(R, Object.assign({}, e, {
|
|
67
67
|
id: "check-mark-single",
|
|
68
68
|
ref: t,
|
|
69
|
-
icon:
|
|
69
|
+
icon: Dt
|
|
70
70
|
}));
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
var
|
|
74
|
-
return
|
|
72
|
+
Le.displayName = "CheckMarkSingle";
|
|
73
|
+
var kt = { 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" } }] }, je = I(function(e, t) {
|
|
74
|
+
return y(R, Object.assign({}, e, {
|
|
75
75
|
id: "custom-sort-single",
|
|
76
76
|
ref: t,
|
|
77
|
-
icon:
|
|
77
|
+
icon: kt
|
|
78
78
|
}));
|
|
79
79
|
});
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
return
|
|
80
|
+
je.displayName = "CustomSortSingle";
|
|
81
|
+
var Ht = { 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" } }] }, De = I(function(e, t) {
|
|
82
|
+
return y(R, Object.assign({}, e, {
|
|
83
83
|
id: "delete-empty-single",
|
|
84
84
|
ref: t,
|
|
85
|
-
icon:
|
|
85
|
+
icon: Ht
|
|
86
86
|
}));
|
|
87
87
|
});
|
|
88
|
-
|
|
89
|
-
var
|
|
90
|
-
return
|
|
88
|
+
De.displayName = "DeleteEmptySingle";
|
|
89
|
+
var Ut = { 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
|
+
return y(R, Object.assign({}, e, {
|
|
91
91
|
id: "descending-single",
|
|
92
92
|
ref: t,
|
|
93
|
-
icon:
|
|
93
|
+
icon: Ut
|
|
94
94
|
}));
|
|
95
95
|
});
|
|
96
|
-
|
|
97
|
-
var $t = { 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" } }] },
|
|
98
|
-
return
|
|
96
|
+
ne.displayName = "DescendingSingle";
|
|
97
|
+
var $t = { 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" } }] }, ke = I(function(e, t) {
|
|
98
|
+
return y(R, Object.assign({}, e, {
|
|
99
99
|
id: "expand-ascending-single",
|
|
100
100
|
ref: t,
|
|
101
101
|
icon: $t
|
|
102
102
|
}));
|
|
103
103
|
});
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
104
|
+
ke.displayName = "ExpandAscendingSingle";
|
|
105
|
+
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 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" } }] }, He = I(function(e, t) {
|
|
106
|
+
return y(R, Object.assign({}, e, {
|
|
107
107
|
id: "expand-descending-single",
|
|
108
108
|
ref: t,
|
|
109
|
-
icon:
|
|
109
|
+
icon: At
|
|
110
110
|
}));
|
|
111
111
|
});
|
|
112
|
-
|
|
113
|
-
var
|
|
114
|
-
return
|
|
112
|
+
He.displayName = "ExpandDescendingSingle";
|
|
113
|
+
var Bt = { 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
|
+
return y(R, Object.assign({}, e, {
|
|
115
115
|
id: "increase-single",
|
|
116
116
|
ref: t,
|
|
117
|
-
icon:
|
|
117
|
+
icon: Bt
|
|
118
118
|
}));
|
|
119
119
|
});
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
return
|
|
120
|
+
ee.displayName = "IncreaseSingle";
|
|
121
|
+
var Ft = { 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" } }] }, Ue = I(function(e, t) {
|
|
122
|
+
return y(R, Object.assign({}, e, {
|
|
123
123
|
id: "more-down-single",
|
|
124
124
|
ref: t,
|
|
125
|
-
icon:
|
|
125
|
+
icon: Ft
|
|
126
126
|
}));
|
|
127
127
|
});
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
return
|
|
128
|
+
Ue.displayName = "MoreDownSingle";
|
|
129
|
+
var Vt = { 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" } }] }] }, $e = I(function(e, t) {
|
|
130
|
+
return y(R, Object.assign({}, e, {
|
|
131
131
|
id: "sequence-single",
|
|
132
132
|
ref: t,
|
|
133
|
-
icon:
|
|
133
|
+
icon: Vt
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
|
|
137
|
-
var
|
|
136
|
+
$e.displayName = "SequenceSingle";
|
|
137
|
+
var K = { exports: {} }, A = {};
|
|
138
138
|
/**
|
|
139
139
|
* @license React
|
|
140
140
|
* react-jsx-runtime.production.min.js
|
|
@@ -144,53 +144,59 @@ var He = { exports: {} }, q = {};
|
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
var _e;
|
|
148
|
+
function zt() {
|
|
149
|
+
if (_e) return A;
|
|
150
|
+
_e = 1;
|
|
151
|
+
var e = _t, 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
|
+
function c(l, d, u) {
|
|
153
|
+
var h, g = {}, p = null, S = null;
|
|
154
|
+
u !== void 0 && (p = "" + u), d.key !== void 0 && (p = "" + d.key), d.ref !== void 0 && (S = d.ref);
|
|
155
|
+
for (h in d) r.call(d, h) && !s.hasOwnProperty(h) && (g[h] = d[h]);
|
|
156
|
+
if (l && l.defaultProps) for (h in d = l.defaultProps, d) g[h] === void 0 && (g[h] = d[h]);
|
|
157
|
+
return { $$typeof: t, type: l, key: p, ref: S, props: g, _owner: o.current };
|
|
158
|
+
}
|
|
159
|
+
return A.Fragment = n, A.jsx = c, A.jsxs = c, A;
|
|
154
160
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
var i =
|
|
160
|
-
const
|
|
161
|
-
extendConfirmContent:
|
|
162
|
-
extendConfirmRadioGroup:
|
|
163
|
-
customSortPanelContainer:
|
|
164
|
-
customSortPanelExt:
|
|
165
|
-
addCondition:
|
|
166
|
-
addConditionText:
|
|
167
|
-
addConditionDisable:
|
|
168
|
-
customSortPanelFooter:
|
|
169
|
-
customSortPanelFooterBtn:
|
|
170
|
-
customSortPanelItem:
|
|
171
|
-
customSortPanelItemHead:
|
|
172
|
-
customSortPanelItemHandler:
|
|
173
|
-
customSortPanelItemRemove:
|
|
174
|
-
customSortPanelItemColumnInput:
|
|
175
|
-
customSortPanelItemColumnInputDropdown:
|
|
176
|
-
customSortPanelItemColumnInputText:
|
|
177
|
-
customSortPanelItemOrderRadio:
|
|
178
|
-
customSortPanelItemOrderRadioCn:
|
|
179
|
-
conditionList:
|
|
180
|
-
embedSortBtnContainer:
|
|
181
|
-
embedSortBtn:
|
|
182
|
-
embedSortBtnAsc:
|
|
183
|
-
embedSortBtnDesc:
|
|
184
|
-
embedSortBtnIcon:
|
|
185
|
-
customSortColMenu:
|
|
186
|
-
customSortColMenuItem:
|
|
187
|
-
customSortColMenuItemDesc:
|
|
188
|
-
},
|
|
189
|
-
const [t, n] =
|
|
161
|
+
var xe;
|
|
162
|
+
function Zt() {
|
|
163
|
+
return xe || (xe = 1, K.exports = zt()), K.exports;
|
|
164
|
+
}
|
|
165
|
+
var i = Zt();
|
|
166
|
+
const Gt = "univer-extend-confirm-content", Wt = "univer-extend-confirm-radio-group", qt = "univer-custom-sort-panel-container", Yt = "univer-custom-sort-panel-ext", Jt = "univer-add-condition", Xt = "univer-add-condition-text", Kt = "univer-add-condition-disable", Qt = "univer-custom-sort-panel-footer", en = "univer-custom-sort-panel-footer-btn", tn = "univer-custom-sort-panel-item", nn = "univer-custom-sort-panel-item-head", rn = "univer-custom-sort-panel-item-handler", on = "univer-custom-sort-panel-item-remove", sn = "univer-custom-sort-panel-item-column-input", cn = "univer-custom-sort-panel-item-column-input-dropdown", an = "univer-custom-sort-panel-item-column-input-text", ln = "univer-custom-sort-panel-item-order-radio", dn = "univer-custom-sort-panel-item-order-radio-cn", un = "univer-condition-list", mn = "univer-embed-sort-btn-container", hn = "univer-embed-sort-btn", gn = "univer-embed-sort-btn-asc", Cn = "univer-embed-sort-btn-desc", Sn = "univer-embed-sort-btn-icon", fn = "univer-custom-sort-col-menu", pn = "univer-custom-sort-col-menu-item", vn = "univer-custom-sort-col-menu-item-desc", a = {
|
|
167
|
+
extendConfirmContent: Gt,
|
|
168
|
+
extendConfirmRadioGroup: Wt,
|
|
169
|
+
customSortPanelContainer: qt,
|
|
170
|
+
customSortPanelExt: Yt,
|
|
171
|
+
addCondition: Jt,
|
|
172
|
+
addConditionText: Xt,
|
|
173
|
+
addConditionDisable: Kt,
|
|
174
|
+
customSortPanelFooter: Qt,
|
|
175
|
+
customSortPanelFooterBtn: en,
|
|
176
|
+
customSortPanelItem: tn,
|
|
177
|
+
customSortPanelItemHead: nn,
|
|
178
|
+
customSortPanelItemHandler: rn,
|
|
179
|
+
customSortPanelItemRemove: on,
|
|
180
|
+
customSortPanelItemColumnInput: sn,
|
|
181
|
+
customSortPanelItemColumnInputDropdown: cn,
|
|
182
|
+
customSortPanelItemColumnInputText: an,
|
|
183
|
+
customSortPanelItemOrderRadio: ln,
|
|
184
|
+
customSortPanelItemOrderRadioCn: dn,
|
|
185
|
+
conditionList: un,
|
|
186
|
+
embedSortBtnContainer: mn,
|
|
187
|
+
embedSortBtn: hn,
|
|
188
|
+
embedSortBtnAsc: gn,
|
|
189
|
+
embedSortBtnDesc: Cn,
|
|
190
|
+
embedSortBtnIcon: Sn,
|
|
191
|
+
customSortColMenu: fn,
|
|
192
|
+
customSortColMenuItem: pn,
|
|
193
|
+
customSortColMenuItemDesc: vn
|
|
194
|
+
}, _n = (e) => {
|
|
195
|
+
const [t, n] = B("0"), r = O(H);
|
|
190
196
|
return /* @__PURE__ */ i.jsxs("div", { className: a.extendConfirmContent, children: [
|
|
191
197
|
/* @__PURE__ */ i.jsx("div", { className: "extend-confirm-desc", children: r.t("sheets-sort.dialog.sort-reminder-desc") }),
|
|
192
198
|
/* @__PURE__ */ i.jsxs(
|
|
193
|
-
|
|
199
|
+
we,
|
|
194
200
|
{
|
|
195
201
|
className: a.extendConfirmRadioGroup,
|
|
196
202
|
value: t,
|
|
@@ -200,34 +206,34 @@ const Yt = "univer-extend-confirm-content", Xt = "univer-extend-confirm-radio-gr
|
|
|
200
206
|
},
|
|
201
207
|
children: [
|
|
202
208
|
/* @__PURE__ */ i.jsx(
|
|
203
|
-
|
|
209
|
+
Z,
|
|
204
210
|
{
|
|
205
211
|
value: "0",
|
|
206
212
|
children: r.t("sheets-sort.dialog.sort-reminder-no")
|
|
207
213
|
}
|
|
208
214
|
),
|
|
209
|
-
/* @__PURE__ */ i.jsx(
|
|
215
|
+
/* @__PURE__ */ i.jsx(Z, { value: "1", children: r.t("sheets-sort.dialog.sort-reminder-ext") })
|
|
210
216
|
]
|
|
211
217
|
}
|
|
212
218
|
)
|
|
213
219
|
] });
|
|
214
220
|
};
|
|
215
|
-
var
|
|
216
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
221
|
+
var xn = Object.defineProperty, In = Object.getOwnPropertyDescriptor, yn = (e, t, n, r) => {
|
|
222
|
+
for (var o = r > 1 ? void 0 : r ? In(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
217
223
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
218
|
-
return r && o &&
|
|
224
|
+
return r && o && xn(t, n, o), o;
|
|
219
225
|
}, T = (e, t) => (n, r) => t(n, r, e);
|
|
220
|
-
const
|
|
226
|
+
const z = {
|
|
221
227
|
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
222
228
|
EMPTY_ERROR: "sheets-sort.error.empty",
|
|
223
229
|
SINGLE_ERROR: "sheets-sort.error.single",
|
|
224
230
|
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
225
231
|
};
|
|
226
|
-
let
|
|
232
|
+
let f = class extends qe {
|
|
227
233
|
constructor(t, n, r, o, s, c, l) {
|
|
228
234
|
super();
|
|
229
|
-
|
|
230
|
-
|
|
235
|
+
X(this, "_customSortState$", new pt(null));
|
|
236
|
+
X(this, "customSortState$", this._customSortState$.asObservable());
|
|
231
237
|
this._univerInstanceService = t, this._confirmService = n, this._logService = r, this._selectionManagerService = o, this._sheetsSortService = s, this._localeService = c, this._commandService = l;
|
|
232
238
|
}
|
|
233
239
|
async triggerSortDirectly(t, n, r) {
|
|
@@ -251,22 +257,22 @@ let g = class extends We {
|
|
|
251
257
|
return this._customSortState$.getValue();
|
|
252
258
|
}
|
|
253
259
|
getTitles(t) {
|
|
254
|
-
var
|
|
255
|
-
const n = (
|
|
260
|
+
var d, u;
|
|
261
|
+
const n = (d = this.customSortState()) == null ? void 0 : d.location;
|
|
256
262
|
if (!n)
|
|
257
263
|
return [];
|
|
258
|
-
const { unitId: r, subUnitId: o, range: s } = n, c = (
|
|
264
|
+
const { unitId: r, subUnitId: o, range: s } = n, c = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
259
265
|
if (!c)
|
|
260
266
|
return [];
|
|
261
|
-
const l =
|
|
267
|
+
const l = Rn(this._localeService);
|
|
262
268
|
return Array.from(
|
|
263
269
|
{ length: s.endColumn - s.startColumn + 1 },
|
|
264
|
-
(
|
|
265
|
-
var
|
|
266
|
-
const
|
|
270
|
+
(h, g) => {
|
|
271
|
+
var S;
|
|
272
|
+
const p = (S = c.getCell(s.startRow, g + s.startColumn)) == null ? void 0 : S.v;
|
|
267
273
|
return {
|
|
268
|
-
index:
|
|
269
|
-
label: t ? `${
|
|
274
|
+
index: g + s.startColumn,
|
|
275
|
+
label: t ? `${p != null ? p : l(g + s.startColumn)}` : l(g + s.startColumn)
|
|
270
276
|
};
|
|
271
277
|
}
|
|
272
278
|
);
|
|
@@ -279,9 +285,9 @@ let g = class extends We {
|
|
|
279
285
|
const s = {
|
|
280
286
|
unitId: t,
|
|
281
287
|
subUnitId: n,
|
|
282
|
-
selections: [{ range: r, primary:
|
|
288
|
+
selections: [{ range: r, primary: It(r, o), style: null }]
|
|
283
289
|
};
|
|
284
|
-
this._commandService.executeCommand(
|
|
290
|
+
this._commandService.executeCommand(yt.id, s);
|
|
285
291
|
}
|
|
286
292
|
async showCheckError(t) {
|
|
287
293
|
return await this._confirmService.confirm({
|
|
@@ -303,7 +309,7 @@ let g = class extends We {
|
|
|
303
309
|
},
|
|
304
310
|
children: {
|
|
305
311
|
title: /* @__PURE__ */ i.jsx(
|
|
306
|
-
|
|
312
|
+
_n,
|
|
307
313
|
{
|
|
308
314
|
onChange: (r) => {
|
|
309
315
|
t = r === "1";
|
|
@@ -321,22 +327,22 @@ let g = class extends We {
|
|
|
321
327
|
this._customSortState$.next({ show: !1 });
|
|
322
328
|
}
|
|
323
329
|
_check(t) {
|
|
324
|
-
return this._sheetsSortService.singleCheck(t) ? this._sheetsSortService.mergeCheck(t) ? this._sheetsSortService.formulaCheck(t) ? this._sheetsSortService.emptyCheck(t) ? !0 : (this.showCheckError(
|
|
330
|
+
return this._sheetsSortService.singleCheck(t) ? this._sheetsSortService.mergeCheck(t) ? this._sheetsSortService.formulaCheck(t) ? this._sheetsSortService.emptyCheck(t) ? !0 : (this.showCheckError(z.EMPTY_ERROR), !1) : (this.showCheckError(z.FORMULA_ARRAY), !1) : (this.showCheckError(z.MERGE_ERROR), !1) : (this.showCheckError(z.SINGLE_ERROR), !1);
|
|
325
331
|
}
|
|
326
332
|
async _detectSortLocation(t) {
|
|
327
|
-
const n = this._univerInstanceService.getCurrentUnitForType(
|
|
333
|
+
const n = this._univerInstanceService.getCurrentUnitForType(q.UNIVER_SHEET), r = n.getActiveSheet(), o = n.getUnitId(), s = r.getSheetId(), c = this._selectionManagerService.getCurrentLastSelection();
|
|
328
334
|
if (!c)
|
|
329
335
|
return null;
|
|
330
336
|
let l;
|
|
331
337
|
if (t === !0)
|
|
332
|
-
l =
|
|
338
|
+
l = pe(c.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, s, l);
|
|
333
339
|
else if (t === !1)
|
|
334
340
|
l = c.range;
|
|
335
341
|
else {
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
342
|
+
const d = await this.showExtendConfirm();
|
|
343
|
+
if (d === "cancel")
|
|
338
344
|
return null;
|
|
339
|
-
|
|
345
|
+
d === "keep" ? l = c.range : (l = pe(c.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, s, l));
|
|
340
346
|
}
|
|
341
347
|
return {
|
|
342
348
|
range: l,
|
|
@@ -346,132 +352,141 @@ let g = class extends We {
|
|
|
346
352
|
};
|
|
347
353
|
}
|
|
348
354
|
};
|
|
349
|
-
|
|
350
|
-
T(0,
|
|
351
|
-
T(1,
|
|
352
|
-
T(2,
|
|
353
|
-
T(3,
|
|
354
|
-
T(4,
|
|
355
|
-
T(5,
|
|
356
|
-
T(6,
|
|
357
|
-
],
|
|
358
|
-
function
|
|
355
|
+
f = yn([
|
|
356
|
+
T(0, Re),
|
|
357
|
+
T(1, lt),
|
|
358
|
+
T(2, Ye),
|
|
359
|
+
T(3, E(xt)),
|
|
360
|
+
T(4, E(Ee)),
|
|
361
|
+
T(5, E(H)),
|
|
362
|
+
T(6, Me)
|
|
363
|
+
], f);
|
|
364
|
+
function Rn(e) {
|
|
359
365
|
return (t) => {
|
|
360
|
-
const n =
|
|
366
|
+
const n = Je.chatAtABC(t);
|
|
361
367
|
switch (e.getCurrentLocale()) {
|
|
362
|
-
case
|
|
368
|
+
case Q.ZH_CN:
|
|
363
369
|
return `"${n}"列`;
|
|
364
|
-
case
|
|
370
|
+
case Q.EN_US:
|
|
365
371
|
return `Column "${n}"`;
|
|
366
372
|
default:
|
|
367
373
|
return `Column "${n}"`;
|
|
368
374
|
}
|
|
369
375
|
};
|
|
370
376
|
}
|
|
371
|
-
const
|
|
377
|
+
const re = {
|
|
372
378
|
id: "sheet.command.sort-range-asc",
|
|
373
|
-
type:
|
|
374
|
-
handler: async (e) => await e.get(
|
|
375
|
-
}, re = {
|
|
376
|
-
id: "sheet.command.sort-range-asc-ext",
|
|
377
|
-
type: R.COMMAND,
|
|
378
|
-
handler: async (e) => await e.get(g).triggerSortDirectly(!0, !0)
|
|
379
|
+
type: b.COMMAND,
|
|
380
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!0, !1)
|
|
379
381
|
}, oe = {
|
|
380
|
-
id: "sheet.command.sort-range-
|
|
381
|
-
type:
|
|
382
|
-
handler: async (e) => await e.get(
|
|
382
|
+
id: "sheet.command.sort-range-asc-ext",
|
|
383
|
+
type: b.COMMAND,
|
|
384
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!0, !0)
|
|
383
385
|
}, se = {
|
|
384
|
-
id: "sheet.command.sort-range-desc
|
|
385
|
-
type:
|
|
386
|
-
handler: async (e) => await e.get(
|
|
386
|
+
id: "sheet.command.sort-range-desc",
|
|
387
|
+
type: b.COMMAND,
|
|
388
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!1, !1)
|
|
387
389
|
}, ie = {
|
|
388
|
-
id: "sheet.command.sort-range-
|
|
389
|
-
type:
|
|
390
|
-
handler: async (e) => await e.get(
|
|
390
|
+
id: "sheet.command.sort-range-desc-ext",
|
|
391
|
+
type: b.COMMAND,
|
|
392
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!1, !0)
|
|
391
393
|
}, ce = {
|
|
392
|
-
id: "sheet.command.sort-range-
|
|
393
|
-
type:
|
|
394
|
-
handler: async (e) => await e.get(
|
|
394
|
+
id: "sheet.command.sort-range-custom",
|
|
395
|
+
type: b.COMMAND,
|
|
396
|
+
handler: async (e) => await e.get(f).triggerSortCustomize()
|
|
395
397
|
}, ae = {
|
|
396
|
-
id: "sheet.command.sort-range-asc-
|
|
397
|
-
type:
|
|
398
|
-
handler: async (e) => await e.get(
|
|
398
|
+
id: "sheet.command.sort-range-asc-ctx",
|
|
399
|
+
type: b.COMMAND,
|
|
400
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!0, !1)
|
|
399
401
|
}, le = {
|
|
400
|
-
id: "sheet.command.sort-range-
|
|
401
|
-
type:
|
|
402
|
-
handler: async (e) => await e.get(
|
|
402
|
+
id: "sheet.command.sort-range-asc-ext-ctx",
|
|
403
|
+
type: b.COMMAND,
|
|
404
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!0, !0)
|
|
403
405
|
}, de = {
|
|
404
|
-
id: "sheet.command.sort-range-desc-
|
|
405
|
-
type:
|
|
406
|
-
handler: async (e) => await e.get(
|
|
406
|
+
id: "sheet.command.sort-range-desc-ctx",
|
|
407
|
+
type: b.COMMAND,
|
|
408
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!1, !1)
|
|
407
409
|
}, ue = {
|
|
410
|
+
id: "sheet.command.sort-range-desc-ext-ctx",
|
|
411
|
+
type: b.COMMAND,
|
|
412
|
+
handler: async (e) => await e.get(f).triggerSortDirectly(!1, !0)
|
|
413
|
+
}, me = {
|
|
408
414
|
id: "sheet.command.sort-range-custom-ctx",
|
|
409
|
-
type:
|
|
410
|
-
handler: async (e) => await e.get(
|
|
415
|
+
type: b.COMMAND,
|
|
416
|
+
handler: async (e) => await e.get(f).triggerSortCustomize()
|
|
411
417
|
};
|
|
412
|
-
function
|
|
413
|
-
const e = O(
|
|
414
|
-
if (!
|
|
418
|
+
function Mn() {
|
|
419
|
+
const e = O(f), t = O(Ee), n = O(H), [r, o] = B(!1), [s, c] = B(0), l = Te(null), d = e.customSortState();
|
|
420
|
+
if (!d || !d.location)
|
|
415
421
|
return null;
|
|
416
|
-
const { range:
|
|
417
|
-
{ type: k.ASC, colIndex:
|
|
418
|
-
]), Y = P((
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
}, [
|
|
422
|
+
const { range: u, unitId: h, subUnitId: g } = d.location, p = e.getTitles(r), [S, U] = B([
|
|
423
|
+
{ type: k.ASC, colIndex: u.startColumn }
|
|
424
|
+
]), Y = P((m, x) => {
|
|
425
|
+
const $ = [...S];
|
|
426
|
+
x === null ? $.splice(m, 1) : $[m] = x, U($);
|
|
427
|
+
}, [S]), V = P(
|
|
422
428
|
Xe(() => {
|
|
423
|
-
const
|
|
424
|
-
|
|
429
|
+
const m = [...S], x = En(u, S);
|
|
430
|
+
x !== null && (m.push({ type: k.ASC, colIndex: x }), U(m));
|
|
425
431
|
}, 200),
|
|
426
|
-
[
|
|
427
|
-
),
|
|
428
|
-
t.applySort({ range:
|
|
429
|
-
}, [t, e,
|
|
432
|
+
[S, u]
|
|
433
|
+
), C = P((m, x) => {
|
|
434
|
+
t.applySort({ range: u, orderRules: m, hasTitle: x }), e.closeCustomSortPanel();
|
|
435
|
+
}, [t, e, u]), J = P(() => {
|
|
430
436
|
e.closeCustomSortPanel();
|
|
431
|
-
}, [e]),
|
|
432
|
-
o(
|
|
433
|
-
}, [e,
|
|
434
|
-
|
|
435
|
-
l.current &&
|
|
436
|
-
}, [
|
|
437
|
-
const
|
|
437
|
+
}, [e]), ze = P((m) => {
|
|
438
|
+
o(m), m ? e.setSelection(h, g, { ...u, startRow: u.startRow + 1 }) : e.setSelection(h, g, u);
|
|
439
|
+
}, [e, u, g, h]);
|
|
440
|
+
Pe(() => {
|
|
441
|
+
l.current && S.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
442
|
+
}, [S]);
|
|
443
|
+
const Ze = S.length < p.length, fe = S.map((m) => ({ ...m, id: `${m.colIndex}` }));
|
|
438
444
|
return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContainer, children: [
|
|
439
|
-
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContent, onMouseDown: (
|
|
440
|
-
|
|
445
|
+
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContent, onMouseDown: (m) => {
|
|
446
|
+
m.stopPropagation();
|
|
441
447
|
}, children: [
|
|
442
448
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelExt, children: [
|
|
443
|
-
/* @__PURE__ */ i.jsx("div", { className: a.firstRowCheck, children: /* @__PURE__ */ i.jsx(Mt, { checked: r, onChange: (
|
|
444
|
-
|
|
445
|
-
/* @__PURE__ */ i.jsx(
|
|
446
|
-
/* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
|
|
447
|
-
] }) : /* @__PURE__ */ i.jsxs("div", { className: `${a.addCondition} ${a.addConditionDisable}`, children: [
|
|
448
|
-
/* @__PURE__ */ i.jsx(Q, {}),
|
|
449
|
+
/* @__PURE__ */ i.jsx("div", { className: a.firstRowCheck, children: /* @__PURE__ */ i.jsx(Mt, { checked: r, onChange: (m) => ze(!!m), children: n.t("sheets-sort.dialog.first-row-check") }) }),
|
|
450
|
+
Ze ? /* @__PURE__ */ i.jsxs("div", { className: a.addCondition, onClick: V, children: [
|
|
451
|
+
/* @__PURE__ */ i.jsx(ee, {}),
|
|
449
452
|
/* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
|
|
450
|
-
] })
|
|
453
|
+
] }) : /* @__PURE__ */ i.jsxs(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
className: `
|
|
457
|
+
${a.addCondition}
|
|
458
|
+
${a.addConditionDisable}
|
|
459
|
+
`,
|
|
460
|
+
children: [
|
|
461
|
+
/* @__PURE__ */ i.jsx(ee, {}),
|
|
462
|
+
/* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
|
|
463
|
+
]
|
|
464
|
+
}
|
|
465
|
+
)
|
|
451
466
|
] }),
|
|
452
467
|
/* @__PURE__ */ i.jsx(
|
|
453
468
|
"div",
|
|
454
469
|
{
|
|
455
470
|
className: a.conditionList,
|
|
456
|
-
onScroll: (
|
|
457
|
-
const
|
|
458
|
-
c(
|
|
471
|
+
onScroll: (m) => {
|
|
472
|
+
const x = m.currentTarget.scrollTop;
|
|
473
|
+
c(x);
|
|
459
474
|
},
|
|
460
475
|
ref: l,
|
|
461
476
|
children: /* @__PURE__ */ i.jsx(
|
|
462
|
-
|
|
477
|
+
bt,
|
|
463
478
|
{
|
|
464
|
-
list:
|
|
465
|
-
onListChange:
|
|
479
|
+
list: fe,
|
|
480
|
+
onListChange: U,
|
|
466
481
|
idKey: "id",
|
|
467
482
|
draggableHandle: `.${a.customSortPanelItemHandler}`,
|
|
468
|
-
itemRender: (
|
|
469
|
-
|
|
483
|
+
itemRender: (m) => /* @__PURE__ */ i.jsx(
|
|
484
|
+
bn,
|
|
470
485
|
{
|
|
471
|
-
titles:
|
|
472
|
-
list:
|
|
473
|
-
item:
|
|
474
|
-
onChange: (
|
|
486
|
+
titles: p,
|
|
487
|
+
list: fe,
|
|
488
|
+
item: m,
|
|
489
|
+
onChange: (x, $) => Y($, x),
|
|
475
490
|
scrollPosition: s
|
|
476
491
|
}
|
|
477
492
|
),
|
|
@@ -483,155 +498,175 @@ function On() {
|
|
|
483
498
|
)
|
|
484
499
|
] }),
|
|
485
500
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelFooter, children: [
|
|
486
|
-
/* @__PURE__ */ i.jsx(ve, { className: a.customSortPanelFooterBtn, type: "default", onClick: () =>
|
|
487
|
-
/* @__PURE__ */ i.jsx(ve, { className: a.customSortPanelFooterBtn, type: "primary", onClick: () =>
|
|
501
|
+
/* @__PURE__ */ i.jsx(ve, { className: a.customSortPanelFooterBtn, type: "default", onClick: () => J(), children: n.t("sheets-sort.dialog.cancel") }),
|
|
502
|
+
/* @__PURE__ */ i.jsx(ve, { className: a.customSortPanelFooterBtn, type: "primary", onClick: () => C(S, r), children: n.t("sheets-sort.dialog.confirm") })
|
|
488
503
|
] })
|
|
489
504
|
] });
|
|
490
505
|
}
|
|
491
|
-
function
|
|
492
|
-
var
|
|
493
|
-
const { list: t, item: n, titles: r, onChange: o, scrollPosition: s } = e, c = O(H), l = r.filter((
|
|
494
|
-
o({ ...n, colIndex:
|
|
495
|
-
}, [
|
|
496
|
-
|
|
506
|
+
function bn(e) {
|
|
507
|
+
var V;
|
|
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
|
+
o({ ...n, colIndex: C.index }, d), g(!1);
|
|
510
|
+
}, [d, n, o]), [h, g] = B(!1), p = (C) => {
|
|
511
|
+
g(C);
|
|
497
512
|
};
|
|
498
|
-
|
|
499
|
-
|
|
513
|
+
Pe(() => {
|
|
514
|
+
g(!1);
|
|
500
515
|
}, [s]);
|
|
501
|
-
const
|
|
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;
|
|
502
517
|
return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItem, children: [
|
|
503
518
|
/* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemHead, children: [
|
|
504
|
-
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemHandler, children: /* @__PURE__ */ i.jsx(
|
|
519
|
+
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemHandler, children: /* @__PURE__ */ i.jsx($e, {}) }),
|
|
505
520
|
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemColumn, children: /* @__PURE__ */ i.jsx(
|
|
506
|
-
|
|
521
|
+
Et,
|
|
507
522
|
{
|
|
508
523
|
placement: "bottomLeft",
|
|
509
524
|
trigger: ["click"],
|
|
510
|
-
visible:
|
|
511
|
-
onVisibleChange:
|
|
512
|
-
overlay: /* @__PURE__ */ i.jsx("ul", { className: a.customSortColMenu, children: l.map((
|
|
525
|
+
visible: h,
|
|
526
|
+
onVisibleChange: p,
|
|
527
|
+
overlay: /* @__PURE__ */ i.jsx("ul", { className: a.customSortColMenu, children: l.map((C) => /* @__PURE__ */ i.jsxs(
|
|
513
528
|
"li",
|
|
514
529
|
{
|
|
515
|
-
onClick: () =>
|
|
530
|
+
onClick: () => u(C),
|
|
516
531
|
className: a.customSortColMenuItem,
|
|
517
532
|
children: [
|
|
518
|
-
/* @__PURE__ */ i.jsx("span", { className: a.customSortColMenuItemDesc, children:
|
|
519
|
-
/* @__PURE__ */ i.jsx("span", { className: a.customSortColMenuItemCheck, children:
|
|
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(Le, {}) })
|
|
520
535
|
]
|
|
521
536
|
},
|
|
522
|
-
|
|
537
|
+
C.index
|
|
523
538
|
)) }),
|
|
524
539
|
children: /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemColumnInput, children: [
|
|
525
|
-
/* @__PURE__ */ i.jsx("span", { className: a.customSortPanelItemColumnInputText, children:
|
|
526
|
-
/* @__PURE__ */ i.jsx(
|
|
540
|
+
/* @__PURE__ */ i.jsx("span", { className: a.customSortPanelItemColumnInputText, children: U }),
|
|
541
|
+
/* @__PURE__ */ i.jsx(Ue, { className: a.customSortPanelItemColumnInputDropdown })
|
|
527
542
|
] })
|
|
528
543
|
}
|
|
529
544
|
) })
|
|
530
545
|
] }),
|
|
531
546
|
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemOrder, children: /* @__PURE__ */ i.jsxs(
|
|
532
|
-
|
|
547
|
+
we,
|
|
533
548
|
{
|
|
534
549
|
className: Y,
|
|
535
550
|
value: n.type,
|
|
536
|
-
onChange: (
|
|
537
|
-
o({ ...n, type:
|
|
551
|
+
onChange: (C) => {
|
|
552
|
+
o({ ...n, type: C }, d);
|
|
538
553
|
},
|
|
539
554
|
children: [
|
|
540
|
-
/* @__PURE__ */ i.jsx(
|
|
541
|
-
/* @__PURE__ */ i.jsx(
|
|
555
|
+
/* @__PURE__ */ i.jsx(Z, { value: k.ASC, children: c.t("sheets-sort.general.sort-asc") }),
|
|
556
|
+
/* @__PURE__ */ i.jsx(Z, { value: k.DESC, children: c.t("sheets-sort.general.sort-desc") })
|
|
542
557
|
]
|
|
543
558
|
}
|
|
544
559
|
) }),
|
|
545
|
-
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemRemove, children:
|
|
560
|
+
/* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemRemove, children: S && /* @__PURE__ */ i.jsx(De, { onClick: () => o(null, d) }) })
|
|
546
561
|
] });
|
|
547
562
|
}
|
|
548
|
-
function
|
|
563
|
+
function En(e, t) {
|
|
549
564
|
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((s) => s == null ? void 0 : s.colIndex));
|
|
550
565
|
for (let s = n; s <= r; s++)
|
|
551
566
|
if (!o.has(s))
|
|
552
567
|
return s;
|
|
553
568
|
return null;
|
|
554
569
|
}
|
|
555
|
-
function
|
|
556
|
-
const { range: t, colIndex: n, onClose: r } = e, o = O(
|
|
557
|
-
const { unitId:
|
|
558
|
-
if (t &&
|
|
559
|
-
const
|
|
560
|
-
o.triggerSortDirectly(
|
|
570
|
+
function On(e) {
|
|
571
|
+
const { range: t, colIndex: n, onClose: r } = e, o = O(f), s = O(Re), c = O(H), l = P((d) => {
|
|
572
|
+
const { unitId: u, subUnitId: h } = Rt(s) || {};
|
|
573
|
+
if (t && u && h) {
|
|
574
|
+
const g = { ...t, startRow: t.startRow + 1 };
|
|
575
|
+
o.triggerSortDirectly(d, !1, { unitId: u, subUnitId: h, range: g, colIndex: n });
|
|
561
576
|
} else
|
|
562
|
-
console.warn(`Cannot find the target to sort. unitId: ${
|
|
577
|
+
console.warn(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${h}, range: ${t}, colIndex: ${n}`);
|
|
563
578
|
r();
|
|
564
579
|
}, [t, n, o, s, r]);
|
|
565
580
|
return /* @__PURE__ */ i.jsxs("div", { className: a.embedSortBtnContainer, children: [
|
|
566
|
-
/* @__PURE__ */ i.jsxs(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
581
|
+
/* @__PURE__ */ i.jsxs(
|
|
582
|
+
"div",
|
|
583
|
+
{
|
|
584
|
+
className: `
|
|
585
|
+
${a.embedSortBtn}
|
|
586
|
+
${a.embedSortBtnAsc}
|
|
587
|
+
`,
|
|
588
|
+
onClick: () => l(!0),
|
|
589
|
+
children: [
|
|
590
|
+
/* @__PURE__ */ i.jsx(te, { className: a.embedSortBtnIcon }),
|
|
591
|
+
c.t("sheets-sort.general.sort-asc")
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
),
|
|
595
|
+
/* @__PURE__ */ i.jsxs(
|
|
596
|
+
"div",
|
|
597
|
+
{
|
|
598
|
+
className: `
|
|
599
|
+
${a.embedSortBtn}
|
|
600
|
+
${a.embedSortBtnDesc}
|
|
601
|
+
`,
|
|
602
|
+
onClick: () => l(!1),
|
|
603
|
+
children: [
|
|
604
|
+
/* @__PURE__ */ i.jsx(ne, { className: a.embedSortBtnIcon }),
|
|
605
|
+
c.t("sheets-sort.general.sort-desc")
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
)
|
|
574
609
|
] });
|
|
575
610
|
}
|
|
576
|
-
const
|
|
577
|
-
function
|
|
611
|
+
const Ae = "sheet.menu.sheets-sort", Be = "sheet.menu.sheets-sort-ctx", F = "AscendingSingle", he = "ExpandAscendingSingle", ge = "DescendingSingle", Ce = "ExpandDescendingSingle", Se = "CustomSortSingle";
|
|
612
|
+
function Tn(e) {
|
|
578
613
|
return {
|
|
579
|
-
id:
|
|
580
|
-
type:
|
|
581
|
-
icon:
|
|
614
|
+
id: Ae,
|
|
615
|
+
type: _.SUBITEMS,
|
|
616
|
+
icon: F,
|
|
582
617
|
tooltip: "sheets-sort.general.sort",
|
|
583
|
-
hidden$:
|
|
618
|
+
hidden$: Oe(e, q.UNIVER_SHEET),
|
|
584
619
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
585
620
|
};
|
|
586
621
|
}
|
|
587
|
-
function
|
|
622
|
+
function Pn(e) {
|
|
588
623
|
return {
|
|
589
|
-
id:
|
|
590
|
-
icon:
|
|
624
|
+
id: re.id,
|
|
625
|
+
icon: F,
|
|
591
626
|
title: "sheets-sort.general.sort-asc-cur",
|
|
592
|
-
type:
|
|
593
|
-
hidden$:
|
|
627
|
+
type: _.BUTTON,
|
|
628
|
+
hidden$: it(e)
|
|
594
629
|
};
|
|
595
630
|
}
|
|
596
|
-
function
|
|
631
|
+
function wn(e) {
|
|
597
632
|
return {
|
|
598
|
-
id:
|
|
633
|
+
id: oe.id,
|
|
599
634
|
title: "sheets-sort.general.sort-asc-ext",
|
|
600
|
-
icon:
|
|
601
|
-
type:
|
|
635
|
+
icon: he,
|
|
636
|
+
type: _.BUTTON
|
|
602
637
|
};
|
|
603
638
|
}
|
|
604
|
-
function
|
|
639
|
+
function Nn(e) {
|
|
605
640
|
return {
|
|
606
|
-
id:
|
|
641
|
+
id: se.id,
|
|
607
642
|
title: "sheets-sort.general.sort-desc-cur",
|
|
608
|
-
icon:
|
|
609
|
-
type:
|
|
643
|
+
icon: ge,
|
|
644
|
+
type: _.BUTTON
|
|
610
645
|
};
|
|
611
646
|
}
|
|
612
|
-
function
|
|
647
|
+
function Ln(e) {
|
|
613
648
|
return {
|
|
614
|
-
id:
|
|
649
|
+
id: ie.id,
|
|
615
650
|
title: "sheets-sort.general.sort-desc-ext",
|
|
616
|
-
icon:
|
|
617
|
-
type:
|
|
651
|
+
icon: Ce,
|
|
652
|
+
type: _.BUTTON
|
|
618
653
|
};
|
|
619
654
|
}
|
|
620
|
-
function
|
|
655
|
+
function jn(e) {
|
|
621
656
|
return {
|
|
622
|
-
id:
|
|
657
|
+
id: ce.id,
|
|
623
658
|
title: "sheets-sort.general.sort-custom",
|
|
624
|
-
type:
|
|
625
|
-
icon:
|
|
659
|
+
type: _.BUTTON,
|
|
660
|
+
icon: Se
|
|
626
661
|
};
|
|
627
662
|
}
|
|
628
|
-
function
|
|
663
|
+
function Dn(e) {
|
|
629
664
|
return {
|
|
630
|
-
id:
|
|
665
|
+
id: Be,
|
|
631
666
|
title: "sheets-sort.general.sort",
|
|
632
|
-
type:
|
|
633
|
-
icon:
|
|
634
|
-
hidden$:
|
|
667
|
+
type: _.SUBITEMS,
|
|
668
|
+
icon: F,
|
|
669
|
+
hidden$: Oe(e, q.UNIVER_SHEET),
|
|
635
670
|
disabled$: w(e, {
|
|
636
671
|
workbookTypes: [N],
|
|
637
672
|
worksheetTypes: [L, j],
|
|
@@ -639,123 +674,122 @@ function $n(e) {
|
|
|
639
674
|
})
|
|
640
675
|
};
|
|
641
676
|
}
|
|
642
|
-
function
|
|
677
|
+
function kn(e) {
|
|
643
678
|
return {
|
|
644
|
-
id:
|
|
679
|
+
id: ae.id,
|
|
645
680
|
title: "sheets-sort.general.sort-asc-cur",
|
|
646
|
-
type:
|
|
647
|
-
icon:
|
|
681
|
+
type: _.BUTTON,
|
|
682
|
+
icon: F,
|
|
648
683
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
649
684
|
};
|
|
650
685
|
}
|
|
651
|
-
function
|
|
686
|
+
function Hn(e) {
|
|
652
687
|
return {
|
|
653
|
-
id:
|
|
688
|
+
id: le.id,
|
|
654
689
|
title: "sheets-sort.general.sort-asc-ext",
|
|
655
|
-
type:
|
|
656
|
-
icon:
|
|
690
|
+
type: _.BUTTON,
|
|
691
|
+
icon: he,
|
|
657
692
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
658
693
|
};
|
|
659
694
|
}
|
|
660
|
-
function
|
|
695
|
+
function Un(e) {
|
|
661
696
|
return {
|
|
662
|
-
id:
|
|
697
|
+
id: de.id,
|
|
663
698
|
title: "sheets-sort.general.sort-desc-cur",
|
|
664
|
-
type:
|
|
665
|
-
icon:
|
|
699
|
+
type: _.BUTTON,
|
|
700
|
+
icon: ge,
|
|
666
701
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
667
702
|
};
|
|
668
703
|
}
|
|
669
|
-
function
|
|
704
|
+
function $n(e) {
|
|
670
705
|
return {
|
|
671
|
-
id:
|
|
706
|
+
id: ue.id,
|
|
672
707
|
title: "sheets-sort.general.sort-desc-ext",
|
|
673
|
-
type:
|
|
674
|
-
icon:
|
|
708
|
+
type: _.BUTTON,
|
|
709
|
+
icon: Ce,
|
|
675
710
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
676
711
|
};
|
|
677
712
|
}
|
|
678
|
-
function
|
|
713
|
+
function An(e) {
|
|
679
714
|
return {
|
|
680
|
-
id:
|
|
715
|
+
id: me.id,
|
|
681
716
|
title: "sheets-sort.general.sort-custom",
|
|
682
|
-
type:
|
|
683
|
-
icon:
|
|
717
|
+
type: _.BUTTON,
|
|
718
|
+
icon: Se,
|
|
684
719
|
disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
|
|
685
720
|
};
|
|
686
721
|
}
|
|
687
|
-
const
|
|
688
|
-
[
|
|
689
|
-
[
|
|
722
|
+
const Bn = {
|
|
723
|
+
[dt.FORMULAS_INSERT]: {
|
|
724
|
+
[Ae]: {
|
|
690
725
|
order: 2,
|
|
691
|
-
menuItemFactory:
|
|
692
|
-
[
|
|
726
|
+
menuItemFactory: Tn,
|
|
727
|
+
[re.id]: {
|
|
693
728
|
order: 0,
|
|
694
|
-
menuItemFactory:
|
|
729
|
+
menuItemFactory: Pn
|
|
695
730
|
},
|
|
696
|
-
[
|
|
731
|
+
[oe.id]: {
|
|
697
732
|
order: 1,
|
|
698
|
-
menuItemFactory:
|
|
733
|
+
menuItemFactory: wn
|
|
699
734
|
},
|
|
700
|
-
[
|
|
735
|
+
[se.id]: {
|
|
701
736
|
order: 2,
|
|
702
|
-
menuItemFactory:
|
|
737
|
+
menuItemFactory: Nn
|
|
703
738
|
},
|
|
704
|
-
[
|
|
739
|
+
[ie.id]: {
|
|
705
740
|
order: 3,
|
|
706
|
-
menuItemFactory:
|
|
741
|
+
menuItemFactory: Ln
|
|
707
742
|
},
|
|
708
|
-
[
|
|
743
|
+
[ce.id]: {
|
|
709
744
|
order: 4,
|
|
710
|
-
menuItemFactory:
|
|
745
|
+
menuItemFactory: jn
|
|
711
746
|
}
|
|
712
747
|
}
|
|
713
748
|
},
|
|
714
|
-
[
|
|
715
|
-
[
|
|
716
|
-
[
|
|
749
|
+
[ut.MAIN_AREA]: {
|
|
750
|
+
[mt.DATA]: {
|
|
751
|
+
[Be]: {
|
|
717
752
|
order: 0,
|
|
718
|
-
menuItemFactory:
|
|
719
|
-
[
|
|
753
|
+
menuItemFactory: Dn,
|
|
754
|
+
[ae.id]: {
|
|
720
755
|
order: 0,
|
|
721
|
-
menuItemFactory:
|
|
756
|
+
menuItemFactory: kn
|
|
722
757
|
},
|
|
723
|
-
[
|
|
758
|
+
[le.id]: {
|
|
724
759
|
order: 1,
|
|
725
|
-
menuItemFactory:
|
|
760
|
+
menuItemFactory: Hn
|
|
726
761
|
},
|
|
727
|
-
[
|
|
762
|
+
[de.id]: {
|
|
728
763
|
order: 2,
|
|
729
|
-
menuItemFactory:
|
|
764
|
+
menuItemFactory: Un
|
|
730
765
|
},
|
|
731
|
-
[
|
|
766
|
+
[ue.id]: {
|
|
732
767
|
order: 3,
|
|
733
|
-
menuItemFactory:
|
|
768
|
+
menuItemFactory: $n
|
|
734
769
|
},
|
|
735
|
-
[
|
|
770
|
+
[me.id]: {
|
|
736
771
|
order: 4,
|
|
737
|
-
menuItemFactory:
|
|
772
|
+
menuItemFactory: An
|
|
738
773
|
}
|
|
739
774
|
}
|
|
740
775
|
}
|
|
741
776
|
}
|
|
742
777
|
};
|
|
743
|
-
var
|
|
744
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
778
|
+
var Fn = Object.defineProperty, Vn = Object.getOwnPropertyDescriptor, zn = (e, t, n, r) => {
|
|
779
|
+
for (var o = r > 1 ? void 0 : r ? Vn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
745
780
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
746
|
-
return r && o &&
|
|
781
|
+
return r && o && Fn(t, n, o), o;
|
|
747
782
|
}, M = (e, t) => (n, r) => t(n, r, e);
|
|
748
|
-
const
|
|
749
|
-
let
|
|
750
|
-
constructor(e, t, n, r, o, s, c, l,
|
|
751
|
-
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 =
|
|
783
|
+
const Ie = "custom-sort-dialog", Zn = 560;
|
|
784
|
+
let G = class extends Ke {
|
|
785
|
+
constructor(e, t, n, r, o, s, c, l, d, u) {
|
|
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();
|
|
752
787
|
}
|
|
753
788
|
_initMenu() {
|
|
754
|
-
this._menuManagerService.mergeMenu(
|
|
789
|
+
this._menuManagerService.mergeMenu(Bn);
|
|
755
790
|
}
|
|
756
791
|
_initCommands() {
|
|
757
792
|
[
|
|
758
|
-
ne,
|
|
759
793
|
re,
|
|
760
794
|
oe,
|
|
761
795
|
se,
|
|
@@ -764,86 +798,87 @@ let Z = class extends Ke {
|
|
|
764
798
|
ae,
|
|
765
799
|
le,
|
|
766
800
|
de,
|
|
767
|
-
ue
|
|
768
|
-
|
|
801
|
+
ue,
|
|
802
|
+
me
|
|
803
|
+
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(rt.id));
|
|
769
804
|
}
|
|
770
805
|
_initUI() {
|
|
771
|
-
this.disposeWithMe(this._componentManager.register("CustomSortPanel",
|
|
806
|
+
this.disposeWithMe(this._componentManager.register("CustomSortPanel", Mn)), this.disposeWithMe(this._uiPartsService.registerComponent(at.FILTER_PANEL_EMBED_POINT, () => Qe(On, this._injector))), this.disposeWithMe(this._componentManager.register(F, te)), this.disposeWithMe(this._componentManager.register(he, ke)), this.disposeWithMe(this._componentManager.register(ge, ne)), this.disposeWithMe(this._componentManager.register(Ce, He)), this.disposeWithMe(this._componentManager.register(Se, je)), this._sheetsSortUIService.customSortState$.pipe(vt(this.dispose$)).subscribe((e) => {
|
|
772
807
|
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
773
808
|
});
|
|
774
809
|
}
|
|
775
810
|
_openCustomSortPanel(e) {
|
|
776
811
|
this._dialogService.open({
|
|
777
|
-
id:
|
|
812
|
+
id: Ie,
|
|
778
813
|
draggable: !0,
|
|
779
|
-
width:
|
|
780
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${
|
|
814
|
+
width: Zn,
|
|
815
|
+
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${st(e.range)}` },
|
|
781
816
|
children: { label: "CustomSortPanel" },
|
|
782
817
|
destroyOnClose: !0,
|
|
783
|
-
defaultPosition:
|
|
818
|
+
defaultPosition: Gn(),
|
|
784
819
|
preservePositionOnDestroy: !1,
|
|
785
820
|
onClose: () => this._closePanel(),
|
|
786
821
|
mask: !0
|
|
787
822
|
});
|
|
788
823
|
}
|
|
789
824
|
_closePanel() {
|
|
790
|
-
this._dialogService.close(
|
|
825
|
+
this._dialogService.close(Ie), queueMicrotask(() => this._layoutService.focus());
|
|
791
826
|
}
|
|
792
827
|
};
|
|
793
|
-
|
|
794
|
-
M(0,
|
|
795
|
-
M(1,
|
|
796
|
-
M(2,
|
|
797
|
-
M(3,
|
|
798
|
-
M(4,
|
|
799
|
-
M(5,
|
|
800
|
-
M(6,
|
|
801
|
-
M(7,
|
|
802
|
-
M(8,
|
|
803
|
-
M(9,
|
|
804
|
-
],
|
|
805
|
-
function
|
|
828
|
+
G = zn([
|
|
829
|
+
M(0, Me),
|
|
830
|
+
M(1, gt),
|
|
831
|
+
M(2, Ct),
|
|
832
|
+
M(3, St),
|
|
833
|
+
M(4, ft),
|
|
834
|
+
M(5, E(ct)),
|
|
835
|
+
M(6, E(H)),
|
|
836
|
+
M(7, E(f)),
|
|
837
|
+
M(8, E(be)),
|
|
838
|
+
M(9, E(ht))
|
|
839
|
+
], G);
|
|
840
|
+
function Gn() {
|
|
806
841
|
return { x: 0, y: 0 };
|
|
807
842
|
}
|
|
808
|
-
var
|
|
809
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
843
|
+
var Fe = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, qn = (e, t, n) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yn = (e, t, n, r) => {
|
|
844
|
+
for (var o = r > 1 ? void 0 : r ? Wn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
810
845
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
811
|
-
return r && o &&
|
|
812
|
-
},
|
|
813
|
-
const
|
|
814
|
-
let
|
|
815
|
-
constructor(e =
|
|
846
|
+
return r && o && Fe(t, n, o), o;
|
|
847
|
+
}, ye = (e, t) => (n, r) => t(n, r, e), Ve = (e, t, n) => qn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
848
|
+
const Jn = "SHEET_SORT_UI_PLUGIN";
|
|
849
|
+
let W = class extends tt {
|
|
850
|
+
constructor(e = Tt, t, n) {
|
|
816
851
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
817
852
|
const { ...r } = this._config;
|
|
818
|
-
this._configService.setConfig(
|
|
853
|
+
this._configService.setConfig(Ot, r);
|
|
819
854
|
}
|
|
820
855
|
onStarting() {
|
|
821
856
|
[
|
|
822
|
-
[
|
|
823
|
-
[
|
|
857
|
+
[f],
|
|
858
|
+
[G]
|
|
824
859
|
].forEach((e) => this._injector.add(e));
|
|
825
860
|
}
|
|
826
861
|
onRendered() {
|
|
827
|
-
this._injector.get(
|
|
862
|
+
this._injector.get(G);
|
|
828
863
|
}
|
|
829
864
|
};
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
],
|
|
865
|
+
Ve(W, "type", q.UNIVER_SHEET);
|
|
866
|
+
Ve(W, "pluginName", Jn);
|
|
867
|
+
W = Yn([
|
|
868
|
+
et(ot),
|
|
869
|
+
ye(1, E(be)),
|
|
870
|
+
ye(2, nt)
|
|
871
|
+
], W);
|
|
837
872
|
export {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
873
|
+
re as SortRangeAscCommand,
|
|
874
|
+
oe as SortRangeAscExtCommand,
|
|
875
|
+
le as SortRangeAscExtInCtxMenuCommand,
|
|
876
|
+
ae as SortRangeAscInCtxMenuCommand,
|
|
877
|
+
ce as SortRangeCustomCommand,
|
|
878
|
+
me as SortRangeCustomInCtxMenuCommand,
|
|
879
|
+
se as SortRangeDescCommand,
|
|
880
|
+
ie as SortRangeDescExtCommand,
|
|
881
|
+
ue as SortRangeDescExtInCtxMenuCommand,
|
|
882
|
+
de as SortRangeDescInCtxMenuCommand,
|
|
883
|
+
W as UniverSheetsSortUIPlugin
|
|
849
884
|
};
|