@univerjs/sheets-table-ui 0.10.3 → 0.10.4
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 +979 -947
- package/lib/index.js +979 -947
- package/lib/types/controllers/sheet-table-filter-button-render.controller.d.ts +4 -2
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -1,317 +1,317 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { IRenderManagerService as
|
|
6
|
-
import { TableManager as
|
|
7
|
-
import { SheetCanvasPopManagerService as
|
|
8
|
-
import { useDependency as M, ComponentManager as
|
|
9
|
-
import { startWith as
|
|
10
|
-
import { jsxs as
|
|
11
|
-
import { Dropdown as Ee, clsx as
|
|
12
|
-
import { SetRangeValuesMutation as
|
|
13
|
-
import { SortRangeCommand as
|
|
14
|
-
import { forwardRef as
|
|
15
|
-
import { serializeRange as
|
|
16
|
-
import { RangeSelector as
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
return
|
|
20
|
-
for (var e,
|
|
21
|
-
e = arguments[
|
|
22
|
-
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (
|
|
1
|
+
var Ln = Object.defineProperty;
|
|
2
|
+
var $n = (n, e, t) => e in n ? Ln(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var U = (n, e, t) => $n(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as N, IUniverInstanceService as fe, ICommandService as ne, LocaleService as re, Disposable as ke, ObjectMatrix as kn, cellToRange as Zt, Rectangle as me, Injector as Oe, IPermissionService as qt, IContextService as It, CommandType as Yt, IConfigService as Qt, ThemeService as On, RxDisposable as Gt, VerticalAlign as it, InterceptorEffectEnum as Pn, ErrorService as Dn, ColorKit as ve, UniverInstanceType as Qe, DependentOn as Bn, Plugin as Fn, merge as Vn, registerDependencies as Hn, touchDependencies as An } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as Xt, SHEET_VIEWPORT_KEY as Un, convertTransformToOffsetX as Wn, convertTransformToOffsetY as jn, Rect as Lt, Shape as Zn } from "@univerjs/engine-render";
|
|
6
|
+
import { TableManager as ie, SheetTableService as qn, SetSheetTableFilterCommand as $t, isConditionFilter as Yn, isManualFilter as Qn, TableDateCompareTypeEnum as l, TableStringCompareTypeEnum as j, TableConditionTypeEnum as F, TableNumberCompareTypeEnum as k, SheetsTableSortStateEnum as Ke, TableColumnFilterTypeEnum as kt, AddSheetTableCommand as Gn, SHEET_TABLE_CUSTOM_THEME_PREFIX as Xn, DeleteSheetTableCommand as zn, SetSheetTableCommand as Ct, SheetsTableButtonStateEnum as Me, processStyleWithBorderStyle as Ot, customEmptyThemeWithBorderStyle as Kn, AddTableThemeCommand as Jn, RemoveTableThemeCommand as er, SheetTableRemoveColCommand as zt, SheetTableRemoveRowCommand as Kt, SheetTableInsertColCommand as Jt, SheetTableInsertRowCommand as en, SheetsTableController as tn, UniverSheetsTablePlugin as tr } from "@univerjs/sheets-table";
|
|
7
|
+
import { SheetCanvasPopManagerService as nr, SheetSkeletonManagerService as ct, SheetScrollManagerService as rr, SetZoomRatioOperation as ir, SetScrollOperation as ar, getSheetObject as sr, getCoordByCell as lr, getCurrentRangeDisable$ as or, SelectAllCommand as cr } from "@univerjs/sheets-ui";
|
|
8
|
+
import { useDependency as M, ComponentManager as nn, IDialogService as rn, ISidebarService as ur, useObservable as we, IUIPartsService as dr, BuiltInUIPart as hr, connectInjector as vr, MenuItemType as Re, getMenuHiddenObservable as gr, ContextMenuPosition as br, ContextMenuGroup as mr, RibbonDataGroup as pr, IMenuManagerService as fr } from "@univerjs/ui";
|
|
9
|
+
import { startWith as an, distinctUntilChanged as Cr, Subject as Sr, BehaviorSubject as Pt, merge as yt, filter as _r, debounceTime as Tr, switchMap as Ie, of as ee, map as wr, takeUntil as Ir } from "rxjs";
|
|
10
|
+
import { jsxs as T, jsx as o, Fragment as Rt } from "react/jsx-runtime";
|
|
11
|
+
import { Dropdown as Ee, clsx as D, borderClassName as H, CascaderList as yr, Input as Mt, InputNumber as bt, DatePicker as Rr, DateRangePicker as Mr, Select as xr, Checkbox as Dt, scrollbarClassName as Nr, ButtonGroup as Er, Button as Te, Segmented as Lr, ColorPicker as Je } from "@univerjs/design";
|
|
12
|
+
import { SetRangeValuesMutation as $r, WorkbookEditablePermission as sn, getSheetCommandTarget as ut, SheetsSelectionsService as dt, isSingleCellSelection as kr, expandToContinuousRange as Or, SetRangeThemeMutation as ln, WorkbookPermissionService as on, SheetRangeThemeModel as cn, SheetInterceptorService as un, SetVerticalTextAlignCommand as Pr, INTERCEPTOR_POINT as Dr, RangeThemeStyle as Br, getPrimaryForRange as Bt, SetSelectionsOperation as Ft } from "@univerjs/sheets";
|
|
13
|
+
import { SortRangeCommand as Fr, SortType as Vt } from "@univerjs/sheets-sort";
|
|
14
|
+
import { forwardRef as ae, useRef as Vr, createElement as se, useState as q, useMemo as dn, useCallback as Ht, useEffect as hn } from "react";
|
|
15
|
+
import { serializeRange as At, deserializeRangeWithSheet as Hr } from "@univerjs/engine-formula";
|
|
16
|
+
import { RangeSelector as Ar } from "@univerjs/sheets-formula-ui";
|
|
17
|
+
const Ur = "SHEET_TABLE_UI_PLUGIN", be = "SHEETS_TABLE_FILTER_PANEL_OPENED_KEY", Wr = "UNIVER_SHEET_Table_FILTER_PANEL_ID", vn = "TABLE_TOOLBAR_BUTTON", Ne = "TABLE_SELECTOR_DIALOG", jr = "SHEET_TABLE_THEME_PANEL_ID", gn = "SHEET_TABLE_THEME_PANEL", mt = "table-custom-", Zr = "table-default-", ge = "rgb(255, 255, 255)", X = "none", et = "1px solid rgb(var(--grey-200))";
|
|
18
|
+
var z = function() {
|
|
19
|
+
return z = Object.assign || function(n) {
|
|
20
|
+
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
21
|
+
e = arguments[t];
|
|
22
|
+
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]);
|
|
23
23
|
}
|
|
24
|
-
return
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
var
|
|
28
|
-
for (var r in
|
|
29
|
-
if (
|
|
30
|
-
for (var i = 0, r = Object.getOwnPropertySymbols(
|
|
31
|
-
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
var
|
|
35
|
-
return
|
|
24
|
+
return n;
|
|
25
|
+
}, z.apply(this, arguments);
|
|
26
|
+
}, qr = function(n, e) {
|
|
27
|
+
var t = {};
|
|
28
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
29
|
+
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
30
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(n); i < r.length; i++)
|
|
31
|
+
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
|
32
|
+
return t;
|
|
33
|
+
}, le = ae(function(n, e) {
|
|
34
|
+
var t = n.icon, r = n.id, i = n.className, a = n.extend, s = qr(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), u = Vr("_".concat(Gr()));
|
|
35
|
+
return bn(t, "".concat(r), { defIds: t.defIds, idSuffix: u.current }, z({ ref: e, className: c }, s), a);
|
|
36
36
|
});
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
return
|
|
37
|
+
function bn(n, e, t, r, i) {
|
|
38
|
+
return se(n.tag, z(z({ key: e }, Yr(n, t, i)), r), (Qr(n, t).children || []).map(function(a, s) {
|
|
39
|
+
return bn(a, "".concat(e, "-").concat(n.tag, "-").concat(s), t, void 0, i);
|
|
40
40
|
}));
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
var r =
|
|
44
|
-
|
|
42
|
+
function Yr(n, e, t) {
|
|
43
|
+
var r = z({}, n.attrs);
|
|
44
|
+
t != null && t.colorChannel1 && r.fill === "colorChannel1" && (r.fill = t.colorChannel1), n.tag === "mask" && r.id && (r.id = r.id + e.idSuffix), Object.entries(r).forEach(function(a) {
|
|
45
45
|
var s = a[0], c = a[1];
|
|
46
46
|
s === "mask" && typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
47
47
|
});
|
|
48
48
|
var i = e.defIds;
|
|
49
|
-
return !i || i.length === 0 || (
|
|
49
|
+
return !i || i.length === 0 || (n.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(a) {
|
|
50
50
|
var s = a[0], c = a[1];
|
|
51
51
|
typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
52
52
|
})), r;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
var
|
|
56
|
-
return !r || r.length === 0 ?
|
|
57
|
-
return typeof i.attrs.id == "string" && r && r.includes(i.attrs.id) ?
|
|
58
|
-
}) }) :
|
|
54
|
+
function Qr(n, e) {
|
|
55
|
+
var t, r = e.defIds;
|
|
56
|
+
return !r || r.length === 0 ? n : n.tag === "defs" && (!((t = n.children) === null || t === void 0) && t.length) ? z(z({}, n), { children: n.children.map(function(i) {
|
|
57
|
+
return typeof i.attrs.id == "string" && r && r.includes(i.attrs.id) ? z(z({}, i), { attrs: z(z({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
|
|
58
|
+
}) }) : n;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Gr() {
|
|
61
61
|
return Math.random().toString(36).substring(2, 8);
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
return
|
|
63
|
+
le.displayName = "UniverIcon";
|
|
64
|
+
var Xr = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, mn = ae(function(n, e) {
|
|
65
|
+
return se(le, Object.assign({}, n, {
|
|
66
66
|
id: "ascending-icon",
|
|
67
67
|
ref: e,
|
|
68
|
-
icon:
|
|
68
|
+
icon: Xr
|
|
69
69
|
}));
|
|
70
70
|
});
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
return
|
|
71
|
+
mn.displayName = "AscendingIcon";
|
|
72
|
+
var zr = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.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.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, pn = ae(function(n, e) {
|
|
73
|
+
return se(le, Object.assign({}, n, {
|
|
74
74
|
id: "delete-icon",
|
|
75
75
|
ref: e,
|
|
76
|
-
icon:
|
|
76
|
+
icon: zr
|
|
77
77
|
}));
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
return
|
|
79
|
+
pn.displayName = "DeleteIcon";
|
|
80
|
+
var Kr = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, fn = ae(function(n, e) {
|
|
81
|
+
return se(le, Object.assign({}, n, {
|
|
82
82
|
id: "descending-icon",
|
|
83
83
|
ref: e,
|
|
84
|
-
icon:
|
|
84
|
+
icon: Kr
|
|
85
85
|
}));
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
return
|
|
87
|
+
fn.displayName = "DescendingIcon";
|
|
88
|
+
var Jr = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z" } }] }, qe = ae(function(n, e) {
|
|
89
|
+
return se(le, Object.assign({}, n, {
|
|
90
90
|
id: "dropdown-icon",
|
|
91
91
|
ref: e,
|
|
92
|
-
icon:
|
|
92
|
+
icon: Jr
|
|
93
93
|
}));
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
var
|
|
97
|
-
return
|
|
95
|
+
qe.displayName = "DropdownIcon";
|
|
96
|
+
var ei = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.33333 3.33333V6H6V3.33333H3.33333ZM2 3.238C2 2.55427 2.55427 2 3.238 2H6.09533C6.77906 2 7.33333 2.55427 7.33333 3.238V6.09533C7.33333 6.77906 6.77906 7.33333 6.09533 7.33333H3.238C2.55427 7.33333 2 6.77906 2 6.09533V3.238ZM10 3.33333V6H12.6667V3.33333H10ZM8.66667 3.238C8.66667 2.55427 9.22094 2 9.90467 2H12.762C13.4457 2 14 2.55427 14 3.238V6.09533C14 6.77906 13.4457 7.33333 12.762 7.33333H9.90467C9.22094 7.33333 8.66667 6.77906 8.66667 6.09533V3.238ZM3.33333 10V12.6667H6V10H3.33333ZM2 9.90467C2 9.22094 2.55427 8.66667 3.238 8.66667H6.09533C6.77906 8.66667 7.33333 9.22094 7.33333 9.90467V12.762C7.33333 13.4457 6.77906 14 6.09533 14H3.238C2.55427 14 2 13.4457 2 12.762V9.90467ZM10 10V12.6667H12.6667V10H10ZM8.66667 9.90467C8.66667 9.22094 9.22094 8.66667 9.90467 8.66667H12.762C13.4457 8.66667 14 9.22094 14 9.90467V12.762C14 13.4457 13.4457 14 12.762 14H9.90467C9.22094 14 8.66667 13.4457 8.66667 12.762V9.90467Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn = ae(function(n, e) {
|
|
97
|
+
return se(le, Object.assign({}, n, {
|
|
98
98
|
id: "grid-outline-icon",
|
|
99
99
|
ref: e,
|
|
100
|
-
icon:
|
|
100
|
+
icon: ei
|
|
101
101
|
}));
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
103
|
+
Cn.displayName = "GridOutlineIcon";
|
|
104
|
+
var ti = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, xt = ae(function(n, e) {
|
|
105
|
+
return se(le, Object.assign({}, n, {
|
|
106
106
|
id: "more-down-icon",
|
|
107
107
|
ref: e,
|
|
108
|
-
icon:
|
|
108
|
+
icon: ti
|
|
109
109
|
}));
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
var
|
|
113
|
-
return
|
|
111
|
+
xt.displayName = "MoreDownIcon";
|
|
112
|
+
var ni = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, Sn = ae(function(n, e) {
|
|
113
|
+
return se(le, Object.assign({}, n, {
|
|
114
114
|
id: "paint-bucket-double-icon",
|
|
115
115
|
ref: e,
|
|
116
|
-
icon:
|
|
116
|
+
icon: ni
|
|
117
117
|
}));
|
|
118
118
|
});
|
|
119
|
-
|
|
120
|
-
var
|
|
121
|
-
return
|
|
119
|
+
Sn.displayName = "PaintBucketDoubleIcon";
|
|
120
|
+
var ri = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.80068 2.57257L7.27955 2.57256C7.61092 2.57256 7.87954 2.30393 7.87954 1.97256C7.87954 1.64119 7.61091 1.37256 7.27954 1.37256L3.80068 1.37257C2.36473 1.37257 1.20067 2.53665 1.20068 3.97259L1.20074 12.3001C1.20075 13.736 2.36481 14.9 3.80074 14.9H12.1282C13.5641 14.9 14.7282 13.736 14.7282 12.3V8.82116C14.7282 8.48979 14.4595 8.22116 14.1282 8.22116C13.7968 8.22116 13.5282 8.48979 13.5282 8.82116V12.3C13.5282 13.0732 12.9014 13.7 12.1282 13.7H3.80074C3.02754 13.7 2.40074 13.0732 2.40074 12.3001L2.40068 3.97258C2.40068 3.19938 3.02748 2.57257 3.80068 2.57257Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.0072 2.0955C13.0997 1.18757 11.6278 1.18794 10.7207 2.09632L6.17749 6.646C6.10294 6.72065 6.04543 6.81056 6.00889 6.90954L4.59817 10.7315C4.51713 10.951 4.57116 11.1977 4.73657 11.3633C4.90198 11.5288 5.14858 11.5831 5.36823 11.5023L9.20237 10.0916C9.30186 10.055 9.3922 9.99722 9.46714 9.92224L14.0073 5.37972C14.9139 4.47266 14.9138 3.00252 14.0072 2.0955ZM11.5698 2.94424C12.0083 2.50513 12.7198 2.50496 13.1585 2.94384C13.5968 3.38229 13.5968 4.09294 13.1585 4.53141L8.69127 9.00102L6.1742 9.92713L7.09912 7.42132L11.5698 2.94424Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _n = ae(function(n, e) {
|
|
121
|
+
return se(le, Object.assign({}, n, {
|
|
122
122
|
id: "rename-icon",
|
|
123
123
|
ref: e,
|
|
124
|
-
icon:
|
|
124
|
+
icon: ri
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
|
-
|
|
128
|
-
var
|
|
129
|
-
return
|
|
127
|
+
_n.displayName = "RenameIcon";
|
|
128
|
+
var ii = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.7643 4.13354C1.7643 2.82523 2.82488 1.76465 4.13319 1.76465H11.8665C13.1748 1.76465 14.2354 2.82524 14.2354 4.13354V11.8669C14.2354 13.1752 13.1748 14.2358 11.8665 14.2358H4.13318C2.82488 14.2358 1.7643 13.1752 1.7643 11.8669V6.1462C1.76388 6.13711 1.76367 6.12797 1.76367 6.11878C1.76367 6.10959 1.76388 6.10045 1.7643 6.09136V4.13354ZM2.94652 6.70989V11.8669C2.94652 12.5222 3.47781 13.0535 4.13318 13.0535H5.52732V6.70989H2.94652ZM5.52732 5.52767H2.94652V4.13354C2.94652 3.47816 3.47781 2.94687 4.13319 2.94687H5.52732V5.52767ZM6.70954 6.70989V13.0535H11.8665C12.5219 13.0535 13.0532 12.5222 13.0532 11.8669V6.70989L6.70954 6.70989ZM13.0532 5.52767L6.70954 5.52767V2.94687H11.8665C12.5219 2.94687 13.0532 3.47816 13.0532 4.13354V5.52767Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Tn = ae(function(n, e) {
|
|
129
|
+
return se(le, Object.assign({}, n, {
|
|
130
130
|
id: "table-icon",
|
|
131
131
|
ref: e,
|
|
132
|
-
icon:
|
|
132
|
+
icon: ii
|
|
133
133
|
}));
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
var
|
|
137
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
138
|
-
(s =
|
|
135
|
+
Tn.displayName = "TableIcon";
|
|
136
|
+
var pe = /* @__PURE__ */ ((n) => (n.Items = "items", n.Condition = "condition", n))(pe || {}), ai = Object.getOwnPropertyDescriptor, si = (n, e, t, r) => {
|
|
137
|
+
for (var i = r > 1 ? void 0 : r ? ai(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
138
|
+
(s = n[a]) && (i = s(i) || i);
|
|
139
139
|
return i;
|
|
140
|
-
}, je = (
|
|
141
|
-
let Le = class extends
|
|
142
|
-
constructor(e,
|
|
140
|
+
}, je = (n, e) => (t, r) => e(t, r, n);
|
|
141
|
+
let Le = class extends ke {
|
|
142
|
+
constructor(e, t, r, i, a) {
|
|
143
143
|
super();
|
|
144
|
-
|
|
145
|
-
this._tableManager = e, this._sheetTableService =
|
|
144
|
+
U(this, "_itemsCache", /* @__PURE__ */ new Map());
|
|
145
|
+
this._tableManager = e, this._sheetTableService = t, this._univerInstanceService = r, this._commandService = i, this._localeService = a, this._registerTableFilterChangeEvent();
|
|
146
146
|
}
|
|
147
147
|
_registerTableFilterChangeEvent() {
|
|
148
148
|
this._commandService.onCommandExecuted((e) => {
|
|
149
|
-
if (e.id ===
|
|
150
|
-
const { unitId:
|
|
149
|
+
if (e.id === $r.id) {
|
|
150
|
+
const { unitId: t, subUnitId: r, cellValue: i } = e.params, a = this._tableManager.getTablesBySubunitId(t, r);
|
|
151
151
|
if (!a.length)
|
|
152
152
|
return;
|
|
153
|
-
new
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
return
|
|
153
|
+
new kn(i).forValue((c, u, h) => {
|
|
154
|
+
const d = Zt(c, u), v = a.find((f) => {
|
|
155
|
+
const w = f.getTableFilterRange();
|
|
156
|
+
return me.intersects(w, d);
|
|
157
157
|
});
|
|
158
158
|
if (v) {
|
|
159
|
-
const
|
|
160
|
-
this._itemsCache.delete(v.getId() +
|
|
159
|
+
const f = u - v.getRange().startColumn;
|
|
160
|
+
this._itemsCache.delete(v.getId() + f);
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
} else if (e.id ===
|
|
164
|
-
const { unitId:
|
|
163
|
+
} else if (e.id === $t.id) {
|
|
164
|
+
const { unitId: t, tableId: r } = e.params, i = this._tableManager.getTable(t, r);
|
|
165
165
|
if (!i)
|
|
166
166
|
return;
|
|
167
167
|
const a = i.getSubunitId();
|
|
168
|
-
this._tableManager.getTablesBySubunitId(
|
|
169
|
-
const
|
|
170
|
-
for (let h =
|
|
168
|
+
this._tableManager.getTablesBySubunitId(t, a).forEach((c) => {
|
|
169
|
+
const u = c.getRange();
|
|
170
|
+
for (let h = u.startColumn; h <= u.endColumn; h++)
|
|
171
171
|
this._itemsCache.delete(c.getId() + h);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
getTableFilterPanelInitProps(e,
|
|
176
|
+
getTableFilterPanelInitProps(e, t, r, i) {
|
|
177
177
|
const a = this._tableManager.getTable(e, r), s = a.getRange(), c = a.getTableFilterColumn(i - s.startColumn);
|
|
178
178
|
return {
|
|
179
179
|
unitId: e,
|
|
180
|
-
subUnitId:
|
|
180
|
+
subUnitId: t,
|
|
181
181
|
tableFilter: c,
|
|
182
|
-
currentFilterBy:
|
|
182
|
+
currentFilterBy: Yn(c) ? pe.Condition : pe.Items,
|
|
183
183
|
tableId: r,
|
|
184
184
|
columnIndex: i - s.startColumn
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
getTableFilterCheckedItems(e,
|
|
188
|
-
const i = this._tableManager.getTable(e,
|
|
187
|
+
getTableFilterCheckedItems(e, t, r) {
|
|
188
|
+
const i = this._tableManager.getTable(e, t), a = [];
|
|
189
189
|
if (i) {
|
|
190
190
|
const s = i.getTableFilterColumn(r);
|
|
191
|
-
s &&
|
|
191
|
+
s && Qn(s) && a.push(...s.values);
|
|
192
192
|
}
|
|
193
193
|
return a;
|
|
194
194
|
}
|
|
195
|
-
setTableFilter(e,
|
|
196
|
-
if (!this._tableManager.getTable(e,
|
|
195
|
+
setTableFilter(e, t, r, i) {
|
|
196
|
+
if (!this._tableManager.getTable(e, t))
|
|
197
197
|
return;
|
|
198
198
|
const s = {
|
|
199
199
|
unitId: e,
|
|
200
|
-
tableId:
|
|
200
|
+
tableId: t,
|
|
201
201
|
column: r,
|
|
202
202
|
tableFilter: i
|
|
203
203
|
};
|
|
204
|
-
this._commandService.executeCommand(
|
|
204
|
+
this._commandService.executeCommand($t.id, s);
|
|
205
205
|
}
|
|
206
|
-
getTableFilterItems(e,
|
|
207
|
-
var
|
|
206
|
+
getTableFilterItems(e, t, r, i) {
|
|
207
|
+
var E;
|
|
208
208
|
if (this._itemsCache.has(r + i))
|
|
209
209
|
return this._itemsCache.get(r + i) || { data: [], itemsCountMap: /* @__PURE__ */ new Map(), allItemsCount: 0 };
|
|
210
210
|
const a = this._tableManager.getTable(e, r);
|
|
211
211
|
if (!a)
|
|
212
212
|
return { data: [], itemsCountMap: /* @__PURE__ */ new Map(), allItemsCount: 0 };
|
|
213
|
-
const s = a.getTableFilterRange(), { startRow: c, endRow:
|
|
213
|
+
const s = a.getTableFilterRange(), { startRow: c, endRow: u, startColumn: h } = s, d = h + i, v = (E = this._univerInstanceService.getUnit(e)) == null ? void 0 : E.getSheetBySheetId(t);
|
|
214
214
|
if (!v)
|
|
215
215
|
return { data: [], itemsCountMap: /* @__PURE__ */ new Map(), allItemsCount: 0 };
|
|
216
|
-
const
|
|
217
|
-
let
|
|
218
|
-
for (let
|
|
219
|
-
if (v.isRowFiltered(
|
|
216
|
+
const f = [], w = /* @__PURE__ */ new Map();
|
|
217
|
+
let S = 0;
|
|
218
|
+
for (let C = c; C <= u; C++) {
|
|
219
|
+
if (v.isRowFiltered(C))
|
|
220
220
|
continue;
|
|
221
|
-
let I = this._sheetTableService.getCellValueWithConditionType(v,
|
|
222
|
-
I === void 0 && (I = this._localeService.t("sheets-table.condition.empty")),
|
|
221
|
+
let I = this._sheetTableService.getCellValueWithConditionType(v, C, d);
|
|
222
|
+
I === void 0 && (I = this._localeService.t("sheets-table.condition.empty")), w.has(I) || f.push({
|
|
223
223
|
title: I,
|
|
224
|
-
key: `${
|
|
224
|
+
key: `${d}_${C}`,
|
|
225
225
|
leaf: !0
|
|
226
|
-
}),
|
|
226
|
+
}), S++, w.set(I, (w.get(I) || 0) + 1);
|
|
227
227
|
}
|
|
228
|
-
return this._itemsCache.set(r + i, { data:
|
|
228
|
+
return this._itemsCache.set(r + i, { data: f, itemsCountMap: w, allItemsCount: S }), { data: f, itemsCountMap: w, allItemsCount: S };
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
Le =
|
|
232
|
-
je(0,
|
|
233
|
-
je(1,
|
|
234
|
-
je(2,
|
|
235
|
-
je(3,
|
|
236
|
-
je(4,
|
|
231
|
+
Le = si([
|
|
232
|
+
je(0, N(ie)),
|
|
233
|
+
je(1, N(qn)),
|
|
234
|
+
je(2, N(fe)),
|
|
235
|
+
je(3, ne),
|
|
236
|
+
je(4, N(re))
|
|
237
237
|
], Le);
|
|
238
|
-
var Z = /* @__PURE__ */ ((
|
|
239
|
-
function
|
|
240
|
-
const
|
|
238
|
+
var Z = /* @__PURE__ */ ((n) => (n.DatePicker = "DatePicker", n.DateRange = "DateRange", n.Input = "Input", n.Inputs = "Inputs", n.Select = "Select", n.None = "None", n))(Z || {});
|
|
239
|
+
function li(n) {
|
|
240
|
+
const t = n.get(re).t;
|
|
241
241
|
return [
|
|
242
242
|
{
|
|
243
243
|
value: F.String,
|
|
244
|
-
label:
|
|
244
|
+
label: t(`sheets-table.condition.${F.String}`),
|
|
245
245
|
children: [
|
|
246
246
|
{
|
|
247
247
|
value: j.Equal,
|
|
248
|
-
label:
|
|
248
|
+
label: t(`sheets-table.string.compare.${j.Equal}`)
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
value: j.NotEqual,
|
|
252
|
-
label:
|
|
252
|
+
label: t(`sheets-table.string.compare.${j.NotEqual}`)
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
value: j.Contains,
|
|
256
|
-
label:
|
|
256
|
+
label: t(`sheets-table.string.compare.${j.Contains}`)
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
value: j.NotContains,
|
|
260
|
-
label:
|
|
260
|
+
label: t(`sheets-table.string.compare.${j.NotContains}`)
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
value: j.StartsWith,
|
|
264
|
-
label:
|
|
264
|
+
label: t(`sheets-table.string.compare.${j.StartsWith}`)
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
267
|
value: j.EndsWith,
|
|
268
|
-
label:
|
|
268
|
+
label: t(`sheets-table.string.compare.${j.EndsWith}`)
|
|
269
269
|
}
|
|
270
270
|
]
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
value: F.Number,
|
|
274
|
-
label:
|
|
274
|
+
label: t(`sheets-table.condition.${F.Number}`),
|
|
275
275
|
children: [
|
|
276
276
|
{
|
|
277
|
-
value:
|
|
278
|
-
label:
|
|
277
|
+
value: k.Equal,
|
|
278
|
+
label: t(`sheets-table.number.compare.${k.Equal}`)
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
|
-
value:
|
|
282
|
-
label:
|
|
281
|
+
value: k.NotEqual,
|
|
282
|
+
label: t(`sheets-table.number.compare.${k.NotEqual}`)
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
-
value:
|
|
286
|
-
label:
|
|
285
|
+
value: k.GreaterThan,
|
|
286
|
+
label: t(`sheets-table.number.compare.${k.GreaterThan}`)
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
|
-
value:
|
|
290
|
-
label:
|
|
289
|
+
value: k.GreaterThanOrEqual,
|
|
290
|
+
label: t(`sheets-table.number.compare.${k.GreaterThanOrEqual}`)
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
|
-
value:
|
|
294
|
-
label:
|
|
293
|
+
value: k.LessThan,
|
|
294
|
+
label: t(`sheets-table.number.compare.${k.LessThan}`)
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
|
-
value:
|
|
298
|
-
label:
|
|
297
|
+
value: k.LessThanOrEqual,
|
|
298
|
+
label: t(`sheets-table.number.compare.${k.LessThanOrEqual}`)
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
value:
|
|
302
|
-
label:
|
|
301
|
+
value: k.Between,
|
|
302
|
+
label: t(`sheets-table.number.compare.${k.Between}`)
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
|
-
value:
|
|
306
|
-
label:
|
|
305
|
+
value: k.NotBetween,
|
|
306
|
+
label: t(`sheets-table.number.compare.${k.NotBetween}`)
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
|
-
value:
|
|
310
|
-
label:
|
|
309
|
+
value: k.Above,
|
|
310
|
+
label: t(`sheets-table.number.compare.${k.Above}`)
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
|
-
value:
|
|
314
|
-
label:
|
|
313
|
+
value: k.Below,
|
|
314
|
+
label: t(`sheets-table.number.compare.${k.Below}`)
|
|
315
315
|
}
|
|
316
316
|
// {
|
|
317
317
|
// value: TableNumberCompareTypeEnum.TopN,
|
|
@@ -321,104 +321,104 @@ function ai(t) {
|
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
value: F.Date,
|
|
324
|
-
label:
|
|
324
|
+
label: t(`sheets-table.condition.${F.Date}`),
|
|
325
325
|
children: [
|
|
326
326
|
{
|
|
327
327
|
value: l.Equal,
|
|
328
|
-
label:
|
|
328
|
+
label: t(`sheets-table.date.compare.${l.Equal}`)
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
value: l.NotEqual,
|
|
332
|
-
label:
|
|
332
|
+
label: t(`sheets-table.date.compare.${l.NotEqual}`)
|
|
333
333
|
},
|
|
334
334
|
{
|
|
335
335
|
value: l.After,
|
|
336
|
-
label:
|
|
336
|
+
label: t(`sheets-table.date.compare.${l.After}`)
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
value: l.AfterOrEqual,
|
|
340
|
-
label:
|
|
340
|
+
label: t(`sheets-table.date.compare.${l.AfterOrEqual}`)
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
value: l.Before,
|
|
344
|
-
label:
|
|
344
|
+
label: t(`sheets-table.date.compare.${l.Before}`)
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
347
|
value: l.BeforeOrEqual,
|
|
348
|
-
label:
|
|
348
|
+
label: t(`sheets-table.date.compare.${l.BeforeOrEqual}`)
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
351
|
value: l.Between,
|
|
352
|
-
label:
|
|
352
|
+
label: t(`sheets-table.date.compare.${l.Between}`)
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
355
|
value: l.NotBetween,
|
|
356
|
-
label:
|
|
356
|
+
label: t(`sheets-table.date.compare.${l.NotBetween}`)
|
|
357
357
|
},
|
|
358
358
|
{
|
|
359
359
|
value: l.Today,
|
|
360
|
-
label:
|
|
360
|
+
label: t(`sheets-table.date.compare.${l.Today}`)
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
value: l.Yesterday,
|
|
364
|
-
label:
|
|
364
|
+
label: t(`sheets-table.date.compare.${l.Yesterday}`)
|
|
365
365
|
},
|
|
366
366
|
{
|
|
367
367
|
value: l.Tomorrow,
|
|
368
|
-
label:
|
|
368
|
+
label: t(`sheets-table.date.compare.${l.Tomorrow}`)
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
value: l.ThisWeek,
|
|
372
|
-
label:
|
|
372
|
+
label: t(`sheets-table.date.compare.${l.ThisWeek}`)
|
|
373
373
|
},
|
|
374
374
|
{
|
|
375
375
|
value: l.LastWeek,
|
|
376
|
-
label:
|
|
376
|
+
label: t(`sheets-table.date.compare.${l.LastWeek}`)
|
|
377
377
|
},
|
|
378
378
|
{
|
|
379
379
|
value: l.NextWeek,
|
|
380
|
-
label:
|
|
380
|
+
label: t(`sheets-table.date.compare.${l.NextWeek}`)
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
383
|
value: l.ThisMonth,
|
|
384
|
-
label:
|
|
384
|
+
label: t(`sheets-table.date.compare.${l.ThisMonth}`)
|
|
385
385
|
},
|
|
386
386
|
{
|
|
387
387
|
value: l.LastMonth,
|
|
388
|
-
label:
|
|
388
|
+
label: t(`sheets-table.date.compare.${l.LastMonth}`)
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
value: l.NextMonth,
|
|
392
|
-
label:
|
|
392
|
+
label: t(`sheets-table.date.compare.${l.NextMonth}`)
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
value: l.ThisYear,
|
|
396
|
-
label:
|
|
396
|
+
label: t(`sheets-table.date.compare.${l.ThisYear}`)
|
|
397
397
|
},
|
|
398
398
|
{
|
|
399
399
|
value: l.LastYear,
|
|
400
|
-
label:
|
|
400
|
+
label: t(`sheets-table.date.compare.${l.LastYear}`)
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
value: l.NextYear,
|
|
404
|
-
label:
|
|
404
|
+
label: t(`sheets-table.date.compare.${l.NextYear}`)
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
value: l.Quarter,
|
|
408
|
-
label:
|
|
408
|
+
label: t(`sheets-table.date.compare.${l.Quarter}`)
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
411
|
value: l.Month,
|
|
412
|
-
label:
|
|
412
|
+
label: t(`sheets-table.date.compare.${l.Month}`)
|
|
413
413
|
}
|
|
414
414
|
]
|
|
415
415
|
}
|
|
416
416
|
];
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function oi(n, e) {
|
|
419
419
|
if (!e)
|
|
420
420
|
return [];
|
|
421
|
-
const r =
|
|
421
|
+
const r = n.get(re).t;
|
|
422
422
|
switch (e) {
|
|
423
423
|
case l.Quarter:
|
|
424
424
|
return [
|
|
@@ -494,7 +494,7 @@ function si(t, e) {
|
|
|
494
494
|
return [];
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
const
|
|
497
|
+
const Nt = /* @__PURE__ */ new Set([
|
|
498
498
|
l.Equal,
|
|
499
499
|
l.NotEqual,
|
|
500
500
|
l.After,
|
|
@@ -502,22 +502,22 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
502
502
|
l.Before,
|
|
503
503
|
l.BeforeOrEqual
|
|
504
504
|
]);
|
|
505
|
-
function
|
|
506
|
-
return e ?
|
|
505
|
+
function ci(n, e) {
|
|
506
|
+
return e ? n === F.String ? Z.Input : n === F.Number ? e === k.Between || e === k.NotBetween ? Z.Inputs : Z.Input : n === F.Date ? e === l.Between || e === l.NotBetween ? Z.DateRange : e === l.Quarter || e === l.Month ? Z.Select : Nt.has(e) ? Z.DatePicker : Z.None : Z.None : Z.None;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
if (!
|
|
508
|
+
function ui(n) {
|
|
509
|
+
if (!n || n.filterType !== "condition")
|
|
510
510
|
return {
|
|
511
511
|
type: F.String,
|
|
512
512
|
compareType: j.Equal,
|
|
513
513
|
info: {}
|
|
514
514
|
};
|
|
515
|
-
const e =
|
|
516
|
-
if (
|
|
515
|
+
const e = n.filterInfo, { conditionType: t, compareType: r } = e;
|
|
516
|
+
if (t === F.Date)
|
|
517
517
|
if (r === l.Between || r === l.NotBetween) {
|
|
518
518
|
let i;
|
|
519
519
|
return Array.isArray(e.expectedValue) && (i = e.expectedValue.map((a) => typeof a == "string" ? new Date(a) : a)), {
|
|
520
|
-
type:
|
|
520
|
+
type: t,
|
|
521
521
|
compare: r,
|
|
522
522
|
info: {
|
|
523
523
|
dateRange: i
|
|
@@ -526,11 +526,11 @@ function oi(t) {
|
|
|
526
526
|
} else {
|
|
527
527
|
if (r === l.Today || r === l.Yesterday || r === l.Tomorrow || r === l.ThisWeek || r === l.LastWeek || r === l.NextWeek || r === l.ThisMonth || r === l.LastMonth || r === l.NextMonth || r === l.ThisYear || r === l.LastYear || r === l.NextYear)
|
|
528
528
|
return {
|
|
529
|
-
type:
|
|
529
|
+
type: t,
|
|
530
530
|
compare: r,
|
|
531
531
|
info: {}
|
|
532
532
|
};
|
|
533
|
-
if (
|
|
533
|
+
if (Nt.has(r)) {
|
|
534
534
|
let i;
|
|
535
535
|
if (typeof e.expectedValue == "string")
|
|
536
536
|
i = new Date(e.expectedValue);
|
|
@@ -538,7 +538,7 @@ function oi(t) {
|
|
|
538
538
|
for (let a = 0; a < e.expectedValue.length; a++)
|
|
539
539
|
typeof e.expectedValue[a] == "string" && (e.expectedValue[a] = new Date(e.expectedValue[a]));
|
|
540
540
|
return {
|
|
541
|
-
type:
|
|
541
|
+
type: t,
|
|
542
542
|
compare: r,
|
|
543
543
|
info: {
|
|
544
544
|
date: i
|
|
@@ -546,13 +546,13 @@ function oi(t) {
|
|
|
546
546
|
};
|
|
547
547
|
} else
|
|
548
548
|
return (/* @__PURE__ */ new Set([l.Q1, l.Q2, l.Q3, l.Q4])).has(r) ? {
|
|
549
|
-
type:
|
|
549
|
+
type: t,
|
|
550
550
|
compare: l.Quarter,
|
|
551
551
|
info: {
|
|
552
552
|
dateSelect: e.compareType
|
|
553
553
|
}
|
|
554
554
|
} : {
|
|
555
|
-
type:
|
|
555
|
+
type: t,
|
|
556
556
|
compare: l.Month,
|
|
557
557
|
info: {
|
|
558
558
|
dateSelect: e.compareType
|
|
@@ -560,23 +560,23 @@ function oi(t) {
|
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
else {
|
|
563
|
-
if (
|
|
564
|
-
return r ===
|
|
565
|
-
type:
|
|
563
|
+
if (t === F.Number)
|
|
564
|
+
return r === k.Between || r === k.NotBetween ? {
|
|
565
|
+
type: t,
|
|
566
566
|
compare: r,
|
|
567
567
|
info: {
|
|
568
568
|
numberRange: e.expectedValue
|
|
569
569
|
}
|
|
570
570
|
} : {
|
|
571
|
-
type:
|
|
571
|
+
type: t,
|
|
572
572
|
compare: r,
|
|
573
573
|
info: {
|
|
574
574
|
number: e.expectedValue
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
|
-
if (
|
|
577
|
+
if (t === F.String)
|
|
578
578
|
return {
|
|
579
|
-
type:
|
|
579
|
+
type: t,
|
|
580
580
|
compare: r,
|
|
581
581
|
info: {
|
|
582
582
|
string: e.expectedValue
|
|
@@ -589,25 +589,25 @@ function oi(t) {
|
|
|
589
589
|
info: {}
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
|
-
const
|
|
593
|
-
var
|
|
594
|
-
const { conditionInfo: e, onChange:
|
|
595
|
-
|
|
596
|
-
type:
|
|
597
|
-
compare:
|
|
592
|
+
const di = (n) => {
|
|
593
|
+
var w, S, E, C, L, I, B, R;
|
|
594
|
+
const { conditionInfo: e, onChange: t } = n, r = M(re), [i, a] = q(!1), s = M(Oe), c = li(s), u = (g, x, y) => {
|
|
595
|
+
t({
|
|
596
|
+
type: x != null ? x : e.type,
|
|
597
|
+
compare: y != null ? y : e.compare,
|
|
598
598
|
info: g
|
|
599
599
|
});
|
|
600
600
|
}, h = (g) => {
|
|
601
|
-
var
|
|
602
|
-
const
|
|
603
|
-
|
|
601
|
+
var P;
|
|
602
|
+
const x = g[0], y = g[1];
|
|
603
|
+
y && a(!1);
|
|
604
604
|
const m = {};
|
|
605
|
-
|
|
606
|
-
},
|
|
605
|
+
x === F.Date ? y === l.Quarter ? m.dateSelect = l.Q1 : y === l.Month ? m.dateSelect = l.M1 : Nt.has(y) ? m.date = /* @__PURE__ */ new Date() : m.dateRange = [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()] : x === F.Number ? m.number = 0 : x === F.String && (m.string = ""), u(m, g[0], (P = g[1]) != null ? P : j.Equal);
|
|
606
|
+
}, d = ci(e.type, e.compare);
|
|
607
607
|
let v = "";
|
|
608
608
|
e.compare ? v = `${r.t(`sheets-table.condition.${e.type}`)} - ${r.t(`sheets-table.${e.type}.compare.${e.compare}`)}` : v = r.t(`sheets-table.condition.${e.type}`);
|
|
609
|
-
const
|
|
610
|
-
return /* @__PURE__ */
|
|
609
|
+
const f = oi(s, e.compare);
|
|
610
|
+
return /* @__PURE__ */ T("div", { children: [
|
|
611
611
|
/* @__PURE__ */ o(
|
|
612
612
|
Ee,
|
|
613
613
|
{
|
|
@@ -615,7 +615,7 @@ const ci = (t) => {
|
|
|
615
615
|
open: i,
|
|
616
616
|
onOpenChange: a,
|
|
617
617
|
overlay: /* @__PURE__ */ o(
|
|
618
|
-
|
|
618
|
+
yr,
|
|
619
619
|
{
|
|
620
620
|
value: [e.type, e.compare],
|
|
621
621
|
options: c,
|
|
@@ -624,155 +624,155 @@ const ci = (t) => {
|
|
|
624
624
|
wrapperClassName: "!univer-h-[150px]"
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ T(
|
|
628
628
|
"div",
|
|
629
629
|
{
|
|
630
|
-
className:
|
|
630
|
+
className: D("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-2 univer-text-sm univer-transition-colors univer-duration-200 hover:univer-border-primary-600 focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 dark:!univer-bg-gray-700 dark:!univer-text-white", H),
|
|
631
631
|
children: [
|
|
632
632
|
/* @__PURE__ */ o("span", { children: v }),
|
|
633
|
-
/* @__PURE__ */ o(
|
|
633
|
+
/* @__PURE__ */ o(xt, {})
|
|
634
634
|
]
|
|
635
635
|
}
|
|
636
636
|
)
|
|
637
637
|
}
|
|
638
638
|
),
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
/* @__PURE__ */ T("div", { className: "univer-mt-3 univer-w-full", children: [
|
|
640
|
+
d === Z.Input && /* @__PURE__ */ o(Rt, { children: e.type === F.String ? /* @__PURE__ */ o(
|
|
641
|
+
Mt,
|
|
642
642
|
{
|
|
643
643
|
className: "univer-w-full",
|
|
644
644
|
placeholder: "请输入",
|
|
645
645
|
value: e.info.string,
|
|
646
|
-
onChange: (g) =>
|
|
646
|
+
onChange: (g) => u({ string: g })
|
|
647
647
|
}
|
|
648
648
|
) : /* @__PURE__ */ o(
|
|
649
|
-
|
|
649
|
+
bt,
|
|
650
650
|
{
|
|
651
651
|
className: "univer-h-7 univer-w-full",
|
|
652
652
|
value: e.info.number,
|
|
653
653
|
controls: !1,
|
|
654
654
|
onChange: (g) => {
|
|
655
|
-
g !== null &&
|
|
655
|
+
g !== null && u({ number: g });
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
) }),
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
d === Z.DatePicker && /* @__PURE__ */ o("div", { id: "univer-table-date-picker-wrapper", children: /* @__PURE__ */ o(
|
|
660
|
+
Rr,
|
|
661
661
|
{
|
|
662
662
|
className: "univer-w-full",
|
|
663
|
-
value: (
|
|
664
|
-
onValueChange: (g) =>
|
|
663
|
+
value: (w = e.info.date) != null ? w : /* @__PURE__ */ new Date(),
|
|
664
|
+
onValueChange: (g) => u({ date: g })
|
|
665
665
|
}
|
|
666
666
|
) }),
|
|
667
|
-
|
|
668
|
-
|
|
667
|
+
d === Z.DateRange && /* @__PURE__ */ o("div", { id: "univer-table-date-range-wrapper", children: /* @__PURE__ */ o(
|
|
668
|
+
Mr,
|
|
669
669
|
{
|
|
670
670
|
className: "univer-w-full",
|
|
671
|
-
value: [(
|
|
671
|
+
value: [(E = (S = e.info.dateRange) == null ? void 0 : S[0]) != null ? E : /* @__PURE__ */ new Date(), (L = (C = e.info.dateRange) == null ? void 0 : C[1]) != null ? L : /* @__PURE__ */ new Date()],
|
|
672
672
|
onValueChange: (g) => {
|
|
673
|
-
|
|
673
|
+
u(g ? { dateRange: g } : {});
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
) }),
|
|
677
|
-
|
|
677
|
+
d === Z.Inputs && /* @__PURE__ */ T("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
|
|
678
678
|
/* @__PURE__ */ o(
|
|
679
|
-
|
|
679
|
+
bt,
|
|
680
680
|
{
|
|
681
681
|
className: "univer-w-full",
|
|
682
682
|
value: (I = e.info.numberRange) == null ? void 0 : I[0],
|
|
683
683
|
onChange: (g) => {
|
|
684
|
-
var
|
|
685
|
-
g !== null &&
|
|
684
|
+
var x;
|
|
685
|
+
g !== null && u({ numberRange: [g, (x = e.info.numberRange) == null ? void 0 : x[1]] });
|
|
686
686
|
},
|
|
687
687
|
controls: !1
|
|
688
688
|
}
|
|
689
689
|
),
|
|
690
690
|
/* @__PURE__ */ o("span", { children: " - " }),
|
|
691
691
|
/* @__PURE__ */ o(
|
|
692
|
-
|
|
692
|
+
bt,
|
|
693
693
|
{
|
|
694
694
|
className: "univer-w-full",
|
|
695
|
-
value: (
|
|
695
|
+
value: (B = e.info.numberRange) == null ? void 0 : B[1],
|
|
696
696
|
controls: !1,
|
|
697
697
|
onChange: (g) => {
|
|
698
|
-
var
|
|
699
|
-
g !== null &&
|
|
698
|
+
var x;
|
|
699
|
+
g !== null && u({ numberRange: [(x = e.info.numberRange) == null ? void 0 : x[0], g] });
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
)
|
|
703
703
|
] }),
|
|
704
|
-
|
|
705
|
-
|
|
704
|
+
d === Z.Select && /* @__PURE__ */ o(
|
|
705
|
+
xr,
|
|
706
706
|
{
|
|
707
707
|
className: "univer-w-full",
|
|
708
|
-
value: (
|
|
709
|
-
options:
|
|
710
|
-
onChange: (g) =>
|
|
708
|
+
value: (R = e.info.dateSelect) != null ? R : f[0].value,
|
|
709
|
+
options: f,
|
|
710
|
+
onChange: (g) => u({ dateSelect: g })
|
|
711
711
|
}
|
|
712
712
|
)
|
|
713
713
|
] })
|
|
714
714
|
] });
|
|
715
|
-
},
|
|
715
|
+
}, hi = (n) => {
|
|
716
716
|
let e = 0;
|
|
717
|
-
return
|
|
718
|
-
e +=
|
|
717
|
+
return n.forEach((t) => {
|
|
718
|
+
e += t;
|
|
719
719
|
}), e;
|
|
720
720
|
};
|
|
721
|
-
function
|
|
722
|
-
const { unitId: e, tableId:
|
|
723
|
-
|
|
721
|
+
function vi(n) {
|
|
722
|
+
const { unitId: e, tableId: t, subUnitId: r, columnIndex: i, checkedItemSet: a, setCheckedItemSet: s, tableFilter: c } = n, u = M(re), h = M(Le), { data: d, itemsCountMap: v, allItemsCount: f } = h.getTableFilterItems(e, r, t, i), [w, S] = q(c === void 0 ? !0 : a.size === v.size), [E, C] = q(w ? f : hi(v)), L = !w && a.size > 0, [I, B] = q(""), R = dn(() => I ? d.filter((m) => String(m.title).toLowerCase().includes(I.toLowerCase())) : d, [I, d]), g = Ht(() => {
|
|
723
|
+
w ? (a.clear(), s(new Set(a)), S(!1)) : (R.forEach((m) => {
|
|
724
724
|
a.add(m.title);
|
|
725
|
-
}), s(new Set(a)),
|
|
726
|
-
}, [
|
|
727
|
-
m === "" ? (
|
|
728
|
-
a.add(
|
|
729
|
-
}), f
|
|
730
|
-
}, []),
|
|
731
|
-
if (
|
|
732
|
-
|
|
733
|
-
const
|
|
734
|
-
for (const { title:
|
|
735
|
-
m !==
|
|
736
|
-
f
|
|
725
|
+
}), s(new Set(a)), S(!0));
|
|
726
|
+
}, [w]), x = Ht((m) => {
|
|
727
|
+
m === "" ? (S(!0), d.forEach((P) => {
|
|
728
|
+
a.add(P.title);
|
|
729
|
+
}), C(f)) : (a.clear(), S(!1), C(0)), B(m);
|
|
730
|
+
}, []), y = (m) => {
|
|
731
|
+
if (w) {
|
|
732
|
+
S(!1);
|
|
733
|
+
const P = /* @__PURE__ */ new Set();
|
|
734
|
+
for (const { title: $ } of d)
|
|
735
|
+
m !== $ && P.add($);
|
|
736
|
+
C(f - v.get(m)), s(P);
|
|
737
737
|
} else
|
|
738
|
-
a.has(m) ? (a.delete(m),
|
|
738
|
+
a.has(m) ? (a.delete(m), C(E - v.get(m))) : (a.add(m), C(E + v.get(m))), s(new Set(a));
|
|
739
739
|
};
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */ o(
|
|
740
|
+
return /* @__PURE__ */ T("div", { className: "univer-flex univer-h-full univer-flex-col", children: [
|
|
741
|
+
/* @__PURE__ */ o(Mt, { autoFocus: !0, value: I, placeholder: u.t("sheets-filter.panel.search-placeholder"), onChange: x }),
|
|
742
742
|
/* @__PURE__ */ o(
|
|
743
743
|
"div",
|
|
744
744
|
{
|
|
745
|
-
className:
|
|
745
|
+
className: D("univer-mt-2 univer-box-border univer-flex univer-h-[180px] univer-max-h-[180px] univer-flex-grow univer-flex-col univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-pl-2", H),
|
|
746
746
|
children: /* @__PURE__ */ o(
|
|
747
747
|
"div",
|
|
748
748
|
{
|
|
749
|
-
className:
|
|
750
|
-
children: /* @__PURE__ */
|
|
749
|
+
className: D("univer-h-40 univer-overflow-y-auto univer-py-1 univer-pl-2", Nr),
|
|
750
|
+
children: /* @__PURE__ */ T("div", { className: "univer-h-full", children: [
|
|
751
751
|
/* @__PURE__ */ o("div", { className: "univer-flex univer-items-center univer-px-2 univer-py-1", children: /* @__PURE__ */ o(
|
|
752
|
-
|
|
752
|
+
Dt,
|
|
753
753
|
{
|
|
754
|
-
indeterminate:
|
|
755
|
-
disabled:
|
|
756
|
-
checked:
|
|
754
|
+
indeterminate: L,
|
|
755
|
+
disabled: d.length === 0,
|
|
756
|
+
checked: w,
|
|
757
757
|
onChange: g,
|
|
758
|
-
children: /* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: `${
|
|
760
|
-
/* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${
|
|
758
|
+
children: /* @__PURE__ */ T("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-items-center univer-text-sm", children: [
|
|
759
|
+
/* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: `${u.t("sheets-filter.panel.select-all")}` }),
|
|
760
|
+
/* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${E}/${I ? R.length : f})` })
|
|
761
761
|
] })
|
|
762
762
|
}
|
|
763
763
|
) }),
|
|
764
|
-
|
|
764
|
+
R.map((m) => /* @__PURE__ */ o(
|
|
765
765
|
"div",
|
|
766
766
|
{
|
|
767
767
|
className: "univer-flex univer-items-center univer-px-2 univer-py-1",
|
|
768
768
|
children: /* @__PURE__ */ o(
|
|
769
|
-
|
|
769
|
+
Dt,
|
|
770
770
|
{
|
|
771
|
-
checked:
|
|
771
|
+
checked: w || a.has(m.title),
|
|
772
772
|
onChange: () => {
|
|
773
|
-
|
|
773
|
+
y(m.title);
|
|
774
774
|
},
|
|
775
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ T("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-text-sm", children: [
|
|
776
776
|
/* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: m.title }),
|
|
777
777
|
/* @__PURE__ */ o("span", { className: "univer-ml-1 univer-text-gray-400", children: `(${v.get(m.title) || 0})` })
|
|
778
778
|
] })
|
|
@@ -788,48 +788,48 @@ function di(t) {
|
|
|
788
788
|
)
|
|
789
789
|
] });
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
var
|
|
793
|
-
const
|
|
794
|
-
const b =
|
|
795
|
-
return
|
|
796
|
-
}),
|
|
797
|
-
if (!
|
|
798
|
-
const m =
|
|
799
|
-
|
|
800
|
-
const
|
|
791
|
+
function gi() {
|
|
792
|
+
var he;
|
|
793
|
+
const n = M(re), e = bi(n), t = M(Le), r = M(ie), i = M(ne), a = M(qt), s = M($e), c = s.getCurrentTableFilterInfo(), u = t.getTableFilterPanelInitProps(c.unitId, c.subUnitId, c.tableId, c.column), { unitId: h, subUnitId: d, tableId: v, tableFilter: f, currentFilterBy: w, columnIndex: S } = u, { data: E } = t.getTableFilterItems(h, d, v, S), C = t.getTableFilterCheckedItems(h, v, S), [L, I] = q(new Set(C)), [B, R] = q(w || pe.Items), [g, x] = q(() => {
|
|
794
|
+
const b = u.tableFilter;
|
|
795
|
+
return ui(b);
|
|
796
|
+
}), y = r.getTable(h, v);
|
|
797
|
+
if (!y) return null;
|
|
798
|
+
const m = y.getTableFilters(), P = m.getSortState();
|
|
799
|
+
P.columnIndex === S && (P.sortState, Ke.Asc), P.columnIndex === S && (P.sortState, Ke.Desc);
|
|
800
|
+
const $ = () => {
|
|
801
801
|
s.closeFilterPanel();
|
|
802
|
-
},
|
|
803
|
-
|
|
804
|
-
},
|
|
805
|
-
const
|
|
806
|
-
i.executeCommand(
|
|
802
|
+
}, Y = () => {
|
|
803
|
+
$();
|
|
804
|
+
}, V = (b) => {
|
|
805
|
+
const O = y.getTableFilterRange();
|
|
806
|
+
i.executeCommand(Fr.id, {
|
|
807
807
|
unitId: h,
|
|
808
|
-
subUnitId:
|
|
809
|
-
range:
|
|
810
|
-
orderRules: [{ colIndex:
|
|
808
|
+
subUnitId: d,
|
|
809
|
+
range: O,
|
|
810
|
+
orderRules: [{ colIndex: S + O.startColumn, type: b ? Vt.ASC : Vt.DESC }],
|
|
811
811
|
hasTitle: !1
|
|
812
|
-
}), m.setSortState(
|
|
813
|
-
},
|
|
814
|
-
if (
|
|
812
|
+
}), m.setSortState(S, b ? Ke.Asc : Ke.Desc), $();
|
|
813
|
+
}, G = () => {
|
|
814
|
+
if (B === pe.Items) {
|
|
815
815
|
const b = [];
|
|
816
|
-
for (const
|
|
817
|
-
|
|
818
|
-
const
|
|
819
|
-
if (
|
|
820
|
-
if (
|
|
821
|
-
|
|
816
|
+
for (const Q of E)
|
|
817
|
+
L.has(Q.title) && b.push(Q.title);
|
|
818
|
+
const O = y.getTableFilterColumn(S);
|
|
819
|
+
if (O) {
|
|
820
|
+
if (O.values.join(",") === b.join(",")) {
|
|
821
|
+
$();
|
|
822
822
|
return;
|
|
823
823
|
}
|
|
824
824
|
} else if (b.length === 0) {
|
|
825
|
-
|
|
825
|
+
$();
|
|
826
826
|
return;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
829
|
-
filterType:
|
|
828
|
+
const A = {
|
|
829
|
+
filterType: kt.manual,
|
|
830
830
|
values: b
|
|
831
831
|
};
|
|
832
|
-
|
|
832
|
+
t.setTableFilter(h, v, S, A);
|
|
833
833
|
} else {
|
|
834
834
|
let b;
|
|
835
835
|
g.compare === l.Quarter || g.compare === l.Month ? b = {
|
|
@@ -840,79 +840,79 @@ function hi() {
|
|
|
840
840
|
compareType: g.compare,
|
|
841
841
|
expectedValue: Object.values(g.info)[0]
|
|
842
842
|
};
|
|
843
|
-
const
|
|
844
|
-
filterType:
|
|
843
|
+
const O = {
|
|
844
|
+
filterType: kt.condition,
|
|
845
845
|
// @ts-ignore
|
|
846
846
|
filterInfo: b
|
|
847
847
|
};
|
|
848
|
-
|
|
848
|
+
t.setTableFilter(h, v, S, O);
|
|
849
849
|
}
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
|
|
853
|
-
},
|
|
854
|
-
return /* @__PURE__ */
|
|
850
|
+
$();
|
|
851
|
+
}, ue = () => {
|
|
852
|
+
t.setTableFilter(h, v, S, void 0), $();
|
|
853
|
+
}, de = new sn(h).id, Ce = (he = a.getPermissionPoint(de)) == null ? void 0 : he.value;
|
|
854
|
+
return /* @__PURE__ */ T(
|
|
855
855
|
"div",
|
|
856
856
|
{
|
|
857
857
|
className: "univer-box-border univer-flex univer-w-[312px] univer-flex-col univer-rounded-[10px] univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-border-gray-600 dark:!univer-bg-gray-700",
|
|
858
858
|
children: [
|
|
859
|
-
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
/* @__PURE__ */ o(
|
|
862
|
-
|
|
859
|
+
Ce && /* @__PURE__ */ o("div", { className: "univer-mb-3 univer-flex", children: /* @__PURE__ */ T(Er, { className: "univer-mb-3 !univer-flex univer-w-full", children: [
|
|
860
|
+
/* @__PURE__ */ T(Te, { className: "univer-w-1/2", onClick: () => V(!0), children: [
|
|
861
|
+
/* @__PURE__ */ o(mn, { className: "univer-mr-1" }),
|
|
862
|
+
n.t("sheets-sort.general.sort-asc")
|
|
863
863
|
] }),
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */ o(
|
|
866
|
-
|
|
864
|
+
/* @__PURE__ */ T(Te, { className: "univer-w-1/2", onClick: () => V(!1), children: [
|
|
865
|
+
/* @__PURE__ */ o(fn, { className: "univer-mr-1" }),
|
|
866
|
+
n.t("sheets-sort.general.sort-desc")
|
|
867
867
|
] })
|
|
868
868
|
] }) }),
|
|
869
869
|
/* @__PURE__ */ o("div", { className: "univer-w-full", children: /* @__PURE__ */ o(
|
|
870
|
-
|
|
870
|
+
Lr,
|
|
871
871
|
{
|
|
872
|
-
value:
|
|
872
|
+
value: B,
|
|
873
873
|
items: e,
|
|
874
|
-
onChange: (b) =>
|
|
874
|
+
onChange: (b) => R(b)
|
|
875
875
|
}
|
|
876
876
|
) }),
|
|
877
|
-
/* @__PURE__ */ o("div", { className: "univer-z-10 univer-h-60 univer-w-[280px]", children: /* @__PURE__ */ o("div", { className: "univer-mt-3 univer-h-full univer-w-full", children:
|
|
878
|
-
|
|
877
|
+
/* @__PURE__ */ o("div", { className: "univer-z-10 univer-h-60 univer-w-[280px]", children: /* @__PURE__ */ o("div", { className: "univer-mt-3 univer-h-full univer-w-full", children: B === pe.Items ? /* @__PURE__ */ o(
|
|
878
|
+
vi,
|
|
879
879
|
{
|
|
880
|
-
tableFilter:
|
|
880
|
+
tableFilter: f,
|
|
881
881
|
unitId: h,
|
|
882
|
-
subUnitId:
|
|
882
|
+
subUnitId: d,
|
|
883
883
|
tableId: v,
|
|
884
|
-
columnIndex:
|
|
885
|
-
checkedItemSet:
|
|
884
|
+
columnIndex: S,
|
|
885
|
+
checkedItemSet: L,
|
|
886
886
|
setCheckedItemSet: I
|
|
887
887
|
}
|
|
888
888
|
) : /* @__PURE__ */ o(
|
|
889
|
-
|
|
889
|
+
di,
|
|
890
890
|
{
|
|
891
|
-
tableFilter:
|
|
891
|
+
tableFilter: f,
|
|
892
892
|
unitId: h,
|
|
893
|
-
subUnitId:
|
|
893
|
+
subUnitId: d,
|
|
894
894
|
tableId: v,
|
|
895
|
-
columnIndex:
|
|
895
|
+
columnIndex: S,
|
|
896
896
|
conditionInfo: g,
|
|
897
|
-
onChange:
|
|
897
|
+
onChange: x
|
|
898
898
|
}
|
|
899
899
|
) }) }),
|
|
900
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ T(
|
|
901
901
|
"div",
|
|
902
902
|
{
|
|
903
903
|
className: "univer-flex-wrap-nowrap univer-mt-4 univer-inline-flex univer-flex-shrink-0 univer-flex-grow-0 univer-justify-between univer-overflow-hidden",
|
|
904
904
|
children: [
|
|
905
905
|
/* @__PURE__ */ o(
|
|
906
|
-
|
|
906
|
+
Te,
|
|
907
907
|
{
|
|
908
|
-
disabled:
|
|
909
|
-
onClick:
|
|
910
|
-
children:
|
|
908
|
+
disabled: f === void 0,
|
|
909
|
+
onClick: ue,
|
|
910
|
+
children: n.t("sheets-filter.panel.clear-filter")
|
|
911
911
|
}
|
|
912
912
|
),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */ o(
|
|
915
|
-
/* @__PURE__ */ o(
|
|
913
|
+
/* @__PURE__ */ T("div", { children: [
|
|
914
|
+
/* @__PURE__ */ o(Te, { className: "univer-mr-2", onClick: Y, children: n.t("sheets-filter.panel.cancel") }),
|
|
915
|
+
/* @__PURE__ */ o(Te, { variant: "primary", onClick: G, children: n.t("sheets-filter.panel.confirm") })
|
|
916
916
|
] })
|
|
917
917
|
]
|
|
918
918
|
}
|
|
@@ -921,24 +921,24 @@ function hi() {
|
|
|
921
921
|
}
|
|
922
922
|
);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
const e =
|
|
926
|
-
return
|
|
927
|
-
{ label:
|
|
928
|
-
{ label:
|
|
929
|
-
], [e,
|
|
924
|
+
function bi(n) {
|
|
925
|
+
const e = n.getCurrentLocale();
|
|
926
|
+
return dn(() => [
|
|
927
|
+
{ label: n.t("sheets-filter.panel.by-values"), value: pe.Items },
|
|
928
|
+
{ label: n.t("sheets-filter.panel.by-conditions"), value: pe.Condition }
|
|
929
|
+
], [e, n]);
|
|
930
930
|
}
|
|
931
|
-
var
|
|
932
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
933
|
-
(s =
|
|
931
|
+
var mi = Object.getOwnPropertyDescriptor, pi = (n, e, t, r) => {
|
|
932
|
+
for (var i = r > 1 ? void 0 : r ? mi(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
933
|
+
(s = n[a]) && (i = s(i) || i);
|
|
934
934
|
return i;
|
|
935
|
-
},
|
|
936
|
-
let $e = class extends
|
|
937
|
-
constructor(e,
|
|
935
|
+
}, tt = (n, e) => (t, r) => e(t, r, n);
|
|
936
|
+
let $e = class extends ke {
|
|
937
|
+
constructor(e, t, r, i) {
|
|
938
938
|
super();
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
this._componentManager = e, this._contextService =
|
|
939
|
+
U(this, "_popupDisposable");
|
|
940
|
+
U(this, "_currentTableFilterInfo", null);
|
|
941
|
+
this._componentManager = e, this._contextService = t, this._sheetCanvasPopupService = r, this._dialogService = i, this._initComponents(), this._initUIPopup();
|
|
942
942
|
}
|
|
943
943
|
setCurrentTableFilterInfo(e) {
|
|
944
944
|
this._currentTableFilterInfo = e;
|
|
@@ -951,29 +951,29 @@ let $e = class extends Oe {
|
|
|
951
951
|
}
|
|
952
952
|
_initComponents() {
|
|
953
953
|
[
|
|
954
|
-
[
|
|
955
|
-
].forEach(([e,
|
|
956
|
-
this.disposeWithMe(this._componentManager.register(e,
|
|
954
|
+
[be, gi]
|
|
955
|
+
].forEach(([e, t]) => {
|
|
956
|
+
this.disposeWithMe(this._componentManager.register(e, t));
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
959
|
_initUIPopup() {
|
|
960
|
-
this.disposeWithMe(this._contextService.subscribeContextValue$(
|
|
960
|
+
this.disposeWithMe(this._contextService.subscribeContextValue$(be).pipe(an(void 0), Cr()).subscribe((e) => {
|
|
961
961
|
e ? this._openFilterPopup() : e === !1 && this._closeFilterPopup();
|
|
962
962
|
}));
|
|
963
963
|
}
|
|
964
964
|
closeFilterPanel() {
|
|
965
|
-
this._contextService.setContextValue(
|
|
965
|
+
this._contextService.setContextValue(be, !1);
|
|
966
966
|
}
|
|
967
967
|
_openFilterPopup() {
|
|
968
968
|
const e = this._currentTableFilterInfo;
|
|
969
969
|
if (!e)
|
|
970
970
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
971
|
-
const { row:
|
|
972
|
-
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(
|
|
973
|
-
componentKey:
|
|
971
|
+
const { row: t, column: r } = e;
|
|
972
|
+
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(t, r, {
|
|
973
|
+
componentKey: be,
|
|
974
974
|
direction: "horizontal",
|
|
975
975
|
onClickOutside: () => {
|
|
976
|
-
this._dialogService.close(
|
|
976
|
+
this._dialogService.close(Wr), this._contextService.setContextValue(be, !1);
|
|
977
977
|
},
|
|
978
978
|
offset: [5, 0],
|
|
979
979
|
portal: !0
|
|
@@ -984,39 +984,39 @@ let $e = class extends Oe {
|
|
|
984
984
|
(e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null, this.clearCurrentTableFilterInfo();
|
|
985
985
|
}
|
|
986
986
|
};
|
|
987
|
-
$e =
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
987
|
+
$e = pi([
|
|
988
|
+
tt(0, N(nn)),
|
|
989
|
+
tt(1, It),
|
|
990
|
+
tt(2, N(nr)),
|
|
991
|
+
tt(3, N(rn))
|
|
992
992
|
], $e);
|
|
993
|
-
const
|
|
994
|
-
type:
|
|
993
|
+
const St = {
|
|
994
|
+
type: Yt.OPERATION,
|
|
995
995
|
id: "sheet.operation.open-table-filter-panel",
|
|
996
|
-
async handler(
|
|
996
|
+
async handler(n, e) {
|
|
997
997
|
if (!e)
|
|
998
998
|
return !1;
|
|
999
|
-
const { row:
|
|
1000
|
-
return c.getTable(i, s) ? (
|
|
999
|
+
const { row: t, col: r, unitId: i, subUnitId: a, tableId: s } = e, c = n.get(ie), u = n.get(It), h = n.get($e);
|
|
1000
|
+
return c.getTable(i, s) ? (u.getContextValue(be) || (h.setCurrentTableFilterInfo({ unitId: i, subUnitId: a, row: t, tableId: s, column: r }), u.setContextValue(be, !0)), !0) : !1;
|
|
1001
1001
|
}
|
|
1002
|
-
},
|
|
1003
|
-
type:
|
|
1002
|
+
}, Et = {
|
|
1003
|
+
type: Yt.OPERATION,
|
|
1004
1004
|
id: "sheet.operation.open-table-selector",
|
|
1005
|
-
async handler(
|
|
1006
|
-
var
|
|
1007
|
-
const e =
|
|
1005
|
+
async handler(n) {
|
|
1006
|
+
var w;
|
|
1007
|
+
const e = n.get(fe), t = n.get(ne), r = ut(e);
|
|
1008
1008
|
if (!r)
|
|
1009
1009
|
return !1;
|
|
1010
|
-
const { unitId: i, subUnitId: a, worksheet: s } = r,
|
|
1011
|
-
return
|
|
1010
|
+
const { unitId: i, subUnitId: a, worksheet: s } = r, u = n.get(dt).getCurrentLastSelection(), h = (w = u == null ? void 0 : u.range) != null ? w : { startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }, v = kr(u) ? Or(h, { up: !0, left: !0, right: !0, down: !0 }, s) : h, f = await wn(n, i, a, v);
|
|
1011
|
+
return f ? (t.executeCommand(Gn.id, { ...f }), !0) : !1;
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
|
-
async function
|
|
1015
|
-
const a =
|
|
1014
|
+
async function wn(n, e, t, r, i) {
|
|
1015
|
+
const a = n.get(rn), s = n.get(re);
|
|
1016
1016
|
return new Promise((c) => {
|
|
1017
|
-
const
|
|
1017
|
+
const u = {
|
|
1018
1018
|
unitId: e,
|
|
1019
|
-
subUnitId:
|
|
1019
|
+
subUnitId: t,
|
|
1020
1020
|
range: r,
|
|
1021
1021
|
tableId: i,
|
|
1022
1022
|
onConfirm: (h) => {
|
|
@@ -1036,7 +1036,7 @@ async function Tn(t, e, n, r, i) {
|
|
|
1036
1036
|
children: {
|
|
1037
1037
|
label: {
|
|
1038
1038
|
name: Ne,
|
|
1039
|
-
props:
|
|
1039
|
+
props: u
|
|
1040
1040
|
}
|
|
1041
1041
|
},
|
|
1042
1042
|
width: 300,
|
|
@@ -1046,117 +1046,117 @@ async function Tn(t, e, n, r, i) {
|
|
|
1046
1046
|
});
|
|
1047
1047
|
});
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1049
|
+
const In = "sheets-table-ui.config", Ut = {
|
|
1050
1050
|
anchorHeight: 24,
|
|
1051
1051
|
anchorBackgroundColor: "rgb(134,139,156)"
|
|
1052
1052
|
};
|
|
1053
|
-
var
|
|
1054
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1055
|
-
(s =
|
|
1053
|
+
var fi = Object.getOwnPropertyDescriptor, Ci = (n, e, t, r) => {
|
|
1054
|
+
for (var i = r > 1 ? void 0 : r ? fi(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
1055
|
+
(s = n[a]) && (i = s(i) || i);
|
|
1056
1056
|
return i;
|
|
1057
|
-
},
|
|
1058
|
-
let
|
|
1057
|
+
}, Si = (n, e) => (t, r) => e(t, r, n);
|
|
1058
|
+
let ye = class extends ke {
|
|
1059
1059
|
constructor(e) {
|
|
1060
1060
|
super();
|
|
1061
|
-
|
|
1062
|
-
|
|
1061
|
+
U(this, "_refreshTable", new Sr());
|
|
1062
|
+
U(this, "refreshTable$", this._refreshTable.asObservable());
|
|
1063
1063
|
this._commandService = e, this._initListener();
|
|
1064
1064
|
}
|
|
1065
1065
|
_initListener() {
|
|
1066
1066
|
this.disposeWithMe(
|
|
1067
1067
|
this._commandService.onCommandExecuted((e) => {
|
|
1068
|
-
if (e.id ===
|
|
1069
|
-
const
|
|
1070
|
-
r.startsWith(
|
|
1068
|
+
if (e.id === ln.id) {
|
|
1069
|
+
const t = e.params, { styleName: r } = t;
|
|
1070
|
+
r.startsWith(Xn) && this._refreshTable.next(Math.random());
|
|
1071
1071
|
}
|
|
1072
1072
|
})
|
|
1073
1073
|
);
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1079
|
-
const
|
|
1080
|
-
var
|
|
1081
|
-
const [
|
|
1082
|
-
s((
|
|
1083
|
-
...
|
|
1084
|
-
[b]:
|
|
1076
|
+
ye = Ci([
|
|
1077
|
+
Si(0, N(ne))
|
|
1078
|
+
], ye);
|
|
1079
|
+
const _i = () => {
|
|
1080
|
+
var Ce, he;
|
|
1081
|
+
const [n, e] = q(""), [t, r] = q(""), i = M(ur), [a, s] = q({}), c = M(Oe), u = M(at), h = we(u.anchorPosition$), d = M(ne), v = M(fe), f = M(on), w = we(f.unitPermissionInitStateChange$, !1), S = M(ie), E = M(cn), C = M(ye), L = we(C.refreshTable$), I = M(re), B = M(dt), R = we(B.selectionChanged$, [{ range: Zt(0, 0), primary: null }]), [, g] = q(Math.random()), y = M(Qt).getConfig(In), m = (Ce = y == null ? void 0 : y.anchorHeight) != null ? Ce : 24, P = (he = y == null ? void 0 : y.anchorBackgroundColor) != null ? he : "rgb(53,91,183)", $ = (b, O) => {
|
|
1082
|
+
s((A) => ({
|
|
1083
|
+
...A,
|
|
1084
|
+
[b]: O
|
|
1085
1085
|
}));
|
|
1086
1086
|
};
|
|
1087
|
-
if (
|
|
1087
|
+
if (hn(() => {
|
|
1088
1088
|
g(Math.random());
|
|
1089
|
-
}, [
|
|
1089
|
+
}, [L]), !(h != null && h.length))
|
|
1090
1090
|
return null;
|
|
1091
|
-
const
|
|
1092
|
-
if (!
|
|
1093
|
-
const { unitId:
|
|
1094
|
-
var
|
|
1095
|
-
if (((
|
|
1091
|
+
const Y = ut(v);
|
|
1092
|
+
if (!Y) return null;
|
|
1093
|
+
const { unitId: V, subUnitId: G } = Y, ue = (b, O) => {
|
|
1094
|
+
var Q;
|
|
1095
|
+
if (((Q = S.getTableById(V, b)) == null ? void 0 : Q.getDisplayName()) === O) {
|
|
1096
1096
|
e(""), r("");
|
|
1097
1097
|
return;
|
|
1098
1098
|
}
|
|
1099
|
-
|
|
1099
|
+
d.executeCommand(Ct.id, {
|
|
1100
1100
|
tableId: b,
|
|
1101
|
-
unitId:
|
|
1102
|
-
name:
|
|
1101
|
+
unitId: V,
|
|
1102
|
+
name: O
|
|
1103
1103
|
}), r(""), e("");
|
|
1104
|
-
},
|
|
1105
|
-
const
|
|
1106
|
-
if (!
|
|
1107
|
-
const
|
|
1108
|
-
|
|
1104
|
+
}, de = async (b) => {
|
|
1105
|
+
const O = S.getTableById(V, b);
|
|
1106
|
+
if (!O) return;
|
|
1107
|
+
const A = O.getRange(), Q = await wn(c, V, G, A, b);
|
|
1108
|
+
Q && d.executeCommand(Ct.id, {
|
|
1109
1109
|
tableId: b,
|
|
1110
|
-
unitId:
|
|
1110
|
+
unitId: V,
|
|
1111
1111
|
updateRange: {
|
|
1112
|
-
newRange:
|
|
1112
|
+
newRange: Q.range
|
|
1113
1113
|
}
|
|
1114
1114
|
});
|
|
1115
1115
|
};
|
|
1116
|
-
return
|
|
1117
|
-
var De, Be, p,
|
|
1118
|
-
const
|
|
1119
|
-
if (!
|
|
1120
|
-
const
|
|
1121
|
-
if (!(
|
|
1116
|
+
return w ? /* @__PURE__ */ o("div", { className: "univer-absolute univer-z-50 univer-h-0 univer-w-0", children: h.map((b) => {
|
|
1117
|
+
var De, Be, p, _, K, J, oe;
|
|
1118
|
+
const O = S.getTableById(V, b.tableId);
|
|
1119
|
+
if (!O) return null;
|
|
1120
|
+
const A = E.getRangeThemeStyle(V, O.getTableStyleId()), Q = (p = (Be = (De = A == null ? void 0 : A.getHeaderRowStyle()) == null ? void 0 : De.bg) == null ? void 0 : Be.rgb) != null ? p : P, Ge = (J = (K = (_ = A == null ? void 0 : A.getHeaderRowStyle()) == null ? void 0 : _.cl) == null ? void 0 : K.rgb) != null ? J : "rgb(255, 255, 255)", Xe = O.getRange();
|
|
1121
|
+
if (!(R != null && R.length))
|
|
1122
1122
|
return null;
|
|
1123
|
-
const
|
|
1124
|
-
return /* @__PURE__ */
|
|
1123
|
+
const ze = R[R.length - 1].range, Pe = !me.intersects(Xe, ze) && b.y <= 20;
|
|
1124
|
+
return /* @__PURE__ */ T(
|
|
1125
1125
|
"div",
|
|
1126
1126
|
{
|
|
1127
|
-
className:
|
|
1127
|
+
className: D("univer-shadow-xs univer-absolute univer-box-border univer-cursor-pointer univer-items-center univer-rounded-xl univer-pl-2 univer-pr-2", H, {
|
|
1128
1128
|
"univer-flex": !Pe,
|
|
1129
1129
|
"univer-hidden": Pe
|
|
1130
1130
|
}),
|
|
1131
1131
|
style: {
|
|
1132
1132
|
left: b.x,
|
|
1133
1133
|
top: Math.max(b.y, 0),
|
|
1134
|
-
backgroundColor:
|
|
1135
|
-
color:
|
|
1134
|
+
backgroundColor: Q,
|
|
1135
|
+
color: Ge,
|
|
1136
1136
|
borderWidth: "0.5px",
|
|
1137
1137
|
height: m ? `${m}px` : "24px"
|
|
1138
1138
|
},
|
|
1139
1139
|
children: [
|
|
1140
|
-
/* @__PURE__ */ o("div", { className: "univer-text-nowrap", children:
|
|
1141
|
-
|
|
1140
|
+
/* @__PURE__ */ o("div", { className: "univer-text-nowrap", children: n === b.tableId ? /* @__PURE__ */ o(
|
|
1141
|
+
Mt,
|
|
1142
1142
|
{
|
|
1143
1143
|
className: "univer-h-[18px] univer-min-w-16 univer-rounded-none",
|
|
1144
1144
|
inputClass: "univer-h-[18px] univer-w-[80px]",
|
|
1145
|
-
value:
|
|
1145
|
+
value: t,
|
|
1146
1146
|
onChange: (W) => r(W),
|
|
1147
|
-
onBlur: () =>
|
|
1147
|
+
onBlur: () => ue(b.tableId, t),
|
|
1148
1148
|
onKeyDown: (W) => {
|
|
1149
|
-
W.key === "Enter" &&
|
|
1149
|
+
W.key === "Enter" && ue(b.tableId, t);
|
|
1150
1150
|
},
|
|
1151
|
-
autoFocus:
|
|
1151
|
+
autoFocus: n === b.tableId
|
|
1152
1152
|
}
|
|
1153
1153
|
) : /* @__PURE__ */ o("div", { className: "univer-h-[18px] univer-max-w-24 univer-truncate univer-text-sm", children: b.tableName }) }),
|
|
1154
1154
|
/* @__PURE__ */ o(
|
|
1155
1155
|
Ee,
|
|
1156
1156
|
{
|
|
1157
1157
|
align: "start",
|
|
1158
|
-
overlay: /* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1158
|
+
overlay: /* @__PURE__ */ T("div", { className: "univer-pb-2 univer-pt-2", children: [
|
|
1159
|
+
/* @__PURE__ */ T(
|
|
1160
1160
|
"div",
|
|
1161
1161
|
{
|
|
1162
1162
|
className: "univer-flex univer-min-w-32 univer-cursor-pointer univer-items-center univer-gap-2 univer-pb-1 univer-pl-2 univer-pr-2 univer-pt-1 univer-text-sm hover:univer-bg-gray-200",
|
|
@@ -1164,7 +1164,7 @@ const Ci = () => {
|
|
|
1164
1164
|
e(b.tableId), r(b.tableName);
|
|
1165
1165
|
},
|
|
1166
1166
|
children: [
|
|
1167
|
-
/* @__PURE__ */ o(
|
|
1167
|
+
/* @__PURE__ */ o(_n, {}),
|
|
1168
1168
|
I.t("sheets-table.rename")
|
|
1169
1169
|
]
|
|
1170
1170
|
}
|
|
@@ -1175,42 +1175,42 @@ const Ci = () => {
|
|
|
1175
1175
|
className: "univer-mb-1 univer-mt-1 univer-h-px univer-w-full univer-bg-gray-200"
|
|
1176
1176
|
}
|
|
1177
1177
|
),
|
|
1178
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ T(
|
|
1179
1179
|
"div",
|
|
1180
1180
|
{
|
|
1181
|
-
onClick: () =>
|
|
1181
|
+
onClick: () => de(b.tableId),
|
|
1182
1182
|
className: "univer-flex univer-min-w-32 univer-cursor-pointer univer-items-center univer-gap-2 univer-pb-1 univer-pl-2 univer-pr-2 univer-pt-1 univer-text-sm hover:univer-bg-gray-200",
|
|
1183
1183
|
children: [
|
|
1184
|
-
/* @__PURE__ */ o(
|
|
1184
|
+
/* @__PURE__ */ o(Cn, {}),
|
|
1185
1185
|
I.t("sheets-table.updateRange")
|
|
1186
1186
|
]
|
|
1187
1187
|
}
|
|
1188
1188
|
),
|
|
1189
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ T(
|
|
1190
1190
|
"div",
|
|
1191
1191
|
{
|
|
1192
1192
|
className: "univer-flex univer-min-w-32 univer-cursor-pointer univer-items-center univer-gap-2 univer-pb-1 univer-pl-2 univer-pr-2 univer-pt-1 univer-text-sm hover:univer-bg-gray-200",
|
|
1193
1193
|
onClick: () => {
|
|
1194
|
-
|
|
1195
|
-
const W =
|
|
1194
|
+
$(b.tableId, !1);
|
|
1195
|
+
const W = S.getTableById(V, b.tableId);
|
|
1196
1196
|
if (!W) return;
|
|
1197
|
-
const
|
|
1198
|
-
id:
|
|
1197
|
+
const Se = W.getTableConfig(), _e = {
|
|
1198
|
+
id: jr,
|
|
1199
1199
|
header: { title: I.t("sheets-table.tableStyle") },
|
|
1200
1200
|
children: {
|
|
1201
|
-
label:
|
|
1202
|
-
oldConfig:
|
|
1203
|
-
unitId:
|
|
1204
|
-
subUnitId:
|
|
1201
|
+
label: gn,
|
|
1202
|
+
oldConfig: Se,
|
|
1203
|
+
unitId: V,
|
|
1204
|
+
subUnitId: G,
|
|
1205
1205
|
tableId: b.tableId
|
|
1206
1206
|
},
|
|
1207
1207
|
width: 330
|
|
1208
1208
|
};
|
|
1209
|
-
i.open(
|
|
1209
|
+
i.open(_e);
|
|
1210
1210
|
},
|
|
1211
1211
|
children: [
|
|
1212
1212
|
/* @__PURE__ */ o(
|
|
1213
|
-
|
|
1213
|
+
Sn,
|
|
1214
1214
|
{
|
|
1215
1215
|
extend: { colorChannel1: "rgb(53,91,183)" }
|
|
1216
1216
|
}
|
|
@@ -1225,29 +1225,29 @@ const Ci = () => {
|
|
|
1225
1225
|
className: "univer-mb-1 univer-mt-1 univer-h-px univer-w-full univer-bg-gray-200"
|
|
1226
1226
|
}
|
|
1227
1227
|
),
|
|
1228
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ T(
|
|
1229
1229
|
"div",
|
|
1230
1230
|
{
|
|
1231
1231
|
className: "univer-flex univer-min-w-32 univer-cursor-pointer univer-items-center univer-pb-1 univer-pl-2 univer-pr-2 univer-pt-1 univer-text-sm hover:univer-bg-gray-200",
|
|
1232
1232
|
onClick: () => {
|
|
1233
|
-
|
|
1233
|
+
$(b.tableId, !1), d.executeCommand(zn.id, {
|
|
1234
1234
|
tableId: b.tableId,
|
|
1235
|
-
subUnitId:
|
|
1236
|
-
unitId:
|
|
1235
|
+
subUnitId: G,
|
|
1236
|
+
unitId: V
|
|
1237
1237
|
});
|
|
1238
1238
|
},
|
|
1239
1239
|
children: [
|
|
1240
|
-
/* @__PURE__ */ o(
|
|
1240
|
+
/* @__PURE__ */ o(pn, { className: "univer-mr-2" }),
|
|
1241
1241
|
I.t("sheets-table.removeTable")
|
|
1242
1242
|
]
|
|
1243
1243
|
}
|
|
1244
1244
|
)
|
|
1245
1245
|
] }),
|
|
1246
|
-
open: (
|
|
1246
|
+
open: (oe = a[b.tableId]) != null ? oe : !1,
|
|
1247
1247
|
onOpenChange: (W) => {
|
|
1248
|
-
|
|
1248
|
+
$(b.tableId, W);
|
|
1249
1249
|
},
|
|
1250
|
-
children: /* @__PURE__ */ o(
|
|
1250
|
+
children: /* @__PURE__ */ o(xt, {})
|
|
1251
1251
|
},
|
|
1252
1252
|
b.tableId
|
|
1253
1253
|
)
|
|
@@ -1257,29 +1257,29 @@ const Ci = () => {
|
|
|
1257
1257
|
);
|
|
1258
1258
|
}) }) : null;
|
|
1259
1259
|
};
|
|
1260
|
-
var
|
|
1261
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1262
|
-
(s =
|
|
1260
|
+
var Ti = Object.getOwnPropertyDescriptor, wi = (n, e, t, r) => {
|
|
1261
|
+
for (var i = r > 1 ? void 0 : r ? Ti(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
1262
|
+
(s = n[a]) && (i = s(i) || i);
|
|
1263
1263
|
return i;
|
|
1264
|
-
}, te = (
|
|
1265
|
-
let
|
|
1266
|
-
constructor(e,
|
|
1264
|
+
}, te = (n, e) => (t, r) => e(t, r, n);
|
|
1265
|
+
let at = class extends ke {
|
|
1266
|
+
constructor(e, t, r, i, a, s, c, u, h, d, v) {
|
|
1267
1267
|
super();
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
this._context = e, this._injector =
|
|
1268
|
+
U(this, "_anchorVisible$", new Pt(!0));
|
|
1269
|
+
U(this, "_timer");
|
|
1270
|
+
U(this, "_anchorPosition$", new Pt([]));
|
|
1271
|
+
U(this, "anchorPosition$", this._anchorPosition$.asObservable());
|
|
1272
|
+
this._context = e, this._injector = t, this._sheetSkeletonManagerService = r, this._renderManagerService = i, this._commandService = a, this._univerInstanceService = s, this._uiPartsService = c, this._tableManager = u, this._scrollManagerService = h, this._workbookPermissionService = d, this._permissionService = v, this._initUI(), this._initListener(), this._initTableAnchor();
|
|
1273
1273
|
}
|
|
1274
1274
|
_initUI() {
|
|
1275
1275
|
this.disposeWithMe(
|
|
1276
|
-
this._uiPartsService.registerComponent(
|
|
1276
|
+
this._uiPartsService.registerComponent(hr.CONTENT, () => vr(_i, this._injector))
|
|
1277
1277
|
);
|
|
1278
1278
|
}
|
|
1279
1279
|
_initListener() {
|
|
1280
1280
|
this.disposeWithMe(
|
|
1281
1281
|
this._commandService.onCommandExecuted((e) => {
|
|
1282
|
-
(e.id ===
|
|
1282
|
+
(e.id === ir.id || e.id === ar.id) && (this._anchorVisible$.next(!1), this._timer && clearTimeout(this._timer), this._timer = setTimeout(() => {
|
|
1283
1283
|
this._anchorVisible$.next(!0);
|
|
1284
1284
|
}, 300));
|
|
1285
1285
|
})
|
|
@@ -1287,7 +1287,7 @@ let it = class extends Oe {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
_initTableAnchor() {
|
|
1289
1289
|
this.disposeWithMe(
|
|
1290
|
-
|
|
1290
|
+
yt(
|
|
1291
1291
|
this._context.unit.activeSheet$,
|
|
1292
1292
|
this._sheetSkeletonManagerService.currentSkeleton$,
|
|
1293
1293
|
this._scrollManagerService.validViewportScrollInfo$,
|
|
@@ -1296,8 +1296,8 @@ let it = class extends Oe {
|
|
|
1296
1296
|
this._tableManager.tableNameChanged$,
|
|
1297
1297
|
this._tableManager.tableRangeChanged$,
|
|
1298
1298
|
this._tableManager.tableThemeChanged$,
|
|
1299
|
-
this._workbookPermissionService.unitPermissionInitStateChange$.pipe(
|
|
1300
|
-
this._permissionService.permissionPointUpdate$.pipe(
|
|
1299
|
+
this._workbookPermissionService.unitPermissionInitStateChange$.pipe(_r((e) => e)),
|
|
1300
|
+
this._permissionService.permissionPointUpdate$.pipe(Tr(300)),
|
|
1301
1301
|
this._anchorVisible$
|
|
1302
1302
|
).subscribe(() => {
|
|
1303
1303
|
var h;
|
|
@@ -1305,103 +1305,103 @@ let it = class extends Oe {
|
|
|
1305
1305
|
this._anchorPosition$.next([]);
|
|
1306
1306
|
return;
|
|
1307
1307
|
}
|
|
1308
|
-
const
|
|
1308
|
+
const t = this._context.unit, r = t.getActiveSheet(), i = r == null ? void 0 : r.getSheetId(), a = this._tableManager.getTableList(this._context.unitId).filter((d) => d.subUnitId === i), s = this._renderManagerService.getRenderById(this._context.unitId);
|
|
1309
1309
|
if (!s) {
|
|
1310
1310
|
this._anchorPosition$.next([]);
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
1313
|
-
if (!((h = this._permissionService.getPermissionPoint(new
|
|
1313
|
+
if (!((h = this._permissionService.getPermissionPoint(new sn(t.getUnitId()).id)) == null ? void 0 : h.value)) {
|
|
1314
1314
|
this._anchorPosition$.next([]);
|
|
1315
1315
|
return;
|
|
1316
1316
|
}
|
|
1317
|
-
const
|
|
1318
|
-
const { startRow:
|
|
1319
|
-
if (!
|
|
1320
|
-
const { scene:
|
|
1321
|
-
if (!
|
|
1322
|
-
const I =
|
|
1323
|
-
if (!I || !
|
|
1324
|
-
const g =
|
|
1325
|
-
if (!g) return
|
|
1326
|
-
const
|
|
1327
|
-
return m >= -10 &&
|
|
1328
|
-
x:
|
|
1317
|
+
const u = a.reduce((d, v) => {
|
|
1318
|
+
const { startRow: f, startColumn: w } = v.range, S = s.with(ct), E = sr(this._univerInstanceService, this._renderManagerService);
|
|
1319
|
+
if (!E) return d;
|
|
1320
|
+
const { scene: C } = E, L = C.getViewport(Un.VIEW_MAIN);
|
|
1321
|
+
if (!L) return d;
|
|
1322
|
+
const I = C == null ? void 0 : C.scaleX, B = C == null ? void 0 : C.scaleY, R = C == null ? void 0 : C.getViewportScrollXY(L);
|
|
1323
|
+
if (!I || !C || !B || !R) return d;
|
|
1324
|
+
const g = S.getCurrentSkeleton();
|
|
1325
|
+
if (!g) return d;
|
|
1326
|
+
const x = g.getNoMergeCellWithCoordByIndex(f, w), y = Wn(x.startX, I, R), m = jn(x.startY, B, R) - 25 - 4;
|
|
1327
|
+
return m >= -10 && y >= 45 && d.push({
|
|
1328
|
+
x: y,
|
|
1329
1329
|
y: m,
|
|
1330
1330
|
tableId: v.id,
|
|
1331
1331
|
tableName: v.name
|
|
1332
|
-
}),
|
|
1332
|
+
}), d;
|
|
1333
1333
|
}, []);
|
|
1334
|
-
this._anchorPosition$.next(
|
|
1334
|
+
this._anchorPosition$.next(u);
|
|
1335
1335
|
})
|
|
1336
1336
|
);
|
|
1337
1337
|
}
|
|
1338
1338
|
};
|
|
1339
|
-
|
|
1340
|
-
te(1,
|
|
1341
|
-
te(2,
|
|
1342
|
-
te(3,
|
|
1343
|
-
te(4,
|
|
1344
|
-
te(5,
|
|
1345
|
-
te(6,
|
|
1346
|
-
te(7,
|
|
1347
|
-
te(8,
|
|
1348
|
-
te(9,
|
|
1349
|
-
te(10,
|
|
1350
|
-
],
|
|
1339
|
+
at = wi([
|
|
1340
|
+
te(1, N(Oe)),
|
|
1341
|
+
te(2, N(ct)),
|
|
1342
|
+
te(3, Xt),
|
|
1343
|
+
te(4, ne),
|
|
1344
|
+
te(5, fe),
|
|
1345
|
+
te(6, dr),
|
|
1346
|
+
te(7, N(ie)),
|
|
1347
|
+
te(8, N(rr)),
|
|
1348
|
+
te(9, N(on)),
|
|
1349
|
+
te(10, N(qt))
|
|
1350
|
+
], at);
|
|
1351
1351
|
const xe = 16;
|
|
1352
1352
|
new Path2D("M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z");
|
|
1353
|
-
class
|
|
1354
|
-
static drawNoSetting(e,
|
|
1355
|
-
e.save(),
|
|
1353
|
+
class Wt {
|
|
1354
|
+
static drawNoSetting(e, t, r, i) {
|
|
1355
|
+
e.save(), Lt.drawWith(e, {
|
|
1356
1356
|
radius: 2,
|
|
1357
1357
|
width: xe,
|
|
1358
1358
|
height: xe,
|
|
1359
1359
|
fill: i
|
|
1360
|
-
}), e.lineCap = "square", e.strokeStyle = r, e.scale(
|
|
1360
|
+
}), e.lineCap = "square", e.strokeStyle = r, e.scale(t / xe, t / xe), e.beginPath(), e.lineWidth = 1, e.lineCap = "round", e.moveTo(3, 4), e.lineTo(13, 4), e.moveTo(4.5, 8), e.lineTo(11.5, 8), e.moveTo(6, 12), e.lineTo(10, 12), e.stroke(), e.restore();
|
|
1361
1361
|
}
|
|
1362
|
-
static drawIconByPath(e,
|
|
1363
|
-
e.save(), e.strokeStyle = r, e.fillStyle = i,
|
|
1362
|
+
static drawIconByPath(e, t, r, i) {
|
|
1363
|
+
e.save(), e.strokeStyle = r, e.fillStyle = i, Lt.drawWith(e, {
|
|
1364
1364
|
radius: 2,
|
|
1365
1365
|
width: xe,
|
|
1366
1366
|
height: xe,
|
|
1367
1367
|
fill: i
|
|
1368
|
-
}),
|
|
1368
|
+
}), t.forEach((a) => {
|
|
1369
1369
|
const s = new Path2D(a);
|
|
1370
1370
|
e.fillStyle = r, e.fill(s, "evenodd");
|
|
1371
1371
|
}), e.restore();
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1374
|
+
const Ii = [
|
|
1375
1375
|
"M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z"
|
|
1376
|
-
],
|
|
1376
|
+
], yi = [
|
|
1377
1377
|
"M12.4008 13.1831C12.6907 13.1831 12.9258 12.9481 12.9258 12.6581V4.60873L14.013 5.69597C14.218 5.901 14.5505 5.901 14.7555 5.69597C14.9605 5.49094 14.9605 5.15853 14.7555 4.95351L12.7721 2.97017C12.5671 2.76515 12.2347 2.76515 12.0297 2.97017L10.0463 4.95351C9.84132 5.15853 9.84132 5.49094 10.0463 5.69597C10.2514 5.901 10.5838 5.901 10.7888 5.69597L11.8758 4.60901V12.6581C11.8758 12.9481 12.1108 13.1831 12.4008 13.1831Z",
|
|
1378
1378
|
"M1.28069 4.85447C0.842195 4.33439 1.21191 3.5391 1.89218 3.5391H8.59333C9.2736 3.5391 9.64331 4.33439 9.20482 4.85447L6.51052 8.0501V11.6601C6.51052 12.2245 5.94174 12.6114 5.41683 12.404L4.48092 12.0343C4.1756 11.9136 3.97498 11.6187 3.97498 11.2904V8.0501L1.28069 4.85447Z"
|
|
1379
|
-
],
|
|
1379
|
+
], Ri = [
|
|
1380
1380
|
"M12.4008 2.81641C12.6907 2.81641 12.9258 3.05146 12.9258 3.34141V11.3908L14.013 10.3036C14.218 10.0986 14.5505 10.0986 14.7555 10.3036C14.9605 10.5086 14.9605 10.841 14.7555 11.046L12.7721 13.0294C12.5671 13.2344 12.2347 13.2344 12.0297 13.0294L10.0463 11.046C9.84132 10.841 9.84132 10.5086 10.0463 10.3036C10.2514 10.0986 10.5838 10.0986 10.7888 10.3036L11.8758 11.3905V3.34141C11.8758 3.05146 12.1108 2.81641 12.4008 2.81641Z",
|
|
1381
1381
|
"M1.28069 4.85444C0.842195 4.33435 1.21191 3.53906 1.89218 3.53906H8.59333C9.2736 3.53906 9.64331 4.33435 9.20482 4.85443L6.51052 8.05006V11.6601C6.51052 12.2245 5.94174 12.6113 5.41683 12.404L4.48092 12.0342C4.1756 11.9136 3.97498 11.6186 3.97498 11.2903V8.05006L1.28069 4.85444Z"
|
|
1382
|
-
],
|
|
1382
|
+
], Mi = [
|
|
1383
1383
|
"M11.9003 13.7046C11.9003 13.9969 11.6633 14.2339 11.371 14.2339C11.0787 14.2339 10.8417 13.9969 10.8417 13.7046V3.57272L9.74577 4.66862C9.53906 4.87534 9.20391 4.87534 8.9972 4.66862C8.79048 4.46191 8.79048 4.12676 8.9972 3.92005L10.9969 1.92039C11.2036 1.71368 11.5387 1.71368 11.7454 1.92039L13.7451 3.92005C13.9518 4.12676 13.9518 4.46191 13.7451 4.66862C13.5384 4.87534 13.2032 4.87534 12.9965 4.66862L11.9003 3.57243V13.7046Z",
|
|
1384
1384
|
"M2.69779 10.0113C2.40546 10.0113 2.16847 9.77429 2.16847 9.48196C2.16847 9.18962 2.40546 8.95264 2.69779 8.95264H6.67804C6.89213 8.95264 7.08514 9.0816 7.16707 9.2794C7.249 9.47719 7.20371 9.70486 7.05233 9.85624L3.97569 12.9329H6.67804C6.97038 12.9329 7.20736 13.1699 7.20736 13.4622C7.20736 13.7545 6.97038 13.9915 6.67804 13.9915H2.69779C2.4837 13.9915 2.29069 13.8626 2.20876 13.6648C2.12684 13.467 2.17212 13.2393 2.32351 13.0879L5.40015 10.0113H2.69779Z",
|
|
1385
1385
|
"M5.51638 2.58693C5.23363 1.81542 4.14248 1.81543 3.85973 2.58693L2.13245 7.29995C2.03185 7.57443 2.17281 7.87849 2.4473 7.97909C2.72178 8.07969 3.02584 7.93872 3.12644 7.66424L3.64346 6.25351L3.64504 6.25351H5.73266L6.24968 7.66424C6.35027 7.93872 6.65433 8.07969 6.92882 7.97909C7.2033 7.87849 7.34426 7.57443 7.24367 7.29995L5.51638 2.58693ZM5.34467 5.19487L4.68806 3.40325L4.03144 5.19487H5.34467Z"
|
|
1386
|
-
],
|
|
1386
|
+
], xi = [
|
|
1387
1387
|
"M11.9003 2.29495C11.9003 2.00261 11.6633 1.76562 11.371 1.76562C11.0787 1.76562 10.8417 2.00261 10.8417 2.29495V12.4268L9.74577 11.3309C9.53906 11.1242 9.20391 11.1242 8.9972 11.3309C8.79048 11.5376 8.79048 11.8727 8.9972 12.0795L10.9969 14.0791C11.2036 14.2858 11.5387 14.2858 11.7454 14.0791L13.7451 12.0795C13.9518 11.8727 13.9518 11.5376 13.7451 11.3309C13.5384 11.1242 13.2032 11.1242 12.9965 11.3309L11.9003 12.4271V2.29495Z",
|
|
1388
1388
|
"M2.69792 10.0113C2.40558 10.0113 2.16859 9.77429 2.16859 9.48196C2.16859 9.18962 2.40558 8.95264 2.69792 8.95264H6.67816C6.89225 8.95264 7.08526 9.0816 7.16719 9.2794C7.24912 9.47719 7.20384 9.70486 7.05245 9.85624L3.97581 12.9329H6.67816C6.9705 12.9329 7.20749 13.1699 7.20749 13.4622C7.20749 13.7545 6.9705 13.9915 6.67816 13.9915H2.69792C2.48383 13.9915 2.29082 13.8626 2.20889 13.6648C2.12696 13.467 2.17224 13.2393 2.32363 13.0879L5.40027 10.0113H2.69792Z",
|
|
1389
1389
|
"M5.5165 2.58693C5.23375 1.81542 4.1426 1.81543 3.85985 2.58693L2.13257 7.29995C2.03197 7.57443 2.17294 7.8785 2.44742 7.97909C2.7219 8.07969 3.02596 7.93872 3.12656 7.66424L3.64358 6.25351L3.64516 6.25351H5.73278L6.2498 7.66424C6.35039 7.93872 6.65446 8.07969 6.92894 7.97909C7.20342 7.8785 7.34438 7.57443 7.24379 7.29995L5.5165 2.58693ZM5.34479 5.19487L4.68818 3.40325L4.03156 5.19487H5.34479Z"
|
|
1390
1390
|
];
|
|
1391
|
-
var
|
|
1392
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1393
|
-
(s =
|
|
1391
|
+
var Ni = Object.getOwnPropertyDescriptor, Ei = (n, e, t, r) => {
|
|
1392
|
+
for (var i = r > 1 ? void 0 : r ? Ni(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
1393
|
+
(s = n[a]) && (i = s(i) || i);
|
|
1394
1394
|
return i;
|
|
1395
|
-
},
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
constructor(e,
|
|
1399
|
-
super(e,
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
this._contextService = r, this._commandService = i, this._themeService = a, this.setShapeProps(
|
|
1395
|
+
}, pt = (n, e) => (t, r) => e(t, r, n);
|
|
1396
|
+
const ce = 16, Ye = 1;
|
|
1397
|
+
let _t = class extends Zn {
|
|
1398
|
+
constructor(e, t, r, i, a) {
|
|
1399
|
+
super(e, t);
|
|
1400
|
+
U(this, "_cellWidth", 0);
|
|
1401
|
+
U(this, "_cellHeight", 0);
|
|
1402
|
+
U(this, "_filterParams");
|
|
1403
|
+
U(this, "_hovered", !1);
|
|
1404
|
+
this._contextService = r, this._commandService = i, this._themeService = a, this.setShapeProps(t), this.onPointerDown$.subscribeEvent((s) => this.onPointerDown(s)), this.onPointerEnter$.subscribeEvent(() => this.onPointerEnter()), this.onPointerLeave$.subscribeEvent(() => this.onPointerLeave());
|
|
1405
1405
|
}
|
|
1406
1406
|
setShapeProps(e) {
|
|
1407
1407
|
typeof e.cellHeight < "u" && (this._cellHeight = e.cellHeight), typeof e.cellWidth < "u" && (this._cellWidth = e.cellWidth), typeof e.filterParams < "u" && (this._filterParams = e.filterParams), this.transformByState({
|
|
@@ -1410,46 +1410,46 @@ let St = class extends jn {
|
|
|
1410
1410
|
});
|
|
1411
1411
|
}
|
|
1412
1412
|
_draw(e) {
|
|
1413
|
-
const
|
|
1413
|
+
const t = this._cellHeight, r = this._cellWidth, i = ce - r, a = ce - t;
|
|
1414
1414
|
e.save();
|
|
1415
1415
|
const s = new Path2D();
|
|
1416
|
-
s.rect(i, a, r,
|
|
1417
|
-
const { buttonState: c } = this._filterParams,
|
|
1418
|
-
let
|
|
1416
|
+
s.rect(i, a, r, t), e.clip(s);
|
|
1417
|
+
const { buttonState: c } = this._filterParams, u = this._themeService.getColorFromTheme("primary.600"), h = this._hovered ? this._themeService.getColorFromTheme("gray.50") : "rgba(255, 255, 255, 1.0)";
|
|
1418
|
+
let d;
|
|
1419
1419
|
switch (c) {
|
|
1420
1420
|
case Me.FilteredSortNone:
|
|
1421
|
-
|
|
1421
|
+
d = Ii;
|
|
1422
1422
|
break;
|
|
1423
1423
|
case Me.FilteredSortAsc:
|
|
1424
|
-
|
|
1424
|
+
d = yi;
|
|
1425
1425
|
break;
|
|
1426
1426
|
case Me.FilteredSortDesc:
|
|
1427
|
-
|
|
1427
|
+
d = Ri;
|
|
1428
1428
|
break;
|
|
1429
1429
|
case Me.FilterNoneSortNone:
|
|
1430
1430
|
break;
|
|
1431
1431
|
case Me.FilterNoneSortAsc:
|
|
1432
|
-
|
|
1432
|
+
d = Mi;
|
|
1433
1433
|
break;
|
|
1434
1434
|
case Me.FilterNoneSortDesc:
|
|
1435
|
-
|
|
1435
|
+
d = xi;
|
|
1436
1436
|
break;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1438
|
+
d ? Wt.drawIconByPath(e, d, u, h) : c !== void 0 && Wt.drawNoSetting(e, ce, u, h), e.restore();
|
|
1439
1439
|
}
|
|
1440
1440
|
onPointerDown(e) {
|
|
1441
1441
|
if (e.button === 2)
|
|
1442
1442
|
return;
|
|
1443
|
-
const { row:
|
|
1444
|
-
this._contextService.getContextValue(
|
|
1445
|
-
const
|
|
1446
|
-
row:
|
|
1443
|
+
const { row: t, col: r, unitId: i, subUnitId: a, tableId: s } = this._filterParams;
|
|
1444
|
+
this._contextService.getContextValue(be) || !this._commandService.hasCommand(St.id) || setTimeout(() => {
|
|
1445
|
+
const u = {
|
|
1446
|
+
row: t,
|
|
1447
1447
|
col: r,
|
|
1448
1448
|
unitId: i,
|
|
1449
1449
|
subUnitId: a,
|
|
1450
1450
|
tableId: s
|
|
1451
1451
|
};
|
|
1452
|
-
this._commandService.executeCommand(
|
|
1452
|
+
this._commandService.executeCommand(St.id, u);
|
|
1453
1453
|
}, 200);
|
|
1454
1454
|
}
|
|
1455
1455
|
onPointerEnter() {
|
|
@@ -1459,23 +1459,33 @@ let St = class extends jn {
|
|
|
1459
1459
|
this._hovered = !1, this.makeDirty(!0);
|
|
1460
1460
|
}
|
|
1461
1461
|
};
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
],
|
|
1467
|
-
var
|
|
1468
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1469
|
-
(s =
|
|
1462
|
+
_t = Ei([
|
|
1463
|
+
pt(2, It),
|
|
1464
|
+
pt(3, ne),
|
|
1465
|
+
pt(4, N(On))
|
|
1466
|
+
], _t);
|
|
1467
|
+
var Li = Object.getOwnPropertyDescriptor, $i = (n, e, t, r) => {
|
|
1468
|
+
for (var i = r > 1 ? void 0 : r ? Li(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
1469
|
+
(s = n[a]) && (i = s(i) || i);
|
|
1470
1470
|
return i;
|
|
1471
|
-
},
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
|
|
1471
|
+
}, Ze = (n, e) => (t, r) => e(t, r, n);
|
|
1472
|
+
const ki = 5e3, Oi = (n, e, t, r) => {
|
|
1473
|
+
switch (r) {
|
|
1474
|
+
case it.TOP:
|
|
1475
|
+
return n + Ye;
|
|
1476
|
+
case it.MIDDLE:
|
|
1477
|
+
return n + Math.max(0, (t - ce) / 2);
|
|
1478
|
+
case it.BOTTOM:
|
|
1479
|
+
default:
|
|
1480
|
+
return e - ce - Ye;
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
let Tt = class extends Gt {
|
|
1484
|
+
constructor(e, t, r, i, a, s) {
|
|
1475
1485
|
super();
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
this._context = e, this._injector =
|
|
1486
|
+
U(this, "_buttonRenderDisposable", null);
|
|
1487
|
+
U(this, "_tableFilterButtonShapes", []);
|
|
1488
|
+
this._context = e, this._injector = t, this._sheetSkeletonManagerService = r, this._sheetInterceptorService = i, this._tableManager = a, this._commandService = s, this._initRenderer(), this._initCommandExecuted();
|
|
1479
1489
|
}
|
|
1480
1490
|
dispose() {
|
|
1481
1491
|
super.dispose(), this._disposeRendering();
|
|
@@ -1483,16 +1493,16 @@ let _t = class extends Qt {
|
|
|
1483
1493
|
_initRenderer() {
|
|
1484
1494
|
const e = this._tableManager;
|
|
1485
1495
|
this._sheetSkeletonManagerService.currentSkeleton$.pipe(
|
|
1486
|
-
|
|
1496
|
+
Ie((t) => {
|
|
1487
1497
|
var c;
|
|
1488
|
-
if (!
|
|
1498
|
+
if (!t) return ee(null);
|
|
1489
1499
|
const { unit: r, unitId: i } = this._context, a = ((c = r.getActiveSheet()) == null ? void 0 : c.getSheetId()) || "", s = () => ({
|
|
1490
1500
|
unitId: i,
|
|
1491
1501
|
worksheetId: a,
|
|
1492
1502
|
tableFilterRanges: this._tableManager.getSheetFilterRangeWithState(r.getUnitId(), a),
|
|
1493
|
-
skeleton:
|
|
1503
|
+
skeleton: t.skeleton
|
|
1494
1504
|
});
|
|
1495
|
-
return
|
|
1505
|
+
return yt(
|
|
1496
1506
|
e.tableAdd$,
|
|
1497
1507
|
e.tableNameChanged$,
|
|
1498
1508
|
e.tableRangeChanged$,
|
|
@@ -1500,48 +1510,69 @@ let _t = class extends Qt {
|
|
|
1500
1510
|
e.tableDelete$,
|
|
1501
1511
|
e.tableFilterChanged$
|
|
1502
1512
|
).pipe(
|
|
1503
|
-
|
|
1504
|
-
|
|
1513
|
+
wr(() => s()),
|
|
1514
|
+
an(s())
|
|
1505
1515
|
);
|
|
1506
1516
|
}),
|
|
1507
|
-
|
|
1508
|
-
).subscribe((
|
|
1509
|
-
this._disposeRendering(), !(!
|
|
1517
|
+
Ir(this.dispose$)
|
|
1518
|
+
).subscribe((t) => {
|
|
1519
|
+
this._disposeRendering(), !(!t || !t.tableFilterRanges) && this._renderButtons(t);
|
|
1510
1520
|
});
|
|
1511
1521
|
}
|
|
1522
|
+
_initCommandExecuted() {
|
|
1523
|
+
this.disposeWithMe(
|
|
1524
|
+
this._commandService.onCommandExecuted((e) => {
|
|
1525
|
+
var c;
|
|
1526
|
+
if (e.id !== Pr.id)
|
|
1527
|
+
return;
|
|
1528
|
+
const { unit: t, unitId: r } = this._context, i = ((c = t.getActiveSheet()) == null ? void 0 : c.getSheetId()) || "", a = this._sheetSkeletonManagerService.getCurrentSkeleton();
|
|
1529
|
+
if (!a)
|
|
1530
|
+
return;
|
|
1531
|
+
const s = {
|
|
1532
|
+
unitId: r,
|
|
1533
|
+
worksheetId: i,
|
|
1534
|
+
tableFilterRanges: this._tableManager.getSheetFilterRangeWithState(t.getUnitId(), i),
|
|
1535
|
+
skeleton: a
|
|
1536
|
+
};
|
|
1537
|
+
this._disposeRendering(), !(!s || !s.tableFilterRanges) && this._renderButtons(s);
|
|
1538
|
+
})
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1512
1541
|
_renderButtons(e) {
|
|
1513
|
-
const { tableFilterRanges:
|
|
1514
|
-
|
|
1515
|
-
const {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1542
|
+
const { tableFilterRanges: t, unitId: r, skeleton: i, worksheetId: a } = e, { unit: s, scene: c } = this._context, u = s.getSheetBySheetId(a);
|
|
1543
|
+
if (u) {
|
|
1544
|
+
for (const { range: h, states: d, tableId: v } of t) {
|
|
1545
|
+
const { startRow: f, startColumn: w, endColumn: S } = h;
|
|
1546
|
+
this._interceptCellContent(r, a, h);
|
|
1547
|
+
for (let E = w; E <= S; E++) {
|
|
1548
|
+
const C = `sheets-table-filter-button-${f}-${E}`, L = lr(f, E, c, i), I = u.getCellStyle(f, E), B = (I == null ? void 0 : I.vt) || it.BOTTOM, { startX: R, startY: g, endX: x, endY: y } = L, m = x - R, P = y - g;
|
|
1549
|
+
if (P <= Ye || m <= Ye)
|
|
1550
|
+
continue;
|
|
1551
|
+
const $ = d[E - w], Y = x - ce - Ye, V = Oi(g, y, P, B), G = {
|
|
1552
|
+
left: Y,
|
|
1553
|
+
top: V,
|
|
1554
|
+
height: ce,
|
|
1555
|
+
width: ce,
|
|
1556
|
+
zIndex: ki,
|
|
1557
|
+
cellHeight: P,
|
|
1558
|
+
cellWidth: m,
|
|
1559
|
+
filterParams: { unitId: r, subUnitId: a, row: f, col: E, buttonState: $, tableId: v }
|
|
1560
|
+
}, ue = this._injector.createInstance(_t, C, G);
|
|
1561
|
+
this._tableFilterButtonShapes.push(ue);
|
|
1562
|
+
}
|
|
1532
1563
|
}
|
|
1564
|
+
c.addObjects(this._tableFilterButtonShapes), c.makeDirty();
|
|
1533
1565
|
}
|
|
1534
|
-
s.addObjects(this._tableFilterButtonShapes), s.makeDirty();
|
|
1535
1566
|
}
|
|
1536
|
-
_interceptCellContent(e,
|
|
1567
|
+
_interceptCellContent(e, t, r) {
|
|
1537
1568
|
const { startRow: i, startColumn: a, endColumn: s } = r;
|
|
1538
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
1539
|
-
effect:
|
|
1540
|
-
handler: (c,
|
|
1541
|
-
const { row:
|
|
1542
|
-
return
|
|
1569
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Dr.CELL_CONTENT, {
|
|
1570
|
+
effect: Pn.Style,
|
|
1571
|
+
handler: (c, u, h) => {
|
|
1572
|
+
const { row: d, col: v, unitId: f, subUnitId: w } = u;
|
|
1573
|
+
return f !== e || w !== t || d !== i || v < a || v > s || ((!c || c === u.rawData) && (c = { ...u.rawData }), c.fontRenderExtension = {
|
|
1543
1574
|
...c == null ? void 0 : c.fontRenderExtension,
|
|
1544
|
-
rightOffset:
|
|
1575
|
+
rightOffset: ce
|
|
1545
1576
|
}), h(c);
|
|
1546
1577
|
},
|
|
1547
1578
|
priority: 10
|
|
@@ -1549,197 +1580,198 @@ let _t = class extends Qt {
|
|
|
1549
1580
|
}
|
|
1550
1581
|
_disposeRendering() {
|
|
1551
1582
|
var e;
|
|
1552
|
-
this._tableFilterButtonShapes.forEach((
|
|
1583
|
+
this._tableFilterButtonShapes.forEach((t) => t.dispose()), (e = this._buttonRenderDisposable) == null || e.dispose(), this._buttonRenderDisposable = null, this._tableFilterButtonShapes = [];
|
|
1553
1584
|
}
|
|
1554
1585
|
};
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1586
|
+
Tt = $i([
|
|
1587
|
+
Ze(1, N(Oe)),
|
|
1588
|
+
Ze(2, N(ct)),
|
|
1589
|
+
Ze(3, N(un)),
|
|
1590
|
+
Ze(4, N(ie)),
|
|
1591
|
+
Ze(5, ne)
|
|
1592
|
+
], Tt);
|
|
1593
|
+
const Pi = (n) => {
|
|
1594
|
+
const { unitId: e, subUnitId: t, range: r, onCancel: i, onConfirm: a, tableId: s } = n, c = M(ie), [u, h] = q(r), [d, v] = q(""), f = M(re), w = M(fe);
|
|
1595
|
+
return /* @__PURE__ */ T(Rt, { children: [
|
|
1564
1596
|
/* @__PURE__ */ o(
|
|
1565
|
-
|
|
1597
|
+
Ar,
|
|
1566
1598
|
{
|
|
1567
1599
|
maxRangeCount: 1,
|
|
1568
1600
|
unitId: e,
|
|
1569
|
-
subUnitId:
|
|
1570
|
-
initialValue:
|
|
1571
|
-
onChange: (
|
|
1572
|
-
const
|
|
1601
|
+
subUnitId: t,
|
|
1602
|
+
initialValue: At(r),
|
|
1603
|
+
onChange: (S, E) => {
|
|
1604
|
+
const C = At(r), L = Hr(E).range, I = ut(w, { unitId: e, subUnitId: t });
|
|
1573
1605
|
if (!I)
|
|
1574
1606
|
return;
|
|
1575
|
-
if (I.worksheet.getMergeData().some((
|
|
1576
|
-
v(
|
|
1607
|
+
if (I.worksheet.getMergeData().some(($) => me.intersects(L, $))) {
|
|
1608
|
+
v(f.t("sheets-table.tableRangeWithMergeError"));
|
|
1577
1609
|
return;
|
|
1578
1610
|
}
|
|
1579
|
-
if (c.getTablesBySubunitId(e,
|
|
1580
|
-
if (
|
|
1611
|
+
if (c.getTablesBySubunitId(e, t).some(($) => {
|
|
1612
|
+
if ($.getId() === s)
|
|
1581
1613
|
return !1;
|
|
1582
|
-
const
|
|
1583
|
-
return
|
|
1614
|
+
const Y = $.getRange();
|
|
1615
|
+
return me.intersects(L, Y);
|
|
1584
1616
|
})) {
|
|
1585
|
-
v(
|
|
1617
|
+
v(f.t("sheets-table.tableRangeWithOtherTableError"));
|
|
1586
1618
|
return;
|
|
1587
1619
|
}
|
|
1588
|
-
const { startRow:
|
|
1589
|
-
if (
|
|
1590
|
-
v(
|
|
1620
|
+
const { startRow: y, endRow: m } = L;
|
|
1621
|
+
if (y === m) {
|
|
1622
|
+
v(f.t("sheets-table.tableRangeSingleRowError"));
|
|
1591
1623
|
return;
|
|
1592
1624
|
}
|
|
1593
|
-
if (
|
|
1625
|
+
if (C !== E) {
|
|
1594
1626
|
if (s) {
|
|
1595
|
-
const
|
|
1596
|
-
if (
|
|
1597
|
-
const
|
|
1598
|
-
if (
|
|
1599
|
-
h(
|
|
1627
|
+
const $ = c.getTableById(e, s);
|
|
1628
|
+
if ($) {
|
|
1629
|
+
const Y = $.getRange();
|
|
1630
|
+
if (me.intersects(L, Y) && Y.startRow === L.startRow) {
|
|
1631
|
+
h(L), v(""), a({
|
|
1600
1632
|
unitId: e,
|
|
1601
|
-
subUnitId:
|
|
1602
|
-
range:
|
|
1633
|
+
subUnitId: t,
|
|
1634
|
+
range: L
|
|
1603
1635
|
});
|
|
1604
1636
|
return;
|
|
1605
1637
|
} else {
|
|
1606
|
-
v(
|
|
1638
|
+
v(f.t("sheets-table.updateError"));
|
|
1607
1639
|
return;
|
|
1608
1640
|
}
|
|
1609
1641
|
}
|
|
1610
1642
|
}
|
|
1611
|
-
h(
|
|
1643
|
+
h(L), v("");
|
|
1612
1644
|
}
|
|
1613
1645
|
},
|
|
1614
1646
|
supportAcrossSheet: !1
|
|
1615
1647
|
}
|
|
1616
1648
|
),
|
|
1617
|
-
|
|
1618
|
-
/* @__PURE__ */
|
|
1619
|
-
/* @__PURE__ */ o(
|
|
1649
|
+
d && /* @__PURE__ */ o("div", { className: "univer-mt-1 univer-text-xs univer-text-red-500", children: d }),
|
|
1650
|
+
/* @__PURE__ */ T("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
|
|
1651
|
+
/* @__PURE__ */ o(Te, { onClick: i, children: f.t("sheets-table.cancel") }),
|
|
1620
1652
|
/* @__PURE__ */ o(
|
|
1621
|
-
|
|
1653
|
+
Te,
|
|
1622
1654
|
{
|
|
1623
1655
|
variant: "primary",
|
|
1624
1656
|
onClick: () => {
|
|
1625
|
-
|
|
1657
|
+
d || a({
|
|
1626
1658
|
unitId: e,
|
|
1627
|
-
subUnitId:
|
|
1628
|
-
range:
|
|
1659
|
+
subUnitId: t,
|
|
1660
|
+
range: u
|
|
1629
1661
|
});
|
|
1630
1662
|
},
|
|
1631
1663
|
className: "univer-ml-2",
|
|
1632
|
-
children:
|
|
1664
|
+
children: f.t("sheets-table.confirm")
|
|
1633
1665
|
}
|
|
1634
1666
|
)
|
|
1635
1667
|
] })
|
|
1636
1668
|
] });
|
|
1637
|
-
},
|
|
1638
|
-
var
|
|
1639
|
-
const { unitId: e, subUnitId:
|
|
1669
|
+
}, Di = (n) => {
|
|
1670
|
+
var O, A, Q, ht, Ge, Xe, vt, ze, gt, Pe, De, Be;
|
|
1671
|
+
const { unitId: e, subUnitId: t, tableId: r } = n, i = M(ne), a = M(re), s = M(ie), c = s.getTableById(e, r), u = M(cn), h = M(ye), d = we(u.rangeThemeMapChange$), v = we(h.refreshTable$), f = M(Dn), [, w] = q(Math.random()), S = we(s.tableThemeChanged$, {
|
|
1640
1672
|
theme: c == null ? void 0 : c.getTableStyleId(),
|
|
1641
1673
|
oldTheme: c == null ? void 0 : c.getTableStyleId(),
|
|
1642
1674
|
unitId: e,
|
|
1643
|
-
subUnitId:
|
|
1675
|
+
subUnitId: t,
|
|
1644
1676
|
tableId: r
|
|
1645
|
-
}),
|
|
1646
|
-
i.executeCommand(
|
|
1677
|
+
}), E = u.getRegisteredRangeThemes().filter((p) => p == null ? void 0 : p.startsWith(Zr)), C = u.getALLRegisteredTheme(e).filter((p) => p == null ? void 0 : p.startsWith(mt)), L = c == null ? void 0 : c.getTableStyleId(), I = C.find((p) => p === L), B = I || C[0], R = u.getCustomRangeThemeStyle(e, B), g = (Q = (A = (O = R == null ? void 0 : R.getHeaderRowStyle()) == null ? void 0 : O.bg) == null ? void 0 : A.rgb) != null ? Q : ge, x = (Xe = (Ge = (ht = R == null ? void 0 : R.getFirstRowStyle()) == null ? void 0 : ht.bg) == null ? void 0 : Ge.rgb) != null ? Xe : ge, y = (gt = (ze = (vt = R == null ? void 0 : R.getSecondRowStyle()) == null ? void 0 : vt.bg) == null ? void 0 : ze.rgb) != null ? gt : ge, m = (Be = (De = (Pe = R == null ? void 0 : R.getLastRowStyle()) == null ? void 0 : Pe.bg) == null ? void 0 : De.rgb) != null ? Be : ge, [P, $] = q(null), Y = (p) => {
|
|
1678
|
+
i.executeCommand(Ct.id, {
|
|
1647
1679
|
unitId: e,
|
|
1648
1680
|
tableId: r,
|
|
1649
1681
|
theme: p
|
|
1650
1682
|
});
|
|
1651
|
-
},
|
|
1652
|
-
if (
|
|
1653
|
-
|
|
1683
|
+
}, V = () => {
|
|
1684
|
+
if (C.length >= 11) {
|
|
1685
|
+
f.emit(a.t("sheets-table.customTooMore"));
|
|
1654
1686
|
return;
|
|
1655
1687
|
}
|
|
1656
|
-
const p =
|
|
1657
|
-
let
|
|
1688
|
+
const p = C[C.length - 1];
|
|
1689
|
+
let _ = `${mt}1`;
|
|
1658
1690
|
if (p) {
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1691
|
+
const J = Number(p.split("-")[2]);
|
|
1692
|
+
_ = `${mt}${J + 1}`;
|
|
1661
1693
|
}
|
|
1662
|
-
const
|
|
1663
|
-
i.executeCommand(
|
|
1694
|
+
const K = new Br(_, { ...Kn });
|
|
1695
|
+
i.executeCommand(Jn.id, {
|
|
1664
1696
|
unitId: e,
|
|
1665
1697
|
tableId: r,
|
|
1666
|
-
themeStyle:
|
|
1698
|
+
themeStyle: K
|
|
1667
1699
|
});
|
|
1668
|
-
},
|
|
1669
|
-
i.executeCommand(
|
|
1700
|
+
}, G = (p, _) => {
|
|
1701
|
+
i.executeCommand(ln.id, {
|
|
1670
1702
|
unitId: e,
|
|
1671
|
-
subUnitId:
|
|
1703
|
+
subUnitId: t,
|
|
1672
1704
|
styleName: p,
|
|
1673
|
-
style:
|
|
1705
|
+
style: _
|
|
1674
1706
|
});
|
|
1675
|
-
},
|
|
1676
|
-
i.executeCommand(
|
|
1707
|
+
}, ue = (p) => {
|
|
1708
|
+
i.executeCommand(er.id, {
|
|
1677
1709
|
unitId: e,
|
|
1678
1710
|
tableId: r,
|
|
1679
1711
|
themeName: p
|
|
1680
1712
|
});
|
|
1681
1713
|
};
|
|
1682
|
-
if (
|
|
1683
|
-
|
|
1684
|
-
}, [
|
|
1685
|
-
const
|
|
1686
|
-
return /* @__PURE__ */
|
|
1714
|
+
if (hn(() => {
|
|
1715
|
+
w(Math.random());
|
|
1716
|
+
}, [d, v]), !c) return null;
|
|
1717
|
+
const de = new ve(g).isDark(), Ce = new ve(x).isDark(), he = new ve(y).isDark(), b = new ve(m).isDark();
|
|
1718
|
+
return /* @__PURE__ */ T("div", { children: [
|
|
1687
1719
|
/* @__PURE__ */ o("h5", { children: a.t("sheets-table.defaultStyle") }),
|
|
1688
|
-
/* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children:
|
|
1689
|
-
var
|
|
1690
|
-
const
|
|
1691
|
-
return /* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children: E.map((p) => {
|
|
1721
|
+
var Se, _e, Fe, Ve, He, Ae, Ue, We;
|
|
1722
|
+
const _ = u.getDefaultRangeThemeStyle(p), K = ((_e = (Se = _ == null ? void 0 : _.getHeaderRowStyle()) == null ? void 0 : Se.bg) == null ? void 0 : _e.rgb) || ge, J = ((Ve = (Fe = _ == null ? void 0 : _.getFirstRowStyle()) == null ? void 0 : Fe.bg) == null ? void 0 : Ve.rgb) || ge, oe = ((Ae = (He = _ == null ? void 0 : _.getSecondRowStyle()) == null ? void 0 : He.bg) == null ? void 0 : Ae.rgb) || ge, W = ((We = (Ue = _ == null ? void 0 : _.getLastRowStyle()) == null ? void 0 : Ue.bg) == null ? void 0 : We.rgb) || ge;
|
|
1723
|
+
return /* @__PURE__ */ T(
|
|
1692
1724
|
"div",
|
|
1693
1725
|
{
|
|
1694
|
-
className:
|
|
1695
|
-
"univer-border-blue-500": p ===
|
|
1726
|
+
className: D("univer-h-10 univer-w-8 univer-cursor-pointer univer-border univer-border-solid univer-border-gray-200 univer-p-px [&>div]:univer-box-border [&>div]:univer-h-2.5", {
|
|
1727
|
+
"univer-border-blue-500": p === S.theme
|
|
1696
1728
|
}),
|
|
1697
|
-
onClick: () =>
|
|
1729
|
+
onClick: () => Y(p),
|
|
1698
1730
|
children: [
|
|
1699
|
-
/* @__PURE__ */ o("div", { style: { background:
|
|
1700
|
-
/* @__PURE__ */ o("div", { style: { background:
|
|
1701
|
-
/* @__PURE__ */ o("div", { style: { background:
|
|
1702
|
-
/* @__PURE__ */ o("div", { style: { background: W, border: `${
|
|
1731
|
+
/* @__PURE__ */ o("div", { style: { background: K, border: `${X}` } }),
|
|
1732
|
+
/* @__PURE__ */ o("div", { style: { background: J, border: `${X}` } }),
|
|
1733
|
+
/* @__PURE__ */ o("div", { style: { background: oe, border: `${X}` } }),
|
|
1734
|
+
/* @__PURE__ */ o("div", { style: { background: W, border: `${X}` } })
|
|
1703
1735
|
]
|
|
1704
1736
|
},
|
|
1705
1737
|
p
|
|
1706
1738
|
);
|
|
1707
1739
|
}) }),
|
|
1708
1740
|
/* @__PURE__ */ o("h5", { children: a.t("sheets-table.customStyle") }),
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
1741
|
+
/* @__PURE__ */ T("div", { className: D("univer-w-full univer-rounded-sm", H), children: [
|
|
1742
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-flex-wrap univer-gap-2 univer-p-2", children: [
|
|
1711
1743
|
/* @__PURE__ */ o(
|
|
1712
1744
|
"div",
|
|
1713
1745
|
{
|
|
1714
|
-
className:
|
|
1715
|
-
onClick:
|
|
1746
|
+
className: D("univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px univer-text-center univer-leading-10", H),
|
|
1747
|
+
onClick: V,
|
|
1716
1748
|
children: "+"
|
|
1717
1749
|
}
|
|
1718
1750
|
),
|
|
1719
|
-
|
|
1720
|
-
var
|
|
1721
|
-
const
|
|
1722
|
-
return /* @__PURE__ */
|
|
1751
|
+
C.map((p) => {
|
|
1752
|
+
var Se, _e, Fe, Ve, He, Ae, Ue, We;
|
|
1753
|
+
const _ = u.getCustomRangeThemeStyle(e, p), K = (_e = (Se = _ == null ? void 0 : _.getHeaderRowStyle()) == null ? void 0 : Se.bg) == null ? void 0 : _e.rgb, J = (Ve = (Fe = _ == null ? void 0 : _.getFirstRowStyle()) == null ? void 0 : Fe.bg) == null ? void 0 : Ve.rgb, oe = (Ae = (He = _ == null ? void 0 : _.getSecondRowStyle()) == null ? void 0 : He.bg) == null ? void 0 : Ae.rgb, W = (We = (Ue = _ == null ? void 0 : _.getLastRowStyle()) == null ? void 0 : Ue.bg) == null ? void 0 : We.rgb;
|
|
1754
|
+
return /* @__PURE__ */ T(
|
|
1723
1755
|
"div",
|
|
1724
1756
|
{
|
|
1725
|
-
className:
|
|
1726
|
-
"univer-border-blue-500": p ===
|
|
1757
|
+
className: D("univer-relative univer-h-10 univer-w-8 univer-cursor-pointer univer-border univer-border-solid univer-border-gray-200 univer-p-px", {
|
|
1758
|
+
"univer-border-blue-500": p === S.theme
|
|
1727
1759
|
}),
|
|
1728
|
-
onClick: () =>
|
|
1729
|
-
onMouseEnter: () =>
|
|
1730
|
-
onMouseLeave: () =>
|
|
1760
|
+
onClick: () => Y(p),
|
|
1761
|
+
onMouseEnter: () => $(p),
|
|
1762
|
+
onMouseLeave: () => $(null),
|
|
1731
1763
|
children: [
|
|
1732
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background:
|
|
1733
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background:
|
|
1734
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background:
|
|
1735
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: W != null ? W :
|
|
1764
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: K != null ? K : X, border: `${K ? X : et}` } }),
|
|
1765
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: J != null ? J : X, border: `${J ? X : et}` } }),
|
|
1766
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: oe != null ? oe : X, border: `${oe ? X : et}` } }),
|
|
1767
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: W != null ? W : X, border: `${W ? X : et}` } }),
|
|
1736
1768
|
/* @__PURE__ */ o(
|
|
1737
1769
|
"div",
|
|
1738
1770
|
{
|
|
1739
1771
|
className: "univer-absolute univer-right-[-3px] univer-top-[-3px] univer-h-3 univer-w-3 univer-rounded-md univer-bg-gray-200 univer-text-center univer-text-xs univer-leading-[10px]",
|
|
1740
|
-
style: { display:
|
|
1741
|
-
onClick: (
|
|
1742
|
-
|
|
1772
|
+
style: { display: P === p ? "block" : "none" },
|
|
1773
|
+
onClick: (En) => {
|
|
1774
|
+
En.stopPropagation(), ue(p);
|
|
1743
1775
|
},
|
|
1744
1776
|
children: "x"
|
|
1745
1777
|
}
|
|
@@ -1750,16 +1782,16 @@ const $i = (t) => {
|
|
|
1750
1782
|
);
|
|
1751
1783
|
})
|
|
1752
1784
|
] }),
|
|
1753
|
-
I && /* @__PURE__ */
|
|
1785
|
+
I && /* @__PURE__ */ T(Rt, { children: [
|
|
1754
1786
|
/* @__PURE__ */ o("div", { className: "univer-h-px univer-w-full univer-bg-gray-200" }),
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-flex-col univer-gap-2 univer-p-2", children: [
|
|
1788
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1757
1789
|
/* @__PURE__ */ o(
|
|
1758
1790
|
"div",
|
|
1759
1791
|
{
|
|
1760
|
-
className:
|
|
1761
|
-
"univer-text-white":
|
|
1762
|
-
"univer-text-gray-900": !
|
|
1792
|
+
className: D("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", H, {
|
|
1793
|
+
"univer-text-white": de,
|
|
1794
|
+
"univer-text-gray-900": !de
|
|
1763
1795
|
}),
|
|
1764
1796
|
style: {
|
|
1765
1797
|
background: g
|
|
@@ -1771,56 +1803,56 @@ const $i = (t) => {
|
|
|
1771
1803
|
Ee,
|
|
1772
1804
|
{
|
|
1773
1805
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1774
|
-
|
|
1806
|
+
Je,
|
|
1775
1807
|
{
|
|
1776
1808
|
value: g,
|
|
1777
1809
|
onChange: (p) => {
|
|
1778
|
-
const
|
|
1810
|
+
const _ = Ot("headerRowStyle", {
|
|
1779
1811
|
bg: {
|
|
1780
1812
|
rgb: p
|
|
1781
1813
|
},
|
|
1782
1814
|
cl: {
|
|
1783
|
-
rgb: new
|
|
1815
|
+
rgb: new ve(p).isDark() ? "#fff" : "#000"
|
|
1784
1816
|
}
|
|
1785
1817
|
});
|
|
1786
|
-
|
|
1818
|
+
G(c.getTableStyleId(), { headerRowStyle: _ });
|
|
1787
1819
|
}
|
|
1788
1820
|
}
|
|
1789
1821
|
) }),
|
|
1790
|
-
children: /* @__PURE__ */
|
|
1822
|
+
children: /* @__PURE__ */ T(
|
|
1791
1823
|
"div",
|
|
1792
1824
|
{
|
|
1793
|
-
className:
|
|
1825
|
+
className: D("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", H),
|
|
1794
1826
|
children: [
|
|
1795
1827
|
/* @__PURE__ */ o(
|
|
1796
1828
|
"div",
|
|
1797
1829
|
{
|
|
1798
|
-
className:
|
|
1799
|
-
"univer-text-white":
|
|
1800
|
-
"univer-text-gray-900": !
|
|
1830
|
+
className: D("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H, {
|
|
1831
|
+
"univer-text-white": de,
|
|
1832
|
+
"univer-text-gray-900": !de
|
|
1801
1833
|
}),
|
|
1802
1834
|
style: {
|
|
1803
1835
|
background: g
|
|
1804
1836
|
}
|
|
1805
1837
|
}
|
|
1806
1838
|
),
|
|
1807
|
-
/* @__PURE__ */ o(
|
|
1839
|
+
/* @__PURE__ */ o(qe, { className: "univer-h-2 univer-w-2" })
|
|
1808
1840
|
]
|
|
1809
1841
|
}
|
|
1810
1842
|
)
|
|
1811
1843
|
}
|
|
1812
1844
|
)
|
|
1813
1845
|
] }),
|
|
1814
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1815
1847
|
/* @__PURE__ */ o(
|
|
1816
1848
|
"div",
|
|
1817
1849
|
{
|
|
1818
|
-
className:
|
|
1819
|
-
"univer-text-white":
|
|
1820
|
-
"univer-text-gray-900": !
|
|
1850
|
+
className: D("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", H, {
|
|
1851
|
+
"univer-text-white": Ce,
|
|
1852
|
+
"univer-text-gray-900": !Ce
|
|
1821
1853
|
}),
|
|
1822
1854
|
style: {
|
|
1823
|
-
background:
|
|
1855
|
+
background: x
|
|
1824
1856
|
},
|
|
1825
1857
|
children: a.t("sheets-table.firstLine")
|
|
1826
1858
|
}
|
|
@@ -1829,52 +1861,52 @@ const $i = (t) => {
|
|
|
1829
1861
|
Ee,
|
|
1830
1862
|
{
|
|
1831
1863
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1832
|
-
|
|
1864
|
+
Je,
|
|
1833
1865
|
{
|
|
1834
|
-
value:
|
|
1866
|
+
value: x,
|
|
1835
1867
|
onChange: (p) => {
|
|
1836
|
-
|
|
1868
|
+
G(c.getTableStyleId(), {
|
|
1837
1869
|
firstRowStyle: {
|
|
1838
1870
|
bg: {
|
|
1839
1871
|
rgb: p
|
|
1840
1872
|
},
|
|
1841
1873
|
cl: {
|
|
1842
|
-
rgb: new
|
|
1874
|
+
rgb: new ve(p).isDark() ? "#fff" : "#000"
|
|
1843
1875
|
}
|
|
1844
1876
|
}
|
|
1845
1877
|
});
|
|
1846
1878
|
}
|
|
1847
1879
|
}
|
|
1848
1880
|
) }),
|
|
1849
|
-
children: /* @__PURE__ */
|
|
1881
|
+
children: /* @__PURE__ */ T(
|
|
1850
1882
|
"div",
|
|
1851
1883
|
{
|
|
1852
|
-
className:
|
|
1884
|
+
className: D("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", H),
|
|
1853
1885
|
children: [
|
|
1854
1886
|
/* @__PURE__ */ o(
|
|
1855
1887
|
"div",
|
|
1856
1888
|
{
|
|
1857
|
-
className:
|
|
1858
|
-
style: { background:
|
|
1889
|
+
className: D("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
|
|
1890
|
+
style: { background: x }
|
|
1859
1891
|
}
|
|
1860
1892
|
),
|
|
1861
|
-
/* @__PURE__ */ o(
|
|
1893
|
+
/* @__PURE__ */ o(qe, { className: "univer-h-2 univer-w-2" })
|
|
1862
1894
|
]
|
|
1863
1895
|
}
|
|
1864
1896
|
)
|
|
1865
1897
|
}
|
|
1866
1898
|
)
|
|
1867
1899
|
] }),
|
|
1868
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1869
1901
|
/* @__PURE__ */ o(
|
|
1870
1902
|
"div",
|
|
1871
1903
|
{
|
|
1872
|
-
className:
|
|
1873
|
-
"univer-text-white":
|
|
1874
|
-
"univer-text-gray-900": !
|
|
1904
|
+
className: D("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", H, {
|
|
1905
|
+
"univer-text-white": he,
|
|
1906
|
+
"univer-text-gray-900": !he
|
|
1875
1907
|
}),
|
|
1876
1908
|
style: {
|
|
1877
|
-
background:
|
|
1909
|
+
background: y
|
|
1878
1910
|
},
|
|
1879
1911
|
children: a.t("sheets-table.secondLine")
|
|
1880
1912
|
}
|
|
@@ -1883,45 +1915,45 @@ const $i = (t) => {
|
|
|
1883
1915
|
Ee,
|
|
1884
1916
|
{
|
|
1885
1917
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1886
|
-
|
|
1918
|
+
Je,
|
|
1887
1919
|
{
|
|
1888
|
-
value:
|
|
1889
|
-
onChange: (p) =>
|
|
1920
|
+
value: y,
|
|
1921
|
+
onChange: (p) => G(c.getTableStyleId(), {
|
|
1890
1922
|
secondRowStyle: {
|
|
1891
1923
|
bg: {
|
|
1892
1924
|
rgb: p
|
|
1893
1925
|
},
|
|
1894
1926
|
cl: {
|
|
1895
|
-
rgb: new
|
|
1927
|
+
rgb: new ve(p).isDark() ? "#fff" : "#000"
|
|
1896
1928
|
}
|
|
1897
1929
|
}
|
|
1898
1930
|
})
|
|
1899
1931
|
}
|
|
1900
1932
|
) }),
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1933
|
+
children: /* @__PURE__ */ T(
|
|
1902
1934
|
"div",
|
|
1903
1935
|
{
|
|
1904
|
-
className:
|
|
1936
|
+
className: D("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", H),
|
|
1905
1937
|
children: [
|
|
1906
1938
|
/* @__PURE__ */ o(
|
|
1907
1939
|
"div",
|
|
1908
1940
|
{
|
|
1909
|
-
className:
|
|
1910
|
-
style: { background:
|
|
1941
|
+
className: D("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
|
|
1942
|
+
style: { background: y }
|
|
1911
1943
|
}
|
|
1912
1944
|
),
|
|
1913
|
-
/* @__PURE__ */ o(
|
|
1945
|
+
/* @__PURE__ */ o(qe, { className: "univer-h-2 univer-w-2" })
|
|
1914
1946
|
]
|
|
1915
1947
|
}
|
|
1916
1948
|
)
|
|
1917
1949
|
}
|
|
1918
1950
|
)
|
|
1919
1951
|
] }),
|
|
1920
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ T("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1921
1953
|
/* @__PURE__ */ o(
|
|
1922
1954
|
"div",
|
|
1923
1955
|
{
|
|
1924
|
-
className:
|
|
1956
|
+
className: D("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", H, {
|
|
1925
1957
|
"univer-text-white": b,
|
|
1926
1958
|
"univer-text-gray-900": !b
|
|
1927
1959
|
}),
|
|
@@ -1935,35 +1967,35 @@ const $i = (t) => {
|
|
|
1935
1967
|
Ee,
|
|
1936
1968
|
{
|
|
1937
1969
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1938
|
-
|
|
1970
|
+
Je,
|
|
1939
1971
|
{
|
|
1940
1972
|
value: m,
|
|
1941
1973
|
onChange: (p) => {
|
|
1942
|
-
const
|
|
1974
|
+
const _ = Ot("lastRowStyle", {
|
|
1943
1975
|
bg: {
|
|
1944
1976
|
rgb: p
|
|
1945
1977
|
},
|
|
1946
1978
|
cl: {
|
|
1947
|
-
rgb: new
|
|
1979
|
+
rgb: new ve(p).isDark() ? "#fff" : "#000"
|
|
1948
1980
|
}
|
|
1949
1981
|
});
|
|
1950
|
-
|
|
1982
|
+
G(c.getTableStyleId(), { lastRowStyle: _ });
|
|
1951
1983
|
}
|
|
1952
1984
|
}
|
|
1953
1985
|
) }),
|
|
1954
|
-
children: /* @__PURE__ */
|
|
1986
|
+
children: /* @__PURE__ */ T(
|
|
1955
1987
|
"div",
|
|
1956
1988
|
{
|
|
1957
|
-
className:
|
|
1989
|
+
className: D("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", H),
|
|
1958
1990
|
children: [
|
|
1959
1991
|
/* @__PURE__ */ o(
|
|
1960
1992
|
"div",
|
|
1961
1993
|
{
|
|
1962
|
-
className:
|
|
1994
|
+
className: D("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
|
|
1963
1995
|
style: { background: m }
|
|
1964
1996
|
}
|
|
1965
1997
|
),
|
|
1966
|
-
/* @__PURE__ */ o(
|
|
1998
|
+
/* @__PURE__ */ o(qe, { className: "univer-h-2 univer-w-2" })
|
|
1967
1999
|
]
|
|
1968
2000
|
}
|
|
1969
2001
|
)
|
|
@@ -1974,188 +2006,188 @@ const $i = (t) => {
|
|
|
1974
2006
|
] })
|
|
1975
2007
|
] })
|
|
1976
2008
|
] });
|
|
1977
|
-
},
|
|
1978
|
-
function
|
|
2009
|
+
}, yn = "sheet.table.context-insert_menu-id", Rn = "sheet.table.context-remove_menu-id";
|
|
2010
|
+
function Bi(n) {
|
|
1979
2011
|
return {
|
|
1980
|
-
id:
|
|
1981
|
-
type:
|
|
1982
|
-
icon:
|
|
2012
|
+
id: Et.id,
|
|
2013
|
+
type: Re.BUTTON,
|
|
2014
|
+
icon: vn,
|
|
1983
2015
|
tooltip: "sheets-table.title",
|
|
1984
2016
|
title: "sheets-table.title",
|
|
1985
|
-
hidden$:
|
|
1986
|
-
disabled$:
|
|
2017
|
+
hidden$: gr(n, Qe.UNIVER_SHEET),
|
|
2018
|
+
disabled$: or(n, {}, !0)
|
|
1987
2019
|
};
|
|
1988
2020
|
}
|
|
1989
|
-
function
|
|
2021
|
+
function Fi(n) {
|
|
1990
2022
|
return {
|
|
1991
|
-
id:
|
|
1992
|
-
type:
|
|
2023
|
+
id: yn,
|
|
2024
|
+
type: Re.SUBITEMS,
|
|
1993
2025
|
icon: "InsertDoubleIcon",
|
|
1994
2026
|
title: "sheets-table.insert.main",
|
|
1995
|
-
hidden$:
|
|
2027
|
+
hidden$: Mn(n)
|
|
1996
2028
|
};
|
|
1997
2029
|
}
|
|
1998
|
-
function
|
|
2030
|
+
function Vi(n) {
|
|
1999
2031
|
return {
|
|
2000
|
-
id:
|
|
2001
|
-
type:
|
|
2032
|
+
id: Rn,
|
|
2033
|
+
type: Re.SUBITEMS,
|
|
2002
2034
|
icon: "ReduceDoubleIcon",
|
|
2003
2035
|
title: "sheets-table.remove.main",
|
|
2004
|
-
hidden$:
|
|
2036
|
+
hidden$: Mn(n)
|
|
2005
2037
|
};
|
|
2006
2038
|
}
|
|
2007
|
-
function
|
|
2039
|
+
function Hi(n) {
|
|
2008
2040
|
return {
|
|
2009
|
-
id:
|
|
2010
|
-
type:
|
|
2041
|
+
id: en.id,
|
|
2042
|
+
type: Re.BUTTON,
|
|
2011
2043
|
title: "sheets-table.insert.row",
|
|
2012
|
-
hidden$:
|
|
2044
|
+
hidden$: xn(n)
|
|
2013
2045
|
};
|
|
2014
2046
|
}
|
|
2015
|
-
function
|
|
2047
|
+
function Ai(n) {
|
|
2016
2048
|
return {
|
|
2017
|
-
id:
|
|
2049
|
+
id: Jt.id,
|
|
2018
2050
|
title: "sheets-table.insert.col",
|
|
2019
|
-
type:
|
|
2051
|
+
type: Re.BUTTON
|
|
2020
2052
|
};
|
|
2021
2053
|
}
|
|
2022
|
-
function
|
|
2054
|
+
function Ui(n) {
|
|
2023
2055
|
return {
|
|
2024
|
-
id:
|
|
2025
|
-
type:
|
|
2056
|
+
id: Kt.id,
|
|
2057
|
+
type: Re.BUTTON,
|
|
2026
2058
|
title: "sheets-table.remove.row",
|
|
2027
|
-
hidden$:
|
|
2059
|
+
hidden$: xn(n)
|
|
2028
2060
|
};
|
|
2029
2061
|
}
|
|
2030
|
-
function
|
|
2062
|
+
function Wi(n) {
|
|
2031
2063
|
return {
|
|
2032
|
-
id:
|
|
2064
|
+
id: zt.id,
|
|
2033
2065
|
title: "sheets-table.remove.col",
|
|
2034
|
-
type:
|
|
2066
|
+
type: Re.BUTTON
|
|
2035
2067
|
};
|
|
2036
2068
|
}
|
|
2037
|
-
function
|
|
2038
|
-
const e =
|
|
2039
|
-
return
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
if (!s.length || s.length > 1) return
|
|
2044
|
-
const
|
|
2045
|
-
return
|
|
2069
|
+
function Mn(n) {
|
|
2070
|
+
const e = n.get(dt);
|
|
2071
|
+
return n.get(fe).getCurrentTypeOfUnit$(Qe.UNIVER_SHEET).pipe(
|
|
2072
|
+
Ie((i) => i ? i.activeSheet$.pipe(
|
|
2073
|
+
Ie((a) => a ? e.selectionMoveEnd$.pipe(
|
|
2074
|
+
Ie((s) => {
|
|
2075
|
+
if (!s.length || s.length > 1) return ee(!0);
|
|
2076
|
+
const u = s[0].range, d = n.get(tn).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), u);
|
|
2077
|
+
return ee(!d);
|
|
2046
2078
|
})
|
|
2047
|
-
) :
|
|
2048
|
-
) :
|
|
2079
|
+
) : ee(!0))
|
|
2080
|
+
) : ee(!0))
|
|
2049
2081
|
);
|
|
2050
2082
|
}
|
|
2051
|
-
function
|
|
2052
|
-
const e =
|
|
2053
|
-
return
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
if (!s.length || s.length > 1) return
|
|
2058
|
-
const
|
|
2059
|
-
if (!
|
|
2060
|
-
return
|
|
2061
|
-
const v =
|
|
2062
|
-
return
|
|
2083
|
+
function xn(n) {
|
|
2084
|
+
const e = n.get(dt);
|
|
2085
|
+
return n.get(fe).getCurrentTypeOfUnit$(Qe.UNIVER_SHEET).pipe(
|
|
2086
|
+
Ie((i) => i ? i.activeSheet$.pipe(
|
|
2087
|
+
Ie((a) => a ? e.selectionMoveEnd$.pipe(
|
|
2088
|
+
Ie((s) => {
|
|
2089
|
+
if (!s.length || s.length > 1) return ee(!0);
|
|
2090
|
+
const u = s[0].range, d = n.get(tn).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), u);
|
|
2091
|
+
if (!d)
|
|
2092
|
+
return ee(!0);
|
|
2093
|
+
const v = d.getRange();
|
|
2094
|
+
return u.startRow === v.startRow ? ee(!0) : ee(!1);
|
|
2063
2095
|
})
|
|
2064
|
-
) :
|
|
2065
|
-
) :
|
|
2096
|
+
) : ee(!0))
|
|
2097
|
+
) : ee(!0))
|
|
2066
2098
|
);
|
|
2067
2099
|
}
|
|
2068
|
-
const
|
|
2069
|
-
[
|
|
2070
|
-
[
|
|
2100
|
+
const ji = {
|
|
2101
|
+
[pr.ORGANIZATION]: {
|
|
2102
|
+
[Et.id]: {
|
|
2071
2103
|
order: 0,
|
|
2072
|
-
menuItemFactory:
|
|
2104
|
+
menuItemFactory: Bi
|
|
2073
2105
|
}
|
|
2074
2106
|
},
|
|
2075
|
-
[
|
|
2076
|
-
[
|
|
2077
|
-
[
|
|
2107
|
+
[br.MAIN_AREA]: {
|
|
2108
|
+
[mr.LAYOUT]: {
|
|
2109
|
+
[yn]: {
|
|
2078
2110
|
order: 5,
|
|
2079
|
-
menuItemFactory:
|
|
2080
|
-
[
|
|
2111
|
+
menuItemFactory: Fi,
|
|
2112
|
+
[en.id]: {
|
|
2081
2113
|
order: 1,
|
|
2082
|
-
menuItemFactory:
|
|
2114
|
+
menuItemFactory: Hi
|
|
2083
2115
|
},
|
|
2084
|
-
[
|
|
2116
|
+
[Jt.id]: {
|
|
2085
2117
|
order: 2,
|
|
2086
|
-
menuItemFactory:
|
|
2118
|
+
menuItemFactory: Ai
|
|
2087
2119
|
}
|
|
2088
2120
|
},
|
|
2089
|
-
[
|
|
2121
|
+
[Rn]: {
|
|
2090
2122
|
order: 6,
|
|
2091
|
-
menuItemFactory:
|
|
2092
|
-
[
|
|
2123
|
+
menuItemFactory: Vi,
|
|
2124
|
+
[Kt.id]: {
|
|
2093
2125
|
order: 1,
|
|
2094
|
-
menuItemFactory:
|
|
2126
|
+
menuItemFactory: Ui
|
|
2095
2127
|
},
|
|
2096
|
-
[
|
|
2128
|
+
[zt.id]: {
|
|
2097
2129
|
order: 2,
|
|
2098
|
-
menuItemFactory:
|
|
2130
|
+
menuItemFactory: Wi
|
|
2099
2131
|
}
|
|
2100
2132
|
}
|
|
2101
2133
|
}
|
|
2102
2134
|
}
|
|
2103
2135
|
};
|
|
2104
|
-
var
|
|
2105
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2106
|
-
(s =
|
|
2136
|
+
var Zi = Object.getOwnPropertyDescriptor, qi = (n, e, t, r) => {
|
|
2137
|
+
for (var i = r > 1 ? void 0 : r ? Zi(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
2138
|
+
(s = n[a]) && (i = s(i) || i);
|
|
2107
2139
|
return i;
|
|
2108
|
-
},
|
|
2109
|
-
let
|
|
2110
|
-
constructor(
|
|
2111
|
-
super(), this._componentManager =
|
|
2140
|
+
}, jt = (n, e) => (t, r) => e(t, r, n);
|
|
2141
|
+
let st = class extends ke {
|
|
2142
|
+
constructor(n, e) {
|
|
2143
|
+
super(), this._componentManager = n, this._menuManagerService = e, this._initComponents(), this._initMenu();
|
|
2112
2144
|
}
|
|
2113
2145
|
_initComponents() {
|
|
2114
2146
|
[
|
|
2115
|
-
[
|
|
2116
|
-
[Ne,
|
|
2117
|
-
[
|
|
2118
|
-
].forEach(([
|
|
2119
|
-
this.disposeWithMe(this._componentManager.register(
|
|
2147
|
+
[vn, Tn],
|
|
2148
|
+
[Ne, Pi],
|
|
2149
|
+
[gn, Di]
|
|
2150
|
+
].forEach(([n, e]) => {
|
|
2151
|
+
this.disposeWithMe(this._componentManager.register(n, e));
|
|
2120
2152
|
});
|
|
2121
2153
|
}
|
|
2122
2154
|
_initMenu() {
|
|
2123
|
-
this._menuManagerService.mergeMenu(
|
|
2155
|
+
this._menuManagerService.mergeMenu(ji);
|
|
2124
2156
|
}
|
|
2125
2157
|
};
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
],
|
|
2130
|
-
var
|
|
2131
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2132
|
-
(s =
|
|
2158
|
+
st = qi([
|
|
2159
|
+
jt(0, N(nn)),
|
|
2160
|
+
jt(1, N(fr))
|
|
2161
|
+
], st);
|
|
2162
|
+
var Yi = Object.getOwnPropertyDescriptor, Qi = (n, e, t, r) => {
|
|
2163
|
+
for (var i = r > 1 ? void 0 : r ? Yi(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
2164
|
+
(s = n[a]) && (i = s(i) || i);
|
|
2133
2165
|
return i;
|
|
2134
|
-
}, nt = (
|
|
2135
|
-
let
|
|
2136
|
-
constructor(
|
|
2137
|
-
super(), this._context =
|
|
2166
|
+
}, nt = (n, e) => (t, r) => e(t, r, n);
|
|
2167
|
+
let wt = class extends Gt {
|
|
2168
|
+
constructor(n, e, t, r, i) {
|
|
2169
|
+
super(), this._context = n, this._injector = e, this._sheetSkeletonManagerService = t, this._tableManager = r, this._sheetTableThemeUIController = i, this._initListener();
|
|
2138
2170
|
}
|
|
2139
2171
|
_dirtySkeleton() {
|
|
2140
2172
|
var e;
|
|
2141
2173
|
(e = this._context.mainComponent) == null || e.makeDirty();
|
|
2142
|
-
const
|
|
2143
|
-
if (
|
|
2144
|
-
const
|
|
2145
|
-
this._sheetSkeletonManagerService.reCalculate(
|
|
2174
|
+
const n = this._sheetSkeletonManagerService.getCurrentParam();
|
|
2175
|
+
if (n) {
|
|
2176
|
+
const t = { ...n, dirty: !0 };
|
|
2177
|
+
this._sheetSkeletonManagerService.reCalculate(t);
|
|
2146
2178
|
}
|
|
2147
2179
|
}
|
|
2148
2180
|
_initListener() {
|
|
2149
|
-
const
|
|
2181
|
+
const n = this._tableManager, e = this._dirtySkeleton.bind(this);
|
|
2150
2182
|
this.disposeWithMe(
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2183
|
+
yt(
|
|
2184
|
+
n.tableAdd$,
|
|
2185
|
+
n.tableDelete$,
|
|
2186
|
+
n.tableNameChanged$,
|
|
2187
|
+
n.tableRangeChanged$,
|
|
2188
|
+
n.tableThemeChanged$,
|
|
2189
|
+
n.tableFilterChanged$,
|
|
2190
|
+
n.tableInitStatus$,
|
|
2159
2191
|
this._sheetTableThemeUIController.refreshTable$
|
|
2160
2192
|
).subscribe(
|
|
2161
2193
|
e
|
|
@@ -2163,50 +2195,50 @@ let Tt = class extends Qt {
|
|
|
2163
2195
|
);
|
|
2164
2196
|
}
|
|
2165
2197
|
};
|
|
2166
|
-
|
|
2167
|
-
nt(1,
|
|
2168
|
-
nt(2,
|
|
2169
|
-
nt(3,
|
|
2170
|
-
nt(4,
|
|
2171
|
-
],
|
|
2172
|
-
var
|
|
2173
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2174
|
-
(s =
|
|
2198
|
+
wt = Qi([
|
|
2199
|
+
nt(1, N(Oe)),
|
|
2200
|
+
nt(2, N(ct)),
|
|
2201
|
+
nt(3, N(ie)),
|
|
2202
|
+
nt(4, N(ye))
|
|
2203
|
+
], wt);
|
|
2204
|
+
var Gi = Object.getOwnPropertyDescriptor, Xi = (n, e, t, r) => {
|
|
2205
|
+
for (var i = r > 1 ? void 0 : r ? Gi(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
2206
|
+
(s = n[a]) && (i = s(i) || i);
|
|
2175
2207
|
return i;
|
|
2176
|
-
},
|
|
2177
|
-
let
|
|
2178
|
-
constructor(
|
|
2179
|
-
super(), this._sheetInterceptorService =
|
|
2208
|
+
}, ft = (n, e) => (t, r) => e(t, r, n);
|
|
2209
|
+
let lt = class extends ke {
|
|
2210
|
+
constructor(n, e, t) {
|
|
2211
|
+
super(), this._sheetInterceptorService = n, this._univerInstanceService = e, this._tableManager = t, this._initSelectionChange();
|
|
2180
2212
|
}
|
|
2181
2213
|
_initSelectionChange() {
|
|
2182
2214
|
this.disposeWithMe(
|
|
2183
2215
|
this._sheetInterceptorService.interceptCommand({
|
|
2184
|
-
getMutations: (
|
|
2185
|
-
if (
|
|
2186
|
-
const e =
|
|
2216
|
+
getMutations: (n) => {
|
|
2217
|
+
if (n.id === cr.id) {
|
|
2218
|
+
const e = ut(this._univerInstanceService);
|
|
2187
2219
|
if (!e)
|
|
2188
2220
|
return { redos: [], undos: [] };
|
|
2189
|
-
const
|
|
2190
|
-
const
|
|
2191
|
-
return
|
|
2221
|
+
const t = n.params, { range: r } = t, { unitId: i, subUnitId: a, worksheet: s } = e, u = this._tableManager.getTablesBySubunitId(i, a).find((h) => {
|
|
2222
|
+
const d = h.getRange();
|
|
2223
|
+
return me.contains(d, r);
|
|
2192
2224
|
});
|
|
2193
|
-
if (
|
|
2194
|
-
const h =
|
|
2225
|
+
if (u) {
|
|
2226
|
+
const h = u.getRange(), d = {
|
|
2195
2227
|
...h,
|
|
2196
2228
|
startRow: h.startRow + 1
|
|
2197
2229
|
};
|
|
2198
|
-
return
|
|
2230
|
+
return me.equals(h, r) ? { undos: [], redos: [] } : me.equals(d, r) ? {
|
|
2199
2231
|
undos: [],
|
|
2200
2232
|
redos: [
|
|
2201
2233
|
{
|
|
2202
|
-
id:
|
|
2234
|
+
id: Ft.id,
|
|
2203
2235
|
params: {
|
|
2204
2236
|
unitId: i,
|
|
2205
2237
|
subUnitId: a,
|
|
2206
2238
|
selections: [
|
|
2207
2239
|
{
|
|
2208
2240
|
range: h,
|
|
2209
|
-
primary:
|
|
2241
|
+
primary: Bt(h, s)
|
|
2210
2242
|
}
|
|
2211
2243
|
]
|
|
2212
2244
|
}
|
|
@@ -2216,14 +2248,14 @@ let st = class extends Oe {
|
|
|
2216
2248
|
undos: [],
|
|
2217
2249
|
redos: [
|
|
2218
2250
|
{
|
|
2219
|
-
id:
|
|
2251
|
+
id: Ft.id,
|
|
2220
2252
|
params: {
|
|
2221
2253
|
unitId: i,
|
|
2222
2254
|
subUnitId: a,
|
|
2223
2255
|
selections: [
|
|
2224
2256
|
{
|
|
2225
|
-
range:
|
|
2226
|
-
primary:
|
|
2257
|
+
range: d,
|
|
2258
|
+
primary: Bt(d, s)
|
|
2227
2259
|
}
|
|
2228
2260
|
]
|
|
2229
2261
|
}
|
|
@@ -2238,72 +2270,72 @@ let st = class extends Oe {
|
|
|
2238
2270
|
);
|
|
2239
2271
|
}
|
|
2240
2272
|
};
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
],
|
|
2246
|
-
var
|
|
2247
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2248
|
-
(s =
|
|
2273
|
+
lt = Xi([
|
|
2274
|
+
ft(0, N(un)),
|
|
2275
|
+
ft(1, N(fe)),
|
|
2276
|
+
ft(2, N(ie))
|
|
2277
|
+
], lt);
|
|
2278
|
+
var zi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Ji = (n, e, t) => e in n ? zi(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ea = (n, e, t, r) => {
|
|
2279
|
+
for (var i = r > 1 ? void 0 : r ? Ki(e, t) : e, a = n.length - 1, s; a >= 0; a--)
|
|
2280
|
+
(s = n[a]) && (i = s(i) || i);
|
|
2249
2281
|
return i;
|
|
2250
|
-
}, rt = (
|
|
2251
|
-
let
|
|
2252
|
-
constructor(
|
|
2253
|
-
super(), this._config =
|
|
2254
|
-
const { menu: a, ...s } =
|
|
2282
|
+
}, rt = (n, e) => (t, r) => e(t, r, n), Nn = (n, e, t) => Ji(n, typeof e != "symbol" ? e + "" : e, t);
|
|
2283
|
+
let ot = class extends Fn {
|
|
2284
|
+
constructor(n = Ut, e, t, r, i) {
|
|
2285
|
+
super(), this._config = n, this._injector = e, this._commandService = t, this._configService = r, this._renderManagerService = i;
|
|
2286
|
+
const { menu: a, ...s } = Vn(
|
|
2255
2287
|
{},
|
|
2256
|
-
|
|
2288
|
+
Ut,
|
|
2257
2289
|
this._config
|
|
2258
2290
|
);
|
|
2259
|
-
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(
|
|
2291
|
+
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(In, s), this._initRegisterCommand();
|
|
2260
2292
|
}
|
|
2261
2293
|
onStarting() {
|
|
2262
2294
|
Hn(this._injector, [
|
|
2263
2295
|
[$e],
|
|
2264
2296
|
[Le],
|
|
2265
|
-
[
|
|
2266
|
-
[
|
|
2267
|
-
[
|
|
2297
|
+
[st],
|
|
2298
|
+
[ye],
|
|
2299
|
+
[lt]
|
|
2268
2300
|
]);
|
|
2269
2301
|
}
|
|
2270
2302
|
onReady() {
|
|
2271
|
-
|
|
2303
|
+
An(this._injector, [
|
|
2272
2304
|
[$e],
|
|
2273
2305
|
[Le],
|
|
2274
|
-
[
|
|
2275
|
-
[
|
|
2276
|
-
[
|
|
2306
|
+
[st],
|
|
2307
|
+
[ye],
|
|
2308
|
+
[lt]
|
|
2277
2309
|
]);
|
|
2278
2310
|
}
|
|
2279
2311
|
onRendered() {
|
|
2280
2312
|
this._registerRenderModules();
|
|
2281
2313
|
}
|
|
2282
2314
|
_registerRenderModules() {
|
|
2283
|
-
const
|
|
2284
|
-
[
|
|
2285
|
-
[
|
|
2315
|
+
const n = [
|
|
2316
|
+
[Tt],
|
|
2317
|
+
[wt]
|
|
2286
2318
|
];
|
|
2287
|
-
this._config.hideAnchor !== !0 &&
|
|
2288
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
2319
|
+
this._config.hideAnchor !== !0 && n.push([at]), n.forEach((e) => {
|
|
2320
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(Qe.UNIVER_SHEET, e));
|
|
2289
2321
|
});
|
|
2290
2322
|
}
|
|
2291
2323
|
_initRegisterCommand() {
|
|
2292
2324
|
[
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
].forEach((
|
|
2325
|
+
St,
|
|
2326
|
+
Et
|
|
2327
|
+
].forEach((n) => this._commandService.registerCommand(n));
|
|
2296
2328
|
}
|
|
2297
2329
|
};
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
rt(1,
|
|
2303
|
-
rt(2,
|
|
2304
|
-
rt(3,
|
|
2305
|
-
rt(4,
|
|
2306
|
-
],
|
|
2330
|
+
Nn(ot, "pluginName", Ur);
|
|
2331
|
+
Nn(ot, "type", Qe.UNIVER_SHEET);
|
|
2332
|
+
ot = ea([
|
|
2333
|
+
Bn(tr),
|
|
2334
|
+
rt(1, N(Oe)),
|
|
2335
|
+
rt(2, N(ne)),
|
|
2336
|
+
rt(3, Qt),
|
|
2337
|
+
rt(4, Xt)
|
|
2338
|
+
], ot);
|
|
2307
2339
|
export {
|
|
2308
|
-
|
|
2340
|
+
ot as UniverSheetsTableUIPlugin
|
|
2309
2341
|
};
|