@univerjs/sheets-sort-ui 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +30 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +30 -1169
- package/lib/es/locale/ca-ES.js +1 -33
- package/lib/es/locale/en-US.js +1 -33
- package/lib/es/locale/es-ES.js +1 -33
- package/lib/es/locale/fa-IR.js +1 -33
- package/lib/es/locale/fr-FR.js +1 -33
- package/lib/es/locale/ja-JP.js +1 -33
- package/lib/es/locale/ko-KR.js +1 -33
- package/lib/es/locale/ru-RU.js +1 -33
- package/lib/es/locale/sk-SK.js +1 -33
- package/lib/es/locale/vi-VN.js +1 -33
- package/lib/es/locale/zh-CN.js +1 -33
- package/lib/es/locale/zh-TW.js +1 -33
- package/lib/index.css +238 -1
- package/lib/index.js +30 -1169
- package/lib/locale/ca-ES.js +1 -33
- package/lib/locale/en-US.js +1 -33
- package/lib/locale/es-ES.js +1 -33
- package/lib/locale/fa-IR.js +1 -33
- package/lib/locale/fr-FR.js +1 -33
- package/lib/locale/ja-JP.js +1 -33
- package/lib/locale/ko-KR.js +1 -33
- package/lib/locale/ru-RU.js +1 -33
- package/lib/locale/sk-SK.js +1 -33
- package/lib/locale/vi-VN.js +1 -33
- package/lib/locale/zh-CN.js +1 -33
- package/lib/locale/zh-TW.js +1 -33
- package/lib/types/commands/commands/sheets-sort.command.d.ts +16 -1
- package/lib/types/config/config.d.ts +16 -1
- package/lib/types/controllers/sheets-sort-ui.controller.d.ts +17 -1
- package/lib/types/locale/ca-ES.d.ts +16 -1
- package/lib/types/locale/es-ES.d.ts +16 -1
- package/lib/types/locale/fa-IR.d.ts +16 -1
- package/lib/types/locale/fr-FR.d.ts +16 -1
- package/lib/types/locale/ja-JP.d.ts +16 -1
- package/lib/types/locale/ko-KR.d.ts +16 -1
- package/lib/types/locale/ru-RU.d.ts +16 -1
- package/lib/types/locale/sk-SK.d.ts +16 -1
- package/lib/types/locale/vi-VN.d.ts +16 -1
- package/lib/types/locale/zh-CN.d.ts +16 -1
- package/lib/types/locale/zh-TW.d.ts +16 -1
- package/lib/types/menu/schema.d.ts +16 -1
- package/lib/types/menu/sheets-sort.menu.d.ts +17 -2
- package/lib/types/plugin.d.ts +16 -1
- package/lib/types/services/sheets-sort-ui.service.d.ts +20 -3
- package/lib/types/views/CustomSortPanel.d.ts +17 -2
- package/lib/types/views/EmbedSortBtn.d.ts +16 -1
- package/lib/umd/index.js +30 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -13
package/lib/es/index.js
CHANGED
|
@@ -1,1169 +1,30 @@
|
|
|
1
|
-
var Ge = Object.defineProperty;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] });
|
|
34
|
-
};
|
|
35
|
-
var bt = Object.getOwnPropertyDescriptor, Ot = (e, t, r, n) => {
|
|
36
|
-
for (var o = n > 1 ? void 0 : n ? bt(t, r) : t, s = e.length - 1, i; s >= 0; s--)
|
|
37
|
-
(i = e[s]) && (o = i(o) || o);
|
|
38
|
-
return o;
|
|
39
|
-
}, D = (e, t) => (r, n) => t(r, n, e);
|
|
40
|
-
const F = {
|
|
41
|
-
MERGE_ERROR: "sheets-sort.error.merge-size",
|
|
42
|
-
EMPTY_ERROR: "sheets-sort.error.empty",
|
|
43
|
-
SINGLE_ERROR: "sheets-sort.error.single",
|
|
44
|
-
FORMULA_ARRAY: "sheets-sort.error.formula-array"
|
|
45
|
-
};
|
|
46
|
-
let C = class extends ze {
|
|
47
|
-
constructor(t, r, n, o, s, i) {
|
|
48
|
-
super();
|
|
49
|
-
X(this, "_customSortState$", new at(null));
|
|
50
|
-
X(this, "customSortState$", this._customSortState$.asObservable());
|
|
51
|
-
this._univerInstanceService = t, this._confirmService = r, this._selectionManagerService = n, this._sheetsSortService = o, this._localeService = s, this._commandService = i;
|
|
52
|
-
}
|
|
53
|
-
async triggerSortDirectly(t, r, n) {
|
|
54
|
-
const o = n || await this._detectSortLocation(r);
|
|
55
|
-
if (!o || !this._check(o))
|
|
56
|
-
return !1;
|
|
57
|
-
const i = {
|
|
58
|
-
orderRules: [{
|
|
59
|
-
type: t ? $.ASC : $.DESC,
|
|
60
|
-
colIndex: o.colIndex
|
|
61
|
-
}],
|
|
62
|
-
range: o.range
|
|
63
|
-
};
|
|
64
|
-
return this._sheetsSortService.applySort(i, o.unitId, o.subUnitId), !0;
|
|
65
|
-
}
|
|
66
|
-
async triggerSortCustomize() {
|
|
67
|
-
const t = await this._detectSortLocation();
|
|
68
|
-
return !t || !this._check(t) ? !1 : (this.showCustomSortPanel(t), !0);
|
|
69
|
-
}
|
|
70
|
-
customSortState() {
|
|
71
|
-
return this._customSortState$.getValue();
|
|
72
|
-
}
|
|
73
|
-
getTitles(t) {
|
|
74
|
-
var l, u;
|
|
75
|
-
const r = (l = this.customSortState()) == null ? void 0 : l.location;
|
|
76
|
-
if (!r)
|
|
77
|
-
return [];
|
|
78
|
-
const { unitId: n, subUnitId: o, range: s } = r, i = (u = this._univerInstanceService.getUnit(n)) == null ? void 0 : u.getSheetBySheetId(o);
|
|
79
|
-
if (!i)
|
|
80
|
-
return [];
|
|
81
|
-
const a = Nt(this._localeService);
|
|
82
|
-
return Array.from({ length: s.endColumn - s.startColumn + 1 }, (y, v) => {
|
|
83
|
-
var m;
|
|
84
|
-
const E = (m = i.getCell(s.startRow, v + s.startColumn)) == null ? void 0 : m.v;
|
|
85
|
-
return {
|
|
86
|
-
index: v + s.startColumn,
|
|
87
|
-
label: t ? `${E != null ? E : a(v + s.startColumn)}` : a(v + s.startColumn)
|
|
88
|
-
};
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
setSelection(t, r, n) {
|
|
92
|
-
var i;
|
|
93
|
-
const o = (i = this._univerInstanceService.getUnit(t)) == null ? void 0 : i.getSheetBySheetId(r);
|
|
94
|
-
if (!o)
|
|
95
|
-
return;
|
|
96
|
-
const s = {
|
|
97
|
-
unitId: t,
|
|
98
|
-
subUnitId: r,
|
|
99
|
-
selections: [{ range: n, primary: nt(n, o), style: null }]
|
|
100
|
-
};
|
|
101
|
-
this._commandService.executeCommand(ot.id, s);
|
|
102
|
-
}
|
|
103
|
-
async showCheckError(t) {
|
|
104
|
-
return await this._confirmService.confirm({
|
|
105
|
-
id: "sort-range-check-error",
|
|
106
|
-
title: {
|
|
107
|
-
title: this._localeService.t("info.tooltip")
|
|
108
|
-
},
|
|
109
|
-
children: {
|
|
110
|
-
title: /* @__PURE__ */ c("div", { children: this._localeService.t(t) })
|
|
111
|
-
},
|
|
112
|
-
cancelText: this._localeService.t("sheets-sort.dialog.cancel"),
|
|
113
|
-
confirmText: this._localeService.t("sheets-sort.dialog.confirm")
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
async showExtendConfirm() {
|
|
117
|
-
let t = !1;
|
|
118
|
-
return await this._confirmService.confirm({
|
|
119
|
-
id: "extend-sort-range-dialog",
|
|
120
|
-
title: {
|
|
121
|
-
title: this._localeService.t("sheets-sort.dialog.sort-reminder")
|
|
122
|
-
},
|
|
123
|
-
children: {
|
|
124
|
-
title: /* @__PURE__ */ c(
|
|
125
|
-
Tt,
|
|
126
|
-
{
|
|
127
|
-
onChange: (n) => {
|
|
128
|
-
t = n === "1";
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
},
|
|
133
|
-
width: 400,
|
|
134
|
-
cancelText: this._localeService.t("sheets-sort.dialog.cancel"),
|
|
135
|
-
confirmText: this._localeService.t("sheets-sort.dialog.confirm")
|
|
136
|
-
}) ? t ? "extend" : "keep" : "cancel";
|
|
137
|
-
}
|
|
138
|
-
showCustomSortPanel(t) {
|
|
139
|
-
this._customSortState$.next({ location: t, show: !0 });
|
|
140
|
-
}
|
|
141
|
-
closeCustomSortPanel() {
|
|
142
|
-
this._customSortState$.next({ show: !1 });
|
|
143
|
-
}
|
|
144
|
-
_check(t) {
|
|
145
|
-
return this._sheetsSortService.singleCheck(t) ? this._sheetsSortService.mergeCheck(t) ? this._sheetsSortService.formulaCheck(t) ? this._sheetsSortService.emptyCheck(t) ? !0 : (this.showCheckError(F.EMPTY_ERROR), !1) : (this.showCheckError(F.FORMULA_ARRAY), !1) : (this.showCheckError(F.MERGE_ERROR), !1) : (this.showCheckError(F.SINGLE_ERROR), !1);
|
|
146
|
-
}
|
|
147
|
-
async _detectSortLocation(t) {
|
|
148
|
-
const r = this._univerInstanceService.getCurrentUnitForType(q.UNIVER_SHEET), n = r.getActiveSheet(), o = r.getUnitId(), s = n.getSheetId(), i = this._selectionManagerService.getCurrentLastSelection();
|
|
149
|
-
if (!i)
|
|
150
|
-
return null;
|
|
151
|
-
let a;
|
|
152
|
-
if (t === !0)
|
|
153
|
-
a = fe(i.range, { up: !0, down: !0, left: !0, right: !0 }, n), this.setSelection(o, s, a);
|
|
154
|
-
else if (t === !1)
|
|
155
|
-
a = i.range;
|
|
156
|
-
else {
|
|
157
|
-
const l = await this.showExtendConfirm();
|
|
158
|
-
if (l === "cancel")
|
|
159
|
-
return null;
|
|
160
|
-
l === "keep" ? a = i.range : (a = fe(i.range, { up: !0, down: !0, left: !0, right: !0 }, n), this.setSelection(o, s, a));
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
range: a,
|
|
164
|
-
unitId: o,
|
|
165
|
-
subUnitId: s,
|
|
166
|
-
colIndex: i.primary.actualColumn
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
C = Ot([
|
|
171
|
-
D(0, ye),
|
|
172
|
-
D(1, qe),
|
|
173
|
-
D(2, M(rt)),
|
|
174
|
-
D(3, M(we)),
|
|
175
|
-
D(4, M(U)),
|
|
176
|
-
D(5, _e)
|
|
177
|
-
], C);
|
|
178
|
-
function Nt(e) {
|
|
179
|
-
return (t) => {
|
|
180
|
-
const r = Ye.chatAtABC(t);
|
|
181
|
-
switch (e.getCurrentLocale()) {
|
|
182
|
-
case ve.ZH_CN:
|
|
183
|
-
return `"${r}"列`;
|
|
184
|
-
case ve.EN_US:
|
|
185
|
-
return `Column "${r}"`;
|
|
186
|
-
default:
|
|
187
|
-
return `Column "${r}"`;
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
const Q = {
|
|
192
|
-
id: "sheet.command.sort-range-asc",
|
|
193
|
-
type: I.COMMAND,
|
|
194
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!0, !1)
|
|
195
|
-
}, ee = {
|
|
196
|
-
id: "sheet.command.sort-range-asc-ext",
|
|
197
|
-
type: I.COMMAND,
|
|
198
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!0, !0)
|
|
199
|
-
}, te = {
|
|
200
|
-
id: "sheet.command.sort-range-desc",
|
|
201
|
-
type: I.COMMAND,
|
|
202
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!1, !1)
|
|
203
|
-
}, re = {
|
|
204
|
-
id: "sheet.command.sort-range-desc-ext",
|
|
205
|
-
type: I.COMMAND,
|
|
206
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!1, !0)
|
|
207
|
-
}, ne = {
|
|
208
|
-
id: "sheet.command.sort-range-custom",
|
|
209
|
-
type: I.COMMAND,
|
|
210
|
-
handler: async (e) => await e.get(C).triggerSortCustomize()
|
|
211
|
-
}, oe = {
|
|
212
|
-
id: "sheet.command.sort-range-asc-ctx",
|
|
213
|
-
type: I.COMMAND,
|
|
214
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!0, !1)
|
|
215
|
-
}, se = {
|
|
216
|
-
id: "sheet.command.sort-range-asc-ext-ctx",
|
|
217
|
-
type: I.COMMAND,
|
|
218
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!0, !0)
|
|
219
|
-
}, ie = {
|
|
220
|
-
id: "sheet.command.sort-range-desc-ctx",
|
|
221
|
-
type: I.COMMAND,
|
|
222
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!1, !1)
|
|
223
|
-
}, ce = {
|
|
224
|
-
id: "sheet.command.sort-range-desc-ext-ctx",
|
|
225
|
-
type: I.COMMAND,
|
|
226
|
-
handler: async (e) => await e.get(C).triggerSortDirectly(!1, !0)
|
|
227
|
-
}, ae = {
|
|
228
|
-
id: "sheet.command.sort-range-custom-ctx",
|
|
229
|
-
type: I.COMMAND,
|
|
230
|
-
handler: async (e) => await e.get(C).triggerSortCustomize()
|
|
231
|
-
}, kt = "@univerjs/sheets-sort-ui", Lt = "0.17.0", Oe = {
|
|
232
|
-
name: kt,
|
|
233
|
-
version: Lt
|
|
234
|
-
}, Dt = "sheets-sort-ui.config", Se = {};
|
|
235
|
-
function x({ ref: e, ...t }) {
|
|
236
|
-
const { icon: r, id: n, className: o, extend: s, ...i } = t, a = `univerjs-icon univerjs-icon-${n} ${o || ""}`.trim(), l = Te(`_${Ut()}`);
|
|
237
|
-
return Ne(r, `${n}`, {
|
|
238
|
-
defIds: r.defIds,
|
|
239
|
-
idSuffix: l.current
|
|
240
|
-
}, {
|
|
241
|
-
ref: e,
|
|
242
|
-
className: a,
|
|
243
|
-
...i
|
|
244
|
-
}, s);
|
|
245
|
-
}
|
|
246
|
-
function Ne(e, t, r, n, o) {
|
|
247
|
-
return p(e.tag, {
|
|
248
|
-
key: t,
|
|
249
|
-
...$t(e, r, o),
|
|
250
|
-
...n
|
|
251
|
-
}, (Ht(e, r).children || []).map((s, i) => Ne(s, `${t}-${e.tag}-${i}`, r, void 0, o)));
|
|
252
|
-
}
|
|
253
|
-
function $t(e, t, r) {
|
|
254
|
-
const n = { ...e.attrs };
|
|
255
|
-
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(([s, i]) => {
|
|
256
|
-
s === "mask" && typeof i == "string" && (n[s] = i.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
257
|
-
});
|
|
258
|
-
const { defIds: o } = t;
|
|
259
|
-
return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(([s, i]) => {
|
|
260
|
-
typeof i == "string" && (n[s] = i.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
261
|
-
})), n;
|
|
262
|
-
}
|
|
263
|
-
function Ht(e, t) {
|
|
264
|
-
var n;
|
|
265
|
-
const { defIds: r } = t;
|
|
266
|
-
return !r || r.length === 0 ? e : e.tag === "defs" && ((n = e.children) != null && n.length) ? {
|
|
267
|
-
...e,
|
|
268
|
-
children: e.children.map((o) => typeof o.attrs.id == "string" && r && r.includes(o.attrs.id) ? {
|
|
269
|
-
...o,
|
|
270
|
-
attrs: {
|
|
271
|
-
...o.attrs,
|
|
272
|
-
id: o.attrs.id + t.idSuffix
|
|
273
|
-
}
|
|
274
|
-
} : o)
|
|
275
|
-
} : e;
|
|
276
|
-
}
|
|
277
|
-
function Ut() {
|
|
278
|
-
return Math.random().toString(36).substring(2, 8);
|
|
279
|
-
}
|
|
280
|
-
x.displayName = "UniverIcon";
|
|
281
|
-
const At = {
|
|
282
|
-
tag: "svg",
|
|
283
|
-
attrs: {
|
|
284
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
285
|
-
fill: "none",
|
|
286
|
-
viewBox: "0 0 16 16",
|
|
287
|
-
width: "1em",
|
|
288
|
-
height: "1em"
|
|
289
|
-
},
|
|
290
|
-
children: [
|
|
291
|
-
{
|
|
292
|
-
tag: "path",
|
|
293
|
-
attrs: {
|
|
294
|
-
fill: "currentColor",
|
|
295
|
-
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"
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
tag: "path",
|
|
300
|
-
attrs: {
|
|
301
|
-
fill: "currentColor",
|
|
302
|
-
d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z",
|
|
303
|
-
fillRule: "evenodd",
|
|
304
|
-
clipRule: "evenodd"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
tag: "path",
|
|
309
|
-
attrs: {
|
|
310
|
-
fill: "currentColor",
|
|
311
|
-
d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z",
|
|
312
|
-
fillRule: "evenodd",
|
|
313
|
-
clipRule: "evenodd"
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
]
|
|
317
|
-
}, le = w(function(t, r) {
|
|
318
|
-
return p(x, Object.assign({}, t, {
|
|
319
|
-
id: "ascending-icon",
|
|
320
|
-
ref: r,
|
|
321
|
-
icon: At
|
|
322
|
-
}));
|
|
323
|
-
});
|
|
324
|
-
le.displayName = "AscendingIcon";
|
|
325
|
-
const Pt = {
|
|
326
|
-
tag: "svg",
|
|
327
|
-
attrs: {
|
|
328
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
329
|
-
fill: "none",
|
|
330
|
-
viewBox: "0 0 16 16",
|
|
331
|
-
width: "1em",
|
|
332
|
-
height: "1em"
|
|
333
|
-
},
|
|
334
|
-
children: [{
|
|
335
|
-
tag: "path",
|
|
336
|
-
attrs: {
|
|
337
|
-
fill: "currentColor",
|
|
338
|
-
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",
|
|
339
|
-
fillRule: "evenodd",
|
|
340
|
-
clipRule: "evenodd"
|
|
341
|
-
}
|
|
342
|
-
}]
|
|
343
|
-
}, ke = w(function(t, r) {
|
|
344
|
-
return p(x, Object.assign({}, t, {
|
|
345
|
-
id: "check-mark-icon",
|
|
346
|
-
ref: r,
|
|
347
|
-
icon: Pt
|
|
348
|
-
}));
|
|
349
|
-
});
|
|
350
|
-
ke.displayName = "CheckMarkIcon";
|
|
351
|
-
const Zt = {
|
|
352
|
-
tag: "svg",
|
|
353
|
-
attrs: {
|
|
354
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
355
|
-
fill: "none",
|
|
356
|
-
viewBox: "0 0 16 16",
|
|
357
|
-
width: "1em",
|
|
358
|
-
height: "1em"
|
|
359
|
-
},
|
|
360
|
-
children: [
|
|
361
|
-
{
|
|
362
|
-
tag: "path",
|
|
363
|
-
attrs: {
|
|
364
|
-
fill: "currentColor",
|
|
365
|
-
d: "M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.5574C8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507C9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661C11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306Z"
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
tag: "path",
|
|
370
|
-
attrs: {
|
|
371
|
-
fill: "currentColor",
|
|
372
|
-
d: "M6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512C7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574C6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588C4.88808 9.55156 5.26798 9.55156 5.50229 9.78588L6.22584 10.5094Z"
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
tag: "path",
|
|
377
|
-
attrs: {
|
|
378
|
-
fill: "currentColor",
|
|
379
|
-
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",
|
|
380
|
-
fillRule: "evenodd",
|
|
381
|
-
clipRule: "evenodd"
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
]
|
|
385
|
-
}, Le = w(function(t, r) {
|
|
386
|
-
return p(x, Object.assign({}, t, {
|
|
387
|
-
id: "custom-sort-icon",
|
|
388
|
-
ref: r,
|
|
389
|
-
icon: Zt
|
|
390
|
-
}));
|
|
391
|
-
});
|
|
392
|
-
Le.displayName = "CustomSortIcon";
|
|
393
|
-
const jt = {
|
|
394
|
-
tag: "svg",
|
|
395
|
-
attrs: {
|
|
396
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
397
|
-
fill: "none",
|
|
398
|
-
viewBox: "0 0 16 16",
|
|
399
|
-
width: "1em",
|
|
400
|
-
height: "1em"
|
|
401
|
-
},
|
|
402
|
-
children: [
|
|
403
|
-
{
|
|
404
|
-
tag: "path",
|
|
405
|
-
attrs: {
|
|
406
|
-
fill: "currentColor",
|
|
407
|
-
d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
tag: "path",
|
|
412
|
-
attrs: {
|
|
413
|
-
fill: "currentColor",
|
|
414
|
-
d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z"
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
tag: "path",
|
|
419
|
-
attrs: {
|
|
420
|
-
fill: "currentColor",
|
|
421
|
-
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",
|
|
422
|
-
fillRule: "evenodd",
|
|
423
|
-
clipRule: "evenodd"
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
]
|
|
427
|
-
}, De = w(function(t, r) {
|
|
428
|
-
return p(x, Object.assign({}, t, {
|
|
429
|
-
id: "delete-empty-icon",
|
|
430
|
-
ref: r,
|
|
431
|
-
icon: jt
|
|
432
|
-
}));
|
|
433
|
-
});
|
|
434
|
-
De.displayName = "DeleteEmptyIcon";
|
|
435
|
-
const Bt = {
|
|
436
|
-
tag: "svg",
|
|
437
|
-
attrs: {
|
|
438
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
439
|
-
fill: "none",
|
|
440
|
-
viewBox: "0 0 16 16",
|
|
441
|
-
width: "1em",
|
|
442
|
-
height: "1em"
|
|
443
|
-
},
|
|
444
|
-
children: [
|
|
445
|
-
{
|
|
446
|
-
tag: "path",
|
|
447
|
-
attrs: {
|
|
448
|
-
fill: "currentColor",
|
|
449
|
-
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"
|
|
450
|
-
}
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
tag: "path",
|
|
454
|
-
attrs: {
|
|
455
|
-
fill: "currentColor",
|
|
456
|
-
d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z",
|
|
457
|
-
fillRule: "evenodd",
|
|
458
|
-
clipRule: "evenodd"
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
tag: "path",
|
|
463
|
-
attrs: {
|
|
464
|
-
fill: "currentColor",
|
|
465
|
-
d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z",
|
|
466
|
-
fillRule: "evenodd",
|
|
467
|
-
clipRule: "evenodd"
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
|
-
}, de = w(function(t, r) {
|
|
472
|
-
return p(x, Object.assign({}, t, {
|
|
473
|
-
id: "descending-icon",
|
|
474
|
-
ref: r,
|
|
475
|
-
icon: Bt
|
|
476
|
-
}));
|
|
477
|
-
});
|
|
478
|
-
de.displayName = "DescendingIcon";
|
|
479
|
-
const Ft = {
|
|
480
|
-
tag: "svg",
|
|
481
|
-
attrs: {
|
|
482
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
483
|
-
fill: "none",
|
|
484
|
-
viewBox: "0 0 16 16",
|
|
485
|
-
width: "1em",
|
|
486
|
-
height: "1em"
|
|
487
|
-
},
|
|
488
|
-
children: [{
|
|
489
|
-
tag: "path",
|
|
490
|
-
attrs: {
|
|
491
|
-
fill: "currentColor",
|
|
492
|
-
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",
|
|
493
|
-
fillRule: "evenodd",
|
|
494
|
-
clipRule: "evenodd"
|
|
495
|
-
}
|
|
496
|
-
}, {
|
|
497
|
-
tag: "path",
|
|
498
|
-
attrs: {
|
|
499
|
-
fill: "currentColor",
|
|
500
|
-
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"
|
|
501
|
-
}
|
|
502
|
-
}]
|
|
503
|
-
}, $e = w(function(t, r) {
|
|
504
|
-
return p(x, Object.assign({}, t, {
|
|
505
|
-
id: "expand-ascending-icon",
|
|
506
|
-
ref: r,
|
|
507
|
-
icon: Ft
|
|
508
|
-
}));
|
|
509
|
-
});
|
|
510
|
-
$e.displayName = "ExpandAscendingIcon";
|
|
511
|
-
const Vt = {
|
|
512
|
-
tag: "svg",
|
|
513
|
-
attrs: {
|
|
514
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
515
|
-
fill: "none",
|
|
516
|
-
viewBox: "0 0 16 16",
|
|
517
|
-
width: "1em",
|
|
518
|
-
height: "1em"
|
|
519
|
-
},
|
|
520
|
-
children: [{
|
|
521
|
-
tag: "path",
|
|
522
|
-
attrs: {
|
|
523
|
-
fill: "currentColor",
|
|
524
|
-
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",
|
|
525
|
-
fillRule: "evenodd",
|
|
526
|
-
clipRule: "evenodd"
|
|
527
|
-
}
|
|
528
|
-
}, {
|
|
529
|
-
tag: "path",
|
|
530
|
-
attrs: {
|
|
531
|
-
fill: "currentColor",
|
|
532
|
-
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"
|
|
533
|
-
}
|
|
534
|
-
}]
|
|
535
|
-
}, He = w(function(t, r) {
|
|
536
|
-
return p(x, Object.assign({}, t, {
|
|
537
|
-
id: "expand-descending-icon",
|
|
538
|
-
ref: r,
|
|
539
|
-
icon: Vt
|
|
540
|
-
}));
|
|
541
|
-
});
|
|
542
|
-
He.displayName = "ExpandDescendingIcon";
|
|
543
|
-
const Gt = {
|
|
544
|
-
tag: "svg",
|
|
545
|
-
attrs: {
|
|
546
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
547
|
-
fill: "none",
|
|
548
|
-
viewBox: "0 0 16 16",
|
|
549
|
-
width: "1em",
|
|
550
|
-
height: "1em"
|
|
551
|
-
},
|
|
552
|
-
children: [{
|
|
553
|
-
tag: "path",
|
|
554
|
-
attrs: {
|
|
555
|
-
fill: "currentColor",
|
|
556
|
-
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"
|
|
557
|
-
}
|
|
558
|
-
}]
|
|
559
|
-
}, J = w(function(t, r) {
|
|
560
|
-
return p(x, Object.assign({}, t, {
|
|
561
|
-
id: "increase-icon",
|
|
562
|
-
ref: r,
|
|
563
|
-
icon: Gt
|
|
564
|
-
}));
|
|
565
|
-
});
|
|
566
|
-
J.displayName = "IncreaseIcon";
|
|
567
|
-
const Wt = {
|
|
568
|
-
tag: "svg",
|
|
569
|
-
attrs: {
|
|
570
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
571
|
-
fill: "none",
|
|
572
|
-
viewBox: "0 0 16 16",
|
|
573
|
-
width: "1em",
|
|
574
|
-
height: "1em"
|
|
575
|
-
},
|
|
576
|
-
children: [{
|
|
577
|
-
tag: "path",
|
|
578
|
-
attrs: {
|
|
579
|
-
fill: "currentColor",
|
|
580
|
-
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",
|
|
581
|
-
fillRule: "evenodd",
|
|
582
|
-
clipRule: "evenodd"
|
|
583
|
-
}
|
|
584
|
-
}]
|
|
585
|
-
}, Ue = w(function(t, r) {
|
|
586
|
-
return p(x, Object.assign({}, t, {
|
|
587
|
-
id: "more-down-icon",
|
|
588
|
-
ref: r,
|
|
589
|
-
icon: Wt
|
|
590
|
-
}));
|
|
591
|
-
});
|
|
592
|
-
Ue.displayName = "MoreDownIcon";
|
|
593
|
-
const qt = {
|
|
594
|
-
tag: "svg",
|
|
595
|
-
attrs: {
|
|
596
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
597
|
-
fill: "none",
|
|
598
|
-
viewBox: "0 0 16 16",
|
|
599
|
-
width: "1em",
|
|
600
|
-
height: "1em"
|
|
601
|
-
},
|
|
602
|
-
children: [
|
|
603
|
-
{
|
|
604
|
-
tag: "path",
|
|
605
|
-
attrs: {
|
|
606
|
-
fill: "currentColor",
|
|
607
|
-
d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z"
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
tag: "path",
|
|
612
|
-
attrs: {
|
|
613
|
-
fill: "currentColor",
|
|
614
|
-
d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z"
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
tag: "path",
|
|
619
|
-
attrs: {
|
|
620
|
-
fill: "currentColor",
|
|
621
|
-
d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z"
|
|
622
|
-
}
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
tag: "path",
|
|
626
|
-
attrs: {
|
|
627
|
-
fill: "currentColor",
|
|
628
|
-
d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z"
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
tag: "path",
|
|
633
|
-
attrs: {
|
|
634
|
-
fill: "currentColor",
|
|
635
|
-
d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z"
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
tag: "path",
|
|
640
|
-
attrs: {
|
|
641
|
-
fill: "currentColor",
|
|
642
|
-
d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z"
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
]
|
|
646
|
-
}, Ae = w(function(t, r) {
|
|
647
|
-
return p(x, Object.assign({}, t, {
|
|
648
|
-
id: "sequence-icon",
|
|
649
|
-
ref: r,
|
|
650
|
-
icon: qt
|
|
651
|
-
}));
|
|
652
|
-
});
|
|
653
|
-
Ae.displayName = "SequenceIcon";
|
|
654
|
-
const Pe = "sheet.menu.sheets-sort", Ze = "sheet.menu.sheets-sort-ctx", j = "AscendingIcon", ue = "ExpandAscendingIcon", he = "DescendingIcon", ge = "ExpandDescendingIcon", Ce = "CustomSortIcon";
|
|
655
|
-
function zt(e) {
|
|
656
|
-
return {
|
|
657
|
-
id: Pe,
|
|
658
|
-
type: f.SUBITEMS,
|
|
659
|
-
icon: j,
|
|
660
|
-
tooltip: "sheets-sort.general.sort",
|
|
661
|
-
hidden$: Ee(e, q.UNIVER_SHEET),
|
|
662
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
function Yt(e) {
|
|
666
|
-
return {
|
|
667
|
-
id: Q.id,
|
|
668
|
-
icon: j,
|
|
669
|
-
title: "sheets-sort.general.sort-asc-cur",
|
|
670
|
-
type: f.BUTTON,
|
|
671
|
-
hidden$: Mt(e)
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
function Xt(e) {
|
|
675
|
-
return {
|
|
676
|
-
id: ee.id,
|
|
677
|
-
title: "sheets-sort.general.sort-asc-ext",
|
|
678
|
-
icon: ue,
|
|
679
|
-
type: f.BUTTON
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
function Kt(e) {
|
|
683
|
-
return {
|
|
684
|
-
id: te.id,
|
|
685
|
-
title: "sheets-sort.general.sort-desc-cur",
|
|
686
|
-
icon: he,
|
|
687
|
-
type: f.BUTTON
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
function Jt(e) {
|
|
691
|
-
return {
|
|
692
|
-
id: re.id,
|
|
693
|
-
title: "sheets-sort.general.sort-desc-ext",
|
|
694
|
-
icon: ge,
|
|
695
|
-
type: f.BUTTON
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
function Qt(e) {
|
|
699
|
-
return {
|
|
700
|
-
id: ne.id,
|
|
701
|
-
title: "sheets-sort.general.sort-custom",
|
|
702
|
-
type: f.BUTTON,
|
|
703
|
-
icon: Ce
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
function er(e) {
|
|
707
|
-
return {
|
|
708
|
-
id: Ze,
|
|
709
|
-
title: "sheets-sort.general.sort",
|
|
710
|
-
type: f.SUBITEMS,
|
|
711
|
-
icon: j,
|
|
712
|
-
hidden$: Ee(e, q.UNIVER_SHEET),
|
|
713
|
-
disabled$: L(e, {
|
|
714
|
-
workbookTypes: [k],
|
|
715
|
-
worksheetTypes: [O, N],
|
|
716
|
-
rangeTypes: [b]
|
|
717
|
-
})
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
function tr(e) {
|
|
721
|
-
return {
|
|
722
|
-
id: oe.id,
|
|
723
|
-
title: "sheets-sort.general.sort-asc-cur",
|
|
724
|
-
type: f.BUTTON,
|
|
725
|
-
icon: j,
|
|
726
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
function rr(e) {
|
|
730
|
-
return {
|
|
731
|
-
id: se.id,
|
|
732
|
-
title: "sheets-sort.general.sort-asc-ext",
|
|
733
|
-
type: f.BUTTON,
|
|
734
|
-
icon: ue,
|
|
735
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
function nr(e) {
|
|
739
|
-
return {
|
|
740
|
-
id: ie.id,
|
|
741
|
-
title: "sheets-sort.general.sort-desc-cur",
|
|
742
|
-
type: f.BUTTON,
|
|
743
|
-
icon: he,
|
|
744
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
function or(e) {
|
|
748
|
-
return {
|
|
749
|
-
id: ce.id,
|
|
750
|
-
title: "sheets-sort.general.sort-desc-ext",
|
|
751
|
-
type: f.BUTTON,
|
|
752
|
-
icon: ge,
|
|
753
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
function sr(e) {
|
|
757
|
-
return {
|
|
758
|
-
id: ae.id,
|
|
759
|
-
title: "sheets-sort.general.sort-custom",
|
|
760
|
-
type: f.BUTTON,
|
|
761
|
-
icon: Ce,
|
|
762
|
-
disabled$: L(e, { workbookTypes: [k], worksheetTypes: [O, N], rangeTypes: [b] })
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
const ir = {
|
|
766
|
-
[vt.ORGANIZATION]: {
|
|
767
|
-
[Pe]: {
|
|
768
|
-
order: 3,
|
|
769
|
-
menuItemFactory: zt,
|
|
770
|
-
[Q.id]: {
|
|
771
|
-
order: 0,
|
|
772
|
-
menuItemFactory: Yt
|
|
773
|
-
},
|
|
774
|
-
[ee.id]: {
|
|
775
|
-
order: 1,
|
|
776
|
-
menuItemFactory: Xt
|
|
777
|
-
},
|
|
778
|
-
[te.id]: {
|
|
779
|
-
order: 2,
|
|
780
|
-
menuItemFactory: Kt
|
|
781
|
-
},
|
|
782
|
-
[re.id]: {
|
|
783
|
-
order: 3,
|
|
784
|
-
menuItemFactory: Jt
|
|
785
|
-
},
|
|
786
|
-
[ne.id]: {
|
|
787
|
-
order: 4,
|
|
788
|
-
menuItemFactory: Qt
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
[Ct.MAIN_AREA]: {
|
|
793
|
-
[mt.DATA]: {
|
|
794
|
-
[Ze]: {
|
|
795
|
-
order: 0,
|
|
796
|
-
menuItemFactory: er,
|
|
797
|
-
[oe.id]: {
|
|
798
|
-
order: 0,
|
|
799
|
-
menuItemFactory: tr
|
|
800
|
-
},
|
|
801
|
-
[se.id]: {
|
|
802
|
-
order: 1,
|
|
803
|
-
menuItemFactory: rr
|
|
804
|
-
},
|
|
805
|
-
[ie.id]: {
|
|
806
|
-
order: 2,
|
|
807
|
-
menuItemFactory: nr
|
|
808
|
-
},
|
|
809
|
-
[ce.id]: {
|
|
810
|
-
order: 3,
|
|
811
|
-
menuItemFactory: or
|
|
812
|
-
},
|
|
813
|
-
[ae.id]: {
|
|
814
|
-
order: 4,
|
|
815
|
-
menuItemFactory: sr
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
};
|
|
821
|
-
function cr() {
|
|
822
|
-
const e = R(C), t = ft(e.customSortState$);
|
|
823
|
-
return !t || !t.location ? null : /* @__PURE__ */ c(ar, { state: t });
|
|
824
|
-
}
|
|
825
|
-
function ar({ state: e }) {
|
|
826
|
-
const t = R(we), r = R(U), n = R(C), [o, s] = Z(!1), [i, a] = Z(0), l = Te(null), { range: u, unitId: y, subUnitId: v } = e.location, E = n.getTitles(o), [m, A] = Z([
|
|
827
|
-
{ type: $.ASC, colIndex: u.startColumn }
|
|
828
|
-
]), B = T((d, S) => {
|
|
829
|
-
const P = [...m];
|
|
830
|
-
S === null ? P.splice(d, 1) : P[d] = S, A(P);
|
|
831
|
-
}, [m]), h = T(
|
|
832
|
-
Xe(() => {
|
|
833
|
-
const d = [...m], S = dr(u, m);
|
|
834
|
-
S !== null && (d.push({ type: $.ASC, colIndex: S }), A(d));
|
|
835
|
-
}, 200),
|
|
836
|
-
[m, u]
|
|
837
|
-
), Y = T((d, S) => {
|
|
838
|
-
t.applySort({ range: u, orderRules: d, hasTitle: S }), n.closeCustomSortPanel();
|
|
839
|
-
}, [t, n, u]), Be = T(() => {
|
|
840
|
-
n.closeCustomSortPanel();
|
|
841
|
-
}, [n]), Fe = T((d) => {
|
|
842
|
-
s(d), d ? n.setSelection(y, v, { ...u, startRow: u.startRow + 1 }) : n.setSelection(y, v, u);
|
|
843
|
-
}, [n, u, v, y]);
|
|
844
|
-
be(() => {
|
|
845
|
-
l.current && m.length > 5 && (l.current.scrollTop = l.current.scrollHeight);
|
|
846
|
-
}, [m]);
|
|
847
|
-
const Ve = m.length < E.length, me = m.map((d) => ({ ...d, id: `${d.colIndex}` }));
|
|
848
|
-
return /* @__PURE__ */ g("div", { children: [
|
|
849
|
-
/* @__PURE__ */ g("div", { onMouseDown: (d) => {
|
|
850
|
-
d.stopPropagation();
|
|
851
|
-
}, children: [
|
|
852
|
-
/* @__PURE__ */ g("div", { className: "univer-mb-2 univer-flex univer-items-center univer-justify-between", children: [
|
|
853
|
-
/* @__PURE__ */ c(dt, { checked: o, onChange: (d) => Fe(!!d), children: r.t("sheets-sort.dialog.first-row-check") }),
|
|
854
|
-
Ve ? /* @__PURE__ */ g(
|
|
855
|
-
"div",
|
|
856
|
-
{
|
|
857
|
-
className: "univer-flex univer-cursor-pointer univer-select-none univer-items-center univer-text-base",
|
|
858
|
-
onClick: h,
|
|
859
|
-
children: [
|
|
860
|
-
/* @__PURE__ */ c(J, {}),
|
|
861
|
-
/* @__PURE__ */ c("span", { className: "univer-ml-1.5", children: r.t("sheets-sort.dialog.add-condition") })
|
|
862
|
-
]
|
|
863
|
-
}
|
|
864
|
-
) : /* @__PURE__ */ g(
|
|
865
|
-
"div",
|
|
866
|
-
{
|
|
867
|
-
className: "univer-flex univer-cursor-pointer univer-select-none univer-items-center univer-text-base univer-text-primary-500 disabled:univer-cursor-not-allowed disabled:univer-divide-opacity-30 disabled:univer-text-gray-800",
|
|
868
|
-
children: [
|
|
869
|
-
/* @__PURE__ */ c(J, {}),
|
|
870
|
-
/* @__PURE__ */ c("span", { className: "univer-ml-1.5 univer-text-xs", children: r.t("sheets-sort.dialog.add-condition") })
|
|
871
|
-
]
|
|
872
|
-
}
|
|
873
|
-
)
|
|
874
|
-
] }),
|
|
875
|
-
/* @__PURE__ */ c(
|
|
876
|
-
"div",
|
|
877
|
-
{
|
|
878
|
-
ref: l,
|
|
879
|
-
className: K("univer-max-h-[310px] univer-overflow-y-auto univer-overflow-x-hidden", Re),
|
|
880
|
-
onScroll: (d) => {
|
|
881
|
-
const S = d.currentTarget.scrollTop;
|
|
882
|
-
a(S);
|
|
883
|
-
},
|
|
884
|
-
children: /* @__PURE__ */ c(
|
|
885
|
-
ut,
|
|
886
|
-
{
|
|
887
|
-
list: me,
|
|
888
|
-
onListChange: A,
|
|
889
|
-
idKey: "id",
|
|
890
|
-
draggableHandle: "[data-u-comp=sort-panel-item-handler]",
|
|
891
|
-
itemRender: (d) => /* @__PURE__ */ c(
|
|
892
|
-
lr,
|
|
893
|
-
{
|
|
894
|
-
titles: E,
|
|
895
|
-
list: me,
|
|
896
|
-
item: d,
|
|
897
|
-
onChange: (S, P) => B(P, S),
|
|
898
|
-
scrollPosition: i
|
|
899
|
-
}
|
|
900
|
-
),
|
|
901
|
-
rowHeight: 32,
|
|
902
|
-
margin: [0, 12]
|
|
903
|
-
}
|
|
904
|
-
)
|
|
905
|
-
}
|
|
906
|
-
)
|
|
907
|
-
] }),
|
|
908
|
-
/* @__PURE__ */ g("div", { className: "univer-mt-5 univer-flex univer-justify-end", children: [
|
|
909
|
-
/* @__PURE__ */ c(
|
|
910
|
-
G,
|
|
911
|
-
{
|
|
912
|
-
className: "univer-ml-3",
|
|
913
|
-
onClick: () => Be(),
|
|
914
|
-
children: r.t("sheets-sort.dialog.cancel")
|
|
915
|
-
}
|
|
916
|
-
),
|
|
917
|
-
/* @__PURE__ */ c(
|
|
918
|
-
G,
|
|
919
|
-
{
|
|
920
|
-
className: "univer-ml-3",
|
|
921
|
-
variant: "primary",
|
|
922
|
-
onClick: () => Y(m, o),
|
|
923
|
-
children: r.t("sheets-sort.dialog.confirm")
|
|
924
|
-
}
|
|
925
|
-
)
|
|
926
|
-
] })
|
|
927
|
-
] });
|
|
928
|
-
}
|
|
929
|
-
function lr(e) {
|
|
930
|
-
var B;
|
|
931
|
-
const { list: t, item: r, titles: n, onChange: o, scrollPosition: s } = e, i = R(U), a = n.filter((h) => !t.some((Y) => Y.colIndex === h.index) || h.index === r.colIndex), l = t.findIndex((h) => h.colIndex === r.colIndex), u = T((h) => {
|
|
932
|
-
o({ ...r, colIndex: h.index }, l), v(!1);
|
|
933
|
-
}, [l, r, o]), [y, v] = Z(!1), E = (h) => {
|
|
934
|
-
v(h);
|
|
935
|
-
};
|
|
936
|
-
be(() => {
|
|
937
|
-
v(!1);
|
|
938
|
-
}, [s]);
|
|
939
|
-
const m = t.length > 1, A = (B = n.find((h) => h.index === r.colIndex)) == null ? void 0 : B.label;
|
|
940
|
-
return /* @__PURE__ */ g("div", { className: "univer-grid univer-grid-flow-col univer-grid-cols-2 univer-items-center univer-gap-2", children: [
|
|
941
|
-
/* @__PURE__ */ g("div", { className: "univer-flex univer-items-center", children: [
|
|
942
|
-
/* @__PURE__ */ c(
|
|
943
|
-
"div",
|
|
944
|
-
{
|
|
945
|
-
"data-u-comp": "sort-panel-item-handler",
|
|
946
|
-
className: "univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-text-base univer-text-gray-700",
|
|
947
|
-
children: /* @__PURE__ */ c(Ae, {})
|
|
948
|
-
}
|
|
949
|
-
),
|
|
950
|
-
/* @__PURE__ */ c(
|
|
951
|
-
ht,
|
|
952
|
-
{
|
|
953
|
-
overlay: /* @__PURE__ */ c(
|
|
954
|
-
"ul",
|
|
955
|
-
{
|
|
956
|
-
className: K("univer-my-0 univer-box-border univer-grid univer-max-h-[310px] univer-w-[--radix-popper-anchor-width] univer-items-center univer-gap-1 univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border univer-bg-white univer-p-1 univer-text-base univer-shadow-lg", Re),
|
|
957
|
-
children: a.map((h) => /* @__PURE__ */ g(
|
|
958
|
-
"li",
|
|
959
|
-
{
|
|
960
|
-
onClick: () => u(h),
|
|
961
|
-
className: "univer-relative univer-box-border univer-flex univer-h-7 univer-cursor-pointer univer-list-none univer-items-center univer-justify-between univer-rounded univer-px-2 univer-text-sm univer-transition-all hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
|
|
962
|
-
children: [
|
|
963
|
-
/* @__PURE__ */ c("span", { className: "univer-max-w-[220px] univer-truncate", children: h.label }),
|
|
964
|
-
/* @__PURE__ */ c("span", { children: h.index === r.colIndex && /* @__PURE__ */ c(ke, {}) })
|
|
965
|
-
]
|
|
966
|
-
},
|
|
967
|
-
h.index
|
|
968
|
-
))
|
|
969
|
-
}
|
|
970
|
-
),
|
|
971
|
-
open: y,
|
|
972
|
-
onOpenChange: E,
|
|
973
|
-
children: /* @__PURE__ */ g(
|
|
974
|
-
"div",
|
|
975
|
-
{
|
|
976
|
-
className: K("univer-ml-2 univer-flex univer-w-full univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-text-sm univer-text-gray-900 dark:!univer-text-white"),
|
|
977
|
-
children: [
|
|
978
|
-
/* @__PURE__ */ c(
|
|
979
|
-
"span",
|
|
980
|
-
{
|
|
981
|
-
className: "univer-max-w-[220px] univer-truncate",
|
|
982
|
-
children: A
|
|
983
|
-
}
|
|
984
|
-
),
|
|
985
|
-
/* @__PURE__ */ c(Ue, {})
|
|
986
|
-
]
|
|
987
|
-
}
|
|
988
|
-
)
|
|
989
|
-
}
|
|
990
|
-
)
|
|
991
|
-
] }),
|
|
992
|
-
/* @__PURE__ */ g("div", { className: "univer-flex univer-items-center univer-justify-end univer-gap-2", children: [
|
|
993
|
-
/* @__PURE__ */ g(
|
|
994
|
-
Me,
|
|
995
|
-
{
|
|
996
|
-
value: r.type,
|
|
997
|
-
onChange: (h) => {
|
|
998
|
-
o({ ...r, type: h }, l);
|
|
999
|
-
},
|
|
1000
|
-
children: [
|
|
1001
|
-
/* @__PURE__ */ c(V, { value: $.ASC, children: i.t("sheets-sort.general.sort-asc") }),
|
|
1002
|
-
/* @__PURE__ */ c(V, { value: $.DESC, children: i.t("sheets-sort.general.sort-desc") })
|
|
1003
|
-
]
|
|
1004
|
-
}
|
|
1005
|
-
),
|
|
1006
|
-
/* @__PURE__ */ c(
|
|
1007
|
-
"a",
|
|
1008
|
-
{
|
|
1009
|
-
className: "univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-transition-colors hover:univer-text-red-500",
|
|
1010
|
-
onClick: () => o(null, l),
|
|
1011
|
-
children: !m && /* @__PURE__ */ c(De, {})
|
|
1012
|
-
}
|
|
1013
|
-
)
|
|
1014
|
-
] })
|
|
1015
|
-
] });
|
|
1016
|
-
}
|
|
1017
|
-
function dr(e, t) {
|
|
1018
|
-
const { startColumn: r, endColumn: n } = e, o = new Set(t.map((s) => s == null ? void 0 : s.colIndex));
|
|
1019
|
-
for (let s = r; s <= n; s++)
|
|
1020
|
-
if (!o.has(s))
|
|
1021
|
-
return s;
|
|
1022
|
-
return null;
|
|
1023
|
-
}
|
|
1024
|
-
function ur(e) {
|
|
1025
|
-
const { range: t, colIndex: r, onClose: n } = e, o = R(C), s = R(ye), i = R(U), a = T((l) => {
|
|
1026
|
-
const { unitId: u, subUnitId: y } = st(s) || {};
|
|
1027
|
-
if (t && u && y) {
|
|
1028
|
-
const v = { ...t, startRow: t.startRow + 1 };
|
|
1029
|
-
o.triggerSortDirectly(l, !1, { unitId: u, subUnitId: y, range: v, colIndex: r });
|
|
1030
|
-
} else
|
|
1031
|
-
throw new Error(`Cannot find the target to sort. unitId: ${u}, subUnitId: ${y}, range: ${t}, colIndex: ${r}`);
|
|
1032
|
-
n();
|
|
1033
|
-
}, [t, r, o, s, n]);
|
|
1034
|
-
return /* @__PURE__ */ g(gt, { className: "univer-mb-3 univer-w-full univer-grid-cols-2", children: [
|
|
1035
|
-
/* @__PURE__ */ g(G, { onClick: () => a(!0), children: [
|
|
1036
|
-
/* @__PURE__ */ c(le, {}),
|
|
1037
|
-
i.t("sheets-sort.general.sort-asc")
|
|
1038
|
-
] }),
|
|
1039
|
-
/* @__PURE__ */ g(G, { onClick: () => a(!1), children: [
|
|
1040
|
-
/* @__PURE__ */ c(de, {}),
|
|
1041
|
-
i.t("sheets-sort.general.sort-desc")
|
|
1042
|
-
] })
|
|
1043
|
-
] });
|
|
1044
|
-
}
|
|
1045
|
-
var hr = Object.getOwnPropertyDescriptor, gr = (e, t, r, n) => {
|
|
1046
|
-
for (var o = n > 1 ? void 0 : n ? hr(t, r) : t, s = e.length - 1, i; s >= 0; s--)
|
|
1047
|
-
(i = e[s]) && (o = i(o) || o);
|
|
1048
|
-
return o;
|
|
1049
|
-
}, _ = (e, t) => (r, n) => t(r, n, e);
|
|
1050
|
-
const pe = "custom-sort-dialog", je = 560, Cr = 128;
|
|
1051
|
-
let W = class extends Ke {
|
|
1052
|
-
constructor(e, t, r, n, o, s, i, a, l, u) {
|
|
1053
|
-
super(), this._commandService = e, this._menuManagerService = t, this._dialogService = r, this._layoutService = n, this._uiPartsService = o, this._sheetRenderService = s, this._localeService = i, this._sheetsSortUIService = a, this._injector = l, this._componentManager = u, this._initCommands(), this._initMenu(), this._initUI();
|
|
1054
|
-
}
|
|
1055
|
-
_initMenu() {
|
|
1056
|
-
this._menuManagerService.mergeMenu(ir);
|
|
1057
|
-
}
|
|
1058
|
-
_initCommands() {
|
|
1059
|
-
[
|
|
1060
|
-
Q,
|
|
1061
|
-
ee,
|
|
1062
|
-
te,
|
|
1063
|
-
re,
|
|
1064
|
-
ne,
|
|
1065
|
-
oe,
|
|
1066
|
-
se,
|
|
1067
|
-
ie,
|
|
1068
|
-
ce,
|
|
1069
|
-
ae
|
|
1070
|
-
].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e))), this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(it.id));
|
|
1071
|
-
}
|
|
1072
|
-
_initUI() {
|
|
1073
|
-
this.disposeWithMe(
|
|
1074
|
-
this._uiPartsService.registerComponent(Et.FILTER_PANEL_EMBED_POINT, () => It(ur, this._injector))
|
|
1075
|
-
), [
|
|
1076
|
-
["CustomSortPanel", cr],
|
|
1077
|
-
[j, le],
|
|
1078
|
-
[ue, $e],
|
|
1079
|
-
[he, de],
|
|
1080
|
-
[ge, He],
|
|
1081
|
-
[Ce, Le]
|
|
1082
|
-
].forEach(([e, t]) => {
|
|
1083
|
-
this.disposeWithMe(
|
|
1084
|
-
this._componentManager.register(e, t)
|
|
1085
|
-
);
|
|
1086
|
-
}), this._sheetsSortUIService.customSortState$.pipe(lt(this.dispose$)).subscribe((e) => {
|
|
1087
|
-
e && e.show && e.location ? this._openCustomSortPanel(e.location) : e && !(e != null && e.show) && this._closePanel();
|
|
1088
|
-
});
|
|
1089
|
-
}
|
|
1090
|
-
_openCustomSortPanel(e) {
|
|
1091
|
-
this._dialogService.open({
|
|
1092
|
-
id: pe,
|
|
1093
|
-
draggable: !0,
|
|
1094
|
-
width: je,
|
|
1095
|
-
title: { title: `${this._localeService.t("sheets-sort.general.sort-custom")}: ${wt(e.range)}` },
|
|
1096
|
-
children: { label: "CustomSortPanel" },
|
|
1097
|
-
destroyOnClose: !0,
|
|
1098
|
-
defaultPosition: mr(),
|
|
1099
|
-
preservePositionOnDestroy: !1,
|
|
1100
|
-
onClose: () => this._closePanel(),
|
|
1101
|
-
mask: !0
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
_closePanel() {
|
|
1105
|
-
this._dialogService.close(pe), queueMicrotask(() => this._layoutService.focus());
|
|
1106
|
-
}
|
|
1107
|
-
};
|
|
1108
|
-
W = gr([
|
|
1109
|
-
_(0, _e),
|
|
1110
|
-
_(1, St),
|
|
1111
|
-
_(2, pt),
|
|
1112
|
-
_(3, xt),
|
|
1113
|
-
_(4, yt),
|
|
1114
|
-
_(5, M(Rt)),
|
|
1115
|
-
_(6, M(U)),
|
|
1116
|
-
_(7, M(C)),
|
|
1117
|
-
_(8, M(Ie)),
|
|
1118
|
-
_(9, M(_t))
|
|
1119
|
-
], W);
|
|
1120
|
-
function mr() {
|
|
1121
|
-
return { x: (window.innerWidth - je) / 2, y: Cr };
|
|
1122
|
-
}
|
|
1123
|
-
var vr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, Sr = (e, t, r) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, pr = (e, t, r, n) => {
|
|
1124
|
-
for (var o = n > 1 ? void 0 : n ? fr(t, r) : t, s = e.length - 1, i; s >= 0; s--)
|
|
1125
|
-
(i = e[s]) && (o = i(o) || o);
|
|
1126
|
-
return o;
|
|
1127
|
-
}, xe = (e, t) => (r, n) => t(r, n, e), z = (e, t, r) => Sr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
1128
|
-
let H = class extends et {
|
|
1129
|
-
constructor(e = Se, t, r) {
|
|
1130
|
-
super(), this._config = e, this._injector = t, this._configService = r;
|
|
1131
|
-
const { ...n } = tt(
|
|
1132
|
-
{},
|
|
1133
|
-
Se,
|
|
1134
|
-
this._config
|
|
1135
|
-
);
|
|
1136
|
-
this._configService.setConfig(Dt, n);
|
|
1137
|
-
}
|
|
1138
|
-
onStarting() {
|
|
1139
|
-
[
|
|
1140
|
-
[C],
|
|
1141
|
-
[W]
|
|
1142
|
-
].forEach((e) => this._injector.add(e));
|
|
1143
|
-
}
|
|
1144
|
-
onRendered() {
|
|
1145
|
-
this._injector.get(W);
|
|
1146
|
-
}
|
|
1147
|
-
};
|
|
1148
|
-
z(H, "type", q.UNIVER_SHEET);
|
|
1149
|
-
z(H, "pluginName", "SHEET_SORT_UI_PLUGIN");
|
|
1150
|
-
z(H, "packageName", Oe.name);
|
|
1151
|
-
z(H, "version", Oe.version);
|
|
1152
|
-
H = pr([
|
|
1153
|
-
Je(ct),
|
|
1154
|
-
xe(1, M(Ie)),
|
|
1155
|
-
xe(2, Qe)
|
|
1156
|
-
], H);
|
|
1157
|
-
export {
|
|
1158
|
-
Q as SortRangeAscCommand,
|
|
1159
|
-
ee as SortRangeAscExtCommand,
|
|
1160
|
-
se as SortRangeAscExtInCtxMenuCommand,
|
|
1161
|
-
oe as SortRangeAscInCtxMenuCommand,
|
|
1162
|
-
ne as SortRangeCustomCommand,
|
|
1163
|
-
ae as SortRangeCustomInCtxMenuCommand,
|
|
1164
|
-
te as SortRangeDescCommand,
|
|
1165
|
-
re as SortRangeDescExtCommand,
|
|
1166
|
-
ce as SortRangeDescExtInCtxMenuCommand,
|
|
1167
|
-
ie as SortRangeDescInCtxMenuCommand,
|
|
1168
|
-
H as UniverSheetsSortUIPlugin
|
|
1169
|
-
};
|
|
1
|
+
import{CommandType as e,DependentOn as t,Disposable as n,ICommandService as r,IConfigService as i,IConfirmService as a,IUniverInstanceService as o,Inject as s,Injector as c,LocaleService as l,LocaleType as u,Plugin as d,RxDisposable as f,Tools as p,UniverInstanceType as m,merge as h,throttle as ee}from"@univerjs/core";import{RangeProtectionPermissionEditPoint as g,SetSelectionsOperation as te,SheetsSelectionsService as ne,WorkbookEditablePermission as _,WorksheetEditPermission as v,WorksheetSortPermission as y,expandToContinuousRange as b,getPrimaryForRange as re,getSheetCommandTarget as ie}from"@univerjs/sheets";import{SheetsSortService as ae,SortRangeCommand as oe,SortType as x,UniverSheetsSortPlugin as se}from"@univerjs/sheets-sort";import{BehaviorSubject as ce,takeUntil as le}from"rxjs";import{Button as S,ButtonGroup as ue,Checkbox as de,DraggableList as fe,Dropdown as pe,Radio as C,RadioGroup as me,clsx as he,scrollbarClassName as ge}from"@univerjs/design";import{ComponentManager as _e,ContextMenuGroup as ve,ContextMenuPosition as ye,IDialogService as be,ILayoutService as xe,IMenuManagerService as Se,IUIPartsService as Ce,MenuItemType as w,RibbonDataGroup as we,connectInjector as Te,getMenuHiddenObservable as Ee,useDependency as T,useObservable as De}from"@univerjs/ui";import{useCallback as E,useEffect as Oe,useRef as ke,useState as D}from"react";import{jsx as O,jsxs as k}from"react/jsx-runtime";import{serializeRange as Ae}from"@univerjs/engine-formula";import{AscendingIcon as je,CheckMarkIcon as Me,CustomSortIcon as Ne,DeleteEmptyIcon as Pe,DescendingIcon as Fe,ExpandAscendingIcon as Ie,ExpandDescendingIcon as Le,IncreaseIcon as Re,MoreDownIcon as ze,SequenceIcon as Be}from"@univerjs/icons";import{SheetsRenderService as Ve,SheetsUIPart as He,getCurrentExclusiveRangeInterest$ as Ue,getCurrentRangeDisable$ as A}from"@univerjs/sheets-ui";const We=e=>{let[t,n]=D(`0`),r=T(l);return k(`div`,{className:`univer-text-sm`,children:[O(`div`,{className:`extend-confirm-desc`,children:r.t(`sheets-sort.dialog.sort-reminder-desc`)}),k(me,{className:`univer-mt-4`,value:t,direction:`vertical`,onChange:t=>{n(t),e.onChange(t)},children:[O(C,{value:`0`,children:r.t(`sheets-sort.dialog.sort-reminder-no`)}),O(C,{value:`1`,children:r.t(`sheets-sort.dialog.sort-reminder-ext`)})]})]})};function j(e){"@babel/helpers - typeof";return j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j(e)}function Ge(e,t){if(j(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(j(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ke(e){var t=Ge(e,`string`);return j(t)==`symbol`?t:t+``}function M(e,t,n){return(t=Ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){return function(n,r){t(n,r,e)}}function P(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let F=function(e){return e.KEEP=`keep`,e.EXTEND=`extend`,e.CANCEL=`cancel`,e}({});const I={MERGE_ERROR:`sheets-sort.error.merge-size`,EMPTY_ERROR:`sheets-sort.error.empty`,SINGLE_ERROR:`sheets-sort.error.single`,FORMULA_ARRAY:`sheets-sort.error.formula-array`};let L=class extends n{constructor(e,t,n,r,i,a){super(),this._univerInstanceService=e,this._confirmService=t,this._selectionManagerService=n,this._sheetsSortService=r,this._localeService=i,this._commandService=a,M(this,`_customSortState$`,new ce(null)),M(this,`customSortState$`,this._customSortState$.asObservable())}async triggerSortDirectly(e,t,n){let r=n||await this._detectSortLocation(t);if(!r||!this._check(r))return!1;let i={orderRules:[{type:e?x.ASC:x.DESC,colIndex:r.colIndex}],range:r.range};return this._sheetsSortService.applySort(i,r.unitId,r.subUnitId),!0}async triggerSortCustomize(){let e=await this._detectSortLocation();return!e||!this._check(e)?!1:(this.showCustomSortPanel(e),!0)}customSortState(){return this._customSortState$.getValue()}getTitles(e){var t,n;let r=(t=this.customSortState())==null?void 0:t.location;if(!r)return[];let{unitId:i,subUnitId:a,range:o}=r,s=(n=this._univerInstanceService.getUnit(i))==null?void 0:n.getSheetBySheetId(a);if(!s)return[];let c=qe(this._localeService);return Array.from({length:o.endColumn-o.startColumn+1},(t,n)=>{var r;let i=(r=s.getCell(o.startRow,n+o.startColumn))==null?void 0:r.v;return{index:n+o.startColumn,label:e?`${i==null?c(n+o.startColumn):i}`:c(n+o.startColumn)}})}setSelection(e,t,n){var r;let i=(r=this._univerInstanceService.getUnit(e))==null?void 0:r.getSheetBySheetId(t);if(!i)return;let a={unitId:e,subUnitId:t,selections:[{range:n,primary:re(n,i),style:null}]};this._commandService.executeCommand(te.id,a)}async showCheckError(e){return await this._confirmService.confirm({id:`sort-range-check-error`,title:{title:this._localeService.t(`info.tooltip`)},children:{title:O(`div`,{children:this._localeService.t(e)})},cancelText:this._localeService.t(`sheets-sort.dialog.cancel`),confirmText:this._localeService.t(`sheets-sort.dialog.confirm`)})}async showExtendConfirm(){let e=!1;return await this._confirmService.confirm({id:`extend-sort-range-dialog`,title:{title:this._localeService.t(`sheets-sort.dialog.sort-reminder`)},children:{title:O(We,{onChange:t=>{e=t===`1`}})},width:400,cancelText:this._localeService.t(`sheets-sort.dialog.cancel`),confirmText:this._localeService.t(`sheets-sort.dialog.confirm`)})?e?F.EXTEND:F.KEEP:F.CANCEL}showCustomSortPanel(e){this._customSortState$.next({location:e,show:!0})}closeCustomSortPanel(){this._customSortState$.next({show:!1})}_check(e){return this._sheetsSortService.singleCheck(e)?this._sheetsSortService.mergeCheck(e)?this._sheetsSortService.formulaCheck(e)?this._sheetsSortService.emptyCheck(e)?!0:(this.showCheckError(I.EMPTY_ERROR),!1):(this.showCheckError(I.FORMULA_ARRAY),!1):(this.showCheckError(I.MERGE_ERROR),!1):(this.showCheckError(I.SINGLE_ERROR),!1)}async _detectSortLocation(e){let t=this._univerInstanceService.getCurrentUnitForType(m.UNIVER_SHEET),n=t.getActiveSheet(),r=t.getUnitId(),i=n.getSheetId(),a=this._selectionManagerService.getCurrentLastSelection();if(!a)return null;let o;if(e===!0)o=b(a.range,{up:!0,down:!0,left:!0,right:!0},n),this.setSelection(r,i,o);else if(e===!1)o=a.range;else{let e=await this.showExtendConfirm();if(e===F.CANCEL)return null;e===F.KEEP?o=a.range:(o=b(a.range,{up:!0,down:!0,left:!0,right:!0},n),this.setSelection(r,i,o))}return{range:o,unitId:r,subUnitId:i,colIndex:a.primary.actualColumn}}};L=P([N(0,o),N(1,a),N(2,s(ne)),N(3,s(ae)),N(4,s(l)),N(5,r)],L);function qe(e){return t=>{let n=p.chatAtABC(t);switch(e.getCurrentLocale()){case u.ZH_CN:return`"${n}"列`;case u.EN_US:return`Column "${n}"`;default:return`Column "${n}"`}}}const R={id:`sheet.command.sort-range-asc`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!0,!1)},z={id:`sheet.command.sort-range-asc-ext`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!0,!0)},B={id:`sheet.command.sort-range-desc`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!1,!1)},V={id:`sheet.command.sort-range-desc-ext`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!1,!0)},H={id:`sheet.command.sort-range-custom`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortCustomize()},U={id:`sheet.command.sort-range-asc-ctx`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!0,!1)},W={id:`sheet.command.sort-range-asc-ext-ctx`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!0,!0)},G={id:`sheet.command.sort-range-desc-ctx`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!1,!1)},K={id:`sheet.command.sort-range-desc-ext-ctx`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortDirectly(!1,!0)},q={id:`sheet.command.sort-range-custom-ctx`,type:e.COMMAND,handler:async e=>await e.get(L).triggerSortCustomize()};var Je=`@univerjs/sheets-sort-ui`,Ye=`0.18.0`;const Xe=`sheets-sort-ui.config`;Symbol(Xe);const Ze={},Qe=`sheet.menu.sheets-sort`,$e=`sheet.menu.sheets-sort-ctx`,J=`AscendingIcon`,Y=`ExpandAscendingIcon`,X=`DescendingIcon`,Z=`ExpandDescendingIcon`,et=`CustomSortIcon`;function tt(e){return{id:Qe,type:w.SUBITEMS,icon:J,tooltip:`sheets-sort.general.sort`,hidden$:Ee(e,m.UNIVER_SHEET),disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function nt(e){return{id:R.id,icon:J,title:`sheets-sort.general.sort-asc-cur`,type:w.BUTTON,hidden$:Ue(e)}}function rt(e){return{id:z.id,title:`sheets-sort.general.sort-asc-ext`,icon:Y,type:w.BUTTON}}function it(e){return{id:B.id,title:`sheets-sort.general.sort-desc-cur`,icon:X,type:w.BUTTON}}function at(e){return{id:V.id,title:`sheets-sort.general.sort-desc-ext`,icon:Z,type:w.BUTTON}}function ot(e){return{id:H.id,title:`sheets-sort.general.sort-custom`,type:w.BUTTON,icon:et}}function st(e){return{id:$e,title:`sheets-sort.general.sort`,type:w.SUBITEMS,icon:J,hidden$:Ee(e,m.UNIVER_SHEET),disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function ct(e){return{id:U.id,title:`sheets-sort.general.sort-asc-cur`,type:w.BUTTON,icon:J,disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function lt(e){return{id:W.id,title:`sheets-sort.general.sort-asc-ext`,type:w.BUTTON,icon:Y,disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function ut(e){return{id:G.id,title:`sheets-sort.general.sort-desc-cur`,type:w.BUTTON,icon:X,disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function dt(e){return{id:K.id,title:`sheets-sort.general.sort-desc-ext`,type:w.BUTTON,icon:Z,disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}function ft(e){return{id:q.id,title:`sheets-sort.general.sort-custom`,type:w.BUTTON,icon:et,disabled$:A(e,{workbookTypes:[_],worksheetTypes:[y,v],rangeTypes:[g]})}}const pt={[we.ORGANIZATION]:{[Qe]:{order:3,menuItemFactory:tt,[R.id]:{order:0,menuItemFactory:nt},[z.id]:{order:1,menuItemFactory:rt},[B.id]:{order:2,menuItemFactory:it},[V.id]:{order:3,menuItemFactory:at},[H.id]:{order:4,menuItemFactory:ot}}},[ye.MAIN_AREA]:{[ve.DATA]:{[$e]:{order:0,menuItemFactory:st,[U.id]:{order:0,menuItemFactory:ct},[W.id]:{order:1,menuItemFactory:lt},[G.id]:{order:2,menuItemFactory:ut},[K.id]:{order:3,menuItemFactory:dt},[q.id]:{order:4,menuItemFactory:ft}}}}};function mt(){let e=De(T(L).customSortState$);return!e||!e.location?null:O(ht,{state:e})}function ht({state:e}){let t=T(ae),n=T(l),r=T(L),[i,a]=D(!1),[o,s]=D(0),c=ke(null),{range:u,unitId:d,subUnitId:f}=e.location,p=r.getTitles(i),[m,h]=D([{type:x.ASC,colIndex:u.startColumn}]),g=E((e,t)=>{let n=[...m];t===null?n.splice(e,1):n[e]=t,h(n)},[m]),te=E(ee(()=>{let e=[...m],t=_t(u,m);t!==null&&(e.push({type:x.ASC,colIndex:t}),h(e))},200),[m,u]),ne=E((e,n)=>{t.applySort({range:u,orderRules:e,hasTitle:n}),r.closeCustomSortPanel()},[t,r,u]),_=E(()=>{r.closeCustomSortPanel()},[r]),v=E(e=>{a(e),e?r.setSelection(d,f,{...u,startRow:u.startRow+1}):r.setSelection(d,f,u)},[r,u,f,d]);Oe(()=>{c.current&&m.length>5&&(c.current.scrollTop=c.current.scrollHeight)},[m]);let y=m.length<p.length,b=m.map(e=>({...e,id:`${e.colIndex}`}));return k(`div`,{children:[k(`div`,{onMouseDown:e=>{e.stopPropagation()},children:[k(`div`,{className:`univer-mb-2 univer-flex univer-items-center univer-justify-between`,children:[O(de,{checked:i,onChange:e=>v(!!e),children:n.t(`sheets-sort.dialog.first-row-check`)}),y?k(`div`,{className:`
|
|
2
|
+
univer-flex univer-cursor-pointer univer-select-none univer-items-center
|
|
3
|
+
univer-text-base
|
|
4
|
+
`,onClick:te,children:[O(Re,{}),O(`span`,{className:`univer-ml-1.5`,children:n.t(`sheets-sort.dialog.add-condition`)})]}):k(`div`,{className:`
|
|
5
|
+
univer-flex univer-cursor-pointer univer-select-none univer-items-center
|
|
6
|
+
univer-text-base univer-text-primary-500
|
|
7
|
+
disabled:univer-cursor-not-allowed disabled:univer-divide-opacity-30
|
|
8
|
+
disabled:univer-text-gray-800
|
|
9
|
+
`,children:[O(Re,{}),O(`span`,{className:`univer-ml-1.5 univer-text-xs`,children:n.t(`sheets-sort.dialog.add-condition`)})]})]}),O(`div`,{ref:c,className:he(`univer-max-h-[310px] univer-overflow-y-auto univer-overflow-x-hidden`,ge),onScroll:e=>{let t=e.currentTarget.scrollTop;s(t)},children:O(fe,{list:b,onListChange:h,idKey:`id`,draggableHandle:`[data-u-comp=sort-panel-item-handler]`,itemRender:e=>O(gt,{titles:p,list:b,item:e,onChange:(e,t)=>g(t,e),scrollPosition:o}),rowHeight:32,margin:[0,12]})})]}),k(`div`,{className:`univer-mt-5 univer-flex univer-justify-end`,children:[O(S,{className:`univer-ml-3`,onClick:()=>_(),children:n.t(`sheets-sort.dialog.cancel`)}),O(S,{className:`univer-ml-3`,variant:`primary`,onClick:()=>ne(m,i),children:n.t(`sheets-sort.dialog.confirm`)})]})]})}function gt(e){var t;let{list:n,item:r,titles:i,onChange:a,scrollPosition:o}=e,s=T(l),c=i.filter(e=>!n.some(t=>t.colIndex===e.index)||e.index===r.colIndex),u=n.findIndex(e=>e.colIndex===r.colIndex),d=E(e=>{a({...r,colIndex:e.index},u),p(!1)},[u,r,a]),[f,p]=D(!1),m=e=>{p(e)};Oe(()=>{p(!1)},[o]);let h=n.length>1,ee=(t=i.find(e=>e.index===r.colIndex))==null?void 0:t.label;return k(`div`,{className:`univer-grid univer-grid-flow-col univer-grid-cols-2 univer-items-center univer-gap-2`,children:[k(`div`,{className:`univer-flex univer-items-center`,children:[O(`div`,{"data-u-comp":`sort-panel-item-handler`,className:`
|
|
10
|
+
univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-text-base
|
|
11
|
+
univer-text-gray-700
|
|
12
|
+
`,children:O(Be,{})}),O(pe,{overlay:O(`ul`,{className:he(`
|
|
13
|
+
univer-my-0 univer-box-border univer-grid univer-max-h-[310px]
|
|
14
|
+
univer-w-[--radix-popper-anchor-width] univer-items-center univer-gap-1
|
|
15
|
+
univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border
|
|
16
|
+
univer-bg-white univer-p-1 univer-text-base univer-shadow-lg
|
|
17
|
+
`,ge),children:c.map(e=>k(`li`,{onClick:()=>d(e),className:`
|
|
18
|
+
univer-relative univer-box-border univer-flex univer-h-7 univer-cursor-pointer
|
|
19
|
+
univer-list-none univer-items-center univer-justify-between univer-rounded
|
|
20
|
+
univer-px-2 univer-text-sm univer-transition-all
|
|
21
|
+
hover:univer-bg-gray-100
|
|
22
|
+
dark:hover:!univer-bg-gray-700
|
|
23
|
+
`,children:[O(`span`,{className:`univer-max-w-[220px] univer-truncate`,children:e.label}),O(`span`,{children:e.index===r.colIndex&&O(Me,{})})]},e.index))}),open:f,onOpenChange:m,children:k(`div`,{className:he(`
|
|
24
|
+
univer-ml-2 univer-flex univer-w-full univer-items-center univer-justify-between
|
|
25
|
+
univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-text-sm univer-text-gray-900
|
|
26
|
+
dark:!univer-text-white
|
|
27
|
+
`),children:[O(`span`,{className:`univer-max-w-[220px] univer-truncate`,children:ee}),O(ze,{})]})})]}),k(`div`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[k(me,{value:r.type,onChange:e=>{a({...r,type:e},u)},children:[O(C,{value:x.ASC,children:s.t(`sheets-sort.general.sort-asc`)}),O(C,{value:x.DESC,children:s.t(`sheets-sort.general.sort-desc`)})]}),O(`a`,{className:`
|
|
28
|
+
univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-transition-colors
|
|
29
|
+
hover:univer-text-red-500
|
|
30
|
+
`,onClick:()=>a(null,u),children:!h&&O(Pe,{})})]})]})}function _t(e,t){let{startColumn:n,endColumn:r}=e,i=new Set(t.map(e=>e==null?void 0:e.colIndex));for(let e=n;e<=r;e++)if(!i.has(e))return e;return null}function vt(e){let{range:t,colIndex:n,onClose:r}=e,i=T(L),a=T(o),s=T(l),c=E(e=>{let{unitId:o,subUnitId:s}=ie(a)||{};if(t&&o&&s){let r={...t,startRow:t.startRow+1};i.triggerSortDirectly(e,!1,{unitId:o,subUnitId:s,range:r,colIndex:n})}else throw Error(`Cannot find the target to sort. unitId: ${o}, subUnitId: ${s}, range: ${t}, colIndex: ${n}`);r()},[t,n,i,a,r]);return k(ue,{className:`univer-mb-3 univer-w-full univer-grid-cols-2`,children:[k(S,{onClick:()=>c(!0),children:[O(je,{}),s.t(`sheets-sort.general.sort-asc`)]}),k(S,{onClick:()=>c(!1),children:[O(Fe,{}),s.t(`sheets-sort.general.sort-desc`)]})]})}const yt=`custom-sort-dialog`;let Q=class extends f{constructor(e,t,n,r,i,a,o,s,c,l){super(),this._commandService=e,this._menuManagerService=t,this._dialogService=n,this._layoutService=r,this._uiPartsService=i,this._sheetRenderService=a,this._localeService=o,this._sheetsSortUIService=s,this._injector=c,this._componentManager=l,this._initCommands(),this._initMenu(),this._initUI()}_initMenu(){this._menuManagerService.mergeMenu(pt)}_initCommands(){[R,z,B,V,H,U,W,G,K,q].forEach(e=>this.disposeWithMe(this._commandService.registerCommand(e))),this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(oe.id))}_initUI(){this.disposeWithMe(this._uiPartsService.registerComponent(He.FILTER_PANEL_EMBED_POINT,()=>Te(vt,this._injector))),[[`CustomSortPanel`,mt],[J,je],[Y,Ie],[X,Fe],[Z,Le],[et,Ne]].forEach(([e,t])=>{this.disposeWithMe(this._componentManager.register(e,t))}),this._sheetsSortUIService.customSortState$.pipe(le(this.dispose$)).subscribe(e=>{e&&e.show&&e.location?this._openCustomSortPanel(e.location):e&&!(e!=null&&e.show)&&this._closePanel()})}_openCustomSortPanel(e){this._dialogService.open({id:yt,draggable:!0,width:560,title:{title:`${this._localeService.t(`sheets-sort.general.sort-custom`)}: ${Ae(e.range)}`},children:{label:`CustomSortPanel`},destroyOnClose:!0,defaultPosition:bt(),preservePositionOnDestroy:!1,onClose:()=>this._closePanel(),mask:!0})}_closePanel(){this._dialogService.close(yt),queueMicrotask(()=>this._layoutService.focus())}};Q=P([N(0,r),N(1,Se),N(2,be),N(3,xe),N(4,Ce),N(5,s(Ve)),N(6,s(l)),N(7,s(L)),N(8,s(c)),N(9,s(_e))],Q);function bt(){return{x:(window.innerWidth-560)/2,y:128}}let $=class extends d{constructor(e=Ze,t,n){super(),this._config=e,this._injector=t,this._configService=n;let{...r}=h({},Ze,this._config);this._configService.setConfig(Xe,r)}onStarting(){[[L],[Q]].forEach(e=>this._injector.add(e))}onRendered(){this._injector.get(Q)}};M($,`type`,m.UNIVER_SHEET),M($,`pluginName`,`SHEET_SORT_UI_PLUGIN`),M($,`packageName`,Je),M($,`version`,Ye),$=P([t(se),N(1,s(c)),N(2,i)],$);export{R as SortRangeAscCommand,z as SortRangeAscExtCommand,W as SortRangeAscExtInCtxMenuCommand,U as SortRangeAscInCtxMenuCommand,H as SortRangeCustomCommand,q as SortRangeCustomInCtxMenuCommand,B as SortRangeDescCommand,V as SortRangeDescExtCommand,K as SortRangeDescExtInCtxMenuCommand,G as SortRangeDescInCtxMenuCommand,$ as UniverSheetsSortUIPlugin};
|