@univerjs/sheets-sort-ui 0.2.2 → 0.2.4-alpha.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/README.md +11 -4
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +137 -140
- package/lib/locale/vi-VN.json +30 -0
- package/lib/locale/zh-TW.json +30 -0
- package/lib/types/controllers/sheets-sort-ui.controller.d.ts +1 -2
- package/lib/types/controllers/sheets-sort.menu.d.ts +1 -1
- package/lib/types/locale/vi-VN.d.ts +4 -0
- package/lib/types/locale/zh-TW.d.ts +4 -0
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/sheets-sort-ui.service.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +19 -21
package/lib/es/index.js
CHANGED
|
@@ -1,47 +1,45 @@
|
|
|
1
1
|
var Ge = Object.defineProperty;
|
|
2
2
|
var Xe = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var K = (e, t, n) => Xe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { LocaleService as P, Disposable as qe, UniverInstanceType as te, OnLifecycle as ge, LifecycleStages as Ce, Tools as Se, LocaleType as J, IUniverInstanceService as fe, ILogService as Ye, ICommandService as pe, CommandType as R, throttle as Ke, RxDisposable as Je,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { NORMAL_SELECTION_PLUGIN_NAME as rt, getPrimaryForRange as ot, SetSelectionsOperation as st, SelectionManagerService as it, getSheetCommandTarget as ct, WorkbookEditablePermission as L, WorksheetSortPermission as D, WorksheetEditPermission as H, RangeProtectionPermissionEditPoint as k } from "@univerjs/sheets";
|
|
4
|
+
import { useDependency as O, LocaleService as P, Disposable as qe, UniverInstanceType as te, OnLifecycle as ge, LifecycleStages as Ce, Inject as x, Tools as Se, LocaleType as J, IUniverInstanceService as fe, ILogService as Ye, ICommandService as pe, CommandType as R, throttle as Ke, RxDisposable as Je, connectInjector as Qe, Injector as ve, Plugin as et, DependentOn as tt } from "@univerjs/core";
|
|
5
|
+
import { SortType as w, SheetsSortService as Q, SortRangeCommand as nt, UniverSheetsSortPlugin as rt } from "@univerjs/sheets-sort";
|
|
6
|
+
import { getPrimaryForRange as ot, SetSelectionsOperation as st, SheetsSelectionsService as it, getSheetCommandTarget as ct, WorkbookEditablePermission as L, WorksheetSortPermission as D, WorksheetEditPermission as H, RangeProtectionPermissionEditPoint as k } from "@univerjs/sheets";
|
|
8
7
|
import { expandToContinuousRange as le, getCurrentRangeDisable$ as U, SheetMenuPosition as de, SheetsUIPart as at, SheetsRenderService as lt } from "@univerjs/sheets-ui";
|
|
9
|
-
import i, { useState as F, forwardRef as E, useRef as _e, createElement as I, useCallback as
|
|
8
|
+
import i, { useState as F, forwardRef as E, useRef as _e, createElement as I, useCallback as N, useEffect as Ee } from "react";
|
|
10
9
|
import { IConfirmService as dt, MenuItemType as v, MenuPosition as Ie, MenuGroup as ye, getMenuHiddenObservable as ut, ComponentManager as mt, IMenuService as ht, IDialogService as gt, ILayoutService as Ct, IUIPartsService as St } from "@univerjs/ui";
|
|
11
10
|
import { BehaviorSubject as ft, takeUntil as pt } from "rxjs";
|
|
12
11
|
import { RadioGroup as Me, Radio as G, Checkbox as vt, DraggableList as _t, Button as ue, Dropdown as Et } from "@univerjs/design";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
customSortPanelExt: Ot,
|
|
12
|
+
import { serializeRange as It } from "@univerjs/engine-formula";
|
|
13
|
+
const yt = "univer-extend-confirm-content", Mt = "univer-extend-confirm-radio-group", xt = "univer-custom-sort-panel-container", Rt = "univer-custom-sort-panel-ext", Tt = "univer-add-condition", Ot = "univer-add-condition-text", bt = "univer-add-condition-disable", Nt = "univer-custom-sort-panel-footer", Pt = "univer-custom-sort-panel-footer-btn", wt = "univer-custom-sort-panel-item", Lt = "univer-custom-sort-panel-item-head", Dt = "univer-custom-sort-panel-item-handler", Ht = "univer-custom-sort-panel-item-remove", kt = "univer-custom-sort-panel-item-column-input", Ut = "univer-custom-sort-panel-item-column-input-dropdown", At = "univer-custom-sort-panel-item-column-input-text", Bt = "univer-custom-sort-panel-item-order-radio", $t = "univer-custom-sort-panel-item-order-radio-cn", jt = "univer-condition-list", Ft = "univer-embed-sort-btn-container", Vt = "univer-embed-sort-btn", zt = "univer-embed-sort-btn-asc", Zt = "univer-embed-sort-btn-desc", Wt = "univer-embed-sort-btn-icon", Gt = "univer-custom-sort-col-menu", Xt = "univer-custom-sort-col-menu-item", qt = "univer-custom-sort-col-menu-item-desc", a = {
|
|
14
|
+
extendConfirmContent: yt,
|
|
15
|
+
extendConfirmRadioGroup: Mt,
|
|
16
|
+
customSortPanelContainer: xt,
|
|
17
|
+
customSortPanelExt: Rt,
|
|
20
18
|
addCondition: Tt,
|
|
21
|
-
addConditionText:
|
|
19
|
+
addConditionText: Ot,
|
|
22
20
|
addConditionDisable: bt,
|
|
23
|
-
customSortPanelFooter:
|
|
24
|
-
customSortPanelFooterBtn:
|
|
25
|
-
customSortPanelItem:
|
|
26
|
-
customSortPanelItemHead:
|
|
27
|
-
customSortPanelItemHandler:
|
|
28
|
-
customSortPanelItemRemove:
|
|
29
|
-
customSortPanelItemColumnInput:
|
|
30
|
-
customSortPanelItemColumnInputDropdown:
|
|
31
|
-
customSortPanelItemColumnInputText:
|
|
32
|
-
customSortPanelItemOrderRadio:
|
|
33
|
-
customSortPanelItemOrderRadioCn:
|
|
34
|
-
conditionList:
|
|
35
|
-
embedSortBtnContainer:
|
|
36
|
-
embedSortBtn:
|
|
37
|
-
embedSortBtnAsc:
|
|
38
|
-
embedSortBtnDesc:
|
|
39
|
-
embedSortBtnIcon:
|
|
40
|
-
customSortColMenu:
|
|
41
|
-
customSortColMenuItem:
|
|
42
|
-
customSortColMenuItemDesc:
|
|
43
|
-
},
|
|
44
|
-
const [t, n] = F("0"), r =
|
|
21
|
+
customSortPanelFooter: Nt,
|
|
22
|
+
customSortPanelFooterBtn: Pt,
|
|
23
|
+
customSortPanelItem: wt,
|
|
24
|
+
customSortPanelItemHead: Lt,
|
|
25
|
+
customSortPanelItemHandler: Dt,
|
|
26
|
+
customSortPanelItemRemove: Ht,
|
|
27
|
+
customSortPanelItemColumnInput: kt,
|
|
28
|
+
customSortPanelItemColumnInputDropdown: Ut,
|
|
29
|
+
customSortPanelItemColumnInputText: At,
|
|
30
|
+
customSortPanelItemOrderRadio: Bt,
|
|
31
|
+
customSortPanelItemOrderRadioCn: $t,
|
|
32
|
+
conditionList: jt,
|
|
33
|
+
embedSortBtnContainer: Ft,
|
|
34
|
+
embedSortBtn: Vt,
|
|
35
|
+
embedSortBtnAsc: zt,
|
|
36
|
+
embedSortBtnDesc: Zt,
|
|
37
|
+
embedSortBtnIcon: Wt,
|
|
38
|
+
customSortColMenu: Gt,
|
|
39
|
+
customSortColMenuItem: Xt,
|
|
40
|
+
customSortColMenuItemDesc: qt
|
|
41
|
+
}, Yt = (e) => {
|
|
42
|
+
const [t, n] = F("0"), r = O(P);
|
|
45
43
|
return /* @__PURE__ */ i.createElement("div", { className: a.extendConfirmContent }, /* @__PURE__ */ i.createElement("div", { className: "extend-confirm-desc" }, r.t("sheets-sort.dialog.sort-reminder-desc")), /* @__PURE__ */ i.createElement(
|
|
46
44
|
Me,
|
|
47
45
|
{
|
|
@@ -62,11 +60,11 @@ const Mt = "univer-extend-confirm-content", xt = "univer-extend-confirm-radio-gr
|
|
|
62
60
|
/* @__PURE__ */ i.createElement(G, { value: "1" }, r.t("sheets-sort.dialog.sort-reminder-ext"))
|
|
63
61
|
));
|
|
64
62
|
};
|
|
65
|
-
var
|
|
66
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
63
|
+
var Kt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Qt = (e, t, n, r) => {
|
|
64
|
+
for (var o = r > 1 ? void 0 : r ? Jt(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
67
65
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
68
|
-
return r && o &&
|
|
69
|
-
},
|
|
66
|
+
return r && o && Kt(t, n, o), o;
|
|
67
|
+
}, b = (e, t) => (n, r) => t(n, r, e);
|
|
70
68
|
const W = {
|
|
71
69
|
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
72
70
|
EMPTY_ERROR: "sheets-sort.error.empty",
|
|
@@ -108,15 +106,15 @@ let g = class extends qe {
|
|
|
108
106
|
const { unitId: r, subUnitId: o, range: s } = n, c = (d = this._univerInstanceService.getUnit(r)) == null ? void 0 : d.getSheetBySheetId(o);
|
|
109
107
|
if (!c)
|
|
110
108
|
return [];
|
|
111
|
-
const l =
|
|
109
|
+
const l = en(this._localeService);
|
|
112
110
|
return Array.from(
|
|
113
111
|
{ length: s.endColumn - s.startColumn + 1 },
|
|
114
112
|
(C, f) => {
|
|
115
113
|
var S;
|
|
116
|
-
const
|
|
114
|
+
const T = (S = c.getCell(s.startRow, f + s.startColumn)) == null ? void 0 : S.v;
|
|
117
115
|
return {
|
|
118
116
|
index: f + s.startColumn,
|
|
119
|
-
label: t ? `${
|
|
117
|
+
label: t ? `${T != null ? T : l(f + s.startColumn)}` : l(f + s.startColumn)
|
|
120
118
|
};
|
|
121
119
|
}
|
|
122
120
|
);
|
|
@@ -129,7 +127,6 @@ let g = class extends qe {
|
|
|
129
127
|
const s = {
|
|
130
128
|
unitId: t,
|
|
131
129
|
subUnitId: n,
|
|
132
|
-
pluginName: rt,
|
|
133
130
|
selections: [{ range: r, primary: ot(r, o), style: null }]
|
|
134
131
|
};
|
|
135
132
|
this._commandService.executeCommand(st.id, s);
|
|
@@ -154,7 +151,7 @@ let g = class extends qe {
|
|
|
154
151
|
},
|
|
155
152
|
children: {
|
|
156
153
|
title: /* @__PURE__ */ i.createElement(
|
|
157
|
-
|
|
154
|
+
Yt,
|
|
158
155
|
{
|
|
159
156
|
onChange: (r) => {
|
|
160
157
|
t = r === "1";
|
|
@@ -176,7 +173,7 @@ let g = class extends qe {
|
|
|
176
173
|
}
|
|
177
174
|
async _detectSortLocation(t) {
|
|
178
175
|
var d;
|
|
179
|
-
const n = this._univerInstanceService.getCurrentUnitForType(te.UNIVER_SHEET), r = n.getActiveSheet(), o = n.getUnitId(), s = r.getSheetId(), c = this._selectionManagerService.
|
|
176
|
+
const n = this._univerInstanceService.getCurrentUnitForType(te.UNIVER_SHEET), r = n.getActiveSheet(), o = n.getUnitId(), s = r.getSheetId(), c = this._selectionManagerService.getCurrentLastSelection();
|
|
180
177
|
if (!c)
|
|
181
178
|
return null;
|
|
182
179
|
let l;
|
|
@@ -190,7 +187,7 @@ let g = class extends qe {
|
|
|
190
187
|
return null;
|
|
191
188
|
C === "keep" ? l = c.range : (l = le(c.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, s, l));
|
|
192
189
|
}
|
|
193
|
-
const m = (d = this._selectionManagerService.
|
|
190
|
+
const m = (d = this._selectionManagerService.getCurrentLastSelection()) == null ? void 0 : d.primary;
|
|
194
191
|
return m ? {
|
|
195
192
|
range: l,
|
|
196
193
|
unitId: o,
|
|
@@ -199,17 +196,17 @@ let g = class extends qe {
|
|
|
199
196
|
} : null;
|
|
200
197
|
}
|
|
201
198
|
};
|
|
202
|
-
g =
|
|
199
|
+
g = Qt([
|
|
203
200
|
ge(Ce.Ready, Q),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
201
|
+
b(0, fe),
|
|
202
|
+
b(1, dt),
|
|
203
|
+
b(2, Ye),
|
|
204
|
+
b(3, x(it)),
|
|
205
|
+
b(4, x(Q)),
|
|
206
|
+
b(5, x(P)),
|
|
207
|
+
b(6, pe)
|
|
211
208
|
], g);
|
|
212
|
-
function
|
|
209
|
+
function en(e) {
|
|
213
210
|
return (t) => {
|
|
214
211
|
const n = Se.chatAtABC(t);
|
|
215
212
|
switch (e.getCurrentLocale()) {
|
|
@@ -230,7 +227,7 @@ var p = function() {
|
|
|
230
227
|
}
|
|
231
228
|
return e;
|
|
232
229
|
}, p.apply(this, arguments);
|
|
233
|
-
},
|
|
230
|
+
}, tn = function(e, t) {
|
|
234
231
|
var n = {};
|
|
235
232
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
236
233
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -238,15 +235,15 @@ var p = function() {
|
|
|
238
235
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
239
236
|
return n;
|
|
240
237
|
}, y = E(function(e, t) {
|
|
241
|
-
var n = e.icon, r = e.id, o = e.className, s = e.extend, c =
|
|
238
|
+
var n = e.icon, r = e.id, o = e.className, s = e.extend, c = tn(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), m = _e("_".concat(on()));
|
|
242
239
|
return xe(n, "".concat(r), { defIds: n.defIds, idSuffix: m.current }, p({ ref: t, className: l }, c), s);
|
|
243
240
|
});
|
|
244
241
|
function xe(e, t, n, r, o) {
|
|
245
|
-
return I(e.tag, p(p({ key: t },
|
|
242
|
+
return I(e.tag, p(p({ key: t }, nn(e, n, o)), r), (rn(e, n).children || []).map(function(s, c) {
|
|
246
243
|
return xe(s, "".concat(t, "-").concat(e.tag, "-").concat(c), n, void 0, o);
|
|
247
244
|
}));
|
|
248
245
|
}
|
|
249
|
-
function
|
|
246
|
+
function nn(e, t, n) {
|
|
250
247
|
var r = p({}, e.attrs);
|
|
251
248
|
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
|
|
252
249
|
var o = t.defIds;
|
|
@@ -255,93 +252,93 @@ function rn(e, t, n) {
|
|
|
255
252
|
typeof l == "string" && (r[c] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
256
253
|
})), r;
|
|
257
254
|
}
|
|
258
|
-
function
|
|
255
|
+
function rn(e, t) {
|
|
259
256
|
var n, r = t.defIds;
|
|
260
257
|
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? p(p({}, e), { children: e.children.map(function(o) {
|
|
261
258
|
return typeof o.attrs.id == "string" && r && r.indexOf(o.attrs.id) > -1 ? p(p({}, o), { attrs: p(p({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
262
259
|
}) }) : e;
|
|
263
260
|
}
|
|
264
|
-
function
|
|
261
|
+
function on() {
|
|
265
262
|
return Math.random().toString(36).substring(2, 8);
|
|
266
263
|
}
|
|
267
264
|
y.displayName = "UniverIcon";
|
|
268
|
-
var
|
|
265
|
+
var sn = { 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" } }] }, ne = E(function(e, t) {
|
|
269
266
|
return I(y, Object.assign({}, e, {
|
|
270
267
|
id: "ascending- single",
|
|
271
268
|
ref: t,
|
|
272
|
-
icon:
|
|
269
|
+
icon: sn
|
|
273
270
|
}));
|
|
274
271
|
});
|
|
275
272
|
ne.displayName = "AscendingSingle";
|
|
276
|
-
var
|
|
273
|
+
var cn = { 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" } }] }, Re = E(function(e, t) {
|
|
277
274
|
return I(y, Object.assign({}, e, {
|
|
278
275
|
id: "check-mark-single",
|
|
279
276
|
ref: t,
|
|
280
|
-
icon:
|
|
277
|
+
icon: cn
|
|
281
278
|
}));
|
|
282
279
|
});
|
|
283
280
|
Re.displayName = "CheckMarkSingle";
|
|
284
|
-
var
|
|
281
|
+
var an = { 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" } }] }, Te = E(function(e, t) {
|
|
285
282
|
return I(y, Object.assign({}, e, {
|
|
286
283
|
id: "custom-sort-single",
|
|
287
284
|
ref: t,
|
|
288
|
-
icon:
|
|
285
|
+
icon: an
|
|
289
286
|
}));
|
|
290
287
|
});
|
|
291
|
-
|
|
292
|
-
var
|
|
288
|
+
Te.displayName = "CustomSortSingle";
|
|
289
|
+
var ln = { 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" } }] }, Oe = E(function(e, t) {
|
|
293
290
|
return I(y, Object.assign({}, e, {
|
|
294
291
|
id: "delete-empty-single",
|
|
295
292
|
ref: t,
|
|
296
|
-
icon:
|
|
293
|
+
icon: ln
|
|
297
294
|
}));
|
|
298
295
|
});
|
|
299
|
-
|
|
300
|
-
var
|
|
296
|
+
Oe.displayName = "DeleteEmptySingle";
|
|
297
|
+
var dn = { 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" } }] }, re = E(function(e, t) {
|
|
301
298
|
return I(y, Object.assign({}, e, {
|
|
302
299
|
id: "descending-single",
|
|
303
300
|
ref: t,
|
|
304
|
-
icon:
|
|
301
|
+
icon: dn
|
|
305
302
|
}));
|
|
306
303
|
});
|
|
307
304
|
re.displayName = "DescendingSingle";
|
|
308
|
-
var
|
|
305
|
+
var un = { 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" } }] }, be = E(function(e, t) {
|
|
309
306
|
return I(y, Object.assign({}, e, {
|
|
310
307
|
id: "expand-ascending-single",
|
|
311
308
|
ref: t,
|
|
312
|
-
icon:
|
|
309
|
+
icon: un
|
|
313
310
|
}));
|
|
314
311
|
});
|
|
315
|
-
|
|
316
|
-
var
|
|
312
|
+
be.displayName = "ExpandAscendingSingle";
|
|
313
|
+
var mn = { 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" } }] }, Ne = E(function(e, t) {
|
|
317
314
|
return I(y, Object.assign({}, e, {
|
|
318
315
|
id: "expand-descending-single",
|
|
319
316
|
ref: t,
|
|
320
|
-
icon:
|
|
317
|
+
icon: mn
|
|
321
318
|
}));
|
|
322
319
|
});
|
|
323
|
-
|
|
324
|
-
var
|
|
320
|
+
Ne.displayName = "ExpandDescendingSingle";
|
|
321
|
+
var hn = { 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 = E(function(e, t) {
|
|
325
322
|
return I(y, Object.assign({}, e, {
|
|
326
323
|
id: "increase-single",
|
|
327
324
|
ref: t,
|
|
328
|
-
icon:
|
|
325
|
+
icon: hn
|
|
329
326
|
}));
|
|
330
327
|
});
|
|
331
328
|
ee.displayName = "IncreaseSingle";
|
|
332
|
-
var
|
|
329
|
+
var gn = { 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" } }] }, Pe = E(function(e, t) {
|
|
333
330
|
return I(y, Object.assign({}, e, {
|
|
334
331
|
id: "more-down-single",
|
|
335
332
|
ref: t,
|
|
336
|
-
icon:
|
|
333
|
+
icon: gn
|
|
337
334
|
}));
|
|
338
335
|
});
|
|
339
336
|
Pe.displayName = "MoreDownSingle";
|
|
340
|
-
var
|
|
337
|
+
var Cn = { 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" } }] }] }, we = E(function(e, t) {
|
|
341
338
|
return I(y, Object.assign({}, e, {
|
|
342
339
|
id: "sequence-single",
|
|
343
340
|
ref: t,
|
|
344
|
-
icon:
|
|
341
|
+
icon: Cn
|
|
345
342
|
}));
|
|
346
343
|
});
|
|
347
344
|
we.displayName = "SequenceSingle";
|
|
@@ -386,32 +383,32 @@ const Le = {
|
|
|
386
383
|
type: R.COMMAND,
|
|
387
384
|
handler: async (e) => await e.get(g).triggerSortCustomize()
|
|
388
385
|
};
|
|
389
|
-
function
|
|
390
|
-
const e =
|
|
386
|
+
function Sn() {
|
|
387
|
+
const e = O(g), t = O(Q), n = O(P), [r, o] = F(!1), [s, c] = F(0), l = _e(null), m = e.customSortState();
|
|
391
388
|
if (!m || !m.location)
|
|
392
389
|
return null;
|
|
393
|
-
const { range: d, unitId: C, subUnitId: f } = m.location,
|
|
390
|
+
const { range: d, unitId: C, subUnitId: f } = m.location, T = e.getTitles(r), [S, $] = F([
|
|
394
391
|
{ type: w.ASC, colIndex: d.startColumn }
|
|
395
|
-
]), q =
|
|
392
|
+
]), q = N((u, _) => {
|
|
396
393
|
const j = [...S];
|
|
397
394
|
_ === null ? j.splice(u, 1) : j[u] = _, $(j);
|
|
398
|
-
}, [S]), Z =
|
|
395
|
+
}, [S]), Z = N(
|
|
399
396
|
Ke(() => {
|
|
400
|
-
const u = [...S], _ =
|
|
397
|
+
const u = [...S], _ = pn(d, S);
|
|
401
398
|
_ !== null && (u.push({ type: w.ASC, colIndex: _ }), $(u));
|
|
402
399
|
}, 200),
|
|
403
400
|
[S, d]
|
|
404
|
-
), h =
|
|
401
|
+
), h = N((u, _) => {
|
|
405
402
|
t.applySort({ range: d, orderRules: u, hasTitle: _ }), e.closeCustomSortPanel();
|
|
406
|
-
}, [t, e, d]), Y =
|
|
403
|
+
}, [t, e, d]), Y = N(() => {
|
|
407
404
|
e.closeCustomSortPanel();
|
|
408
|
-
}, [e]), Ze =
|
|
405
|
+
}, [e]), Ze = N((u) => {
|
|
409
406
|
o(u), u ? e.setSelection(C, f, { ...d, startRow: d.startRow + 1 }) : e.setSelection(C, f, d);
|
|
410
407
|
}, [e, d, f, C]);
|
|
411
408
|
Ee(() => {
|
|
412
409
|
l.current && S.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
413
410
|
}, [S]);
|
|
414
|
-
const We = S.length <
|
|
411
|
+
const We = S.length < T.length, ae = S.map((u) => ({ ...u, id: `${u.colIndex}` }));
|
|
415
412
|
return /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelContainer }, /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelContent, onMouseDown: (u) => {
|
|
416
413
|
u.stopPropagation();
|
|
417
414
|
} }, /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelExt }, /* @__PURE__ */ i.createElement("div", { className: a.firstRowCheck }, /* @__PURE__ */ i.createElement(vt, { checked: r, onChange: (u) => Ze(!!u) }, n.t("sheets-sort.dialog.first-row-check"))), We ? /* @__PURE__ */ i.createElement("div", { className: a.addCondition, onClick: Z }, /* @__PURE__ */ i.createElement(ee, null), /* @__PURE__ */ i.createElement("span", { className: a.addConditionText }, n.t("sheets-sort.dialog.add-condition"))) : /* @__PURE__ */ i.createElement("div", { className: `${a.addCondition} ${a.addConditionDisable}` }, /* @__PURE__ */ i.createElement(ee, null), /* @__PURE__ */ i.createElement("span", { className: a.addConditionText }, n.t("sheets-sort.dialog.add-condition")))), /* @__PURE__ */ i.createElement(
|
|
@@ -432,9 +429,9 @@ function fn() {
|
|
|
432
429
|
idKey: "id",
|
|
433
430
|
draggableHandle: `.${a.customSortPanelItemHandler}`,
|
|
434
431
|
itemRender: (u) => /* @__PURE__ */ i.createElement(
|
|
435
|
-
|
|
432
|
+
fn,
|
|
436
433
|
{
|
|
437
|
-
titles:
|
|
434
|
+
titles: T,
|
|
438
435
|
list: ae,
|
|
439
436
|
item: u,
|
|
440
437
|
onChange: (_, j) => q(j, _),
|
|
@@ -447,11 +444,11 @@ function fn() {
|
|
|
447
444
|
)
|
|
448
445
|
)), /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelFooter }, /* @__PURE__ */ i.createElement(ue, { className: a.customSortPanelFooterBtn, type: "default", onClick: () => Y() }, n.t("sheets-sort.dialog.cancel")), /* @__PURE__ */ i.createElement(ue, { className: a.customSortPanelFooterBtn, type: "primary", onClick: () => h(S, r) }, n.t("sheets-sort.dialog.confirm"))));
|
|
449
446
|
}
|
|
450
|
-
function
|
|
447
|
+
function fn(e) {
|
|
451
448
|
var Z;
|
|
452
|
-
const { list: t, item: n, titles: r, onChange: o, scrollPosition: s } = e, c =
|
|
449
|
+
const { list: t, item: n, titles: r, onChange: o, scrollPosition: s } = e, c = O(P), l = r.filter((h) => !t.some((Y) => Y.colIndex === h.index) || h.index === n.colIndex), m = t.findIndex((h) => h.colIndex === n.colIndex), d = N((h) => {
|
|
453
450
|
o({ ...n, colIndex: h.index }, m), f(!1);
|
|
454
|
-
}, [m, n, o]), [C, f] = F(!1),
|
|
451
|
+
}, [m, n, o]), [C, f] = F(!1), T = (h) => {
|
|
455
452
|
f(h);
|
|
456
453
|
};
|
|
457
454
|
Ee(() => {
|
|
@@ -464,7 +461,7 @@ function pn(e) {
|
|
|
464
461
|
placement: "bottomLeft",
|
|
465
462
|
trigger: ["click"],
|
|
466
463
|
visible: C,
|
|
467
|
-
onVisibleChange:
|
|
464
|
+
onVisibleChange: T,
|
|
468
465
|
overlay: /* @__PURE__ */ i.createElement("ul", { className: a.customSortColMenu }, l.map((h) => /* @__PURE__ */ i.createElement(
|
|
469
466
|
"li",
|
|
470
467
|
{
|
|
@@ -488,17 +485,17 @@ function pn(e) {
|
|
|
488
485
|
},
|
|
489
486
|
/* @__PURE__ */ i.createElement(G, { value: w.ASC }, c.t("sheets-sort.general.sort-asc")),
|
|
490
487
|
/* @__PURE__ */ i.createElement(G, { value: w.DESC }, c.t("sheets-sort.general.sort-desc"))
|
|
491
|
-
)), /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelItemRemove }, S && /* @__PURE__ */ i.createElement(
|
|
488
|
+
)), /* @__PURE__ */ i.createElement("div", { className: a.customSortPanelItemRemove }, S && /* @__PURE__ */ i.createElement(Oe, { onClick: () => o(null, m) })));
|
|
492
489
|
}
|
|
493
|
-
function
|
|
490
|
+
function pn(e, t) {
|
|
494
491
|
const { startColumn: n, endColumn: r } = e, o = new Set(t.map((s) => s == null ? void 0 : s.colIndex));
|
|
495
492
|
for (let s = n; s <= r; s++)
|
|
496
493
|
if (!o.has(s))
|
|
497
494
|
return s;
|
|
498
495
|
return null;
|
|
499
496
|
}
|
|
500
|
-
function
|
|
501
|
-
const { range: t, colIndex: n, onClose: r } = e, o =
|
|
497
|
+
function vn(e) {
|
|
498
|
+
const { range: t, colIndex: n, onClose: r } = e, o = O(g), s = O(fe), c = O(P), l = N((m) => {
|
|
502
499
|
const { unitId: d, subUnitId: C } = ct(s) || {};
|
|
503
500
|
if (t && d && C) {
|
|
504
501
|
const f = { ...t, startRow: t.startRow + 1 };
|
|
@@ -510,7 +507,7 @@ function _n(e) {
|
|
|
510
507
|
return /* @__PURE__ */ i.createElement("div", { className: a.embedSortBtnContainer }, /* @__PURE__ */ i.createElement("div", { className: `${a.embedSortBtn} ${a.embedSortBtnAsc}`, onClick: () => l(!0) }, /* @__PURE__ */ i.createElement(ne, { className: a.embedSortBtnIcon }), c.t("sheets-sort.general.sort-asc")), /* @__PURE__ */ i.createElement("div", { className: `${a.embedSortBtn} ${a.embedSortBtnDesc}`, onClick: () => l(!1) }, /* @__PURE__ */ i.createElement(re, { className: a.embedSortBtnIcon }), c.t("sheets-sort.general.sort-desc")));
|
|
511
508
|
}
|
|
512
509
|
const A = "sheet.menu.sheets-sort", B = "sheet.menu.sheets-sort-ctx", z = "AscendingSingle", oe = "ExpandAscendingSingle", se = "DescendingSingle", ie = "ExpandDescendingSingle", ce = "CustomSortSingle";
|
|
513
|
-
function
|
|
510
|
+
function _n(e) {
|
|
514
511
|
return {
|
|
515
512
|
id: A,
|
|
516
513
|
type: v.SUBITEMS,
|
|
@@ -522,7 +519,7 @@ function En(e) {
|
|
|
522
519
|
disabled$: U(e, { workbookTypes: [L], worksheetTypes: [D, H], rangeTypes: [k] })
|
|
523
520
|
};
|
|
524
521
|
}
|
|
525
|
-
function
|
|
522
|
+
function En(e) {
|
|
526
523
|
return {
|
|
527
524
|
id: Le.id,
|
|
528
525
|
icon: z,
|
|
@@ -531,7 +528,7 @@ function In(e) {
|
|
|
531
528
|
positions: [A]
|
|
532
529
|
};
|
|
533
530
|
}
|
|
534
|
-
function
|
|
531
|
+
function In(e) {
|
|
535
532
|
return {
|
|
536
533
|
id: De.id,
|
|
537
534
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -540,7 +537,7 @@ function yn(e) {
|
|
|
540
537
|
positions: [A]
|
|
541
538
|
};
|
|
542
539
|
}
|
|
543
|
-
function
|
|
540
|
+
function yn(e) {
|
|
544
541
|
return {
|
|
545
542
|
id: He.id,
|
|
546
543
|
title: "sheets-sort.general.sort-desc-cur",
|
|
@@ -549,7 +546,7 @@ function Mn(e) {
|
|
|
549
546
|
positions: [A]
|
|
550
547
|
};
|
|
551
548
|
}
|
|
552
|
-
function
|
|
549
|
+
function Mn(e) {
|
|
553
550
|
return {
|
|
554
551
|
id: ke.id,
|
|
555
552
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -558,7 +555,7 @@ function xn(e) {
|
|
|
558
555
|
positions: [A]
|
|
559
556
|
};
|
|
560
557
|
}
|
|
561
|
-
function
|
|
558
|
+
function xn(e) {
|
|
562
559
|
return {
|
|
563
560
|
id: Ue.id,
|
|
564
561
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -567,7 +564,7 @@ function Rn(e) {
|
|
|
567
564
|
icon: ce
|
|
568
565
|
};
|
|
569
566
|
}
|
|
570
|
-
function
|
|
567
|
+
function Rn(e) {
|
|
571
568
|
return {
|
|
572
569
|
id: B,
|
|
573
570
|
title: "sheets-sort.general.sort",
|
|
@@ -591,7 +588,7 @@ function Tn(e) {
|
|
|
591
588
|
disabled$: U(e, { workbookTypes: [L], worksheetTypes: [D, H], rangeTypes: [k] })
|
|
592
589
|
};
|
|
593
590
|
}
|
|
594
|
-
function
|
|
591
|
+
function On(e) {
|
|
595
592
|
return {
|
|
596
593
|
id: Be.id,
|
|
597
594
|
title: "sheets-sort.general.sort-asc-ext",
|
|
@@ -611,7 +608,7 @@ function bn(e) {
|
|
|
611
608
|
disabled$: U(e, { workbookTypes: [L], worksheetTypes: [D, H], rangeTypes: [k] })
|
|
612
609
|
};
|
|
613
610
|
}
|
|
614
|
-
function
|
|
611
|
+
function Nn(e) {
|
|
615
612
|
return {
|
|
616
613
|
id: je.id,
|
|
617
614
|
title: "sheets-sort.general.sort-desc-ext",
|
|
@@ -621,7 +618,7 @@ function Pn(e) {
|
|
|
621
618
|
disabled$: U(e, { workbookTypes: [L], worksheetTypes: [D, H], rangeTypes: [k] })
|
|
622
619
|
};
|
|
623
620
|
}
|
|
624
|
-
function
|
|
621
|
+
function Pn(e) {
|
|
625
622
|
return {
|
|
626
623
|
id: Fe.id,
|
|
627
624
|
title: "sheets-sort.general.sort-custom",
|
|
@@ -631,14 +628,14 @@ function wn(e) {
|
|
|
631
628
|
disabled$: U(e, { workbookTypes: [L], worksheetTypes: [D, H], rangeTypes: [k] })
|
|
632
629
|
};
|
|
633
630
|
}
|
|
634
|
-
var
|
|
635
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
631
|
+
var wn = Object.defineProperty, Ln = Object.getOwnPropertyDescriptor, Dn = (e, t, n, r) => {
|
|
632
|
+
for (var o = r > 1 ? void 0 : r ? Ln(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
636
633
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
637
|
-
return r && o &&
|
|
634
|
+
return r && o && wn(t, n, o), o;
|
|
638
635
|
}, M = (e, t) => (n, r) => t(n, r, e);
|
|
639
|
-
const
|
|
636
|
+
const Hn = {
|
|
640
637
|
menu: {}
|
|
641
|
-
}, me = "custom-sort-dialog",
|
|
638
|
+
}, me = "custom-sort-dialog", kn = 560;
|
|
642
639
|
let V = class extends Je {
|
|
643
640
|
constructor(e, t, n, r, o, s, c, l, m, d, C) {
|
|
644
641
|
super(), this._config = e, this._commandService = t, this._menuService = n, this._dialogService = r, this._layoutService = o, this._uiPartsService = s, this._sheetRenderService = c, this._localeService = l, this._sheetsSortUIService = m, this._injector = d, this._componentManager = C, this._initCommands(), this._initMenu(), this._initUI();
|
|
@@ -646,18 +643,18 @@ let V = class extends Je {
|
|
|
646
643
|
_initMenu() {
|
|
647
644
|
const { menu: e = {} } = this._config;
|
|
648
645
|
[
|
|
646
|
+
_n,
|
|
649
647
|
En,
|
|
648
|
+
yn,
|
|
650
649
|
In,
|
|
651
650
|
Mn,
|
|
652
|
-
yn,
|
|
653
651
|
xn,
|
|
654
652
|
Rn,
|
|
655
|
-
On,
|
|
656
653
|
Tn,
|
|
657
654
|
bn,
|
|
655
|
+
On,
|
|
658
656
|
Nn,
|
|
659
|
-
Pn
|
|
660
|
-
wn
|
|
657
|
+
Pn
|
|
661
658
|
].forEach((t) => {
|
|
662
659
|
this.disposeWithMe(
|
|
663
660
|
this._menuService.addMenuItem(
|
|
@@ -679,10 +676,10 @@ let V = class extends Je {
|
|
|
679
676
|
$e,
|
|
680
677
|
je,
|
|
681
678
|
Fe
|
|
682
|
-
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(
|
|
679
|
+
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(nt.id));
|
|
683
680
|
}
|
|
684
681
|
_initUI() {
|
|
685
|
-
this.disposeWithMe(this._componentManager.register("CustomSortPanel",
|
|
682
|
+
this.disposeWithMe(this._componentManager.register("CustomSortPanel", Sn)), this.disposeWithMe(this._uiPartsService.registerComponent(at.FILTER_PANEL_EMBED_POINT, () => Qe(vn, this._injector))), this.disposeWithMe(this._componentManager.register(z, ne)), this.disposeWithMe(this._componentManager.register(oe, be)), this.disposeWithMe(this._componentManager.register(se, re)), this.disposeWithMe(this._componentManager.register(ie, Ne)), this.disposeWithMe(this._componentManager.register(ce, Te)), this._sheetsSortUIService.customSortState$.pipe(pt(this.dispose$)).subscribe((e) => {
|
|
686
683
|
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
687
684
|
});
|
|
688
685
|
}
|
|
@@ -690,11 +687,11 @@ let V = class extends Je {
|
|
|
690
687
|
this._dialogService.open({
|
|
691
688
|
id: me,
|
|
692
689
|
draggable: !0,
|
|
693
|
-
width:
|
|
694
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${
|
|
690
|
+
width: kn,
|
|
691
|
+
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${It(e.range)}` },
|
|
695
692
|
children: { label: "CustomSortPanel" },
|
|
696
693
|
destroyOnClose: !0,
|
|
697
|
-
defaultPosition:
|
|
694
|
+
defaultPosition: Un(),
|
|
698
695
|
preservePositionOnDestroy: !1,
|
|
699
696
|
onClose: () => this._closePanel(),
|
|
700
697
|
mask: !0
|
|
@@ -704,7 +701,7 @@ let V = class extends Je {
|
|
|
704
701
|
this._dialogService.close(me), queueMicrotask(() => this._layoutService.focus());
|
|
705
702
|
}
|
|
706
703
|
};
|
|
707
|
-
V =
|
|
704
|
+
V = Dn([
|
|
708
705
|
ge(Ce.Ready, V),
|
|
709
706
|
M(1, pe),
|
|
710
707
|
M(2, ht),
|
|
@@ -717,18 +714,18 @@ V = Hn([
|
|
|
717
714
|
M(9, x(ve)),
|
|
718
715
|
M(10, x(mt))
|
|
719
716
|
], V);
|
|
720
|
-
function
|
|
717
|
+
function Un() {
|
|
721
718
|
return { x: 0, y: 0 };
|
|
722
719
|
}
|
|
723
|
-
var Ve = Object.defineProperty,
|
|
724
|
-
for (var o = r > 1 ? void 0 : r ?
|
|
720
|
+
var Ve = Object.defineProperty, An = Object.getOwnPropertyDescriptor, Bn = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $n = (e, t, n, r) => {
|
|
721
|
+
for (var o = r > 1 ? void 0 : r ? An(t, n) : t, s = e.length - 1, c; s >= 0; s--)
|
|
725
722
|
(c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
|
|
726
723
|
return r && o && Ve(t, n, o), o;
|
|
727
|
-
}, he = (e, t) => (n, r) => t(n, r, e), ze = (e, t, n) =>
|
|
728
|
-
const
|
|
729
|
-
let X = class extends
|
|
724
|
+
}, he = (e, t) => (n, r) => t(n, r, e), ze = (e, t, n) => Bn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
725
|
+
const jn = "UNIVER_SHEETS_SORT_UI_PLUGIN";
|
|
726
|
+
let X = class extends et {
|
|
730
727
|
constructor(e = {}, t, n) {
|
|
731
|
-
super(), this._config = e, this._injector = t, this._localeService = n, this._config = Se.deepMerge({},
|
|
728
|
+
super(), this._config = e, this._injector = t, this._localeService = n, this._config = Se.deepMerge({}, Hn, this._config);
|
|
732
729
|
}
|
|
733
730
|
onStarting(e) {
|
|
734
731
|
[
|
|
@@ -740,9 +737,9 @@ let X = class extends Qe {
|
|
|
740
737
|
}
|
|
741
738
|
};
|
|
742
739
|
ze(X, "type", te.UNIVER_SHEET);
|
|
743
|
-
ze(X, "pluginName",
|
|
744
|
-
X =
|
|
745
|
-
|
|
740
|
+
ze(X, "pluginName", jn);
|
|
741
|
+
X = $n([
|
|
742
|
+
tt(rt),
|
|
746
743
|
he(1, x(ve)),
|
|
747
744
|
he(2, x(P))
|
|
748
745
|
], X);
|