@univerjs/sheets-sort-ui 0.9.4 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +151 -151
- package/lib/index.js +151 -151
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var X = (e, t, n) =>
|
|
4
|
-
import { LocaleService as P, IUniverInstanceService as _e, Inject as R, ICommandService as xe, Disposable as
|
|
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 { LocaleService as P, IUniverInstanceService as _e, Inject as R, ICommandService as xe, Disposable as ze, UniverInstanceType as Y, Tools as Ye, LocaleType as Ce, CommandType as M, throttle as qe, Injector as we, RxDisposable as Xe, DependentOn as Ke, IConfigService as Je, Plugin as Qe, merge as et } from "@univerjs/core";
|
|
5
5
|
import { jsxs as g, jsx as c } from "react/jsx-runtime";
|
|
6
|
-
import { SheetsSelectionsService as
|
|
7
|
-
import { SheetsSortService as Ie, SortType as U, SortRangeCommand as
|
|
8
|
-
import { useDependency as E, IConfirmService as
|
|
9
|
-
import { BehaviorSubject as
|
|
10
|
-
import { RadioGroup as Re, Radio as V, Checkbox as
|
|
11
|
-
import { useState as j, forwardRef as y, useRef as Te, createElement as _, useCallback as
|
|
12
|
-
import { serializeRange as
|
|
13
|
-
import { getCurrentRangeDisable$ as D, getCurrentExclusiveRangeInterest$ as
|
|
14
|
-
const
|
|
6
|
+
import { SheetsSelectionsService as tt, getPrimaryForRange as rt, SetSelectionsOperation as nt, expandToContinuousRange as fe, getSheetCommandTarget as ot, RangeProtectionPermissionEditPoint as b, WorksheetSortPermission as N, WorksheetEditPermission as k, WorkbookEditablePermission as L } from "@univerjs/sheets";
|
|
7
|
+
import { SheetsSortService as Ie, SortType as U, SortRangeCommand as it, UniverSheetsSortPlugin as st } from "@univerjs/sheets-sort";
|
|
8
|
+
import { useDependency as E, IConfirmService as ct, useObservable as at, MenuItemType as S, getMenuHiddenObservable as Me, ContextMenuPosition as lt, ContextMenuGroup as dt, RibbonDataGroup as ut, IMenuManagerService as ht, IDialogService as gt, ILayoutService as mt, IUIPartsService as vt, ComponentManager as Ct, connectInjector as ft } from "@univerjs/ui";
|
|
9
|
+
import { BehaviorSubject as St, takeUntil as pt } from "rxjs";
|
|
10
|
+
import { RadioGroup as Re, Radio as V, Checkbox as yt, clsx as K, DraggableList as _t, scrollbarClassName as Ee, Button as G, Dropdown as xt, ButtonGroup as wt } from "@univerjs/design";
|
|
11
|
+
import { useState as j, forwardRef as y, useRef as Te, createElement as _, useCallback as O, useEffect as Oe } from "react";
|
|
12
|
+
import { serializeRange as It } from "@univerjs/engine-formula";
|
|
13
|
+
import { getCurrentRangeDisable$ as D, getCurrentExclusiveRangeInterest$ as Mt, SheetsRenderService as Rt, SheetsUIPart as Et } from "@univerjs/sheets-ui";
|
|
14
|
+
const Tt = (e) => {
|
|
15
15
|
const [t, n] = j("0"), r = E(P);
|
|
16
16
|
return /* @__PURE__ */ g("div", { className: "univer-text-sm", children: [
|
|
17
17
|
/* @__PURE__ */ c("div", { className: "extend-confirm-desc", children: r.t("sheets-sort.dialog.sort-reminder-desc") }),
|
|
@@ -32,8 +32,8 @@ const Et = (e) => {
|
|
|
32
32
|
)
|
|
33
33
|
] });
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
35
|
+
var Ot = Object.getOwnPropertyDescriptor, bt = (e, t, n, r) => {
|
|
36
|
+
for (var o = r > 1 ? void 0 : r ? Ot(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
37
37
|
(s = e[i]) && (o = s(o) || o);
|
|
38
38
|
return o;
|
|
39
39
|
}, H = (e, t) => (n, r) => t(n, r, e);
|
|
@@ -43,10 +43,10 @@ const F = {
|
|
|
43
43
|
SINGLE_ERROR: "sheets-sort.error.single",
|
|
44
44
|
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
45
45
|
};
|
|
46
|
-
let m = class extends
|
|
46
|
+
let m = class extends ze {
|
|
47
47
|
constructor(t, n, r, o, i, s) {
|
|
48
48
|
super();
|
|
49
|
-
X(this, "_customSortState$", new
|
|
49
|
+
X(this, "_customSortState$", new St(null));
|
|
50
50
|
X(this, "customSortState$", this._customSortState$.asObservable());
|
|
51
51
|
this._univerInstanceService = t, this._confirmService = n, this._selectionManagerService = r, this._sheetsSortService = o, this._localeService = i, this._commandService = s;
|
|
52
52
|
}
|
|
@@ -78,7 +78,7 @@ let m = class extends We {
|
|
|
78
78
|
const { unitId: r, subUnitId: o, range: i } = n, s = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
79
79
|
if (!s)
|
|
80
80
|
return [];
|
|
81
|
-
const a =
|
|
81
|
+
const a = Nt(this._localeService);
|
|
82
82
|
return Array.from({ length: i.endColumn - i.startColumn + 1 }, (w, C) => {
|
|
83
83
|
var v;
|
|
84
84
|
const T = (v = s.getCell(i.startRow, C + i.startColumn)) == null ? void 0 : v.v;
|
|
@@ -96,9 +96,9 @@ let m = class extends We {
|
|
|
96
96
|
const i = {
|
|
97
97
|
unitId: t,
|
|
98
98
|
subUnitId: n,
|
|
99
|
-
selections: [{ range: r, primary:
|
|
99
|
+
selections: [{ range: r, primary: rt(r, o), style: null }]
|
|
100
100
|
};
|
|
101
|
-
this._commandService.executeCommand(
|
|
101
|
+
this._commandService.executeCommand(nt.id, i);
|
|
102
102
|
}
|
|
103
103
|
async showCheckError(t) {
|
|
104
104
|
return await this._confirmService.confirm({
|
|
@@ -122,7 +122,7 @@ let m = class extends We {
|
|
|
122
122
|
},
|
|
123
123
|
children: {
|
|
124
124
|
title: /* @__PURE__ */ c(
|
|
125
|
-
|
|
125
|
+
Tt,
|
|
126
126
|
{
|
|
127
127
|
onChange: (r) => {
|
|
128
128
|
t = r === "1";
|
|
@@ -169,15 +169,15 @@ let m = class extends We {
|
|
|
169
169
|
};
|
|
170
170
|
m = bt([
|
|
171
171
|
H(0, _e),
|
|
172
|
-
H(1,
|
|
173
|
-
H(2, R(
|
|
172
|
+
H(1, ct),
|
|
173
|
+
H(2, R(tt)),
|
|
174
174
|
H(3, R(Ie)),
|
|
175
175
|
H(4, R(P)),
|
|
176
176
|
H(5, xe)
|
|
177
177
|
], m);
|
|
178
|
-
function
|
|
178
|
+
function Nt(e) {
|
|
179
179
|
return (t) => {
|
|
180
|
-
const n =
|
|
180
|
+
const n = Ye.chatAtABC(t);
|
|
181
181
|
switch (e.getCurrentLocale()) {
|
|
182
182
|
case Ce.ZH_CN:
|
|
183
183
|
return `"${n}"列`;
|
|
@@ -228,7 +228,7 @@ const Q = {
|
|
|
228
228
|
id: "sheet.command.sort-range-custom-ctx",
|
|
229
229
|
type: M.COMMAND,
|
|
230
230
|
handler: async (e) => await e.get(m).triggerSortCustomize()
|
|
231
|
-
},
|
|
231
|
+
}, kt = "sheets-sort-ui.config", Se = {};
|
|
232
232
|
var f = function() {
|
|
233
233
|
return f = Object.assign || function(e) {
|
|
234
234
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
@@ -237,7 +237,7 @@ var f = function() {
|
|
|
237
237
|
}
|
|
238
238
|
return e;
|
|
239
239
|
}, f.apply(this, arguments);
|
|
240
|
-
},
|
|
240
|
+
}, Lt = function(e, t) {
|
|
241
241
|
var n = {};
|
|
242
242
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
243
243
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -245,15 +245,15 @@ var f = function() {
|
|
|
245
245
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
246
246
|
return n;
|
|
247
247
|
}, x = y(function(e, t) {
|
|
248
|
-
var n = e.icon, r = e.id, o = e.className, i = e.extend, s =
|
|
249
|
-
return
|
|
248
|
+
var n = e.icon, r = e.id, o = e.className, i = e.extend, s = Lt(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = Te("_".concat(Ut()));
|
|
249
|
+
return be(n, "".concat(r), { defIds: n.defIds, idSuffix: l.current }, f({ ref: t, className: a }, s), i);
|
|
250
250
|
});
|
|
251
|
-
function
|
|
252
|
-
return _(e.tag, f(f({ key: t },
|
|
253
|
-
return
|
|
251
|
+
function be(e, t, n, r, o) {
|
|
252
|
+
return _(e.tag, f(f({ key: t }, Dt(e, n, o)), r), (Ht(e, n).children || []).map(function(i, s) {
|
|
253
|
+
return be(i, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, o);
|
|
254
254
|
}));
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Dt(e, t, n) {
|
|
257
257
|
var r = f({}, e.attrs);
|
|
258
258
|
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(function(i) {
|
|
259
259
|
var s = i[0], a = i[1];
|
|
@@ -265,130 +265,130 @@ function Lt(e, t, n) {
|
|
|
265
265
|
typeof a == "string" && (r[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
266
266
|
})), r;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Ht(e, t) {
|
|
269
269
|
var n, r = t.defIds;
|
|
270
270
|
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? f(f({}, e), { children: e.children.map(function(o) {
|
|
271
271
|
return typeof o.attrs.id == "string" && r && r.includes(o.attrs.id) ? f(f({}, o), { attrs: f(f({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
272
272
|
}) }) : e;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ut() {
|
|
275
275
|
return Math.random().toString(36).substring(2, 8);
|
|
276
276
|
}
|
|
277
277
|
x.displayName = "UniverIcon";
|
|
278
|
-
var
|
|
278
|
+
var Pt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, le = y(function(e, t) {
|
|
279
279
|
return _(x, Object.assign({}, e, {
|
|
280
280
|
id: "ascending-icon",
|
|
281
281
|
ref: t,
|
|
282
|
-
icon:
|
|
282
|
+
icon: Pt
|
|
283
283
|
}));
|
|
284
284
|
});
|
|
285
285
|
le.displayName = "AscendingIcon";
|
|
286
|
-
var
|
|
286
|
+
var At = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "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" } }] }, Ne = y(function(e, t) {
|
|
287
287
|
return _(x, Object.assign({}, e, {
|
|
288
288
|
id: "check-mark-icon",
|
|
289
289
|
ref: t,
|
|
290
|
-
icon:
|
|
290
|
+
icon: At
|
|
291
291
|
}));
|
|
292
292
|
});
|
|
293
293
|
Ne.displayName = "CheckMarkIcon";
|
|
294
|
-
var
|
|
294
|
+
var $t = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.5574C8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507C9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661C11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512C7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574C6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588C4.88808 9.55156 5.26798 9.55156 5.50229 9.78588L6.22584 10.5094Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.14014 3.73989C1.14014 2.30396 2.3042 1.13989 3.74014 1.13989H12.2601C13.6961 1.13989 14.8601 2.30395 14.8601 3.73989V12.2599C14.8601 13.6958 13.6961 14.8599 12.2601 14.8599H3.74014C2.3042 14.8599 1.14014 13.6958 1.14014 12.2599V3.73989ZM2.34014 5.86724V12.2599C2.34014 13.0331 2.96694 13.6599 3.74014 13.6599H12.2601C13.0333 13.6599 13.6601 13.0331 13.6601 12.2599V5.86724H2.34014ZM13.6601 4.66724H2.34014V3.73989C2.34014 2.9667 2.96694 2.33989 3.74014 2.33989H12.2601C13.0333 2.33989 13.6601 2.96669 13.6601 3.73989V4.66724Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ke = y(function(e, t) {
|
|
295
295
|
return _(x, Object.assign({}, e, {
|
|
296
296
|
id: "custom-sort-icon",
|
|
297
297
|
ref: t,
|
|
298
|
-
icon:
|
|
298
|
+
icon: $t
|
|
299
299
|
}));
|
|
300
300
|
});
|
|
301
301
|
ke.displayName = "CustomSortIcon";
|
|
302
|
-
var
|
|
302
|
+
var jt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V13.1332C3.15332 14.2377 4.04875 15.1332 5.15332 15.1332H10.8465C11.9511 15.1332 12.8465 14.2377 12.8465 13.1331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V13.1331C11.6465 13.575 11.2884 13.9331 10.8465 13.9331H5.15332C4.71149 13.9331 4.35332 13.575 4.35332 13.1332V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Le = y(function(e, t) {
|
|
303
303
|
return _(x, Object.assign({}, e, {
|
|
304
304
|
id: "delete-empty-icon",
|
|
305
305
|
ref: t,
|
|
306
|
-
icon:
|
|
306
|
+
icon: jt
|
|
307
307
|
}));
|
|
308
308
|
});
|
|
309
309
|
Le.displayName = "DeleteEmptyIcon";
|
|
310
|
-
var
|
|
310
|
+
var Zt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, de = y(function(e, t) {
|
|
311
311
|
return _(x, Object.assign({}, e, {
|
|
312
312
|
id: "descending-icon",
|
|
313
313
|
ref: t,
|
|
314
|
-
icon:
|
|
314
|
+
icon: Zt
|
|
315
315
|
}));
|
|
316
316
|
});
|
|
317
317
|
de.displayName = "DescendingIcon";
|
|
318
|
-
var
|
|
318
|
+
var Bt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 3.20024C1.57503 3.20024 1.3064 2.93161 1.3064 2.60024C1.3064 2.26887 1.57503 2.00024 1.9064 2.00024H4.57306C4.90443 2.00024 5.17306 2.26887 5.17306 2.60024C5.17306 2.93161 4.90443 3.20024 4.57306 3.20024H1.9064ZM1.3064 6.19985C1.3064 6.53122 1.57503 6.79985 1.9064 6.79985H5.9064C6.23777 6.79985 6.5064 6.53122 6.5064 6.19985C6.5064 5.86848 6.23777 5.59985 5.9064 5.59985H1.9064C1.57503 5.59985 1.3064 5.86848 1.3064 6.19985ZM1.9064 10.3997C1.57503 10.3997 1.3064 10.1311 1.3064 9.79971C1.3064 9.46834 1.57503 9.19971 1.9064 9.19971H7.23973C7.5711 9.19971 7.83973 9.46834 7.83973 9.79971C7.83973 10.1311 7.5711 10.3997 7.23973 10.3997H1.9064ZM1.9064 13.9996C1.57503 13.9996 1.3064 13.7309 1.3064 13.3996C1.3064 13.0682 1.57503 12.7996 1.9064 12.7996H8.57306C8.90443 12.7996 9.17306 13.0682 9.17306 13.3996C9.17306 13.7309 8.90443 13.9996 8.57306 13.9996H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 14.2667C12.4267 14.5981 12.1581 14.8667 11.8267 14.8667C11.4953 14.8667 11.2267 14.5981 11.2267 14.2667V3.18198L9.98447 4.42422C9.75015 4.65853 9.37026 4.65853 9.13594 4.42422C8.90163 4.1899 8.90163 3.81 9.13594 3.57569L11.4026 1.30902C11.6369 1.07471 12.0168 1.07471 12.2511 1.30902L14.5178 3.57569C14.7521 3.81 14.7521 4.1899 14.5178 4.42422C14.2835 4.65853 13.9036 4.65853 13.6693 4.42422L12.4267 3.18165V14.2667Z" } }] }, De = y(function(e, t) {
|
|
319
319
|
return _(x, Object.assign({}, e, {
|
|
320
320
|
id: "expand-ascending-icon",
|
|
321
321
|
ref: t,
|
|
322
|
-
icon:
|
|
322
|
+
icon: Bt
|
|
323
323
|
}));
|
|
324
324
|
});
|
|
325
325
|
De.displayName = "ExpandAscendingIcon";
|
|
326
|
-
var
|
|
326
|
+
var Ft = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 12.7998C1.57503 12.7998 1.3064 13.0684 1.3064 13.3998C1.3064 13.7311 1.57503 13.9998 1.9064 13.9998H4.57306C4.90443 13.9998 5.17306 13.7311 5.17306 13.3998C5.17306 13.0684 4.90443 12.7998 4.57306 12.7998H1.9064ZM1.3064 9.80015C1.3064 9.46878 1.57503 9.20015 1.9064 9.20015H5.9064C6.23777 9.20015 6.5064 9.46878 6.5064 9.80015C6.5064 10.1315 6.23777 10.4001 5.9064 10.4001H1.9064C1.57503 10.4001 1.3064 10.1315 1.3064 9.80015ZM1.9064 5.60029C1.57503 5.60029 1.3064 5.86892 1.3064 6.20029C1.3064 6.53166 1.57503 6.80029 1.9064 6.80029H7.23973C7.5711 6.80029 7.83973 6.53166 7.83973 6.20029C7.83973 5.86892 7.5711 5.60029 7.23973 5.60029H1.9064ZM1.9064 2.00044C1.57503 2.00044 1.3064 2.26907 1.3064 2.60044C1.3064 2.93181 1.57503 3.20044 1.9064 3.20044H8.57306C8.90443 3.20044 9.17306 2.93181 9.17306 2.60044C9.17306 2.26907 8.90443 2.00044 8.57306 2.00044H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 1.7333C12.4267 1.40193 12.1581 1.1333 11.8267 1.1333C11.4953 1.1333 11.2267 1.40193 11.2267 1.7333V12.818L9.98447 11.5758C9.75015 11.3415 9.37026 11.3415 9.13594 11.5758C8.90163 11.8101 8.90163 12.19 9.13594 12.4243L11.4026 14.691C11.6369 14.9253 12.0168 14.9253 12.2511 14.691L14.5178 12.4243C14.7521 12.19 14.7521 11.8101 14.5178 11.5758C14.2835 11.3415 13.9036 11.3415 13.6693 11.5758L12.4267 12.8183V1.7333Z" } }] }, He = y(function(e, t) {
|
|
327
327
|
return _(x, Object.assign({}, e, {
|
|
328
328
|
id: "expand-descending-icon",
|
|
329
329
|
ref: t,
|
|
330
|
-
icon:
|
|
330
|
+
icon: Ft
|
|
331
331
|
}));
|
|
332
332
|
});
|
|
333
333
|
He.displayName = "ExpandDescendingIcon";
|
|
334
|
-
var
|
|
334
|
+
var Vt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, J = y(function(e, t) {
|
|
335
335
|
return _(x, Object.assign({}, e, {
|
|
336
336
|
id: "increase-icon",
|
|
337
337
|
ref: t,
|
|
338
|
-
icon:
|
|
338
|
+
icon: Vt
|
|
339
339
|
}));
|
|
340
340
|
});
|
|
341
341
|
J.displayName = "IncreaseIcon";
|
|
342
|
-
var
|
|
342
|
+
var Gt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ue = y(function(e, t) {
|
|
343
343
|
return _(x, Object.assign({}, e, {
|
|
344
344
|
id: "more-down-icon",
|
|
345
345
|
ref: t,
|
|
346
|
-
icon:
|
|
346
|
+
icon: Gt
|
|
347
347
|
}));
|
|
348
348
|
});
|
|
349
349
|
Ue.displayName = "MoreDownIcon";
|
|
350
|
-
var
|
|
350
|
+
var Wt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Pe = y(function(e, t) {
|
|
351
351
|
return _(x, Object.assign({}, e, {
|
|
352
352
|
id: "sequence-icon",
|
|
353
353
|
ref: t,
|
|
354
|
-
icon:
|
|
354
|
+
icon: Wt
|
|
355
355
|
}));
|
|
356
356
|
});
|
|
357
357
|
Pe.displayName = "SequenceIcon";
|
|
358
|
-
function
|
|
359
|
-
const e = E(m), t =
|
|
360
|
-
return !t || !t.location ? null : /* @__PURE__ */ c(
|
|
358
|
+
function zt() {
|
|
359
|
+
const e = E(m), t = at(e.customSortState$);
|
|
360
|
+
return !t || !t.location ? null : /* @__PURE__ */ c(Yt, { state: t });
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Yt({ state: e }) {
|
|
363
363
|
const t = E(Ie), n = E(P), r = E(m), [o, i] = j(!1), [s, a] = j(0), l = Te(null), { range: u, unitId: w, subUnitId: C } = e.location, T = r.getTitles(o), [v, A] = j([
|
|
364
364
|
{ type: U.ASC, colIndex: u.startColumn }
|
|
365
|
-
]), B =
|
|
365
|
+
]), B = O((d, p) => {
|
|
366
366
|
const $ = [...v];
|
|
367
367
|
p === null ? $.splice(d, 1) : $[d] = p, A($);
|
|
368
|
-
}, [v]), h =
|
|
369
|
-
|
|
370
|
-
const d = [...v], p =
|
|
368
|
+
}, [v]), h = O(
|
|
369
|
+
qe(() => {
|
|
370
|
+
const d = [...v], p = Xt(u, v);
|
|
371
371
|
p !== null && (d.push({ type: U.ASC, colIndex: p }), A(d));
|
|
372
372
|
}, 200),
|
|
373
373
|
[v, u]
|
|
374
|
-
), q =
|
|
374
|
+
), q = O((d, p) => {
|
|
375
375
|
t.applySort({ range: u, orderRules: d, hasTitle: p }), r.closeCustomSortPanel();
|
|
376
|
-
}, [t, r, u]),
|
|
376
|
+
}, [t, r, u]), Be = O(() => {
|
|
377
377
|
r.closeCustomSortPanel();
|
|
378
|
-
}, [r]),
|
|
378
|
+
}, [r]), Fe = O((d) => {
|
|
379
379
|
i(d), d ? r.setSelection(w, C, { ...u, startRow: u.startRow + 1 }) : r.setSelection(w, C, u);
|
|
380
380
|
}, [r, u, C, w]);
|
|
381
|
-
|
|
381
|
+
Oe(() => {
|
|
382
382
|
l.current && v.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
383
383
|
}, [v]);
|
|
384
|
-
const
|
|
384
|
+
const Ve = v.length < T.length, ve = v.map((d) => ({ ...d, id: `${d.colIndex}` }));
|
|
385
385
|
return /* @__PURE__ */ g("div", { children: [
|
|
386
386
|
/* @__PURE__ */ g("div", { onMouseDown: (d) => {
|
|
387
387
|
d.stopPropagation();
|
|
388
388
|
}, children: [
|
|
389
389
|
/* @__PURE__ */ g("div", { className: "univer-flex univer-items-center univer-justify-between", children: [
|
|
390
|
-
/* @__PURE__ */ c(
|
|
391
|
-
|
|
390
|
+
/* @__PURE__ */ c(yt, { checked: o, onChange: (d) => Fe(!!d), children: n.t("sheets-sort.dialog.first-row-check") }),
|
|
391
|
+
Ve ? /* @__PURE__ */ g(
|
|
392
392
|
"div",
|
|
393
393
|
{
|
|
394
394
|
className: "univer-flex univer-cursor-pointer univer-select-none univer-items-center univer-text-base",
|
|
@@ -419,7 +419,7 @@ function zt({ state: e }) {
|
|
|
419
419
|
a(p);
|
|
420
420
|
},
|
|
421
421
|
children: /* @__PURE__ */ c(
|
|
422
|
-
|
|
422
|
+
_t,
|
|
423
423
|
{
|
|
424
424
|
className: "[&_.react-grid-item]:univer-transition-none [&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200",
|
|
425
425
|
list: ve,
|
|
@@ -427,7 +427,7 @@ function zt({ state: e }) {
|
|
|
427
427
|
idKey: "id",
|
|
428
428
|
draggableHandle: "[data-u-comp=sort-panel-item-handler]",
|
|
429
429
|
itemRender: (d) => /* @__PURE__ */ c(
|
|
430
|
-
|
|
430
|
+
qt,
|
|
431
431
|
{
|
|
432
432
|
titles: T,
|
|
433
433
|
list: ve,
|
|
@@ -448,7 +448,7 @@ function zt({ state: e }) {
|
|
|
448
448
|
G,
|
|
449
449
|
{
|
|
450
450
|
className: "univer-ml-3",
|
|
451
|
-
onClick: () =>
|
|
451
|
+
onClick: () => Be(),
|
|
452
452
|
children: n.t("sheets-sort.dialog.cancel")
|
|
453
453
|
}
|
|
454
454
|
),
|
|
@@ -464,14 +464,14 @@ function zt({ state: e }) {
|
|
|
464
464
|
] })
|
|
465
465
|
] });
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function qt(e) {
|
|
468
468
|
var B;
|
|
469
|
-
const { list: t, item: n, titles: r, onChange: o, scrollPosition: i } = e, s = E(P), a = r.filter((h) => !t.some((q) => q.colIndex === h.index) || h.index === n.colIndex), l = t.findIndex((h) => h.colIndex === n.colIndex), u =
|
|
469
|
+
const { list: t, item: n, titles: r, onChange: o, scrollPosition: i } = e, s = E(P), a = r.filter((h) => !t.some((q) => q.colIndex === h.index) || h.index === n.colIndex), l = t.findIndex((h) => h.colIndex === n.colIndex), u = O((h) => {
|
|
470
470
|
o({ ...n, colIndex: h.index }, l), C(!1);
|
|
471
471
|
}, [l, n, o]), [w, C] = j(!1), T = (h) => {
|
|
472
472
|
C(h);
|
|
473
473
|
};
|
|
474
|
-
|
|
474
|
+
Oe(() => {
|
|
475
475
|
C(!1);
|
|
476
476
|
}, [i]);
|
|
477
477
|
const v = t.length > 1, A = (B = r.find((h) => h.index === n.colIndex)) == null ? void 0 : B.label;
|
|
@@ -486,7 +486,7 @@ function Yt(e) {
|
|
|
486
486
|
}
|
|
487
487
|
),
|
|
488
488
|
/* @__PURE__ */ c(
|
|
489
|
-
|
|
489
|
+
xt,
|
|
490
490
|
{
|
|
491
491
|
overlay: /* @__PURE__ */ c(
|
|
492
492
|
"ul",
|
|
@@ -552,16 +552,16 @@ function Yt(e) {
|
|
|
552
552
|
] })
|
|
553
553
|
] });
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Xt(e, t) {
|
|
556
556
|
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((i) => i == null ? void 0 : i.colIndex));
|
|
557
557
|
for (let i = n; i <= r; i++)
|
|
558
558
|
if (!o.has(i))
|
|
559
559
|
return i;
|
|
560
560
|
return null;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
const { range: t, colIndex: n, onClose: r } = e, o = E(m), i = E(_e), s = E(P), a =
|
|
564
|
-
const { unitId: u, subUnitId: w } =
|
|
562
|
+
function Kt(e) {
|
|
563
|
+
const { range: t, colIndex: n, onClose: r } = e, o = E(m), i = E(_e), s = E(P), a = O((l) => {
|
|
564
|
+
const { unitId: u, subUnitId: w } = ot(i) || {};
|
|
565
565
|
if (t && u && w) {
|
|
566
566
|
const C = { ...t, startRow: t.startRow + 1 };
|
|
567
567
|
o.triggerSortDirectly(l, !1, { unitId: u, subUnitId: w, range: C, colIndex: n });
|
|
@@ -569,7 +569,7 @@ function Xt(e) {
|
|
|
569
569
|
throw new Error(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${w}, range: ${t}, colIndex: ${n}`);
|
|
570
570
|
r();
|
|
571
571
|
}, [t, n, o, i, r]);
|
|
572
|
-
return /* @__PURE__ */ g(
|
|
572
|
+
return /* @__PURE__ */ g(wt, { className: "univer-mb-3 univer-w-full univer-grid-cols-2", children: [
|
|
573
573
|
/* @__PURE__ */ g(G, { onClick: () => a(!0), children: [
|
|
574
574
|
/* @__PURE__ */ c(le, {}),
|
|
575
575
|
s.t("sheets-sort.general.sort-asc")
|
|
@@ -581,26 +581,26 @@ function Xt(e) {
|
|
|
581
581
|
] });
|
|
582
582
|
}
|
|
583
583
|
const Ae = "sheet.menu.sheets-sort", $e = "sheet.menu.sheets-sort-ctx", Z = "AscendingIcon", ue = "ExpandAscendingIcon", he = "DescendingIcon", ge = "ExpandDescendingIcon", me = "CustomSortIcon";
|
|
584
|
-
function
|
|
584
|
+
function Jt(e) {
|
|
585
585
|
return {
|
|
586
586
|
id: Ae,
|
|
587
587
|
type: S.SUBITEMS,
|
|
588
588
|
icon: Z,
|
|
589
589
|
tooltip: "sheets-sort.general.sort",
|
|
590
590
|
hidden$: Me(e, Y.UNIVER_SHEET),
|
|
591
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
591
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Qt(e) {
|
|
595
595
|
return {
|
|
596
596
|
id: Q.id,
|
|
597
597
|
icon: Z,
|
|
598
598
|
title: "sheets-sort.general.sort-asc-cur",
|
|
599
599
|
type: S.BUTTON,
|
|
600
|
-
hidden$:
|
|
600
|
+
hidden$: Mt(e)
|
|
601
601
|
};
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function er(e) {
|
|
604
604
|
return {
|
|
605
605
|
id: ee.id,
|
|
606
606
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -608,7 +608,7 @@ function Qt(e) {
|
|
|
608
608
|
type: S.BUTTON
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function tr(e) {
|
|
612
612
|
return {
|
|
613
613
|
id: te.id,
|
|
614
614
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -616,7 +616,7 @@ function er(e) {
|
|
|
616
616
|
type: S.BUTTON
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function rr(e) {
|
|
620
620
|
return {
|
|
621
621
|
id: re.id,
|
|
622
622
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -624,7 +624,7 @@ function tr(e) {
|
|
|
624
624
|
type: S.BUTTON
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function nr(e) {
|
|
628
628
|
return {
|
|
629
629
|
id: ne.id,
|
|
630
630
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -632,7 +632,7 @@ function rr(e) {
|
|
|
632
632
|
icon: me
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function or(e) {
|
|
636
636
|
return {
|
|
637
637
|
id: $e,
|
|
638
638
|
title: "sheets-sort.general.sort",
|
|
@@ -642,123 +642,123 @@ function nr(e) {
|
|
|
642
642
|
disabled$: D(e, {
|
|
643
643
|
workbookTypes: [L],
|
|
644
644
|
worksheetTypes: [N, k],
|
|
645
|
-
rangeTypes: [
|
|
645
|
+
rangeTypes: [b]
|
|
646
646
|
})
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function ir(e) {
|
|
650
650
|
return {
|
|
651
651
|
id: oe.id,
|
|
652
652
|
title: "sheets-sort.general.sort-asc-cur",
|
|
653
653
|
type: S.BUTTON,
|
|
654
654
|
icon: Z,
|
|
655
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
655
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
656
656
|
};
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function sr(e) {
|
|
659
659
|
return {
|
|
660
660
|
id: ie.id,
|
|
661
661
|
title: "sheets-sort.general.sort-asc-ext",
|
|
662
662
|
type: S.BUTTON,
|
|
663
663
|
icon: ue,
|
|
664
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
664
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function cr(e) {
|
|
668
668
|
return {
|
|
669
669
|
id: se.id,
|
|
670
670
|
title: "sheets-sort.general.sort-desc-cur",
|
|
671
671
|
type: S.BUTTON,
|
|
672
672
|
icon: he,
|
|
673
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
673
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function ar(e) {
|
|
677
677
|
return {
|
|
678
678
|
id: ce.id,
|
|
679
679
|
title: "sheets-sort.general.sort-desc-ext",
|
|
680
680
|
type: S.BUTTON,
|
|
681
681
|
icon: ge,
|
|
682
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
682
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function lr(e) {
|
|
686
686
|
return {
|
|
687
687
|
id: ae.id,
|
|
688
688
|
title: "sheets-sort.general.sort-custom",
|
|
689
689
|
type: S.BUTTON,
|
|
690
690
|
icon: me,
|
|
691
|
-
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [
|
|
691
|
+
disabled$: D(e, { workbookTypes: [L], worksheetTypes: [N, k], rangeTypes: [b] })
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
[
|
|
694
|
+
const dr = {
|
|
695
|
+
[ut.ORGANIZATION]: {
|
|
696
696
|
[Ae]: {
|
|
697
697
|
order: 3,
|
|
698
|
-
menuItemFactory:
|
|
698
|
+
menuItemFactory: Jt,
|
|
699
699
|
[Q.id]: {
|
|
700
700
|
order: 0,
|
|
701
|
-
menuItemFactory:
|
|
701
|
+
menuItemFactory: Qt
|
|
702
702
|
},
|
|
703
703
|
[ee.id]: {
|
|
704
704
|
order: 1,
|
|
705
|
-
menuItemFactory:
|
|
705
|
+
menuItemFactory: er
|
|
706
706
|
},
|
|
707
707
|
[te.id]: {
|
|
708
708
|
order: 2,
|
|
709
|
-
menuItemFactory:
|
|
709
|
+
menuItemFactory: tr
|
|
710
710
|
},
|
|
711
711
|
[re.id]: {
|
|
712
712
|
order: 3,
|
|
713
|
-
menuItemFactory:
|
|
713
|
+
menuItemFactory: rr
|
|
714
714
|
},
|
|
715
715
|
[ne.id]: {
|
|
716
716
|
order: 4,
|
|
717
|
-
menuItemFactory:
|
|
717
|
+
menuItemFactory: nr
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
},
|
|
721
|
-
[
|
|
722
|
-
[
|
|
721
|
+
[lt.MAIN_AREA]: {
|
|
722
|
+
[dt.DATA]: {
|
|
723
723
|
[$e]: {
|
|
724
724
|
order: 0,
|
|
725
|
-
menuItemFactory:
|
|
725
|
+
menuItemFactory: or,
|
|
726
726
|
[oe.id]: {
|
|
727
727
|
order: 0,
|
|
728
|
-
menuItemFactory:
|
|
728
|
+
menuItemFactory: ir
|
|
729
729
|
},
|
|
730
730
|
[ie.id]: {
|
|
731
731
|
order: 1,
|
|
732
|
-
menuItemFactory:
|
|
732
|
+
menuItemFactory: sr
|
|
733
733
|
},
|
|
734
734
|
[se.id]: {
|
|
735
735
|
order: 2,
|
|
736
|
-
menuItemFactory:
|
|
736
|
+
menuItemFactory: cr
|
|
737
737
|
},
|
|
738
738
|
[ce.id]: {
|
|
739
739
|
order: 3,
|
|
740
|
-
menuItemFactory:
|
|
740
|
+
menuItemFactory: ar
|
|
741
741
|
},
|
|
742
742
|
[ae.id]: {
|
|
743
743
|
order: 4,
|
|
744
|
-
menuItemFactory:
|
|
744
|
+
menuItemFactory: lr
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
};
|
|
750
|
-
var
|
|
751
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
750
|
+
var ur = Object.getOwnPropertyDescriptor, hr = (e, t, n, r) => {
|
|
751
|
+
for (var o = r > 1 ? void 0 : r ? ur(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
752
752
|
(s = e[i]) && (o = s(o) || o);
|
|
753
753
|
return o;
|
|
754
754
|
}, I = (e, t) => (n, r) => t(n, r, e);
|
|
755
|
-
const pe = "custom-sort-dialog",
|
|
756
|
-
let W = class extends
|
|
755
|
+
const pe = "custom-sort-dialog", je = 560, gr = 128;
|
|
756
|
+
let W = class extends Xe {
|
|
757
757
|
constructor(e, t, n, r, o, i, s, a, l, u) {
|
|
758
758
|
super(), this._commandService = e, this._menuManagerService = t, this._dialogService = n, this._layoutService = r, this._uiPartsService = o, this._sheetRenderService = i, this._localeService = s, this._sheetsSortUIService = a, this._injector = l, this._componentManager = u, this._initCommands(), this._initMenu(), this._initUI();
|
|
759
759
|
}
|
|
760
760
|
_initMenu() {
|
|
761
|
-
this._menuManagerService.mergeMenu(
|
|
761
|
+
this._menuManagerService.mergeMenu(dr);
|
|
762
762
|
}
|
|
763
763
|
_initCommands() {
|
|
764
764
|
[
|
|
@@ -772,13 +772,13 @@ let W = class extends qe {
|
|
|
772
772
|
se,
|
|
773
773
|
ce,
|
|
774
774
|
ae
|
|
775
|
-
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(
|
|
775
|
+
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(it.id));
|
|
776
776
|
}
|
|
777
777
|
_initUI() {
|
|
778
778
|
this.disposeWithMe(
|
|
779
|
-
this._uiPartsService.registerComponent(
|
|
779
|
+
this._uiPartsService.registerComponent(Et.FILTER_PANEL_EMBED_POINT, () => ft(Kt, this._injector))
|
|
780
780
|
), [
|
|
781
|
-
["CustomSortPanel",
|
|
781
|
+
["CustomSortPanel", zt],
|
|
782
782
|
[Z, le],
|
|
783
783
|
[ue, De],
|
|
784
784
|
[he, de],
|
|
@@ -788,7 +788,7 @@ let W = class extends qe {
|
|
|
788
788
|
this.disposeWithMe(
|
|
789
789
|
this._componentManager.register(e, t)
|
|
790
790
|
);
|
|
791
|
-
}), this._sheetsSortUIService.customSortState$.pipe(
|
|
791
|
+
}), this._sheetsSortUIService.customSortState$.pipe(pt(this.dispose$)).subscribe((e) => {
|
|
792
792
|
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
793
793
|
});
|
|
794
794
|
}
|
|
@@ -796,11 +796,11 @@ let W = class extends qe {
|
|
|
796
796
|
this._dialogService.open({
|
|
797
797
|
id: pe,
|
|
798
798
|
draggable: !0,
|
|
799
|
-
width:
|
|
800
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${
|
|
799
|
+
width: je,
|
|
800
|
+
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${It(e.range)}` },
|
|
801
801
|
children: { label: "CustomSortPanel" },
|
|
802
802
|
destroyOnClose: !0,
|
|
803
|
-
defaultPosition:
|
|
803
|
+
defaultPosition: mr(),
|
|
804
804
|
preservePositionOnDestroy: !1,
|
|
805
805
|
onClose: () => this._closePanel(),
|
|
806
806
|
mask: !0
|
|
@@ -810,36 +810,36 @@ let W = class extends qe {
|
|
|
810
810
|
this._dialogService.close(pe), queueMicrotask(() => this._layoutService.focus());
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
|
-
W =
|
|
813
|
+
W = hr([
|
|
814
814
|
I(0, xe),
|
|
815
|
-
I(1,
|
|
816
|
-
I(2,
|
|
817
|
-
I(3,
|
|
818
|
-
I(4,
|
|
819
|
-
I(5, R(
|
|
815
|
+
I(1, ht),
|
|
816
|
+
I(2, gt),
|
|
817
|
+
I(3, mt),
|
|
818
|
+
I(4, vt),
|
|
819
|
+
I(5, R(Rt)),
|
|
820
820
|
I(6, R(P)),
|
|
821
821
|
I(7, R(m)),
|
|
822
822
|
I(8, R(we)),
|
|
823
|
-
I(9, R(
|
|
823
|
+
I(9, R(Ct))
|
|
824
824
|
], W);
|
|
825
|
-
function
|
|
826
|
-
return { x:
|
|
825
|
+
function mr() {
|
|
826
|
+
return { x: (window.innerWidth - je) / 2, y: gr };
|
|
827
827
|
}
|
|
828
|
-
var
|
|
829
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
828
|
+
var vr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, fr = (e, t, n) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Sr = (e, t, n, r) => {
|
|
829
|
+
for (var o = r > 1 ? void 0 : r ? Cr(t, n) : t, i = e.length - 1, s; i >= 0; i--)
|
|
830
830
|
(s = e[i]) && (o = s(o) || o);
|
|
831
831
|
return o;
|
|
832
|
-
}, ye = (e, t) => (n, r) => t(n, r, e),
|
|
833
|
-
const
|
|
834
|
-
let z = class extends
|
|
832
|
+
}, ye = (e, t) => (n, r) => t(n, r, e), Ze = (e, t, n) => fr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
833
|
+
const pr = "SHEET_SORT_UI_PLUGIN";
|
|
834
|
+
let z = class extends Qe {
|
|
835
835
|
constructor(e = Se, t, n) {
|
|
836
836
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
837
|
-
const { ...r } =
|
|
837
|
+
const { ...r } = et(
|
|
838
838
|
{},
|
|
839
839
|
Se,
|
|
840
840
|
this._config
|
|
841
841
|
);
|
|
842
|
-
this._configService.setConfig(
|
|
842
|
+
this._configService.setConfig(kt, r);
|
|
843
843
|
}
|
|
844
844
|
onStarting() {
|
|
845
845
|
[
|
|
@@ -851,12 +851,12 @@ let z = class extends Je {
|
|
|
851
851
|
this._injector.get(W);
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
z =
|
|
857
|
-
|
|
854
|
+
Ze(z, "type", Y.UNIVER_SHEET);
|
|
855
|
+
Ze(z, "pluginName", pr);
|
|
856
|
+
z = Sr([
|
|
857
|
+
Ke(st),
|
|
858
858
|
ye(1, R(we)),
|
|
859
|
-
ye(2,
|
|
859
|
+
ye(2, Je)
|
|
860
860
|
], z);
|
|
861
861
|
export {
|
|
862
862
|
Q as SortRangeAscCommand,
|