@univerjs/sheets-sort-ui 0.3.0-alpha.0 → 0.3.0-nightly.202410101606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -805
- package/lib/types/controllers/sheets-sort-ui.controller.d.ts +1 -1
- package/lib/types/plugin.d.ts +2 -1
- package/lib/types/services/sheets-sort-ui.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +16 -16
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,805 +1 @@
|
|
|
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, OnLifecycle, LifecycleStages, Inject, Disposable, UniverInstanceType, IUniverInstanceService, ILogService, ICommandService, Tools, LocaleType, CommandType, throttle, Injector, RxDisposable, connectInjector, DependentOn, Plugin, IConfigService } from "@univerjs/core";
|
|
6
|
-
import { SheetsSortService, SortType, SortRangeCommand, UniverSheetsSortPlugin } from "@univerjs/sheets-sort";
|
|
7
|
-
import { SheetsSelectionsService, getPrimaryForRange, SetSelectionsOperation, expandToContinuousRange, getSheetCommandTarget, WorkbookEditablePermission, WorksheetSortPermission, WorksheetEditPermission, RangeProtectionPermissionEditPoint } from "@univerjs/sheets";
|
|
8
|
-
import React, { useState, forwardRef, useRef, createElement, useCallback, useEffect } from "react";
|
|
9
|
-
import { IConfirmService, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, ContextMenuPosition, ContextMenuGroup, ComponentManager, IMenuManagerService, IDialogService, ILayoutService, IUIPartsService } from "@univerjs/ui";
|
|
10
|
-
import { BehaviorSubject, takeUntil } from "rxjs";
|
|
11
|
-
import { RadioGroup, Radio, Checkbox, DraggableList, Button, Dropdown } from "@univerjs/design";
|
|
12
|
-
import { serializeRange } from "@univerjs/engine-formula";
|
|
13
|
-
import { getCurrentRangeDisable$, getCurrentExclusiveRangeInterest$, SheetsRenderService, SheetsUIPart } from "@univerjs/sheets-ui";
|
|
14
|
-
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 = {
|
|
15
|
-
extendConfirmContent,
|
|
16
|
-
extendConfirmRadioGroup,
|
|
17
|
-
customSortPanelContainer,
|
|
18
|
-
customSortPanelExt,
|
|
19
|
-
addCondition,
|
|
20
|
-
addConditionText,
|
|
21
|
-
addConditionDisable,
|
|
22
|
-
customSortPanelFooter,
|
|
23
|
-
customSortPanelFooterBtn,
|
|
24
|
-
customSortPanelItem,
|
|
25
|
-
customSortPanelItemHead,
|
|
26
|
-
customSortPanelItemHandler,
|
|
27
|
-
customSortPanelItemRemove,
|
|
28
|
-
customSortPanelItemColumnInput,
|
|
29
|
-
customSortPanelItemColumnInputDropdown,
|
|
30
|
-
customSortPanelItemColumnInputText,
|
|
31
|
-
customSortPanelItemOrderRadio,
|
|
32
|
-
customSortPanelItemOrderRadioCn,
|
|
33
|
-
conditionList,
|
|
34
|
-
embedSortBtnContainer,
|
|
35
|
-
embedSortBtn,
|
|
36
|
-
embedSortBtnAsc,
|
|
37
|
-
embedSortBtnDesc,
|
|
38
|
-
embedSortBtnIcon,
|
|
39
|
-
customSortColMenu,
|
|
40
|
-
customSortColMenuItem,
|
|
41
|
-
customSortColMenuItemDesc
|
|
42
|
-
}, ExtendConfirm = /* @__PURE__ */ __name((props) => {
|
|
43
|
-
const [extend, setExtend] = useState("0"), localeService = useDependency(LocaleService);
|
|
44
|
-
return /* @__PURE__ */ React.createElement("div", { className: styles.extendConfirmContent }, /* @__PURE__ */ React.createElement("div", { className: "extend-confirm-desc" }, localeService.t("sheets-sort.dialog.sort-reminder-desc")), /* @__PURE__ */ React.createElement(
|
|
45
|
-
RadioGroup,
|
|
46
|
-
{
|
|
47
|
-
className: styles.extendConfirmRadioGroup,
|
|
48
|
-
value: extend,
|
|
49
|
-
direction: "vertical",
|
|
50
|
-
onChange: /* @__PURE__ */ __name((value) => {
|
|
51
|
-
setExtend(value), props.onChange(value);
|
|
52
|
-
}, "onChange")
|
|
53
|
-
},
|
|
54
|
-
/* @__PURE__ */ React.createElement(
|
|
55
|
-
Radio,
|
|
56
|
-
{
|
|
57
|
-
value: "0"
|
|
58
|
-
},
|
|
59
|
-
localeService.t("sheets-sort.dialog.sort-reminder-no")
|
|
60
|
-
),
|
|
61
|
-
/* @__PURE__ */ React.createElement(Radio, { value: "1" }, localeService.t("sheets-sort.dialog.sort-reminder-ext"))
|
|
62
|
-
));
|
|
63
|
-
}, "ExtendConfirm");
|
|
64
|
-
var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor, __decorateClass$2 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
65
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
66
|
-
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
67
|
-
return kind && result && __defProp$2(target, key, result), result;
|
|
68
|
-
}, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$2");
|
|
69
|
-
const SORT_ERROR_MESSAGE = {
|
|
70
|
-
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
71
|
-
EMPTY_ERROR: "sheets-sort.error.empty",
|
|
72
|
-
SINGLE_ERROR: "sheets-sort.error.single",
|
|
73
|
-
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
74
|
-
};
|
|
75
|
-
var _a;
|
|
76
|
-
let SheetsSortUIService = (_a = class extends Disposable {
|
|
77
|
-
constructor(_univerInstanceService, _confirmService, _logService, _selectionManagerService, _sheetsSortService, _localeService, _commandService) {
|
|
78
|
-
super();
|
|
79
|
-
__publicField(this, "_customSortState$", new BehaviorSubject(null));
|
|
80
|
-
__publicField(this, "customSortState$", this._customSortState$.asObservable());
|
|
81
|
-
this._univerInstanceService = _univerInstanceService, this._confirmService = _confirmService, this._logService = _logService, this._selectionManagerService = _selectionManagerService, this._sheetsSortService = _sheetsSortService, this._localeService = _localeService, this._commandService = _commandService;
|
|
82
|
-
}
|
|
83
|
-
async triggerSortDirectly(asc, extend, sheetRangeLocation) {
|
|
84
|
-
const location = sheetRangeLocation || await this._detectSortLocation(extend);
|
|
85
|
-
if (!location || !this._check(location))
|
|
86
|
-
return !1;
|
|
87
|
-
const sortOption = {
|
|
88
|
-
orderRules: [{
|
|
89
|
-
type: asc ? SortType.ASC : SortType.DESC,
|
|
90
|
-
colIndex: location.colIndex
|
|
91
|
-
}],
|
|
92
|
-
range: location.range
|
|
93
|
-
};
|
|
94
|
-
return this._sheetsSortService.applySort(sortOption, location.unitId, location.subUnitId), !0;
|
|
95
|
-
}
|
|
96
|
-
async triggerSortCustomize() {
|
|
97
|
-
const location = await this._detectSortLocation();
|
|
98
|
-
return !location || !this._check(location) ? !1 : (this.showCustomSortPanel(location), !0);
|
|
99
|
-
}
|
|
100
|
-
customSortState() {
|
|
101
|
-
return this._customSortState$.getValue();
|
|
102
|
-
}
|
|
103
|
-
getTitles(hasTitle) {
|
|
104
|
-
var _a4, _b;
|
|
105
|
-
const location = (_a4 = this.customSortState()) == null ? void 0 : _a4.location;
|
|
106
|
-
if (!location)
|
|
107
|
-
return [];
|
|
108
|
-
const { unitId, subUnitId, range } = location, worksheet = (_b = this._univerInstanceService.getUnit(unitId)) == null ? void 0 : _b.getSheetBySheetId(subUnitId);
|
|
109
|
-
if (!worksheet)
|
|
110
|
-
return [];
|
|
111
|
-
const colTranslator = colIndexTranslator(this._localeService);
|
|
112
|
-
return Array.from(
|
|
113
|
-
{ length: range.endColumn - range.startColumn + 1 },
|
|
114
|
-
(_, i) => {
|
|
115
|
-
var _a5;
|
|
116
|
-
const cellValue = (_a5 = worksheet.getCell(range.startRow, i + range.startColumn)) == null ? void 0 : _a5.v;
|
|
117
|
-
return {
|
|
118
|
-
index: i + range.startColumn,
|
|
119
|
-
label: hasTitle ? `${cellValue != null ? cellValue : colTranslator(i + range.startColumn)}` : colTranslator(i + range.startColumn)
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
setSelection(unitId, subUnitId, range) {
|
|
125
|
-
var _a4;
|
|
126
|
-
const worksheet = (_a4 = this._univerInstanceService.getUnit(unitId)) == null ? void 0 : _a4.getSheetBySheetId(subUnitId);
|
|
127
|
-
if (!worksheet)
|
|
128
|
-
return;
|
|
129
|
-
const setSelectionsOperationParams = {
|
|
130
|
-
unitId,
|
|
131
|
-
subUnitId,
|
|
132
|
-
selections: [{ range, primary: getPrimaryForRange(range, worksheet), style: null }]
|
|
133
|
-
};
|
|
134
|
-
this._commandService.executeCommand(SetSelectionsOperation.id, setSelectionsOperationParams);
|
|
135
|
-
}
|
|
136
|
-
async showCheckError(content) {
|
|
137
|
-
return await this._confirmService.confirm({
|
|
138
|
-
id: "sort-range-check-error",
|
|
139
|
-
title: {
|
|
140
|
-
title: this._localeService.t("info.tooltip")
|
|
141
|
-
},
|
|
142
|
-
children: {
|
|
143
|
-
title: /* @__PURE__ */ React.createElement("div", null, this._localeService.t(content))
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
async showExtendConfirm() {
|
|
148
|
-
let shouldExtend = !1;
|
|
149
|
-
return await this._confirmService.confirm({
|
|
150
|
-
id: "extend-sort-range-dialog",
|
|
151
|
-
title: {
|
|
152
|
-
title: this._localeService.t("sheets-sort.dialog.sort-reminder")
|
|
153
|
-
},
|
|
154
|
-
children: {
|
|
155
|
-
title: /* @__PURE__ */ React.createElement(
|
|
156
|
-
ExtendConfirm,
|
|
157
|
-
{
|
|
158
|
-
onChange: /* @__PURE__ */ __name((value) => {
|
|
159
|
-
shouldExtend = value === "1";
|
|
160
|
-
}, "onChange")
|
|
161
|
-
}
|
|
162
|
-
)
|
|
163
|
-
},
|
|
164
|
-
width: 400
|
|
165
|
-
}) ? shouldExtend ? "extend" : "keep" : "cancel";
|
|
166
|
-
}
|
|
167
|
-
showCustomSortPanel(location) {
|
|
168
|
-
this._customSortState$.next({ location, show: !0 });
|
|
169
|
-
}
|
|
170
|
-
closeCustomSortPanel() {
|
|
171
|
-
this._customSortState$.next({ show: !1 });
|
|
172
|
-
}
|
|
173
|
-
_check(location) {
|
|
174
|
-
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);
|
|
175
|
-
}
|
|
176
|
-
async _detectSortLocation(extend) {
|
|
177
|
-
const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), worksheet = workbook.getActiveSheet(), unitId = workbook.getUnitId(), subUnitId = worksheet.getSheetId(), selection = this._selectionManagerService.getCurrentLastSelection();
|
|
178
|
-
if (!selection)
|
|
179
|
-
return null;
|
|
180
|
-
let range;
|
|
181
|
-
if (extend === !0)
|
|
182
|
-
range = expandToContinuousRange(selection.range, { up: !0, down: !0, left: !0, right: !0 }, worksheet), this.setSelection(unitId, subUnitId, range);
|
|
183
|
-
else if (extend === !1)
|
|
184
|
-
range = selection.range;
|
|
185
|
-
else {
|
|
186
|
-
const confirmRes = await this.showExtendConfirm();
|
|
187
|
-
if (confirmRes === "cancel")
|
|
188
|
-
return null;
|
|
189
|
-
confirmRes === "keep" ? range = selection.range : (range = expandToContinuousRange(selection.range, { up: !0, down: !0, left: !0, right: !0 }, worksheet), this.setSelection(unitId, subUnitId, range));
|
|
190
|
-
}
|
|
191
|
-
return {
|
|
192
|
-
range,
|
|
193
|
-
unitId,
|
|
194
|
-
subUnitId,
|
|
195
|
-
colIndex: selection.primary.actualColumn
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
}, __name(_a, "SheetsSortUIService"), _a);
|
|
199
|
-
SheetsSortUIService = __decorateClass$2([
|
|
200
|
-
OnLifecycle(LifecycleStages.Ready, SheetsSortService),
|
|
201
|
-
__decorateParam$2(0, IUniverInstanceService),
|
|
202
|
-
__decorateParam$2(1, IConfirmService),
|
|
203
|
-
__decorateParam$2(2, ILogService),
|
|
204
|
-
__decorateParam$2(3, Inject(SheetsSelectionsService)),
|
|
205
|
-
__decorateParam$2(4, Inject(SheetsSortService)),
|
|
206
|
-
__decorateParam$2(5, Inject(LocaleService)),
|
|
207
|
-
__decorateParam$2(6, ICommandService)
|
|
208
|
-
], SheetsSortUIService);
|
|
209
|
-
function colIndexTranslator(localeService) {
|
|
210
|
-
return (colIndex) => {
|
|
211
|
-
const colName = Tools.chatAtABC(colIndex);
|
|
212
|
-
switch (localeService.getCurrentLocale()) {
|
|
213
|
-
case LocaleType.ZH_CN:
|
|
214
|
-
return `"${colName}"列`;
|
|
215
|
-
case LocaleType.EN_US:
|
|
216
|
-
return `Column "${colName}"`;
|
|
217
|
-
default:
|
|
218
|
-
return `Column "${colName}"`;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
__name(colIndexTranslator, "colIndexTranslator");
|
|
223
|
-
var __assign = function() {
|
|
224
|
-
return __assign = Object.assign || function(t) {
|
|
225
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
226
|
-
s = arguments[i];
|
|
227
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
|
|
228
|
-
}
|
|
229
|
-
return t;
|
|
230
|
-
}, __assign.apply(this, arguments);
|
|
231
|
-
}, __rest = function(s, e) {
|
|
232
|
-
var t = {};
|
|
233
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
234
|
-
if (s != null && typeof Object.getOwnPropertySymbols == "function")
|
|
235
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
236
|
-
e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
237
|
-
return t;
|
|
238
|
-
}, IconBase = forwardRef(function(props, ref) {
|
|
239
|
-
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()));
|
|
240
|
-
return render(icon, "".concat(id), { defIds: icon.defIds, idSuffix: idSuffix.current }, __assign({ ref, className: cls }, restProps), extend);
|
|
241
|
-
});
|
|
242
|
-
function render(node, id, runtimeProps, rootProps, extend) {
|
|
243
|
-
return createElement(node.tag, __assign(__assign({ key: id }, replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend)), rootProps), (replaceRuntimeIdsInDefs(node, runtimeProps).children || []).map(function(child, index) {
|
|
244
|
-
return render(child, "".concat(id, "-").concat(node.tag, "-").concat(index), runtimeProps, void 0, extend);
|
|
245
|
-
}));
|
|
246
|
-
}
|
|
247
|
-
__name(render, "render");
|
|
248
|
-
function replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend) {
|
|
249
|
-
var attrs = __assign({}, node.attrs);
|
|
250
|
-
extend != null && extend.colorChannel1 && attrs.fill === "colorChannel1" && (attrs.fill = extend.colorChannel1);
|
|
251
|
-
var defIds = runtimeProps.defIds;
|
|
252
|
-
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) {
|
|
253
|
-
var key = _a4[0], value = _a4[1];
|
|
254
|
-
typeof value == "string" && (attrs[key] = value.replace(/url\(#(.*)\)/, "url(#$1".concat(runtimeProps.idSuffix, ")")));
|
|
255
|
-
})), attrs;
|
|
256
|
-
}
|
|
257
|
-
__name(replaceRuntimeIdsAndExtInAttrs, "replaceRuntimeIdsAndExtInAttrs");
|
|
258
|
-
function replaceRuntimeIdsInDefs(node, runtimeProps) {
|
|
259
|
-
var _a4, defIds = runtimeProps.defIds;
|
|
260
|
-
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) {
|
|
261
|
-
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;
|
|
262
|
-
}) }) : node;
|
|
263
|
-
}
|
|
264
|
-
__name(replaceRuntimeIdsInDefs, "replaceRuntimeIdsInDefs");
|
|
265
|
-
function generateShortUuid() {
|
|
266
|
-
return Math.random().toString(36).substring(2, 8);
|
|
267
|
-
}
|
|
268
|
-
__name(generateShortUuid, "generateShortUuid");
|
|
269
|
-
IconBase.displayName = "UniverIcon";
|
|
270
|
-
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) {
|
|
271
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
272
|
-
id: "ascending- single",
|
|
273
|
-
ref,
|
|
274
|
-
icon: element$9
|
|
275
|
-
}));
|
|
276
|
-
});
|
|
277
|
-
AscendingSingle.displayName = "AscendingSingle";
|
|
278
|
-
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) {
|
|
279
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
280
|
-
id: "check-mark-single",
|
|
281
|
-
ref,
|
|
282
|
-
icon: element$8
|
|
283
|
-
}));
|
|
284
|
-
});
|
|
285
|
-
CheckMarkSingle.displayName = "CheckMarkSingle";
|
|
286
|
-
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) {
|
|
287
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
288
|
-
id: "custom-sort-single",
|
|
289
|
-
ref,
|
|
290
|
-
icon: element$7
|
|
291
|
-
}));
|
|
292
|
-
});
|
|
293
|
-
CustomSortSingle.displayName = "CustomSortSingle";
|
|
294
|
-
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) {
|
|
295
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
296
|
-
id: "delete-empty-single",
|
|
297
|
-
ref,
|
|
298
|
-
icon: element$6
|
|
299
|
-
}));
|
|
300
|
-
});
|
|
301
|
-
DeleteEmptySingle.displayName = "DeleteEmptySingle";
|
|
302
|
-
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) {
|
|
303
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
304
|
-
id: "descending-single",
|
|
305
|
-
ref,
|
|
306
|
-
icon: element$5
|
|
307
|
-
}));
|
|
308
|
-
});
|
|
309
|
-
DescendingSingle.displayName = "DescendingSingle";
|
|
310
|
-
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) {
|
|
311
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
312
|
-
id: "expand-ascending-single",
|
|
313
|
-
ref,
|
|
314
|
-
icon: element$4
|
|
315
|
-
}));
|
|
316
|
-
});
|
|
317
|
-
ExpandAscendingSingle.displayName = "ExpandAscendingSingle";
|
|
318
|
-
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) {
|
|
319
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
320
|
-
id: "expand-descending-single",
|
|
321
|
-
ref,
|
|
322
|
-
icon: element$3
|
|
323
|
-
}));
|
|
324
|
-
});
|
|
325
|
-
ExpandDescendingSingle.displayName = "ExpandDescendingSingle";
|
|
326
|
-
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) {
|
|
327
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
328
|
-
id: "increase-single",
|
|
329
|
-
ref,
|
|
330
|
-
icon: element$2
|
|
331
|
-
}));
|
|
332
|
-
});
|
|
333
|
-
IncreaseSingle.displayName = "IncreaseSingle";
|
|
334
|
-
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) {
|
|
335
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
336
|
-
id: "more-down-single",
|
|
337
|
-
ref,
|
|
338
|
-
icon: element$1
|
|
339
|
-
}));
|
|
340
|
-
});
|
|
341
|
-
MoreDownSingle.displayName = "MoreDownSingle";
|
|
342
|
-
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) {
|
|
343
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
344
|
-
id: "sequence-single",
|
|
345
|
-
ref,
|
|
346
|
-
icon: element
|
|
347
|
-
}));
|
|
348
|
-
});
|
|
349
|
-
SequenceSingle.displayName = "SequenceSingle";
|
|
350
|
-
const SortRangeAscCommand = {
|
|
351
|
-
id: "sheet.command.sort-range-asc",
|
|
352
|
-
type: CommandType.COMMAND,
|
|
353
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !1), "handler")
|
|
354
|
-
}, SortRangeAscExtCommand = {
|
|
355
|
-
id: "sheet.command.sort-range-asc-ext",
|
|
356
|
-
type: CommandType.COMMAND,
|
|
357
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !0), "handler")
|
|
358
|
-
}, SortRangeDescCommand = {
|
|
359
|
-
id: "sheet.command.sort-range-desc",
|
|
360
|
-
type: CommandType.COMMAND,
|
|
361
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !1), "handler")
|
|
362
|
-
}, SortRangeDescExtCommand = {
|
|
363
|
-
id: "sheet.command.sort-range-desc-ext",
|
|
364
|
-
type: CommandType.COMMAND,
|
|
365
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !0), "handler")
|
|
366
|
-
}, SortRangeCustomCommand = {
|
|
367
|
-
id: "sheet.command.sort-range-custom",
|
|
368
|
-
type: CommandType.COMMAND,
|
|
369
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortCustomize(), "handler")
|
|
370
|
-
}, SortRangeAscInCtxMenuCommand = {
|
|
371
|
-
id: "sheet.command.sort-range-asc-ctx",
|
|
372
|
-
type: CommandType.COMMAND,
|
|
373
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !1), "handler")
|
|
374
|
-
}, SortRangeAscExtInCtxMenuCommand = {
|
|
375
|
-
id: "sheet.command.sort-range-asc-ext-ctx",
|
|
376
|
-
type: CommandType.COMMAND,
|
|
377
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!0, !0), "handler")
|
|
378
|
-
}, SortRangeDescInCtxMenuCommand = {
|
|
379
|
-
id: "sheet.command.sort-range-desc-ctx",
|
|
380
|
-
type: CommandType.COMMAND,
|
|
381
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !1), "handler")
|
|
382
|
-
}, SortRangeDescExtInCtxMenuCommand = {
|
|
383
|
-
id: "sheet.command.sort-range-desc-ext-ctx",
|
|
384
|
-
type: CommandType.COMMAND,
|
|
385
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortDirectly(!1, !0), "handler")
|
|
386
|
-
}, SortRangeCustomInCtxMenuCommand = {
|
|
387
|
-
id: "sheet.command.sort-range-custom-ctx",
|
|
388
|
-
type: CommandType.COMMAND,
|
|
389
|
-
handler: /* @__PURE__ */ __name(async (accessor) => await accessor.get(SheetsSortUIService).triggerSortCustomize(), "handler")
|
|
390
|
-
};
|
|
391
|
-
function CustomSortPanel() {
|
|
392
|
-
const sheetsSortUIService = useDependency(SheetsSortUIService), sheetsSortService = useDependency(SheetsSortService), localeService = useDependency(LocaleService), [hasTitle, setHasTitle] = useState(!1), [scrollPosition, setScrollPosition] = useState(0), listEndRef = useRef(null), state = sheetsSortUIService.customSortState();
|
|
393
|
-
if (!state || !state.location)
|
|
394
|
-
return null;
|
|
395
|
-
const { range, unitId, subUnitId } = state.location, titles = sheetsSortUIService.getTitles(hasTitle), [list, setList] = useState([
|
|
396
|
-
{ type: SortType.ASC, colIndex: range.startColumn }
|
|
397
|
-
]), onItemChange = useCallback((index, value) => {
|
|
398
|
-
const newList = [...list];
|
|
399
|
-
value === null ? newList.splice(index, 1) : newList[index] = value, setList(newList);
|
|
400
|
-
}, [list]), newItem = useCallback(
|
|
401
|
-
throttle(() => {
|
|
402
|
-
const newList = [...list], nextColIndex = findNextColIndex(range, list);
|
|
403
|
-
nextColIndex !== null && (newList.push({ type: SortType.ASC, colIndex: nextColIndex }), setList(newList));
|
|
404
|
-
}, 200),
|
|
405
|
-
[list, range]
|
|
406
|
-
), apply = useCallback((orderRules, hasTitle2) => {
|
|
407
|
-
sheetsSortService.applySort({ range, orderRules, hasTitle: hasTitle2 }), sheetsSortUIService.closeCustomSortPanel();
|
|
408
|
-
}, [sheetsSortService, sheetsSortUIService, range]), cancel = useCallback(() => {
|
|
409
|
-
sheetsSortUIService.closeCustomSortPanel();
|
|
410
|
-
}, [sheetsSortUIService]), setTitle = useCallback((value) => {
|
|
411
|
-
setHasTitle(value), value ? sheetsSortUIService.setSelection(unitId, subUnitId, { ...range, startRow: range.startRow + 1 }) : sheetsSortUIService.setSelection(unitId, subUnitId, range);
|
|
412
|
-
}, [sheetsSortUIService, range, subUnitId, unitId]);
|
|
413
|
-
useEffect(() => {
|
|
414
|
-
listEndRef.current && list.length > 5 && (listEndRef.current.scrollTop = listEndRef.current.scrollHeight);
|
|
415
|
-
}, [list]);
|
|
416
|
-
const canNew = list.length < titles.length, dragList = list.map((item) => ({ ...item, id: `${item.colIndex}` }));
|
|
417
|
-
return /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelContainer }, /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelContent, onMouseDown: /* @__PURE__ */ __name((e) => {
|
|
418
|
-
e.stopPropagation();
|
|
419
|
-
}, "onMouseDown") }, /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelExt }, /* @__PURE__ */ React.createElement("div", { className: styles.firstRowCheck }, /* @__PURE__ */ React.createElement(Checkbox, { checked: hasTitle, onChange: /* @__PURE__ */ __name((value) => setTitle(!!value), "onChange") }, localeService.t("sheets-sort.dialog.first-row-check"))), canNew ? /* @__PURE__ */ React.createElement("div", { className: styles.addCondition, onClick: newItem }, /* @__PURE__ */ React.createElement(IncreaseSingle, null), /* @__PURE__ */ React.createElement("span", { className: styles.addConditionText }, localeService.t("sheets-sort.dialog.add-condition"))) : /* @__PURE__ */ React.createElement("div", { className: `${styles.addCondition} ${styles.addConditionDisable}` }, /* @__PURE__ */ React.createElement(IncreaseSingle, null), /* @__PURE__ */ React.createElement("span", { className: styles.addConditionText }, localeService.t("sheets-sort.dialog.add-condition")))), /* @__PURE__ */ React.createElement(
|
|
420
|
-
"div",
|
|
421
|
-
{
|
|
422
|
-
className: styles.conditionList,
|
|
423
|
-
onScroll: /* @__PURE__ */ __name((e) => {
|
|
424
|
-
const position = e.currentTarget.scrollTop;
|
|
425
|
-
setScrollPosition(position);
|
|
426
|
-
}, "onScroll"),
|
|
427
|
-
ref: listEndRef
|
|
428
|
-
},
|
|
429
|
-
/* @__PURE__ */ React.createElement(
|
|
430
|
-
DraggableList,
|
|
431
|
-
{
|
|
432
|
-
list: dragList,
|
|
433
|
-
onListChange: setList,
|
|
434
|
-
idKey: "id",
|
|
435
|
-
draggableHandle: `.${styles.customSortPanelItemHandler}`,
|
|
436
|
-
itemRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ React.createElement(
|
|
437
|
-
SortOptionItem,
|
|
438
|
-
{
|
|
439
|
-
titles,
|
|
440
|
-
list: dragList,
|
|
441
|
-
item,
|
|
442
|
-
onChange: /* @__PURE__ */ __name((value, index) => onItemChange(index, value), "onChange"),
|
|
443
|
-
scrollPosition
|
|
444
|
-
}
|
|
445
|
-
), "itemRender"),
|
|
446
|
-
rowHeight: 32,
|
|
447
|
-
margin: [0, 12]
|
|
448
|
-
}
|
|
449
|
-
)
|
|
450
|
-
)), /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelFooter }, /* @__PURE__ */ React.createElement(Button, { className: styles.customSortPanelFooterBtn, type: "default", onClick: /* @__PURE__ */ __name(() => cancel(), "onClick") }, localeService.t("sheets-sort.dialog.cancel")), /* @__PURE__ */ React.createElement(Button, { className: styles.customSortPanelFooterBtn, type: "primary", onClick: /* @__PURE__ */ __name(() => apply(list, hasTitle), "onClick") }, localeService.t("sheets-sort.dialog.confirm"))));
|
|
451
|
-
}
|
|
452
|
-
__name(CustomSortPanel, "CustomSortPanel");
|
|
453
|
-
function SortOptionItem(props) {
|
|
454
|
-
var _a4;
|
|
455
|
-
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) => {
|
|
456
|
-
onChange({ ...item, colIndex: menuItem.index }, currentIndex), setVisible(!1);
|
|
457
|
-
}, [currentIndex, item, onChange]), [visible, setVisible] = useState(!1), onVisibleChange = /* @__PURE__ */ __name((visible2) => {
|
|
458
|
-
setVisible(visible2);
|
|
459
|
-
}, "onVisibleChange");
|
|
460
|
-
useEffect(() => {
|
|
461
|
-
setVisible(!1);
|
|
462
|
-
}, [scrollPosition]);
|
|
463
|
-
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;
|
|
464
|
-
return /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItem }, /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemHead }, /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemHandler }, /* @__PURE__ */ React.createElement(SequenceSingle, null)), /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemColumn }, /* @__PURE__ */ React.createElement(
|
|
465
|
-
Dropdown,
|
|
466
|
-
{
|
|
467
|
-
placement: "bottomLeft",
|
|
468
|
-
trigger: ["click"],
|
|
469
|
-
visible,
|
|
470
|
-
onVisibleChange,
|
|
471
|
-
overlay: /* @__PURE__ */ React.createElement("ul", { className: styles.customSortColMenu }, availableMenu.map((menuItem) => /* @__PURE__ */ React.createElement(
|
|
472
|
-
"li",
|
|
473
|
-
{
|
|
474
|
-
key: menuItem.index,
|
|
475
|
-
onClick: /* @__PURE__ */ __name(() => handleChangeColIndex(menuItem), "onClick"),
|
|
476
|
-
className: styles.customSortColMenuItem
|
|
477
|
-
},
|
|
478
|
-
/* @__PURE__ */ React.createElement("span", { className: styles.customSortColMenuItemDesc }, menuItem.label),
|
|
479
|
-
/* @__PURE__ */ React.createElement("span", { className: styles.customSortColMenuItemCheck }, menuItem.index === item.colIndex && /* @__PURE__ */ React.createElement(CheckMarkSingle, null))
|
|
480
|
-
)))
|
|
481
|
-
},
|
|
482
|
-
/* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemColumnInput }, /* @__PURE__ */ React.createElement("span", { className: styles.customSortPanelItemColumnInputText }, itemLabel), /* @__PURE__ */ React.createElement(MoreDownSingle, { className: styles.customSortPanelItemColumnInputDropdown }))
|
|
483
|
-
))), /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemOrder }, /* @__PURE__ */ React.createElement(
|
|
484
|
-
RadioGroup,
|
|
485
|
-
{
|
|
486
|
-
className: radioClass,
|
|
487
|
-
value: item.type,
|
|
488
|
-
onChange: /* @__PURE__ */ __name((value) => {
|
|
489
|
-
onChange({ ...item, type: value }, currentIndex);
|
|
490
|
-
}, "onChange")
|
|
491
|
-
},
|
|
492
|
-
/* @__PURE__ */ React.createElement(Radio, { value: SortType.ASC }, localeService.t("sheets-sort.general.sort-asc")),
|
|
493
|
-
/* @__PURE__ */ React.createElement(Radio, { value: SortType.DESC }, localeService.t("sheets-sort.general.sort-desc"))
|
|
494
|
-
)), /* @__PURE__ */ React.createElement("div", { className: styles.customSortPanelItemRemove }, showDelete && /* @__PURE__ */ React.createElement(DeleteEmptySingle, { onClick: /* @__PURE__ */ __name(() => onChange(null, currentIndex), "onClick") })));
|
|
495
|
-
}
|
|
496
|
-
__name(SortOptionItem, "SortOptionItem");
|
|
497
|
-
function findNextColIndex(range, list) {
|
|
498
|
-
const { startColumn, endColumn } = range, used = new Set(list.map((item) => item == null ? void 0 : item.colIndex));
|
|
499
|
-
for (let i = startColumn; i <= endColumn; i++)
|
|
500
|
-
if (!used.has(i))
|
|
501
|
-
return i;
|
|
502
|
-
return null;
|
|
503
|
-
}
|
|
504
|
-
__name(findNextColIndex, "findNextColIndex");
|
|
505
|
-
function EmbedSortBtn(props) {
|
|
506
|
-
const { range, colIndex, onClose } = props, sheetsSortUIService = useDependency(SheetsSortUIService), univerInstanceService = useDependency(IUniverInstanceService), localeService = useDependency(LocaleService), apply = useCallback((asc) => {
|
|
507
|
-
const { unitId, subUnitId } = getSheetCommandTarget(univerInstanceService) || {};
|
|
508
|
-
if (range && unitId && subUnitId) {
|
|
509
|
-
const noTitleRange = { ...range, startRow: range.startRow + 1 };
|
|
510
|
-
sheetsSortUIService.triggerSortDirectly(asc, !1, { unitId, subUnitId, range: noTitleRange, colIndex });
|
|
511
|
-
} else
|
|
512
|
-
console.warn(`Cannot find the target to sort. unitId: ${unitId}, subUnitId: ${subUnitId}, range: ${range}, colIndex: ${colIndex}`);
|
|
513
|
-
onClose();
|
|
514
|
-
}, [range, colIndex, sheetsSortUIService, univerInstanceService, onClose]);
|
|
515
|
-
return /* @__PURE__ */ React.createElement("div", { className: styles.embedSortBtnContainer }, /* @__PURE__ */ React.createElement("div", { className: `${styles.embedSortBtn} ${styles.embedSortBtnAsc}`, onClick: /* @__PURE__ */ __name(() => apply(!0), "onClick") }, /* @__PURE__ */ React.createElement(AscendingSingle, { className: styles.embedSortBtnIcon }), localeService.t("sheets-sort.general.sort-asc")), /* @__PURE__ */ React.createElement("div", { className: `${styles.embedSortBtn} ${styles.embedSortBtnDesc}`, onClick: /* @__PURE__ */ __name(() => apply(!1), "onClick") }, /* @__PURE__ */ React.createElement(DescendingSingle, { className: styles.embedSortBtnIcon }), localeService.t("sheets-sort.general.sort-desc")));
|
|
516
|
-
}
|
|
517
|
-
__name(EmbedSortBtn, "EmbedSortBtn");
|
|
518
|
-
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";
|
|
519
|
-
function sortRangeMenuFactory(accessor) {
|
|
520
|
-
return {
|
|
521
|
-
id: SHEETS_SORT_MENU_ID,
|
|
522
|
-
type: MenuItemType.SUBITEMS,
|
|
523
|
-
icon: SHEETS_SORT_ASC_ICON,
|
|
524
|
-
tooltip: "sheets-sort.general.sort",
|
|
525
|
-
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
|
|
526
|
-
disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
__name(sortRangeMenuFactory, "sortRangeMenuFactory");
|
|
530
|
-
function sortRangeAscMenuFactory(_accessor) {
|
|
531
|
-
return {
|
|
532
|
-
id: SortRangeAscCommand.id,
|
|
533
|
-
icon: SHEETS_SORT_ASC_ICON,
|
|
534
|
-
title: "sheets-sort.general.sort-asc-cur",
|
|
535
|
-
type: MenuItemType.BUTTON,
|
|
536
|
-
hidden$: getCurrentExclusiveRangeInterest$(_accessor)
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
__name(sortRangeAscMenuFactory, "sortRangeAscMenuFactory");
|
|
540
|
-
function sortRangeAscExtMenuFactory(_accessor) {
|
|
541
|
-
return {
|
|
542
|
-
id: SortRangeAscExtCommand.id,
|
|
543
|
-
title: "sheets-sort.general.sort-asc-ext",
|
|
544
|
-
icon: SHEETS_SORT_ASC_EXT_ICON,
|
|
545
|
-
type: MenuItemType.BUTTON
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
__name(sortRangeAscExtMenuFactory, "sortRangeAscExtMenuFactory");
|
|
549
|
-
function sortRangeDescMenuFactory(_accessor) {
|
|
550
|
-
return {
|
|
551
|
-
id: SortRangeDescCommand.id,
|
|
552
|
-
title: "sheets-sort.general.sort-desc-cur",
|
|
553
|
-
icon: SHEETS_SORT_DESC_ICON,
|
|
554
|
-
type: MenuItemType.BUTTON
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
__name(sortRangeDescMenuFactory, "sortRangeDescMenuFactory");
|
|
558
|
-
function sortRangeDescExtMenuFactory(_accessor) {
|
|
559
|
-
return {
|
|
560
|
-
id: SortRangeDescExtCommand.id,
|
|
561
|
-
title: "sheets-sort.general.sort-desc-ext",
|
|
562
|
-
icon: SHEETS_SORT_DESC_EXT_ICON,
|
|
563
|
-
type: MenuItemType.BUTTON
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
__name(sortRangeDescExtMenuFactory, "sortRangeDescExtMenuFactory");
|
|
567
|
-
function sortRangeCustomMenuFactory(_accessor) {
|
|
568
|
-
return {
|
|
569
|
-
id: SortRangeCustomCommand.id,
|
|
570
|
-
title: "sheets-sort.general.sort-custom",
|
|
571
|
-
type: MenuItemType.BUTTON,
|
|
572
|
-
icon: SHEETS_SORT_CUSTOM_ICON
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
__name(sortRangeCustomMenuFactory, "sortRangeCustomMenuFactory");
|
|
576
|
-
function sortRangeCtxMenuFactory(accessor) {
|
|
577
|
-
return {
|
|
578
|
-
id: SHEETS_SORT_CTX_MENU_ID,
|
|
579
|
-
title: "sheets-sort.general.sort",
|
|
580
|
-
type: MenuItemType.SUBITEMS,
|
|
581
|
-
icon: SHEETS_SORT_ASC_ICON,
|
|
582
|
-
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
|
|
583
|
-
disabled$: getCurrentRangeDisable$(accessor, {
|
|
584
|
-
workbookTypes: [WorkbookEditablePermission],
|
|
585
|
-
worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission],
|
|
586
|
-
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
587
|
-
})
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
__name(sortRangeCtxMenuFactory, "sortRangeCtxMenuFactory");
|
|
591
|
-
function sortRangeAscCtxMenuFactory(_accessor) {
|
|
592
|
-
return {
|
|
593
|
-
id: SortRangeAscInCtxMenuCommand.id,
|
|
594
|
-
title: "sheets-sort.general.sort-asc-cur",
|
|
595
|
-
type: MenuItemType.BUTTON,
|
|
596
|
-
icon: SHEETS_SORT_ASC_ICON,
|
|
597
|
-
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
__name(sortRangeAscCtxMenuFactory, "sortRangeAscCtxMenuFactory");
|
|
601
|
-
function sortRangeAscExtCtxMenuFactory(_accessor) {
|
|
602
|
-
return {
|
|
603
|
-
id: SortRangeAscExtInCtxMenuCommand.id,
|
|
604
|
-
title: "sheets-sort.general.sort-asc-ext",
|
|
605
|
-
type: MenuItemType.BUTTON,
|
|
606
|
-
icon: SHEETS_SORT_ASC_EXT_ICON,
|
|
607
|
-
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
__name(sortRangeAscExtCtxMenuFactory, "sortRangeAscExtCtxMenuFactory");
|
|
611
|
-
function sortRangeDescCtxMenuFactory(_accessor) {
|
|
612
|
-
return {
|
|
613
|
-
id: SortRangeDescInCtxMenuCommand.id,
|
|
614
|
-
title: "sheets-sort.general.sort-desc-cur",
|
|
615
|
-
type: MenuItemType.BUTTON,
|
|
616
|
-
icon: SHEETS_SORT_DESC_ICON,
|
|
617
|
-
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
__name(sortRangeDescCtxMenuFactory, "sortRangeDescCtxMenuFactory");
|
|
621
|
-
function sortRangeDescExtCtxMenuFactory(_accessor) {
|
|
622
|
-
return {
|
|
623
|
-
id: SortRangeDescExtInCtxMenuCommand.id,
|
|
624
|
-
title: "sheets-sort.general.sort-desc-ext",
|
|
625
|
-
type: MenuItemType.BUTTON,
|
|
626
|
-
icon: SHEETS_SORT_DESC_EXT_ICON,
|
|
627
|
-
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
__name(sortRangeDescExtCtxMenuFactory, "sortRangeDescExtCtxMenuFactory");
|
|
631
|
-
function sortRangeCustomCtxMenuFactory(_accessor) {
|
|
632
|
-
return {
|
|
633
|
-
id: SortRangeCustomInCtxMenuCommand.id,
|
|
634
|
-
title: "sheets-sort.general.sort-custom",
|
|
635
|
-
type: MenuItemType.BUTTON,
|
|
636
|
-
icon: SHEETS_SORT_CUSTOM_ICON,
|
|
637
|
-
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
__name(sortRangeCustomCtxMenuFactory, "sortRangeCustomCtxMenuFactory");
|
|
641
|
-
const menuSchema = {
|
|
642
|
-
[RibbonStartGroup.FORMULAS_INSERT]: {
|
|
643
|
-
[SHEETS_SORT_MENU_ID]: {
|
|
644
|
-
order: 2,
|
|
645
|
-
menuItemFactory: sortRangeMenuFactory,
|
|
646
|
-
[SortRangeAscCommand.id]: {
|
|
647
|
-
order: 0,
|
|
648
|
-
menuItemFactory: sortRangeAscMenuFactory
|
|
649
|
-
},
|
|
650
|
-
[SortRangeAscExtCommand.id]: {
|
|
651
|
-
order: 1,
|
|
652
|
-
menuItemFactory: sortRangeAscExtMenuFactory
|
|
653
|
-
},
|
|
654
|
-
[SortRangeDescCommand.id]: {
|
|
655
|
-
order: 2,
|
|
656
|
-
menuItemFactory: sortRangeDescMenuFactory
|
|
657
|
-
},
|
|
658
|
-
[SortRangeDescExtCommand.id]: {
|
|
659
|
-
order: 3,
|
|
660
|
-
menuItemFactory: sortRangeDescExtMenuFactory
|
|
661
|
-
},
|
|
662
|
-
[SortRangeCustomCommand.id]: {
|
|
663
|
-
order: 4,
|
|
664
|
-
menuItemFactory: sortRangeCustomMenuFactory
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
},
|
|
668
|
-
[ContextMenuPosition.MAIN_AREA]: {
|
|
669
|
-
[ContextMenuGroup.DATA]: {
|
|
670
|
-
[SHEETS_SORT_CTX_MENU_ID]: {
|
|
671
|
-
order: 0,
|
|
672
|
-
menuItemFactory: sortRangeCtxMenuFactory,
|
|
673
|
-
[SortRangeAscInCtxMenuCommand.id]: {
|
|
674
|
-
order: 0,
|
|
675
|
-
menuItemFactory: sortRangeAscCtxMenuFactory
|
|
676
|
-
},
|
|
677
|
-
[SortRangeAscExtInCtxMenuCommand.id]: {
|
|
678
|
-
order: 1,
|
|
679
|
-
menuItemFactory: sortRangeAscExtCtxMenuFactory
|
|
680
|
-
},
|
|
681
|
-
[SortRangeDescInCtxMenuCommand.id]: {
|
|
682
|
-
order: 2,
|
|
683
|
-
menuItemFactory: sortRangeDescCtxMenuFactory
|
|
684
|
-
},
|
|
685
|
-
[SortRangeDescExtInCtxMenuCommand.id]: {
|
|
686
|
-
order: 3,
|
|
687
|
-
menuItemFactory: sortRangeDescExtCtxMenuFactory
|
|
688
|
-
},
|
|
689
|
-
[SortRangeCustomInCtxMenuCommand.id]: {
|
|
690
|
-
order: 4,
|
|
691
|
-
menuItemFactory: sortRangeCustomCtxMenuFactory
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
698
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
699
|
-
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
700
|
-
return kind && result && __defProp$1(target, key, result), result;
|
|
701
|
-
}, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$1");
|
|
702
|
-
const CUSTOM_SORT_DIALOG_ID = "custom-sort-dialog", CUSTOM_SORT_PANEL_WIDTH = 560;
|
|
703
|
-
var _a2;
|
|
704
|
-
let SheetsSortUIController = (_a2 = class extends RxDisposable {
|
|
705
|
-
constructor(_commandService, _menuManagerService, _dialogService, _layoutService, _uiPartsService, _sheetRenderService, _localeService, _sheetsSortUIService, _injector, _componentManager) {
|
|
706
|
-
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();
|
|
707
|
-
}
|
|
708
|
-
_initMenu() {
|
|
709
|
-
this._menuManagerService.mergeMenu(menuSchema);
|
|
710
|
-
}
|
|
711
|
-
_initCommands() {
|
|
712
|
-
[
|
|
713
|
-
SortRangeAscCommand,
|
|
714
|
-
SortRangeAscExtCommand,
|
|
715
|
-
SortRangeDescCommand,
|
|
716
|
-
SortRangeDescExtCommand,
|
|
717
|
-
SortRangeCustomCommand,
|
|
718
|
-
SortRangeAscInCtxMenuCommand,
|
|
719
|
-
SortRangeAscExtInCtxMenuCommand,
|
|
720
|
-
SortRangeDescInCtxMenuCommand,
|
|
721
|
-
SortRangeDescExtInCtxMenuCommand,
|
|
722
|
-
SortRangeCustomInCtxMenuCommand
|
|
723
|
-
].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(SortRangeCommand.id));
|
|
724
|
-
}
|
|
725
|
-
_initUI() {
|
|
726
|
-
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) => {
|
|
727
|
-
newState && newState.show && newState.location ? this._openCustomSortPanel(newState.location) : newState && !(newState != null && newState.show) && this._closePanel();
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
_openCustomSortPanel(location) {
|
|
731
|
-
this._dialogService.open({
|
|
732
|
-
id: CUSTOM_SORT_DIALOG_ID,
|
|
733
|
-
draggable: !0,
|
|
734
|
-
width: CUSTOM_SORT_PANEL_WIDTH,
|
|
735
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${serializeRange(location.range)}` },
|
|
736
|
-
children: { label: "CustomSortPanel" },
|
|
737
|
-
destroyOnClose: !0,
|
|
738
|
-
defaultPosition: getCustomSortDialogDefaultPosition(),
|
|
739
|
-
preservePositionOnDestroy: !1,
|
|
740
|
-
onClose: /* @__PURE__ */ __name(() => this._closePanel(), "onClose"),
|
|
741
|
-
mask: !0
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
_closePanel() {
|
|
745
|
-
this._dialogService.close(CUSTOM_SORT_DIALOG_ID), queueMicrotask(() => this._layoutService.focus());
|
|
746
|
-
}
|
|
747
|
-
}, __name(_a2, "SheetsSortUIController"), _a2);
|
|
748
|
-
SheetsSortUIController = __decorateClass$1([
|
|
749
|
-
OnLifecycle(LifecycleStages.Ready, SheetsSortUIController),
|
|
750
|
-
__decorateParam$1(0, ICommandService),
|
|
751
|
-
__decorateParam$1(1, IMenuManagerService),
|
|
752
|
-
__decorateParam$1(2, IDialogService),
|
|
753
|
-
__decorateParam$1(3, ILayoutService),
|
|
754
|
-
__decorateParam$1(4, IUIPartsService),
|
|
755
|
-
__decorateParam$1(5, Inject(SheetsRenderService)),
|
|
756
|
-
__decorateParam$1(6, Inject(LocaleService)),
|
|
757
|
-
__decorateParam$1(7, Inject(SheetsSortUIService)),
|
|
758
|
-
__decorateParam$1(8, Inject(Injector)),
|
|
759
|
-
__decorateParam$1(9, Inject(ComponentManager))
|
|
760
|
-
], SheetsSortUIController);
|
|
761
|
-
function getCustomSortDialogDefaultPosition() {
|
|
762
|
-
return { x: 0, y: 0 };
|
|
763
|
-
}
|
|
764
|
-
__name(getCustomSortDialogDefaultPosition, "getCustomSortDialogDefaultPosition");
|
|
765
|
-
const PLUGIN_CONFIG_KEY = "sheets-sort-ui.config", defaultPluginConfig = {};
|
|
766
|
-
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) => {
|
|
767
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
768
|
-
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
769
|
-
return kind && result && __defProp2(target, key, result), result;
|
|
770
|
-
}, "__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");
|
|
771
|
-
const NAME = "SHEET_SORT_UI_PLUGIN";
|
|
772
|
-
var _a3;
|
|
773
|
-
let UniverSheetsSortUIPlugin = (_a3 = class extends Plugin {
|
|
774
|
-
constructor(_config = defaultPluginConfig, _injector, _configService) {
|
|
775
|
-
super(), this._config = _config, this._injector = _injector, this._configService = _configService;
|
|
776
|
-
const { ...rest } = this._config;
|
|
777
|
-
this._configService.setConfig(PLUGIN_CONFIG_KEY, rest);
|
|
778
|
-
}
|
|
779
|
-
onStarting() {
|
|
780
|
-
[
|
|
781
|
-
[SheetsSortUIService],
|
|
782
|
-
[SheetsSortUIController]
|
|
783
|
-
].forEach((d) => this._injector.add(d));
|
|
784
|
-
}
|
|
785
|
-
}, __name(_a3, "UniverSheetsSortUIPlugin"), _a3);
|
|
786
|
-
__publicField2(UniverSheetsSortUIPlugin, "type", UniverInstanceType.UNIVER_SHEET);
|
|
787
|
-
__publicField2(UniverSheetsSortUIPlugin, "pluginName", NAME);
|
|
788
|
-
UniverSheetsSortUIPlugin = __decorateClass([
|
|
789
|
-
DependentOn(UniverSheetsSortPlugin),
|
|
790
|
-
__decorateParam(1, Inject(Injector)),
|
|
791
|
-
__decorateParam(2, IConfigService)
|
|
792
|
-
], UniverSheetsSortUIPlugin);
|
|
793
|
-
export {
|
|
794
|
-
SortRangeAscCommand,
|
|
795
|
-
SortRangeAscExtCommand,
|
|
796
|
-
SortRangeAscExtInCtxMenuCommand,
|
|
797
|
-
SortRangeAscInCtxMenuCommand,
|
|
798
|
-
SortRangeCustomCommand,
|
|
799
|
-
SortRangeCustomInCtxMenuCommand,
|
|
800
|
-
SortRangeDescCommand,
|
|
801
|
-
SortRangeDescExtCommand,
|
|
802
|
-
SortRangeDescExtInCtxMenuCommand,
|
|
803
|
-
SortRangeDescInCtxMenuCommand,
|
|
804
|
-
UniverSheetsSortUIPlugin
|
|
805
|
-
};
|
|
1
|
+
var _0x1e275a=_0x50ca;(function(_0x38b826,_0x4e1032){var _0x3ec6a7=_0x50ca,_0x1b3446=_0x38b826();while(!![]){try{var _0x366df2=parseInt(_0x3ec6a7(0x1a8))/0x1*(-parseInt(_0x3ec6a7(0x19e))/0x2)+-parseInt(_0x3ec6a7(0x16a))/0x3+parseInt(_0x3ec6a7(0x1af))/0x4+parseInt(_0x3ec6a7(0x24b))/0x5*(parseInt(_0x3ec6a7(0x1e0))/0x6)+parseInt(_0x3ec6a7(0x204))/0x7+parseInt(_0x3ec6a7(0x1d0))/0x8+parseInt(_0x3ec6a7(0x168))/0x9;if(_0x366df2===_0x4e1032)break;else _0x1b3446['push'](_0x1b3446['shift']());}catch(_0x1530bb){_0x1b3446['push'](_0x1b3446['shift']());}}}(_0x2aa7,0xf294f));var __defProp=Object[_0x1e275a(0x1df)],__defNormalProp=(_0x55b79b,_0x3151dc,_0x501089)=>_0x3151dc in _0x55b79b?__defProp(_0x55b79b,_0x3151dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x501089}):_0x55b79b[_0x3151dc]=_0x501089,__name=(_0x1ac62e,_0x3d9e76)=>__defProp(_0x1ac62e,'name',{'value':_0x3d9e76,'configurable':!0x0}),__publicField=(_0x2e3791,_0x5f3daf,_0x6ae50)=>__defNormalProp(_0x2e3791,typeof _0x5f3daf!='symbol'?_0x5f3daf+'':_0x5f3daf,_0x6ae50);import{useDependency,LocaleService,Inject,Disposable,UniverInstanceType,IUniverInstanceService,ILogService,ICommandService,Tools,LocaleType,CommandType,throttle,Injector,RxDisposable,connectInjector,DependentOn,Plugin,IConfigService}from'@univerjs/core';import{SheetsSortService,SortType,SortRangeCommand,UniverSheetsSortPlugin}from'@univerjs/sheets-sort';import{serializeRange}from'@univerjs/engine-formula';import{getCurrentRangeDisable$,getCurrentExclusiveRangeInterest$,SheetsRenderService,SheetsUIPart}from'@univerjs/sheets-ui';import{IConfirmService,MenuItemType,getMenuHiddenObservable,RibbonStartGroup,ContextMenuPosition,ContextMenuGroup,ComponentManager,IMenuManagerService,IDialogService,ILayoutService,IUIPartsService}from'@univerjs/ui';import{BehaviorSubject,takeUntil}from'rxjs';import{SheetsSelectionsService,getPrimaryForRange,SetSelectionsOperation,expandToContinuousRange,getSheetCommandTarget,WorkbookEditablePermission,WorksheetSortPermission,WorksheetEditPermission,RangeProtectionPermissionEditPoint}from'@univerjs/sheets';import _0xd45298,{forwardRef,useRef,createElement,useState,useCallback,useEffect}from'react';import{RadioGroup,Radio,Checkbox,DraggableList,Button,Dropdown}from'@univerjs/design';const PLUGIN_CONFIG_KEY=_0x1e275a(0x26c),defaultPluginConfig={};var __assign=function(){var _0x53b7ca=_0x1e275a;return __assign=Object[_0x53b7ca(0x209)]||function(_0x4ed731){var _0x594025=_0x53b7ca;for(var _0x145294,_0xd55f25=0x1,_0x47c903=arguments[_0x594025(0x213)];_0xd55f25<_0x47c903;_0xd55f25++){_0x145294=arguments[_0xd55f25];for(var _0x3df455 in _0x145294)Object[_0x594025(0x229)][_0x594025(0x263)][_0x594025(0x285)](_0x145294,_0x3df455)&&(_0x4ed731[_0x3df455]=_0x145294[_0x3df455]);}return _0x4ed731;},__assign[_0x53b7ca(0x219)](this,arguments);},__rest=function(_0x5da5db,_0x59a0d8){var _0x169757=_0x1e275a,_0x53e30e={};for(var _0x4445b1 in _0x5da5db)Object[_0x169757(0x229)][_0x169757(0x263)]['call'](_0x5da5db,_0x4445b1)&&_0x59a0d8['indexOf'](_0x4445b1)<0x0&&(_0x53e30e[_0x4445b1]=_0x5da5db[_0x4445b1]);if(_0x5da5db!=null&&typeof Object['getOwnPropertySymbols']==_0x169757(0x1f5)){for(var _0x2ca14d=0x0,_0x4445b1=Object[_0x169757(0x27d)](_0x5da5db);_0x2ca14d<_0x4445b1[_0x169757(0x213)];_0x2ca14d++)_0x59a0d8[_0x169757(0x264)](_0x4445b1[_0x2ca14d])<0x0&&Object[_0x169757(0x229)][_0x169757(0x1a5)][_0x169757(0x285)](_0x5da5db,_0x4445b1[_0x2ca14d])&&(_0x53e30e[_0x4445b1[_0x2ca14d]]=_0x5da5db[_0x4445b1[_0x2ca14d]]);}return _0x53e30e;},IconBase=forwardRef(function(_0x2c8168,_0x41ed03){var _0x30f301=_0x1e275a,_0x445811=_0x2c8168[_0x30f301(0x180)],_0x2b94d6=_0x2c8168['id'],_0xabf633=_0x2c8168['className'],_0x32913f=_0x2c8168[_0x30f301(0x17a)],_0x354c5e=__rest(_0x2c8168,[_0x30f301(0x180),'id',_0x30f301(0x211),'extend']),_0x45b6ed=_0x30f301(0x252)['concat'](_0x2b94d6,'\x20')[_0x30f301(0x1b7)](_0xabf633||'')[_0x30f301(0x1ec)](),_0x5a1236=useRef('_'['concat'](generateShortUuid()));return render(_0x445811,''[_0x30f301(0x1b7)](_0x2b94d6),{'defIds':_0x445811[_0x30f301(0x21e)],'idSuffix':_0x5a1236['current']},__assign({'ref':_0x41ed03,'className':_0x45b6ed},_0x354c5e),_0x32913f);});function render(_0x25f491,_0x24cd15,_0x12ac91,_0x1448a2,_0x3895f9){var _0xc5f36b=_0x1e275a;return createElement(_0x25f491[_0xc5f36b(0x16c)],__assign(__assign({'key':_0x24cd15},replaceRuntimeIdsAndExtInAttrs(_0x25f491,_0x12ac91,_0x3895f9)),_0x1448a2),(replaceRuntimeIdsInDefs(_0x25f491,_0x12ac91)[_0xc5f36b(0x169)]||[])[_0xc5f36b(0x256)](function(_0x5b1e6a,_0x4b0932){var _0x3e7fad=_0xc5f36b;return render(_0x5b1e6a,''['concat'](_0x24cd15,'-')[_0x3e7fad(0x1b7)](_0x25f491['tag'],'-')['concat'](_0x4b0932),_0x12ac91,void 0x0,_0x3895f9);}));}__name(render,_0x1e275a(0x17c));function replaceRuntimeIdsAndExtInAttrs(_0x3658c9,_0x5df8d5,_0x297aba){var _0x4c0e8a=_0x1e275a,_0x481259=__assign({},_0x3658c9[_0x4c0e8a(0x188)]);_0x297aba!=null&&_0x297aba[_0x4c0e8a(0x1e8)]&&_0x481259[_0x4c0e8a(0x254)]==='colorChannel1'&&(_0x481259[_0x4c0e8a(0x254)]=_0x297aba[_0x4c0e8a(0x1e8)]);var _0x31cf20=_0x5df8d5[_0x4c0e8a(0x21e)];return!_0x31cf20||_0x31cf20[_0x4c0e8a(0x213)]===0x0||(_0x3658c9[_0x4c0e8a(0x16c)]===_0x4c0e8a(0x1c2)&&_0x481259['xlink:href']&&(_0x481259[_0x4c0e8a(0x170)]=_0x481259[_0x4c0e8a(0x170)]+_0x5df8d5['idSuffix']),Object[_0x4c0e8a(0x26a)](_0x481259)[_0x4c0e8a(0x25a)](function(_0x1f8577){var _0x3e7458=_0x4c0e8a,_0x368d61=_0x1f8577[0x0],_0x752878=_0x1f8577[0x1];typeof _0x752878=='string'&&(_0x481259[_0x368d61]=_0x752878[_0x3e7458(0x28f)](/url\(#(.*)\)/,_0x3e7458(0x1c5)[_0x3e7458(0x1b7)](_0x5df8d5['idSuffix'],')')));})),_0x481259;}function _0x50ca(_0x53745a,_0x1d4173){var _0x2aa71c=_0x2aa7();return _0x50ca=function(_0x50ca9b,_0x71e388){_0x50ca9b=_0x50ca9b-0x15e;var _0x7217a9=_0x2aa71c[_0x50ca9b];return _0x7217a9;},_0x50ca(_0x53745a,_0x1d4173);}__name(replaceRuntimeIdsAndExtInAttrs,_0x1e275a(0x1e4));function replaceRuntimeIdsInDefs(_0x2b3515,_0x829c38){var _0xf69d0e=_0x1e275a,_0x577329,_0x97b9c5=_0x829c38[_0xf69d0e(0x21e)];return!_0x97b9c5||_0x97b9c5['length']===0x0?_0x2b3515:_0x2b3515[_0xf69d0e(0x16c)]===_0xf69d0e(0x1eb)&&(!((_0x577329=_0x2b3515[_0xf69d0e(0x169)])===null||_0x577329===void 0x0)&&_0x577329[_0xf69d0e(0x213)])?__assign(__assign({},_0x2b3515),{'children':_0x2b3515[_0xf69d0e(0x169)][_0xf69d0e(0x256)](function(_0x1ac619){var _0x9997d1=_0xf69d0e;return typeof _0x1ac619[_0x9997d1(0x188)]['id']==_0x9997d1(0x225)&&_0x97b9c5&&_0x97b9c5[_0x9997d1(0x264)](_0x1ac619[_0x9997d1(0x188)]['id'])>-0x1?__assign(__assign({},_0x1ac619),{'attrs':__assign(__assign({},_0x1ac619[_0x9997d1(0x188)]),{'id':_0x1ac619[_0x9997d1(0x188)]['id']+_0x829c38['idSuffix']})}):_0x1ac619;})}):_0x2b3515;}__name(replaceRuntimeIdsInDefs,_0x1e275a(0x1fb));function generateShortUuid(){var _0x27a234=_0x1e275a;return Math['random']()[_0x27a234(0x1ba)](0x24)[_0x27a234(0x206)](0x2,0x8);}__name(generateShortUuid,_0x1e275a(0x1a4)),IconBase['displayName']=_0x1e275a(0x193);var element$9={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':'0\x200\x2016\x2016','width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x24f)}},{'tag':'path','attrs':{'fill':_0x1e275a(0x1cb),'d':'M1.98967\x2010.2798C1.6583\x2010.2798\x201.38967\x2010.0112\x201.38967\x209.67983\x201.38967\x209.34846\x201.6583\x209.07983\x201.98967\x209.07983H6.50138C6.74406\x209.07983\x206.96284\x209.22602\x207.05571\x209.45022\x207.14858\x209.67443\x207.09725\x209.9325\x206.92565\x2010.1041L3.43819\x2013.5916H6.50138C6.83276\x2013.5916\x207.10138\x2013.8602\x207.10138\x2014.1916\x207.10138\x2014.5229\x206.83276\x2014.7916\x206.50138\x2014.7916H1.98967C1.74699\x2014.7916\x201.52821\x2014.6454\x201.43534\x2014.4212\x201.34247\x2014.197\x201.3938\x2013.9389\x201.5654\x2013.7673L5.05286\x2010.2798H1.98967zM5.1846\x201.86439C4.8641.989866\x203.62725.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655\x202.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055\x203.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655\x207.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439zM4.98996\x204.82056L4.24567\x202.78971\x203.50138\x204.82056H4.98996z','fillRule':_0x1e275a(0x233),'clipRule':_0x1e275a(0x233)}}]},AscendingSingle=forwardRef(function(_0x2e2a7d,_0x252aef){var _0xeed8fe=_0x1e275a;return createElement(IconBase,Object[_0xeed8fe(0x209)]({},_0x2e2a7d,{'id':_0xeed8fe(0x167),'ref':_0x252aef,'icon':element$9}));});AscendingSingle[_0x1e275a(0x15f)]=_0x1e275a(0x1be);var element$8={'tag':_0x1e275a(0x1d9),'attrs':{'fill':'none','viewBox':'0\x200\x2016\x2016','width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x1ea),'fillRule':_0x1e275a(0x233),'clipRule':'evenodd'}}]},CheckMarkSingle=forwardRef(function(_0x13a57e,_0x356e69){return createElement(IconBase,Object['assign']({},_0x13a57e,{'id':'check-mark-single','ref':_0x356e69,'icon':element$8}));});CheckMarkSingle[_0x1e275a(0x15f)]=_0x1e275a(0x189);var element$7={'tag':_0x1e275a(0x1d9),'attrs':{'fill':'none','viewBox':_0x1e275a(0x25f),'width':'1em','height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x20c)}},{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':'M1.14014\x203.73989C1.14014\x202.30396\x202.3042\x201.13989\x203.74014\x201.13989H12.2601C13.6961\x201.13989\x2014.8601\x202.30395\x2014.8601\x203.73989V12.2599C14.8601\x2013.6958\x2013.6961\x2014.8599\x2012.2601\x2014.8599H3.74014C2.3042\x2014.8599\x201.14014\x2013.6958\x201.14014\x2012.2599V3.73989ZM2.34014\x205.86724V12.2599C2.34014\x2013.0331\x202.96694\x2013.6599\x203.74014\x2013.6599H12.2601C13.0333\x2013.6599\x2013.6601\x2013.0331\x2013.6601\x2012.2599V5.86724H2.34014ZM13.6601\x204.66724H2.34014V3.73989C2.34014\x202.9667\x202.96694\x202.33989\x203.74014\x202.33989H12.2601C13.0333\x202.33989\x2013.6601\x202.96669\x2013.6601\x203.73989V4.66724Z','fillRule':'evenodd','clipRule':_0x1e275a(0x233)}}]},CustomSortSingle=forwardRef(function(_0x2a2155,_0x544317){var _0x813871=_0x1e275a;return createElement(IconBase,Object[_0x813871(0x209)]({},_0x2a2155,{'id':_0x813871(0x23a),'ref':_0x544317,'icon':element$7}));});CustomSortSingle[_0x1e275a(0x15f)]='CustomSortSingle';var element$6={'tag':'svg','attrs':{'fill':_0x1e275a(0x1ab),'viewBox':_0x1e275a(0x25f),'width':'1em','height':_0x1e275a(0x196)},'children':[{'tag':'path','attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x217)}},{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x253),'fillRule':_0x1e275a(0x233),'clipRule':_0x1e275a(0x233)}}]},DeleteEmptySingle=forwardRef(function(_0x57012f,_0x5e51f7){var _0x343aef=_0x1e275a;return createElement(IconBase,Object[_0x343aef(0x209)]({},_0x57012f,{'id':'delete-empty-single','ref':_0x5e51f7,'icon':element$6}));});DeleteEmptySingle[_0x1e275a(0x15f)]='DeleteEmptySingle';var element$5={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':_0x1e275a(0x25f),'width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':'currentColor','d':'M12.4208\x201.53335C12.4208\x201.20198\x2012.1522\x200.93335\x2011.8208\x200.93335C11.4895\x200.93335\x2011.2208\x201.20198\x2011.2208\x201.53335V13.0181L9.97861\x2011.7758C9.7443\x2011.5415\x209.3644\x2011.5415\x209.13008\x2011.7758C8.89577\x2012.0101\x208.89577\x2012.39\x209.13008\x2012.6244L11.3967\x2014.891C11.6311\x2015.1253\x2012.011\x2015.1253\x2012.2453\x2014.891L14.5119\x2012.6244C14.7463\x2012.39\x2014.7463\x2012.0101\x2014.5119\x2011.7758C14.2776\x2011.5415\x2013.8977\x2011.5415\x2013.6634\x2011.7758L12.4208\x2013.0184V1.53335Z'}},{'tag':_0x1e275a(0x268),'attrs':{'fill':'currentColor','d':'M1.98967\x2010.2798C1.6583\x2010.2798\x201.38967\x2010.0112\x201.38967\x209.67983\x201.38967\x209.34846\x201.6583\x209.07983\x201.98967\x209.07983H6.50138C6.74406\x209.07983\x206.96284\x209.22602\x207.05571\x209.45022\x207.14858\x209.67443\x207.09725\x209.9325\x206.92565\x2010.1041L3.43819\x2013.5916H6.50138C6.83276\x2013.5916\x207.10138\x2013.8602\x207.10138\x2014.1916\x207.10138\x2014.5229\x206.83276\x2014.7916\x206.50138\x2014.7916H1.98967C1.74699\x2014.7916\x201.52821\x2014.6454\x201.43534\x2014.4212\x201.34247\x2014.197\x201.3938\x2013.9389\x201.5654\x2013.7673L5.05286\x2010.2798H1.98967zM5.1846\x201.86439C4.8641.989866\x203.62725.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655\x202.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055\x203.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655\x207.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439zM4.98996\x204.82056L4.24567\x202.78971\x203.50138\x204.82056H4.98996z','fillRule':'evenodd','clipRule':_0x1e275a(0x233)}}]},DescendingSingle=forwardRef(function(_0x5a92eb,_0x27a298){var _0x55ad6b=_0x1e275a;return createElement(IconBase,Object[_0x55ad6b(0x209)]({},_0x5a92eb,{'id':'descending-single','ref':_0x27a298,'icon':element$5}));});DescendingSingle[_0x1e275a(0x15f)]=_0x1e275a(0x231);var element$4={'tag':_0x1e275a(0x1d9),'attrs':{'fill':'none','viewBox':_0x1e275a(0x25f),'width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x1f8),'fillRule':_0x1e275a(0x233),'clipRule':'evenodd'}},{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':'M12.4267\x2014.2667C12.4267\x2014.5981\x2012.1581\x2014.8667\x2011.8267\x2014.8667C11.4953\x2014.8667\x2011.2267\x2014.5981\x2011.2267\x2014.2667V3.18198L9.98447\x204.42422C9.75015\x204.65853\x209.37026\x204.65853\x209.13594\x204.42422C8.90163\x204.1899\x208.90163\x203.81\x209.13594\x203.57569L11.4026\x201.30902C11.6369\x201.07471\x2012.0168\x201.07471\x2012.2511\x201.30902L14.5178\x203.57569C14.7521\x203.81\x2014.7521\x204.1899\x2014.5178\x204.42422C14.2835\x204.65853\x2013.9036\x204.65853\x2013.6693\x204.42422L12.4267\x203.18165V14.2667Z'}}]},ExpandAscendingSingle=forwardRef(function(_0x172f43,_0xf2f9ce){var _0xf37d1d=_0x1e275a;return createElement(IconBase,Object[_0xf37d1d(0x209)]({},_0x172f43,{'id':_0xf37d1d(0x187),'ref':_0xf2f9ce,'icon':element$4}));});ExpandAscendingSingle[_0x1e275a(0x15f)]=_0x1e275a(0x165);var element$3={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':'0\x200\x2016\x2016','width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x234),'fillRule':_0x1e275a(0x233),'clipRule':_0x1e275a(0x233)}},{'tag':_0x1e275a(0x268),'attrs':{'fill':'currentColor','d':_0x1e275a(0x1dd)}}]},ExpandDescendingSingle=forwardRef(function(_0x1684e7,_0x308a33){var _0x230935=_0x1e275a;return createElement(IconBase,Object[_0x230935(0x209)]({},_0x1684e7,{'id':_0x230935(0x19c),'ref':_0x308a33,'icon':element$3}));});ExpandDescendingSingle['displayName']='ExpandDescendingSingle';var element$2={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':_0x1e275a(0x25f),'width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':_0x1e275a(0x1cb),'d':_0x1e275a(0x23d)}}]},IncreaseSingle=forwardRef(function(_0x521a1a,_0x517c63){var _0xc207db=_0x1e275a;return createElement(IconBase,Object[_0xc207db(0x209)]({},_0x521a1a,{'id':_0xc207db(0x191),'ref':_0x517c63,'icon':element$2}));});IncreaseSingle[_0x1e275a(0x15f)]='IncreaseSingle';var element$1={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':'0\x200\x2016\x2016','width':'1em','height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x268),'attrs':{'fill':'currentColor','d':_0x1e275a(0x23c),'fillRule':_0x1e275a(0x233),'clipRule':_0x1e275a(0x233)}}]},MoreDownSingle=forwardRef(function(_0x40d874,_0x253d8d){var _0x289ec9=_0x1e275a;return createElement(IconBase,Object[_0x289ec9(0x209)]({},_0x40d874,{'id':'more-down-single','ref':_0x253d8d,'icon':element$1}));});MoreDownSingle[_0x1e275a(0x15f)]=_0x1e275a(0x1e2);var element={'tag':_0x1e275a(0x1d9),'attrs':{'fill':_0x1e275a(0x1ab),'viewBox':_0x1e275a(0x25f),'width':_0x1e275a(0x196),'height':_0x1e275a(0x196)},'children':[{'tag':_0x1e275a(0x25c),'attrs':{'id':_0x1e275a(0x242),'style':{'maskType':_0x1e275a(0x198)},'width':0x10,'height':0x10,'x':0x0,'y':0x0,'maskUnits':_0x1e275a(0x220)},'children':[{'tag':'path','attrs':{'fill':_0x1e275a(0x205),'d':_0x1e275a(0x1dc)}}]},{'tag':'g','attrs':{'fill':_0x1e275a(0x1cb),'mask':'url(#mask0_622_8)'},'children':[{'tag':_0x1e275a(0x268),'attrs':{'d':_0x1e275a(0x1e3)}}]}]},SequenceSingle=forwardRef(function(_0x3945db,_0x4e1250){var _0x3e651e=_0x1e275a;return createElement(IconBase,Object[_0x3e651e(0x209)]({},_0x3945db,{'id':_0x3e651e(0x1de),'ref':_0x4e1250,'icon':element}));});SequenceSingle[_0x1e275a(0x15f)]=_0x1e275a(0x259);const extendConfirmContent=_0x1e275a(0x1bd),extendConfirmRadioGroup=_0x1e275a(0x1f1),customSortPanelContainer='univer-custom-sort-panel-container',customSortPanelExt=_0x1e275a(0x239),addCondition='univer-add-condition',addConditionText='univer-add-condition-text',addConditionDisable=_0x1e275a(0x27b),customSortPanelFooter=_0x1e275a(0x1da),customSortPanelFooterBtn=_0x1e275a(0x20e),customSortPanelItem='univer-custom-sort-panel-item',customSortPanelItemHead=_0x1e275a(0x19b),customSortPanelItemHandler='univer-custom-sort-panel-item-handler',customSortPanelItemRemove=_0x1e275a(0x163),customSortPanelItemColumnInput=_0x1e275a(0x27a),customSortPanelItemColumnInputDropdown=_0x1e275a(0x176),customSortPanelItemColumnInputText='univer-custom-sort-panel-item-column-input-text',customSortPanelItemOrderRadio=_0x1e275a(0x202),customSortPanelItemOrderRadioCn=_0x1e275a(0x18d),conditionList=_0x1e275a(0x282),embedSortBtnContainer=_0x1e275a(0x243),embedSortBtn='univer-embed-sort-btn',embedSortBtnAsc=_0x1e275a(0x1b3),embedSortBtnDesc=_0x1e275a(0x1a3),embedSortBtnIcon=_0x1e275a(0x1a6),customSortColMenu=_0x1e275a(0x175),customSortColMenuItem=_0x1e275a(0x258),customSortColMenuItemDesc='univer-custom-sort-col-menu-item-desc',styles={'extendConfirmContent':extendConfirmContent,'extendConfirmRadioGroup':extendConfirmRadioGroup,'customSortPanelContainer':customSortPanelContainer,'customSortPanelExt':customSortPanelExt,'addCondition':addCondition,'addConditionText':addConditionText,'addConditionDisable':addConditionDisable,'customSortPanelFooter':customSortPanelFooter,'customSortPanelFooterBtn':customSortPanelFooterBtn,'customSortPanelItem':customSortPanelItem,'customSortPanelItemHead':customSortPanelItemHead,'customSortPanelItemHandler':customSortPanelItemHandler,'customSortPanelItemRemove':customSortPanelItemRemove,'customSortPanelItemColumnInput':customSortPanelItemColumnInput,'customSortPanelItemColumnInputDropdown':customSortPanelItemColumnInputDropdown,'customSortPanelItemColumnInputText':customSortPanelItemColumnInputText,'customSortPanelItemOrderRadio':customSortPanelItemOrderRadio,'customSortPanelItemOrderRadioCn':customSortPanelItemOrderRadioCn,'conditionList':conditionList,'embedSortBtnContainer':embedSortBtnContainer,'embedSortBtn':embedSortBtn,'embedSortBtnAsc':embedSortBtnAsc,'embedSortBtnDesc':embedSortBtnDesc,'embedSortBtnIcon':embedSortBtnIcon,'customSortColMenu':customSortColMenu,'customSortColMenuItem':customSortColMenuItem,'customSortColMenuItemDesc':customSortColMenuItemDesc},ExtendConfirm=__name(_0x538c8b=>{var _0x283c34=_0x1e275a;const [_0x425542,_0x7c99c]=useState('0'),_0x25861d=useDependency(LocaleService);return _0xd45298[_0x283c34(0x197)](_0x283c34(0x1ef),{'className':styles[_0x283c34(0x1aa)]},_0xd45298[_0x283c34(0x197)](_0x283c34(0x1ef),{'className':_0x283c34(0x260)},_0x25861d['t'](_0x283c34(0x22c))),_0xd45298[_0x283c34(0x197)](RadioGroup,{'className':styles[_0x283c34(0x16b)],'value':_0x425542,'direction':_0x283c34(0x1c6),'onChange':__name(_0x26ccf1=>{var _0x154d02=_0x283c34;_0x7c99c(_0x26ccf1),_0x538c8b[_0x154d02(0x1d6)](_0x26ccf1);},'onChange')},_0xd45298[_0x283c34(0x197)](Radio,{'value':'0'},_0x25861d['t'](_0x283c34(0x26b))),_0xd45298[_0x283c34(0x197)](Radio,{'value':'1'},_0x25861d['t'](_0x283c34(0x17d)))));},_0x1e275a(0x1a1));var __defProp$2=Object[_0x1e275a(0x1df)],__getOwnPropDesc$2=Object['getOwnPropertyDescriptor'],__decorateClass$2=__name((_0x3445ef,_0x5be6de,_0x50bba2,_0x6f9e1a)=>{var _0x126552=_0x1e275a;for(var _0xd0c034=_0x6f9e1a>0x1?void 0x0:_0x6f9e1a?__getOwnPropDesc$2(_0x5be6de,_0x50bba2):_0x5be6de,_0x39b864=_0x3445ef[_0x126552(0x213)]-0x1,_0x4438fa;_0x39b864>=0x0;_0x39b864--)(_0x4438fa=_0x3445ef[_0x39b864])&&(_0xd0c034=(_0x6f9e1a?_0x4438fa(_0x5be6de,_0x50bba2,_0xd0c034):_0x4438fa(_0xd0c034))||_0xd0c034);return _0x6f9e1a&&_0xd0c034&&__defProp$2(_0x5be6de,_0x50bba2,_0xd0c034),_0xd0c034;},_0x1e275a(0x261)),__decorateParam$2=__name((_0x4c8315,_0x1226e8)=>(_0x587e8f,_0x1bc077)=>_0x1226e8(_0x587e8f,_0x1bc077,_0x4c8315),'__decorateParam$2');const SORT_ERROR_MESSAGE={'MERGE_ERROR':'sheets-sort.error.merge-size','EMPTY_ERROR':_0x1e275a(0x19f),'SINGLE_ERROR':'sheets-sort.error.single','FORMULA_ARRAY':_0x1e275a(0x1ca)};var _a;let SheetsSortUIService=(_a=class extends Disposable{constructor(_0x1c5e26,_0x5eeed2,_0x43426e,_0x4af987,_0x5b30f1,_0x297da5,_0x39ca54){var _0x5dd362=_0x1e275a;super(),__publicField(this,_0x5dd362(0x22a),new BehaviorSubject(null)),__publicField(this,_0x5dd362(0x181),this[_0x5dd362(0x22a)][_0x5dd362(0x17e)]()),(this[_0x5dd362(0x22f)]=_0x1c5e26,this['_confirmService']=_0x5eeed2,this[_0x5dd362(0x237)]=_0x43426e,this[_0x5dd362(0x185)]=_0x4af987,this[_0x5dd362(0x162)]=_0x5b30f1,this[_0x5dd362(0x1ee)]=_0x297da5,this['_commandService']=_0x39ca54);}async[_0x1e275a(0x27c)](_0x1cb682,_0x14170a,_0x177e3d){var _0x5ee4ad=_0x1e275a;const _0x5010bb=_0x177e3d||await this[_0x5ee4ad(0x208)](_0x14170a);if(!_0x5010bb||!this[_0x5ee4ad(0x1b6)](_0x5010bb))return!0x1;const _0x52f651={'orderRules':[{'type':_0x1cb682?SortType['ASC']:SortType['DESC'],'colIndex':_0x5010bb['colIndex']}],'range':_0x5010bb['range']};return this[_0x5ee4ad(0x162)][_0x5ee4ad(0x1f9)](_0x52f651,_0x5010bb[_0x5ee4ad(0x18f)],_0x5010bb[_0x5ee4ad(0x241)]),!0x0;}async[_0x1e275a(0x236)](){var _0x32b57e=_0x1e275a;const _0x581325=await this[_0x32b57e(0x208)]();return!_0x581325||!this[_0x32b57e(0x1b6)](_0x581325)?!0x1:(this[_0x32b57e(0x21b)](_0x581325),!0x0);}[_0x1e275a(0x275)](){var _0x4b05d2=_0x1e275a;return this[_0x4b05d2(0x22a)]['getValue']();}['getTitles'](_0x305845){var _0xfeafce=_0x1e275a,_0xd3e1d,_0x15920a;const _0x52233e=(_0xd3e1d=this[_0xfeafce(0x275)]())==null?void 0x0:_0xd3e1d[_0xfeafce(0x26d)];if(!_0x52233e)return[];const {unitId:_0x3b79da,subUnitId:_0x3bd383,range:_0x190681}=_0x52233e,_0x41fb65=(_0x15920a=this[_0xfeafce(0x22f)][_0xfeafce(0x238)](_0x3b79da))==null?void 0x0:_0x15920a['getSheetBySheetId'](_0x3bd383);if(!_0x41fb65)return[];const _0x557842=colIndexTranslator(this[_0xfeafce(0x1ee)]);return Array['from']({'length':_0x190681['endColumn']-_0x190681[_0xfeafce(0x183)]+0x1},(_0x4957e2,_0x43acd5)=>{var _0x28b3f5=_0xfeafce,_0x4f53cf;const _0x672b54=(_0x4f53cf=_0x41fb65[_0x28b3f5(0x284)](_0x190681[_0x28b3f5(0x172)],_0x43acd5+_0x190681[_0x28b3f5(0x183)]))==null?void 0x0:_0x4f53cf['v'];return{'index':_0x43acd5+_0x190681[_0x28b3f5(0x183)],'label':_0x305845?''+(_0x672b54!=null?_0x672b54:_0x557842(_0x43acd5+_0x190681[_0x28b3f5(0x183)])):_0x557842(_0x43acd5+_0x190681[_0x28b3f5(0x183)])};});}['setSelection'](_0x326cc7,_0x3c7b57,_0x155cb5){var _0x1c3ad4=_0x1e275a,_0x2d796f;const _0x51deff=(_0x2d796f=this[_0x1c3ad4(0x22f)]['getUnit'](_0x326cc7))==null?void 0x0:_0x2d796f[_0x1c3ad4(0x20d)](_0x3c7b57);if(!_0x51deff)return;const _0x4405c2={'unitId':_0x326cc7,'subUnitId':_0x3c7b57,'selections':[{'range':_0x155cb5,'primary':getPrimaryForRange(_0x155cb5,_0x51deff),'style':null}]};this[_0x1c3ad4(0x290)]['executeCommand'](SetSelectionsOperation['id'],_0x4405c2);}async[_0x1e275a(0x171)](_0xe694d7){var _0x241e29=_0x1e275a;return await this['_confirmService']['confirm']({'id':_0x241e29(0x26e),'title':{'title':this[_0x241e29(0x1ee)]['t'](_0x241e29(0x186))},'children':{'title':_0xd45298[_0x241e29(0x197)](_0x241e29(0x1ef),null,this['_localeService']['t'](_0xe694d7))}});}async[_0x1e275a(0x1c0)](){var _0x3d3725=_0x1e275a;let _0x33ed0f=!0x1;return await this[_0x3d3725(0x240)]['confirm']({'id':_0x3d3725(0x16f),'title':{'title':this[_0x3d3725(0x1ee)]['t'](_0x3d3725(0x280))},'children':{'title':_0xd45298[_0x3d3725(0x197)](ExtendConfirm,{'onChange':__name(_0x5e320d=>{_0x33ed0f=_0x5e320d==='1';},'onChange')})},'width':0x190})?_0x33ed0f?_0x3d3725(0x17a):_0x3d3725(0x288):'cancel';}[_0x1e275a(0x21b)](_0x1c17aa){var _0x30f487=_0x1e275a;this[_0x30f487(0x22a)]['next']({'location':_0x1c17aa,'show':!0x0});}[_0x1e275a(0x1a2)](){var _0x25e4c5=_0x1e275a;this[_0x25e4c5(0x22a)][_0x25e4c5(0x1bc)]({'show':!0x1});}['_check'](_0x128921){var _0x3ab1c7=_0x1e275a;return this['_sheetsSortService']['singleCheck'](_0x128921)?this[_0x3ab1c7(0x162)][_0x3ab1c7(0x1bf)](_0x128921)?this['_sheetsSortService'][_0x3ab1c7(0x226)](_0x128921)?this[_0x3ab1c7(0x162)][_0x3ab1c7(0x1f7)](_0x128921)?!0x0:(this['showCheckError'](SORT_ERROR_MESSAGE['EMPTY_ERROR']),!0x1):(this[_0x3ab1c7(0x171)](SORT_ERROR_MESSAGE[_0x3ab1c7(0x28e)]),!0x1):(this['showCheckError'](SORT_ERROR_MESSAGE[_0x3ab1c7(0x27f)]),!0x1):(this[_0x3ab1c7(0x171)](SORT_ERROR_MESSAGE[_0x3ab1c7(0x18a)]),!0x1);}async[_0x1e275a(0x208)](_0x3d049a){var _0x204826=_0x1e275a;const _0x533923=this['_univerInstanceService'][_0x204826(0x222)](UniverInstanceType[_0x204826(0x24e)]),_0xdf0416=_0x533923[_0x204826(0x1f0)](),_0x273495=_0x533923[_0x204826(0x224)](),_0x38cacb=_0xdf0416[_0x204826(0x1e6)](),_0x43c32e=this[_0x204826(0x185)][_0x204826(0x178)]();if(!_0x43c32e)return null;let _0x11d5c4;if(_0x3d049a===!0x0)_0x11d5c4=expandToContinuousRange(_0x43c32e['range'],{'up':!0x0,'down':!0x0,'left':!0x0,'right':!0x0},_0xdf0416),this[_0x204826(0x24c)](_0x273495,_0x38cacb,_0x11d5c4);else{if(_0x3d049a===!0x1)_0x11d5c4=_0x43c32e[_0x204826(0x286)];else{const _0x338316=await this[_0x204826(0x1c0)]();if(_0x338316===_0x204826(0x17b))return null;_0x338316==='keep'?_0x11d5c4=_0x43c32e[_0x204826(0x286)]:(_0x11d5c4=expandToContinuousRange(_0x43c32e[_0x204826(0x286)],{'up':!0x0,'down':!0x0,'left':!0x0,'right':!0x0},_0xdf0416),this[_0x204826(0x24c)](_0x273495,_0x38cacb,_0x11d5c4));}}return{'range':_0x11d5c4,'unitId':_0x273495,'subUnitId':_0x38cacb,'colIndex':_0x43c32e['primary'][_0x204826(0x291)]};}},__name(_a,_0x1e275a(0x28b)),_a);SheetsSortUIService=__decorateClass$2([__decorateParam$2(0x0,IUniverInstanceService),__decorateParam$2(0x1,IConfirmService),__decorateParam$2(0x2,ILogService),__decorateParam$2(0x3,Inject(SheetsSelectionsService)),__decorateParam$2(0x4,Inject(SheetsSortService)),__decorateParam$2(0x5,Inject(LocaleService)),__decorateParam$2(0x6,ICommandService)],SheetsSortUIService);function colIndexTranslator(_0x2bc0f2){return _0x1f1ebf=>{var _0x57d59e=_0x50ca;const _0x14befe=Tools[_0x57d59e(0x244)](_0x1f1ebf);switch(_0x2bc0f2[_0x57d59e(0x25b)]()){case LocaleType[_0x57d59e(0x201)]:return'\x22'+_0x14befe+'\x22列';case LocaleType[_0x57d59e(0x18c)]:return'Column\x20\x22'+_0x14befe+'\x22';default:return _0x57d59e(0x1ed)+_0x14befe+'\x22';}};}__name(colIndexTranslator,_0x1e275a(0x15e));const SortRangeAscCommand={'id':_0x1e275a(0x200),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x421d35=>await _0x421d35[_0x1e275a(0x281)](SheetsSortUIService)[_0x1e275a(0x27c)](!0x0,!0x1),'handler')},SortRangeAscExtCommand={'id':_0x1e275a(0x248),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x3ba502=>await _0x3ba502['get'](SheetsSortUIService)['triggerSortDirectly'](!0x0,!0x0),'handler')},SortRangeDescCommand={'id':_0x1e275a(0x1d8),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x3ed607=>await _0x3ed607[_0x1e275a(0x281)](SheetsSortUIService)['triggerSortDirectly'](!0x1,!0x1),'handler')},SortRangeDescExtCommand={'id':_0x1e275a(0x287),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x5881d5=>await _0x5881d5[_0x1e275a(0x281)](SheetsSortUIService)['triggerSortDirectly'](!0x1,!0x0),_0x1e275a(0x174))},SortRangeCustomCommand={'id':_0x1e275a(0x1b0),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x464f3f=>await _0x464f3f[_0x1e275a(0x281)](SheetsSortUIService)['triggerSortCustomize'](),_0x1e275a(0x174))},SortRangeAscInCtxMenuCommand={'id':'sheet.command.sort-range-asc-ctx','type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x20a857=>await _0x20a857[_0x1e275a(0x281)](SheetsSortUIService)['triggerSortDirectly'](!0x0,!0x1),_0x1e275a(0x174))},SortRangeAscExtInCtxMenuCommand={'id':'sheet.command.sort-range-asc-ext-ctx','type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x5d807e=>await _0x5d807e[_0x1e275a(0x281)](SheetsSortUIService)[_0x1e275a(0x27c)](!0x0,!0x0),_0x1e275a(0x174))},SortRangeDescInCtxMenuCommand={'id':_0x1e275a(0x195),'type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x52c001=>await _0x52c001[_0x1e275a(0x281)](SheetsSortUIService)[_0x1e275a(0x27c)](!0x1,!0x1),_0x1e275a(0x174))},SortRangeDescExtInCtxMenuCommand={'id':'sheet.command.sort-range-desc-ext-ctx','type':CommandType['COMMAND'],'handler':__name(async _0x193f0a=>await _0x193f0a[_0x1e275a(0x281)](SheetsSortUIService)[_0x1e275a(0x27c)](!0x1,!0x0),_0x1e275a(0x174))},SortRangeCustomInCtxMenuCommand={'id':'sheet.command.sort-range-custom-ctx','type':CommandType[_0x1e275a(0x160)],'handler':__name(async _0x20135f=>await _0x20135f[_0x1e275a(0x281)](SheetsSortUIService)[_0x1e275a(0x236)](),_0x1e275a(0x174))};function CustomSortPanel(){var _0x1761cf=_0x1e275a;const _0x10ef1e=useDependency(SheetsSortUIService),_0x2d8199=useDependency(SheetsSortService),_0x12cda4=useDependency(LocaleService),[_0x407714,_0x760995]=useState(!0x1),[_0x34246d,_0x4c939e]=useState(0x0),_0x202983=useRef(null),_0x5a86ca=_0x10ef1e[_0x1761cf(0x275)]();if(!_0x5a86ca||!_0x5a86ca[_0x1761cf(0x26d)])return null;const {range:_0x40fc86,unitId:_0x193d33,subUnitId:_0x2b7622}=_0x5a86ca[_0x1761cf(0x26d)],_0x247074=_0x10ef1e['getTitles'](_0x407714),[_0x5b4e19,_0x228042]=useState([{'type':SortType[_0x1761cf(0x221)],'colIndex':_0x40fc86[_0x1761cf(0x183)]}]),_0x458756=useCallback((_0x304073,_0x5b733a)=>{var _0x1fe80b=_0x1761cf;const _0x1872e3=[..._0x5b4e19];_0x5b733a===null?_0x1872e3[_0x1fe80b(0x17f)](_0x304073,0x1):_0x1872e3[_0x304073]=_0x5b733a,_0x228042(_0x1872e3);},[_0x5b4e19]),_0x95ba30=useCallback(throttle(()=>{var _0xf58070=_0x1761cf;const _0x167751=[..._0x5b4e19],_0x416640=findNextColIndex(_0x40fc86,_0x5b4e19);_0x416640!==null&&(_0x167751[_0xf58070(0x246)]({'type':SortType[_0xf58070(0x221)],'colIndex':_0x416640}),_0x228042(_0x167751));},0xc8),[_0x5b4e19,_0x40fc86]),_0x3e6edb=useCallback((_0x28bd40,_0x498102)=>{var _0x1e4d0c=_0x1761cf;_0x2d8199['applySort']({'range':_0x40fc86,'orderRules':_0x28bd40,'hasTitle':_0x498102}),_0x10ef1e[_0x1e4d0c(0x1a2)]();},[_0x2d8199,_0x10ef1e,_0x40fc86]),_0xc56be1=useCallback(()=>{var _0xe0b32d=_0x1761cf;_0x10ef1e[_0xe0b32d(0x1a2)]();},[_0x10ef1e]),_0x10e989=useCallback(_0x3fd51a=>{var _0x40a7eb=_0x1761cf;_0x760995(_0x3fd51a),_0x3fd51a?_0x10ef1e[_0x40a7eb(0x24c)](_0x193d33,_0x2b7622,{..._0x40fc86,'startRow':_0x40fc86[_0x40a7eb(0x172)]+0x1}):_0x10ef1e[_0x40a7eb(0x24c)](_0x193d33,_0x2b7622,_0x40fc86);},[_0x10ef1e,_0x40fc86,_0x2b7622,_0x193d33]);useEffect(()=>{var _0x200751=_0x1761cf;_0x202983[_0x200751(0x276)]&&_0x5b4e19[_0x200751(0x213)]>0x5&&(_0x202983['current']['scrollTop']=_0x202983[_0x200751(0x276)][_0x200751(0x1e1)]);},[_0x5b4e19]);const _0x407b0d=_0x5b4e19[_0x1761cf(0x213)]<_0x247074[_0x1761cf(0x213)],_0x421d68=_0x5b4e19[_0x1761cf(0x256)](_0x2f80f6=>({..._0x2f80f6,'id':''+_0x2f80f6['colIndex']}));return _0xd45298[_0x1761cf(0x197)](_0x1761cf(0x1ef),{'className':styles[_0x1761cf(0x1a7)]},_0xd45298[_0x1761cf(0x197)](_0x1761cf(0x1ef),{'className':styles[_0x1761cf(0x1d5)],'onMouseDown':__name(_0x225d50=>{var _0x1f0c1c=_0x1761cf;_0x225d50[_0x1f0c1c(0x1c3)]();},_0x1761cf(0x210))},_0xd45298['createElement']('div',{'className':styles[_0x1761cf(0x23e)]},_0xd45298[_0x1761cf(0x197)]('div',{'className':styles[_0x1761cf(0x26f)]},_0xd45298[_0x1761cf(0x197)](Checkbox,{'checked':_0x407714,'onChange':__name(_0x173c54=>_0x10e989(!!_0x173c54),'onChange')},_0x12cda4['t'](_0x1761cf(0x1bb)))),_0x407b0d?_0xd45298[_0x1761cf(0x197)](_0x1761cf(0x1ef),{'className':styles[_0x1761cf(0x1ff)],'onClick':_0x95ba30},_0xd45298[_0x1761cf(0x197)](IncreaseSingle,null),_0xd45298[_0x1761cf(0x197)](_0x1761cf(0x218),{'className':styles[_0x1761cf(0x1cf)]},_0x12cda4['t'](_0x1761cf(0x262)))):_0xd45298[_0x1761cf(0x197)](_0x1761cf(0x1ef),{'className':styles['addCondition']+'\x20'+styles[_0x1761cf(0x1d1)]},_0xd45298[_0x1761cf(0x197)](IncreaseSingle,null),_0xd45298[_0x1761cf(0x197)](_0x1761cf(0x218),{'className':styles[_0x1761cf(0x1cf)]},_0x12cda4['t'](_0x1761cf(0x262))))),_0xd45298[_0x1761cf(0x197)]('div',{'className':styles[_0x1761cf(0x1d2)],'onScroll':__name(_0x2a5424=>{var _0x4dae56=_0x1761cf;const _0x4e27fe=_0x2a5424[_0x4dae56(0x1cc)]['scrollTop'];_0x4c939e(_0x4e27fe);},_0x1761cf(0x16d)),'ref':_0x202983},_0xd45298[_0x1761cf(0x197)](DraggableList,{'list':_0x421d68,'onListChange':_0x228042,'idKey':'id','draggableHandle':'.'+styles[_0x1761cf(0x289)],'itemRender':__name(_0x3d5e9e=>_0xd45298[_0x1761cf(0x197)](SortOptionItem,{'titles':_0x247074,'list':_0x421d68,'item':_0x3d5e9e,'onChange':__name((_0x226bb1,_0x34fe8b)=>_0x458756(_0x34fe8b,_0x226bb1),_0x1761cf(0x1d6)),'scrollPosition':_0x34246d}),_0x1761cf(0x1e9)),'rowHeight':0x20,'margin':[0x0,0xc]}))),_0xd45298[_0x1761cf(0x197)]('div',{'className':styles[_0x1761cf(0x1a9)]},_0xd45298['createElement'](Button,{'className':styles['customSortPanelFooterBtn'],'type':'default','onClick':__name(()=>_0xc56be1(),_0x1761cf(0x1e7))},_0x12cda4['t']('sheets-sort.dialog.cancel')),_0xd45298[_0x1761cf(0x197)](Button,{'className':styles[_0x1761cf(0x184)],'type':_0x1761cf(0x257),'onClick':__name(()=>_0x3e6edb(_0x5b4e19,_0x407714),_0x1761cf(0x1e7))},_0x12cda4['t'](_0x1761cf(0x1ae)))));}__name(CustomSortPanel,_0x1e275a(0x164));function SortOptionItem(_0x3d4b52){var _0x38c278=_0x1e275a,_0x224da8;const {list:_0x46bc88,item:_0x1c8f3e,titles:_0x2e1b72,onChange:_0x344933,scrollPosition:_0x152969}=_0x3d4b52,_0x1582a2=useDependency(LocaleService),_0x22be6a=_0x2e1b72['filter'](_0x27547c=>!_0x46bc88[_0x38c278(0x272)](_0x302fd0=>_0x302fd0['colIndex']===_0x27547c['index'])||_0x27547c[_0x38c278(0x1b9)]===_0x1c8f3e[_0x38c278(0x161)]),_0x59a77a=_0x46bc88[_0x38c278(0x270)](_0x165701=>_0x165701['colIndex']===_0x1c8f3e[_0x38c278(0x161)]),_0x444899=useCallback(_0x153a33=>{var _0x47f31a=_0x38c278;_0x344933({..._0x1c8f3e,'colIndex':_0x153a33[_0x47f31a(0x1b9)]},_0x59a77a),_0x47b720(!0x1);},[_0x59a77a,_0x1c8f3e,_0x344933]),[_0x24e697,_0x47b720]=useState(!0x1),_0x29754e=__name(_0xd08182=>{_0x47b720(_0xd08182);},_0x38c278(0x1d4));useEffect(()=>{_0x47b720(!0x1);},[_0x152969]);const _0x2c7811=_0x46bc88[_0x38c278(0x213)]>0x1,_0x1510d8=(_0x224da8=_0x2e1b72[_0x38c278(0x190)](_0xb104af=>_0xb104af[_0x38c278(0x1b9)]===_0x1c8f3e[_0x38c278(0x161)]))==null?void 0x0:_0x224da8[_0x38c278(0x21f)],_0xbac69d=_0x1582a2[_0x38c278(0x25b)]()===LocaleType['ZH_CN']?styles['customSortPanelItemOrderRadioCn']:styles[_0x38c278(0x23f)];return _0xd45298['createElement'](_0x38c278(0x1ef),{'className':styles[_0x38c278(0x24d)]},_0xd45298[_0x38c278(0x197)](_0x38c278(0x1ef),{'className':styles[_0x38c278(0x214)]},_0xd45298[_0x38c278(0x197)]('div',{'className':styles[_0x38c278(0x289)]},_0xd45298[_0x38c278(0x197)](SequenceSingle,null)),_0xd45298['createElement'](_0x38c278(0x1ef),{'className':styles['customSortPanelItemColumn']},_0xd45298[_0x38c278(0x197)](Dropdown,{'placement':'bottomLeft','trigger':[_0x38c278(0x230)],'visible':_0x24e697,'onVisibleChange':_0x29754e,'overlay':_0xd45298[_0x38c278(0x197)]('ul',{'className':styles[_0x38c278(0x250)]},_0x22be6a[_0x38c278(0x256)](_0x14df1a=>_0xd45298[_0x38c278(0x197)]('li',{'key':_0x14df1a[_0x38c278(0x1b9)],'onClick':__name(()=>_0x444899(_0x14df1a),_0x38c278(0x1e7)),'className':styles[_0x38c278(0x216)]},_0xd45298[_0x38c278(0x197)](_0x38c278(0x218),{'className':styles[_0x38c278(0x279)]},_0x14df1a[_0x38c278(0x21f)]),_0xd45298[_0x38c278(0x197)]('span',{'className':styles[_0x38c278(0x18e)]},_0x14df1a[_0x38c278(0x1b9)]===_0x1c8f3e[_0x38c278(0x161)]&&_0xd45298[_0x38c278(0x197)](CheckMarkSingle,null)))))},_0xd45298[_0x38c278(0x197)](_0x38c278(0x1ef),{'className':styles[_0x38c278(0x1e5)]},_0xd45298[_0x38c278(0x197)]('span',{'className':styles[_0x38c278(0x16e)]},_0x1510d8),_0xd45298[_0x38c278(0x197)](MoreDownSingle,{'className':styles[_0x38c278(0x1fc)]}))))),_0xd45298[_0x38c278(0x197)](_0x38c278(0x1ef),{'className':styles[_0x38c278(0x1f2)]},_0xd45298[_0x38c278(0x197)](RadioGroup,{'className':_0xbac69d,'value':_0x1c8f3e[_0x38c278(0x1d3)],'onChange':__name(_0x1ef4ab=>{_0x344933({..._0x1c8f3e,'type':_0x1ef4ab},_0x59a77a);},_0x38c278(0x1d6))},_0xd45298[_0x38c278(0x197)](Radio,{'value':SortType[_0x38c278(0x221)]},_0x1582a2['t'](_0x38c278(0x25d))),_0xd45298['createElement'](Radio,{'value':SortType[_0x38c278(0x274)]},_0x1582a2['t'](_0x38c278(0x271))))),_0xd45298[_0x38c278(0x197)](_0x38c278(0x1ef),{'className':styles['customSortPanelItemRemove']},_0x2c7811&&_0xd45298[_0x38c278(0x197)](DeleteEmptySingle,{'onClick':__name(()=>_0x344933(null,_0x59a77a),_0x38c278(0x1e7))})));}__name(SortOptionItem,_0x1e275a(0x1fe));function findNextColIndex(_0x206120,_0x1c1281){var _0x203585=_0x1e275a;const {startColumn:_0x217d8b,endColumn:_0x21ed08}=_0x206120,_0x35e40d=new Set(_0x1c1281[_0x203585(0x256)](_0x580677=>_0x580677==null?void 0x0:_0x580677[_0x203585(0x161)]));for(let _0x481461=_0x217d8b;_0x481461<=_0x21ed08;_0x481461++)if(!_0x35e40d[_0x203585(0x23b)](_0x481461))return _0x481461;return null;}__name(findNextColIndex,_0x1e275a(0x22e));function EmbedSortBtn(_0x38aa17){var _0x60b4e5=_0x1e275a;const {range:_0x1eeed7,colIndex:_0x1edf49,onClose:_0x41e16c}=_0x38aa17,_0x44d552=useDependency(SheetsSortUIService),_0x4a20fc=useDependency(IUniverInstanceService),_0x41b208=useDependency(LocaleService),_0x1d7c47=useCallback(_0x3cff93=>{var _0x291ea0=_0x50ca;const {unitId:_0x37f067,subUnitId:_0x2c9fe7}=getSheetCommandTarget(_0x4a20fc)||{};if(_0x1eeed7&&_0x37f067&&_0x2c9fe7){const _0x5176a0={..._0x1eeed7,'startRow':_0x1eeed7[_0x291ea0(0x172)]+0x1};_0x44d552[_0x291ea0(0x27c)](_0x3cff93,!0x1,{'unitId':_0x37f067,'subUnitId':_0x2c9fe7,'range':_0x5176a0,'colIndex':_0x1edf49});}else console[_0x291ea0(0x1fa)](_0x291ea0(0x228)+_0x37f067+',\x20subUnitId:\x20'+_0x2c9fe7+_0x291ea0(0x273)+_0x1eeed7+',\x20colIndex:\x20'+_0x1edf49);_0x41e16c();},[_0x1eeed7,_0x1edf49,_0x44d552,_0x4a20fc,_0x41e16c]);return _0xd45298['createElement']('div',{'className':styles[_0x60b4e5(0x1d7)]},_0xd45298[_0x60b4e5(0x197)](_0x60b4e5(0x1ef),{'className':styles[_0x60b4e5(0x28c)]+'\x20'+styles[_0x60b4e5(0x1c7)],'onClick':__name(()=>_0x1d7c47(!0x0),_0x60b4e5(0x1e7))},_0xd45298[_0x60b4e5(0x197)](AscendingSingle,{'className':styles['embedSortBtnIcon']}),_0x41b208['t']('sheets-sort.general.sort-asc')),_0xd45298['createElement']('div',{'className':styles[_0x60b4e5(0x28c)]+'\x20'+styles[_0x60b4e5(0x25e)],'onClick':__name(()=>_0x1d7c47(!0x1),_0x60b4e5(0x1e7))},_0xd45298[_0x60b4e5(0x197)](DescendingSingle,{'className':styles[_0x60b4e5(0x28a)]}),_0x41b208['t'](_0x60b4e5(0x271))));}__name(EmbedSortBtn,'EmbedSortBtn');const SHEETS_SORT_MENU_ID='sheet.menu.sheets-sort',SHEETS_SORT_CTX_MENU_ID=_0x1e275a(0x1fd),SHEETS_SORT_ASC_ICON='AscendingSingle',SHEETS_SORT_ASC_EXT_ICON=_0x1e275a(0x165),SHEETS_SORT_DESC_ICON='DescendingSingle',SHEETS_SORT_DESC_EXT_ICON='ExpandDescendingSingle',SHEETS_SORT_CUSTOM_ICON='CustomSortSingle';function sortRangeMenuFactory(_0x545949){var _0x4fb372=_0x1e275a;return{'id':SHEETS_SORT_MENU_ID,'type':MenuItemType[_0x4fb372(0x21d)],'icon':SHEETS_SORT_ASC_ICON,'tooltip':_0x4fb372(0x22d),'hidden$':getMenuHiddenObservable(_0x545949,UniverInstanceType[_0x4fb372(0x24e)]),'disabled$':getCurrentRangeDisable$(_0x545949,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeMenuFactory,_0x1e275a(0x251));function sortRangeAscMenuFactory(_0x386b98){var _0xe6abce=_0x1e275a;return{'id':SortRangeAscCommand['id'],'icon':SHEETS_SORT_ASC_ICON,'title':_0xe6abce(0x192),'type':MenuItemType[_0xe6abce(0x1b1)],'hidden$':getCurrentExclusiveRangeInterest$(_0x386b98)};}function _0x2aa7(){var _0x838725=['expand-ascending-single','attrs','CheckMarkSingle','SINGLE_ERROR','sortRangeCtxMenuFactory','EN_US','univer-custom-sort-panel-item-order-radio-cn','customSortColMenuItemCheck','unitId','find','increase-single','sheets-sort.general.sort-asc-cur','UniverIcon','_initMenu','sheet.command.sort-range-desc-ctx','1em','createElement','alpha','sortRangeCustomMenuFactory','show','univer-custom-sort-panel-item-head','expand-descending-single','sortRangeAscExtCtxMenuFactory','4184awOVjL','sheets-sort.error.empty','_closePanel','ExtendConfirm','closeCustomSortPanel','univer-embed-sort-btn-desc','generateShortUuid','propertyIsEnumerable','univer-embed-sort-btn-icon','customSortPanelContainer','920dbbQIt','customSortPanelFooter','extendConfirmContent','none','sortRangeAscExtMenuFactory','_sheetRenderService','sheets-sort.dialog.confirm','5369036BywsVA','sheet.command.sort-range-custom','BUTTON','_initUI','univer-embed-sort-btn-asc','sheets-sort.general.sort-custom','pluginName','_check','concat','registerComponent','index','toString','sheets-sort.dialog.first-row-check','next','univer-extend-confirm-content','AscendingSingle','mergeCheck','showExtendConfirm','sortRangeCustomCtxMenuFactory','use','stopPropagation','DATA','url(#$1','vertical','embedSortBtnAsc','getOwnPropertyDescriptor','_layoutService','sheets-sort.error.formula-array','currentColor','currentTarget','open','symbol','addConditionText','815264YlNTcz','addConditionDisable','conditionList','type','onVisibleChange','customSortPanelContent','onChange','embedSortBtnContainer','sheet.command.sort-range-desc','svg','univer-custom-sort-panel-footer','sortRangeDescExtCtxMenuFactory','M0\x200H16V16H0z','M12.4267\x201.7333C12.4267\x201.40193\x2012.1581\x201.1333\x2011.8267\x201.1333C11.4953\x201.1333\x2011.2267\x201.40193\x2011.2267\x201.7333V12.818L9.98447\x2011.5758C9.75015\x2011.3415\x209.37026\x2011.3415\x209.13594\x2011.5758C8.90163\x2011.8101\x208.90163\x2012.19\x209.13594\x2012.4243L11.4026\x2014.691C11.6369\x2014.9253\x2012.0168\x2014.9253\x2012.2511\x2014.691L14.5178\x2012.4243C14.7521\x2012.19\x2014.7521\x2011.8101\x2014.5178\x2011.5758C14.2835\x2011.3415\x2013.9036\x2011.3415\x2013.6693\x2011.5758L12.4267\x2012.8183V1.7333Z','sequence-single','defineProperty','339792VQFYEj','scrollHeight','MoreDownSingle','M6\x205C6.55228\x205\x207\x204.55228\x207\x204\x207\x203.44772\x206.55228\x203\x206\x203\x205.44772\x203\x205\x203.44772\x205\x204\x205\x204.55228\x205.44772\x205\x206\x205zM6\x209C6.55228\x209\x207\x208.55229\x207\x208\x207\x207.44772\x206.55228\x207\x206\x207\x205.44772\x207\x205\x207.44772\x205\x208\x205\x208.55229\x205.44772\x209\x206\x209zM7\x2012C7\x2012.5523\x206.55228\x2013\x206\x2013\x205.44772\x2013\x205\x2012.5523\x205\x2012\x205\x2011.4477\x205.44772\x2011\x206\x2011\x206.55228\x2011\x207\x2011.4477\x207\x2012zM10\x205C10.5523\x205\x2011\x204.55228\x2011\x204\x2011\x203.44772\x2010.5523\x203\x2010\x203\x209.44771\x203\x209\x203.44772\x209\x204\x209\x204.55228\x209.44771\x205\x2010\x205zM11\x208C11\x208.55229\x2010.5523\x209\x2010\x209\x209.44771\x209\x209\x208.55229\x209\x208\x209\x207.44772\x209.44771\x207\x2010\x207\x2010.5523\x207\x2011\x207.44772\x2011\x208zM10\x2013C10.5523\x2013\x2011\x2012.5523\x2011\x2012\x2011\x2011.4477\x2010.5523\x2011\x2010\x2011\x209.44771\x2011\x209\x2011.4477\x209\x2012\x209\x2012.5523\x209.44771\x2013\x2010\x2013z','replaceRuntimeIdsAndExtInAttrs','customSortPanelItemColumnInput','getSheetId','onClick','colorChannel1','itemRender','M14.1544\x203.75557C14.3887\x203.98988\x2014.3887\x204.36978\x2014.1544\x204.6041L6.51409\x2012.2444C6.40157\x2012.3569\x206.24896\x2012.4201\x206.08983\x2012.4201C5.9307\x2012.4201\x205.77808\x2012.3569\x205.66556\x2012.2444L1.84541\x208.42425C1.6111\x208.18993\x201.6111\x207.81003\x201.84541\x207.57572C2.07973\x207.34141\x202.45963\x207.34141\x202.69394\x207.57572L6.08983\x2010.9716L13.3059\x203.75557C13.5402\x203.52126\x2013.9201\x203.52126\x2014.1544\x203.75557Z','defs','trim','Column\x20\x22','_localeService','div','getActiveSheet','univer-extend-confirm-radio-group','customSortPanelItemOrder','add','sortRangeDescCtxMenuFactory','function','_configService','emptyCheck','M1.9064\x203.20024C1.57503\x203.20024\x201.3064\x202.93161\x201.3064\x202.60024C1.3064\x202.26887\x201.57503\x202.00024\x201.9064\x202.00024H4.57306C4.90443\x202.00024\x205.17306\x202.26887\x205.17306\x202.60024C5.17306\x202.93161\x204.90443\x203.20024\x204.57306\x203.20024H1.9064ZM1.3064\x206.19985C1.3064\x206.53122\x201.57503\x206.79985\x201.9064\x206.79985H5.9064C6.23777\x206.79985\x206.5064\x206.53122\x206.5064\x206.19985C6.5064\x205.86848\x206.23777\x205.59985\x205.9064\x205.59985H1.9064C1.57503\x205.59985\x201.3064\x205.86848\x201.3064\x206.19985ZM1.9064\x2010.3997C1.57503\x2010.3997\x201.3064\x2010.1311\x201.3064\x209.79971C1.3064\x209.46834\x201.57503\x209.19971\x201.9064\x209.19971H7.23973C7.5711\x209.19971\x207.83973\x209.46834\x207.83973\x209.79971C7.83973\x2010.1311\x207.5711\x2010.3997\x207.23973\x2010.3997H1.9064ZM1.9064\x2013.9996C1.57503\x2013.9996\x201.3064\x2013.7309\x201.3064\x2013.3996C1.3064\x2013.0682\x201.57503\x2012.7996\x201.9064\x2012.7996H8.57306C8.90443\x2012.7996\x209.17306\x2013.0682\x209.17306\x2013.3996C9.17306\x2013.7309\x208.90443\x2013.9996\x208.57306\x2013.9996H1.9064Z','applySort','warn','replaceRuntimeIdsInDefs','customSortPanelItemColumnInputDropdown','sheet.menu.sheets-sort-ctx','SortOptionItem','addCondition','sheet.command.sort-range-asc','ZH_CN','univer-custom-sort-panel-item-order-radio','sheets-sort.general.sort-desc-ext','211267IMxaBQ','#D9D9D9','substring','pipe','_detectSortLocation','assign','_config','sortRangeAscMenuFactory','M9.77445\x209.24306L9.77457\x2011.9573C9.77458\x2012.2887\x209.50597\x2012.5574\x209.17459\x2012.5574\x208.84322\x2012.5574\x208.57458\x2012.2888\x208.57457\x2011.9574L8.57439\x207.79509C8.57438\x207.46372\x208.84299\x207.19508\x209.17436\x207.19507\x209.3281\x207.19493\x209.48196\x207.25351\x209.59925\x207.3708L11.3465\x209.11808C11.5808\x209.3524\x2011.5808\x209.7323\x2011.3465\x209.96661\x2011.1122\x2010.2009\x2010.7323\x2010.2009\x2010.498\x209.96661L9.77445\x209.24306zM6.22584\x2010.5094L6.22572\x207.79514C6.22571\x207.46377\x206.49433\x207.19513\x206.8257\x207.19512\x207.15707\x207.1951\x207.42571\x207.46372\x207.42572\x207.79509L7.4259\x2011.9574C7.42592\x2012.2888\x207.1573\x2012.5574\x206.82593\x2012.5574\x206.67228\x2012.5575\x206.51828\x2012.4989\x206.40104\x2012.3817L4.65376\x2010.6344C4.41945\x2010.4001\x204.41945\x2010.0202\x204.65376\x209.78588\x204.88808\x209.55156\x205.26798\x209.55156\x205.50229\x209.78588L6.22584\x2010.5094z','getSheetBySheetId','univer-custom-sort-panel-footer-btn','subscribe','onMouseDown','className','__decorateParam$1','length','customSortPanelItemHead','registerCommand','customSortColMenuItem','M5.3313\x201.4667C5.3313\x201.13533\x205.59993.866699\x205.9313.866699H10.069C10.4004.866699\x2010.669\x201.13533\x2010.669\x201.4667\x2010.669\x201.79807\x2010.4004\x202.0667\x2010.069\x202.0667H5.9313C5.59993\x202.0667\x205.3313\x201.79807\x205.3313\x201.4667zM1.09985\x203.64443C1.09985\x203.31306\x201.36848\x203.04443\x201.69985\x203.04443H14.2999C14.6312\x203.04443\x2014.8999\x203.31306\x2014.8999\x203.64443\x2014.8999\x203.9758\x2014.6312\x204.24443\x2014.2999\x204.24443H1.69985C1.36848\x204.24443\x201.09985\x203.9758\x201.09985\x203.64443z','span','apply','__defNormalProp','showCustomSortPanel','__decorateClass','SUBITEMS','defIds','label','userSpaceOnUse','ASC','getCurrentUnitForType','_uiPartsService','getUnitId','string','formulaCheck','register','Cannot\x20find\x20the\x20target\x20to\x20sort.\x20unitId:\x20','prototype','_customSortState$','_componentManager','sheets-sort.dialog.sort-reminder-desc','sheets-sort.general.sort','findNextColIndex','_univerInstanceService','click','DescendingSingle','disposeWithMe','evenodd','M1.9064\x2012.7998C1.57503\x2012.7998\x201.3064\x2013.0684\x201.3064\x2013.3998C1.3064\x2013.7311\x201.57503\x2013.9998\x201.9064\x2013.9998H4.57306C4.90443\x2013.9998\x205.17306\x2013.7311\x205.17306\x2013.3998C5.17306\x2013.0684\x204.90443\x2012.7998\x204.57306\x2012.7998H1.9064ZM1.3064\x209.80015C1.3064\x209.46878\x201.57503\x209.20015\x201.9064\x209.20015H5.9064C6.23777\x209.20015\x206.5064\x209.46878\x206.5064\x209.80015C6.5064\x2010.1315\x206.23777\x2010.4001\x205.9064\x2010.4001H1.9064C1.57503\x2010.4001\x201.3064\x2010.1315\x201.3064\x209.80015ZM1.9064\x205.60029C1.57503\x205.60029\x201.3064\x205.86892\x201.3064\x206.20029C1.3064\x206.53166\x201.57503\x206.80029\x201.9064\x206.80029H7.23973C7.5711\x206.80029\x207.83973\x206.53166\x207.83973\x206.20029C7.83973\x205.86892\x207.5711\x205.60029\x207.23973\x205.60029H1.9064ZM1.9064\x202.00044C1.57503\x202.00044\x201.3064\x202.26907\x201.3064\x202.60044C1.3064\x202.93181\x201.57503\x203.20044\x201.9064\x203.20044H8.57306C8.90443\x203.20044\x209.17306\x202.93181\x209.17306\x202.60044C9.17306\x202.26907\x208.90443\x202.00044\x208.57306\x202.00044H1.9064Z','__decorateParam','triggerSortCustomize','_logService','getUnit','univer-custom-sort-panel-ext','custom-sort-single','has','M11.3536\x206.14645C11.5488\x206.34171\x2011.5488\x206.65829\x2011.3536\x206.85355L8.35355\x209.85355C8.15829\x2010.0488\x207.84171\x2010.0488\x207.64645\x209.85355L4.64645\x206.85355C4.45118\x206.65829\x204.45118\x206.34171\x204.64645\x206.14645C4.84171\x205.95118\x205.15829\x205.95118\x205.35355\x206.14645L8\x208.79289L10.6464\x206.14645C10.8417\x205.95118\x2011.1583\x205.95118\x2011.3536\x206.14645Z','M8.6\x201.99991C8.60001\x201.66854\x208.33138\x201.39991\x208.00001\x201.3999C7.66864\x201.3999\x207.40001\x201.66853\x207.4\x201.9999L7.39996\x207.3999H1.9999C1.66853\x207.3999\x201.3999\x207.66853\x201.3999\x207.9999C1.3999\x208.33127\x201.66853\x208.5999\x201.9999\x208.5999H7.39995L7.3999\x2013.9999C7.3999\x2014.3313\x207.66853\x2014.5999\x207.9999\x2014.5999C8.33127\x2014.5999\x208.5999\x2014.3313\x208.5999\x2013.9999L8.59995\x208.5999H13.9999C14.3313\x208.5999\x2014.5999\x208.33127\x2014.5999\x207.9999C14.5999\x207.66853\x2014.3313\x207.3999\x2013.9999\x207.3999H8.59996L8.6\x201.99991Z','customSortPanelExt','customSortPanelItemOrderRadio','_confirmService','subUnitId','mask0_622_8','univer-embed-sort-btn-container','chatAtABC','UniverSheetsSortUIPlugin','push','_injector','sheet.command.sort-range-asc-ext','mergeMenu','FORMULAS_INSERT','170JoRGWR','setSelection','customSortPanelItem','UNIVER_SHEET','M12.4208\x2014.4667C12.4208\x2014.798\x2012.1522\x2015.0667\x2011.8208\x2015.0667C11.4895\x2015.0667\x2011.2208\x2014.798\x2011.2208\x2014.4667V2.98193L9.97861\x204.22417C9.7443\x204.45848\x209.3644\x204.45848\x209.13008\x204.22417C8.89577\x203.98985\x208.89577\x203.60995\x209.13008\x203.37564L11.3967\x201.10897C11.6311\x200.874657\x2012.011\x200.874657\x2012.2453\x201.10897L14.5119\x203.37564C14.7463\x203.60995\x2014.7463\x203.98985\x2014.5119\x204.22417C14.2776\x204.45848\x2013.8977\x204.45848\x2013.6634\x204.22417L12.4208\x202.9816V14.4667Z','customSortColMenu','sortRangeMenuFactory','univerjs-icon\x20univerjs-icon-','M4.75332\x205.22217C3.86966\x205.22217\x203.15332\x205.93851\x203.15332\x206.82217V13.1332C3.15332\x2014.2377\x204.04875\x2015.1332\x205.15332\x2015.1332H10.8465C11.9511\x2015.1332\x2012.8465\x2014.2377\x2012.8465\x2013.1331V6.82217C12.8465\x205.93851\x2012.1302\x205.22217\x2011.2465\x205.22217H4.75332ZM4.35332\x206.82217C4.35332\x206.60125\x204.53241\x206.42217\x204.75332\x206.42217H11.2465C11.4674\x206.42217\x2011.6465\x206.60125\x2011.6465\x206.82217V13.1331C11.6465\x2013.575\x2011.2884\x2013.9331\x2010.8465\x2013.9331H5.15332C4.71149\x2013.9331\x204.35332\x2013.575\x204.35332\x2013.1332V6.82217Z','fill','sheets-sort.general.sort-asc-ext','map','primary','univer-custom-sort-col-menu-item','SequenceSingle','forEach','getCurrentLocale','mask','sheets-sort.general.sort-asc','embedSortBtnDesc','0\x200\x2016\x2016','extend-confirm-desc','__decorateClass$2','sheets-sort.dialog.add-condition','hasOwnProperty','indexOf','_sheetsSortUIService','registerSkeletonChangingMutations','SHEET_SORT_UI_PLUGIN','path','_dialogService','entries','sheets-sort.dialog.sort-reminder-no','sheets-sort-ui.config','location','sort-range-check-error','firstRowCheck','findIndex','sheets-sort.general.sort-desc','some',',\x20range:\x20','DESC','customSortState','current','onStarting','_openCustomSortPanel','customSortColMenuItemDesc','univer-custom-sort-panel-item-column-input','univer-add-condition-disable','triggerSortDirectly','getOwnPropertySymbols','close','MERGE_ERROR','sheets-sort.dialog.sort-reminder','get','univer-condition-list','getCustomSortDialogDefaultPosition','getCell','call','range','sheet.command.sort-range-desc-ext','keep','customSortPanelItemHandler','embedSortBtnIcon','SheetsSortUIService','embedSortBtn','_menuManagerService','FORMULA_ARRAY','replace','_commandService','actualColumn','colIndexTranslator','displayName','COMMAND','colIndex','_sheetsSortService','univer-custom-sort-panel-item-remove','CustomSortPanel','ExpandAscendingSingle','sortRangeAscCtxMenuFactory','ascending-\x20single','597933FEGQXa','children','1644054iyNrNW','extendConfirmRadioGroup','tag','onScroll','customSortPanelItemColumnInputText','extend-sort-range-dialog','xlink:href','showCheckError','startRow','FILTER_PANEL_EMBED_POINT','handler','univer-custom-sort-col-menu','univer-custom-sort-panel-item-column-input-dropdown','onClose','getCurrentLastSelection','onRendered','extend','cancel','render','sheets-sort.dialog.sort-reminder-ext','asObservable','splice','icon','customSortState$','focus','startColumn','customSortPanelFooterBtn','_selectionManagerService','info.tooltip'];_0x2aa7=function(){return _0x838725;};return _0x2aa7();}__name(sortRangeAscMenuFactory,_0x1e275a(0x20b));function sortRangeAscExtMenuFactory(_0x4e4078){var _0x563b9d=_0x1e275a;return{'id':SortRangeAscExtCommand['id'],'title':_0x563b9d(0x255),'icon':SHEETS_SORT_ASC_EXT_ICON,'type':MenuItemType['BUTTON']};}__name(sortRangeAscExtMenuFactory,_0x1e275a(0x1ac));function sortRangeDescMenuFactory(_0x4c4aaa){var _0x555d18=_0x1e275a;return{'id':SortRangeDescCommand['id'],'title':'sheets-sort.general.sort-desc-cur','icon':SHEETS_SORT_DESC_ICON,'type':MenuItemType[_0x555d18(0x1b1)]};}__name(sortRangeDescMenuFactory,'sortRangeDescMenuFactory');function sortRangeDescExtMenuFactory(_0x202502){var _0x4a99d7=_0x1e275a;return{'id':SortRangeDescExtCommand['id'],'title':_0x4a99d7(0x203),'icon':SHEETS_SORT_DESC_EXT_ICON,'type':MenuItemType[_0x4a99d7(0x1b1)]};}__name(sortRangeDescExtMenuFactory,'sortRangeDescExtMenuFactory');function sortRangeCustomMenuFactory(_0x1883c3){var _0x57cf0e=_0x1e275a;return{'id':SortRangeCustomCommand['id'],'title':_0x57cf0e(0x1b4),'type':MenuItemType[_0x57cf0e(0x1b1)],'icon':SHEETS_SORT_CUSTOM_ICON};}__name(sortRangeCustomMenuFactory,_0x1e275a(0x199));function sortRangeCtxMenuFactory(_0x507b02){var _0x1541ba=_0x1e275a;return{'id':SHEETS_SORT_CTX_MENU_ID,'title':_0x1541ba(0x22d),'type':MenuItemType[_0x1541ba(0x21d)],'icon':SHEETS_SORT_ASC_ICON,'hidden$':getMenuHiddenObservable(_0x507b02,UniverInstanceType[_0x1541ba(0x24e)]),'disabled$':getCurrentRangeDisable$(_0x507b02,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeCtxMenuFactory,_0x1e275a(0x18b));function sortRangeAscCtxMenuFactory(_0x158192){var _0x19b904=_0x1e275a;return{'id':SortRangeAscInCtxMenuCommand['id'],'title':_0x19b904(0x192),'type':MenuItemType[_0x19b904(0x1b1)],'icon':SHEETS_SORT_ASC_ICON,'disabled$':getCurrentRangeDisable$(_0x158192,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeAscCtxMenuFactory,_0x1e275a(0x166));function sortRangeAscExtCtxMenuFactory(_0x2adc1e){var _0x1fcf05=_0x1e275a;return{'id':SortRangeAscExtInCtxMenuCommand['id'],'title':_0x1fcf05(0x255),'type':MenuItemType[_0x1fcf05(0x1b1)],'icon':SHEETS_SORT_ASC_EXT_ICON,'disabled$':getCurrentRangeDisable$(_0x2adc1e,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeAscExtCtxMenuFactory,_0x1e275a(0x19d));function sortRangeDescCtxMenuFactory(_0x2b5b55){var _0x3a5051=_0x1e275a;return{'id':SortRangeDescInCtxMenuCommand['id'],'title':'sheets-sort.general.sort-desc-cur','type':MenuItemType[_0x3a5051(0x1b1)],'icon':SHEETS_SORT_DESC_ICON,'disabled$':getCurrentRangeDisable$(_0x2b5b55,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeDescCtxMenuFactory,_0x1e275a(0x1f4));function sortRangeDescExtCtxMenuFactory(_0x12ecd3){var _0x1db299=_0x1e275a;return{'id':SortRangeDescExtInCtxMenuCommand['id'],'title':_0x1db299(0x203),'type':MenuItemType['BUTTON'],'icon':SHEETS_SORT_DESC_EXT_ICON,'disabled$':getCurrentRangeDisable$(_0x12ecd3,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeDescExtCtxMenuFactory,_0x1e275a(0x1db));function sortRangeCustomCtxMenuFactory(_0x4a5324){var _0x2361cd=_0x1e275a;return{'id':SortRangeCustomInCtxMenuCommand['id'],'title':_0x2361cd(0x1b4),'type':MenuItemType[_0x2361cd(0x1b1)],'icon':SHEETS_SORT_CUSTOM_ICON,'disabled$':getCurrentRangeDisable$(_0x4a5324,{'workbookTypes':[WorkbookEditablePermission],'worksheetTypes':[WorksheetSortPermission,WorksheetEditPermission],'rangeTypes':[RangeProtectionPermissionEditPoint]})};}__name(sortRangeCustomCtxMenuFactory,_0x1e275a(0x1c1));const menuSchema={[RibbonStartGroup[_0x1e275a(0x24a)]]:{[SHEETS_SORT_MENU_ID]:{'order':0x2,'menuItemFactory':sortRangeMenuFactory,[SortRangeAscCommand['id']]:{'order':0x0,'menuItemFactory':sortRangeAscMenuFactory},[SortRangeAscExtCommand['id']]:{'order':0x1,'menuItemFactory':sortRangeAscExtMenuFactory},[SortRangeDescCommand['id']]:{'order':0x2,'menuItemFactory':sortRangeDescMenuFactory},[SortRangeDescExtCommand['id']]:{'order':0x3,'menuItemFactory':sortRangeDescExtMenuFactory},[SortRangeCustomCommand['id']]:{'order':0x4,'menuItemFactory':sortRangeCustomMenuFactory}}},[ContextMenuPosition['MAIN_AREA']]:{[ContextMenuGroup[_0x1e275a(0x1c4)]]:{[SHEETS_SORT_CTX_MENU_ID]:{'order':0x0,'menuItemFactory':sortRangeCtxMenuFactory,[SortRangeAscInCtxMenuCommand['id']]:{'order':0x0,'menuItemFactory':sortRangeAscCtxMenuFactory},[SortRangeAscExtInCtxMenuCommand['id']]:{'order':0x1,'menuItemFactory':sortRangeAscExtCtxMenuFactory},[SortRangeDescInCtxMenuCommand['id']]:{'order':0x2,'menuItemFactory':sortRangeDescCtxMenuFactory},[SortRangeDescExtInCtxMenuCommand['id']]:{'order':0x3,'menuItemFactory':sortRangeDescExtCtxMenuFactory},[SortRangeCustomInCtxMenuCommand['id']]:{'order':0x4,'menuItemFactory':sortRangeCustomCtxMenuFactory}}}}};var __defProp$1=Object[_0x1e275a(0x1df)],__getOwnPropDesc$1=Object[_0x1e275a(0x1c8)],__decorateClass$1=__name((_0x3b3ed2,_0x512186,_0x31e562,_0x434f74)=>{var _0x53ce3a=_0x1e275a;for(var _0x15d22a=_0x434f74>0x1?void 0x0:_0x434f74?__getOwnPropDesc$1(_0x512186,_0x31e562):_0x512186,_0x521445=_0x3b3ed2[_0x53ce3a(0x213)]-0x1,_0x550f8b;_0x521445>=0x0;_0x521445--)(_0x550f8b=_0x3b3ed2[_0x521445])&&(_0x15d22a=(_0x434f74?_0x550f8b(_0x512186,_0x31e562,_0x15d22a):_0x550f8b(_0x15d22a))||_0x15d22a);return _0x434f74&&_0x15d22a&&__defProp$1(_0x512186,_0x31e562,_0x15d22a),_0x15d22a;},'__decorateClass$1'),__decorateParam$1=__name((_0x10c9dc,_0x4429d2)=>(_0x801e01,_0x241b20)=>_0x4429d2(_0x801e01,_0x241b20,_0x10c9dc),_0x1e275a(0x212));const CUSTOM_SORT_DIALOG_ID='custom-sort-dialog',CUSTOM_SORT_PANEL_WIDTH=0x230;var _a2;let SheetsSortUIController=(_a2=class extends RxDisposable{constructor(_0x45e5b7,_0x1653cf,_0x4989f2,_0x19b570,_0x3b2760,_0x5a025f,_0x13f7ea,_0x5e0f2f,_0x205d50,_0x1d692a){var _0x2c04a1=_0x1e275a;super(),this[_0x2c04a1(0x290)]=_0x45e5b7,this[_0x2c04a1(0x28d)]=_0x1653cf,this[_0x2c04a1(0x269)]=_0x4989f2,this[_0x2c04a1(0x1c9)]=_0x19b570,this['_uiPartsService']=_0x3b2760,this[_0x2c04a1(0x1ad)]=_0x5a025f,this[_0x2c04a1(0x1ee)]=_0x13f7ea,this[_0x2c04a1(0x265)]=_0x5e0f2f,this[_0x2c04a1(0x247)]=_0x205d50,this['_componentManager']=_0x1d692a,this['_initCommands'](),this['_initMenu'](),this[_0x2c04a1(0x1b2)]();}[_0x1e275a(0x194)](){var _0x4f87d8=_0x1e275a;this[_0x4f87d8(0x28d)][_0x4f87d8(0x249)](menuSchema);}['_initCommands'](){var _0x11e049=_0x1e275a;[SortRangeAscCommand,SortRangeAscExtCommand,SortRangeDescCommand,SortRangeDescExtCommand,SortRangeCustomCommand,SortRangeAscInCtxMenuCommand,SortRangeAscExtInCtxMenuCommand,SortRangeDescInCtxMenuCommand,SortRangeDescExtInCtxMenuCommand,SortRangeCustomInCtxMenuCommand][_0x11e049(0x25a)](_0x5907a5=>this['disposeWithMe'](this[_0x11e049(0x290)][_0x11e049(0x215)](_0x5907a5))),this['disposeWithMe'](this[_0x11e049(0x1ad)][_0x11e049(0x266)](SortRangeCommand['id']));}[_0x1e275a(0x1b2)](){var _0x17e9a3=_0x1e275a;this[_0x17e9a3(0x232)](this['_componentManager'][_0x17e9a3(0x227)](_0x17e9a3(0x164),CustomSortPanel)),this[_0x17e9a3(0x232)](this[_0x17e9a3(0x223)][_0x17e9a3(0x1b8)](SheetsUIPart[_0x17e9a3(0x173)],()=>connectInjector(EmbedSortBtn,this[_0x17e9a3(0x247)]))),this['disposeWithMe'](this['_componentManager'][_0x17e9a3(0x227)](SHEETS_SORT_ASC_ICON,AscendingSingle)),this['disposeWithMe'](this[_0x17e9a3(0x22b)][_0x17e9a3(0x227)](SHEETS_SORT_ASC_EXT_ICON,ExpandAscendingSingle)),this['disposeWithMe'](this[_0x17e9a3(0x22b)][_0x17e9a3(0x227)](SHEETS_SORT_DESC_ICON,DescendingSingle)),this[_0x17e9a3(0x232)](this['_componentManager'][_0x17e9a3(0x227)](SHEETS_SORT_DESC_EXT_ICON,ExpandDescendingSingle)),this[_0x17e9a3(0x232)](this[_0x17e9a3(0x22b)][_0x17e9a3(0x227)](SHEETS_SORT_CUSTOM_ICON,CustomSortSingle)),this['_sheetsSortUIService']['customSortState$'][_0x17e9a3(0x207)](takeUntil(this['dispose$']))[_0x17e9a3(0x20f)](_0x3fc3f2=>{var _0x4029ef=_0x17e9a3;_0x3fc3f2&&_0x3fc3f2[_0x4029ef(0x19a)]&&_0x3fc3f2['location']?this[_0x4029ef(0x278)](_0x3fc3f2[_0x4029ef(0x26d)]):_0x3fc3f2&&!(_0x3fc3f2!=null&&_0x3fc3f2[_0x4029ef(0x19a)])&&this[_0x4029ef(0x1a0)]();});}[_0x1e275a(0x278)](_0x4ee004){var _0x5ad875=_0x1e275a;this[_0x5ad875(0x269)][_0x5ad875(0x1cd)]({'id':CUSTOM_SORT_DIALOG_ID,'draggable':!0x0,'width':CUSTOM_SORT_PANEL_WIDTH,'title':{'title':this[_0x5ad875(0x1ee)]['t'](_0x5ad875(0x1b4))+':\x20'+serializeRange(_0x4ee004[_0x5ad875(0x286)])},'children':{'label':_0x5ad875(0x164)},'destroyOnClose':!0x0,'defaultPosition':getCustomSortDialogDefaultPosition(),'preservePositionOnDestroy':!0x1,'onClose':__name(()=>this[_0x5ad875(0x1a0)](),_0x5ad875(0x177)),'mask':!0x0});}['_closePanel'](){var _0x41792d=_0x1e275a;this['_dialogService'][_0x41792d(0x27e)](CUSTOM_SORT_DIALOG_ID),queueMicrotask(()=>this[_0x41792d(0x1c9)][_0x41792d(0x182)]());}},__name(_a2,'SheetsSortUIController'),_a2);SheetsSortUIController=__decorateClass$1([__decorateParam$1(0x0,ICommandService),__decorateParam$1(0x1,IMenuManagerService),__decorateParam$1(0x2,IDialogService),__decorateParam$1(0x3,ILayoutService),__decorateParam$1(0x4,IUIPartsService),__decorateParam$1(0x5,Inject(SheetsRenderService)),__decorateParam$1(0x6,Inject(LocaleService)),__decorateParam$1(0x7,Inject(SheetsSortUIService)),__decorateParam$1(0x8,Inject(Injector)),__decorateParam$1(0x9,Inject(ComponentManager))],SheetsSortUIController);function getCustomSortDialogDefaultPosition(){return{'x':0x0,'y':0x0};}__name(getCustomSortDialogDefaultPosition,_0x1e275a(0x283));var __defProp2=Object[_0x1e275a(0x1df)],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__defNormalProp2=__name((_0x2c4e52,_0x199c57,_0x11a9ef)=>_0x199c57 in _0x2c4e52?__defProp2(_0x2c4e52,_0x199c57,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11a9ef}):_0x2c4e52[_0x199c57]=_0x11a9ef,_0x1e275a(0x21a)),__decorateClass=__name((_0x4aaeda,_0x48e89c,_0x41df32,_0x506d08)=>{var _0x54a117=_0x1e275a;for(var _0x4cbaef=_0x506d08>0x1?void 0x0:_0x506d08?__getOwnPropDesc(_0x48e89c,_0x41df32):_0x48e89c,_0x1ee482=_0x4aaeda[_0x54a117(0x213)]-0x1,_0x8eaaa4;_0x1ee482>=0x0;_0x1ee482--)(_0x8eaaa4=_0x4aaeda[_0x1ee482])&&(_0x4cbaef=(_0x506d08?_0x8eaaa4(_0x48e89c,_0x41df32,_0x4cbaef):_0x8eaaa4(_0x4cbaef))||_0x4cbaef);return _0x506d08&&_0x4cbaef&&__defProp2(_0x48e89c,_0x41df32,_0x4cbaef),_0x4cbaef;},_0x1e275a(0x21c)),__decorateParam=__name((_0x21ce70,_0x43488f)=>(_0x1de358,_0x2a8fd0)=>_0x43488f(_0x1de358,_0x2a8fd0,_0x21ce70),_0x1e275a(0x235)),__publicField2=__name((_0x2e6abd,_0x2ee7d9,_0x222782)=>__defNormalProp2(_0x2e6abd,typeof _0x2ee7d9!=_0x1e275a(0x1ce)?_0x2ee7d9+'':_0x2ee7d9,_0x222782),'__publicField');const NAME=_0x1e275a(0x267);var _a3;let UniverSheetsSortUIPlugin=(_a3=class extends Plugin{constructor(_0x35307d=defaultPluginConfig,_0x3cf11d,_0x149ef7){var _0x447a0d=_0x1e275a;super(),this[_0x447a0d(0x20a)]=_0x35307d,this[_0x447a0d(0x247)]=_0x3cf11d,this[_0x447a0d(0x1f6)]=_0x149ef7;const {..._0x25cc92}=this[_0x447a0d(0x20a)];this[_0x447a0d(0x1f6)]['setConfig'](PLUGIN_CONFIG_KEY,_0x25cc92);}[_0x1e275a(0x277)](){var _0x1dc1fb=_0x1e275a;[[SheetsSortUIService],[SheetsSortUIController]]['forEach'](_0x89bad0=>this[_0x1dc1fb(0x247)][_0x1dc1fb(0x1f3)](_0x89bad0));}[_0x1e275a(0x179)](){var _0x47444c=_0x1e275a;this[_0x47444c(0x247)][_0x47444c(0x281)](SheetsSortUIController);}},__name(_a3,_0x1e275a(0x245)),_a3);__publicField2(UniverSheetsSortUIPlugin,_0x1e275a(0x1d3),UniverInstanceType[_0x1e275a(0x24e)]),__publicField2(UniverSheetsSortUIPlugin,_0x1e275a(0x1b5),NAME),UniverSheetsSortUIPlugin=__decorateClass([DependentOn(UniverSheetsSortPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverSheetsSortUIPlugin);export{SortRangeAscCommand,SortRangeAscExtCommand,SortRangeAscExtInCtxMenuCommand,SortRangeAscInCtxMenuCommand,SortRangeCustomCommand,SortRangeCustomInCtxMenuCommand,SortRangeDescCommand,SortRangeDescExtCommand,SortRangeDescExtInCtxMenuCommand,SortRangeDescInCtxMenuCommand,UniverSheetsSortUIPlugin};
|