@univerjs/sheets-sort-ui 0.5.4 → 0.5.5-experimental.20250123-34738ff

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/es/index.js CHANGED
@@ -1,495 +1,474 @@
1
- var We = Object.defineProperty;
2
- var qe = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var X = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { useDependency as O, LocaleService as H, Inject as E, Disposable as Ye, UniverInstanceType as q, IUniverInstanceService as Me, ILogService as Je, ICommandService as be, Tools as Xe, LocaleType as Q, CommandType as b, throttle as Ke, Injector as Ee, RxDisposable as Qe, connectInjector as et, DependentOn as tt, Plugin as nt, merge as rt, IConfigService as ot } from "@univerjs/core";
5
- import { SheetsSortService as Oe, SortType as k, SortRangeCommand as st, UniverSheetsSortPlugin as it } from "@univerjs/sheets-sort";
6
- import { serializeRange as ct } from "@univerjs/engine-formula";
7
- import { getCurrentRangeDisable$ as w, getCurrentExclusiveRangeInterest$ as at, SheetsRenderService as lt, SheetsUIPart as dt } from "@univerjs/sheets-ui";
8
- import { IConfirmService as ut, MenuItemType as _, getMenuHiddenObservable as Te, RibbonStartGroup as mt, ContextMenuPosition as ht, ContextMenuGroup as gt, ComponentManager as Ct, IMenuManagerService as St, IDialogService as ft, ILayoutService as pt, IUIPartsService as vt } from "@univerjs/ui";
9
- import { BehaviorSubject as _t, takeUntil as xt } from "rxjs";
10
- import It, { forwardRef as I, useRef as Pe, createElement as y, useState as B, useCallback as P, useEffect as we } from "react";
11
- import { SheetsSelectionsService as yt, getPrimaryForRange as Rt, SetSelectionsOperation as Mt, expandToContinuousRange as pe, getSheetCommandTarget as bt, WorkbookEditablePermission as N, WorksheetSortPermission as L, WorksheetEditPermission as j, RangeProtectionPermissionEditPoint as D } from "@univerjs/sheets";
12
- import { RadioGroup as Ne, Radio as Z, Checkbox as Et, DraggableList as Ot, Button as ve, DropdownLegacy as Tt } from "@univerjs/design";
13
- const Pt = "sheets-sort-ui.config", _e = {};
14
- var v = function() {
15
- return v = Object.assign || function(e) {
16
- for (var t, n = 1, r = arguments.length; n < r; n++) {
17
- t = arguments[n];
18
- for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
5
+ import { useDependency, LocaleService, Inject, Disposable, UniverInstanceType, IUniverInstanceService, ILogService, ICommandService, Tools, LocaleType, CommandType, throttle, Injector, RxDisposable, connectInjector, DependentOn, Plugin, merge, IConfigService } from "@univerjs/core";
6
+ import { SheetsSortService, SortType, SortRangeCommand, UniverSheetsSortPlugin } from "@univerjs/sheets-sort";
7
+ import { serializeRange } from "@univerjs/engine-formula";
8
+ import { getCurrentRangeDisable$, getCurrentExclusiveRangeInterest$, SheetsRenderService, SheetsUIPart } from "@univerjs/sheets-ui";
9
+ import { IConfirmService, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, ContextMenuPosition, ContextMenuGroup, ComponentManager, IMenuManagerService, IDialogService, ILayoutService, IUIPartsService } from "@univerjs/ui";
10
+ import { BehaviorSubject, takeUntil } from "rxjs";
11
+ import { jsxs, jsx } from "react/jsx-runtime";
12
+ import { SheetsSelectionsService, getPrimaryForRange, SetSelectionsOperation, expandToContinuousRange, getSheetCommandTarget, WorkbookEditablePermission, WorksheetSortPermission, WorksheetEditPermission, RangeProtectionPermissionEditPoint } from "@univerjs/sheets";
13
+ import { RadioGroup, Radio, Checkbox, DraggableList, Button, DropdownLegacy } from "@univerjs/design";
14
+ import { forwardRef, useRef, createElement, useState, useCallback, useEffect } from "react";
15
+ const SHEETS_SORT_UI_PLUGIN_CONFIG_KEY = "sheets-sort-ui.config", defaultPluginConfig = {};
16
+ var __assign = function() {
17
+ return __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
19
21
  }
20
- return e;
21
- }, v.apply(this, arguments);
22
- }, wt = function(e, t) {
23
- var n = {};
24
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
25
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
26
- for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
27
- t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
28
- return n;
29
- }, R = I(function(e, t) {
30
- var n = e.icon, r = e.id, o = e.className, s = e.extend, c = wt(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), d = Pe("_".concat(jt()));
31
- return Le(n, "".concat(r), { defIds: n.defIds, idSuffix: d.current }, v({ ref: t, className: l }, c), s);
22
+ return t;
23
+ }, __assign.apply(this, arguments);
24
+ }, __rest = function(s, e) {
25
+ var t = {};
26
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
27
+ if (s != null && typeof Object.getOwnPropertySymbols == "function")
28
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
29
+ e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
30
+ return t;
31
+ }, IconBase = forwardRef(function(props, ref) {
32
+ var icon = props.icon, id = props.id, className = props.className, extend = props.extend, restProps = __rest(props, ["icon", "id", "className", "extend"]), cls = "univerjs-icon univerjs-icon-".concat(id, " ").concat(className || "").trim(), idSuffix = useRef("_".concat(generateShortUuid()));
33
+ return render(icon, "".concat(id), { defIds: icon.defIds, idSuffix: idSuffix.current }, __assign({ ref, className: cls }, restProps), extend);
32
34
  });
33
- function Le(e, t, n, r, o) {
34
- return y(e.tag, v(v({ key: t }, Nt(e, n, o)), r), (Lt(e, n).children || []).map(function(s, c) {
35
- return Le(s, "".concat(t, "-").concat(e.tag, "-").concat(c), n, void 0, o);
35
+ function render(node, id, runtimeProps, rootProps, extend) {
36
+ return createElement(node.tag, __assign(__assign({ key: id }, replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend)), rootProps), (replaceRuntimeIdsInDefs(node, runtimeProps).children || []).map(function(child, index) {
37
+ return render(child, "".concat(id, "-").concat(node.tag, "-").concat(index), runtimeProps, void 0, extend);
36
38
  }));
37
39
  }
38
- function Nt(e, t, n) {
39
- var r = v({}, e.attrs);
40
- n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
41
- var o = t.defIds;
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) {
43
- var c = s[0], l = s[1];
44
- typeof l == "string" && (r[c] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
45
- })), r;
40
+ __name(render, "render");
41
+ function replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend) {
42
+ var attrs = __assign({}, node.attrs);
43
+ extend != null && extend.colorChannel1 && attrs.fill === "colorChannel1" && (attrs.fill = extend.colorChannel1);
44
+ var defIds = runtimeProps.defIds;
45
+ return !defIds || defIds.length === 0 || (node.tag === "use" && attrs["xlink:href"] && (attrs["xlink:href"] = attrs["xlink:href"] + runtimeProps.idSuffix), Object.entries(attrs).forEach(function(_a4) {
46
+ var key = _a4[0], value = _a4[1];
47
+ typeof value == "string" && (attrs[key] = value.replace(/url\(#(.*)\)/, "url(#$1".concat(runtimeProps.idSuffix, ")")));
48
+ })), attrs;
46
49
  }
47
- function Lt(e, t) {
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) ? 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
- }) }) : e;
50
+ __name(replaceRuntimeIdsAndExtInAttrs, "replaceRuntimeIdsAndExtInAttrs");
51
+ function replaceRuntimeIdsInDefs(node, runtimeProps) {
52
+ var _a4, defIds = runtimeProps.defIds;
53
+ return !defIds || defIds.length === 0 ? node : node.tag === "defs" && (!((_a4 = node.children) === null || _a4 === void 0) && _a4.length) ? __assign(__assign({}, node), { children: node.children.map(function(child) {
54
+ return typeof child.attrs.id == "string" && defIds && defIds.indexOf(child.attrs.id) > -1 ? __assign(__assign({}, child), { attrs: __assign(__assign({}, child.attrs), { id: child.attrs.id + runtimeProps.idSuffix }) }) : child;
55
+ }) }) : node;
52
56
  }
53
- function jt() {
57
+ __name(replaceRuntimeIdsInDefs, "replaceRuntimeIdsInDefs");
58
+ function generateShortUuid() {
54
59
  return Math.random().toString(36).substring(2, 8);
55
60
  }
56
- R.displayName = "UniverIcon";
57
- var Dt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, te = I(function(e, t) {
58
- return y(R, Object.assign({}, e, {
61
+ __name(generateShortUuid, "generateShortUuid");
62
+ IconBase.displayName = "UniverIcon";
63
+ var element$9 = { 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" } }] }, AscendingSingle = forwardRef(function(props, ref) {
64
+ return createElement(IconBase, Object.assign({}, props, {
59
65
  id: "ascending- single",
60
- ref: t,
61
- icon: Dt
66
+ ref,
67
+ icon: element$9
62
68
  }));
63
69
  });
64
- te.displayName = "AscendingSingle";
65
- var kt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, je = I(function(e, t) {
66
- return y(R, Object.assign({}, e, {
70
+ AscendingSingle.displayName = "AscendingSingle";
71
+ var element$8 = { 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" } }] }, CheckMarkSingle = forwardRef(function(props, ref) {
72
+ return createElement(IconBase, Object.assign({}, props, {
67
73
  id: "check-mark-single",
68
- ref: t,
69
- icon: kt
74
+ ref,
75
+ icon: element$8
70
76
  }));
71
77
  });
72
- je.displayName = "CheckMarkSingle";
73
- var Ht = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.5574 8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507 9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661 11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306zM6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512 7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574 6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588 4.88808 9.55156 5.26798 9.55156 5.50229 9.78588L6.22584 10.5094z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.14014 3.73989C1.14014 2.30396 2.3042 1.13989 3.74014 1.13989H12.2601C13.6961 1.13989 14.8601 2.30395 14.8601 3.73989V12.2599C14.8601 13.6958 13.6961 14.8599 12.2601 14.8599H3.74014C2.3042 14.8599 1.14014 13.6958 1.14014 12.2599V3.73989ZM2.34014 5.86724V12.2599C2.34014 13.0331 2.96694 13.6599 3.74014 13.6599H12.2601C13.0333 13.6599 13.6601 13.0331 13.6601 12.2599V5.86724H2.34014ZM13.6601 4.66724H2.34014V3.73989C2.34014 2.9667 2.96694 2.33989 3.74014 2.33989H12.2601C13.0333 2.33989 13.6601 2.96669 13.6601 3.73989V4.66724Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, De = I(function(e, t) {
74
- return y(R, Object.assign({}, e, {
78
+ CheckMarkSingle.displayName = "CheckMarkSingle";
79
+ var element$7 = { 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" } }] }, CustomSortSingle = forwardRef(function(props, ref) {
80
+ return createElement(IconBase, Object.assign({}, props, {
75
81
  id: "custom-sort-single",
76
- ref: t,
77
- icon: Ht
82
+ ref,
83
+ icon: element$7
78
84
  }));
79
85
  });
80
- De.displayName = "CustomSortSingle";
81
- var Ut = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V13.1332C3.15332 14.2377 4.04875 15.1332 5.15332 15.1332H10.8465C11.9511 15.1332 12.8465 14.2377 12.8465 13.1331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V13.1331C11.6465 13.575 11.2884 13.9331 10.8465 13.9331H5.15332C4.71149 13.9331 4.35332 13.575 4.35332 13.1332V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ke = I(function(e, t) {
82
- return y(R, Object.assign({}, e, {
86
+ CustomSortSingle.displayName = "CustomSortSingle";
87
+ var element$6 = { 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" } }] }, DeleteEmptySingle = forwardRef(function(props, ref) {
88
+ return createElement(IconBase, Object.assign({}, props, {
83
89
  id: "delete-empty-single",
84
- ref: t,
85
- icon: Ut
90
+ ref,
91
+ icon: element$6
86
92
  }));
87
93
  });
88
- ke.displayName = "DeleteEmptySingle";
89
- var $t = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ne = I(function(e, t) {
90
- return y(R, Object.assign({}, e, {
94
+ DeleteEmptySingle.displayName = "DeleteEmptySingle";
95
+ var element$5 = { 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" } }] }, DescendingSingle = forwardRef(function(props, ref) {
96
+ return createElement(IconBase, Object.assign({}, props, {
91
97
  id: "descending-single",
92
- ref: t,
93
- icon: $t
98
+ ref,
99
+ icon: element$5
94
100
  }));
95
101
  });
96
- ne.displayName = "DescendingSingle";
97
- var At = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 3.20024C1.57503 3.20024 1.3064 2.93161 1.3064 2.60024C1.3064 2.26887 1.57503 2.00024 1.9064 2.00024H4.57306C4.90443 2.00024 5.17306 2.26887 5.17306 2.60024C5.17306 2.93161 4.90443 3.20024 4.57306 3.20024H1.9064ZM1.3064 6.19985C1.3064 6.53122 1.57503 6.79985 1.9064 6.79985H5.9064C6.23777 6.79985 6.5064 6.53122 6.5064 6.19985C6.5064 5.86848 6.23777 5.59985 5.9064 5.59985H1.9064C1.57503 5.59985 1.3064 5.86848 1.3064 6.19985ZM1.9064 10.3997C1.57503 10.3997 1.3064 10.1311 1.3064 9.79971C1.3064 9.46834 1.57503 9.19971 1.9064 9.19971H7.23973C7.5711 9.19971 7.83973 9.46834 7.83973 9.79971C7.83973 10.1311 7.5711 10.3997 7.23973 10.3997H1.9064ZM1.9064 13.9996C1.57503 13.9996 1.3064 13.7309 1.3064 13.3996C1.3064 13.0682 1.57503 12.7996 1.9064 12.7996H8.57306C8.90443 12.7996 9.17306 13.0682 9.17306 13.3996C9.17306 13.7309 8.90443 13.9996 8.57306 13.9996H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 14.2667C12.4267 14.5981 12.1581 14.8667 11.8267 14.8667C11.4953 14.8667 11.2267 14.5981 11.2267 14.2667V3.18198L9.98447 4.42422C9.75015 4.65853 9.37026 4.65853 9.13594 4.42422C8.90163 4.1899 8.90163 3.81 9.13594 3.57569L11.4026 1.30902C11.6369 1.07471 12.0168 1.07471 12.2511 1.30902L14.5178 3.57569C14.7521 3.81 14.7521 4.1899 14.5178 4.42422C14.2835 4.65853 13.9036 4.65853 13.6693 4.42422L12.4267 3.18165V14.2667Z" } }] }, He = I(function(e, t) {
98
- return y(R, Object.assign({}, e, {
102
+ DescendingSingle.displayName = "DescendingSingle";
103
+ var element$4 = { 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" } }] }, ExpandAscendingSingle = forwardRef(function(props, ref) {
104
+ return createElement(IconBase, Object.assign({}, props, {
99
105
  id: "expand-ascending-single",
100
- ref: t,
101
- icon: At
106
+ ref,
107
+ icon: element$4
102
108
  }));
103
109
  });
104
- He.displayName = "ExpandAscendingSingle";
105
- var Bt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9064 12.7998C1.57503 12.7998 1.3064 13.0684 1.3064 13.3998C1.3064 13.7311 1.57503 13.9998 1.9064 13.9998H4.57306C4.90443 13.9998 5.17306 13.7311 5.17306 13.3998C5.17306 13.0684 4.90443 12.7998 4.57306 12.7998H1.9064ZM1.3064 9.80015C1.3064 9.46878 1.57503 9.20015 1.9064 9.20015H5.9064C6.23777 9.20015 6.5064 9.46878 6.5064 9.80015C6.5064 10.1315 6.23777 10.4001 5.9064 10.4001H1.9064C1.57503 10.4001 1.3064 10.1315 1.3064 9.80015ZM1.9064 5.60029C1.57503 5.60029 1.3064 5.86892 1.3064 6.20029C1.3064 6.53166 1.57503 6.80029 1.9064 6.80029H7.23973C7.5711 6.80029 7.83973 6.53166 7.83973 6.20029C7.83973 5.86892 7.5711 5.60029 7.23973 5.60029H1.9064ZM1.9064 2.00044C1.57503 2.00044 1.3064 2.26907 1.3064 2.60044C1.3064 2.93181 1.57503 3.20044 1.9064 3.20044H8.57306C8.90443 3.20044 9.17306 2.93181 9.17306 2.60044C9.17306 2.26907 8.90443 2.00044 8.57306 2.00044H1.9064Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4267 1.7333C12.4267 1.40193 12.1581 1.1333 11.8267 1.1333C11.4953 1.1333 11.2267 1.40193 11.2267 1.7333V12.818L9.98447 11.5758C9.75015 11.3415 9.37026 11.3415 9.13594 11.5758C8.90163 11.8101 8.90163 12.19 9.13594 12.4243L11.4026 14.691C11.6369 14.9253 12.0168 14.9253 12.2511 14.691L14.5178 12.4243C14.7521 12.19 14.7521 11.8101 14.5178 11.5758C14.2835 11.3415 13.9036 11.3415 13.6693 11.5758L12.4267 12.8183V1.7333Z" } }] }, Ue = I(function(e, t) {
106
- return y(R, Object.assign({}, e, {
110
+ ExpandAscendingSingle.displayName = "ExpandAscendingSingle";
111
+ var element$3 = { 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" } }] }, ExpandDescendingSingle = forwardRef(function(props, ref) {
112
+ return createElement(IconBase, Object.assign({}, props, {
107
113
  id: "expand-descending-single",
108
- ref: t,
109
- icon: Bt
114
+ ref,
115
+ icon: element$3
110
116
  }));
111
117
  });
112
- Ue.displayName = "ExpandDescendingSingle";
113
- var Ft = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, ee = I(function(e, t) {
114
- return y(R, Object.assign({}, e, {
118
+ ExpandDescendingSingle.displayName = "ExpandDescendingSingle";
119
+ var element$2 = { 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" } }] }, IncreaseSingle = forwardRef(function(props, ref) {
120
+ return createElement(IconBase, Object.assign({}, props, {
115
121
  id: "increase-single",
116
- ref: t,
117
- icon: Ft
122
+ ref,
123
+ icon: element$2
118
124
  }));
119
125
  });
120
- ee.displayName = "IncreaseSingle";
121
- var Vt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, $e = I(function(e, t) {
122
- return y(R, Object.assign({}, e, {
126
+ IncreaseSingle.displayName = "IncreaseSingle";
127
+ var element$1 = { 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" } }] }, MoreDownSingle = forwardRef(function(props, ref) {
128
+ return createElement(IconBase, Object.assign({}, props, {
123
129
  id: "more-down-single",
124
- ref: t,
125
- icon: Vt
130
+ ref,
131
+ icon: element$1
126
132
  }));
127
133
  });
128
- $e.displayName = "MoreDownSingle";
129
- var zt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Ae = I(function(e, t) {
130
- return y(R, Object.assign({}, e, {
134
+ MoreDownSingle.displayName = "MoreDownSingle";
135
+ var element = { 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" } }] }] }, SequenceSingle = forwardRef(function(props, ref) {
136
+ return createElement(IconBase, Object.assign({}, props, {
131
137
  id: "sequence-single",
132
- ref: t,
133
- icon: zt
138
+ ref,
139
+ icon: element
134
140
  }));
135
141
  });
136
- Ae.displayName = "SequenceSingle";
137
- var K = { exports: {} }, A = {};
138
- /**
139
- * @license React
140
- * react-jsx-runtime.production.min.js
141
- *
142
- * Copyright (c) Facebook, Inc. and its affiliates.
143
- *
144
- * This source code is licensed under the MIT license found in the
145
- * LICENSE file in the root directory of this source tree.
146
- */
147
- var xe;
148
- function Zt() {
149
- if (xe) return A;
150
- xe = 1;
151
- var e = It, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
152
- 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;
160
- }
161
- var Ie;
162
- function Gt() {
163
- return Ie || (Ie = 1, K.exports = Zt()), K.exports;
164
- }
165
- var i = Gt();
166
- const Wt = "univer-extend-confirm-content", qt = "univer-extend-confirm-radio-group", Yt = "univer-custom-sort-panel-container", Jt = "univer-custom-sort-panel-ext", Xt = "univer-add-condition", Kt = "univer-add-condition-text", Qt = "univer-add-condition-disable", en = "univer-custom-sort-panel-footer", tn = "univer-custom-sort-panel-footer-btn", nn = "univer-custom-sort-panel-item", rn = "univer-custom-sort-panel-item-head", on = "univer-custom-sort-panel-item-handler", sn = "univer-custom-sort-panel-item-remove", cn = "univer-custom-sort-panel-item-column-input", an = "univer-custom-sort-panel-item-column-input-dropdown", ln = "univer-custom-sort-panel-item-column-input-text", dn = "univer-custom-sort-panel-item-order-radio", un = "univer-custom-sort-panel-item-order-radio-cn", mn = "univer-condition-list", hn = "univer-embed-sort-btn-container", gn = "univer-embed-sort-btn", Cn = "univer-embed-sort-btn-asc", Sn = "univer-embed-sort-btn-desc", fn = "univer-embed-sort-btn-icon", pn = "univer-custom-sort-col-menu", vn = "univer-custom-sort-col-menu-item", _n = "univer-custom-sort-col-menu-item-desc", a = {
167
- extendConfirmContent: Wt,
168
- extendConfirmRadioGroup: qt,
169
- customSortPanelContainer: Yt,
170
- customSortPanelExt: Jt,
171
- addCondition: Xt,
172
- addConditionText: Kt,
173
- addConditionDisable: Qt,
174
- customSortPanelFooter: en,
175
- customSortPanelFooterBtn: tn,
176
- customSortPanelItem: nn,
177
- customSortPanelItemHead: rn,
178
- customSortPanelItemHandler: on,
179
- customSortPanelItemRemove: sn,
180
- customSortPanelItemColumnInput: cn,
181
- customSortPanelItemColumnInputDropdown: an,
182
- customSortPanelItemColumnInputText: ln,
183
- customSortPanelItemOrderRadio: dn,
184
- customSortPanelItemOrderRadioCn: un,
185
- conditionList: mn,
186
- embedSortBtnContainer: hn,
187
- embedSortBtn: gn,
188
- embedSortBtnAsc: Cn,
189
- embedSortBtnDesc: Sn,
190
- embedSortBtnIcon: fn,
191
- customSortColMenu: pn,
192
- customSortColMenuItem: vn,
193
- customSortColMenuItemDesc: _n
194
- }, xn = (e) => {
195
- const [t, n] = B("0"), r = O(H);
196
- return /* @__PURE__ */ i.jsxs("div", { className: a.extendConfirmContent, children: [
197
- /* @__PURE__ */ i.jsx("div", { className: "extend-confirm-desc", children: r.t("sheets-sort.dialog.sort-reminder-desc") }),
198
- /* @__PURE__ */ i.jsxs(
199
- Ne,
142
+ SequenceSingle.displayName = "SequenceSingle";
143
+ const extendConfirmContent = "univer-extend-confirm-content", extendConfirmRadioGroup = "univer-extend-confirm-radio-group", customSortPanelContainer = "univer-custom-sort-panel-container", customSortPanelExt = "univer-custom-sort-panel-ext", addCondition = "univer-add-condition", addConditionText = "univer-add-condition-text", addConditionDisable = "univer-add-condition-disable", customSortPanelFooter = "univer-custom-sort-panel-footer", customSortPanelFooterBtn = "univer-custom-sort-panel-footer-btn", customSortPanelItem = "univer-custom-sort-panel-item", customSortPanelItemHead = "univer-custom-sort-panel-item-head", customSortPanelItemHandler = "univer-custom-sort-panel-item-handler", customSortPanelItemRemove = "univer-custom-sort-panel-item-remove", customSortPanelItemColumnInput = "univer-custom-sort-panel-item-column-input", customSortPanelItemColumnInputDropdown = "univer-custom-sort-panel-item-column-input-dropdown", customSortPanelItemColumnInputText = "univer-custom-sort-panel-item-column-input-text", customSortPanelItemOrderRadio = "univer-custom-sort-panel-item-order-radio", customSortPanelItemOrderRadioCn = "univer-custom-sort-panel-item-order-radio-cn", conditionList = "univer-condition-list", embedSortBtnContainer = "univer-embed-sort-btn-container", embedSortBtn = "univer-embed-sort-btn", embedSortBtnAsc = "univer-embed-sort-btn-asc", embedSortBtnDesc = "univer-embed-sort-btn-desc", embedSortBtnIcon = "univer-embed-sort-btn-icon", customSortColMenu = "univer-custom-sort-col-menu", customSortColMenuItem = "univer-custom-sort-col-menu-item", customSortColMenuItemDesc = "univer-custom-sort-col-menu-item-desc", styles = {
144
+ extendConfirmContent,
145
+ extendConfirmRadioGroup,
146
+ customSortPanelContainer,
147
+ customSortPanelExt,
148
+ addCondition,
149
+ addConditionText,
150
+ addConditionDisable,
151
+ customSortPanelFooter,
152
+ customSortPanelFooterBtn,
153
+ customSortPanelItem,
154
+ customSortPanelItemHead,
155
+ customSortPanelItemHandler,
156
+ customSortPanelItemRemove,
157
+ customSortPanelItemColumnInput,
158
+ customSortPanelItemColumnInputDropdown,
159
+ customSortPanelItemColumnInputText,
160
+ customSortPanelItemOrderRadio,
161
+ customSortPanelItemOrderRadioCn,
162
+ conditionList,
163
+ embedSortBtnContainer,
164
+ embedSortBtn,
165
+ embedSortBtnAsc,
166
+ embedSortBtnDesc,
167
+ embedSortBtnIcon,
168
+ customSortColMenu,
169
+ customSortColMenuItem,
170
+ customSortColMenuItemDesc
171
+ }, ExtendConfirm = /* @__PURE__ */ __name((props) => {
172
+ const [extend, setExtend] = useState("0"), localeService = useDependency(LocaleService);
173
+ return /* @__PURE__ */ jsxs("div", { className: styles.extendConfirmContent, children: [
174
+ /* @__PURE__ */ jsx("div", { className: "extend-confirm-desc", children: localeService.t("sheets-sort.dialog.sort-reminder-desc") }),
175
+ /* @__PURE__ */ jsxs(
176
+ RadioGroup,
200
177
  {
201
- className: a.extendConfirmRadioGroup,
202
- value: t,
178
+ className: styles.extendConfirmRadioGroup,
179
+ value: extend,
203
180
  direction: "vertical",
204
- onChange: (o) => {
205
- n(o), e.onChange(o);
206
- },
181
+ onChange: /* @__PURE__ */ __name((value) => {
182
+ setExtend(value), props.onChange(value);
183
+ }, "onChange"),
207
184
  children: [
208
- /* @__PURE__ */ i.jsx(
209
- Z,
185
+ /* @__PURE__ */ jsx(
186
+ Radio,
210
187
  {
211
188
  value: "0",
212
- children: r.t("sheets-sort.dialog.sort-reminder-no")
189
+ children: localeService.t("sheets-sort.dialog.sort-reminder-no")
213
190
  }
214
191
  ),
215
- /* @__PURE__ */ i.jsx(Z, { value: "1", children: r.t("sheets-sort.dialog.sort-reminder-ext") })
192
+ /* @__PURE__ */ jsx(Radio, { value: "1", children: localeService.t("sheets-sort.dialog.sort-reminder-ext") })
216
193
  ]
217
194
  }
218
195
  )
219
196
  ] });
220
- };
221
- var In = Object.defineProperty, yn = Object.getOwnPropertyDescriptor, Rn = (e, t, n, r) => {
222
- for (var o = r > 1 ? void 0 : r ? yn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
223
- (c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
224
- return r && o && In(t, n, o), o;
225
- }, T = (e, t) => (n, r) => t(n, r, e);
226
- const z = {
197
+ }, "ExtendConfirm");
198
+ var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor, __decorateClass$2 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
199
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
200
+ (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
201
+ return kind && result && __defProp$2(target, key, result), result;
202
+ }, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$2");
203
+ const SORT_ERROR_MESSAGE = {
227
204
  MERGE_ERROR: "sheets-sort.error.merge-size",
228
205
  EMPTY_ERROR: "sheets-sort.error.empty",
229
206
  SINGLE_ERROR: "sheets-sort.error.single",
230
207
  FORMULA_ARRAY: "sheets-sort.error.formula-array"
231
208
  };
232
- let f = class extends Ye {
233
- constructor(t, n, r, o, s, c, l) {
209
+ var _a;
210
+ let SheetsSortUIService = (_a = class extends Disposable {
211
+ constructor(_univerInstanceService, _confirmService, _logService, _selectionManagerService, _sheetsSortService, _localeService, _commandService) {
234
212
  super();
235
- X(this, "_customSortState$", new _t(null));
236
- X(this, "customSortState$", this._customSortState$.asObservable());
237
- this._univerInstanceService = t, this._confirmService = n, this._logService = r, this._selectionManagerService = o, this._sheetsSortService = s, this._localeService = c, this._commandService = l;
213
+ __publicField(this, "_customSortState$", new BehaviorSubject(null));
214
+ __publicField(this, "customSortState$", this._customSortState$.asObservable());
215
+ this._univerInstanceService = _univerInstanceService, this._confirmService = _confirmService, this._logService = _logService, this._selectionManagerService = _selectionManagerService, this._sheetsSortService = _sheetsSortService, this._localeService = _localeService, this._commandService = _commandService;
238
216
  }
239
- async triggerSortDirectly(t, n, r) {
240
- const o = r || await this._detectSortLocation(n);
241
- if (!o || !this._check(o))
217
+ async triggerSortDirectly(asc, extend, sheetRangeLocation) {
218
+ const location = sheetRangeLocation || await this._detectSortLocation(extend);
219
+ if (!location || !this._check(location))
242
220
  return !1;
243
- const c = {
221
+ const sortOption = {
244
222
  orderRules: [{
245
- type: t ? k.ASC : k.DESC,
246
- colIndex: o.colIndex
223
+ type: asc ? SortType.ASC : SortType.DESC,
224
+ colIndex: location.colIndex
247
225
  }],
248
- range: o.range
226
+ range: location.range
249
227
  };
250
- return this._sheetsSortService.applySort(c, o.unitId, o.subUnitId), !0;
228
+ return this._sheetsSortService.applySort(sortOption, location.unitId, location.subUnitId), !0;
251
229
  }
252
230
  async triggerSortCustomize() {
253
- const t = await this._detectSortLocation();
254
- return !t || !this._check(t) ? !1 : (this.showCustomSortPanel(t), !0);
231
+ const location = await this._detectSortLocation();
232
+ return !location || !this._check(location) ? !1 : (this.showCustomSortPanel(location), !0);
255
233
  }
256
234
  customSortState() {
257
235
  return this._customSortState$.getValue();
258
236
  }
259
- getTitles(t) {
260
- var d, u;
261
- const n = (d = this.customSortState()) == null ? void 0 : d.location;
262
- if (!n)
237
+ getTitles(hasTitle) {
238
+ var _a4, _b;
239
+ const location = (_a4 = this.customSortState()) == null ? void 0 : _a4.location;
240
+ if (!location)
263
241
  return [];
264
- const { unitId: r, subUnitId: o, range: s } = n, c = (u = this._univerInstanceService.getUnit(r)) == null ? void 0 : u.getSheetBySheetId(o);
265
- if (!c)
242
+ const { unitId, subUnitId, range } = location, worksheet = (_b = this._univerInstanceService.getUnit(unitId)) == null ? void 0 : _b.getSheetBySheetId(subUnitId);
243
+ if (!worksheet)
266
244
  return [];
267
- const l = Mn(this._localeService);
245
+ const colTranslator = colIndexTranslator(this._localeService);
268
246
  return Array.from(
269
- { length: s.endColumn - s.startColumn + 1 },
270
- (h, g) => {
271
- var S;
272
- const p = (S = c.getCell(s.startRow, g + s.startColumn)) == null ? void 0 : S.v;
247
+ { length: range.endColumn - range.startColumn + 1 },
248
+ (_, i) => {
249
+ var _a5;
250
+ const cellValue = (_a5 = worksheet.getCell(range.startRow, i + range.startColumn)) == null ? void 0 : _a5.v;
273
251
  return {
274
- index: g + s.startColumn,
275
- label: t ? `${p != null ? p : l(g + s.startColumn)}` : l(g + s.startColumn)
252
+ index: i + range.startColumn,
253
+ label: hasTitle ? `${cellValue != null ? cellValue : colTranslator(i + range.startColumn)}` : colTranslator(i + range.startColumn)
276
254
  };
277
255
  }
278
256
  );
279
257
  }
280
- setSelection(t, n, r) {
281
- var c;
282
- const o = (c = this._univerInstanceService.getUnit(t)) == null ? void 0 : c.getSheetBySheetId(n);
283
- if (!o)
258
+ setSelection(unitId, subUnitId, range) {
259
+ var _a4;
260
+ const worksheet = (_a4 = this._univerInstanceService.getUnit(unitId)) == null ? void 0 : _a4.getSheetBySheetId(subUnitId);
261
+ if (!worksheet)
284
262
  return;
285
- const s = {
286
- unitId: t,
287
- subUnitId: n,
288
- selections: [{ range: r, primary: Rt(r, o), style: null }]
263
+ const setSelectionsOperationParams = {
264
+ unitId,
265
+ subUnitId,
266
+ selections: [{ range, primary: getPrimaryForRange(range, worksheet), style: null }]
289
267
  };
290
- this._commandService.executeCommand(Mt.id, s);
268
+ this._commandService.executeCommand(SetSelectionsOperation.id, setSelectionsOperationParams);
291
269
  }
292
- async showCheckError(t) {
270
+ async showCheckError(content) {
293
271
  return await this._confirmService.confirm({
294
272
  id: "sort-range-check-error",
295
273
  title: {
296
274
  title: this._localeService.t("info.tooltip")
297
275
  },
298
276
  children: {
299
- title: /* @__PURE__ */ i.jsx("div", { children: this._localeService.t(t) })
277
+ title: /* @__PURE__ */ jsx("div", { children: this._localeService.t(content) })
300
278
  }
301
279
  });
302
280
  }
303
281
  async showExtendConfirm() {
304
- let t = !1;
282
+ let shouldExtend = !1;
305
283
  return await this._confirmService.confirm({
306
284
  id: "extend-sort-range-dialog",
307
285
  title: {
308
286
  title: this._localeService.t("sheets-sort.dialog.sort-reminder")
309
287
  },
310
288
  children: {
311
- title: /* @__PURE__ */ i.jsx(
312
- xn,
289
+ title: /* @__PURE__ */ jsx(
290
+ ExtendConfirm,
313
291
  {
314
- onChange: (r) => {
315
- t = r === "1";
316
- }
292
+ onChange: /* @__PURE__ */ __name((value) => {
293
+ shouldExtend = value === "1";
294
+ }, "onChange")
317
295
  }
318
296
  )
319
297
  },
320
298
  width: 400
321
- }) ? t ? "extend" : "keep" : "cancel";
299
+ }) ? shouldExtend ? "extend" : "keep" : "cancel";
322
300
  }
323
- showCustomSortPanel(t) {
324
- this._customSortState$.next({ location: t, show: !0 });
301
+ showCustomSortPanel(location) {
302
+ this._customSortState$.next({ location, show: !0 });
325
303
  }
326
304
  closeCustomSortPanel() {
327
305
  this._customSortState$.next({ show: !1 });
328
306
  }
329
- _check(t) {
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);
307
+ _check(location) {
308
+ return this._sheetsSortService.singleCheck(location) ? this._sheetsSortService.mergeCheck(location) ? this._sheetsSortService.formulaCheck(location) ? this._sheetsSortService.emptyCheck(location) ? !0 : (this.showCheckError(SORT_ERROR_MESSAGE.EMPTY_ERROR), !1) : (this.showCheckError(SORT_ERROR_MESSAGE.FORMULA_ARRAY), !1) : (this.showCheckError(SORT_ERROR_MESSAGE.MERGE_ERROR), !1) : (this.showCheckError(SORT_ERROR_MESSAGE.SINGLE_ERROR), !1);
331
309
  }
332
- async _detectSortLocation(t) {
333
- const n = this._univerInstanceService.getCurrentUnitForType(q.UNIVER_SHEET), r = n.getActiveSheet(), o = n.getUnitId(), s = r.getSheetId(), c = this._selectionManagerService.getCurrentLastSelection();
334
- if (!c)
310
+ async _detectSortLocation(extend) {
311
+ const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), worksheet = workbook.getActiveSheet(), unitId = workbook.getUnitId(), subUnitId = worksheet.getSheetId(), selection = this._selectionManagerService.getCurrentLastSelection();
312
+ if (!selection)
335
313
  return null;
336
- let l;
337
- if (t === !0)
338
- l = pe(c.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, s, l);
339
- else if (t === !1)
340
- l = c.range;
314
+ let range;
315
+ if (extend === !0)
316
+ range = expandToContinuousRange(selection.range, { up: !0, down: !0, left: !0, right: !0 }, worksheet), this.setSelection(unitId, subUnitId, range);
317
+ else if (extend === !1)
318
+ range = selection.range;
341
319
  else {
342
- const d = await this.showExtendConfirm();
343
- if (d === "cancel")
320
+ const confirmRes = await this.showExtendConfirm();
321
+ if (confirmRes === "cancel")
344
322
  return null;
345
- d === "keep" ? l = c.range : (l = pe(c.range, { up: !0, down: !0, left: !0, right: !0 }, r), this.setSelection(o, s, l));
323
+ confirmRes === "keep" ? range = selection.range : (range = expandToContinuousRange(selection.range, { up: !0, down: !0, left: !0, right: !0 }, worksheet), this.setSelection(unitId, subUnitId, range));
346
324
  }
347
325
  return {
348
- range: l,
349
- unitId: o,
350
- subUnitId: s,
351
- colIndex: c.primary.actualColumn
326
+ range,
327
+ unitId,
328
+ subUnitId,
329
+ colIndex: selection.primary.actualColumn
352
330
  };
353
331
  }
354
- };
355
- f = Rn([
356
- T(0, Me),
357
- T(1, ut),
358
- T(2, Je),
359
- T(3, E(yt)),
360
- T(4, E(Oe)),
361
- T(5, E(H)),
362
- T(6, be)
363
- ], f);
364
- function Mn(e) {
365
- return (t) => {
366
- const n = Xe.chatAtABC(t);
367
- switch (e.getCurrentLocale()) {
368
- case Q.ZH_CN:
369
- return `"${n}"列`;
370
- case Q.EN_US:
371
- return `Column "${n}"`;
332
+ }, __name(_a, "SheetsSortUIService"), _a);
333
+ SheetsSortUIService = __decorateClass$2([
334
+ __decorateParam$2(0, IUniverInstanceService),
335
+ __decorateParam$2(1, IConfirmService),
336
+ __decorateParam$2(2, ILogService),
337
+ __decorateParam$2(3, Inject(SheetsSelectionsService)),
338
+ __decorateParam$2(4, Inject(SheetsSortService)),
339
+ __decorateParam$2(5, Inject(LocaleService)),
340
+ __decorateParam$2(6, ICommandService)
341
+ ], SheetsSortUIService);
342
+ function colIndexTranslator(localeService) {
343
+ return (colIndex) => {
344
+ const colName = Tools.chatAtABC(colIndex);
345
+ switch (localeService.getCurrentLocale()) {
346
+ case LocaleType.ZH_CN:
347
+ return `"${colName}"列`;
348
+ case LocaleType.EN_US:
349
+ return `Column "${colName}"`;
372
350
  default:
373
- return `Column "${n}"`;
351
+ return `Column "${colName}"`;
374
352
  }
375
353
  };
376
354
  }
377
- const re = {
355
+ __name(colIndexTranslator, "colIndexTranslator");
356
+ const SortRangeAscCommand = {
378
357
  id: "sheet.command.sort-range-asc",
379
- type: b.COMMAND,
380
- handler: async (e) => await e.get(f).triggerSortDirectly(!0, !1)
381
- }, oe = {
358
+ type: CommandType.COMMAND,
359
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !1), "handler")
360
+ }, SortRangeAscExtCommand = {
382
361
  id: "sheet.command.sort-range-asc-ext",
383
- type: b.COMMAND,
384
- handler: async (e) => await e.get(f).triggerSortDirectly(!0, !0)
385
- }, se = {
362
+ type: CommandType.COMMAND,
363
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !0), "handler")
364
+ }, SortRangeDescCommand = {
386
365
  id: "sheet.command.sort-range-desc",
387
- type: b.COMMAND,
388
- handler: async (e) => await e.get(f).triggerSortDirectly(!1, !1)
389
- }, ie = {
366
+ type: CommandType.COMMAND,
367
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !1), "handler")
368
+ }, SortRangeDescExtCommand = {
390
369
  id: "sheet.command.sort-range-desc-ext",
391
- type: b.COMMAND,
392
- handler: async (e) => await e.get(f).triggerSortDirectly(!1, !0)
393
- }, ce = {
370
+ type: CommandType.COMMAND,
371
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !0), "handler")
372
+ }, SortRangeCustomCommand = {
394
373
  id: "sheet.command.sort-range-custom",
395
- type: b.COMMAND,
396
- handler: async (e) => await e.get(f).triggerSortCustomize()
397
- }, ae = {
374
+ type: CommandType.COMMAND,
375
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortCustomize(), "handler")
376
+ }, SortRangeAscInCtxMenuCommand = {
398
377
  id: "sheet.command.sort-range-asc-ctx",
399
- type: b.COMMAND,
400
- handler: async (e) => await e.get(f).triggerSortDirectly(!0, !1)
401
- }, le = {
378
+ type: CommandType.COMMAND,
379
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !1), "handler")
380
+ }, SortRangeAscExtInCtxMenuCommand = {
402
381
  id: "sheet.command.sort-range-asc-ext-ctx",
403
- type: b.COMMAND,
404
- handler: async (e) => await e.get(f).triggerSortDirectly(!0, !0)
405
- }, de = {
382
+ type: CommandType.COMMAND,
383
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !0), "handler")
384
+ }, SortRangeDescInCtxMenuCommand = {
406
385
  id: "sheet.command.sort-range-desc-ctx",
407
- type: b.COMMAND,
408
- handler: async (e) => await e.get(f).triggerSortDirectly(!1, !1)
409
- }, ue = {
386
+ type: CommandType.COMMAND,
387
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !1), "handler")
388
+ }, SortRangeDescExtInCtxMenuCommand = {
410
389
  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 = {
390
+ type: CommandType.COMMAND,
391
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !0), "handler")
392
+ }, SortRangeCustomInCtxMenuCommand = {
414
393
  id: "sheet.command.sort-range-custom-ctx",
415
- type: b.COMMAND,
416
- handler: async (e) => await e.get(f).triggerSortCustomize()
394
+ type: CommandType.COMMAND,
395
+ handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortCustomize(), "handler")
417
396
  };
418
- function bn() {
419
- const e = O(f), t = O(Oe), n = O(H), [r, o] = B(!1), [s, c] = B(0), l = Pe(null), d = e.customSortState();
420
- if (!d || !d.location)
397
+ function CustomSortPanel() {
398
+ const sheetsSortUIService = useDependency(SheetsSortUIService), sheetsSortService = useDependency(SheetsSortService), localeService = useDependency(LocaleService), [hasTitle, setHasTitle] = useState(!1), [scrollPosition, setScrollPosition] = useState(0), listEndRef = useRef(null), state = sheetsSortUIService.customSortState();
399
+ if (!state || !state.location)
421
400
  return null;
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(
428
- Ke(() => {
429
- const m = [...S], x = On(u, S);
430
- x !== null && (m.push({ type: k.ASC, colIndex: x }), U(m));
401
+ const { range, unitId, subUnitId } = state.location, titles = sheetsSortUIService.getTitles(hasTitle), [list, setList] = useState([
402
+ { type: SortType.ASC, colIndex: range.startColumn }
403
+ ]), onItemChange = useCallback((index, value) => {
404
+ const newList = [...list];
405
+ value === null ? newList.splice(index, 1) : newList[index] = value, setList(newList);
406
+ }, [list]), newItem = useCallback(
407
+ throttle(() => {
408
+ const newList = [...list], nextColIndex = findNextColIndex(range, list);
409
+ nextColIndex !== null && (newList.push({ type: SortType.ASC, colIndex: nextColIndex }), setList(newList));
431
410
  }, 200),
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(() => {
436
- e.closeCustomSortPanel();
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
- we(() => {
441
- l.current && S.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
442
- }, [S]);
443
- const Ge = S.length < p.length, fe = S.map((m) => ({ ...m, id: `${m.colIndex}` }));
444
- return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContainer, children: [
445
- /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelContent, onMouseDown: (m) => {
446
- m.stopPropagation();
447
- }, children: [
448
- /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelExt, children: [
449
- /* @__PURE__ */ i.jsx("div", { className: a.firstRowCheck, children: /* @__PURE__ */ i.jsx(Et, { checked: r, onChange: (m) => Ze(!!m), children: n.t("sheets-sort.dialog.first-row-check") }) }),
450
- Ge ? /* @__PURE__ */ i.jsxs("div", { className: a.addCondition, onClick: V, children: [
451
- /* @__PURE__ */ i.jsx(ee, {}),
452
- /* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
453
- ] }) : /* @__PURE__ */ i.jsxs(
411
+ [list, range]
412
+ ), apply = useCallback((orderRules, hasTitle2) => {
413
+ sheetsSortService.applySort({ range, orderRules, hasTitle: hasTitle2 }), sheetsSortUIService.closeCustomSortPanel();
414
+ }, [sheetsSortService, sheetsSortUIService, range]), cancel = useCallback(() => {
415
+ sheetsSortUIService.closeCustomSortPanel();
416
+ }, [sheetsSortUIService]), setTitle = useCallback((value) => {
417
+ setHasTitle(value), value ? sheetsSortUIService.setSelection(unitId, subUnitId, { ...range, startRow: range.startRow + 1 }) : sheetsSortUIService.setSelection(unitId, subUnitId, range);
418
+ }, [sheetsSortUIService, range, subUnitId, unitId]);
419
+ useEffect(() => {
420
+ listEndRef.current && list.length > 5 && (listEndRef.current.scrollTop = listEndRef.current.scrollHeight);
421
+ }, [list]);
422
+ const canNew = list.length < titles.length, dragList = list.map((item) => ({ ...item, id: `${item.colIndex}` }));
423
+ return /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelContainer, children: [
424
+ /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelContent, onMouseDown: /* @__PURE__ */ __name((e) => {
425
+ e.stopPropagation();
426
+ }, "onMouseDown"), children: [
427
+ /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelExt, children: [
428
+ /* @__PURE__ */ jsx("div", { className: styles.firstRowCheck, children: /* @__PURE__ */ jsx(Checkbox, { checked: hasTitle, onChange: /* @__PURE__ */ __name((value) => setTitle(!!value), "onChange"), children: localeService.t("sheets-sort.dialog.first-row-check") }) }),
429
+ canNew ? /* @__PURE__ */ jsxs("div", { className: styles.addCondition, onClick: newItem, children: [
430
+ /* @__PURE__ */ jsx(IncreaseSingle, {}),
431
+ /* @__PURE__ */ jsx("span", { className: styles.addConditionText, children: localeService.t("sheets-sort.dialog.add-condition") })
432
+ ] }) : /* @__PURE__ */ jsxs(
454
433
  "div",
455
434
  {
456
435
  className: `
457
- ${a.addCondition}
458
- ${a.addConditionDisable}
436
+ ${styles.addCondition}
437
+ ${styles.addConditionDisable}
459
438
  `,
460
439
  children: [
461
- /* @__PURE__ */ i.jsx(ee, {}),
462
- /* @__PURE__ */ i.jsx("span", { className: a.addConditionText, children: n.t("sheets-sort.dialog.add-condition") })
440
+ /* @__PURE__ */ jsx(IncreaseSingle, {}),
441
+ /* @__PURE__ */ jsx("span", { className: styles.addConditionText, children: localeService.t("sheets-sort.dialog.add-condition") })
463
442
  ]
464
443
  }
465
444
  )
466
445
  ] }),
467
- /* @__PURE__ */ i.jsx(
446
+ /* @__PURE__ */ jsx(
468
447
  "div",
469
448
  {
470
- className: a.conditionList,
471
- onScroll: (m) => {
472
- const x = m.currentTarget.scrollTop;
473
- c(x);
474
- },
475
- ref: l,
476
- children: /* @__PURE__ */ i.jsx(
477
- Ot,
449
+ className: styles.conditionList,
450
+ onScroll: /* @__PURE__ */ __name((e) => {
451
+ const position = e.currentTarget.scrollTop;
452
+ setScrollPosition(position);
453
+ }, "onScroll"),
454
+ ref: listEndRef,
455
+ children: /* @__PURE__ */ jsx(
456
+ DraggableList,
478
457
  {
479
- list: fe,
480
- onListChange: U,
458
+ list: dragList,
459
+ onListChange: setList,
481
460
  idKey: "id",
482
- draggableHandle: `.${a.customSortPanelItemHandler}`,
483
- itemRender: (m) => /* @__PURE__ */ i.jsx(
484
- En,
461
+ draggableHandle: `.${styles.customSortPanelItemHandler}`,
462
+ itemRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ jsx(
463
+ SortOptionItem,
485
464
  {
486
- titles: p,
487
- list: fe,
488
- item: m,
489
- onChange: (x, $) => Y($, x),
490
- scrollPosition: s
465
+ titles,
466
+ list: dragList,
467
+ item,
468
+ onChange: /* @__PURE__ */ __name((value, index) => onItemChange(index, value), "onChange"),
469
+ scrollPosition
491
470
  }
492
- ),
471
+ ), "itemRender"),
493
472
  rowHeight: 32,
494
473
  margin: [0, 12]
495
474
  }
@@ -497,392 +476,411 @@ function bn() {
497
476
  }
498
477
  )
499
478
  ] }),
500
- /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelFooter, children: [
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") })
479
+ /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelFooter, children: [
480
+ /* @__PURE__ */ jsx(Button, { className: styles.customSortPanelFooterBtn, type: "default", onClick: /* @__PURE__ */ __name(() => cancel(), "onClick"), children: localeService.t("sheets-sort.dialog.cancel") }),
481
+ /* @__PURE__ */ jsx(Button, { className: styles.customSortPanelFooterBtn, type: "primary", onClick: /* @__PURE__ */ __name(() => apply(list, hasTitle), "onClick"), children: localeService.t("sheets-sort.dialog.confirm") })
503
482
  ] })
504
483
  ] });
505
484
  }
506
- function En(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);
512
- };
513
- we(() => {
514
- g(!1);
515
- }, [s]);
516
- const S = t.length > 1, U = (V = r.find((C) => C.index === n.colIndex)) == null ? void 0 : V.label, Y = c.getCurrentLocale() === Q.ZH_CN ? a.customSortPanelItemOrderRadioCn : a.customSortPanelItemOrderRadio;
517
- return /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItem, children: [
518
- /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemHead, children: [
519
- /* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemHandler, children: /* @__PURE__ */ i.jsx(Ae, {}) }),
520
- /* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemColumn, children: /* @__PURE__ */ i.jsx(
521
- Tt,
485
+ __name(CustomSortPanel, "CustomSortPanel");
486
+ function SortOptionItem(props) {
487
+ var _a4;
488
+ const { list, item, titles, onChange, scrollPosition } = props, localeService = useDependency(LocaleService), availableMenu = titles.filter((title) => !list.some((item2) => item2.colIndex === title.index) || title.index === item.colIndex), currentIndex = list.findIndex((listItem) => listItem.colIndex === item.colIndex), handleChangeColIndex = useCallback((menuItem) => {
489
+ onChange({ ...item, colIndex: menuItem.index }, currentIndex), setVisible(!1);
490
+ }, [currentIndex, item, onChange]), [visible, setVisible] = useState(!1), onVisibleChange = /* @__PURE__ */ __name((visible2) => {
491
+ setVisible(visible2);
492
+ }, "onVisibleChange");
493
+ useEffect(() => {
494
+ setVisible(!1);
495
+ }, [scrollPosition]);
496
+ const showDelete = list.length > 1, itemLabel = (_a4 = titles.find((title) => title.index === item.colIndex)) == null ? void 0 : _a4.label, radioClass = localeService.getCurrentLocale() === LocaleType.ZH_CN ? styles.customSortPanelItemOrderRadioCn : styles.customSortPanelItemOrderRadio;
497
+ return /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelItem, children: [
498
+ /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelItemHead, children: [
499
+ /* @__PURE__ */ jsx("div", { className: styles.customSortPanelItemHandler, children: /* @__PURE__ */ jsx(SequenceSingle, {}) }),
500
+ /* @__PURE__ */ jsx("div", { className: styles.customSortPanelItemColumn, children: /* @__PURE__ */ jsx(
501
+ DropdownLegacy,
522
502
  {
523
503
  placement: "bottomLeft",
524
504
  trigger: ["click"],
525
- visible: h,
526
- onVisibleChange: p,
527
- overlay: /* @__PURE__ */ i.jsx("ul", { className: a.customSortColMenu, children: l.map((C) => /* @__PURE__ */ i.jsxs(
505
+ visible,
506
+ onVisibleChange,
507
+ overlay: /* @__PURE__ */ jsx("ul", { className: styles.customSortColMenu, children: availableMenu.map((menuItem) => /* @__PURE__ */ jsxs(
528
508
  "li",
529
509
  {
530
- onClick: () => u(C),
531
- className: a.customSortColMenuItem,
510
+ onClick: /* @__PURE__ */ __name(() => handleChangeColIndex(menuItem), "onClick"),
511
+ className: styles.customSortColMenuItem,
532
512
  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(je, {}) })
513
+ /* @__PURE__ */ jsx("span", { className: styles.customSortColMenuItemDesc, children: menuItem.label }),
514
+ /* @__PURE__ */ jsx("span", { className: styles.customSortColMenuItemCheck, children: menuItem.index === item.colIndex && /* @__PURE__ */ jsx(CheckMarkSingle, {}) })
535
515
  ]
536
516
  },
537
- C.index
517
+ menuItem.index
538
518
  )) }),
539
- children: /* @__PURE__ */ i.jsxs("div", { className: a.customSortPanelItemColumnInput, children: [
540
- /* @__PURE__ */ i.jsx("span", { className: a.customSortPanelItemColumnInputText, children: U }),
541
- /* @__PURE__ */ i.jsx($e, { className: a.customSortPanelItemColumnInputDropdown })
519
+ children: /* @__PURE__ */ jsxs("div", { className: styles.customSortPanelItemColumnInput, children: [
520
+ /* @__PURE__ */ jsx("span", { className: styles.customSortPanelItemColumnInputText, children: itemLabel }),
521
+ /* @__PURE__ */ jsx(MoreDownSingle, { className: styles.customSortPanelItemColumnInputDropdown })
542
522
  ] })
543
523
  }
544
524
  ) })
545
525
  ] }),
546
- /* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemOrder, children: /* @__PURE__ */ i.jsxs(
547
- Ne,
526
+ /* @__PURE__ */ jsx("div", { className: styles.customSortPanelItemOrder, children: /* @__PURE__ */ jsxs(
527
+ RadioGroup,
548
528
  {
549
- className: Y,
550
- value: n.type,
551
- onChange: (C) => {
552
- o({ ...n, type: C }, d);
553
- },
529
+ className: radioClass,
530
+ value: item.type,
531
+ onChange: /* @__PURE__ */ __name((value) => {
532
+ onChange({ ...item, type: value }, currentIndex);
533
+ }, "onChange"),
554
534
  children: [
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") })
535
+ /* @__PURE__ */ jsx(Radio, { value: SortType.ASC, children: localeService.t("sheets-sort.general.sort-asc") }),
536
+ /* @__PURE__ */ jsx(Radio, { value: SortType.DESC, children: localeService.t("sheets-sort.general.sort-desc") })
557
537
  ]
558
538
  }
559
539
  ) }),
560
- /* @__PURE__ */ i.jsx("div", { className: a.customSortPanelItemRemove, children: S && /* @__PURE__ */ i.jsx(ke, { onClick: () => o(null, d) }) })
540
+ /* @__PURE__ */ jsx("div", { className: styles.customSortPanelItemRemove, children: showDelete && /* @__PURE__ */ jsx(DeleteEmptySingle, { onClick: /* @__PURE__ */ __name(() => onChange(null, currentIndex), "onClick") }) })
561
541
  ] });
562
542
  }
563
- function On(e, t) {
564
- const { startColumn: n, endColumn: r } = e, o = new Set(t.map((s) => s == null ? void 0 : s.colIndex));
565
- for (let s = n; s <= r; s++)
566
- if (!o.has(s))
567
- return s;
543
+ __name(SortOptionItem, "SortOptionItem");
544
+ function findNextColIndex(range, list) {
545
+ const { startColumn, endColumn } = range, used = new Set(list.map((item) => item == null ? void 0 : item.colIndex));
546
+ for (let i = startColumn; i <= endColumn; i++)
547
+ if (!used.has(i))
548
+ return i;
568
549
  return null;
569
550
  }
570
- function Tn(e) {
571
- const { range: t, colIndex: n, onClose: r } = e, o = O(f), s = O(Me), c = O(H), l = P((d) => {
572
- const { unitId: u, subUnitId: h } = bt(s) || {};
573
- 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 });
551
+ __name(findNextColIndex, "findNextColIndex");
552
+ function EmbedSortBtn(props) {
553
+ const { range, colIndex, onClose } = props, sheetsSortUIService = useDependency(SheetsSortUIService), univerInstanceService = useDependency(IUniverInstanceService), localeService = useDependency(LocaleService), apply = useCallback((asc) => {
554
+ const { unitId, subUnitId } = getSheetCommandTarget(univerInstanceService) || {};
555
+ if (range && unitId && subUnitId) {
556
+ const noTitleRange = { ...range, startRow: range.startRow + 1 };
557
+ sheetsSortUIService.triggerSortDirectly(asc, !1, { unitId, subUnitId, range: noTitleRange, colIndex });
576
558
  } else
577
- console.warn(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${h}, range: ${t}, colIndex: ${n}`);
578
- r();
579
- }, [t, n, o, s, r]);
580
- return /* @__PURE__ */ i.jsxs("div", { className: a.embedSortBtnContainer, children: [
581
- /* @__PURE__ */ i.jsxs(
559
+ console.warn(`Cannot find the target to sort. unitId: ${unitId}, subUnitId: ${subUnitId}, range: ${range}, colIndex: ${colIndex}`);
560
+ onClose();
561
+ }, [range, colIndex, sheetsSortUIService, univerInstanceService, onClose]);
562
+ return /* @__PURE__ */ jsxs("div", { className: styles.embedSortBtnContainer, children: [
563
+ /* @__PURE__ */ jsxs(
582
564
  "div",
583
565
  {
584
566
  className: `
585
- ${a.embedSortBtn}
586
- ${a.embedSortBtnAsc}
567
+ ${styles.embedSortBtn}
568
+ ${styles.embedSortBtnAsc}
587
569
  `,
588
- onClick: () => l(!0),
570
+ onClick: /* @__PURE__ */ __name(() => apply(!0), "onClick"),
589
571
  children: [
590
- /* @__PURE__ */ i.jsx(te, { className: a.embedSortBtnIcon }),
591
- c.t("sheets-sort.general.sort-asc")
572
+ /* @__PURE__ */ jsx(AscendingSingle, { className: styles.embedSortBtnIcon }),
573
+ localeService.t("sheets-sort.general.sort-asc")
592
574
  ]
593
575
  }
594
576
  ),
595
- /* @__PURE__ */ i.jsxs(
577
+ /* @__PURE__ */ jsxs(
596
578
  "div",
597
579
  {
598
580
  className: `
599
- ${a.embedSortBtn}
600
- ${a.embedSortBtnDesc}
581
+ ${styles.embedSortBtn}
582
+ ${styles.embedSortBtnDesc}
601
583
  `,
602
- onClick: () => l(!1),
584
+ onClick: /* @__PURE__ */ __name(() => apply(!1), "onClick"),
603
585
  children: [
604
- /* @__PURE__ */ i.jsx(ne, { className: a.embedSortBtnIcon }),
605
- c.t("sheets-sort.general.sort-desc")
586
+ /* @__PURE__ */ jsx(DescendingSingle, { className: styles.embedSortBtnIcon }),
587
+ localeService.t("sheets-sort.general.sort-desc")
606
588
  ]
607
589
  }
608
590
  )
609
591
  ] });
610
592
  }
611
- const Be = "sheet.menu.sheets-sort", Fe = "sheet.menu.sheets-sort-ctx", F = "AscendingSingle", he = "ExpandAscendingSingle", ge = "DescendingSingle", Ce = "ExpandDescendingSingle", Se = "CustomSortSingle";
612
- function Pn(e) {
593
+ __name(EmbedSortBtn, "EmbedSortBtn");
594
+ const SHEETS_SORT_MENU_ID = "sheet.menu.sheets-sort", SHEETS_SORT_CTX_MENU_ID = "sheet.menu.sheets-sort-ctx", SHEETS_SORT_ASC_ICON = "AscendingSingle", SHEETS_SORT_ASC_EXT_ICON = "ExpandAscendingSingle", SHEETS_SORT_DESC_ICON = "DescendingSingle", SHEETS_SORT_DESC_EXT_ICON = "ExpandDescendingSingle", SHEETS_SORT_CUSTOM_ICON = "CustomSortSingle";
595
+ function sortRangeMenuFactory(accessor) {
613
596
  return {
614
- id: Be,
615
- type: _.SUBITEMS,
616
- icon: F,
597
+ id: SHEETS_SORT_MENU_ID,
598
+ type: MenuItemType.SUBITEMS,
599
+ icon: SHEETS_SORT_ASC_ICON,
617
600
  tooltip: "sheets-sort.general.sort",
618
- hidden$: Te(e, q.UNIVER_SHEET),
619
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
601
+ hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
602
+ disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
620
603
  };
621
604
  }
622
- function wn(e) {
605
+ __name(sortRangeMenuFactory, "sortRangeMenuFactory");
606
+ function sortRangeAscMenuFactory(_accessor) {
623
607
  return {
624
- id: re.id,
625
- icon: F,
608
+ id: SortRangeAscCommand.id,
609
+ icon: SHEETS_SORT_ASC_ICON,
626
610
  title: "sheets-sort.general.sort-asc-cur",
627
- type: _.BUTTON,
628
- hidden$: at(e)
611
+ type: MenuItemType.BUTTON,
612
+ hidden$: getCurrentExclusiveRangeInterest$(_accessor)
629
613
  };
630
614
  }
631
- function Nn(e) {
615
+ __name(sortRangeAscMenuFactory, "sortRangeAscMenuFactory");
616
+ function sortRangeAscExtMenuFactory(_accessor) {
632
617
  return {
633
- id: oe.id,
618
+ id: SortRangeAscExtCommand.id,
634
619
  title: "sheets-sort.general.sort-asc-ext",
635
- icon: he,
636
- type: _.BUTTON
620
+ icon: SHEETS_SORT_ASC_EXT_ICON,
621
+ type: MenuItemType.BUTTON
637
622
  };
638
623
  }
639
- function Ln(e) {
624
+ __name(sortRangeAscExtMenuFactory, "sortRangeAscExtMenuFactory");
625
+ function sortRangeDescMenuFactory(_accessor) {
640
626
  return {
641
- id: se.id,
627
+ id: SortRangeDescCommand.id,
642
628
  title: "sheets-sort.general.sort-desc-cur",
643
- icon: ge,
644
- type: _.BUTTON
629
+ icon: SHEETS_SORT_DESC_ICON,
630
+ type: MenuItemType.BUTTON
645
631
  };
646
632
  }
647
- function jn(e) {
633
+ __name(sortRangeDescMenuFactory, "sortRangeDescMenuFactory");
634
+ function sortRangeDescExtMenuFactory(_accessor) {
648
635
  return {
649
- id: ie.id,
636
+ id: SortRangeDescExtCommand.id,
650
637
  title: "sheets-sort.general.sort-desc-ext",
651
- icon: Ce,
652
- type: _.BUTTON
638
+ icon: SHEETS_SORT_DESC_EXT_ICON,
639
+ type: MenuItemType.BUTTON
653
640
  };
654
641
  }
655
- function Dn(e) {
642
+ __name(sortRangeDescExtMenuFactory, "sortRangeDescExtMenuFactory");
643
+ function sortRangeCustomMenuFactory(_accessor) {
656
644
  return {
657
- id: ce.id,
645
+ id: SortRangeCustomCommand.id,
658
646
  title: "sheets-sort.general.sort-custom",
659
- type: _.BUTTON,
660
- icon: Se
647
+ type: MenuItemType.BUTTON,
648
+ icon: SHEETS_SORT_CUSTOM_ICON
661
649
  };
662
650
  }
663
- function kn(e) {
651
+ __name(sortRangeCustomMenuFactory, "sortRangeCustomMenuFactory");
652
+ function sortRangeCtxMenuFactory(accessor) {
664
653
  return {
665
- id: Fe,
654
+ id: SHEETS_SORT_CTX_MENU_ID,
666
655
  title: "sheets-sort.general.sort",
667
- type: _.SUBITEMS,
668
- icon: F,
669
- hidden$: Te(e, q.UNIVER_SHEET),
670
- disabled$: w(e, {
671
- workbookTypes: [N],
672
- worksheetTypes: [L, j],
673
- rangeTypes: [D]
656
+ type: MenuItemType.SUBITEMS,
657
+ icon: SHEETS_SORT_ASC_ICON,
658
+ hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
659
+ disabled$: getCurrentRangeDisable$(accessor, {
660
+ workbookTypes: [WorkbookEditablePermission],
661
+ worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission],
662
+ rangeTypes: [RangeProtectionPermissionEditPoint]
674
663
  })
675
664
  };
676
665
  }
677
- function Hn(e) {
666
+ __name(sortRangeCtxMenuFactory, "sortRangeCtxMenuFactory");
667
+ function sortRangeAscCtxMenuFactory(_accessor) {
678
668
  return {
679
- id: ae.id,
669
+ id: SortRangeAscInCtxMenuCommand.id,
680
670
  title: "sheets-sort.general.sort-asc-cur",
681
- type: _.BUTTON,
682
- icon: F,
683
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
671
+ type: MenuItemType.BUTTON,
672
+ icon: SHEETS_SORT_ASC_ICON,
673
+ disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
684
674
  };
685
675
  }
686
- function Un(e) {
676
+ __name(sortRangeAscCtxMenuFactory, "sortRangeAscCtxMenuFactory");
677
+ function sortRangeAscExtCtxMenuFactory(_accessor) {
687
678
  return {
688
- id: le.id,
679
+ id: SortRangeAscExtInCtxMenuCommand.id,
689
680
  title: "sheets-sort.general.sort-asc-ext",
690
- type: _.BUTTON,
691
- icon: he,
692
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
681
+ type: MenuItemType.BUTTON,
682
+ icon: SHEETS_SORT_ASC_EXT_ICON,
683
+ disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
693
684
  };
694
685
  }
695
- function $n(e) {
686
+ __name(sortRangeAscExtCtxMenuFactory, "sortRangeAscExtCtxMenuFactory");
687
+ function sortRangeDescCtxMenuFactory(_accessor) {
696
688
  return {
697
- id: de.id,
689
+ id: SortRangeDescInCtxMenuCommand.id,
698
690
  title: "sheets-sort.general.sort-desc-cur",
699
- type: _.BUTTON,
700
- icon: ge,
701
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
691
+ type: MenuItemType.BUTTON,
692
+ icon: SHEETS_SORT_DESC_ICON,
693
+ disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
702
694
  };
703
695
  }
704
- function An(e) {
696
+ __name(sortRangeDescCtxMenuFactory, "sortRangeDescCtxMenuFactory");
697
+ function sortRangeDescExtCtxMenuFactory(_accessor) {
705
698
  return {
706
- id: ue.id,
699
+ id: SortRangeDescExtInCtxMenuCommand.id,
707
700
  title: "sheets-sort.general.sort-desc-ext",
708
- type: _.BUTTON,
709
- icon: Ce,
710
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
701
+ type: MenuItemType.BUTTON,
702
+ icon: SHEETS_SORT_DESC_EXT_ICON,
703
+ disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
711
704
  };
712
705
  }
713
- function Bn(e) {
706
+ __name(sortRangeDescExtCtxMenuFactory, "sortRangeDescExtCtxMenuFactory");
707
+ function sortRangeCustomCtxMenuFactory(_accessor) {
714
708
  return {
715
- id: me.id,
709
+ id: SortRangeCustomInCtxMenuCommand.id,
716
710
  title: "sheets-sort.general.sort-custom",
717
- type: _.BUTTON,
718
- icon: Se,
719
- disabled$: w(e, { workbookTypes: [N], worksheetTypes: [L, j], rangeTypes: [D] })
711
+ type: MenuItemType.BUTTON,
712
+ icon: SHEETS_SORT_CUSTOM_ICON,
713
+ disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
720
714
  };
721
715
  }
722
- const Fn = {
723
- [mt.FORMULAS_INSERT]: {
724
- [Be]: {
716
+ __name(sortRangeCustomCtxMenuFactory, "sortRangeCustomCtxMenuFactory");
717
+ const menuSchema = {
718
+ [RibbonStartGroup.FORMULAS_INSERT]: {
719
+ [SHEETS_SORT_MENU_ID]: {
725
720
  order: 2,
726
- menuItemFactory: Pn,
727
- [re.id]: {
721
+ menuItemFactory: sortRangeMenuFactory,
722
+ [SortRangeAscCommand.id]: {
728
723
  order: 0,
729
- menuItemFactory: wn
724
+ menuItemFactory: sortRangeAscMenuFactory
730
725
  },
731
- [oe.id]: {
726
+ [SortRangeAscExtCommand.id]: {
732
727
  order: 1,
733
- menuItemFactory: Nn
728
+ menuItemFactory: sortRangeAscExtMenuFactory
734
729
  },
735
- [se.id]: {
730
+ [SortRangeDescCommand.id]: {
736
731
  order: 2,
737
- menuItemFactory: Ln
732
+ menuItemFactory: sortRangeDescMenuFactory
738
733
  },
739
- [ie.id]: {
734
+ [SortRangeDescExtCommand.id]: {
740
735
  order: 3,
741
- menuItemFactory: jn
736
+ menuItemFactory: sortRangeDescExtMenuFactory
742
737
  },
743
- [ce.id]: {
738
+ [SortRangeCustomCommand.id]: {
744
739
  order: 4,
745
- menuItemFactory: Dn
740
+ menuItemFactory: sortRangeCustomMenuFactory
746
741
  }
747
742
  }
748
743
  },
749
- [ht.MAIN_AREA]: {
750
- [gt.DATA]: {
751
- [Fe]: {
744
+ [ContextMenuPosition.MAIN_AREA]: {
745
+ [ContextMenuGroup.DATA]: {
746
+ [SHEETS_SORT_CTX_MENU_ID]: {
752
747
  order: 0,
753
- menuItemFactory: kn,
754
- [ae.id]: {
748
+ menuItemFactory: sortRangeCtxMenuFactory,
749
+ [SortRangeAscInCtxMenuCommand.id]: {
755
750
  order: 0,
756
- menuItemFactory: Hn
751
+ menuItemFactory: sortRangeAscCtxMenuFactory
757
752
  },
758
- [le.id]: {
753
+ [SortRangeAscExtInCtxMenuCommand.id]: {
759
754
  order: 1,
760
- menuItemFactory: Un
755
+ menuItemFactory: sortRangeAscExtCtxMenuFactory
761
756
  },
762
- [de.id]: {
757
+ [SortRangeDescInCtxMenuCommand.id]: {
763
758
  order: 2,
764
- menuItemFactory: $n
759
+ menuItemFactory: sortRangeDescCtxMenuFactory
765
760
  },
766
- [ue.id]: {
761
+ [SortRangeDescExtInCtxMenuCommand.id]: {
767
762
  order: 3,
768
- menuItemFactory: An
763
+ menuItemFactory: sortRangeDescExtCtxMenuFactory
769
764
  },
770
- [me.id]: {
765
+ [SortRangeCustomInCtxMenuCommand.id]: {
771
766
  order: 4,
772
- menuItemFactory: Bn
767
+ menuItemFactory: sortRangeCustomCtxMenuFactory
773
768
  }
774
769
  }
775
770
  }
776
771
  }
777
772
  };
778
- var Vn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Zn = (e, t, n, r) => {
779
- for (var o = r > 1 ? void 0 : r ? zn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
780
- (c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
781
- return r && o && Vn(t, n, o), o;
782
- }, M = (e, t) => (n, r) => t(n, r, e);
783
- const ye = "custom-sort-dialog", Gn = 560;
784
- let G = class extends Qe {
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();
773
+ var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
774
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
775
+ (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
776
+ return kind && result && __defProp$1(target, key, result), result;
777
+ }, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$1");
778
+ const CUSTOM_SORT_DIALOG_ID = "custom-sort-dialog", CUSTOM_SORT_PANEL_WIDTH = 560;
779
+ var _a2;
780
+ let SheetsSortUIController = (_a2 = class extends RxDisposable {
781
+ constructor(_commandService, _menuManagerService, _dialogService, _layoutService, _uiPartsService, _sheetRenderService, _localeService, _sheetsSortUIService, _injector, _componentManager) {
782
+ super(), this._commandService = _commandService, this._menuManagerService = _menuManagerService, this._dialogService = _dialogService, this._layoutService = _layoutService, this._uiPartsService = _uiPartsService, this._sheetRenderService = _sheetRenderService, this._localeService = _localeService, this._sheetsSortUIService = _sheetsSortUIService, this._injector = _injector, this._componentManager = _componentManager, this._initCommands(), this._initMenu(), this._initUI();
787
783
  }
788
784
  _initMenu() {
789
- this._menuManagerService.mergeMenu(Fn);
785
+ this._menuManagerService.mergeMenu(menuSchema);
790
786
  }
791
787
  _initCommands() {
792
788
  [
793
- re,
794
- oe,
795
- se,
796
- ie,
797
- ce,
798
- ae,
799
- le,
800
- de,
801
- ue,
802
- me
803
- ].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(st.id));
789
+ SortRangeAscCommand,
790
+ SortRangeAscExtCommand,
791
+ SortRangeDescCommand,
792
+ SortRangeDescExtCommand,
793
+ SortRangeCustomCommand,
794
+ SortRangeAscInCtxMenuCommand,
795
+ SortRangeAscExtInCtxMenuCommand,
796
+ SortRangeDescInCtxMenuCommand,
797
+ SortRangeDescExtInCtxMenuCommand,
798
+ SortRangeCustomInCtxMenuCommand
799
+ ].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(SortRangeCommand.id));
804
800
  }
805
801
  _initUI() {
806
- this.disposeWithMe(this._componentManager.register("CustomSortPanel", bn)), this.disposeWithMe(this._uiPartsService.registerComponent(dt.FILTER_PANEL_EMBED_POINT, () => et(Tn, this._injector))), this.disposeWithMe(this._componentManager.register(F, te)), this.disposeWithMe(this._componentManager.register(he, He)), this.disposeWithMe(this._componentManager.register(ge, ne)), this.disposeWithMe(this._componentManager.register(Ce, Ue)), this.disposeWithMe(this._componentManager.register(Se, De)), this._sheetsSortUIService.customSortState$.pipe(xt(this.dispose$)).subscribe((e) => {
807
- e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
802
+ this.disposeWithMe(this._componentManager.register("CustomSortPanel", CustomSortPanel)), this.disposeWithMe(this._uiPartsService.registerComponent(SheetsUIPart.FILTER_PANEL_EMBED_POINT, () => connectInjector(EmbedSortBtn, this._injector))), this.disposeWithMe(this._componentManager.register(SHEETS_SORT_ASC_ICON, AscendingSingle)), this.disposeWithMe(this._componentManager.register(SHEETS_SORT_ASC_EXT_ICON, ExpandAscendingSingle)), this.disposeWithMe(this._componentManager.register(SHEETS_SORT_DESC_ICON, DescendingSingle)), this.disposeWithMe(this._componentManager.register(SHEETS_SORT_DESC_EXT_ICON, ExpandDescendingSingle)), this.disposeWithMe(this._componentManager.register(SHEETS_SORT_CUSTOM_ICON, CustomSortSingle)), this._sheetsSortUIService.customSortState$.pipe(takeUntil(this.dispose$)).subscribe((newState) => {
803
+ newState && newState.show && newState.location ? this._openCustomSortPanel(newState.location) : newState && !(newState != null && newState.show) && this._closePanel();
808
804
  });
809
805
  }
810
- _openCustomSortPanel(e) {
806
+ _openCustomSortPanel(location) {
811
807
  this._dialogService.open({
812
- id: ye,
808
+ id: CUSTOM_SORT_DIALOG_ID,
813
809
  draggable: !0,
814
- width: Gn,
815
- title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${ct(e.range)}` },
810
+ width: CUSTOM_SORT_PANEL_WIDTH,
811
+ title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${serializeRange(location.range)}` },
816
812
  children: { label: "CustomSortPanel" },
817
813
  destroyOnClose: !0,
818
- defaultPosition: Wn(),
814
+ defaultPosition: getCustomSortDialogDefaultPosition(),
819
815
  preservePositionOnDestroy: !1,
820
- onClose: () => this._closePanel(),
816
+ onClose: /* @__PURE__ */ __name(() => this._closePanel(), "onClose"),
821
817
  mask: !0
822
818
  });
823
819
  }
824
820
  _closePanel() {
825
- this._dialogService.close(ye), queueMicrotask(() => this._layoutService.focus());
821
+ this._dialogService.close(CUSTOM_SORT_DIALOG_ID), queueMicrotask(() => this._layoutService.focus());
826
822
  }
827
- };
828
- G = Zn([
829
- M(0, be),
830
- M(1, St),
831
- M(2, ft),
832
- M(3, pt),
833
- M(4, vt),
834
- M(5, E(lt)),
835
- M(6, E(H)),
836
- M(7, E(f)),
837
- M(8, E(Ee)),
838
- M(9, E(Ct))
839
- ], G);
840
- function Wn() {
823
+ }, __name(_a2, "SheetsSortUIController"), _a2);
824
+ SheetsSortUIController = __decorateClass$1([
825
+ __decorateParam$1(0, ICommandService),
826
+ __decorateParam$1(1, IMenuManagerService),
827
+ __decorateParam$1(2, IDialogService),
828
+ __decorateParam$1(3, ILayoutService),
829
+ __decorateParam$1(4, IUIPartsService),
830
+ __decorateParam$1(5, Inject(SheetsRenderService)),
831
+ __decorateParam$1(6, Inject(LocaleService)),
832
+ __decorateParam$1(7, Inject(SheetsSortUIService)),
833
+ __decorateParam$1(8, Inject(Injector)),
834
+ __decorateParam$1(9, Inject(ComponentManager))
835
+ ], SheetsSortUIController);
836
+ function getCustomSortDialogDefaultPosition() {
841
837
  return { x: 0, y: 0 };
842
838
  }
843
- var Ve = Object.defineProperty, qn = Object.getOwnPropertyDescriptor, Yn = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jn = (e, t, n, r) => {
844
- for (var o = r > 1 ? void 0 : r ? qn(t, n) : t, s = e.length - 1, c; s >= 0; s--)
845
- (c = e[s]) && (o = (r ? c(t, n, o) : c(o)) || o);
846
- return r && o && Ve(t, n, o), o;
847
- }, Re = (e, t) => (n, r) => t(n, r, e), ze = (e, t, n) => Yn(e, typeof t != "symbol" ? t + "" : t, n);
848
- const Xn = "SHEET_SORT_UI_PLUGIN";
849
- let W = class extends nt {
850
- constructor(e = _e, t, n) {
851
- super(), this._config = e, this._injector = t, this._configService = n;
852
- const { ...r } = rt(
839
+ __name(getCustomSortDialogDefaultPosition, "getCustomSortDialogDefaultPosition");
840
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __defNormalProp2 = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, "__defNormalProp"), __decorateClass = /* @__PURE__ */ __name((decorators, target, key, kind) => {
841
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
842
+ (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
843
+ return kind && result && __defProp2(target, key, result), result;
844
+ }, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam"), __publicField2 = /* @__PURE__ */ __name((obj, key, value) => __defNormalProp2(obj, typeof key != "symbol" ? key + "" : key, value), "__publicField");
845
+ const NAME = "SHEET_SORT_UI_PLUGIN";
846
+ var _a3;
847
+ let UniverSheetsSortUIPlugin = (_a3 = class extends Plugin {
848
+ constructor(_config = defaultPluginConfig, _injector, _configService) {
849
+ super(), this._config = _config, this._injector = _injector, this._configService = _configService;
850
+ const { ...rest } = merge(
853
851
  {},
854
- _e,
852
+ defaultPluginConfig,
855
853
  this._config
856
854
  );
857
- this._configService.setConfig(Pt, r);
855
+ this._configService.setConfig(SHEETS_SORT_UI_PLUGIN_CONFIG_KEY, rest);
858
856
  }
859
857
  onStarting() {
860
858
  [
861
- [f],
862
- [G]
863
- ].forEach((e) => this._injector.add(e));
859
+ [SheetsSortUIService],
860
+ [SheetsSortUIController]
861
+ ].forEach((d) => this._injector.add(d));
864
862
  }
865
863
  onRendered() {
866
- this._injector.get(G);
864
+ this._injector.get(SheetsSortUIController);
867
865
  }
868
- };
869
- ze(W, "type", q.UNIVER_SHEET);
870
- ze(W, "pluginName", Xn);
871
- W = Jn([
872
- tt(it),
873
- Re(1, E(Ee)),
874
- Re(2, ot)
875
- ], W);
866
+ }, __name(_a3, "UniverSheetsSortUIPlugin"), _a3);
867
+ __publicField2(UniverSheetsSortUIPlugin, "type", UniverInstanceType.UNIVER_SHEET);
868
+ __publicField2(UniverSheetsSortUIPlugin, "pluginName", NAME);
869
+ UniverSheetsSortUIPlugin = __decorateClass([
870
+ DependentOn(UniverSheetsSortPlugin),
871
+ __decorateParam(1, Inject(Injector)),
872
+ __decorateParam(2, IConfigService)
873
+ ], UniverSheetsSortUIPlugin);
876
874
  export {
877
- re as SortRangeAscCommand,
878
- oe as SortRangeAscExtCommand,
879
- le as SortRangeAscExtInCtxMenuCommand,
880
- ae as SortRangeAscInCtxMenuCommand,
881
- ce as SortRangeCustomCommand,
882
- me as SortRangeCustomInCtxMenuCommand,
883
- se as SortRangeDescCommand,
884
- ie as SortRangeDescExtCommand,
885
- ue as SortRangeDescExtInCtxMenuCommand,
886
- de as SortRangeDescInCtxMenuCommand,
887
- W as UniverSheetsSortUIPlugin
875
+ SortRangeAscCommand,
876
+ SortRangeAscExtCommand,
877
+ SortRangeAscExtInCtxMenuCommand,
878
+ SortRangeAscInCtxMenuCommand,
879
+ SortRangeCustomCommand,
880
+ SortRangeCustomInCtxMenuCommand,
881
+ SortRangeDescCommand,
882
+ SortRangeDescExtCommand,
883
+ SortRangeDescExtInCtxMenuCommand,
884
+ SortRangeDescInCtxMenuCommand,
885
+ UniverSheetsSortUIPlugin
888
886
  };