@univerjs/sheets-table-ui 0.7.0 → 0.8.0-beta.1
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 +1018 -1016
- package/lib/index.css +1 -1
- package/lib/index.js +1018 -1016
- package/lib/types/locale/zh-CN.d.ts +2 -127
- package/lib/types/views/components/SheetTableItemsFilterPanel.d.ts +2 -2
- package/lib/types/views/menu.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { IRenderManagerService as
|
|
6
|
-
import { TableManager as ne, SheetTableService as
|
|
7
|
-
import { SheetCanvasPopManagerService as
|
|
8
|
-
import { useDependency as
|
|
9
|
-
import { startWith as
|
|
10
|
-
import { jsxs as
|
|
11
|
-
import { Dropdown as
|
|
12
|
-
import { SetRangeValuesMutation as
|
|
13
|
-
import { SortRangeCommand as
|
|
14
|
-
import { forwardRef as re, useRef 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 = (t, e, n) => e in t ? Ln(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var A = (t, e, n) => $n(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Inject as x, IUniverInstanceService as fe, ICommandService as le, Disposable as Pe, ObjectMatrix as kn, cellToRange as Zt, Rectangle as me, LocaleService as oe, Injector as Oe, dayjs as de, IPermissionService as qt, IContextService as It, CommandType as Yt, IConfigService as Qt, ThemeService as Pn, RxDisposable as Gt, InterceptorEffectEnum as On, ErrorService as Dn, ColorKit as he, UniverInstanceType as ot, DependentOn as Bn, Plugin as Fn, merge as Hn, registerDependencies as Vn, 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 ne, SheetTableService as qn, SetSheetTableFilterCommand as $t, isConditionFilter as Yn, isManualFilter as Qn, TableDateCompareTypeEnum as l, TableStringCompareTypeEnum as j, TableConditionTypeEnum as B, TableNumberCompareTypeEnum as $, SheetsTableSortStateEnum as Ge, TableColumnFilterTypeEnum as kt, AddSheetTableCommand as Gn, SHEET_TABLE_CUSTOM_THEME_PREFIX as Xn, DeleteSheetTableCommand as zn, SetSheetTableCommand as Ct, SheetsTableButtonStateEnum as xe, processStyleWithBorderStyle as Pt, 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, ContextMenuPosition as gr, ContextMenuGroup as br, RibbonDataGroup as mr, IMenuManagerService as pr } from "@univerjs/ui";
|
|
9
|
+
import { startWith as an, distinctUntilChanged as fr, Subject as Cr, BehaviorSubject as Ot, merge as yt, filter as Sr, debounceTime as _r, switchMap as Ie, of as J, map as Tr, takeUntil as wr } from "rxjs";
|
|
10
|
+
import { jsxs as I, jsx as o, Fragment as Rt } from "react/jsx-runtime";
|
|
11
|
+
import { Dropdown as Le, clsx as O, borderClassName as F, CascaderList as Ir, Input as Mt, InputNumber as bt, DatePicker as yr, DateRangePicker as Rr, Select as Mr, Checkbox as Dt, scrollbarClassName as xr, ButtonGroup as Nr, Button as Te, Segmented as Er, ColorPicker as Xe } from "@univerjs/design";
|
|
12
|
+
import { SetRangeValuesMutation as Lr, WorkbookEditablePermission as sn, getSheetCommandTarget as ut, SheetsSelectionsService as dt, isSingleCellSelection as $r, expandToContinuousRange as kr, SetRangeThemeMutation as ln, WorkbookPermissionService as on, SheetRangeThemeModel as cn, SheetInterceptorService as un, INTERCEPTOR_POINT as Pr, RangeThemeStyle as Or, getPrimaryForRange as Bt, SetSelectionsOperation as Ft } from "@univerjs/sheets";
|
|
13
|
+
import { SortRangeCommand as Dr, SortType as Ht } from "@univerjs/sheets-sort";
|
|
14
|
+
import { forwardRef as re, useRef as Br, createElement as ie, useState as q, useMemo as dn, useCallback as Vt, useEffect as hn } from "react";
|
|
15
|
+
import { serializeRange as At, deserializeRangeWithSheet as Fr } from "@univerjs/engine-formula";
|
|
16
|
+
import { RangeSelector as Hr } from "@univerjs/sheets-formula-ui";
|
|
17
|
+
const Vr = "SHEET_TABLE_UI_PLUGIN", ge = "SHEETS_TABLE_FILTER_PANEL_OPENED_KEY", Ar = "UNIVER_SHEET_Table_FILTER_PANEL_ID", vn = "TABLE_TOOLBAR_BUTTON", Ee = "TABLE_SELECTOR_DIALOG", Ur = "SHEET_TABLE_THEME_PANEL_ID", gn = "SHEET_TABLE_THEME_PANEL", mt = "table-custom-", Wr = "table-default-", ve = "rgb(255, 255, 255)", G = "none", ze = "1px solid rgb(var(--grey-200))";
|
|
18
|
+
var X = function() {
|
|
19
|
+
return X = Object.assign || function(t) {
|
|
20
|
+
for (var e, n = 1, r = arguments.length; n < r; n++) {
|
|
21
|
+
e = arguments[n];
|
|
22
|
+
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[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
|
-
}, ae = re(function(
|
|
34
|
-
var
|
|
35
|
-
return
|
|
24
|
+
return t;
|
|
25
|
+
}, X.apply(this, arguments);
|
|
26
|
+
}, jr = function(t, e) {
|
|
27
|
+
var n = {};
|
|
28
|
+
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
29
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
30
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
|
|
31
|
+
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
|
|
32
|
+
return n;
|
|
33
|
+
}, ae = re(function(t, e) {
|
|
34
|
+
var n = t.icon, r = t.id, i = t.className, a = t.extend, s = jr(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), d = Br("_".concat(Yr()));
|
|
35
|
+
return bn(n, "".concat(r), { defIds: n.defIds, idSuffix: d.current }, X({ ref: e, className: c }, s), a);
|
|
36
36
|
});
|
|
37
|
-
function
|
|
38
|
-
return ie(
|
|
39
|
-
return
|
|
37
|
+
function bn(t, e, n, r, i) {
|
|
38
|
+
return ie(t.tag, X(X({ key: e }, Zr(t, n, i)), r), (qr(t, n).children || []).map(function(a, s) {
|
|
39
|
+
return bn(a, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, i);
|
|
40
40
|
}));
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
var r =
|
|
44
|
-
|
|
42
|
+
function Zr(t, e, n) {
|
|
43
|
+
var r = X({}, t.attrs);
|
|
44
|
+
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), t.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 || (t.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.
|
|
58
|
-
}) }) :
|
|
54
|
+
function qr(t, e) {
|
|
55
|
+
var n, r = e.defIds;
|
|
56
|
+
return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? X(X({}, t), { children: t.children.map(function(i) {
|
|
57
|
+
return typeof i.attrs.id == "string" && r && r.includes(i.attrs.id) ? X(X({}, i), { attrs: X(X({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
|
|
58
|
+
}) }) : t;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Yr() {
|
|
61
61
|
return Math.random().toString(36).substring(2, 8);
|
|
62
62
|
}
|
|
63
63
|
ae.displayName = "UniverIcon";
|
|
64
|
-
var
|
|
65
|
-
return ie(ae, Object.assign({},
|
|
66
|
-
id: "ascending-
|
|
64
|
+
var Qr = { 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 = re(function(t, e) {
|
|
65
|
+
return ie(ae, Object.assign({}, t, {
|
|
66
|
+
id: "ascending-icon",
|
|
67
67
|
ref: e,
|
|
68
|
-
icon:
|
|
68
|
+
icon: Qr
|
|
69
69
|
}));
|
|
70
70
|
});
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
return ie(ae, Object.assign({},
|
|
74
|
-
id: "delete-
|
|
71
|
+
mn.displayName = "AscendingIcon";
|
|
72
|
+
var Gr = { 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 = re(function(t, e) {
|
|
73
|
+
return ie(ae, Object.assign({}, t, {
|
|
74
|
+
id: "delete-icon",
|
|
75
75
|
ref: e,
|
|
76
|
-
icon:
|
|
76
|
+
icon: Gr
|
|
77
77
|
}));
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
return ie(ae, Object.assign({},
|
|
82
|
-
id: "descending-
|
|
79
|
+
pn.displayName = "DeleteIcon";
|
|
80
|
+
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 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 = re(function(t, e) {
|
|
81
|
+
return ie(ae, Object.assign({}, t, {
|
|
82
|
+
id: "descending-icon",
|
|
83
83
|
ref: e,
|
|
84
|
-
icon:
|
|
84
|
+
icon: Xr
|
|
85
85
|
}));
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
return ie(ae, Object.assign({},
|
|
90
|
-
id: "dropdown-
|
|
87
|
+
fn.displayName = "DescendingIcon";
|
|
88
|
+
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: "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" } }] }, Ze = re(function(t, e) {
|
|
89
|
+
return ie(ae, Object.assign({}, t, {
|
|
90
|
+
id: "dropdown-icon",
|
|
91
91
|
ref: e,
|
|
92
|
-
icon:
|
|
92
|
+
icon: zr
|
|
93
93
|
}));
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
var
|
|
97
|
-
return ie(ae, Object.assign({},
|
|
98
|
-
id: "grid-outline-
|
|
95
|
+
Ze.displayName = "DropdownIcon";
|
|
96
|
+
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: "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 = re(function(t, e) {
|
|
97
|
+
return ie(ae, Object.assign({}, t, {
|
|
98
|
+
id: "grid-outline-icon",
|
|
99
99
|
ref: e,
|
|
100
|
-
icon:
|
|
100
|
+
icon: Kr
|
|
101
101
|
}));
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return ie(ae, Object.assign({},
|
|
106
|
-
id: "more-down-
|
|
103
|
+
Cn.displayName = "GridOutlineIcon";
|
|
104
|
+
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: "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 = re(function(t, e) {
|
|
105
|
+
return ie(ae, Object.assign({}, t, {
|
|
106
|
+
id: "more-down-icon",
|
|
107
107
|
ref: e,
|
|
108
|
-
icon:
|
|
108
|
+
icon: Jr
|
|
109
109
|
}));
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
var
|
|
113
|
-
return ie(ae, Object.assign({},
|
|
114
|
-
id: "paint-bucket",
|
|
111
|
+
xt.displayName = "MoreDownIcon";
|
|
112
|
+
var ei = { 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 = re(function(t, e) {
|
|
113
|
+
return ie(ae, Object.assign({}, t, {
|
|
114
|
+
id: "paint-bucket-double-icon",
|
|
115
115
|
ref: e,
|
|
116
|
-
icon:
|
|
116
|
+
icon: ei
|
|
117
117
|
}));
|
|
118
118
|
});
|
|
119
|
-
|
|
120
|
-
var
|
|
121
|
-
return ie(ae, Object.assign({},
|
|
122
|
-
id: "rename-
|
|
119
|
+
Sn.displayName = "PaintBucketDoubleIcon";
|
|
120
|
+
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: "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 = re(function(t, e) {
|
|
121
|
+
return ie(ae, Object.assign({}, t, {
|
|
122
|
+
id: "rename-icon",
|
|
123
123
|
ref: e,
|
|
124
|
-
icon:
|
|
124
|
+
icon: ti
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
|
-
|
|
128
|
-
var
|
|
129
|
-
return ie(ae, Object.assign({},
|
|
130
|
-
id: "table-
|
|
127
|
+
_n.displayName = "RenameIcon";
|
|
128
|
+
var ni = { 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 = re(function(t, e) {
|
|
129
|
+
return ie(ae, Object.assign({}, t, {
|
|
130
|
+
id: "table-icon",
|
|
131
131
|
ref: e,
|
|
132
|
-
icon:
|
|
132
|
+
icon: ni
|
|
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__ */ ((t) => (t.Items = "items", t.Condition = "condition", t))(pe || {}), ri = Object.getOwnPropertyDescriptor, ii = (t, e, n, r) => {
|
|
137
|
+
for (var i = r > 1 ? void 0 : r ? ri(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
138
|
+
(s = t[a]) && (i = s(i) || i);
|
|
139
139
|
return i;
|
|
140
|
-
},
|
|
141
|
-
let
|
|
142
|
-
constructor(e,
|
|
140
|
+
}, Ke = (t, e) => (n, r) => e(n, r, t);
|
|
141
|
+
let $e = class extends Pe {
|
|
142
|
+
constructor(e, n, r, i) {
|
|
143
143
|
super();
|
|
144
|
-
|
|
145
|
-
this._tableManager = e, this._sheetTableService =
|
|
144
|
+
A(this, "_itemsCache", /* @__PURE__ */ new Map());
|
|
145
|
+
this._tableManager = e, this._sheetTableService = n, this._univerInstanceService = r, this._commandService = i, this._registerTableFilterChangeEvent();
|
|
146
146
|
}
|
|
147
147
|
_registerTableFilterChangeEvent() {
|
|
148
148
|
this._commandService.onCommandExecuted((e) => {
|
|
149
|
-
if (e.id ===
|
|
150
|
-
const { unitId:
|
|
149
|
+
if (e.id === Lr.id) {
|
|
150
|
+
const { unitId: n, subUnitId: r, cellValue: i } = e.params, a = this._tableManager.getTablesBySubunitId(n, r);
|
|
151
151
|
if (!a.length)
|
|
152
152
|
return;
|
|
153
|
-
new
|
|
154
|
-
const u =
|
|
153
|
+
new kn(i).forValue((c, d, h) => {
|
|
154
|
+
const u = Zt(c, d), g = a.find((_) => {
|
|
155
155
|
const S = _.getTableFilterRange();
|
|
156
|
-
return
|
|
156
|
+
return me.intersects(S, u);
|
|
157
157
|
});
|
|
158
158
|
if (g) {
|
|
159
159
|
const _ = d - g.getRange().startColumn;
|
|
160
160
|
this._itemsCache.delete(g.getId() + _);
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
} else if (e.id ===
|
|
164
|
-
const { unitId:
|
|
163
|
+
} else if (e.id === $t.id) {
|
|
164
|
+
const { unitId: n, tableId: r } = e.params, i = this._tableManager.getTable(n, r);
|
|
165
165
|
if (!i)
|
|
166
166
|
return;
|
|
167
167
|
const a = i.getSubunitId();
|
|
168
|
-
this._tableManager.getTablesBySubunitId(
|
|
168
|
+
this._tableManager.getTablesBySubunitId(n, a).forEach((c) => {
|
|
169
169
|
const d = c.getRange();
|
|
170
170
|
for (let h = d.startColumn; h <= d.endColumn; h++)
|
|
171
171
|
this._itemsCache.delete(c.getId() + h);
|
|
@@ -173,144 +173,144 @@ let De = class extends He {
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
getTableFilterPanelInitProps(e,
|
|
176
|
+
getTableFilterPanelInitProps(e, n, 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: n,
|
|
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, n, r) {
|
|
188
|
+
const i = this._tableManager.getTable(e, n), 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, n, r, i) {
|
|
196
|
+
if (!this._tableManager.getTable(e, n))
|
|
197
197
|
return;
|
|
198
198
|
const s = {
|
|
199
199
|
unitId: e,
|
|
200
|
-
tableId:
|
|
200
|
+
tableId: n,
|
|
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, n, r, i) {
|
|
207
|
+
var k;
|
|
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: d, startColumn: h } = s, u = h + i, g = (
|
|
213
|
+
const s = a.getTableFilterRange(), { startRow: c, endRow: d, startColumn: h } = s, u = h + i, g = (k = this._univerInstanceService.getUnit(e)) == null ? void 0 : k.getSheetBySheetId(n);
|
|
214
214
|
if (!g)
|
|
215
215
|
return { data: [], itemsCountMap: /* @__PURE__ */ new Map(), allItemsCount: 0 };
|
|
216
216
|
const _ = [], S = /* @__PURE__ */ new Map();
|
|
217
217
|
let T = 0;
|
|
218
|
-
for (let
|
|
219
|
-
if (g.isRowFiltered(
|
|
218
|
+
for (let f = c; f <= d; f++) {
|
|
219
|
+
if (g.isRowFiltered(f))
|
|
220
220
|
continue;
|
|
221
|
-
const y = this._sheetTableService.getCellValueWithConditionType(g,
|
|
221
|
+
const y = this._sheetTableService.getCellValueWithConditionType(g, f, u);
|
|
222
222
|
S.has(y) || _.push({
|
|
223
223
|
title: y,
|
|
224
|
-
key: `${u}_${
|
|
224
|
+
key: `${u}_${f}`,
|
|
225
225
|
leaf: !0
|
|
226
226
|
}), T++, S.set(y, (S.get(y) || 0) + 1);
|
|
227
227
|
}
|
|
228
228
|
return this._itemsCache.set(r + i, { data: _, itemsCountMap: S, allItemsCount: T }), { data: _, itemsCountMap: S, allItemsCount: T };
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
],
|
|
237
|
-
var
|
|
238
|
-
function
|
|
239
|
-
const
|
|
231
|
+
$e = ii([
|
|
232
|
+
Ke(0, x(ne)),
|
|
233
|
+
Ke(1, x(qn)),
|
|
234
|
+
Ke(2, x(fe)),
|
|
235
|
+
Ke(3, le)
|
|
236
|
+
], $e);
|
|
237
|
+
var Z = /* @__PURE__ */ ((t) => (t.DatePicker = "DatePicker", t.DateRange = "DateRange", t.Input = "Input", t.Inputs = "Inputs", t.Select = "Select", t.None = "None", t))(Z || {});
|
|
238
|
+
function ai(t) {
|
|
239
|
+
const n = t.get(oe).t;
|
|
240
240
|
return [
|
|
241
241
|
{
|
|
242
|
-
value:
|
|
243
|
-
label:
|
|
242
|
+
value: B.String,
|
|
243
|
+
label: n(`sheets-table.condition.${B.String}`),
|
|
244
244
|
children: [
|
|
245
245
|
{
|
|
246
|
-
value:
|
|
247
|
-
label:
|
|
246
|
+
value: j.Equal,
|
|
247
|
+
label: n(`sheets-table.string.compare.${j.Equal}`)
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
value:
|
|
251
|
-
label:
|
|
250
|
+
value: j.NotEqual,
|
|
251
|
+
label: n(`sheets-table.string.compare.${j.NotEqual}`)
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
|
-
value:
|
|
255
|
-
label:
|
|
254
|
+
value: j.Contains,
|
|
255
|
+
label: n(`sheets-table.string.compare.${j.Contains}`)
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
|
-
value:
|
|
259
|
-
label:
|
|
258
|
+
value: j.NotContains,
|
|
259
|
+
label: n(`sheets-table.string.compare.${j.NotContains}`)
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
|
-
value:
|
|
263
|
-
label:
|
|
262
|
+
value: j.StartsWith,
|
|
263
|
+
label: n(`sheets-table.string.compare.${j.StartsWith}`)
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
|
-
value:
|
|
267
|
-
label:
|
|
266
|
+
value: j.EndsWith,
|
|
267
|
+
label: n(`sheets-table.string.compare.${j.EndsWith}`)
|
|
268
268
|
}
|
|
269
269
|
]
|
|
270
270
|
},
|
|
271
271
|
{
|
|
272
|
-
value:
|
|
273
|
-
label:
|
|
272
|
+
value: B.Number,
|
|
273
|
+
label: n(`sheets-table.condition.${B.Number}`),
|
|
274
274
|
children: [
|
|
275
275
|
{
|
|
276
276
|
value: $.Equal,
|
|
277
|
-
label:
|
|
277
|
+
label: n(`sheets-table.number.compare.${$.Equal}`)
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
value: $.NotEqual,
|
|
281
|
-
label:
|
|
281
|
+
label: n(`sheets-table.number.compare.${$.NotEqual}`)
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
value: $.GreaterThan,
|
|
285
|
-
label:
|
|
285
|
+
label: n(`sheets-table.number.compare.${$.GreaterThan}`)
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
value: $.GreaterThanOrEqual,
|
|
289
|
-
label:
|
|
289
|
+
label: n(`sheets-table.number.compare.${$.GreaterThanOrEqual}`)
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
value: $.LessThan,
|
|
293
|
-
label:
|
|
293
|
+
label: n(`sheets-table.number.compare.${$.LessThan}`)
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
296
|
value: $.LessThanOrEqual,
|
|
297
|
-
label:
|
|
297
|
+
label: n(`sheets-table.number.compare.${$.LessThanOrEqual}`)
|
|
298
298
|
},
|
|
299
299
|
{
|
|
300
300
|
value: $.Between,
|
|
301
|
-
label:
|
|
301
|
+
label: n(`sheets-table.number.compare.${$.Between}`)
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
value: $.NotBetween,
|
|
305
|
-
label:
|
|
305
|
+
label: n(`sheets-table.number.compare.${$.NotBetween}`)
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
value: $.Above,
|
|
309
|
-
label:
|
|
309
|
+
label: n(`sheets-table.number.compare.${$.Above}`)
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
value: $.Below,
|
|
313
|
-
label:
|
|
313
|
+
label: n(`sheets-table.number.compare.${$.Below}`)
|
|
314
314
|
}
|
|
315
315
|
// {
|
|
316
316
|
// value: TableNumberCompareTypeEnum.TopN,
|
|
@@ -319,105 +319,105 @@ function ti(n) {
|
|
|
319
319
|
]
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
|
-
value:
|
|
323
|
-
label:
|
|
322
|
+
value: B.Date,
|
|
323
|
+
label: n(`sheets-table.condition.${B.Date}`),
|
|
324
324
|
children: [
|
|
325
325
|
{
|
|
326
326
|
value: l.Equal,
|
|
327
|
-
label:
|
|
327
|
+
label: n(`sheets-table.date.compare.${l.Equal}`)
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
330
|
value: l.NotEqual,
|
|
331
|
-
label:
|
|
331
|
+
label: n(`sheets-table.date.compare.${l.NotEqual}`)
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
value: l.After,
|
|
335
|
-
label:
|
|
335
|
+
label: n(`sheets-table.date.compare.${l.After}`)
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
338
|
value: l.AfterOrEqual,
|
|
339
|
-
label:
|
|
339
|
+
label: n(`sheets-table.date.compare.${l.AfterOrEqual}`)
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
value: l.Before,
|
|
343
|
-
label:
|
|
343
|
+
label: n(`sheets-table.date.compare.${l.Before}`)
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
value: l.BeforeOrEqual,
|
|
347
|
-
label:
|
|
347
|
+
label: n(`sheets-table.date.compare.${l.BeforeOrEqual}`)
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
value: l.Between,
|
|
351
|
-
label:
|
|
351
|
+
label: n(`sheets-table.date.compare.${l.Between}`)
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
value: l.NotBetween,
|
|
355
|
-
label:
|
|
355
|
+
label: n(`sheets-table.date.compare.${l.NotBetween}`)
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
value: l.Today,
|
|
359
|
-
label:
|
|
359
|
+
label: n(`sheets-table.date.compare.${l.Today}`)
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
value: l.Yesterday,
|
|
363
|
-
label:
|
|
363
|
+
label: n(`sheets-table.date.compare.${l.Yesterday}`)
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
366
|
value: l.Tomorrow,
|
|
367
|
-
label:
|
|
367
|
+
label: n(`sheets-table.date.compare.${l.Tomorrow}`)
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
value: l.ThisWeek,
|
|
371
|
-
label:
|
|
371
|
+
label: n(`sheets-table.date.compare.${l.ThisWeek}`)
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
value: l.LastWeek,
|
|
375
|
-
label:
|
|
375
|
+
label: n(`sheets-table.date.compare.${l.LastWeek}`)
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
value: l.NextWeek,
|
|
379
|
-
label:
|
|
379
|
+
label: n(`sheets-table.date.compare.${l.NextWeek}`)
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
value: l.ThisMonth,
|
|
383
|
-
label:
|
|
383
|
+
label: n(`sheets-table.date.compare.${l.ThisMonth}`)
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
386
|
value: l.LastMonth,
|
|
387
|
-
label:
|
|
387
|
+
label: n(`sheets-table.date.compare.${l.LastMonth}`)
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
value: l.NextMonth,
|
|
391
|
-
label:
|
|
391
|
+
label: n(`sheets-table.date.compare.${l.NextMonth}`)
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
value: l.ThisYear,
|
|
395
|
-
label:
|
|
395
|
+
label: n(`sheets-table.date.compare.${l.ThisYear}`)
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
398
|
value: l.LastYear,
|
|
399
|
-
label:
|
|
399
|
+
label: n(`sheets-table.date.compare.${l.LastYear}`)
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
value: l.NextYear,
|
|
403
|
-
label:
|
|
403
|
+
label: n(`sheets-table.date.compare.${l.NextYear}`)
|
|
404
404
|
},
|
|
405
405
|
{
|
|
406
406
|
value: l.Quarter,
|
|
407
|
-
label:
|
|
407
|
+
label: n(`sheets-table.date.compare.${l.Quarter}`)
|
|
408
408
|
},
|
|
409
409
|
{
|
|
410
410
|
value: l.Month,
|
|
411
|
-
label:
|
|
411
|
+
label: n(`sheets-table.date.compare.${l.Month}`)
|
|
412
412
|
}
|
|
413
413
|
]
|
|
414
414
|
}
|
|
415
415
|
];
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function si(t, e) {
|
|
418
418
|
if (!e)
|
|
419
419
|
return [];
|
|
420
|
-
const r =
|
|
420
|
+
const r = t.get(oe).t;
|
|
421
421
|
switch (e) {
|
|
422
422
|
case l.Quarter:
|
|
423
423
|
return [
|
|
@@ -493,7 +493,7 @@ function ni(n, e) {
|
|
|
493
493
|
return [];
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
const
|
|
496
|
+
const Nt = /* @__PURE__ */ new Set([
|
|
497
497
|
l.Equal,
|
|
498
498
|
l.NotEqual,
|
|
499
499
|
l.After,
|
|
@@ -501,96 +501,96 @@ const yt = /* @__PURE__ */ new Set([
|
|
|
501
501
|
l.Before,
|
|
502
502
|
l.BeforeOrEqual
|
|
503
503
|
]);
|
|
504
|
-
function
|
|
505
|
-
return e ?
|
|
504
|
+
function li(t, e) {
|
|
505
|
+
return e ? t === B.String ? Z.Input : t === B.Number ? e === $.Between || e === $.NotBetween ? Z.Inputs : Z.Input : t === B.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;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
if (!
|
|
507
|
+
function oi(t) {
|
|
508
|
+
if (!t || t.filterType !== "condition")
|
|
509
509
|
return {
|
|
510
|
-
type:
|
|
511
|
-
compareType:
|
|
510
|
+
type: B.String,
|
|
511
|
+
compareType: j.Equal,
|
|
512
512
|
info: {}
|
|
513
513
|
};
|
|
514
|
-
const e =
|
|
515
|
-
return
|
|
516
|
-
type:
|
|
514
|
+
const e = t.filterInfo, { conditionType: n, compareType: r } = e;
|
|
515
|
+
return n === B.Date ? r === l.Between || r === l.NotBetween ? {
|
|
516
|
+
type: n,
|
|
517
517
|
compare: r,
|
|
518
518
|
info: {
|
|
519
519
|
dateRange: e.expectedValue
|
|
520
520
|
}
|
|
521
521
|
} : 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 ? {
|
|
522
|
-
type:
|
|
522
|
+
type: n,
|
|
523
523
|
compare: r,
|
|
524
524
|
info: {}
|
|
525
|
-
} :
|
|
526
|
-
type:
|
|
525
|
+
} : Nt.has(r) ? {
|
|
526
|
+
type: n,
|
|
527
527
|
compare: r,
|
|
528
528
|
info: {
|
|
529
529
|
date: e.expectedValue
|
|
530
530
|
}
|
|
531
531
|
} : (/* @__PURE__ */ new Set([l.Q1, l.Q2, l.Q3, l.Q4])).has(r) ? {
|
|
532
|
-
type:
|
|
532
|
+
type: n,
|
|
533
533
|
compare: l.Quarter,
|
|
534
534
|
info: {
|
|
535
535
|
dateSelect: e.compareType
|
|
536
536
|
}
|
|
537
537
|
} : {
|
|
538
|
-
type:
|
|
538
|
+
type: n,
|
|
539
539
|
compare: l.Month,
|
|
540
540
|
info: {
|
|
541
541
|
dateSelect: e.compareType
|
|
542
542
|
}
|
|
543
|
-
} :
|
|
544
|
-
type:
|
|
543
|
+
} : n === B.Number ? r === $.Between || r === $.NotBetween ? {
|
|
544
|
+
type: n,
|
|
545
545
|
compare: r,
|
|
546
546
|
info: {
|
|
547
547
|
numberRange: e.expectedValue
|
|
548
548
|
}
|
|
549
549
|
} : {
|
|
550
|
-
type:
|
|
550
|
+
type: n,
|
|
551
551
|
compare: r,
|
|
552
552
|
info: {
|
|
553
553
|
number: e.expectedValue
|
|
554
554
|
}
|
|
555
|
-
} :
|
|
556
|
-
type:
|
|
555
|
+
} : n === B.String ? {
|
|
556
|
+
type: n,
|
|
557
557
|
compare: r,
|
|
558
558
|
info: {
|
|
559
559
|
string: e.expectedValue
|
|
560
560
|
}
|
|
561
561
|
} : {
|
|
562
|
-
type:
|
|
563
|
-
compare:
|
|
562
|
+
type: B.String,
|
|
563
|
+
compare: j.Equal,
|
|
564
564
|
info: {}
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
const
|
|
568
|
-
var S, T,
|
|
569
|
-
const { conditionInfo: e, onChange:
|
|
570
|
-
|
|
571
|
-
type:
|
|
567
|
+
const ci = (t) => {
|
|
568
|
+
var S, T, k, f, N, y, D;
|
|
569
|
+
const { conditionInfo: e, onChange: n } = t, r = M(oe), [i, a] = q(!1), s = M(Oe), c = ai(s), d = (v, p, L) => {
|
|
570
|
+
n({
|
|
571
|
+
type: p != null ? p : e.type,
|
|
572
572
|
compare: L != null ? L : e.compare,
|
|
573
573
|
info: v
|
|
574
574
|
});
|
|
575
575
|
}, h = (v) => {
|
|
576
576
|
var C;
|
|
577
|
-
const
|
|
577
|
+
const p = v[0], L = v[1];
|
|
578
578
|
L && a(!1);
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
}, u =
|
|
579
|
+
const R = {};
|
|
580
|
+
p === B.Date ? L === l.Quarter ? R.dateSelect = l.Q1 : L === l.Month ? R.dateSelect = l.M1 : Nt.has(L) ? R.date = /* @__PURE__ */ new Date() : R.dateRange = [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()] : p === B.Number ? R.number = 0 : p === B.String && (R.string = ""), d(R, v[0], (C = v[1]) != null ? C : j.Equal);
|
|
581
|
+
}, u = li(e.type, e.compare);
|
|
582
582
|
let g = "";
|
|
583
583
|
e.compare ? g = `${r.t(`sheets-table.condition.${e.type}`)} - ${r.t(`sheets-table.${e.type}.compare.${e.compare}`)}` : g = r.t(`sheets-table.condition.${e.type}`);
|
|
584
|
-
const _ =
|
|
585
|
-
return /* @__PURE__ */
|
|
584
|
+
const _ = si(s, e.compare);
|
|
585
|
+
return /* @__PURE__ */ I("div", { children: [
|
|
586
586
|
/* @__PURE__ */ o(
|
|
587
|
-
|
|
587
|
+
Le,
|
|
588
588
|
{
|
|
589
589
|
align: "start",
|
|
590
590
|
open: i,
|
|
591
591
|
onOpenChange: a,
|
|
592
592
|
overlay: /* @__PURE__ */ o(
|
|
593
|
-
|
|
593
|
+
Ir,
|
|
594
594
|
{
|
|
595
595
|
value: [e.type, e.compare],
|
|
596
596
|
options: c,
|
|
@@ -599,21 +599,21 @@ const ai = (n) => {
|
|
|
599
599
|
wrapperClassName: "!univer-h-[150px]"
|
|
600
600
|
}
|
|
601
601
|
),
|
|
602
|
-
children: /* @__PURE__ */
|
|
602
|
+
children: /* @__PURE__ */ I(
|
|
603
603
|
"div",
|
|
604
604
|
{
|
|
605
|
-
className:
|
|
605
|
+
className: O("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 dark:!univer-bg-gray-700 dark:!univer-text-white focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 hover:univer-border-primary-600", F),
|
|
606
606
|
children: [
|
|
607
607
|
/* @__PURE__ */ o("span", { children: g }),
|
|
608
|
-
/* @__PURE__ */ o(
|
|
608
|
+
/* @__PURE__ */ o(xt, {})
|
|
609
609
|
]
|
|
610
610
|
}
|
|
611
611
|
)
|
|
612
612
|
}
|
|
613
613
|
),
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
u ===
|
|
616
|
-
|
|
614
|
+
/* @__PURE__ */ I("div", { className: "univer-mt-3 univer-w-full", children: [
|
|
615
|
+
u === Z.Input && /* @__PURE__ */ o(Rt, { children: e.type === B.String ? /* @__PURE__ */ o(
|
|
616
|
+
Mt,
|
|
617
617
|
{
|
|
618
618
|
className: "univer-w-full",
|
|
619
619
|
placeholder: "请输入",
|
|
@@ -621,7 +621,7 @@ const ai = (n) => {
|
|
|
621
621
|
onChange: (v) => d({ string: v })
|
|
622
622
|
}
|
|
623
623
|
) : /* @__PURE__ */ o(
|
|
624
|
-
|
|
624
|
+
bt,
|
|
625
625
|
{
|
|
626
626
|
className: "univer-h-7 univer-w-full",
|
|
627
627
|
value: e.info.number,
|
|
@@ -631,114 +631,114 @@ const ai = (n) => {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
) }),
|
|
634
|
-
u ===
|
|
635
|
-
|
|
634
|
+
u === Z.DatePicker && /* @__PURE__ */ o("div", { id: "univer-table-date-picker-wrapper", children: /* @__PURE__ */ o(
|
|
635
|
+
yr,
|
|
636
636
|
{
|
|
637
|
-
value:
|
|
638
|
-
defaultPickerValue:
|
|
637
|
+
value: de(e.info.date),
|
|
638
|
+
defaultPickerValue: de(),
|
|
639
639
|
onChange: (v) => d({ date: v.toDate() }),
|
|
640
640
|
getPopupContainer: () => document.getElementById("univer-table-date-picker-wrapper") || document.body,
|
|
641
641
|
className: "univer-w-full",
|
|
642
642
|
allowClear: !1
|
|
643
643
|
}
|
|
644
644
|
) }),
|
|
645
|
-
u ===
|
|
646
|
-
|
|
645
|
+
u === Z.DateRange && /* @__PURE__ */ o("div", { id: "univer-table-date-range-wrapper", children: /* @__PURE__ */ o(
|
|
646
|
+
Rr,
|
|
647
647
|
{
|
|
648
|
-
value: [(T =
|
|
649
|
-
defaultPickerValue: [
|
|
648
|
+
value: [(T = de((S = e.info.dateRange) == null ? void 0 : S[0])) != null ? T : de(), (f = de((k = e.info.dateRange) == null ? void 0 : k[1])) != null ? f : de()],
|
|
649
|
+
defaultPickerValue: [de(), de()],
|
|
650
650
|
onChange: (v) => {
|
|
651
|
-
d(v ? { dateRange: v.map((
|
|
651
|
+
d(v ? { dateRange: v.map((p) => p == null ? void 0 : p.toDate()) } : {});
|
|
652
652
|
},
|
|
653
653
|
getPopupContainer: () => document.getElementById("univer-table-date-range-wrapper") || document.body,
|
|
654
654
|
classNames: { popup: "univer-w-[400px]" },
|
|
655
655
|
allowClear: !1
|
|
656
656
|
}
|
|
657
657
|
) }),
|
|
658
|
-
u ===
|
|
658
|
+
u === Z.Inputs && /* @__PURE__ */ I("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
|
|
659
659
|
/* @__PURE__ */ o(
|
|
660
|
-
|
|
660
|
+
bt,
|
|
661
661
|
{
|
|
662
662
|
className: "univer-w-full",
|
|
663
|
-
value: (
|
|
663
|
+
value: (N = e.info.numberRange) == null ? void 0 : N[0],
|
|
664
664
|
onChange: (v) => {
|
|
665
|
-
var
|
|
666
|
-
v !== null && d({ numberRange: [v, (
|
|
665
|
+
var p;
|
|
666
|
+
v !== null && d({ numberRange: [v, (p = e.info.numberRange) == null ? void 0 : p[1]] });
|
|
667
667
|
},
|
|
668
668
|
controls: !1
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
671
|
/* @__PURE__ */ o("span", { children: " - " }),
|
|
672
672
|
/* @__PURE__ */ o(
|
|
673
|
-
|
|
673
|
+
bt,
|
|
674
674
|
{
|
|
675
675
|
className: "univer-w-full",
|
|
676
676
|
value: (y = e.info.numberRange) == null ? void 0 : y[1],
|
|
677
677
|
controls: !1,
|
|
678
678
|
onChange: (v) => {
|
|
679
|
-
var
|
|
680
|
-
v !== null && d({ numberRange: [(
|
|
679
|
+
var p;
|
|
680
|
+
v !== null && d({ numberRange: [(p = e.info.numberRange) == null ? void 0 : p[0], v] });
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
)
|
|
684
684
|
] }),
|
|
685
|
-
u ===
|
|
686
|
-
|
|
685
|
+
u === Z.Select && /* @__PURE__ */ o(
|
|
686
|
+
Mr,
|
|
687
687
|
{
|
|
688
688
|
className: "univer-w-full",
|
|
689
|
-
value: (
|
|
689
|
+
value: (D = e.info.dateSelect) != null ? D : _[0].value,
|
|
690
690
|
options: _,
|
|
691
691
|
onChange: (v) => d({ dateSelect: v })
|
|
692
692
|
}
|
|
693
693
|
)
|
|
694
694
|
] })
|
|
695
695
|
] });
|
|
696
|
-
},
|
|
696
|
+
}, ui = (t) => {
|
|
697
697
|
let e = 0;
|
|
698
|
-
return
|
|
699
|
-
e +=
|
|
698
|
+
return t.forEach((n) => {
|
|
699
|
+
e += n;
|
|
700
700
|
}), e;
|
|
701
701
|
};
|
|
702
|
-
function
|
|
703
|
-
const { unitId: e, tableId:
|
|
702
|
+
function di(t) {
|
|
703
|
+
const { unitId: e, tableId: n, subUnitId: r, columnIndex: i, checkedItemSet: a, setCheckedItemSet: s, tableFilter: c } = t, d = M(oe), h = M($e), { data: u, itemsCountMap: g, allItemsCount: _ } = h.getTableFilterItems(e, r, n, i), [S, T] = q(c === void 0 ? !0 : a.size === g.size), [k, f] = q(S ? _ : ui(g)), N = !S && a.size > 0, [y, D] = q(""), v = dn(() => y ? u.filter((C) => String(C.title).toLowerCase().includes(y.toLowerCase())) : u, [y, u]), p = Vt(() => {
|
|
704
704
|
S ? (a.clear(), s(new Set(a)), T(!1)) : (v.forEach((C) => {
|
|
705
705
|
a.add(C.title);
|
|
706
706
|
}), s(new Set(a)), T(!0));
|
|
707
|
-
}, [S]), L =
|
|
708
|
-
C === "" ? (T(!0), u.forEach((
|
|
709
|
-
a.add(
|
|
710
|
-
}),
|
|
711
|
-
}, []),
|
|
707
|
+
}, [S]), L = Vt((C) => {
|
|
708
|
+
C === "" ? (T(!0), u.forEach((H) => {
|
|
709
|
+
a.add(H.title);
|
|
710
|
+
}), f(_)) : (a.clear(), T(!1), f(0)), D(C);
|
|
711
|
+
}, []), R = (C) => {
|
|
712
712
|
if (S) {
|
|
713
713
|
T(!1);
|
|
714
|
-
const
|
|
715
|
-
for (const { title:
|
|
716
|
-
C !==
|
|
717
|
-
|
|
714
|
+
const H = /* @__PURE__ */ new Set();
|
|
715
|
+
for (const { title: E } of u)
|
|
716
|
+
C !== E && H.add(E);
|
|
717
|
+
f(_ - g.get(C)), s(H);
|
|
718
718
|
} else
|
|
719
|
-
a.has(C) ? (a.delete(C),
|
|
719
|
+
a.has(C) ? (a.delete(C), f(k - g.get(C))) : (a.add(C), f(k + g.get(C))), s(new Set(a));
|
|
720
720
|
};
|
|
721
|
-
return /* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */ o(
|
|
721
|
+
return /* @__PURE__ */ I("div", { className: "univer-flex univer-h-full univer-flex-col", children: [
|
|
722
|
+
/* @__PURE__ */ o(Mt, { autoFocus: !0, value: y, placeholder: d.t("sheets-filter.panel.search-placeholder"), onChange: L }),
|
|
723
723
|
/* @__PURE__ */ o(
|
|
724
724
|
"div",
|
|
725
725
|
{
|
|
726
|
-
className:
|
|
726
|
+
className: O("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", F),
|
|
727
727
|
children: /* @__PURE__ */ o(
|
|
728
728
|
"div",
|
|
729
729
|
{
|
|
730
|
-
className:
|
|
731
|
-
children: /* @__PURE__ */
|
|
730
|
+
className: O("univer-h-40 univer-overflow-y-auto univer-py-1 univer-pl-2", xr),
|
|
731
|
+
children: /* @__PURE__ */ I("div", { className: "univer-h-full", children: [
|
|
732
732
|
/* @__PURE__ */ o("div", { className: "univer-flex univer-items-center univer-px-2 univer-py-1", children: /* @__PURE__ */ o(
|
|
733
|
-
|
|
733
|
+
Dt,
|
|
734
734
|
{
|
|
735
|
-
indeterminate:
|
|
735
|
+
indeterminate: N,
|
|
736
736
|
disabled: u.length === 0,
|
|
737
737
|
checked: S,
|
|
738
|
-
onChange:
|
|
739
|
-
children: /* @__PURE__ */
|
|
738
|
+
onChange: p,
|
|
739
|
+
children: /* @__PURE__ */ I("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-items-center univer-text-sm", children: [
|
|
740
740
|
/* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: `${d.t("sheets-filter.panel.select-all")}` }),
|
|
741
|
-
/* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${
|
|
741
|
+
/* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${k}/${y ? v.length : _})` })
|
|
742
742
|
] })
|
|
743
743
|
}
|
|
744
744
|
) }),
|
|
@@ -747,13 +747,13 @@ function li(n) {
|
|
|
747
747
|
{
|
|
748
748
|
className: "univer-flex univer-items-center univer-px-2 univer-py-1",
|
|
749
749
|
children: /* @__PURE__ */ o(
|
|
750
|
-
|
|
750
|
+
Dt,
|
|
751
751
|
{
|
|
752
752
|
checked: S || a.has(C.title),
|
|
753
753
|
onChange: () => {
|
|
754
|
-
|
|
754
|
+
R(C.title);
|
|
755
755
|
},
|
|
756
|
-
children: /* @__PURE__ */
|
|
756
|
+
children: /* @__PURE__ */ I("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-text-sm", children: [
|
|
757
757
|
/* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: C.title }),
|
|
758
758
|
/* @__PURE__ */ o("span", { className: "univer-ml-1 univer-text-gray-400", children: `(${g.get(C.title) || 0})` })
|
|
759
759
|
] })
|
|
@@ -769,131 +769,131 @@ function li(n) {
|
|
|
769
769
|
)
|
|
770
770
|
] });
|
|
771
771
|
}
|
|
772
|
-
function
|
|
773
|
-
var
|
|
774
|
-
const
|
|
772
|
+
function hi() {
|
|
773
|
+
var ue;
|
|
774
|
+
const t = M(oe), e = vi(t), n = M($e), r = M(ne), i = M(le), a = M(qt), s = M(ke), c = s.getCurrentTableFilterInfo(), d = n.getTableFilterPanelInitProps(c.unitId, c.subUnitId, c.tableId, c.column), { unitId: h, subUnitId: u, tableId: g, tableFilter: _, currentFilterBy: S, columnIndex: T } = d, { data: k } = n.getTableFilterItems(h, u, g, T), f = n.getTableFilterCheckedItems(h, g, T), [N, y] = q(new Set(f)), [D, v] = q(S || pe.Items), [p, L] = q(() => {
|
|
775
775
|
const b = d.tableFilter;
|
|
776
|
-
return
|
|
777
|
-
}),
|
|
778
|
-
if (!
|
|
779
|
-
const C =
|
|
780
|
-
|
|
781
|
-
const
|
|
776
|
+
return oi(b);
|
|
777
|
+
}), R = r.getTable(h, g);
|
|
778
|
+
if (!R) return null;
|
|
779
|
+
const C = R.getTableFilters(), H = C.getSortState();
|
|
780
|
+
H.columnIndex === T && (H.sortState, Ge.Asc), H.columnIndex === T && (H.sortState, Ge.Desc);
|
|
781
|
+
const E = () => {
|
|
782
782
|
s.closeFilterPanel();
|
|
783
783
|
}, Q = () => {
|
|
784
|
-
|
|
784
|
+
E();
|
|
785
785
|
}, U = (b) => {
|
|
786
|
-
const
|
|
787
|
-
i.executeCommand(
|
|
786
|
+
const P = R.getTableFilterRange();
|
|
787
|
+
i.executeCommand(Dr.id, {
|
|
788
788
|
unitId: h,
|
|
789
789
|
subUnitId: u,
|
|
790
|
-
range:
|
|
791
|
-
orderRules: [{ colIndex: T +
|
|
790
|
+
range: P,
|
|
791
|
+
orderRules: [{ colIndex: T + P.startColumn, type: b ? Ht.ASC : Ht.DESC }],
|
|
792
792
|
hasTitle: !1
|
|
793
|
-
}), C.setSortState(T, b ?
|
|
793
|
+
}), C.setSortState(T, b ? Ge.Asc : Ge.Desc), E();
|
|
794
794
|
}, ee = () => {
|
|
795
|
-
if (
|
|
795
|
+
if (D === pe.Items) {
|
|
796
796
|
const b = [];
|
|
797
|
-
for (const
|
|
798
|
-
|
|
799
|
-
const
|
|
800
|
-
if (
|
|
801
|
-
if (
|
|
802
|
-
|
|
797
|
+
for (const Y of k)
|
|
798
|
+
N.has(Y.title) && b.push(Y.title);
|
|
799
|
+
const P = R.getTableFilterColumn(T);
|
|
800
|
+
if (P) {
|
|
801
|
+
if (P.values.join(",") === b.join(",")) {
|
|
802
|
+
E();
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
805
|
} else if (b.length === 0) {
|
|
806
|
-
|
|
806
|
+
E();
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
|
-
const
|
|
810
|
-
filterType:
|
|
809
|
+
const V = {
|
|
810
|
+
filterType: kt.manual,
|
|
811
811
|
values: b
|
|
812
812
|
};
|
|
813
|
-
|
|
813
|
+
n.setTableFilter(h, g, T, V);
|
|
814
814
|
} else {
|
|
815
815
|
let b;
|
|
816
|
-
|
|
817
|
-
conditionType:
|
|
818
|
-
compareType: Object.values(
|
|
816
|
+
p.compare === l.Quarter || p.compare === l.Month ? b = {
|
|
817
|
+
conditionType: p.type,
|
|
818
|
+
compareType: Object.values(p.info)[0]
|
|
819
819
|
} : b = {
|
|
820
|
-
conditionType:
|
|
821
|
-
compareType:
|
|
822
|
-
expectedValue: Object.values(
|
|
820
|
+
conditionType: p.type,
|
|
821
|
+
compareType: p.compare,
|
|
822
|
+
expectedValue: Object.values(p.info)[0]
|
|
823
823
|
};
|
|
824
|
-
const
|
|
825
|
-
filterType:
|
|
824
|
+
const P = {
|
|
825
|
+
filterType: kt.condition,
|
|
826
826
|
// @ts-ignore
|
|
827
827
|
filterInfo: b
|
|
828
828
|
};
|
|
829
|
-
|
|
829
|
+
n.setTableFilter(h, g, T, P);
|
|
830
830
|
}
|
|
831
|
-
|
|
832
|
-
},
|
|
833
|
-
|
|
834
|
-
},
|
|
835
|
-
return /* @__PURE__ */
|
|
831
|
+
E();
|
|
832
|
+
}, Me = () => {
|
|
833
|
+
n.setTableFilter(h, g, T, void 0), E();
|
|
834
|
+
}, ce = new sn(h).id, Ce = (ue = a.getPermissionPoint(ce)) == null ? void 0 : ue.value;
|
|
835
|
+
return /* @__PURE__ */ I(
|
|
836
836
|
"div",
|
|
837
837
|
{
|
|
838
|
-
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
|
|
838
|
+
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",
|
|
839
839
|
children: [
|
|
840
|
-
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */ o(
|
|
843
|
-
|
|
840
|
+
Ce && /* @__PURE__ */ o("div", { className: "univer-mb-3 univer-flex", children: /* @__PURE__ */ I(Nr, { className: "univer-mb-3 univer-w-full", children: [
|
|
841
|
+
/* @__PURE__ */ I(Te, { className: "univer-w-1/2", onClick: () => U(!0), children: [
|
|
842
|
+
/* @__PURE__ */ o(mn, { className: "univer-mr-1" }),
|
|
843
|
+
t.t("sheets-sort.general.sort-asc")
|
|
844
844
|
] }),
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */ o(
|
|
847
|
-
|
|
845
|
+
/* @__PURE__ */ I(Te, { className: "univer-w-1/2", onClick: () => U(!1), children: [
|
|
846
|
+
/* @__PURE__ */ o(fn, { className: "univer-mr-1" }),
|
|
847
|
+
t.t("sheets-sort.general.sort-desc")
|
|
848
848
|
] })
|
|
849
849
|
] }) }),
|
|
850
850
|
/* @__PURE__ */ o("div", { className: "univer-w-full", children: /* @__PURE__ */ o(
|
|
851
|
-
|
|
851
|
+
Er,
|
|
852
852
|
{
|
|
853
|
-
value:
|
|
853
|
+
value: D,
|
|
854
854
|
items: e,
|
|
855
855
|
onChange: (b) => v(b)
|
|
856
856
|
}
|
|
857
857
|
) }),
|
|
858
|
-
/* @__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:
|
|
859
|
-
|
|
858
|
+
/* @__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: D === pe.Items ? /* @__PURE__ */ o(
|
|
859
|
+
di,
|
|
860
860
|
{
|
|
861
861
|
tableFilter: _,
|
|
862
862
|
unitId: h,
|
|
863
863
|
subUnitId: u,
|
|
864
864
|
tableId: g,
|
|
865
865
|
columnIndex: T,
|
|
866
|
-
checkedItemSet:
|
|
866
|
+
checkedItemSet: N,
|
|
867
867
|
setCheckedItemSet: y
|
|
868
868
|
}
|
|
869
869
|
) : /* @__PURE__ */ o(
|
|
870
|
-
|
|
870
|
+
ci,
|
|
871
871
|
{
|
|
872
872
|
tableFilter: _,
|
|
873
873
|
unitId: h,
|
|
874
874
|
subUnitId: u,
|
|
875
875
|
tableId: g,
|
|
876
876
|
columnIndex: T,
|
|
877
|
-
conditionInfo:
|
|
877
|
+
conditionInfo: p,
|
|
878
878
|
onChange: L
|
|
879
879
|
}
|
|
880
880
|
) }) }),
|
|
881
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ I(
|
|
882
882
|
"div",
|
|
883
883
|
{
|
|
884
884
|
className: "univer-mt-4 univer-inline-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-wrap-nowrap univer-justify-between univer-overflow-hidden",
|
|
885
885
|
children: [
|
|
886
886
|
/* @__PURE__ */ o(
|
|
887
|
-
|
|
887
|
+
Te,
|
|
888
888
|
{
|
|
889
889
|
disabled: _ === void 0,
|
|
890
|
-
onClick:
|
|
891
|
-
children:
|
|
890
|
+
onClick: Me,
|
|
891
|
+
children: t.t("sheets-filter.panel.clear-filter")
|
|
892
892
|
}
|
|
893
893
|
),
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */ o(
|
|
896
|
-
/* @__PURE__ */ o(
|
|
894
|
+
/* @__PURE__ */ I("div", { children: [
|
|
895
|
+
/* @__PURE__ */ o(Te, { className: "univer-mr-2", onClick: Q, children: t.t("sheets-filter.panel.cancel") }),
|
|
896
|
+
/* @__PURE__ */ o(Te, { variant: "primary", onClick: ee, children: t.t("sheets-filter.panel.confirm") })
|
|
897
897
|
] })
|
|
898
898
|
]
|
|
899
899
|
}
|
|
@@ -902,24 +902,24 @@ function oi() {
|
|
|
902
902
|
}
|
|
903
903
|
);
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
const e =
|
|
907
|
-
return
|
|
908
|
-
{ label:
|
|
909
|
-
{ label:
|
|
910
|
-
], [e,
|
|
905
|
+
function vi(t) {
|
|
906
|
+
const e = t.getCurrentLocale();
|
|
907
|
+
return dn(() => [
|
|
908
|
+
{ label: t.t("sheets-filter.panel.by-values"), value: pe.Items },
|
|
909
|
+
{ label: t.t("sheets-filter.panel.by-conditions"), value: pe.Condition }
|
|
910
|
+
], [e, t]);
|
|
911
911
|
}
|
|
912
|
-
var
|
|
913
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
914
|
-
(s =
|
|
912
|
+
var gi = Object.getOwnPropertyDescriptor, bi = (t, e, n, r) => {
|
|
913
|
+
for (var i = r > 1 ? void 0 : r ? gi(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
914
|
+
(s = t[a]) && (i = s(i) || i);
|
|
915
915
|
return i;
|
|
916
|
-
},
|
|
917
|
-
let
|
|
918
|
-
constructor(e,
|
|
916
|
+
}, Je = (t, e) => (n, r) => e(n, r, t);
|
|
917
|
+
let ke = class extends Pe {
|
|
918
|
+
constructor(e, n, r, i) {
|
|
919
919
|
super();
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
this._componentManager = e, this._contextService =
|
|
920
|
+
A(this, "_popupDisposable");
|
|
921
|
+
A(this, "_currentTableFilterInfo", null);
|
|
922
|
+
this._componentManager = e, this._contextService = n, this._sheetCanvasPopupService = r, this._dialogService = i, this._initComponents(), this._initUIPopup();
|
|
923
923
|
}
|
|
924
924
|
setCurrentTableFilterInfo(e) {
|
|
925
925
|
this._currentTableFilterInfo = e;
|
|
@@ -932,29 +932,29 @@ let Fe = class extends He {
|
|
|
932
932
|
}
|
|
933
933
|
_initComponents() {
|
|
934
934
|
[
|
|
935
|
-
[
|
|
936
|
-
].forEach(([e,
|
|
937
|
-
this.disposeWithMe(this._componentManager.register(e,
|
|
935
|
+
[ge, hi]
|
|
936
|
+
].forEach(([e, n]) => {
|
|
937
|
+
this.disposeWithMe(this._componentManager.register(e, n));
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
_initUIPopup() {
|
|
941
|
-
this.disposeWithMe(this._contextService.subscribeContextValue$(
|
|
941
|
+
this.disposeWithMe(this._contextService.subscribeContextValue$(ge).pipe(an(void 0), fr()).subscribe((e) => {
|
|
942
942
|
e ? this._openFilterPopup() : e === !1 && this._closeFilterPopup();
|
|
943
943
|
}));
|
|
944
944
|
}
|
|
945
945
|
closeFilterPanel() {
|
|
946
|
-
this._contextService.setContextValue(
|
|
946
|
+
this._contextService.setContextValue(ge, !1);
|
|
947
947
|
}
|
|
948
948
|
_openFilterPopup() {
|
|
949
949
|
const e = this._currentTableFilterInfo;
|
|
950
950
|
if (!e)
|
|
951
951
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
952
|
-
const { row:
|
|
953
|
-
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(
|
|
954
|
-
componentKey:
|
|
952
|
+
const { row: n, column: r } = e;
|
|
953
|
+
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, r, {
|
|
954
|
+
componentKey: ge,
|
|
955
955
|
direction: "horizontal",
|
|
956
956
|
onClickOutside: () => {
|
|
957
|
-
this._dialogService.close(
|
|
957
|
+
this._dialogService.close(Ar), this._contextService.setContextValue(ge, !1);
|
|
958
958
|
},
|
|
959
959
|
offset: [5, 0]
|
|
960
960
|
});
|
|
@@ -964,50 +964,50 @@ let Fe = class extends He {
|
|
|
964
964
|
(e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null, this.clearCurrentTableFilterInfo();
|
|
965
965
|
}
|
|
966
966
|
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
],
|
|
973
|
-
const
|
|
974
|
-
type:
|
|
967
|
+
ke = bi([
|
|
968
|
+
Je(0, x(nn)),
|
|
969
|
+
Je(1, It),
|
|
970
|
+
Je(2, x(nr)),
|
|
971
|
+
Je(3, x(rn))
|
|
972
|
+
], ke);
|
|
973
|
+
const St = {
|
|
974
|
+
type: Yt.OPERATION,
|
|
975
975
|
id: "sheet.operation.open-table-filter-panel",
|
|
976
|
-
async handler(
|
|
976
|
+
async handler(t, e) {
|
|
977
977
|
if (!e)
|
|
978
978
|
return !1;
|
|
979
|
-
const { row:
|
|
980
|
-
return c.getTable(i, s) ? (d.getContextValue(
|
|
979
|
+
const { row: n, col: r, unitId: i, subUnitId: a, tableId: s } = e, c = t.get(ne), d = t.get(It), h = t.get(ke);
|
|
980
|
+
return c.getTable(i, s) ? (d.getContextValue(ge) || (h.setCurrentTableFilterInfo({ unitId: i, subUnitId: a, row: n, tableId: s, column: r }), d.setContextValue(ge, !0)), !0) : !1;
|
|
981
981
|
}
|
|
982
|
-
},
|
|
983
|
-
type:
|
|
982
|
+
}, Et = {
|
|
983
|
+
type: Yt.OPERATION,
|
|
984
984
|
id: "sheet.operation.open-table-selector",
|
|
985
|
-
async handler(
|
|
985
|
+
async handler(t) {
|
|
986
986
|
var S;
|
|
987
|
-
const e =
|
|
987
|
+
const e = t.get(fe), n = t.get(le), r = ut(e);
|
|
988
988
|
if (!r)
|
|
989
989
|
return !1;
|
|
990
|
-
const { unitId: i, subUnitId: a, worksheet: s } = r, d =
|
|
991
|
-
return _ ? (
|
|
990
|
+
const { unitId: i, subUnitId: a, worksheet: s } = r, d = t.get(dt).getCurrentLastSelection(), h = (S = d == null ? void 0 : d.range) != null ? S : { startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }, g = $r(d) ? kr(h, { up: !0, left: !0, right: !0, down: !0 }, s) : h, _ = await wn(t, i, a, g);
|
|
991
|
+
return _ ? (n.executeCommand(Gn.id, { ..._ }), !0) : !1;
|
|
992
992
|
}
|
|
993
993
|
};
|
|
994
|
-
async function
|
|
995
|
-
const a =
|
|
994
|
+
async function wn(t, e, n, r, i) {
|
|
995
|
+
const a = t.get(rn), s = t.get(oe);
|
|
996
996
|
return new Promise((c) => {
|
|
997
997
|
const d = {
|
|
998
998
|
unitId: e,
|
|
999
|
-
subUnitId:
|
|
999
|
+
subUnitId: n,
|
|
1000
1000
|
range: r,
|
|
1001
1001
|
tableId: i,
|
|
1002
1002
|
onConfirm: (h) => {
|
|
1003
|
-
c(h), a.close(
|
|
1003
|
+
c(h), a.close(Ee);
|
|
1004
1004
|
},
|
|
1005
1005
|
onCancel: () => {
|
|
1006
|
-
c(null), a.close(
|
|
1006
|
+
c(null), a.close(Ee);
|
|
1007
1007
|
}
|
|
1008
1008
|
};
|
|
1009
1009
|
a.open({
|
|
1010
|
-
id:
|
|
1010
|
+
id: Ee,
|
|
1011
1011
|
title: { title: s.t("sheets-table.selectRange") },
|
|
1012
1012
|
draggable: !0,
|
|
1013
1013
|
destroyOnClose: !0,
|
|
@@ -1015,257 +1015,251 @@ async function Sn(n, e, t, r, i) {
|
|
|
1015
1015
|
maskClosable: !1,
|
|
1016
1016
|
children: {
|
|
1017
1017
|
label: {
|
|
1018
|
-
name:
|
|
1018
|
+
name: Ee,
|
|
1019
1019
|
props: d
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
1022
|
width: 300,
|
|
1023
1023
|
onClose: () => {
|
|
1024
|
-
c(null), a.close(
|
|
1024
|
+
c(null), a.close(Ee);
|
|
1025
1025
|
}
|
|
1026
1026
|
});
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1029
|
+
const In = "sheets-table-ui.config", Ut = {
|
|
1030
1030
|
anchorHeight: 24,
|
|
1031
1031
|
anchorBackgroundColor: "rgb(134,139,156)"
|
|
1032
1032
|
};
|
|
1033
|
-
var
|
|
1034
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1035
|
-
(s =
|
|
1033
|
+
var mi = Object.getOwnPropertyDescriptor, pi = (t, e, n, r) => {
|
|
1034
|
+
for (var i = r > 1 ? void 0 : r ? mi(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
1035
|
+
(s = t[a]) && (i = s(i) || i);
|
|
1036
1036
|
return i;
|
|
1037
|
-
},
|
|
1038
|
-
let
|
|
1037
|
+
}, fi = (t, e) => (n, r) => e(n, r, t);
|
|
1038
|
+
let ye = class extends Pe {
|
|
1039
1039
|
constructor(e) {
|
|
1040
1040
|
super();
|
|
1041
|
-
|
|
1042
|
-
|
|
1041
|
+
A(this, "_refreshTable", new Cr());
|
|
1042
|
+
A(this, "refreshTable$", this._refreshTable.asObservable());
|
|
1043
1043
|
this._commandService = e, this._initListener();
|
|
1044
1044
|
}
|
|
1045
1045
|
_initListener() {
|
|
1046
1046
|
this.disposeWithMe(
|
|
1047
1047
|
this._commandService.onCommandExecuted((e) => {
|
|
1048
|
-
if (e.id ===
|
|
1049
|
-
const
|
|
1050
|
-
r.startsWith(
|
|
1048
|
+
if (e.id === ln.id) {
|
|
1049
|
+
const n = e.params, { styleName: r } = n;
|
|
1050
|
+
r.startsWith(Xn) && this._refreshTable.next(Math.random());
|
|
1051
1051
|
}
|
|
1052
1052
|
})
|
|
1053
1053
|
);
|
|
1054
1054
|
}
|
|
1055
1055
|
};
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
],
|
|
1059
|
-
const
|
|
1060
|
-
var
|
|
1061
|
-
const [
|
|
1062
|
-
s((
|
|
1063
|
-
...
|
|
1064
|
-
[b]:
|
|
1056
|
+
ye = pi([
|
|
1057
|
+
fi(0, x(le))
|
|
1058
|
+
], ye);
|
|
1059
|
+
const Ci = () => {
|
|
1060
|
+
var Ce, ue;
|
|
1061
|
+
const [t, e] = q(""), [n, r] = q(""), i = M(ur), [a, s] = q({}), c = M(Oe), d = M(it), h = we(d.anchorPosition$), u = M(le), g = M(fe), _ = M(on), S = we(_.unitPermissionInitStateChange$, !1), T = M(ne), k = M(cn), f = M(ye), N = we(f.refreshTable$), y = M(oe), D = M(dt), v = we(D.selectionChanged$, [{ range: Zt(0, 0), primary: null }]), [, p] = q(Math.random()), R = M(Qt).getConfig(In), C = (Ce = R == null ? void 0 : R.anchorHeight) != null ? Ce : 24, H = (ue = R == null ? void 0 : R.anchorBackgroundColor) != null ? ue : "rgb(53,91,183)", E = (b, P) => {
|
|
1062
|
+
s((V) => ({
|
|
1063
|
+
...V,
|
|
1064
|
+
[b]: P
|
|
1065
1065
|
}));
|
|
1066
1066
|
};
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
1069
|
-
}, [
|
|
1067
|
+
if (hn(() => {
|
|
1068
|
+
p(Math.random());
|
|
1069
|
+
}, [N]), !(h != null && h.length))
|
|
1070
1070
|
return null;
|
|
1071
|
-
const Q =
|
|
1071
|
+
const Q = ut(g);
|
|
1072
1072
|
if (!Q) return null;
|
|
1073
|
-
const { unitId: U, subUnitId: ee } = Q,
|
|
1074
|
-
var
|
|
1075
|
-
if (((
|
|
1073
|
+
const { unitId: U, subUnitId: ee } = Q, Me = (b, P) => {
|
|
1074
|
+
var Y;
|
|
1075
|
+
if (((Y = T.getTableById(U, b)) == null ? void 0 : Y.getDisplayName()) === P) {
|
|
1076
1076
|
e(""), r("");
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
u.executeCommand(
|
|
1079
|
+
u.executeCommand(Ct.id, {
|
|
1080
1080
|
tableId: b,
|
|
1081
1081
|
unitId: U,
|
|
1082
|
-
name:
|
|
1082
|
+
name: P
|
|
1083
1083
|
}), r(""), e("");
|
|
1084
|
-
},
|
|
1085
|
-
const
|
|
1086
|
-
if (!
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1084
|
+
}, ce = async (b) => {
|
|
1085
|
+
const P = T.getTableById(U, b);
|
|
1086
|
+
if (!P) return;
|
|
1087
|
+
const V = P.getRange(), Y = await wn(c, U, ee, V, b);
|
|
1088
|
+
Y && u.executeCommand(Ct.id, {
|
|
1089
1089
|
tableId: b,
|
|
1090
1090
|
unitId: U,
|
|
1091
1091
|
updateRange: {
|
|
1092
|
-
newRange:
|
|
1092
|
+
newRange: Y.range
|
|
1093
1093
|
}
|
|
1094
1094
|
});
|
|
1095
1095
|
};
|
|
1096
|
-
return S ? /* @__PURE__ */ o(
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
{
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
"
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
{
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
children: {
|
|
1187
|
-
label: dn,
|
|
1188
|
-
oldConfig: we,
|
|
1189
|
-
unitId: U,
|
|
1190
|
-
subUnitId: ee,
|
|
1191
|
-
tableId: b.tableId
|
|
1192
|
-
},
|
|
1193
|
-
width: 330
|
|
1194
|
-
};
|
|
1195
|
-
i.open(Ie);
|
|
1196
|
-
},
|
|
1197
|
-
children: [
|
|
1198
|
-
/* @__PURE__ */ o(
|
|
1199
|
-
fn,
|
|
1200
|
-
{
|
|
1201
|
-
extend: { colorChannel1: "rgb(53,91,183)" },
|
|
1202
|
-
className: "univer-mr-2"
|
|
1203
|
-
}
|
|
1204
|
-
),
|
|
1205
|
-
y.t("sheets-table.setTheme")
|
|
1206
|
-
]
|
|
1207
|
-
}
|
|
1208
|
-
),
|
|
1209
|
-
/* @__PURE__ */ o(
|
|
1210
|
-
"div",
|
|
1211
|
-
{
|
|
1212
|
-
className: "univer-mb-1 univer-mt-1 univer-h-px univer-w-full univer-bg-gray-200"
|
|
1213
|
-
}
|
|
1214
|
-
),
|
|
1215
|
-
/* @__PURE__ */ w(
|
|
1216
|
-
"div",
|
|
1217
|
-
{
|
|
1218
|
-
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",
|
|
1219
|
-
onClick: () => {
|
|
1220
|
-
x(b.tableId, !1), u.executeCommand(Qn.id, {
|
|
1221
|
-
tableId: b.tableId,
|
|
1222
|
-
subUnitId: ee,
|
|
1223
|
-
unitId: U
|
|
1224
|
-
});
|
|
1096
|
+
return S ? /* @__PURE__ */ o("div", { className: "univer-absolute univer-z-50 univer-h-0 univer-w-0", children: h.map((b) => {
|
|
1097
|
+
var Be, Fe, m, w, z, K, se;
|
|
1098
|
+
const P = T.getTableById(U, b.tableId);
|
|
1099
|
+
if (!P) return null;
|
|
1100
|
+
const V = k.getRangeThemeStyle(U, P.getTableStyleId()), Y = (m = (Fe = (Be = V == null ? void 0 : V.getHeaderRowStyle()) == null ? void 0 : Be.bg) == null ? void 0 : Fe.rgb) != null ? m : H, qe = (K = (z = (w = V == null ? void 0 : V.getHeaderRowStyle()) == null ? void 0 : w.cl) == null ? void 0 : z.rgb) != null ? K : "rgb(255, 255, 255)", Ye = P.getRange();
|
|
1101
|
+
if (!(v != null && v.length))
|
|
1102
|
+
return null;
|
|
1103
|
+
const Qe = v[v.length - 1].range, De = !me.intersects(Ye, Qe) && b.y <= 20;
|
|
1104
|
+
return /* @__PURE__ */ I(
|
|
1105
|
+
"div",
|
|
1106
|
+
{
|
|
1107
|
+
className: O("univer-absolute univer-box-border univer-cursor-pointer univer-items-center univer-rounded-xl univer-pl-2 univer-pr-2 univer-shadow-xs", F, {
|
|
1108
|
+
"univer-flex": !De,
|
|
1109
|
+
"univer-hidden": De
|
|
1110
|
+
}),
|
|
1111
|
+
style: {
|
|
1112
|
+
left: b.x,
|
|
1113
|
+
top: Math.max(b.y, 0),
|
|
1114
|
+
backgroundColor: Y,
|
|
1115
|
+
color: qe,
|
|
1116
|
+
borderWidth: "0.5px",
|
|
1117
|
+
height: C ? `${C}px` : "24px"
|
|
1118
|
+
},
|
|
1119
|
+
children: [
|
|
1120
|
+
/* @__PURE__ */ o("div", { className: "univer-text-nowrap", children: t === b.tableId ? /* @__PURE__ */ o(
|
|
1121
|
+
Mt,
|
|
1122
|
+
{
|
|
1123
|
+
className: "univer-h-[18px] univer-min-w-16 univer-rounded-none",
|
|
1124
|
+
inputClass: "univer-h-[18px] univer-w-[80px]",
|
|
1125
|
+
value: n,
|
|
1126
|
+
onChange: (W) => r(W),
|
|
1127
|
+
onBlur: () => Me(b.tableId, n),
|
|
1128
|
+
onKeyDown: (W) => {
|
|
1129
|
+
W.key === "Enter" && Me(b.tableId, n);
|
|
1130
|
+
},
|
|
1131
|
+
autoFocus: t === b.tableId
|
|
1132
|
+
}
|
|
1133
|
+
) : /* @__PURE__ */ o("div", { className: "univer-h-[18px] univer-max-w-24 univer-truncate univer-text-sm", children: b.tableName }) }),
|
|
1134
|
+
/* @__PURE__ */ o(
|
|
1135
|
+
Le,
|
|
1136
|
+
{
|
|
1137
|
+
align: "start",
|
|
1138
|
+
overlay: /* @__PURE__ */ I("div", { className: "univer-pb-2 univer-pt-2", children: [
|
|
1139
|
+
/* @__PURE__ */ I(
|
|
1140
|
+
"div",
|
|
1141
|
+
{
|
|
1142
|
+
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",
|
|
1143
|
+
onClick: () => {
|
|
1144
|
+
e(b.tableId), r(b.tableName);
|
|
1145
|
+
},
|
|
1146
|
+
children: [
|
|
1147
|
+
/* @__PURE__ */ o(_n, {}),
|
|
1148
|
+
y.t("sheets-table.rename")
|
|
1149
|
+
]
|
|
1150
|
+
}
|
|
1151
|
+
),
|
|
1152
|
+
/* @__PURE__ */ o(
|
|
1153
|
+
"div",
|
|
1154
|
+
{
|
|
1155
|
+
className: "univer-mb-1 univer-mt-1 univer-h-px univer-w-full univer-bg-gray-200"
|
|
1156
|
+
}
|
|
1157
|
+
),
|
|
1158
|
+
/* @__PURE__ */ I(
|
|
1159
|
+
"div",
|
|
1160
|
+
{
|
|
1161
|
+
onClick: () => ce(b.tableId),
|
|
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",
|
|
1163
|
+
children: [
|
|
1164
|
+
/* @__PURE__ */ o(Cn, {}),
|
|
1165
|
+
y.t("sheets-table.updateRange")
|
|
1166
|
+
]
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
/* @__PURE__ */ I(
|
|
1170
|
+
"div",
|
|
1171
|
+
{
|
|
1172
|
+
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",
|
|
1173
|
+
onClick: () => {
|
|
1174
|
+
E(b.tableId, !1);
|
|
1175
|
+
const W = T.getTableById(U, b.tableId);
|
|
1176
|
+
if (!W) return;
|
|
1177
|
+
const Se = W.getTableConfig(), _e = {
|
|
1178
|
+
id: Ur,
|
|
1179
|
+
header: { title: y.t("sheets-table.tableStyle") },
|
|
1180
|
+
children: {
|
|
1181
|
+
label: gn,
|
|
1182
|
+
oldConfig: Se,
|
|
1183
|
+
unitId: U,
|
|
1184
|
+
subUnitId: ee,
|
|
1185
|
+
tableId: b.tableId
|
|
1225
1186
|
},
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1187
|
+
width: 330
|
|
1188
|
+
};
|
|
1189
|
+
i.open(_e);
|
|
1190
|
+
},
|
|
1191
|
+
children: [
|
|
1192
|
+
/* @__PURE__ */ o(
|
|
1193
|
+
Sn,
|
|
1194
|
+
{
|
|
1195
|
+
extend: { colorChannel1: "rgb(53,91,183)" }
|
|
1196
|
+
}
|
|
1197
|
+
),
|
|
1198
|
+
y.t("sheets-table.setTheme")
|
|
1199
|
+
]
|
|
1200
|
+
}
|
|
1201
|
+
),
|
|
1202
|
+
/* @__PURE__ */ o(
|
|
1203
|
+
"div",
|
|
1204
|
+
{
|
|
1205
|
+
className: "univer-mb-1 univer-mt-1 univer-h-px univer-w-full univer-bg-gray-200"
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1208
|
+
/* @__PURE__ */ I(
|
|
1209
|
+
"div",
|
|
1210
|
+
{
|
|
1211
|
+
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",
|
|
1212
|
+
onClick: () => {
|
|
1213
|
+
E(b.tableId, !1), u.executeCommand(zn.id, {
|
|
1214
|
+
tableId: b.tableId,
|
|
1215
|
+
subUnitId: ee,
|
|
1216
|
+
unitId: U
|
|
1217
|
+
});
|
|
1218
|
+
},
|
|
1219
|
+
children: [
|
|
1220
|
+
/* @__PURE__ */ o(pn, { className: "univer-mr-2" }),
|
|
1221
|
+
y.t("sheets-table.removeTable")
|
|
1222
|
+
]
|
|
1223
|
+
}
|
|
1224
|
+
)
|
|
1225
|
+
] }),
|
|
1226
|
+
open: (se = a[b.tableId]) != null ? se : !1,
|
|
1227
|
+
onOpenChange: (W) => {
|
|
1228
|
+
E(b.tableId, W);
|
|
1229
|
+
},
|
|
1230
|
+
children: /* @__PURE__ */ o(xt, {})
|
|
1231
|
+
},
|
|
1232
|
+
b.tableId
|
|
1233
|
+
)
|
|
1234
|
+
]
|
|
1235
|
+
},
|
|
1236
|
+
b.tableId
|
|
1237
|
+
);
|
|
1238
|
+
}) }) : null;
|
|
1245
1239
|
};
|
|
1246
|
-
var
|
|
1247
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1248
|
-
(s =
|
|
1240
|
+
var Si = Object.getOwnPropertyDescriptor, _i = (t, e, n, r) => {
|
|
1241
|
+
for (var i = r > 1 ? void 0 : r ? Si(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
1242
|
+
(s = t[a]) && (i = s(i) || i);
|
|
1249
1243
|
return i;
|
|
1250
|
-
}, te = (
|
|
1251
|
-
let
|
|
1252
|
-
constructor(e,
|
|
1244
|
+
}, te = (t, e) => (n, r) => e(n, r, t);
|
|
1245
|
+
let it = class extends Pe {
|
|
1246
|
+
constructor(e, n, r, i, a, s, c, d, h, u, g) {
|
|
1253
1247
|
super();
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
this._context = e, this._injector =
|
|
1248
|
+
A(this, "_anchorVisible$", new Ot(!0));
|
|
1249
|
+
A(this, "_timer");
|
|
1250
|
+
A(this, "_anchorPosition$", new Ot([]));
|
|
1251
|
+
A(this, "anchorPosition$", this._anchorPosition$.asObservable());
|
|
1252
|
+
this._context = e, this._injector = n, this._sheetSkeletonManagerService = r, this._renderManagerService = i, this._commandService = a, this._univerInstanceService = s, this._uiPartsService = c, this._tableManager = d, this._scrollManagerService = h, this._workbookPermissionService = u, this._permissionService = g, this._initUI(), this._initListener(), this._initTableAnchor();
|
|
1259
1253
|
}
|
|
1260
1254
|
_initUI() {
|
|
1261
1255
|
this.disposeWithMe(
|
|
1262
|
-
this._uiPartsService.registerComponent(
|
|
1256
|
+
this._uiPartsService.registerComponent(hr.CONTENT, () => vr(Ci, this._injector))
|
|
1263
1257
|
);
|
|
1264
1258
|
}
|
|
1265
1259
|
_initListener() {
|
|
1266
1260
|
this.disposeWithMe(
|
|
1267
1261
|
this._commandService.onCommandExecuted((e) => {
|
|
1268
|
-
(e.id ===
|
|
1262
|
+
(e.id === ir.id || e.id === ar.id) && (this._anchorVisible$.next(!1), this._timer && clearTimeout(this._timer), this._timer = setTimeout(() => {
|
|
1269
1263
|
this._anchorVisible$.next(!0);
|
|
1270
1264
|
}, 300));
|
|
1271
1265
|
})
|
|
@@ -1273,7 +1267,7 @@ let tt = class extends He {
|
|
|
1273
1267
|
}
|
|
1274
1268
|
_initTableAnchor() {
|
|
1275
1269
|
this.disposeWithMe(
|
|
1276
|
-
|
|
1270
|
+
yt(
|
|
1277
1271
|
this._context.unit.activeSheet$,
|
|
1278
1272
|
this._sheetSkeletonManagerService.currentSkeleton$,
|
|
1279
1273
|
this._scrollManagerService.validViewportScrollInfo$,
|
|
@@ -1282,8 +1276,8 @@ let tt = class extends He {
|
|
|
1282
1276
|
this._tableManager.tableNameChanged$,
|
|
1283
1277
|
this._tableManager.tableRangeChanged$,
|
|
1284
1278
|
this._tableManager.tableThemeChanged$,
|
|
1285
|
-
this._workbookPermissionService.unitPermissionInitStateChange$.pipe(
|
|
1286
|
-
this._permissionService.permissionPointUpdate$.pipe(
|
|
1279
|
+
this._workbookPermissionService.unitPermissionInitStateChange$.pipe(Sr((e) => e)),
|
|
1280
|
+
this._permissionService.permissionPointUpdate$.pipe(_r(300)),
|
|
1287
1281
|
this._anchorVisible$
|
|
1288
1282
|
).subscribe(() => {
|
|
1289
1283
|
var h;
|
|
@@ -1291,27 +1285,27 @@ let tt = class extends He {
|
|
|
1291
1285
|
this._anchorPosition$.next([]);
|
|
1292
1286
|
return;
|
|
1293
1287
|
}
|
|
1294
|
-
const
|
|
1288
|
+
const n = this._context.unit, r = n.getActiveSheet(), i = r == null ? void 0 : r.getSheetId(), a = this._tableManager.getTableList(this._context.unitId).filter((u) => u.subUnitId === i), s = this._renderManagerService.getRenderById(this._context.unitId);
|
|
1295
1289
|
if (!s) {
|
|
1296
1290
|
this._anchorPosition$.next([]);
|
|
1297
1291
|
return;
|
|
1298
1292
|
}
|
|
1299
|
-
if (!((h = this._permissionService.getPermissionPoint(new
|
|
1293
|
+
if (!((h = this._permissionService.getPermissionPoint(new sn(n.getUnitId()).id)) == null ? void 0 : h.value)) {
|
|
1300
1294
|
this._anchorPosition$.next([]);
|
|
1301
1295
|
return;
|
|
1302
1296
|
}
|
|
1303
1297
|
const d = a.reduce((u, g) => {
|
|
1304
|
-
const { startRow: _, startColumn: S } = g.range, T = s.with(
|
|
1305
|
-
if (!
|
|
1306
|
-
const { scene:
|
|
1307
|
-
if (!
|
|
1308
|
-
const y =
|
|
1309
|
-
if (!y || !
|
|
1310
|
-
const
|
|
1311
|
-
if (!
|
|
1312
|
-
const L =
|
|
1313
|
-
return C >= -10 &&
|
|
1314
|
-
x:
|
|
1298
|
+
const { startRow: _, startColumn: S } = g.range, T = s.with(ct), k = sr(this._univerInstanceService, this._renderManagerService);
|
|
1299
|
+
if (!k) return u;
|
|
1300
|
+
const { scene: f } = k, N = f.getViewport(Un.VIEW_MAIN);
|
|
1301
|
+
if (!N) return u;
|
|
1302
|
+
const y = f == null ? void 0 : f.scaleX, D = f == null ? void 0 : f.scaleY, v = f == null ? void 0 : f.getViewportScrollXY(N);
|
|
1303
|
+
if (!y || !f || !D || !v) return u;
|
|
1304
|
+
const p = T.getCurrentSkeleton();
|
|
1305
|
+
if (!p) return u;
|
|
1306
|
+
const L = p.getNoMergeCellWithCoordByIndex(_, S), R = Wn(L.startX, y, v), C = jn(L.startY, D, v) - 25 - 4;
|
|
1307
|
+
return C >= -10 && R >= 45 && u.push({
|
|
1308
|
+
x: R,
|
|
1315
1309
|
y: C,
|
|
1316
1310
|
tableId: g.id,
|
|
1317
1311
|
tableName: g.name
|
|
@@ -1322,72 +1316,72 @@ let tt = class extends He {
|
|
|
1322
1316
|
);
|
|
1323
1317
|
}
|
|
1324
1318
|
};
|
|
1325
|
-
|
|
1326
|
-
te(1,
|
|
1327
|
-
te(2,
|
|
1328
|
-
te(3,
|
|
1329
|
-
te(4,
|
|
1330
|
-
te(5,
|
|
1331
|
-
te(6,
|
|
1332
|
-
te(7,
|
|
1333
|
-
te(8,
|
|
1334
|
-
te(9,
|
|
1335
|
-
te(10,
|
|
1336
|
-
],
|
|
1337
|
-
const
|
|
1319
|
+
it = _i([
|
|
1320
|
+
te(1, x(Oe)),
|
|
1321
|
+
te(2, x(ct)),
|
|
1322
|
+
te(3, Xt),
|
|
1323
|
+
te(4, le),
|
|
1324
|
+
te(5, fe),
|
|
1325
|
+
te(6, dr),
|
|
1326
|
+
te(7, x(ne)),
|
|
1327
|
+
te(8, x(rr)),
|
|
1328
|
+
te(9, x(on)),
|
|
1329
|
+
te(10, x(qt))
|
|
1330
|
+
], it);
|
|
1331
|
+
const Ne = 16;
|
|
1338
1332
|
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");
|
|
1339
|
-
class
|
|
1340
|
-
static drawNoSetting(e,
|
|
1341
|
-
e.save(),
|
|
1333
|
+
class Wt {
|
|
1334
|
+
static drawNoSetting(e, n, r, i) {
|
|
1335
|
+
e.save(), Lt.drawWith(e, {
|
|
1342
1336
|
radius: 2,
|
|
1343
|
-
width:
|
|
1344
|
-
height:
|
|
1337
|
+
width: Ne,
|
|
1338
|
+
height: Ne,
|
|
1345
1339
|
fill: i
|
|
1346
|
-
}), e.lineCap = "square", e.strokeStyle = r, e.scale(
|
|
1340
|
+
}), e.lineCap = "square", e.strokeStyle = r, e.scale(n / Ne, n / Ne), 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();
|
|
1347
1341
|
}
|
|
1348
|
-
static drawIconByPath(e,
|
|
1349
|
-
e.save(), e.strokeStyle = r, e.fillStyle = i,
|
|
1342
|
+
static drawIconByPath(e, n, r, i) {
|
|
1343
|
+
e.save(), e.strokeStyle = r, e.fillStyle = i, Lt.drawWith(e, {
|
|
1350
1344
|
radius: 2,
|
|
1351
|
-
width:
|
|
1352
|
-
height:
|
|
1345
|
+
width: Ne,
|
|
1346
|
+
height: Ne,
|
|
1353
1347
|
fill: i
|
|
1354
|
-
}),
|
|
1348
|
+
}), n.forEach((a) => {
|
|
1355
1349
|
const s = new Path2D(a);
|
|
1356
1350
|
e.fillStyle = r, e.fill(s, "evenodd");
|
|
1357
1351
|
}), e.restore();
|
|
1358
1352
|
}
|
|
1359
1353
|
}
|
|
1360
|
-
const
|
|
1354
|
+
const Ti = [
|
|
1361
1355
|
"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"
|
|
1362
|
-
],
|
|
1356
|
+
], wi = [
|
|
1363
1357
|
"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",
|
|
1364
1358
|
"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"
|
|
1365
|
-
],
|
|
1359
|
+
], Ii = [
|
|
1366
1360
|
"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",
|
|
1367
1361
|
"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"
|
|
1368
|
-
],
|
|
1362
|
+
], yi = [
|
|
1369
1363
|
"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",
|
|
1370
1364
|
"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",
|
|
1371
1365
|
"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"
|
|
1372
|
-
],
|
|
1366
|
+
], Ri = [
|
|
1373
1367
|
"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",
|
|
1374
1368
|
"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",
|
|
1375
1369
|
"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"
|
|
1376
1370
|
];
|
|
1377
|
-
var
|
|
1378
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1379
|
-
(s =
|
|
1371
|
+
var Mi = Object.getOwnPropertyDescriptor, xi = (t, e, n, r) => {
|
|
1372
|
+
for (var i = r > 1 ? void 0 : r ? Mi(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
1373
|
+
(s = t[a]) && (i = s(i) || i);
|
|
1380
1374
|
return i;
|
|
1381
|
-
},
|
|
1382
|
-
const
|
|
1383
|
-
let
|
|
1384
|
-
constructor(e,
|
|
1385
|
-
super(e,
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
this._contextService = r, this._commandService = i, this._themeService = a, this.setShapeProps(
|
|
1375
|
+
}, pt = (t, e) => (n, r) => e(n, r, t);
|
|
1376
|
+
const be = 16, et = 1;
|
|
1377
|
+
let _t = class extends Zn {
|
|
1378
|
+
constructor(e, n, r, i, a) {
|
|
1379
|
+
super(e, n);
|
|
1380
|
+
A(this, "_cellWidth", 0);
|
|
1381
|
+
A(this, "_cellHeight", 0);
|
|
1382
|
+
A(this, "_filterParams");
|
|
1383
|
+
A(this, "_hovered", !1);
|
|
1384
|
+
this._contextService = r, this._commandService = i, this._themeService = a, this.setShapeProps(n), this.onPointerDown$.subscribeEvent((s) => this.onPointerDown(s)), this.onPointerEnter$.subscribeEvent(() => this.onPointerEnter()), this.onPointerLeave$.subscribeEvent(() => this.onPointerLeave());
|
|
1391
1385
|
}
|
|
1392
1386
|
setShapeProps(e) {
|
|
1393
1387
|
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({
|
|
@@ -1396,46 +1390,46 @@ let ft = class extends Un {
|
|
|
1396
1390
|
});
|
|
1397
1391
|
}
|
|
1398
1392
|
_draw(e) {
|
|
1399
|
-
const
|
|
1393
|
+
const n = this._cellHeight, r = this._cellWidth, i = be - r, a = be - n;
|
|
1400
1394
|
e.save();
|
|
1401
1395
|
const s = new Path2D();
|
|
1402
|
-
s.rect(i, a, r,
|
|
1396
|
+
s.rect(i, a, r, n), e.clip(s);
|
|
1403
1397
|
const { buttonState: c } = this._filterParams, d = this._themeService.getColorFromTheme("primary.600"), h = this._hovered ? this._themeService.getColorFromTheme("gray.50") : "rgba(255, 255, 255, 1.0)";
|
|
1404
1398
|
let u;
|
|
1405
1399
|
switch (c) {
|
|
1406
|
-
case
|
|
1407
|
-
u =
|
|
1400
|
+
case xe.FilteredSortNone:
|
|
1401
|
+
u = Ti;
|
|
1408
1402
|
break;
|
|
1409
|
-
case
|
|
1410
|
-
u =
|
|
1403
|
+
case xe.FilteredSortAsc:
|
|
1404
|
+
u = wi;
|
|
1411
1405
|
break;
|
|
1412
|
-
case
|
|
1413
|
-
u =
|
|
1406
|
+
case xe.FilteredSortDesc:
|
|
1407
|
+
u = Ii;
|
|
1414
1408
|
break;
|
|
1415
|
-
case
|
|
1409
|
+
case xe.FilterNoneSortNone:
|
|
1416
1410
|
break;
|
|
1417
|
-
case
|
|
1418
|
-
u =
|
|
1411
|
+
case xe.FilterNoneSortAsc:
|
|
1412
|
+
u = yi;
|
|
1419
1413
|
break;
|
|
1420
|
-
case
|
|
1421
|
-
u =
|
|
1414
|
+
case xe.FilterNoneSortDesc:
|
|
1415
|
+
u = Ri;
|
|
1422
1416
|
break;
|
|
1423
1417
|
}
|
|
1424
|
-
u ?
|
|
1418
|
+
u ? Wt.drawIconByPath(e, u, d, h) : c !== void 0 && Wt.drawNoSetting(e, be, d, h), e.restore();
|
|
1425
1419
|
}
|
|
1426
1420
|
onPointerDown(e) {
|
|
1427
1421
|
if (e.button === 2)
|
|
1428
1422
|
return;
|
|
1429
|
-
const { row:
|
|
1430
|
-
this._contextService.getContextValue(
|
|
1423
|
+
const { row: n, col: r, unitId: i, subUnitId: a, tableId: s } = this._filterParams;
|
|
1424
|
+
this._contextService.getContextValue(ge) || !this._commandService.hasCommand(St.id) || setTimeout(() => {
|
|
1431
1425
|
const d = {
|
|
1432
|
-
row:
|
|
1426
|
+
row: n,
|
|
1433
1427
|
col: r,
|
|
1434
1428
|
unitId: i,
|
|
1435
1429
|
subUnitId: a,
|
|
1436
1430
|
tableId: s
|
|
1437
1431
|
};
|
|
1438
|
-
this._commandService.executeCommand(
|
|
1432
|
+
this._commandService.executeCommand(St.id, d);
|
|
1439
1433
|
}, 200);
|
|
1440
1434
|
}
|
|
1441
1435
|
onPointerEnter() {
|
|
@@ -1445,23 +1439,23 @@ let ft = class extends Un {
|
|
|
1445
1439
|
this._hovered = !1, this.makeDirty(!0);
|
|
1446
1440
|
}
|
|
1447
1441
|
};
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
],
|
|
1453
|
-
var
|
|
1454
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1455
|
-
(s =
|
|
1442
|
+
_t = xi([
|
|
1443
|
+
pt(2, It),
|
|
1444
|
+
pt(3, le),
|
|
1445
|
+
pt(4, x(Pn))
|
|
1446
|
+
], _t);
|
|
1447
|
+
var Ni = Object.getOwnPropertyDescriptor, Ei = (t, e, n, r) => {
|
|
1448
|
+
for (var i = r > 1 ? void 0 : r ? Ni(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
1449
|
+
(s = t[a]) && (i = s(i) || i);
|
|
1456
1450
|
return i;
|
|
1457
|
-
},
|
|
1458
|
-
const
|
|
1459
|
-
let
|
|
1460
|
-
constructor(e,
|
|
1451
|
+
}, tt = (t, e) => (n, r) => e(n, r, t);
|
|
1452
|
+
const Li = 5e3;
|
|
1453
|
+
let Tt = class extends Gt {
|
|
1454
|
+
constructor(e, n, r, i, a) {
|
|
1461
1455
|
super();
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this._context = e, this._injector =
|
|
1456
|
+
A(this, "_buttonRenderDisposable", null);
|
|
1457
|
+
A(this, "_tableFilterButtonShapes", []);
|
|
1458
|
+
this._context = e, this._injector = n, this._sheetSkeletonManagerService = r, this._sheetInterceptorService = i, this._tableManager = a, this._initRenderer();
|
|
1465
1459
|
}
|
|
1466
1460
|
dispose() {
|
|
1467
1461
|
super.dispose(), this._disposeRendering();
|
|
@@ -1469,16 +1463,16 @@ let pt = class extends qt {
|
|
|
1469
1463
|
_initRenderer() {
|
|
1470
1464
|
const e = this._tableManager;
|
|
1471
1465
|
this._sheetSkeletonManagerService.currentSkeleton$.pipe(
|
|
1472
|
-
|
|
1466
|
+
Ie((n) => {
|
|
1473
1467
|
var c;
|
|
1474
|
-
if (!
|
|
1468
|
+
if (!n) return J(null);
|
|
1475
1469
|
const { unit: r, unitId: i } = this._context, a = ((c = r.getActiveSheet()) == null ? void 0 : c.getSheetId()) || "", s = () => ({
|
|
1476
1470
|
unitId: i,
|
|
1477
1471
|
worksheetId: a,
|
|
1478
1472
|
tableFilterRanges: this._tableManager.getSheetFilterRangeWithState(r.getUnitId(), a),
|
|
1479
|
-
skeleton:
|
|
1473
|
+
skeleton: n.skeleton
|
|
1480
1474
|
});
|
|
1481
|
-
return
|
|
1475
|
+
return yt(
|
|
1482
1476
|
e.tableAdd$,
|
|
1483
1477
|
e.tableNameChanged$,
|
|
1484
1478
|
e.tableRangeChanged$,
|
|
@@ -1486,109 +1480,106 @@ let pt = class extends qt {
|
|
|
1486
1480
|
e.tableDelete$,
|
|
1487
1481
|
e.tableFilterChanged$
|
|
1488
1482
|
).pipe(
|
|
1489
|
-
|
|
1490
|
-
|
|
1483
|
+
Tr(() => s()),
|
|
1484
|
+
an(s())
|
|
1491
1485
|
);
|
|
1492
1486
|
}),
|
|
1493
|
-
|
|
1494
|
-
).subscribe((
|
|
1495
|
-
this._disposeRendering(), !(!
|
|
1487
|
+
wr(this.dispose$)
|
|
1488
|
+
).subscribe((n) => {
|
|
1489
|
+
this._disposeRendering(), !(!n || !n.tableFilterRanges) && this._renderButtons(n);
|
|
1496
1490
|
});
|
|
1497
1491
|
}
|
|
1498
1492
|
_renderButtons(e) {
|
|
1499
|
-
const { tableFilterRanges:
|
|
1500
|
-
for (const { range: c, states: d, tableId: h } of
|
|
1493
|
+
const { tableFilterRanges: n, unitId: r, skeleton: i, worksheetId: a } = e, { scene: s } = this._context;
|
|
1494
|
+
for (const { range: c, states: d, tableId: h } of n) {
|
|
1501
1495
|
const { startRow: u, startColumn: g, endColumn: _ } = c;
|
|
1502
1496
|
this._interceptCellContent(r, a, c);
|
|
1503
1497
|
for (let S = g; S <= _; S++) {
|
|
1504
|
-
const T = `sheets-table-filter-button-${u}-${S}`,
|
|
1505
|
-
if (
|
|
1498
|
+
const T = `sheets-table-filter-button-${u}-${S}`, k = lr(u, S, s, i), { startX: f, startY: N, endX: y, endY: D } = k, v = y - f, p = D - N;
|
|
1499
|
+
if (p <= et || v <= et)
|
|
1506
1500
|
continue;
|
|
1507
|
-
const L = d[S - g],
|
|
1508
|
-
left:
|
|
1501
|
+
const L = d[S - g], R = y - be - et, C = D - be - et, H = {
|
|
1502
|
+
left: R,
|
|
1509
1503
|
top: C,
|
|
1510
|
-
height:
|
|
1511
|
-
width:
|
|
1512
|
-
zIndex:
|
|
1513
|
-
cellHeight:
|
|
1504
|
+
height: be,
|
|
1505
|
+
width: be,
|
|
1506
|
+
zIndex: Li,
|
|
1507
|
+
cellHeight: p,
|
|
1514
1508
|
cellWidth: v,
|
|
1515
1509
|
filterParams: { unitId: r, subUnitId: a, row: u, col: S, buttonState: L, tableId: h }
|
|
1516
|
-
},
|
|
1517
|
-
this._tableFilterButtonShapes.push(
|
|
1510
|
+
}, E = this._injector.createInstance(_t, T, H);
|
|
1511
|
+
this._tableFilterButtonShapes.push(E);
|
|
1518
1512
|
}
|
|
1519
1513
|
}
|
|
1520
1514
|
s.addObjects(this._tableFilterButtonShapes), s.makeDirty();
|
|
1521
1515
|
}
|
|
1522
|
-
_interceptCellContent(e,
|
|
1516
|
+
_interceptCellContent(e, n, r) {
|
|
1523
1517
|
const { startRow: i, startColumn: a, endColumn: s } = r;
|
|
1524
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
1525
|
-
effect:
|
|
1518
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Pr.CELL_CONTENT, {
|
|
1519
|
+
effect: On.Style,
|
|
1526
1520
|
handler: (c, d, h) => {
|
|
1527
1521
|
const { row: u, col: g, unitId: _, subUnitId: S } = d;
|
|
1528
|
-
return _ !== e || S !==
|
|
1529
|
-
...c,
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
rightOffset: pe
|
|
1533
|
-
}
|
|
1534
|
-
});
|
|
1522
|
+
return _ !== e || S !== n || u !== i || g < a || g > s || ((!c || c === d.rawData) && (c = { ...d.rawData }), c.fontRenderExtension = {
|
|
1523
|
+
...c == null ? void 0 : c.fontRenderExtension,
|
|
1524
|
+
rightOffset: be
|
|
1525
|
+
}), h(c);
|
|
1535
1526
|
},
|
|
1536
1527
|
priority: 10
|
|
1537
1528
|
});
|
|
1538
1529
|
}
|
|
1539
1530
|
_disposeRendering() {
|
|
1540
1531
|
var e;
|
|
1541
|
-
this._tableFilterButtonShapes.forEach((
|
|
1532
|
+
this._tableFilterButtonShapes.forEach((n) => n.dispose()), (e = this._buttonRenderDisposable) == null || e.dispose(), this._buttonRenderDisposable = null, this._tableFilterButtonShapes = [];
|
|
1542
1533
|
}
|
|
1543
1534
|
};
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
],
|
|
1550
|
-
const
|
|
1551
|
-
const { unitId: e, subUnitId:
|
|
1552
|
-
return /* @__PURE__ */
|
|
1535
|
+
Tt = Ei([
|
|
1536
|
+
tt(1, x(Oe)),
|
|
1537
|
+
tt(2, x(ct)),
|
|
1538
|
+
tt(3, x(un)),
|
|
1539
|
+
tt(4, x(ne))
|
|
1540
|
+
], Tt);
|
|
1541
|
+
const $i = (t) => {
|
|
1542
|
+
const { unitId: e, subUnitId: n, range: r, onCancel: i, onConfirm: a, tableId: s } = t, c = M(ne), [d, h] = q(r), [u, g] = q(""), _ = M(oe), S = M(fe);
|
|
1543
|
+
return /* @__PURE__ */ I(Rt, { children: [
|
|
1553
1544
|
/* @__PURE__ */ o(
|
|
1554
|
-
|
|
1545
|
+
Hr,
|
|
1555
1546
|
{
|
|
1556
1547
|
maxRangeCount: 1,
|
|
1557
1548
|
unitId: e,
|
|
1558
|
-
subUnitId:
|
|
1559
|
-
initialValue:
|
|
1560
|
-
onChange: (T,
|
|
1561
|
-
const
|
|
1549
|
+
subUnitId: n,
|
|
1550
|
+
initialValue: At(r),
|
|
1551
|
+
onChange: (T, k) => {
|
|
1552
|
+
const f = At(r), N = Fr(k).range, y = ut(S, { unitId: e, subUnitId: n });
|
|
1562
1553
|
if (!y)
|
|
1563
1554
|
return;
|
|
1564
|
-
if (y.worksheet.getMergeData().some((
|
|
1555
|
+
if (y.worksheet.getMergeData().some((E) => me.intersects(N, E))) {
|
|
1565
1556
|
g(_.t("sheets-table.tableRangeWithMergeError"));
|
|
1566
1557
|
return;
|
|
1567
1558
|
}
|
|
1568
|
-
if (c.getTablesBySubunitId(e,
|
|
1569
|
-
if (
|
|
1559
|
+
if (c.getTablesBySubunitId(e, n).some((E) => {
|
|
1560
|
+
if (E.getId() === s)
|
|
1570
1561
|
return !1;
|
|
1571
|
-
const Q =
|
|
1572
|
-
return
|
|
1562
|
+
const Q = E.getRange();
|
|
1563
|
+
return me.intersects(N, Q);
|
|
1573
1564
|
})) {
|
|
1574
1565
|
g(_.t("sheets-table.tableRangeWithOtherTableError"));
|
|
1575
1566
|
return;
|
|
1576
1567
|
}
|
|
1577
|
-
const { startRow:
|
|
1578
|
-
if (
|
|
1568
|
+
const { startRow: R, endRow: C } = N;
|
|
1569
|
+
if (R === C) {
|
|
1579
1570
|
g(_.t("sheets-table.tableRangeSingleRowError"));
|
|
1580
1571
|
return;
|
|
1581
1572
|
}
|
|
1582
|
-
if (
|
|
1573
|
+
if (f !== k) {
|
|
1583
1574
|
if (s) {
|
|
1584
|
-
const
|
|
1585
|
-
if (
|
|
1586
|
-
const Q =
|
|
1587
|
-
if (
|
|
1588
|
-
h(
|
|
1575
|
+
const E = c.getTableById(e, s);
|
|
1576
|
+
if (E) {
|
|
1577
|
+
const Q = E.getRange();
|
|
1578
|
+
if (me.intersects(N, Q) && Q.startRow === N.startRow) {
|
|
1579
|
+
h(N), g(""), a({
|
|
1589
1580
|
unitId: e,
|
|
1590
|
-
subUnitId:
|
|
1591
|
-
range:
|
|
1581
|
+
subUnitId: n,
|
|
1582
|
+
range: N
|
|
1592
1583
|
});
|
|
1593
1584
|
return;
|
|
1594
1585
|
} else {
|
|
@@ -1597,23 +1588,23 @@ const Ni = (n) => {
|
|
|
1597
1588
|
}
|
|
1598
1589
|
}
|
|
1599
1590
|
}
|
|
1600
|
-
h(
|
|
1591
|
+
h(N), g("");
|
|
1601
1592
|
}
|
|
1602
1593
|
},
|
|
1603
1594
|
supportAcrossSheet: !1
|
|
1604
1595
|
}
|
|
1605
1596
|
),
|
|
1606
1597
|
u && /* @__PURE__ */ o("div", { className: "univer-mt-1 univer-text-xs univer-text-red-500", children: u }),
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */ o(
|
|
1598
|
+
/* @__PURE__ */ I("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
|
|
1599
|
+
/* @__PURE__ */ o(Te, { onClick: i, children: _.t("sheets-table.cancel") }),
|
|
1609
1600
|
/* @__PURE__ */ o(
|
|
1610
|
-
|
|
1601
|
+
Te,
|
|
1611
1602
|
{
|
|
1612
1603
|
variant: "primary",
|
|
1613
1604
|
onClick: () => {
|
|
1614
1605
|
u || a({
|
|
1615
1606
|
unitId: e,
|
|
1616
|
-
subUnitId:
|
|
1607
|
+
subUnitId: n,
|
|
1617
1608
|
range: d
|
|
1618
1609
|
});
|
|
1619
1610
|
},
|
|
@@ -1623,112 +1614,112 @@ const Ni = (n) => {
|
|
|
1623
1614
|
)
|
|
1624
1615
|
] })
|
|
1625
1616
|
] });
|
|
1626
|
-
},
|
|
1627
|
-
var
|
|
1628
|
-
const { unitId: e, subUnitId:
|
|
1617
|
+
}, ki = (t) => {
|
|
1618
|
+
var P, V, Y, ht, qe, Ye, vt, Qe, gt, De, Be, Fe;
|
|
1619
|
+
const { unitId: e, subUnitId: n, tableId: r } = t, i = M(le), a = M(oe), s = M(ne), c = s.getTableById(e, r), d = M(cn), h = M(ye), u = we(d.rangeThemeMapChange$), g = we(h.refreshTable$), _ = M(Dn), [, S] = q(Math.random()), T = we(s.tableThemeChanged$, {
|
|
1629
1620
|
theme: c == null ? void 0 : c.getTableStyleId(),
|
|
1630
1621
|
oldTheme: c == null ? void 0 : c.getTableStyleId(),
|
|
1631
1622
|
unitId: e,
|
|
1632
|
-
subUnitId:
|
|
1623
|
+
subUnitId: n,
|
|
1633
1624
|
tableId: r
|
|
1634
|
-
}),
|
|
1635
|
-
i.executeCommand(
|
|
1625
|
+
}), k = d.getRegisteredRangeThemes().filter((m) => m == null ? void 0 : m.startsWith(Wr)), f = d.getALLRegisteredTheme(e).filter((m) => m == null ? void 0 : m.startsWith(mt)), N = c == null ? void 0 : c.getTableStyleId(), y = f.find((m) => m === N), D = y || f[0], v = d.getCustomRangeThemeStyle(e, D), p = (Y = (V = (P = v == null ? void 0 : v.getHeaderRowStyle()) == null ? void 0 : P.bg) == null ? void 0 : V.rgb) != null ? Y : ve, L = (Ye = (qe = (ht = v == null ? void 0 : v.getFirstRowStyle()) == null ? void 0 : ht.bg) == null ? void 0 : qe.rgb) != null ? Ye : ve, R = (gt = (Qe = (vt = v == null ? void 0 : v.getSecondRowStyle()) == null ? void 0 : vt.bg) == null ? void 0 : Qe.rgb) != null ? gt : ve, C = (Fe = (Be = (De = v == null ? void 0 : v.getLastRowStyle()) == null ? void 0 : De.bg) == null ? void 0 : Be.rgb) != null ? Fe : ve, [H, E] = q(null), Q = (m) => {
|
|
1626
|
+
i.executeCommand(Ct.id, {
|
|
1636
1627
|
unitId: e,
|
|
1637
1628
|
tableId: r,
|
|
1638
1629
|
theme: m
|
|
1639
1630
|
});
|
|
1640
1631
|
}, U = () => {
|
|
1641
|
-
if (
|
|
1632
|
+
if (f.length >= 11) {
|
|
1642
1633
|
_.emit(a.t("sheets-table.customTooMore"));
|
|
1643
1634
|
return;
|
|
1644
1635
|
}
|
|
1645
|
-
const m =
|
|
1646
|
-
let
|
|
1636
|
+
const m = f[f.length - 1];
|
|
1637
|
+
let w = `${mt}1`;
|
|
1647
1638
|
if (m) {
|
|
1648
1639
|
const K = Number(m.split("-")[2]);
|
|
1649
|
-
|
|
1640
|
+
w = `${mt}${K + 1}`;
|
|
1650
1641
|
}
|
|
1651
|
-
const
|
|
1652
|
-
i.executeCommand(
|
|
1642
|
+
const z = new Or(w, { ...Kn });
|
|
1643
|
+
i.executeCommand(Jn.id, {
|
|
1653
1644
|
unitId: e,
|
|
1654
1645
|
tableId: r,
|
|
1655
|
-
themeStyle:
|
|
1646
|
+
themeStyle: z
|
|
1656
1647
|
});
|
|
1657
|
-
}, ee = (m,
|
|
1658
|
-
i.executeCommand(
|
|
1648
|
+
}, ee = (m, w) => {
|
|
1649
|
+
i.executeCommand(ln.id, {
|
|
1659
1650
|
unitId: e,
|
|
1660
|
-
subUnitId:
|
|
1651
|
+
subUnitId: n,
|
|
1661
1652
|
styleName: m,
|
|
1662
|
-
style:
|
|
1653
|
+
style: w
|
|
1663
1654
|
});
|
|
1664
|
-
},
|
|
1665
|
-
i.executeCommand(
|
|
1655
|
+
}, Me = (m) => {
|
|
1656
|
+
i.executeCommand(er.id, {
|
|
1666
1657
|
unitId: e,
|
|
1667
1658
|
tableId: r,
|
|
1668
1659
|
themeName: m
|
|
1669
1660
|
});
|
|
1670
1661
|
};
|
|
1671
|
-
|
|
1662
|
+
if (hn(() => {
|
|
1672
1663
|
S(Math.random());
|
|
1673
|
-
}, [u, g]), c
|
|
1664
|
+
}, [u, g]), !c) return null;
|
|
1665
|
+
const ce = new he(p).isDark(), Ce = new he(L).isDark(), ue = new he(R).isDark(), b = new he(C).isDark();
|
|
1666
|
+
return /* @__PURE__ */ I("div", { children: [
|
|
1674
1667
|
/* @__PURE__ */ o("h5", { children: a.t("sheets-table.defaultStyle") }),
|
|
1675
|
-
/* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children:
|
|
1676
|
-
var
|
|
1677
|
-
const
|
|
1678
|
-
return /* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children: k.map((m) => {
|
|
1669
|
+
var Se, _e, He, Ve, Ae, Ue, We, je;
|
|
1670
|
+
const w = d.getDefaultRangeThemeStyle(m), z = ((_e = (Se = w == null ? void 0 : w.getHeaderRowStyle()) == null ? void 0 : Se.bg) == null ? void 0 : _e.rgb) || ve, K = ((Ve = (He = w == null ? void 0 : w.getFirstRowStyle()) == null ? void 0 : He.bg) == null ? void 0 : Ve.rgb) || ve, se = ((Ue = (Ae = w == null ? void 0 : w.getSecondRowStyle()) == null ? void 0 : Ae.bg) == null ? void 0 : Ue.rgb) || ve, W = ((je = (We = w == null ? void 0 : w.getLastRowStyle()) == null ? void 0 : We.bg) == null ? void 0 : je.rgb) || ve;
|
|
1671
|
+
return /* @__PURE__ */ I(
|
|
1679
1672
|
"div",
|
|
1680
1673
|
{
|
|
1681
|
-
className: "univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px",
|
|
1674
|
+
className: O("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", {
|
|
1675
|
+
"univer-border-blue-500": m === T.theme
|
|
1676
|
+
}),
|
|
1682
1677
|
onClick: () => Q(m),
|
|
1683
|
-
style: {
|
|
1684
|
-
border: m === T.theme ? Ft : Pe
|
|
1685
|
-
},
|
|
1686
1678
|
children: [
|
|
1687
|
-
/* @__PURE__ */ o("div", {
|
|
1688
|
-
/* @__PURE__ */ o("div", {
|
|
1689
|
-
/* @__PURE__ */ o("div", {
|
|
1690
|
-
/* @__PURE__ */ o("div", {
|
|
1679
|
+
/* @__PURE__ */ o("div", { style: { background: z, border: `${G}` } }),
|
|
1680
|
+
/* @__PURE__ */ o("div", { style: { background: K, border: `${G}` } }),
|
|
1681
|
+
/* @__PURE__ */ o("div", { style: { background: se, border: `${G}` } }),
|
|
1682
|
+
/* @__PURE__ */ o("div", { style: { background: W, border: `${G}` } })
|
|
1691
1683
|
]
|
|
1692
1684
|
},
|
|
1693
1685
|
m
|
|
1694
1686
|
);
|
|
1695
1687
|
}) }),
|
|
1696
1688
|
/* @__PURE__ */ o("h5", { children: a.t("sheets-table.customStyle") }),
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ I("div", { className: O("univer-w-full univer-rounded-sm", F), children: [
|
|
1690
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-flex-wrap univer-gap-2 univer-p-2", children: [
|
|
1699
1691
|
/* @__PURE__ */ o(
|
|
1700
1692
|
"div",
|
|
1701
1693
|
{
|
|
1702
|
-
className:
|
|
1694
|
+
className: O("univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px univer-text-center univer-leading-10", F),
|
|
1703
1695
|
onClick: U,
|
|
1704
1696
|
children: "+"
|
|
1705
1697
|
}
|
|
1706
1698
|
),
|
|
1707
|
-
|
|
1708
|
-
var
|
|
1709
|
-
const
|
|
1710
|
-
return /* @__PURE__ */
|
|
1699
|
+
f.map((m) => {
|
|
1700
|
+
var Se, _e, He, Ve, Ae, Ue, We, je;
|
|
1701
|
+
const w = d.getCustomRangeThemeStyle(e, m), z = (_e = (Se = w == null ? void 0 : w.getHeaderRowStyle()) == null ? void 0 : Se.bg) == null ? void 0 : _e.rgb, K = (Ve = (He = w == null ? void 0 : w.getFirstRowStyle()) == null ? void 0 : He.bg) == null ? void 0 : Ve.rgb, se = (Ue = (Ae = w == null ? void 0 : w.getSecondRowStyle()) == null ? void 0 : Ae.bg) == null ? void 0 : Ue.rgb, W = (je = (We = w == null ? void 0 : w.getLastRowStyle()) == null ? void 0 : We.bg) == null ? void 0 : je.rgb;
|
|
1702
|
+
return /* @__PURE__ */ I(
|
|
1711
1703
|
"div",
|
|
1712
1704
|
{
|
|
1713
|
-
className: "univer-relative univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px",
|
|
1705
|
+
className: O("univer-relative univer-h-10 univer-w-8 univer-cursor-pointer univer-border univer-border-solid univer-border-gray-200 univer-p-px", {
|
|
1706
|
+
"univer-border-blue-500": m === T.theme
|
|
1707
|
+
}),
|
|
1714
1708
|
onClick: () => Q(m),
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
},
|
|
1718
|
-
onMouseEnter: () => x(m),
|
|
1719
|
-
onMouseLeave: () => x(null),
|
|
1709
|
+
onMouseEnter: () => E(m),
|
|
1710
|
+
onMouseLeave: () => E(null),
|
|
1720
1711
|
children: [
|
|
1721
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background:
|
|
1722
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: K != null ? K :
|
|
1723
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: se != null ? se :
|
|
1724
|
-
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background:
|
|
1712
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: z != null ? z : G, border: `${z ? G : ze}` } }),
|
|
1713
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: K != null ? K : G, border: `${K ? G : ze}` } }),
|
|
1714
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: se != null ? se : G, border: `${se ? G : ze}` } }),
|
|
1715
|
+
/* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: W != null ? W : G, border: `${W ? G : ze}` } }),
|
|
1725
1716
|
/* @__PURE__ */ o(
|
|
1726
1717
|
"div",
|
|
1727
1718
|
{
|
|
1728
1719
|
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]",
|
|
1729
|
-
style: { display:
|
|
1730
|
-
onClick: (
|
|
1731
|
-
|
|
1720
|
+
style: { display: H === m ? "block" : "none" },
|
|
1721
|
+
onClick: (En) => {
|
|
1722
|
+
En.stopPropagation(), Me(m);
|
|
1732
1723
|
},
|
|
1733
1724
|
children: "x"
|
|
1734
1725
|
}
|
|
@@ -1739,80 +1730,86 @@ const Ni = (n) => {
|
|
|
1739
1730
|
);
|
|
1740
1731
|
})
|
|
1741
1732
|
] }),
|
|
1742
|
-
y && /* @__PURE__ */
|
|
1733
|
+
y && /* @__PURE__ */ I(Rt, { children: [
|
|
1743
1734
|
/* @__PURE__ */ o("div", { className: "univer-h-px univer-w-full univer-bg-gray-200" }),
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-flex-col univer-gap-2 univer-p-2", children: [
|
|
1736
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1746
1737
|
/* @__PURE__ */ o(
|
|
1747
1738
|
"div",
|
|
1748
1739
|
{
|
|
1749
|
-
className:
|
|
1740
|
+
className: O("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", F, {
|
|
1741
|
+
"univer-text-white": ce,
|
|
1742
|
+
"univer-text-gray-900": !ce
|
|
1743
|
+
}),
|
|
1750
1744
|
style: {
|
|
1751
|
-
background:
|
|
1752
|
-
color: new oe(f).isDark() ? "#fff" : "#000"
|
|
1745
|
+
background: p
|
|
1753
1746
|
},
|
|
1754
1747
|
children: a.t("sheets-table.header")
|
|
1755
1748
|
}
|
|
1756
1749
|
),
|
|
1757
1750
|
/* @__PURE__ */ o(
|
|
1758
|
-
|
|
1751
|
+
Le,
|
|
1759
1752
|
{
|
|
1760
1753
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1761
|
-
|
|
1754
|
+
Xe,
|
|
1762
1755
|
{
|
|
1763
|
-
value:
|
|
1756
|
+
value: p,
|
|
1764
1757
|
onChange: (m) => {
|
|
1765
|
-
const
|
|
1758
|
+
const w = Pt("headerRowStyle", {
|
|
1766
1759
|
bg: {
|
|
1767
1760
|
rgb: m
|
|
1768
1761
|
},
|
|
1769
1762
|
cl: {
|
|
1770
|
-
rgb: new
|
|
1763
|
+
rgb: new he(m).isDark() ? "#fff" : "#000"
|
|
1771
1764
|
}
|
|
1772
1765
|
});
|
|
1773
|
-
ee(c.getTableStyleId(), { headerRowStyle:
|
|
1766
|
+
ee(c.getTableStyleId(), { headerRowStyle: w });
|
|
1774
1767
|
}
|
|
1775
1768
|
}
|
|
1776
1769
|
) }),
|
|
1777
|
-
children: /* @__PURE__ */
|
|
1770
|
+
children: /* @__PURE__ */ I(
|
|
1778
1771
|
"div",
|
|
1779
1772
|
{
|
|
1780
|
-
className:
|
|
1773
|
+
className: O("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", F),
|
|
1781
1774
|
children: [
|
|
1782
1775
|
/* @__PURE__ */ o(
|
|
1783
1776
|
"div",
|
|
1784
1777
|
{
|
|
1785
|
-
className:
|
|
1778
|
+
className: O("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", F, {
|
|
1779
|
+
"univer-text-white": ce,
|
|
1780
|
+
"univer-text-gray-900": !ce
|
|
1781
|
+
}),
|
|
1786
1782
|
style: {
|
|
1787
|
-
background:
|
|
1788
|
-
color: new oe(f).isDark() ? "#fff" : "#000"
|
|
1783
|
+
background: p
|
|
1789
1784
|
}
|
|
1790
1785
|
}
|
|
1791
1786
|
),
|
|
1792
|
-
/* @__PURE__ */ o(
|
|
1787
|
+
/* @__PURE__ */ o(Ze, { className: "univer-h-2 univer-w-2" })
|
|
1793
1788
|
]
|
|
1794
1789
|
}
|
|
1795
1790
|
)
|
|
1796
1791
|
}
|
|
1797
1792
|
)
|
|
1798
1793
|
] }),
|
|
1799
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1800
1795
|
/* @__PURE__ */ o(
|
|
1801
1796
|
"div",
|
|
1802
1797
|
{
|
|
1803
|
-
className:
|
|
1798
|
+
className: O("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", F, {
|
|
1799
|
+
"univer-text-white": Ce,
|
|
1800
|
+
"univer-text-gray-900": !Ce
|
|
1801
|
+
}),
|
|
1804
1802
|
style: {
|
|
1805
|
-
background: L
|
|
1806
|
-
color: new oe(L).isDark() ? "#fff" : "#000"
|
|
1803
|
+
background: L
|
|
1807
1804
|
},
|
|
1808
1805
|
children: a.t("sheets-table.firstLine")
|
|
1809
1806
|
}
|
|
1810
1807
|
),
|
|
1811
1808
|
/* @__PURE__ */ o(
|
|
1812
|
-
|
|
1809
|
+
Le,
|
|
1813
1810
|
{
|
|
1814
1811
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1815
|
-
|
|
1812
|
+
Xe,
|
|
1816
1813
|
{
|
|
1817
1814
|
value: L,
|
|
1818
1815
|
onChange: (m) => {
|
|
@@ -1822,127 +1819,131 @@ const Ni = (n) => {
|
|
|
1822
1819
|
rgb: m
|
|
1823
1820
|
},
|
|
1824
1821
|
cl: {
|
|
1825
|
-
rgb: new
|
|
1822
|
+
rgb: new he(m).isDark() ? "#fff" : "#000"
|
|
1826
1823
|
}
|
|
1827
1824
|
}
|
|
1828
1825
|
});
|
|
1829
1826
|
}
|
|
1830
1827
|
}
|
|
1831
1828
|
) }),
|
|
1832
|
-
children: /* @__PURE__ */
|
|
1829
|
+
children: /* @__PURE__ */ I(
|
|
1833
1830
|
"div",
|
|
1834
1831
|
{
|
|
1835
|
-
className:
|
|
1832
|
+
className: O("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", F),
|
|
1836
1833
|
children: [
|
|
1837
1834
|
/* @__PURE__ */ o(
|
|
1838
1835
|
"div",
|
|
1839
1836
|
{
|
|
1840
|
-
className:
|
|
1837
|
+
className: O("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", F),
|
|
1841
1838
|
style: { background: L }
|
|
1842
1839
|
}
|
|
1843
1840
|
),
|
|
1844
|
-
/* @__PURE__ */ o(
|
|
1841
|
+
/* @__PURE__ */ o(Ze, { className: "univer-h-2 univer-w-2" })
|
|
1845
1842
|
]
|
|
1846
1843
|
}
|
|
1847
1844
|
)
|
|
1848
1845
|
}
|
|
1849
1846
|
)
|
|
1850
1847
|
] }),
|
|
1851
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1852
1849
|
/* @__PURE__ */ o(
|
|
1853
1850
|
"div",
|
|
1854
1851
|
{
|
|
1855
|
-
className:
|
|
1852
|
+
className: O("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", F, {
|
|
1853
|
+
"univer-text-white": ue,
|
|
1854
|
+
"univer-text-gray-900": !ue
|
|
1855
|
+
}),
|
|
1856
1856
|
style: {
|
|
1857
|
-
background:
|
|
1858
|
-
color: new oe(M).isDark() ? "#fff" : "#000"
|
|
1857
|
+
background: R
|
|
1859
1858
|
},
|
|
1860
1859
|
children: a.t("sheets-table.secondLine")
|
|
1861
1860
|
}
|
|
1862
1861
|
),
|
|
1863
1862
|
/* @__PURE__ */ o(
|
|
1864
|
-
|
|
1863
|
+
Le,
|
|
1865
1864
|
{
|
|
1866
1865
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1867
|
-
|
|
1866
|
+
Xe,
|
|
1868
1867
|
{
|
|
1869
|
-
value:
|
|
1868
|
+
value: R,
|
|
1870
1869
|
onChange: (m) => ee(c.getTableStyleId(), {
|
|
1871
1870
|
secondRowStyle: {
|
|
1872
1871
|
bg: {
|
|
1873
1872
|
rgb: m
|
|
1874
1873
|
},
|
|
1875
1874
|
cl: {
|
|
1876
|
-
rgb: new
|
|
1875
|
+
rgb: new he(m).isDark() ? "#fff" : "#000"
|
|
1877
1876
|
}
|
|
1878
1877
|
}
|
|
1879
1878
|
})
|
|
1880
1879
|
}
|
|
1881
1880
|
) }),
|
|
1882
|
-
children: /* @__PURE__ */
|
|
1881
|
+
children: /* @__PURE__ */ I(
|
|
1883
1882
|
"div",
|
|
1884
1883
|
{
|
|
1885
|
-
className:
|
|
1884
|
+
className: O("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", F),
|
|
1886
1885
|
children: [
|
|
1887
1886
|
/* @__PURE__ */ o(
|
|
1888
1887
|
"div",
|
|
1889
1888
|
{
|
|
1890
|
-
className:
|
|
1891
|
-
style: { background:
|
|
1889
|
+
className: O("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", F),
|
|
1890
|
+
style: { background: R }
|
|
1892
1891
|
}
|
|
1893
1892
|
),
|
|
1894
|
-
/* @__PURE__ */ o(
|
|
1893
|
+
/* @__PURE__ */ o(Ze, { className: "univer-h-2 univer-w-2" })
|
|
1895
1894
|
]
|
|
1896
1895
|
}
|
|
1897
1896
|
)
|
|
1898
1897
|
}
|
|
1899
1898
|
)
|
|
1900
1899
|
] }),
|
|
1901
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
|
|
1902
1901
|
/* @__PURE__ */ o(
|
|
1903
1902
|
"div",
|
|
1904
1903
|
{
|
|
1905
|
-
className:
|
|
1904
|
+
className: O("univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center univer-leading-9", F, {
|
|
1905
|
+
"univer-text-white": b,
|
|
1906
|
+
"univer-text-gray-900": !b
|
|
1907
|
+
}),
|
|
1906
1908
|
style: {
|
|
1907
|
-
background: C
|
|
1908
|
-
color: new oe(C).isDark() ? "#fff" : "#000"
|
|
1909
|
+
background: C
|
|
1909
1910
|
},
|
|
1910
1911
|
children: a.t("sheets-table.footer")
|
|
1911
1912
|
}
|
|
1912
1913
|
),
|
|
1913
1914
|
/* @__PURE__ */ o(
|
|
1914
|
-
|
|
1915
|
+
Le,
|
|
1915
1916
|
{
|
|
1916
1917
|
overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
|
|
1917
|
-
|
|
1918
|
+
Xe,
|
|
1918
1919
|
{
|
|
1919
1920
|
value: C,
|
|
1920
1921
|
onChange: (m) => {
|
|
1921
|
-
const
|
|
1922
|
+
const w = Pt("lastRowStyle", {
|
|
1922
1923
|
bg: {
|
|
1923
1924
|
rgb: m
|
|
1924
1925
|
},
|
|
1925
1926
|
cl: {
|
|
1926
|
-
rgb: new
|
|
1927
|
+
rgb: new he(m).isDark() ? "#fff" : "#000"
|
|
1927
1928
|
}
|
|
1928
1929
|
});
|
|
1929
|
-
ee(c.getTableStyleId(), { lastRowStyle:
|
|
1930
|
+
ee(c.getTableStyleId(), { lastRowStyle: w });
|
|
1930
1931
|
}
|
|
1931
1932
|
}
|
|
1932
1933
|
) }),
|
|
1933
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ I(
|
|
1934
1935
|
"div",
|
|
1935
1936
|
{
|
|
1936
|
-
className:
|
|
1937
|
+
className: O("univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-rounded-sm univer-bg-white univer-p-1", F),
|
|
1937
1938
|
children: [
|
|
1938
1939
|
/* @__PURE__ */ o(
|
|
1939
1940
|
"div",
|
|
1940
1941
|
{
|
|
1941
|
-
className:
|
|
1942
|
+
className: O("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", F),
|
|
1942
1943
|
style: { background: C }
|
|
1943
1944
|
}
|
|
1944
1945
|
),
|
|
1945
|
-
/* @__PURE__ */ o(
|
|
1946
|
+
/* @__PURE__ */ o(Ze, { className: "univer-h-2 univer-w-2" })
|
|
1946
1947
|
]
|
|
1947
1948
|
}
|
|
1948
1949
|
)
|
|
@@ -1952,87 +1953,88 @@ const Ni = (n) => {
|
|
|
1952
1953
|
] })
|
|
1953
1954
|
] })
|
|
1954
1955
|
] })
|
|
1955
|
-
] })
|
|
1956
|
-
},
|
|
1957
|
-
function
|
|
1956
|
+
] });
|
|
1957
|
+
}, yn = "sheet.table.context-insert_menu-id", Rn = "sheet.table.context-remove_menu-id";
|
|
1958
|
+
function Pi(t) {
|
|
1958
1959
|
return {
|
|
1959
|
-
id:
|
|
1960
|
-
type:
|
|
1961
|
-
icon:
|
|
1960
|
+
id: Et.id,
|
|
1961
|
+
type: Re.BUTTON,
|
|
1962
|
+
icon: vn,
|
|
1962
1963
|
tooltip: "sheets-table.title",
|
|
1963
|
-
title: "sheets-table.title"
|
|
1964
|
+
title: "sheets-table.title",
|
|
1965
|
+
disabled$: or(t, {}, !0)
|
|
1964
1966
|
};
|
|
1965
1967
|
}
|
|
1966
|
-
function
|
|
1968
|
+
function Oi(t) {
|
|
1967
1969
|
return {
|
|
1968
|
-
id:
|
|
1969
|
-
type:
|
|
1970
|
-
icon: "
|
|
1970
|
+
id: yn,
|
|
1971
|
+
type: Re.SUBITEMS,
|
|
1972
|
+
icon: "InsertDoubleIcon",
|
|
1971
1973
|
title: "sheets-table.insert.main",
|
|
1972
|
-
hidden$:
|
|
1974
|
+
hidden$: Mn(t)
|
|
1973
1975
|
};
|
|
1974
1976
|
}
|
|
1975
|
-
function
|
|
1977
|
+
function Di(t) {
|
|
1976
1978
|
return {
|
|
1977
|
-
id:
|
|
1978
|
-
type:
|
|
1979
|
-
icon: "
|
|
1979
|
+
id: Rn,
|
|
1980
|
+
type: Re.SUBITEMS,
|
|
1981
|
+
icon: "ReduceDoubleIcon",
|
|
1980
1982
|
title: "sheets-table.remove.main",
|
|
1981
|
-
hidden$:
|
|
1983
|
+
hidden$: Mn(t)
|
|
1982
1984
|
};
|
|
1983
1985
|
}
|
|
1984
|
-
function
|
|
1986
|
+
function Bi(t) {
|
|
1985
1987
|
return {
|
|
1986
|
-
id:
|
|
1987
|
-
type:
|
|
1988
|
+
id: en.id,
|
|
1989
|
+
type: Re.BUTTON,
|
|
1988
1990
|
title: "sheets-table.insert.row",
|
|
1989
|
-
hidden$:
|
|
1991
|
+
hidden$: xn(t)
|
|
1990
1992
|
};
|
|
1991
1993
|
}
|
|
1992
|
-
function
|
|
1994
|
+
function Fi(t) {
|
|
1993
1995
|
return {
|
|
1994
|
-
id:
|
|
1996
|
+
id: Jt.id,
|
|
1995
1997
|
title: "sheets-table.insert.col",
|
|
1996
|
-
type:
|
|
1998
|
+
type: Re.BUTTON
|
|
1997
1999
|
};
|
|
1998
2000
|
}
|
|
1999
|
-
function
|
|
2001
|
+
function Hi(t) {
|
|
2000
2002
|
return {
|
|
2001
|
-
id:
|
|
2002
|
-
type:
|
|
2003
|
+
id: Kt.id,
|
|
2004
|
+
type: Re.BUTTON,
|
|
2003
2005
|
title: "sheets-table.remove.row",
|
|
2004
|
-
hidden$:
|
|
2006
|
+
hidden$: xn(t)
|
|
2005
2007
|
};
|
|
2006
2008
|
}
|
|
2007
|
-
function
|
|
2009
|
+
function Vi(t) {
|
|
2008
2010
|
return {
|
|
2009
|
-
id:
|
|
2011
|
+
id: zt.id,
|
|
2010
2012
|
title: "sheets-table.remove.col",
|
|
2011
|
-
type:
|
|
2013
|
+
type: Re.BUTTON
|
|
2012
2014
|
};
|
|
2013
2015
|
}
|
|
2014
|
-
function
|
|
2015
|
-
const e =
|
|
2016
|
-
return
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2016
|
+
function Mn(t) {
|
|
2017
|
+
const e = t.get(dt);
|
|
2018
|
+
return t.get(fe).getCurrentTypeOfUnit$(ot.UNIVER_SHEET).pipe(
|
|
2019
|
+
Ie((i) => i ? i.activeSheet$.pipe(
|
|
2020
|
+
Ie((a) => a ? e.selectionMoveEnd$.pipe(
|
|
2021
|
+
Ie((s) => {
|
|
2020
2022
|
if (!s.length || s.length > 1) return J(!0);
|
|
2021
|
-
const d = s[0].range, u =
|
|
2023
|
+
const d = s[0].range, u = t.get(tn).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), d);
|
|
2022
2024
|
return J(!u);
|
|
2023
2025
|
})
|
|
2024
2026
|
) : J(!0))
|
|
2025
2027
|
) : J(!0))
|
|
2026
2028
|
);
|
|
2027
2029
|
}
|
|
2028
|
-
function
|
|
2029
|
-
const e =
|
|
2030
|
-
return
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2030
|
+
function xn(t) {
|
|
2031
|
+
const e = t.get(dt);
|
|
2032
|
+
return t.get(fe).getCurrentTypeOfUnit$(ot.UNIVER_SHEET).pipe(
|
|
2033
|
+
Ie((i) => i ? i.activeSheet$.pipe(
|
|
2034
|
+
Ie((a) => a ? e.selectionMoveEnd$.pipe(
|
|
2035
|
+
Ie((s) => {
|
|
2034
2036
|
if (!s.length || s.length > 1) return J(!0);
|
|
2035
|
-
const d = s[0].range, u =
|
|
2037
|
+
const d = s[0].range, u = t.get(tn).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), d);
|
|
2036
2038
|
if (!u)
|
|
2037
2039
|
return J(!0);
|
|
2038
2040
|
const g = u.getRange();
|
|
@@ -2042,97 +2044,97 @@ function yn(n) {
|
|
|
2042
2044
|
) : J(!0))
|
|
2043
2045
|
);
|
|
2044
2046
|
}
|
|
2045
|
-
const
|
|
2046
|
-
[
|
|
2047
|
-
[
|
|
2047
|
+
const Ai = {
|
|
2048
|
+
[mr.ORGANIZATION]: {
|
|
2049
|
+
[Et.id]: {
|
|
2048
2050
|
order: 0,
|
|
2049
|
-
menuItemFactory:
|
|
2051
|
+
menuItemFactory: Pi
|
|
2050
2052
|
}
|
|
2051
2053
|
},
|
|
2052
|
-
[
|
|
2053
|
-
[
|
|
2054
|
-
[
|
|
2054
|
+
[gr.MAIN_AREA]: {
|
|
2055
|
+
[br.LAYOUT]: {
|
|
2056
|
+
[yn]: {
|
|
2055
2057
|
order: 5,
|
|
2056
|
-
menuItemFactory:
|
|
2057
|
-
[
|
|
2058
|
+
menuItemFactory: Oi,
|
|
2059
|
+
[en.id]: {
|
|
2058
2060
|
order: 1,
|
|
2059
|
-
menuItemFactory:
|
|
2061
|
+
menuItemFactory: Bi
|
|
2060
2062
|
},
|
|
2061
|
-
[
|
|
2063
|
+
[Jt.id]: {
|
|
2062
2064
|
order: 2,
|
|
2063
|
-
menuItemFactory:
|
|
2065
|
+
menuItemFactory: Fi
|
|
2064
2066
|
}
|
|
2065
2067
|
},
|
|
2066
|
-
[
|
|
2068
|
+
[Rn]: {
|
|
2067
2069
|
order: 6,
|
|
2068
|
-
menuItemFactory:
|
|
2069
|
-
[
|
|
2070
|
+
menuItemFactory: Di,
|
|
2071
|
+
[Kt.id]: {
|
|
2070
2072
|
order: 1,
|
|
2071
|
-
menuItemFactory:
|
|
2073
|
+
menuItemFactory: Hi
|
|
2072
2074
|
},
|
|
2073
|
-
[
|
|
2075
|
+
[zt.id]: {
|
|
2074
2076
|
order: 2,
|
|
2075
|
-
menuItemFactory:
|
|
2077
|
+
menuItemFactory: Vi
|
|
2076
2078
|
}
|
|
2077
2079
|
}
|
|
2078
2080
|
}
|
|
2079
2081
|
}
|
|
2080
2082
|
};
|
|
2081
|
-
var
|
|
2082
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2083
|
-
(s =
|
|
2083
|
+
var Ui = Object.getOwnPropertyDescriptor, Wi = (t, e, n, r) => {
|
|
2084
|
+
for (var i = r > 1 ? void 0 : r ? Ui(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
2085
|
+
(s = t[a]) && (i = s(i) || i);
|
|
2084
2086
|
return i;
|
|
2085
|
-
},
|
|
2086
|
-
let
|
|
2087
|
-
constructor(
|
|
2088
|
-
super(), this._componentManager =
|
|
2087
|
+
}, jt = (t, e) => (n, r) => e(n, r, t);
|
|
2088
|
+
let at = class extends Pe {
|
|
2089
|
+
constructor(t, e) {
|
|
2090
|
+
super(), this._componentManager = t, this._menuManagerService = e, this._initComponents(), this._initMenu();
|
|
2089
2091
|
}
|
|
2090
2092
|
_initComponents() {
|
|
2091
2093
|
[
|
|
2092
|
-
[
|
|
2093
|
-
[
|
|
2094
|
-
[
|
|
2095
|
-
].forEach(([
|
|
2096
|
-
this.disposeWithMe(this._componentManager.register(
|
|
2094
|
+
[vn, Tn],
|
|
2095
|
+
[Ee, $i],
|
|
2096
|
+
[gn, ki]
|
|
2097
|
+
].forEach(([t, e]) => {
|
|
2098
|
+
this.disposeWithMe(this._componentManager.register(t, e));
|
|
2097
2099
|
});
|
|
2098
2100
|
}
|
|
2099
2101
|
_initMenu() {
|
|
2100
|
-
this._menuManagerService.mergeMenu(
|
|
2102
|
+
this._menuManagerService.mergeMenu(Ai);
|
|
2101
2103
|
}
|
|
2102
2104
|
};
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
],
|
|
2107
|
-
var
|
|
2108
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2109
|
-
(s =
|
|
2105
|
+
at = Wi([
|
|
2106
|
+
jt(0, x(nn)),
|
|
2107
|
+
jt(1, x(pr))
|
|
2108
|
+
], at);
|
|
2109
|
+
var ji = Object.getOwnPropertyDescriptor, Zi = (t, e, n, r) => {
|
|
2110
|
+
for (var i = r > 1 ? void 0 : r ? ji(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
2111
|
+
(s = t[a]) && (i = s(i) || i);
|
|
2110
2112
|
return i;
|
|
2111
|
-
},
|
|
2112
|
-
let
|
|
2113
|
-
constructor(
|
|
2114
|
-
super(), this._context =
|
|
2113
|
+
}, nt = (t, e) => (n, r) => e(n, r, t);
|
|
2114
|
+
let wt = class extends Gt {
|
|
2115
|
+
constructor(t, e, n, r, i) {
|
|
2116
|
+
super(), this._context = t, this._injector = e, this._sheetSkeletonManagerService = n, this._tableManager = r, this._sheetTableThemeUIController = i, this._initListener();
|
|
2115
2117
|
}
|
|
2116
2118
|
_dirtySkeleton() {
|
|
2117
2119
|
var e;
|
|
2118
2120
|
(e = this._context.mainComponent) == null || e.makeDirty();
|
|
2119
|
-
const
|
|
2120
|
-
if (
|
|
2121
|
-
const
|
|
2122
|
-
this._sheetSkeletonManagerService.reCalculate(
|
|
2121
|
+
const t = this._sheetSkeletonManagerService.getCurrentParam();
|
|
2122
|
+
if (t) {
|
|
2123
|
+
const n = { ...t, dirty: !0 };
|
|
2124
|
+
this._sheetSkeletonManagerService.reCalculate(n);
|
|
2123
2125
|
}
|
|
2124
2126
|
}
|
|
2125
2127
|
_initListener() {
|
|
2126
|
-
const
|
|
2128
|
+
const t = this._tableManager, e = this._dirtySkeleton.bind(this);
|
|
2127
2129
|
this.disposeWithMe(
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2130
|
+
yt(
|
|
2131
|
+
t.tableAdd$,
|
|
2132
|
+
t.tableDelete$,
|
|
2133
|
+
t.tableNameChanged$,
|
|
2134
|
+
t.tableRangeChanged$,
|
|
2135
|
+
t.tableThemeChanged$,
|
|
2136
|
+
t.tableFilterChanged$,
|
|
2137
|
+
t.tableInitStatus$,
|
|
2136
2138
|
this._sheetTableThemeUIController.refreshTable$
|
|
2137
2139
|
).subscribe(
|
|
2138
2140
|
e
|
|
@@ -2140,50 +2142,50 @@ let Ct = class extends qt {
|
|
|
2140
2142
|
);
|
|
2141
2143
|
}
|
|
2142
2144
|
};
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
],
|
|
2149
|
-
var
|
|
2150
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2151
|
-
(s =
|
|
2145
|
+
wt = Zi([
|
|
2146
|
+
nt(1, x(Oe)),
|
|
2147
|
+
nt(2, x(ct)),
|
|
2148
|
+
nt(3, x(ne)),
|
|
2149
|
+
nt(4, x(ye))
|
|
2150
|
+
], wt);
|
|
2151
|
+
var qi = Object.getOwnPropertyDescriptor, Yi = (t, e, n, r) => {
|
|
2152
|
+
for (var i = r > 1 ? void 0 : r ? qi(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
2153
|
+
(s = t[a]) && (i = s(i) || i);
|
|
2152
2154
|
return i;
|
|
2153
|
-
},
|
|
2154
|
-
let
|
|
2155
|
-
constructor(
|
|
2156
|
-
super(), this._sheetInterceptorService =
|
|
2155
|
+
}, ft = (t, e) => (n, r) => e(n, r, t);
|
|
2156
|
+
let st = class extends Pe {
|
|
2157
|
+
constructor(t, e, n) {
|
|
2158
|
+
super(), this._sheetInterceptorService = t, this._univerInstanceService = e, this._tableManager = n, this._initSelectionChange();
|
|
2157
2159
|
}
|
|
2158
2160
|
_initSelectionChange() {
|
|
2159
2161
|
this.disposeWithMe(
|
|
2160
2162
|
this._sheetInterceptorService.interceptCommand({
|
|
2161
|
-
getMutations: (
|
|
2162
|
-
if (
|
|
2163
|
-
const e =
|
|
2163
|
+
getMutations: (t) => {
|
|
2164
|
+
if (t.id === cr.id) {
|
|
2165
|
+
const e = ut(this._univerInstanceService);
|
|
2164
2166
|
if (!e)
|
|
2165
2167
|
return { redos: [], undos: [] };
|
|
2166
|
-
const
|
|
2168
|
+
const n = t.params, { range: r } = n, { unitId: i, subUnitId: a, worksheet: s } = e, d = this._tableManager.getTablesBySubunitId(i, a).find((h) => {
|
|
2167
2169
|
const u = h.getRange();
|
|
2168
|
-
return
|
|
2170
|
+
return me.contains(u, r);
|
|
2169
2171
|
});
|
|
2170
2172
|
if (d) {
|
|
2171
2173
|
const h = d.getRange(), u = {
|
|
2172
2174
|
...h,
|
|
2173
2175
|
startRow: h.startRow + 1
|
|
2174
2176
|
};
|
|
2175
|
-
return
|
|
2177
|
+
return me.equals(h, r) ? { undos: [], redos: [] } : me.equals(u, r) ? {
|
|
2176
2178
|
undos: [],
|
|
2177
2179
|
redos: [
|
|
2178
2180
|
{
|
|
2179
|
-
id:
|
|
2181
|
+
id: Ft.id,
|
|
2180
2182
|
params: {
|
|
2181
2183
|
unitId: i,
|
|
2182
2184
|
subUnitId: a,
|
|
2183
2185
|
selections: [
|
|
2184
2186
|
{
|
|
2185
2187
|
range: h,
|
|
2186
|
-
primary:
|
|
2188
|
+
primary: Bt(h, s)
|
|
2187
2189
|
}
|
|
2188
2190
|
]
|
|
2189
2191
|
}
|
|
@@ -2193,14 +2195,14 @@ let rt = class extends He {
|
|
|
2193
2195
|
undos: [],
|
|
2194
2196
|
redos: [
|
|
2195
2197
|
{
|
|
2196
|
-
id:
|
|
2198
|
+
id: Ft.id,
|
|
2197
2199
|
params: {
|
|
2198
2200
|
unitId: i,
|
|
2199
2201
|
subUnitId: a,
|
|
2200
2202
|
selections: [
|
|
2201
2203
|
{
|
|
2202
2204
|
range: u,
|
|
2203
|
-
primary:
|
|
2205
|
+
primary: Bt(u, s)
|
|
2204
2206
|
}
|
|
2205
2207
|
]
|
|
2206
2208
|
}
|
|
@@ -2215,72 +2217,72 @@ let rt = class extends He {
|
|
|
2215
2217
|
);
|
|
2216
2218
|
}
|
|
2217
2219
|
};
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
],
|
|
2223
|
-
var
|
|
2224
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2225
|
-
(s =
|
|
2220
|
+
st = Yi([
|
|
2221
|
+
ft(0, x(un)),
|
|
2222
|
+
ft(1, x(fe)),
|
|
2223
|
+
ft(2, x(ne))
|
|
2224
|
+
], st);
|
|
2225
|
+
var Qi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Xi = (t, e, n) => e in t ? Qi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, zi = (t, e, n, r) => {
|
|
2226
|
+
for (var i = r > 1 ? void 0 : r ? Gi(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
2227
|
+
(s = t[a]) && (i = s(i) || i);
|
|
2226
2228
|
return i;
|
|
2227
|
-
},
|
|
2228
|
-
let
|
|
2229
|
-
constructor(
|
|
2230
|
-
super(), this._config =
|
|
2231
|
-
const { menu: a, ...s } =
|
|
2229
|
+
}, rt = (t, e) => (n, r) => e(n, r, t), Nn = (t, e, n) => Xi(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2230
|
+
let lt = class extends Fn {
|
|
2231
|
+
constructor(t = Ut, e, n, r, i) {
|
|
2232
|
+
super(), this._config = t, this._injector = e, this._commandService = n, this._configService = r, this._renderManagerService = i;
|
|
2233
|
+
const { menu: a, ...s } = Hn(
|
|
2232
2234
|
{},
|
|
2233
|
-
|
|
2235
|
+
Ut,
|
|
2234
2236
|
this._config
|
|
2235
2237
|
);
|
|
2236
|
-
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(
|
|
2238
|
+
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(In, s), this._initRegisterCommand();
|
|
2237
2239
|
}
|
|
2238
2240
|
onStarting() {
|
|
2239
|
-
|
|
2240
|
-
[
|
|
2241
|
-
[
|
|
2242
|
-
[
|
|
2243
|
-
[
|
|
2244
|
-
[
|
|
2241
|
+
Vn(this._injector, [
|
|
2242
|
+
[ke],
|
|
2243
|
+
[$e],
|
|
2244
|
+
[at],
|
|
2245
|
+
[ye],
|
|
2246
|
+
[st]
|
|
2245
2247
|
]);
|
|
2246
2248
|
}
|
|
2247
2249
|
onReady() {
|
|
2248
|
-
|
|
2249
|
-
[
|
|
2250
|
-
[
|
|
2251
|
-
[
|
|
2252
|
-
[
|
|
2253
|
-
[
|
|
2250
|
+
An(this._injector, [
|
|
2251
|
+
[ke],
|
|
2252
|
+
[$e],
|
|
2253
|
+
[at],
|
|
2254
|
+
[ye],
|
|
2255
|
+
[st]
|
|
2254
2256
|
]);
|
|
2255
2257
|
}
|
|
2256
2258
|
onRendered() {
|
|
2257
2259
|
this._registerRenderModules();
|
|
2258
2260
|
}
|
|
2259
2261
|
_registerRenderModules() {
|
|
2260
|
-
const
|
|
2261
|
-
[
|
|
2262
|
-
[
|
|
2262
|
+
const t = [
|
|
2263
|
+
[Tt],
|
|
2264
|
+
[wt]
|
|
2263
2265
|
];
|
|
2264
|
-
this._config.hideAnchor !== !0 &&
|
|
2265
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
2266
|
+
this._config.hideAnchor !== !0 && t.push([it]), t.forEach((e) => {
|
|
2267
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(ot.UNIVER_SHEET, e));
|
|
2266
2268
|
});
|
|
2267
2269
|
}
|
|
2268
2270
|
_initRegisterCommand() {
|
|
2269
2271
|
[
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
].forEach((
|
|
2272
|
+
St,
|
|
2273
|
+
Et
|
|
2274
|
+
].forEach((t) => this._commandService.registerCommand(t));
|
|
2273
2275
|
}
|
|
2274
2276
|
};
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
],
|
|
2277
|
+
Nn(lt, "pluginName", Vr);
|
|
2278
|
+
Nn(lt, "type", ot.UNIVER_SHEET);
|
|
2279
|
+
lt = zi([
|
|
2280
|
+
Bn(tr),
|
|
2281
|
+
rt(1, x(Oe)),
|
|
2282
|
+
rt(2, x(le)),
|
|
2283
|
+
rt(3, Qt),
|
|
2284
|
+
rt(4, Xt)
|
|
2285
|
+
], lt);
|
|
2284
2286
|
export {
|
|
2285
|
-
|
|
2287
|
+
lt as UniverSheetsTableUIPlugin
|
|
2286
2288
|
};
|