@univerjs/sheets-table-ui 0.7.0-nightly.202505091607 → 0.7.0-nightly.202505111606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  var Rn = Object.defineProperty;
2
2
  var Nn = (n, e, t) => e in n ? Rn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var j = (n, e, t) => Nn(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as x, IUniverInstanceService as _e, ICommandService as ce, Disposable as He, ObjectMatrix as xn, cellToRange as At, Rectangle as Ce, LocaleService as ue, Injector as Ve, dayjs as be, IPermissionService as Ut, IContextService as St, CommandType as jt, IConfigService as Wt, ThemeService as En, RxDisposable as Zt, InterceptorEffectEnum as Ln, ErrorService as $n, ColorKit as oe, UniverInstanceType as st, DependentOn as On, Plugin as Pn, registerDependencies as kn, touchDependencies as Dn } from "@univerjs/core";
5
- import { IRenderManagerService as qt, SHEET_VIEWPORT_KEY as Bn, convertTransformToOffsetX as Fn, convertTransformToOffsetY as Hn, Rect as Rt, Shape as Vn } from "@univerjs/engine-render";
6
- import { TableManager as ne, SheetTableService as An, SetSheetTableFilterCommand as Nt, isConditionFilter as Un, isManualFilter as jn, TableDateCompareTypeEnum as s, TableStringCompareTypeEnum as W, TableConditionTypeEnum as V, TableNumberCompareTypeEnum as $, SheetsTableSortStateEnum as Qe, TableColumnFilterTypeEnum as xt, AddSheetTableCommand as Wn, SHEET_TABLE_CUSTOM_THEME_PREFIX as Zn, DeleteSheetTableCommand as qn, SetSheetTableCommand as bt, SheetsTableButtonStateEnum as $e, processStyleWithBorderStyle as Et, customEmptyThemeWithBorderStyle as Yn, AddTableThemeCommand as Qn, RemoveTableThemeCommand as zn, SheetTableRemoveColCommand as Yt, SheetTableRemoveRowCommand as Qt, SheetTableInsertColCommand as zt, SheetTableInsertRowCommand as Gt, SheetsTableController as Xt, UniverSheetTablePlugin as Gn } from "@univerjs/sheets-table";
7
- import { SheetCanvasPopManagerService as Xn, SheetSkeletonManagerService as lt, SheetScrollManagerService as Kn, SetZoomRatioOperation as Jn, SetScrollOperation as er, getSheetObject as tr, getCoordByCell as nr, SelectAllCommand as rr } from "@univerjs/sheets-ui";
8
- import { useDependency as R, ComponentManager as Kt, IDialogService as Jt, ISidebarService as ir, useObservable as Re, IUIPartsService as ar, BuiltInUIPart as sr, connectInjector as lr, MenuItemType as Ee, ContextMenuPosition as or, ContextMenuGroup as cr, RibbonStartGroup as ur, IMenuManagerService as dr } from "@univerjs/ui";
9
- import { startWith as en, distinctUntilChanged as hr, Subject as vr, BehaviorSubject as Lt, merge as _t, filter as gr, debounceTime as br, switchMap as Ne, of as J, map as mr, takeUntil as pr } from "rxjs";
10
- import { jsxs as _, jsx as o, Fragment as Tt } from "react/jsx-runtime";
11
- import { Dropdown as De, clsx as k, borderClassName as H, CascaderList as fr, Input as wt, InputNumber as dt, DatePicker as Cr, DateRangePicker as Sr, Select as _r, Checkbox as $t, scrollbarClassName as Tr, Segmented as wr, Button as Ze, ColorPicker as ze } from "@univerjs/design";
12
- import { SetRangeValuesMutation as Ir, WorkbookEditablePermission as tn, getSheetCommandTarget as ot, SheetsSelectionsService as ct, isSingleCellSelection as yr, expandToContinuousRange as Mr, SetRangeThemeMutation as nn, WorkbookPermissionService as rn, SheetRangeThemeModel as an, SheetInterceptorService as sn, INTERCEPTOR_POINT as Rr, RangeThemeStyle as Nr, getPrimaryForRange as Ot, SetSelectionsOperation as Pt } from "@univerjs/sheets";
3
+ var V = (n, e, t) => Nn(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as N, IUniverInstanceService as _e, ICommandService as ce, Disposable as He, ObjectMatrix as En, cellToRange as At, Rectangle as Ce, LocaleService as ue, Injector as Ve, dayjs as be, IPermissionService as Ut, IContextService as St, CommandType as Wt, IConfigService as jt, ThemeService as xn, RxDisposable as Zt, InterceptorEffectEnum as Ln, ErrorService as $n, ColorKit as oe, UniverInstanceType as at, DependentOn as On, Plugin as Pn, registerDependencies as kn, touchDependencies as Bn } from "@univerjs/core";
5
+ import { IRenderManagerService as qt, SHEET_VIEWPORT_KEY as Dn, convertTransformToOffsetX as Fn, convertTransformToOffsetY as Hn, Rect as Rt, Shape as Vn } from "@univerjs/engine-render";
6
+ import { TableManager as ne, SheetTableService as An, SetSheetTableFilterCommand as Nt, isConditionFilter as Un, isManualFilter as Wn, TableDateCompareTypeEnum as s, TableStringCompareTypeEnum as W, TableConditionTypeEnum as D, TableNumberCompareTypeEnum as $, SheetsTableSortStateEnum as Ye, TableColumnFilterTypeEnum as Et, AddSheetTableCommand as jn, SHEET_TABLE_CUSTOM_THEME_PREFIX as Zn, DeleteSheetTableCommand as qn, SetSheetTableCommand as bt, SheetsTableButtonStateEnum as $e, processStyleWithBorderStyle as xt, customEmptyThemeWithBorderStyle as Yn, AddTableThemeCommand as Qn, RemoveTableThemeCommand as zn, SheetTableRemoveColCommand as Yt, SheetTableRemoveRowCommand as Qt, SheetTableInsertColCommand as zt, SheetTableInsertRowCommand as Gt, SheetsTableController as Xt, UniverSheetTablePlugin as Gn } from "@univerjs/sheets-table";
7
+ import { SheetCanvasPopManagerService as Xn, SheetSkeletonManagerService as st, SheetScrollManagerService as Kn, SetZoomRatioOperation as Jn, SetScrollOperation as er, getSheetObject as tr, getCoordByCell as nr, SelectAllCommand as rr } from "@univerjs/sheets-ui";
8
+ import { useDependency as R, ComponentManager as Kt, IDialogService as Jt, ISidebarService as ir, useObservable as Me, IUIPartsService as ar, BuiltInUIPart as sr, connectInjector as lr, MenuItemType as Ee, ContextMenuPosition as or, ContextMenuGroup as cr, RibbonStartGroup as ur, IMenuManagerService as dr } from "@univerjs/ui";
9
+ import { startWith as en, distinctUntilChanged as hr, Subject as vr, BehaviorSubject as Lt, merge as _t, filter as gr, debounceTime as br, switchMap as Re, of as J, map as mr, takeUntil as pr } from "rxjs";
10
+ import { jsxs as w, jsx as o, Fragment as Tt } from "react/jsx-runtime";
11
+ import { Dropdown as Be, clsx as B, borderClassName as A, CascaderList as fr, Input as wt, InputNumber as dt, DatePicker as Cr, DateRangePicker as Sr, Select as _r, Checkbox as $t, scrollbarClassName as Tr, ButtonGroup as wr, Button as ye, Segmented as Ir, ColorPicker as Qe } from "@univerjs/design";
12
+ import { SetRangeValuesMutation as yr, WorkbookEditablePermission as tn, getSheetCommandTarget as lt, SheetsSelectionsService as ot, isSingleCellSelection as Mr, expandToContinuousRange as Rr, SetRangeThemeMutation as nn, WorkbookPermissionService as rn, SheetRangeThemeModel as an, SheetInterceptorService as sn, INTERCEPTOR_POINT as Nr, RangeThemeStyle as Er, getPrimaryForRange as Ot, SetSelectionsOperation as Pt } from "@univerjs/sheets";
13
13
  import { SortRangeCommand as xr, SortType as kt } from "@univerjs/sheets-sort";
14
- import { forwardRef as re, useRef as Er, createElement as ie, useState as q, useMemo as ln, useCallback as Dt, useEffect as on } from "react";
15
- import { serializeRange as Bt, deserializeRangeWithSheet as Lr } from "@univerjs/engine-formula";
16
- import { RangeSelector as $r } from "@univerjs/sheets-formula-ui";
17
- const Or = "SHEET_TABLE_UI_PLUGIN", pe = "SHEETS_TABLE_FILTER_PANEL_OPENED_KEY", Pr = "UNIVER_SHEET_Table_FILTER_PANEL_ID", cn = "TABLE_TOOLBAR_BUTTON", ke = "TABLE_SELECTOR_DIALOG", kr = "SHEET_TABLE_THEME_PANEL_ID", un = "SHEET_TABLE_THEME_PANEL", ht = "table-custom-", Dr = "table-default-", me = "rgb(255, 255, 255)", z = "none", Oe = "1px solid rgb(var(--grey-200))", Ft = "1px solid rgb(var(--blue-500))";
14
+ import { forwardRef as re, useRef as Lr, createElement as ie, useState as Z, useMemo as ln, useCallback as Bt, useEffect as on } from "react";
15
+ import { serializeRange as Dt, deserializeRangeWithSheet as $r } from "@univerjs/engine-formula";
16
+ import { RangeSelector as Or } from "@univerjs/sheets-formula-ui";
17
+ const Pr = "SHEET_TABLE_UI_PLUGIN", pe = "SHEETS_TABLE_FILTER_PANEL_OPENED_KEY", kr = "UNIVER_SHEET_Table_FILTER_PANEL_ID", cn = "TABLE_TOOLBAR_BUTTON", ke = "TABLE_SELECTOR_DIALOG", Br = "SHEET_TABLE_THEME_PANEL_ID", un = "SHEET_TABLE_THEME_PANEL", ht = "table-custom-", Dr = "table-default-", me = "rgb(255, 255, 255)", z = "none", Oe = "1px solid rgb(var(--grey-200))", Ft = "1px solid rgb(var(--blue-500))";
18
18
  var G = function() {
19
19
  return G = Object.assign || function(n) {
20
20
  for (var e, t = 1, r = arguments.length; t < r; t++) {
@@ -23,7 +23,7 @@ var G = function() {
23
23
  }
24
24
  return n;
25
25
  }, G.apply(this, arguments);
26
- }, Br = function(n, e) {
26
+ }, Fr = function(n, e) {
27
27
  var t = {};
28
28
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
29
29
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -31,15 +31,15 @@ var G = function() {
31
31
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
32
32
  return t;
33
33
  }, ae = re(function(n, e) {
34
- var t = n.icon, r = n.id, i = n.className, a = n.extend, l = Br(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), d = Er("_".concat(Vr()));
34
+ var t = n.icon, r = n.id, i = n.className, a = n.extend, l = Fr(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), d = Lr("_".concat(Ar()));
35
35
  return dn(t, "".concat(r), { defIds: t.defIds, idSuffix: d.current }, G({ ref: e, className: c }, l), a);
36
36
  });
37
37
  function dn(n, e, t, r, i) {
38
- return ie(n.tag, G(G({ key: e }, Fr(n, t, i)), r), (Hr(n, t).children || []).map(function(a, l) {
38
+ return ie(n.tag, G(G({ key: e }, Hr(n, t, i)), r), (Vr(n, t).children || []).map(function(a, l) {
39
39
  return dn(a, "".concat(e, "-").concat(n.tag, "-").concat(l), t, void 0, i);
40
40
  }));
41
41
  }
42
- function Fr(n, e, t) {
42
+ function Hr(n, e, t) {
43
43
  var r = G({}, n.attrs);
44
44
  t != null && t.colorChannel1 && r.fill === "colorChannel1" && (r.fill = t.colorChannel1), n.tag === "mask" && r.id && (r.id = r.id + e.idSuffix), Object.entries(r).forEach(function(a) {
45
45
  var l = a[0], c = a[1];
@@ -51,29 +51,29 @@ function Fr(n, e, t) {
51
51
  typeof c == "string" && (r[l] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
52
52
  })), r;
53
53
  }
54
- function Hr(n, e) {
54
+ function Vr(n, e) {
55
55
  var t, r = e.defIds;
56
56
  return !r || r.length === 0 ? n : n.tag === "defs" && (!((t = n.children) === null || t === void 0) && t.length) ? G(G({}, n), { children: n.children.map(function(i) {
57
57
  return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? G(G({}, i), { attrs: G(G({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
58
58
  }) }) : n;
59
59
  }
60
- function Vr() {
60
+ function Ar() {
61
61
  return Math.random().toString(36).substring(2, 8);
62
62
  }
63
63
  ae.displayName = "UniverIcon";
64
- var Ar = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, hn = re(function(n, e) {
64
+ var Ur = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z", fillRule: "evenodd", clipRule: "evenodd" } }] }, hn = re(function(n, e) {
65
65
  return ie(ae, Object.assign({}, n, {
66
66
  id: "ascending- single",
67
67
  ref: e,
68
- icon: Ar
68
+ icon: Ur
69
69
  }));
70
70
  });
71
71
  hn.displayName = "AscendingSingle";
72
- var Ur = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.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" } }] }, vn = re(function(n, e) {
72
+ var Wr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.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" } }] }, vn = re(function(n, e) {
73
73
  return ie(ae, Object.assign({}, n, {
74
74
  id: "delete-single",
75
75
  ref: e,
76
- icon: Ur
76
+ icon: Wr
77
77
  }));
78
78
  });
79
79
  vn.displayName = "DeleteSingle";
@@ -85,79 +85,79 @@ var jr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
85
85
  }));
86
86
  });
87
87
  gn.displayName = "DescendingSingle";
88
- var Wr = { tag: "svg", attrs: { 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" } }] }, We = re(function(n, e) {
88
+ var Zr = { tag: "svg", attrs: { 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" } }] }, We = re(function(n, e) {
89
89
  return ie(ae, Object.assign({}, n, {
90
90
  id: "dropdown-single",
91
91
  ref: e,
92
- icon: Wr
92
+ icon: Zr
93
93
  }));
94
94
  });
95
95
  We.displayName = "DropdownSingle";
96
- var Zr = { tag: "svg", attrs: { 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" } }] }, bn = re(function(n, e) {
96
+ var qr = { tag: "svg", attrs: { 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" } }] }, bn = re(function(n, e) {
97
97
  return ie(ae, Object.assign({}, n, {
98
98
  id: "grid-outline-single",
99
99
  ref: e,
100
- icon: Zr
100
+ icon: qr
101
101
  }));
102
102
  });
103
103
  bn.displayName = "GridOutlineSingle";
104
- var qr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, It = re(function(n, e) {
104
+ var Yr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, It = re(function(n, e) {
105
105
  return ie(ae, Object.assign({}, n, {
106
106
  id: "more-down-single",
107
107
  ref: e,
108
- icon: qr
108
+ icon: Yr
109
109
  }));
110
110
  });
111
111
  It.displayName = "MoreDownSingle";
112
- var Yr = { tag: "svg", attrs: { 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" } }] }, mn = re(function(n, e) {
112
+ var Qr = { tag: "svg", attrs: { 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" } }] }, mn = re(function(n, e) {
113
113
  return ie(ae, Object.assign({}, n, {
114
114
  id: "paint-bucket",
115
115
  ref: e,
116
- icon: Yr
116
+ icon: Qr
117
117
  }));
118
118
  });
119
119
  mn.displayName = "PaintBucket";
120
- var Qr = { tag: "svg", attrs: { 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" } }] }, pn = re(function(n, e) {
120
+ var zr = { tag: "svg", attrs: { 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" } }] }, pn = re(function(n, e) {
121
121
  return ie(ae, Object.assign({}, n, {
122
122
  id: "rename-single",
123
123
  ref: e,
124
- icon: Qr
124
+ icon: zr
125
125
  }));
126
126
  });
127
127
  pn.displayName = "RenameSingle";
128
- var zr = { tag: "svg", attrs: { 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" } }] }, fn = re(function(n, e) {
128
+ var Gr = { tag: "svg", attrs: { 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" } }] }, fn = re(function(n, e) {
129
129
  return ie(ae, Object.assign({}, n, {
130
130
  id: "table-single",
131
131
  ref: e,
132
- icon: zr
132
+ icon: Gr
133
133
  }));
134
134
  });
135
135
  fn.displayName = "TableSingle";
136
- var Se = /* @__PURE__ */ ((n) => (n.Items = "items", n.Condition = "condition", n))(Se || {}), Gr = Object.getOwnPropertyDescriptor, Xr = (n, e, t, r) => {
137
- for (var i = r > 1 ? void 0 : r ? Gr(e, t) : e, a = n.length - 1, l; a >= 0; a--)
136
+ var Se = /* @__PURE__ */ ((n) => (n.Items = "items", n.Condition = "condition", n))(Se || {}), Xr = Object.getOwnPropertyDescriptor, Kr = (n, e, t, r) => {
137
+ for (var i = r > 1 ? void 0 : r ? Xr(e, t) : e, a = n.length - 1, l; a >= 0; a--)
138
138
  (l = n[a]) && (i = l(i) || i);
139
139
  return i;
140
- }, Ge = (n, e) => (t, r) => e(t, r, n);
141
- let Be = class extends He {
140
+ }, ze = (n, e) => (t, r) => e(t, r, n);
141
+ let De = class extends He {
142
142
  constructor(e, t, r, i) {
143
143
  super();
144
- j(this, "_itemsCache", /* @__PURE__ */ new Map());
144
+ V(this, "_itemsCache", /* @__PURE__ */ new Map());
145
145
  this._tableManager = e, this._sheetTableService = t, this._univerInstanceService = r, this._commandService = i, this._registerTableFilterChangeEvent();
146
146
  }
147
147
  _registerTableFilterChangeEvent() {
148
148
  this._commandService.onCommandExecuted((e) => {
149
- if (e.id === Ir.id) {
149
+ if (e.id === yr.id) {
150
150
  const { unitId: t, subUnitId: r, cellValue: i } = e.params, a = this._tableManager.getTablesBySubunitId(t, r);
151
151
  if (!a.length)
152
152
  return;
153
- new xn(i).forValue((c, d, h) => {
154
- const u = At(c, d), g = a.find((S) => {
155
- const C = S.getTableFilterRange();
156
- return Ce.intersects(C, u);
153
+ new En(i).forValue((c, d, h) => {
154
+ const u = At(c, d), g = a.find((_) => {
155
+ const S = _.getTableFilterRange();
156
+ return Ce.intersects(S, u);
157
157
  });
158
158
  if (g) {
159
- const S = d - g.getRange().startColumn;
160
- this._itemsCache.delete(g.getId() + S);
159
+ const _ = d - g.getRange().startColumn;
160
+ this._itemsCache.delete(g.getId() + _);
161
161
  }
162
162
  });
163
163
  } else if (e.id === Nt.id) {
@@ -188,7 +188,7 @@ let Be = class extends He {
188
188
  const i = this._tableManager.getTable(e, t), a = [];
189
189
  if (i) {
190
190
  const l = i.getTableFilterColumn(r);
191
- l && jn(l) && a.push(...l.values);
191
+ l && Wn(l) && a.push(...l.values);
192
192
  }
193
193
  return a;
194
194
  }
@@ -213,34 +213,34 @@ let Be = class extends He {
213
213
  const l = a.getTableFilterRange(), { startRow: c, endRow: d, startColumn: h } = l, u = h + i, g = (O = this._univerInstanceService.getUnit(e)) == null ? void 0 : O.getSheetBySheetId(t);
214
214
  if (!g)
215
215
  return { data: [], itemsCountMap: /* @__PURE__ */ new Map(), allItemsCount: 0 };
216
- const S = [], C = /* @__PURE__ */ new Map();
216
+ const _ = [], S = /* @__PURE__ */ new Map();
217
217
  let T = 0;
218
- for (let p = c; p <= d; p++) {
219
- if (g.isRowFiltered(p))
218
+ for (let f = c; f <= d; f++) {
219
+ if (g.isRowFiltered(f))
220
220
  continue;
221
- const y = this._sheetTableService.getCellValueWithConditionType(g, p, u);
222
- C.has(y) || S.push({
221
+ const y = this._sheetTableService.getCellValueWithConditionType(g, f, u);
222
+ S.has(y) || _.push({
223
223
  title: y,
224
- key: `${u}_${p}`,
224
+ key: `${u}_${f}`,
225
225
  leaf: !0
226
- }), T++, C.set(y, (C.get(y) || 0) + 1);
226
+ }), T++, S.set(y, (S.get(y) || 0) + 1);
227
227
  }
228
- return this._itemsCache.set(r + i, { data: S, itemsCountMap: C, allItemsCount: T }), { data: S, itemsCountMap: C, allItemsCount: T };
228
+ return this._itemsCache.set(r + i, { data: _, itemsCountMap: S, allItemsCount: T }), { data: _, itemsCountMap: S, allItemsCount: T };
229
229
  }
230
230
  };
231
- Be = Xr([
232
- Ge(0, x(ne)),
233
- Ge(1, x(An)),
234
- Ge(2, x(_e)),
235
- Ge(3, ce)
236
- ], Be);
237
- var Z = /* @__PURE__ */ ((n) => (n.DatePicker = "DatePicker", n.DateRange = "DateRange", n.Input = "Input", n.Inputs = "Inputs", n.Select = "Select", n.None = "None", n))(Z || {});
238
- function Kr(n) {
231
+ De = Kr([
232
+ ze(0, N(ne)),
233
+ ze(1, N(An)),
234
+ ze(2, N(_e)),
235
+ ze(3, ce)
236
+ ], De);
237
+ var j = /* @__PURE__ */ ((n) => (n.DatePicker = "DatePicker", n.DateRange = "DateRange", n.Input = "Input", n.Inputs = "Inputs", n.Select = "Select", n.None = "None", n))(j || {});
238
+ function Jr(n) {
239
239
  const t = n.get(ue).t;
240
240
  return [
241
241
  {
242
- value: V.String,
243
- label: t(`sheets-table.condition.${V.String}`),
242
+ value: D.String,
243
+ label: t(`sheets-table.condition.${D.String}`),
244
244
  children: [
245
245
  {
246
246
  value: W.Equal,
@@ -269,8 +269,8 @@ function Kr(n) {
269
269
  ]
270
270
  },
271
271
  {
272
- value: V.Number,
273
- label: t(`sheets-table.condition.${V.Number}`),
272
+ value: D.Number,
273
+ label: t(`sheets-table.condition.${D.Number}`),
274
274
  children: [
275
275
  {
276
276
  value: $.Equal,
@@ -319,8 +319,8 @@ function Kr(n) {
319
319
  ]
320
320
  },
321
321
  {
322
- value: V.Date,
323
- label: t(`sheets-table.condition.${V.Date}`),
322
+ value: D.Date,
323
+ label: t(`sheets-table.condition.${D.Date}`),
324
324
  children: [
325
325
  {
326
326
  value: s.Equal,
@@ -414,7 +414,7 @@ function Kr(n) {
414
414
  }
415
415
  ];
416
416
  }
417
- function Jr(n, e) {
417
+ function ei(n, e) {
418
418
  if (!e)
419
419
  return [];
420
420
  const r = n.get(ue).t;
@@ -501,18 +501,18 @@ const yt = /* @__PURE__ */ new Set([
501
501
  s.Before,
502
502
  s.BeforeOrEqual
503
503
  ]);
504
- function ei(n, e) {
505
- return e ? n === V.String ? Z.Input : n === V.Number ? e === $.Between || e === $.NotBetween ? Z.Inputs : Z.Input : n === V.Date ? e === s.Between || e === s.NotBetween ? Z.DateRange : e === s.Quarter || e === s.Month ? Z.Select : yt.has(e) ? Z.DatePicker : Z.None : Z.None : Z.None;
504
+ function ti(n, e) {
505
+ return e ? n === D.String ? j.Input : n === D.Number ? e === $.Between || e === $.NotBetween ? j.Inputs : j.Input : n === D.Date ? e === s.Between || e === s.NotBetween ? j.DateRange : e === s.Quarter || e === s.Month ? j.Select : yt.has(e) ? j.DatePicker : j.None : j.None : j.None;
506
506
  }
507
- function ti(n) {
507
+ function ni(n) {
508
508
  if (!n || n.filterType !== "condition")
509
509
  return {
510
- type: V.String,
510
+ type: D.String,
511
511
  compareType: W.Equal,
512
512
  info: {}
513
513
  };
514
514
  const e = n.filterInfo, { conditionType: t, compareType: r } = e;
515
- return t === V.Date ? r === s.Between || r === s.NotBetween ? {
515
+ return t === D.Date ? r === s.Between || r === s.NotBetween ? {
516
516
  type: t,
517
517
  compare: r,
518
518
  info: {
@@ -540,7 +540,7 @@ function ti(n) {
540
540
  info: {
541
541
  dateSelect: e.compareType
542
542
  }
543
- } : t === V.Number ? r === $.Between || r === $.NotBetween ? {
543
+ } : t === D.Number ? r === $.Between || r === $.NotBetween ? {
544
544
  type: t,
545
545
  compare: r,
546
546
  info: {
@@ -552,39 +552,39 @@ function ti(n) {
552
552
  info: {
553
553
  number: e.expectedValue
554
554
  }
555
- } : t === V.String ? {
555
+ } : t === D.String ? {
556
556
  type: t,
557
557
  compare: r,
558
558
  info: {
559
559
  string: e.expectedValue
560
560
  }
561
561
  } : {
562
- type: V.String,
562
+ type: D.String,
563
563
  compare: W.Equal,
564
564
  info: {}
565
565
  };
566
566
  }
567
- const ni = (n) => {
568
- var C, T, O, p, E, y, D;
569
- const { conditionInfo: e, onChange: t } = n, r = R(ue), [i, a] = q(!1), l = R(Ve), c = Kr(l), d = (v, m, L) => {
567
+ const ri = (n) => {
568
+ var S, T, O, f, E, y, k;
569
+ const { conditionInfo: e, onChange: t } = n, r = R(ue), [i, a] = Z(!1), l = R(Ve), c = Jr(l), d = (v, p, L) => {
570
570
  t({
571
- type: m != null ? m : e.type,
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
- var f;
577
- const m = v[0], L = v[1];
576
+ var C;
577
+ const p = v[0], L = v[1];
578
578
  L && a(!1);
579
579
  const M = {};
580
- m === V.Date ? L === s.Quarter ? M.dateSelect = s.Q1 : L === s.Month ? M.dateSelect = s.M1 : yt.has(L) ? M.date = /* @__PURE__ */ new Date() : M.dateRange = [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()] : m === V.Number ? M.number = 0 : m === V.String && (M.string = ""), d(M, v[0], (f = v[1]) != null ? f : W.Equal);
581
- }, u = ei(e.type, e.compare);
580
+ p === D.Date ? L === s.Quarter ? M.dateSelect = s.Q1 : L === s.Month ? M.dateSelect = s.M1 : yt.has(L) ? M.date = /* @__PURE__ */ new Date() : M.dateRange = [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()] : p === D.Number ? M.number = 0 : p === D.String && (M.string = ""), d(M, v[0], (C = v[1]) != null ? C : W.Equal);
581
+ }, u = ti(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 S = Jr(l, e.compare);
585
- return /* @__PURE__ */ _("div", { children: [
584
+ const _ = ei(l, e.compare);
585
+ return /* @__PURE__ */ w("div", { children: [
586
586
  /* @__PURE__ */ o(
587
- De,
587
+ Be,
588
588
  {
589
589
  align: "start",
590
590
  open: i,
@@ -599,17 +599,17 @@ const ni = (n) => {
599
599
  wrapperClassName: "!univer-h-[150px]"
600
600
  }
601
601
  ),
602
- children: /* @__PURE__ */ _(
602
+ children: /* @__PURE__ */ w(
603
603
  "div",
604
604
  {
605
- className: k(`
605
+ className: B(`
606
606
  univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between
607
607
  univer-rounded-md univer-bg-white univer-px-2 univer-text-sm univer-transition-colors
608
608
  univer-duration-200
609
609
  dark:univer-bg-gray-700 dark:univer-text-white
610
610
  focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2
611
611
  hover:univer-border-primary-600
612
- `, H),
612
+ `, A),
613
613
  children: [
614
614
  /* @__PURE__ */ o("span", { children: g }),
615
615
  /* @__PURE__ */ o(It, {})
@@ -618,8 +618,8 @@ const ni = (n) => {
618
618
  )
619
619
  }
620
620
  ),
621
- /* @__PURE__ */ _("div", { className: "univer-mt-3 univer-w-full", children: [
622
- u === Z.Input && /* @__PURE__ */ o(Tt, { children: e.type === V.String ? /* @__PURE__ */ o(
621
+ /* @__PURE__ */ w("div", { className: "univer-mt-3 univer-w-full", children: [
622
+ u === j.Input && /* @__PURE__ */ o(Tt, { children: e.type === D.String ? /* @__PURE__ */ o(
623
623
  wt,
624
624
  {
625
625
  className: "univer-w-full",
@@ -638,7 +638,7 @@ const ni = (n) => {
638
638
  }
639
639
  }
640
640
  ) }),
641
- u === Z.DatePicker && /* @__PURE__ */ o("div", { id: "univer-table-date-picker-wrapper", style: { background: "#fff", position: "relative" }, children: /* @__PURE__ */ o(
641
+ u === j.DatePicker && /* @__PURE__ */ o("div", { id: "univer-table-date-picker-wrapper", style: { background: "#fff", position: "relative" }, children: /* @__PURE__ */ o(
642
642
  Cr,
643
643
  {
644
644
  value: be(e.info.date),
@@ -649,28 +649,28 @@ const ni = (n) => {
649
649
  allowClear: !1
650
650
  }
651
651
  ) }),
652
- u === Z.DateRange && /* @__PURE__ */ o("div", { id: "univer-table-date-range-wrapper", style: { background: "#fff", position: "relative" }, children: /* @__PURE__ */ o(
652
+ u === j.DateRange && /* @__PURE__ */ o("div", { id: "univer-table-date-range-wrapper", style: { background: "#fff", position: "relative" }, children: /* @__PURE__ */ o(
653
653
  Sr,
654
654
  {
655
- value: [(T = be((C = e.info.dateRange) == null ? void 0 : C[0])) != null ? T : be(), (p = be((O = e.info.dateRange) == null ? void 0 : O[1])) != null ? p : be()],
655
+ value: [(T = be((S = e.info.dateRange) == null ? void 0 : S[0])) != null ? T : be(), (f = be((O = e.info.dateRange) == null ? void 0 : O[1])) != null ? f : be()],
656
656
  defaultPickerValue: [be(), be()],
657
657
  onChange: (v) => {
658
- d(v ? { dateRange: v.map((m) => m == null ? void 0 : m.toDate()) } : {});
658
+ d(v ? { dateRange: v.map((p) => p == null ? void 0 : p.toDate()) } : {});
659
659
  },
660
660
  getPopupContainer: () => document.getElementById("univer-table-date-range-wrapper") || document.body,
661
661
  classNames: { popup: "univer-w-[400px]" },
662
662
  allowClear: !1
663
663
  }
664
664
  ) }),
665
- u === Z.Inputs && /* @__PURE__ */ _("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
665
+ u === j.Inputs && /* @__PURE__ */ w("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
666
666
  /* @__PURE__ */ o(
667
667
  dt,
668
668
  {
669
669
  className: "univer-w-full",
670
670
  value: (E = e.info.numberRange) == null ? void 0 : E[0],
671
671
  onChange: (v) => {
672
- var m;
673
- v !== null && d({ numberRange: [v, (m = e.info.numberRange) == null ? void 0 : m[1]] });
672
+ var p;
673
+ v !== null && d({ numberRange: [v, (p = e.info.numberRange) == null ? void 0 : p[1]] });
674
674
  },
675
675
  controls: !1
676
676
  }
@@ -683,115 +683,94 @@ const ni = (n) => {
683
683
  value: (y = e.info.numberRange) == null ? void 0 : y[1],
684
684
  controls: !1,
685
685
  onChange: (v) => {
686
- var m;
687
- v !== null && d({ numberRange: [(m = e.info.numberRange) == null ? void 0 : m[0], v] });
686
+ var p;
687
+ v !== null && d({ numberRange: [(p = e.info.numberRange) == null ? void 0 : p[0], v] });
688
688
  }
689
689
  }
690
690
  )
691
691
  ] }),
692
- u === Z.Select && /* @__PURE__ */ o(
692
+ u === j.Select && /* @__PURE__ */ o(
693
693
  _r,
694
694
  {
695
695
  className: "univer-w-full",
696
- value: (D = e.info.dateSelect) != null ? D : S[0].value,
697
- options: S,
696
+ value: (k = e.info.dateSelect) != null ? k : _[0].value,
697
+ options: _,
698
698
  onChange: (v) => d({ dateSelect: v })
699
699
  }
700
700
  )
701
701
  ] })
702
702
  ] });
703
- }, ri = (n) => {
703
+ }, ii = (n) => {
704
704
  let e = 0;
705
705
  return n.forEach((t) => {
706
706
  e += t;
707
707
  }), e;
708
708
  };
709
- function ii(n) {
710
- const { unitId: e, tableId: t, subUnitId: r, columnIndex: i, checkedItemSet: a, setCheckedItemSet: l, tableFilter: c } = n, d = R(ue), h = R(Be), { data: u, itemsCountMap: g, allItemsCount: S } = h.getTableFilterItems(e, r, t, i), [C, T] = q(c === void 0 ? !0 : a.size === g.size), [O, p] = q(C ? S : ri(g)), E = !C && a.size > 0, [y, D] = q(""), v = ln(() => y ? u.filter((f) => String(f.title).toLowerCase().includes(y.toLowerCase())) : u, [y, u]), m = Dt(() => {
711
- C ? (a.clear(), l(new Set(a)), T(!1)) : (v.forEach((f) => {
712
- a.add(f.title);
709
+ function ai(n) {
710
+ const { unitId: e, tableId: t, subUnitId: r, columnIndex: i, checkedItemSet: a, setCheckedItemSet: l, tableFilter: c } = n, d = R(ue), h = R(De), { data: u, itemsCountMap: g, allItemsCount: _ } = h.getTableFilterItems(e, r, t, i), [S, T] = Z(c === void 0 ? !0 : a.size === g.size), [O, f] = Z(S ? _ : ii(g)), E = !S && a.size > 0, [y, k] = Z(""), v = ln(() => y ? u.filter((C) => String(C.title).toLowerCase().includes(y.toLowerCase())) : u, [y, u]), p = Bt(() => {
711
+ S ? (a.clear(), l(new Set(a)), T(!1)) : (v.forEach((C) => {
712
+ a.add(C.title);
713
713
  }), l(new Set(a)), T(!0));
714
- }, [C]), L = Dt((f) => {
715
- f === "" ? (T(!0), u.forEach((U) => {
716
- a.add(U.title);
717
- }), p(S)) : (a.clear(), T(!1), p(0)), D(f);
718
- }, []), M = (f) => {
719
- if (C) {
714
+ }, [S]), L = Bt((C) => {
715
+ C === "" ? (T(!0), u.forEach((F) => {
716
+ a.add(F.title);
717
+ }), f(_)) : (a.clear(), T(!1), f(0)), k(C);
718
+ }, []), M = (C) => {
719
+ if (S) {
720
720
  T(!1);
721
- const U = /* @__PURE__ */ new Set();
722
- for (const { title: P } of u)
723
- f !== P && U.add(P);
724
- p(S - g.get(f)), l(U);
721
+ const F = /* @__PURE__ */ new Set();
722
+ for (const { title: x } of u)
723
+ C !== x && F.add(x);
724
+ f(_ - g.get(C)), l(F);
725
725
  } else
726
- a.has(f) ? (a.delete(f), p(O - g.get(f))) : (a.add(f), p(O + g.get(f))), l(new Set(a));
726
+ a.has(C) ? (a.delete(C), f(O - g.get(C))) : (a.add(C), f(O + g.get(C))), l(new Set(a));
727
727
  };
728
- return /* @__PURE__ */ _("div", { className: "univer-flex univer-h-full univer-flex-col", children: [
728
+ return /* @__PURE__ */ w("div", { className: "univer-flex univer-h-full univer-flex-col", children: [
729
729
  /* @__PURE__ */ o(wt, { autoFocus: !0, value: y, placeholder: d.t("sheets-filter.panel.search-placeholder"), onChange: L }),
730
730
  /* @__PURE__ */ o(
731
731
  "div",
732
732
  {
733
- className: k(`
733
+ className: B(`
734
734
  univer-mt-2 univer-box-border univer-flex univer-h-[180px] univer-max-h-[180px] univer-flex-grow
735
735
  univer-flex-col univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-pl-2
736
- `, H),
736
+ `, A),
737
737
  children: /* @__PURE__ */ o(
738
738
  "div",
739
739
  {
740
- className: k("univer-h-40 univer-overflow-y-auto univer-py-1 univer-pl-2", Tr),
741
- children: /* @__PURE__ */ _("div", { className: "univer-h-full", children: [
742
- /* @__PURE__ */ _(
743
- "div",
740
+ className: B("univer-h-40 univer-overflow-y-auto univer-py-1 univer-pl-2", Tr),
741
+ children: /* @__PURE__ */ w("div", { className: "univer-h-full", children: [
742
+ /* @__PURE__ */ o("div", { className: "univer-flex univer-items-center univer-px-2 univer-py-1", children: /* @__PURE__ */ o(
743
+ $t,
744
744
  {
745
- className: "univer-flex univer-items-center univer-px-2 univer-py-1",
746
- children: [
747
- /* @__PURE__ */ o(
748
- $t,
749
- {
750
- indeterminate: E,
751
- disabled: u.length === 0,
752
- checked: C,
753
- onChange: m
754
- }
755
- ),
756
- /* @__PURE__ */ _(
757
- "div",
758
- {
759
- className: `
760
- univer-ml-1 univer-flex univer-h-5 univer-flex-1 univer-items-center univer-text-sm
761
- `,
762
- children: [
763
- /* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: `${d.t("sheets-filter.panel.select-all")}` }),
764
- /* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${O}/${y ? v.length : S})` })
765
- ]
766
- }
767
- )
768
- ]
745
+ indeterminate: E,
746
+ disabled: u.length === 0,
747
+ checked: S,
748
+ onChange: p,
749
+ children: /* @__PURE__ */ w("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-items-center univer-text-sm", children: [
750
+ /* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: `${d.t("sheets-filter.panel.select-all")}` }),
751
+ /* @__PURE__ */ o("span", { className: "univer-ml univer-text-gray-400", children: `(${O}/${y ? v.length : _})` })
752
+ ] })
769
753
  }
770
- ),
771
- v.map((f) => /* @__PURE__ */ _(
754
+ ) }),
755
+ v.map((C) => /* @__PURE__ */ o(
772
756
  "div",
773
757
  {
774
758
  className: "univer-flex univer-items-center univer-px-2 univer-py-1",
775
- children: [
776
- /* @__PURE__ */ o($t, { checked: C || a.has(f.title), onChange: () => {
777
- M(f.title);
778
- } }),
779
- /* @__PURE__ */ _(
780
- "div",
781
- {
782
- className: `
783
- univer-ml-1 univer-flex univer-h-5 univer-flex-1 univer-items-start
784
- univer-text-sm
785
- `,
786
- children: [
787
- /* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: f.title }),
788
- /* @__PURE__ */ o("span", { className: "univer-ml-1 univer-text-gray-400", children: `(${g.get(f.title) || 0})` })
789
- ]
790
- }
791
- )
792
- ]
759
+ children: /* @__PURE__ */ o(
760
+ $t,
761
+ {
762
+ checked: S || a.has(C.title),
763
+ onChange: () => {
764
+ M(C.title);
765
+ },
766
+ children: /* @__PURE__ */ w("div", { className: "univer-flex univer-h-5 univer-flex-1 univer-text-sm", children: [
767
+ /* @__PURE__ */ o("span", { className: "univer-inline-block univer-truncate", children: C.title }),
768
+ /* @__PURE__ */ o("span", { className: "univer-ml-1 univer-text-gray-400", children: `(${g.get(C.title) || 0})` })
769
+ ] })
770
+ }
771
+ )
793
772
  },
794
- f.key
773
+ C.key
795
774
  ))
796
775
  ] })
797
776
  }
@@ -800,123 +779,100 @@ function ii(n) {
800
779
  )
801
780
  ] });
802
781
  }
803
- function ai() {
804
- var A;
805
- const n = R(ue), e = si(n), t = R(Be), r = R(ne), i = R(ce), a = R(Ut), l = R(Fe), c = l.getCurrentTableFilterInfo(), d = t.getTableFilterPanelInitProps(c.unitId, c.subUnitId, c.tableId, c.column), { unitId: h, subUnitId: u, tableId: g, tableFilter: S, currentFilterBy: C, columnIndex: T } = d, { data: O } = t.getTableFilterItems(h, u, g, T), p = t.getTableFilterCheckedItems(h, g, T), [E, y] = q(new Set(p)), [D, v] = q(C || Se.Items), [m, L] = q(() => {
806
- const N = d.tableFilter;
807
- return ti(N);
782
+ function si() {
783
+ var de;
784
+ const n = R(ue), e = li(n), t = R(De), r = R(ne), i = R(ce), a = R(Ut), l = R(Fe), c = l.getCurrentTableFilterInfo(), d = t.getTableFilterPanelInitProps(c.unitId, c.subUnitId, c.tableId, c.column), { unitId: h, subUnitId: u, tableId: g, tableFilter: _, currentFilterBy: S, columnIndex: T } = d, { data: O } = t.getTableFilterItems(h, u, g, T), f = t.getTableFilterCheckedItems(h, g, T), [E, y] = Z(new Set(f)), [k, v] = Z(S || Se.Items), [p, L] = Z(() => {
785
+ const b = d.tableFilter;
786
+ return ni(b);
808
787
  }), M = r.getTable(h, g);
809
788
  if (!M) return null;
810
- const f = M.getTableFilters(), U = f.getSortState(), P = U.columnIndex === T && U.sortState === Qe.Asc, Q = U.columnIndex === T && U.sortState === Qe.Desc, B = () => {
789
+ const C = M.getTableFilters(), F = C.getSortState();
790
+ F.columnIndex === T && (F.sortState, Ye.Asc), F.columnIndex === T && (F.sortState, Ye.Desc);
791
+ const x = () => {
811
792
  l.closeFilterPanel();
812
- }, ee = () => {
813
- B();
814
- }, Te = (N) => {
815
- const F = M.getTableFilterRange();
793
+ }, Q = () => {
794
+ x();
795
+ }, U = (b) => {
796
+ const P = M.getTableFilterRange();
816
797
  i.executeCommand(xr.id, {
817
798
  unitId: h,
818
799
  subUnitId: u,
819
- range: F,
820
- orderRules: [{ colIndex: T + F.startColumn, type: N ? kt.ASC : kt.DESC }],
800
+ range: P,
801
+ orderRules: [{ colIndex: T + P.startColumn, type: b ? kt.ASC : kt.DESC }],
821
802
  hasTitle: !1
822
- }), f.setSortState(T, N ? Qe.Asc : Qe.Desc), B();
823
- }, Le = () => {
824
- if (D === Se.Items) {
825
- const N = [];
826
- for (const de of O)
827
- E.has(de.title) && N.push(de.title);
828
- const F = M.getTableFilterColumn(T);
829
- if (F) {
830
- if (F.values.join(",") === N.join(",")) {
831
- B();
803
+ }), C.setSortState(T, b ? Ye.Asc : Ye.Desc), x();
804
+ }, ee = () => {
805
+ if (k === Se.Items) {
806
+ const b = [];
807
+ for (const q of O)
808
+ E.has(q.title) && b.push(q.title);
809
+ const P = M.getTableFilterColumn(T);
810
+ if (P) {
811
+ if (P.values.join(",") === b.join(",")) {
812
+ x();
832
813
  return;
833
814
  }
834
- } else if (N.length === 0) {
835
- B();
815
+ } else if (b.length === 0) {
816
+ x();
836
817
  return;
837
818
  }
838
- const Ae = {
839
- filterType: xt.manual,
840
- values: N
819
+ const H = {
820
+ filterType: Et.manual,
821
+ values: b
841
822
  };
842
- t.setTableFilter(h, g, T, Ae);
823
+ t.setTableFilter(h, g, T, H);
843
824
  } else {
844
- let N;
845
- m.compare === s.Quarter || m.compare === s.Month ? N = {
846
- conditionType: m.type,
847
- compareType: Object.values(m.info)[0]
848
- } : N = {
849
- conditionType: m.type,
850
- compareType: m.compare,
851
- expectedValue: Object.values(m.info)[0]
825
+ let b;
826
+ p.compare === s.Quarter || p.compare === s.Month ? b = {
827
+ conditionType: p.type,
828
+ compareType: Object.values(p.info)[0]
829
+ } : b = {
830
+ conditionType: p.type,
831
+ compareType: p.compare,
832
+ expectedValue: Object.values(p.info)[0]
852
833
  };
853
- const F = {
854
- filterType: xt.condition,
834
+ const P = {
835
+ filterType: Et.condition,
855
836
  // @ts-ignore
856
- filterInfo: N
837
+ filterInfo: b
857
838
  };
858
- t.setTableFilter(h, g, T, F);
839
+ t.setTableFilter(h, g, T, P);
859
840
  }
860
- B();
861
- }, we = () => {
862
- t.setTableFilter(h, g, T, void 0), B();
863
- }, Ie = new tn(h).id, I = (A = a.getPermissionPoint(Ie)) == null ? void 0 : A.value;
864
- return /* @__PURE__ */ _(
841
+ x();
842
+ }, xe = () => {
843
+ t.setTableFilter(h, g, T, void 0), x();
844
+ }, Le = new tn(h).id, Te = (de = a.getPermissionPoint(Le)) == null ? void 0 : de.value;
845
+ return /* @__PURE__ */ w(
865
846
  "div",
866
847
  {
867
848
  className: `
868
849
  univer-box-border univer-flex univer-w-[312px] univer-flex-col univer-rounded-[10px] univer-bg-white
869
850
  univer-p-4 univer-shadow-lg
851
+ dark:univer-border-gray-600 dark:univer-bg-gray-700
870
852
  `,
871
853
  children: [
872
- I && /* @__PURE__ */ _("div", { className: "univer-mb-3 univer-flex", children: [
873
- /* @__PURE__ */ _(
874
- "div",
875
- {
876
- className: k(`
877
- univer-flex univer-w-[140px] univer-flex-1 univer-cursor-default univer-items-center
878
- univer-justify-center univer-gap-1 univer-rounded-l-md univer-py-1.5 univer-text-sm
879
- hover:univer-cursor-pointer hover:univer-bg-gray-100
880
- `, H, {
881
- "univer-bg-gray-100": P
882
- }),
883
- onClick: () => Te(!0),
884
- children: [
885
- /* @__PURE__ */ o(hn, { className: "univer-text-base univer-text-color-[#1e222b] univer-mr-1" }),
886
- n.t("sheets-sort.general.sort-asc")
887
- ]
888
- }
889
- ),
890
- /* @__PURE__ */ _(
891
- "div",
892
- {
893
- className: k(`
894
- univer-flex univer-w-[140px] univer-flex-1 univer-cursor-default univer-items-center
895
- univer-justify-center univer-gap-1 univer-rounded-r-md univer-py-1.5 univer-text-sm
896
- hover:univer-cursor-pointer hover:univer-bg-gray-100
897
- `, H, {
898
- "univer-bg-gray-100": Q
899
- }),
900
- onClick: () => Te(!1),
901
- children: [
902
- /* @__PURE__ */ o(gn, { className: "univer-text-base univer-text-color-[#1e222b] univer-mr-1" }),
903
- n.t("sheets-sort.general.sort-desc")
904
- ]
905
- }
906
- )
907
- ] }),
854
+ Te && /* @__PURE__ */ o("div", { className: "univer-mb-3 univer-flex", children: /* @__PURE__ */ w(wr, { className: "univer-mb-3 univer-w-full", children: [
855
+ /* @__PURE__ */ w(ye, { className: "univer-w-1/2", onClick: () => U(!0), children: [
856
+ /* @__PURE__ */ o(hn, { className: "univer-mr-1" }),
857
+ n.t("sheets-sort.general.sort-asc")
858
+ ] }),
859
+ /* @__PURE__ */ w(ye, { className: "univer-w-1/2", onClick: () => U(!1), children: [
860
+ /* @__PURE__ */ o(gn, { className: "univer-mr-1" }),
861
+ n.t("sheets-sort.general.sort-desc")
862
+ ] })
863
+ ] }) }),
908
864
  /* @__PURE__ */ o("div", { className: "univer-w-full", children: /* @__PURE__ */ o(
909
- wr,
865
+ Ir,
910
866
  {
911
- value: D,
867
+ value: k,
912
868
  items: e,
913
- onChange: (N) => v(N)
869
+ onChange: (b) => v(b)
914
870
  }
915
871
  ) }),
916
- /* @__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 === Se.Items ? /* @__PURE__ */ o(
917
- ii,
872
+ /* @__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: k === Se.Items ? /* @__PURE__ */ o(
873
+ ai,
918
874
  {
919
- tableFilter: S,
875
+ tableFilter: _,
920
876
  unitId: h,
921
877
  subUnitId: u,
922
878
  tableId: g,
@@ -925,18 +881,18 @@ function ai() {
925
881
  setCheckedItemSet: y
926
882
  }
927
883
  ) : /* @__PURE__ */ o(
928
- ni,
884
+ ri,
929
885
  {
930
- tableFilter: S,
886
+ tableFilter: _,
931
887
  unitId: h,
932
888
  subUnitId: u,
933
889
  tableId: g,
934
890
  columnIndex: T,
935
- conditionInfo: m,
891
+ conditionInfo: p,
936
892
  onChange: L
937
893
  }
938
894
  ) }) }),
939
- /* @__PURE__ */ _(
895
+ /* @__PURE__ */ w(
940
896
  "div",
941
897
  {
942
898
  className: `
@@ -945,16 +901,16 @@ function ai() {
945
901
  `,
946
902
  children: [
947
903
  /* @__PURE__ */ o(
948
- Ze,
904
+ ye,
949
905
  {
950
- disabled: S === void 0,
951
- onClick: we,
906
+ disabled: _ === void 0,
907
+ onClick: xe,
952
908
  children: n.t("sheets-filter.panel.clear-filter")
953
909
  }
954
910
  ),
955
- /* @__PURE__ */ _("div", { children: [
956
- /* @__PURE__ */ o(Ze, { className: "univer-mr-2", onClick: ee, children: n.t("sheets-filter.panel.cancel") }),
957
- /* @__PURE__ */ o(Ze, { variant: "primary", onClick: Le, children: n.t("sheets-filter.panel.confirm") })
911
+ /* @__PURE__ */ w("div", { children: [
912
+ /* @__PURE__ */ o(ye, { className: "univer-mr-2", onClick: Q, children: n.t("sheets-filter.panel.cancel") }),
913
+ /* @__PURE__ */ o(ye, { variant: "primary", onClick: ee, children: n.t("sheets-filter.panel.confirm") })
958
914
  ] })
959
915
  ]
960
916
  }
@@ -963,23 +919,23 @@ function ai() {
963
919
  }
964
920
  );
965
921
  }
966
- function si(n) {
922
+ function li(n) {
967
923
  const e = n.getCurrentLocale();
968
924
  return ln(() => [
969
925
  { label: n.t("sheets-filter.panel.by-values"), value: Se.Items },
970
926
  { label: n.t("sheets-filter.panel.by-conditions"), value: Se.Condition }
971
927
  ], [e, n]);
972
928
  }
973
- var li = Object.getOwnPropertyDescriptor, oi = (n, e, t, r) => {
974
- for (var i = r > 1 ? void 0 : r ? li(e, t) : e, a = n.length - 1, l; a >= 0; a--)
929
+ var oi = Object.getOwnPropertyDescriptor, ci = (n, e, t, r) => {
930
+ for (var i = r > 1 ? void 0 : r ? oi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
975
931
  (l = n[a]) && (i = l(i) || i);
976
932
  return i;
977
- }, Xe = (n, e) => (t, r) => e(t, r, n);
933
+ }, Ge = (n, e) => (t, r) => e(t, r, n);
978
934
  let Fe = class extends He {
979
935
  constructor(e, t, r, i) {
980
936
  super();
981
- j(this, "_popupDisposable");
982
- j(this, "_currentTableFilterInfo", null);
937
+ V(this, "_popupDisposable");
938
+ V(this, "_currentTableFilterInfo", null);
983
939
  this._componentManager = e, this._contextService = t, this._sheetCanvasPopupService = r, this._dialogService = i, this._initComponents(), this._initUIPopup();
984
940
  }
985
941
  setCurrentTableFilterInfo(e) {
@@ -993,7 +949,7 @@ let Fe = class extends He {
993
949
  }
994
950
  _initComponents() {
995
951
  [
996
- [pe, ai]
952
+ [pe, si]
997
953
  ].forEach(([e, t]) => {
998
954
  this.disposeWithMe(this._componentManager.register(e, t));
999
955
  });
@@ -1015,7 +971,7 @@ let Fe = class extends He {
1015
971
  componentKey: pe,
1016
972
  direction: "horizontal",
1017
973
  onClickOutside: () => {
1018
- this._dialogService.close(Pr), this._contextService.setContextValue(pe, !1);
974
+ this._dialogService.close(kr), this._contextService.setContextValue(pe, !1);
1019
975
  },
1020
976
  offset: [5, 0]
1021
977
  });
@@ -1025,14 +981,14 @@ let Fe = class extends He {
1025
981
  (e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null, this.clearCurrentTableFilterInfo();
1026
982
  }
1027
983
  };
1028
- Fe = oi([
1029
- Xe(0, x(Kt)),
1030
- Xe(1, St),
1031
- Xe(2, x(Xn)),
1032
- Xe(3, x(Jt))
984
+ Fe = ci([
985
+ Ge(0, N(Kt)),
986
+ Ge(1, St),
987
+ Ge(2, N(Xn)),
988
+ Ge(3, N(Jt))
1033
989
  ], Fe);
1034
990
  const mt = {
1035
- type: jt.OPERATION,
991
+ type: Wt.OPERATION,
1036
992
  id: "sheet.operation.open-table-filter-panel",
1037
993
  async handler(n, e) {
1038
994
  if (!e)
@@ -1041,15 +997,15 @@ const mt = {
1041
997
  return c.getTable(i, l) ? (d.getContextValue(pe) || (h.setCurrentTableFilterInfo({ unitId: i, subUnitId: a, row: t, tableId: l, column: r }), d.setContextValue(pe, !0)), !0) : !1;
1042
998
  }
1043
999
  }, Mt = {
1044
- type: jt.OPERATION,
1000
+ type: Wt.OPERATION,
1045
1001
  id: "sheet.operation.open-table-selector",
1046
1002
  async handler(n) {
1047
- var C;
1048
- const e = n.get(_e), t = n.get(ce), r = ot(e);
1003
+ var S;
1004
+ const e = n.get(_e), t = n.get(ce), r = lt(e);
1049
1005
  if (!r)
1050
1006
  return !1;
1051
- const { unitId: i, subUnitId: a, worksheet: l } = r, d = n.get(ct).getCurrentLastSelection(), h = (C = d == null ? void 0 : d.range) != null ? C : { startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }, g = yr(d) ? Mr(h, { up: !0, left: !0, right: !0, down: !0 }, l) : h, S = await Cn(n, i, a, g);
1052
- return S ? (t.executeCommand(Wn.id, { ...S }), !0) : !1;
1007
+ const { unitId: i, subUnitId: a, worksheet: l } = r, d = n.get(ot).getCurrentLastSelection(), h = (S = d == null ? void 0 : d.range) != null ? S : { startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }, g = Mr(d) ? Rr(h, { up: !0, left: !0, right: !0, down: !0 }, l) : h, _ = await Cn(n, i, a, g);
1008
+ return _ ? (t.executeCommand(jn.id, { ..._ }), !0) : !1;
1053
1009
  }
1054
1010
  };
1055
1011
  async function Cn(n, e, t, r, i) {
@@ -1088,16 +1044,16 @@ async function Cn(n, e, t, r, i) {
1088
1044
  });
1089
1045
  }
1090
1046
  const Sn = "sheets-table-ui.config";
1091
- var ci = Object.getOwnPropertyDescriptor, ui = (n, e, t, r) => {
1092
- for (var i = r > 1 ? void 0 : r ? ci(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1047
+ var ui = Object.getOwnPropertyDescriptor, di = (n, e, t, r) => {
1048
+ for (var i = r > 1 ? void 0 : r ? ui(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1093
1049
  (l = n[a]) && (i = l(i) || i);
1094
1050
  return i;
1095
- }, di = (n, e) => (t, r) => e(t, r, n);
1096
- let xe = class extends He {
1051
+ }, hi = (n, e) => (t, r) => e(t, r, n);
1052
+ let Ne = class extends He {
1097
1053
  constructor(e) {
1098
1054
  super();
1099
- j(this, "_refreshTable", new vr());
1100
- j(this, "refreshTable$", this._refreshTable.asObservable());
1055
+ V(this, "_refreshTable", new vr());
1056
+ V(this, "refreshTable$", this._refreshTable.asObservable());
1101
1057
  this._commandService = e, this._initListener();
1102
1058
  }
1103
1059
  _initListener() {
@@ -1111,99 +1067,99 @@ let xe = class extends He {
1111
1067
  );
1112
1068
  }
1113
1069
  };
1114
- xe = ui([
1115
- di(0, x(ce))
1116
- ], xe);
1117
- const hi = () => {
1118
- var we, Ie;
1119
- const [n, e] = q(""), [t, r] = q(""), i = R(ir), [a, l] = q({}), c = R(Ve), d = R(nt), h = Re(d.anchorPosition$), u = R(ce), g = R(_e), S = R(rn), C = Re(S.unitPermissionInitStateChange$, !1), T = R(ne), O = R(an), p = R(xe), E = Re(p.refreshTable$), y = R(ue), D = R(ct), v = Re(D.selectionChanged$, [{ range: At(0, 0), primary: null }]), [, m] = q(Math.random()), M = R(Wt).getConfig(Sn), f = (we = M == null ? void 0 : M.anchorHeight) != null ? we : 24, U = (Ie = M == null ? void 0 : M.anchorBackgroundColor) != null ? Ie : "rgb(53,91,183)", P = (I, A) => {
1120
- l((N) => ({
1121
- ...N,
1122
- [I]: A
1070
+ Ne = di([
1071
+ hi(0, N(ce))
1072
+ ], Ne);
1073
+ const vi = () => {
1074
+ var Te, de;
1075
+ const [n, e] = Z(""), [t, r] = Z(""), i = R(ir), [a, l] = Z({}), c = R(Ve), d = R(tt), h = Me(d.anchorPosition$), u = R(ce), g = R(_e), _ = R(rn), S = Me(_.unitPermissionInitStateChange$, !1), T = R(ne), O = R(an), f = R(Ne), E = Me(f.refreshTable$), y = R(ue), k = R(ot), v = Me(k.selectionChanged$, [{ range: At(0, 0), primary: null }]), [, p] = Z(Math.random()), M = R(jt).getConfig(Sn), C = (Te = M == null ? void 0 : M.anchorHeight) != null ? Te : 24, F = (de = M == null ? void 0 : M.anchorBackgroundColor) != null ? de : "rgb(53,91,183)", x = (b, P) => {
1076
+ l((H) => ({
1077
+ ...H,
1078
+ [b]: P
1123
1079
  }));
1124
1080
  };
1125
1081
  if (on(() => {
1126
- m(Math.random());
1082
+ p(Math.random());
1127
1083
  }, [E]), !(h != null && h.length))
1128
1084
  return null;
1129
- const Q = ot(g);
1085
+ const Q = lt(g);
1130
1086
  if (!Q) return null;
1131
- const { unitId: B, subUnitId: ee } = Q, Te = (I, A) => {
1132
- var F;
1133
- if (((F = T.getTableById(B, I)) == null ? void 0 : F.getDisplayName()) === A) {
1087
+ const { unitId: U, subUnitId: ee } = Q, xe = (b, P) => {
1088
+ var q;
1089
+ if (((q = T.getTableById(U, b)) == null ? void 0 : q.getDisplayName()) === P) {
1134
1090
  e(""), r("");
1135
1091
  return;
1136
1092
  }
1137
1093
  u.executeCommand(bt.id, {
1138
- tableId: I,
1139
- unitId: B,
1140
- name: A
1094
+ tableId: b,
1095
+ unitId: U,
1096
+ name: P
1141
1097
  }), r(""), e("");
1142
- }, Le = async (I) => {
1143
- const A = T.getTableById(B, I);
1144
- if (!A) return;
1145
- const N = A.getRange(), F = await Cn(c, B, ee, N, I);
1146
- F && u.executeCommand(bt.id, {
1147
- tableId: I,
1148
- unitId: B,
1098
+ }, Le = async (b) => {
1099
+ const P = T.getTableById(U, b);
1100
+ if (!P) return;
1101
+ const H = P.getRange(), q = await Cn(c, U, ee, H, b);
1102
+ q && u.executeCommand(bt.id, {
1103
+ tableId: b,
1104
+ unitId: U,
1149
1105
  updateRange: {
1150
- newRange: F.range
1106
+ newRange: q.range
1151
1107
  }
1152
1108
  });
1153
1109
  };
1154
- return C ? /* @__PURE__ */ o(
1110
+ return S ? /* @__PURE__ */ o(
1155
1111
  "div",
1156
1112
  {
1157
1113
  className: "univer-absolute univer-z-50 univer-h-0 univer-w-0",
1158
1114
  style: {},
1159
- children: h.map((I) => {
1115
+ children: h.map((b) => {
1160
1116
  var X, K, se, le, he, ve, ge;
1161
- const A = T.getTableById(B, I.tableId);
1162
- if (!A) return null;
1163
- const N = O.getRangeThemeStyle(B, A.getTableStyleId()), F = (se = (K = (X = N == null ? void 0 : N.getHeaderRowStyle()) == null ? void 0 : X.bg) == null ? void 0 : K.rgb) != null ? se : U, de = (ve = (he = (le = N == null ? void 0 : N.getHeaderRowStyle()) == null ? void 0 : le.cl) == null ? void 0 : he.rgb) != null ? ve : "rgb(255, 255, 255)", qe = A.getRange();
1117
+ const P = T.getTableById(U, b.tableId);
1118
+ if (!P) return null;
1119
+ const H = O.getRangeThemeStyle(U, P.getTableStyleId()), q = (se = (K = (X = H == null ? void 0 : H.getHeaderRowStyle()) == null ? void 0 : X.bg) == null ? void 0 : K.rgb) != null ? se : F, je = (ve = (he = (le = H == null ? void 0 : H.getHeaderRowStyle()) == null ? void 0 : le.cl) == null ? void 0 : he.rgb) != null ? ve : "rgb(255, 255, 255)", Ze = P.getRange();
1164
1120
  if (!(v != null && v.length))
1165
1121
  return null;
1166
- const Ye = v[v.length - 1].range, w = !Ce.intersects(qe, Ye) && I.y <= 20;
1167
- return /* @__PURE__ */ _(
1122
+ const qe = v[v.length - 1].range, I = !Ce.intersects(Ze, qe) && b.y <= 20;
1123
+ return /* @__PURE__ */ w(
1168
1124
  "div",
1169
1125
  {
1170
- className: k(`
1126
+ className: B(`
1171
1127
  univer-absolute univer-box-border univer-flex univer-cursor-pointer univer-items-center
1172
1128
  univer-rounded-xl univer-pl-2 univer-pr-2 univer-shadow-xs
1173
- `, H),
1129
+ `, A),
1174
1130
  style: {
1175
- left: I.x,
1176
- top: Math.max(I.y, 0),
1177
- backgroundColor: F,
1178
- color: de,
1131
+ left: b.x,
1132
+ top: Math.max(b.y, 0),
1133
+ backgroundColor: q,
1134
+ color: je,
1179
1135
  borderWidth: "0.5px",
1180
- display: w ? "none" : "flex",
1181
- height: f ? `${f}px` : "24px"
1136
+ display: I ? "none" : "flex",
1137
+ height: C ? `${C}px` : "24px"
1182
1138
  },
1183
1139
  children: [
1184
- /* @__PURE__ */ o("div", { className: "univer-text-nowrap", children: n === I.tableId ? /* @__PURE__ */ o(
1140
+ /* @__PURE__ */ o("div", { className: "univer-text-nowrap", children: n === b.tableId ? /* @__PURE__ */ o(
1185
1141
  wt,
1186
1142
  {
1187
1143
  className: "univer-h-[18px] univer-min-w-16 univer-rounded-none",
1188
1144
  inputClass: "univer-h-[18px] univer-w-[80px]",
1189
1145
  value: t,
1190
1146
  onChange: (Y) => r(Y),
1191
- onBlur: () => Te(I.tableId, t),
1147
+ onBlur: () => xe(b.tableId, t),
1192
1148
  onKeyDown: (Y) => {
1193
- Y.key === "Enter" && Te(I.tableId, t);
1149
+ Y.key === "Enter" && xe(b.tableId, t);
1194
1150
  },
1195
- autoFocus: n === I.tableId
1151
+ autoFocus: n === b.tableId
1196
1152
  }
1197
- ) : /* @__PURE__ */ o("div", { className: "univer-h-[18px] univer-max-w-24 univer-truncate univer-text-sm", children: I.tableName }) }),
1153
+ ) : /* @__PURE__ */ o("div", { className: "univer-h-[18px] univer-max-w-24 univer-truncate univer-text-sm", children: b.tableName }) }),
1198
1154
  /* @__PURE__ */ o(
1199
- De,
1155
+ Be,
1200
1156
  {
1201
- open: (ge = a[I.tableId]) != null ? ge : !1,
1157
+ open: (ge = a[b.tableId]) != null ? ge : !1,
1202
1158
  onOpenChange: (Y) => {
1203
- P(I.tableId, Y);
1159
+ x(b.tableId, Y);
1204
1160
  },
1205
- overlay: /* @__PURE__ */ _("div", { className: "univer-pb-2 univer-pt-2", children: [
1206
- /* @__PURE__ */ _(
1161
+ overlay: /* @__PURE__ */ w("div", { className: "univer-pb-2 univer-pt-2", children: [
1162
+ /* @__PURE__ */ w(
1207
1163
  "div",
1208
1164
  {
1209
1165
  className: `
@@ -1212,7 +1168,7 @@ const hi = () => {
1212
1168
  hover:univer-bg-gray-200
1213
1169
  `,
1214
1170
  onClick: () => {
1215
- e(I.tableId), r(I.tableName);
1171
+ e(b.tableId), r(b.tableName);
1216
1172
  },
1217
1173
  children: [
1218
1174
  /* @__PURE__ */ o(pn, { className: "univer-mr-2" }),
@@ -1228,10 +1184,10 @@ const hi = () => {
1228
1184
  `
1229
1185
  }
1230
1186
  ),
1231
- /* @__PURE__ */ _(
1187
+ /* @__PURE__ */ w(
1232
1188
  "div",
1233
1189
  {
1234
- onClick: () => Le(I.tableId),
1190
+ onClick: () => Le(b.tableId),
1235
1191
  className: `
1236
1192
  univer-flex univer-min-w-32 univer-cursor-pointer univer-items-center
1237
1193
  univer-pb-1 univer-pl-2 univer-pr-2 univer-pt-1 univer-text-sm
@@ -1243,7 +1199,7 @@ const hi = () => {
1243
1199
  ]
1244
1200
  }
1245
1201
  ),
1246
- /* @__PURE__ */ _(
1202
+ /* @__PURE__ */ w(
1247
1203
  "div",
1248
1204
  {
1249
1205
  className: `
@@ -1252,22 +1208,22 @@ const hi = () => {
1252
1208
  hover:univer-bg-gray-200
1253
1209
  `,
1254
1210
  onClick: () => {
1255
- P(I.tableId, !1);
1256
- const Y = T.getTableById(B, I.tableId);
1211
+ x(b.tableId, !1);
1212
+ const Y = T.getTableById(U, b.tableId);
1257
1213
  if (!Y) return;
1258
- const ye = Y.getTableConfig(), Me = {
1259
- id: kr,
1214
+ const we = Y.getTableConfig(), Ie = {
1215
+ id: Br,
1260
1216
  header: { title: y.t("sheets-table.tableStyle") },
1261
1217
  children: {
1262
1218
  label: un,
1263
- oldConfig: ye,
1264
- unitId: B,
1219
+ oldConfig: we,
1220
+ unitId: U,
1265
1221
  subUnitId: ee,
1266
- tableId: I.tableId
1222
+ tableId: b.tableId
1267
1223
  },
1268
1224
  width: 330
1269
1225
  };
1270
- i.open(Me);
1226
+ i.open(Ie);
1271
1227
  },
1272
1228
  children: [
1273
1229
  /* @__PURE__ */ o(
@@ -1289,7 +1245,7 @@ const hi = () => {
1289
1245
  `
1290
1246
  }
1291
1247
  ),
1292
- /* @__PURE__ */ _(
1248
+ /* @__PURE__ */ w(
1293
1249
  "div",
1294
1250
  {
1295
1251
  className: `
@@ -1298,10 +1254,10 @@ const hi = () => {
1298
1254
  hover:univer-bg-gray-200
1299
1255
  `,
1300
1256
  onClick: () => {
1301
- P(I.tableId, !1), u.executeCommand(qn.id, {
1302
- tableId: I.tableId,
1257
+ x(b.tableId, !1), u.executeCommand(qn.id, {
1258
+ tableId: b.tableId,
1303
1259
  subUnitId: ee,
1304
- unitId: B
1260
+ unitId: U
1305
1261
  });
1306
1262
  },
1307
1263
  children: [
@@ -1314,33 +1270,33 @@ const hi = () => {
1314
1270
  align: "start",
1315
1271
  children: /* @__PURE__ */ o(It, {})
1316
1272
  },
1317
- I.tableId
1273
+ b.tableId
1318
1274
  )
1319
1275
  ]
1320
1276
  },
1321
- I.tableId
1277
+ b.tableId
1322
1278
  );
1323
1279
  })
1324
1280
  }
1325
1281
  ) : null;
1326
1282
  };
1327
- var vi = Object.getOwnPropertyDescriptor, gi = (n, e, t, r) => {
1328
- for (var i = r > 1 ? void 0 : r ? vi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1283
+ var gi = Object.getOwnPropertyDescriptor, bi = (n, e, t, r) => {
1284
+ for (var i = r > 1 ? void 0 : r ? gi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1329
1285
  (l = n[a]) && (i = l(i) || i);
1330
1286
  return i;
1331
1287
  }, te = (n, e) => (t, r) => e(t, r, n);
1332
- let nt = class extends He {
1288
+ let tt = class extends He {
1333
1289
  constructor(e, t, r, i, a, l, c, d, h, u, g) {
1334
1290
  super();
1335
- j(this, "_anchorVisible$", new Lt(!0));
1336
- j(this, "_timer");
1337
- j(this, "_anchorPosition$", new Lt([]));
1338
- j(this, "anchorPosition$", this._anchorPosition$.asObservable());
1291
+ V(this, "_anchorVisible$", new Lt(!0));
1292
+ V(this, "_timer");
1293
+ V(this, "_anchorPosition$", new Lt([]));
1294
+ V(this, "anchorPosition$", this._anchorPosition$.asObservable());
1339
1295
  this._context = e, this._injector = t, this._sheetSkeletonManagerService = r, this._renderManagerService = i, this._commandService = a, this._univerInstanceService = l, this._uiPartsService = c, this._tableManager = d, this._scrollManagerService = h, this._workbookPermissionService = u, this._permissionService = g, this._initUI(), this._initListener(), this._initTableAnchor();
1340
1296
  }
1341
1297
  _initUI() {
1342
1298
  this.disposeWithMe(
1343
- this._uiPartsService.registerComponent(sr.CONTENT, () => lr(hi, this._injector))
1299
+ this._uiPartsService.registerComponent(sr.CONTENT, () => lr(vi, this._injector))
1344
1300
  );
1345
1301
  }
1346
1302
  _initListener() {
@@ -1382,18 +1338,18 @@ let nt = class extends He {
1382
1338
  return;
1383
1339
  }
1384
1340
  const d = a.reduce((u, g) => {
1385
- const { startRow: S, startColumn: C } = g.range, T = l.with(lt), O = tr(this._univerInstanceService, this._renderManagerService);
1341
+ const { startRow: _, startColumn: S } = g.range, T = l.with(st), O = tr(this._univerInstanceService, this._renderManagerService);
1386
1342
  if (!O) return u;
1387
- const { scene: p } = O, E = p.getViewport(Bn.VIEW_MAIN);
1343
+ const { scene: f } = O, E = f.getViewport(Dn.VIEW_MAIN);
1388
1344
  if (!E) return u;
1389
- const y = p == null ? void 0 : p.scaleX, D = p == null ? void 0 : p.scaleY, v = p == null ? void 0 : p.getViewportScrollXY(E);
1390
- if (!y || !p || !D || !v) return u;
1391
- const m = T.getCurrentSkeleton();
1392
- if (!m) return u;
1393
- const L = m.getNoMergeCellWithCoordByIndex(S, C), M = Fn(L.startX, y, v), f = Hn(L.startY, D, v) - 25 - 4;
1394
- return f >= -10 && M >= 45 && u.push({
1345
+ const y = f == null ? void 0 : f.scaleX, k = f == null ? void 0 : f.scaleY, v = f == null ? void 0 : f.getViewportScrollXY(E);
1346
+ if (!y || !f || !k || !v) return u;
1347
+ const p = T.getCurrentSkeleton();
1348
+ if (!p) return u;
1349
+ const L = p.getNoMergeCellWithCoordByIndex(_, S), M = Fn(L.startX, y, v), C = Hn(L.startY, k, v) - 25 - 4;
1350
+ return C >= -10 && M >= 45 && u.push({
1395
1351
  x: M,
1396
- y: f,
1352
+ y: C,
1397
1353
  tableId: g.id,
1398
1354
  tableName: g.name
1399
1355
  }), u;
@@ -1403,18 +1359,18 @@ let nt = class extends He {
1403
1359
  );
1404
1360
  }
1405
1361
  };
1406
- nt = gi([
1407
- te(1, x(Ve)),
1408
- te(2, x(lt)),
1362
+ tt = bi([
1363
+ te(1, N(Ve)),
1364
+ te(2, N(st)),
1409
1365
  te(3, qt),
1410
1366
  te(4, ce),
1411
1367
  te(5, _e),
1412
1368
  te(6, ar),
1413
- te(7, x(ne)),
1414
- te(8, x(Kn)),
1415
- te(9, x(rn)),
1416
- te(10, x(Ut))
1417
- ], nt);
1369
+ te(7, N(ne)),
1370
+ te(8, N(Kn)),
1371
+ te(9, N(rn)),
1372
+ te(10, N(Ut))
1373
+ ], tt);
1418
1374
  const Pe = 16;
1419
1375
  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");
1420
1376
  class Ht {
@@ -1438,36 +1394,36 @@ class Ht {
1438
1394
  }), e.restore();
1439
1395
  }
1440
1396
  }
1441
- const bi = [
1397
+ const mi = [
1442
1398
  "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"
1443
- ], mi = [
1399
+ ], pi = [
1444
1400
  "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",
1445
1401
  "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"
1446
- ], pi = [
1402
+ ], fi = [
1447
1403
  "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",
1448
1404
  "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"
1449
- ], fi = [
1405
+ ], Ci = [
1450
1406
  "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",
1451
1407
  "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",
1452
1408
  "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"
1453
- ], Ci = [
1409
+ ], Si = [
1454
1410
  "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",
1455
1411
  "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",
1456
1412
  "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"
1457
1413
  ];
1458
- var Si = Object.getOwnPropertyDescriptor, _i = (n, e, t, r) => {
1459
- for (var i = r > 1 ? void 0 : r ? Si(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1414
+ var _i = Object.getOwnPropertyDescriptor, Ti = (n, e, t, r) => {
1415
+ for (var i = r > 1 ? void 0 : r ? _i(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1460
1416
  (l = n[a]) && (i = l(i) || i);
1461
1417
  return i;
1462
1418
  }, vt = (n, e) => (t, r) => e(t, r, n);
1463
- const fe = 16, Ke = 1;
1419
+ const fe = 16, Xe = 1;
1464
1420
  let pt = class extends Vn {
1465
1421
  constructor(e, t, r, i, a) {
1466
1422
  super(e, t);
1467
- j(this, "_cellWidth", 0);
1468
- j(this, "_cellHeight", 0);
1469
- j(this, "_filterParams");
1470
- j(this, "_hovered", !1);
1423
+ V(this, "_cellWidth", 0);
1424
+ V(this, "_cellHeight", 0);
1425
+ V(this, "_filterParams");
1426
+ V(this, "_hovered", !1);
1471
1427
  this._contextService = r, this._commandService = i, this._themeService = a, this.setShapeProps(t), this.onPointerDown$.subscribeEvent((l) => this.onPointerDown(l)), this.onPointerEnter$.subscribeEvent(() => this.onPointerEnter()), this.onPointerLeave$.subscribeEvent(() => this.onPointerLeave());
1472
1428
  }
1473
1429
  setShapeProps(e) {
@@ -1485,21 +1441,21 @@ let pt = class extends Vn {
1485
1441
  let u;
1486
1442
  switch (c) {
1487
1443
  case $e.FilteredSortNone:
1488
- u = bi;
1444
+ u = mi;
1489
1445
  break;
1490
1446
  case $e.FilteredSortAsc:
1491
- u = mi;
1447
+ u = pi;
1492
1448
  break;
1493
1449
  case $e.FilteredSortDesc:
1494
- u = pi;
1450
+ u = fi;
1495
1451
  break;
1496
1452
  case $e.FilterNoneSortNone:
1497
1453
  break;
1498
1454
  case $e.FilterNoneSortAsc:
1499
- u = fi;
1455
+ u = Ci;
1500
1456
  break;
1501
1457
  case $e.FilterNoneSortDesc:
1502
- u = Ci;
1458
+ u = Si;
1503
1459
  break;
1504
1460
  }
1505
1461
  u ? Ht.drawIconByPath(e, u, d, h) : c !== void 0 && Ht.drawNoSetting(e, fe, d, h), e.restore();
@@ -1526,22 +1482,22 @@ let pt = class extends Vn {
1526
1482
  this._hovered = !1, this.makeDirty(!0);
1527
1483
  }
1528
1484
  };
1529
- pt = _i([
1485
+ pt = Ti([
1530
1486
  vt(2, St),
1531
1487
  vt(3, ce),
1532
- vt(4, x(En))
1488
+ vt(4, N(xn))
1533
1489
  ], pt);
1534
- var Ti = Object.getOwnPropertyDescriptor, wi = (n, e, t, r) => {
1535
- for (var i = r > 1 ? void 0 : r ? Ti(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1490
+ var wi = Object.getOwnPropertyDescriptor, Ii = (n, e, t, r) => {
1491
+ for (var i = r > 1 ? void 0 : r ? wi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
1536
1492
  (l = n[a]) && (i = l(i) || i);
1537
1493
  return i;
1538
- }, Je = (n, e) => (t, r) => e(t, r, n);
1539
- const Ii = 5e3;
1494
+ }, Ke = (n, e) => (t, r) => e(t, r, n);
1495
+ const yi = 5e3;
1540
1496
  let ft = class extends Zt {
1541
1497
  constructor(e, t, r, i, a) {
1542
1498
  super();
1543
- j(this, "_buttonRenderDisposable", null);
1544
- j(this, "_tableFilterButtonShapes", []);
1499
+ V(this, "_buttonRenderDisposable", null);
1500
+ V(this, "_tableFilterButtonShapes", []);
1545
1501
  this._context = e, this._injector = t, this._sheetSkeletonManagerService = r, this._sheetInterceptorService = i, this._tableManager = a, this._initRenderer();
1546
1502
  }
1547
1503
  dispose() {
@@ -1550,7 +1506,7 @@ let ft = class extends Zt {
1550
1506
  _initRenderer() {
1551
1507
  const e = this._tableManager;
1552
1508
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
1553
- Ne((t) => {
1509
+ Re((t) => {
1554
1510
  var c;
1555
1511
  if (!t) return J(null);
1556
1512
  const { unit: r, unitId: i } = this._context, a = ((c = r.getActiveSheet()) == null ? void 0 : c.getSheetId()) || "", l = () => ({
@@ -1579,34 +1535,34 @@ let ft = class extends Zt {
1579
1535
  _renderButtons(e) {
1580
1536
  const { tableFilterRanges: t, unitId: r, skeleton: i, worksheetId: a } = e, { scene: l } = this._context;
1581
1537
  for (const { range: c, states: d, tableId: h } of t) {
1582
- const { startRow: u, startColumn: g, endColumn: S } = c;
1538
+ const { startRow: u, startColumn: g, endColumn: _ } = c;
1583
1539
  this._interceptCellContent(r, a, c);
1584
- for (let C = g; C <= S; C++) {
1585
- const T = `sheets-table-filter-button-${u}-${C}`, O = nr(u, C, l, i), { startX: p, startY: E, endX: y, endY: D } = O, v = y - p, m = D - E;
1586
- if (m <= Ke || v <= Ke)
1540
+ for (let S = g; S <= _; S++) {
1541
+ const T = `sheets-table-filter-button-${u}-${S}`, O = nr(u, S, l, i), { startX: f, startY: E, endX: y, endY: k } = O, v = y - f, p = k - E;
1542
+ if (p <= Xe || v <= Xe)
1587
1543
  continue;
1588
- const L = d[C - g], M = y - fe - Ke, f = D - fe - Ke, U = {
1544
+ const L = d[S - g], M = y - fe - Xe, C = k - fe - Xe, F = {
1589
1545
  left: M,
1590
- top: f,
1546
+ top: C,
1591
1547
  height: fe,
1592
1548
  width: fe,
1593
- zIndex: Ii,
1594
- cellHeight: m,
1549
+ zIndex: yi,
1550
+ cellHeight: p,
1595
1551
  cellWidth: v,
1596
- filterParams: { unitId: r, subUnitId: a, row: u, col: C, buttonState: L, tableId: h }
1597
- }, P = this._injector.createInstance(pt, T, U);
1598
- this._tableFilterButtonShapes.push(P);
1552
+ filterParams: { unitId: r, subUnitId: a, row: u, col: S, buttonState: L, tableId: h }
1553
+ }, x = this._injector.createInstance(pt, T, F);
1554
+ this._tableFilterButtonShapes.push(x);
1599
1555
  }
1600
1556
  }
1601
1557
  l.addObjects(this._tableFilterButtonShapes), l.makeDirty();
1602
1558
  }
1603
1559
  _interceptCellContent(e, t, r) {
1604
1560
  const { startRow: i, startColumn: a, endColumn: l } = r;
1605
- this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Rr.CELL_CONTENT, {
1561
+ this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Nr.CELL_CONTENT, {
1606
1562
  effect: Ln.Style,
1607
1563
  handler: (c, d, h) => {
1608
- const { row: u, col: g, unitId: S, subUnitId: C } = d;
1609
- return S !== e || C !== t || u !== i || g < a || g > l ? h(c) : h({
1564
+ const { row: u, col: g, unitId: _, subUnitId: S } = d;
1565
+ return _ !== e || S !== t || u !== i || g < a || g > l ? h(c) : h({
1610
1566
  ...c,
1611
1567
  fontRenderExtension: {
1612
1568
  ...c == null ? void 0 : c.fontRenderExtension,
@@ -1622,49 +1578,49 @@ let ft = class extends Zt {
1622
1578
  this._tableFilterButtonShapes.forEach((t) => t.dispose()), (e = this._buttonRenderDisposable) == null || e.dispose(), this._buttonRenderDisposable = null, this._tableFilterButtonShapes = [];
1623
1579
  }
1624
1580
  };
1625
- ft = wi([
1626
- Je(1, x(Ve)),
1627
- Je(2, x(lt)),
1628
- Je(3, x(sn)),
1629
- Je(4, x(ne))
1581
+ ft = Ii([
1582
+ Ke(1, N(Ve)),
1583
+ Ke(2, N(st)),
1584
+ Ke(3, N(sn)),
1585
+ Ke(4, N(ne))
1630
1586
  ], ft);
1631
- const yi = (n) => {
1632
- const { unitId: e, subUnitId: t, range: r, onCancel: i, onConfirm: a, tableId: l } = n, c = R(ne), [d, h] = q(r), [u, g] = q(""), S = R(ue), C = R(_e);
1633
- return /* @__PURE__ */ _(Tt, { children: [
1587
+ const Mi = (n) => {
1588
+ const { unitId: e, subUnitId: t, range: r, onCancel: i, onConfirm: a, tableId: l } = n, c = R(ne), [d, h] = Z(r), [u, g] = Z(""), _ = R(ue), S = R(_e);
1589
+ return /* @__PURE__ */ w(Tt, { children: [
1634
1590
  /* @__PURE__ */ o(
1635
- $r,
1591
+ Or,
1636
1592
  {
1637
1593
  maxRangeCount: 1,
1638
1594
  unitId: e,
1639
1595
  subUnitId: t,
1640
- initialValue: Bt(r),
1596
+ initialValue: Dt(r),
1641
1597
  onChange: (T, O) => {
1642
- const p = Bt(r), E = Lr(O).range, y = ot(C, { unitId: e, subUnitId: t });
1598
+ const f = Dt(r), E = $r(O).range, y = lt(S, { unitId: e, subUnitId: t });
1643
1599
  if (!y)
1644
1600
  return;
1645
- if (y.worksheet.getMergeData().some((P) => Ce.intersects(E, P))) {
1646
- g(S.t("sheets-table.tableRangeWithMergeError"));
1601
+ if (y.worksheet.getMergeData().some((x) => Ce.intersects(E, x))) {
1602
+ g(_.t("sheets-table.tableRangeWithMergeError"));
1647
1603
  return;
1648
1604
  }
1649
- if (c.getTablesBySubunitId(e, t).some((P) => {
1650
- if (P.getId() === l)
1605
+ if (c.getTablesBySubunitId(e, t).some((x) => {
1606
+ if (x.getId() === l)
1651
1607
  return !1;
1652
- const Q = P.getRange();
1608
+ const Q = x.getRange();
1653
1609
  return Ce.intersects(E, Q);
1654
1610
  })) {
1655
- g(S.t("sheets-table.tableRangeWithOtherTableError"));
1611
+ g(_.t("sheets-table.tableRangeWithOtherTableError"));
1656
1612
  return;
1657
1613
  }
1658
- const { startRow: M, endRow: f } = E;
1659
- if (M === f) {
1660
- g(S.t("sheets-table.tableRangeSingleRowError"));
1614
+ const { startRow: M, endRow: C } = E;
1615
+ if (M === C) {
1616
+ g(_.t("sheets-table.tableRangeSingleRowError"));
1661
1617
  return;
1662
1618
  }
1663
- if (p !== O) {
1619
+ if (f !== O) {
1664
1620
  if (l) {
1665
- const P = c.getTableById(e, l);
1666
- if (P) {
1667
- const Q = P.getRange();
1621
+ const x = c.getTableById(e, l);
1622
+ if (x) {
1623
+ const Q = x.getRange();
1668
1624
  if (Ce.intersects(E, Q) && Q.startRow === E.startRow) {
1669
1625
  h(E), g(""), a({
1670
1626
  unitId: e,
@@ -1673,7 +1629,7 @@ const yi = (n) => {
1673
1629
  });
1674
1630
  return;
1675
1631
  } else {
1676
- g(S.t("sheets-table.updateError"));
1632
+ g(_.t("sheets-table.updateError"));
1677
1633
  return;
1678
1634
  }
1679
1635
  }
@@ -1685,10 +1641,10 @@ const yi = (n) => {
1685
1641
  }
1686
1642
  ),
1687
1643
  u && /* @__PURE__ */ o("div", { className: "univer-mt-1 univer-text-xs univer-text-red-500", children: u }),
1688
- /* @__PURE__ */ _("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
1689
- /* @__PURE__ */ o(Ze, { onClick: i, children: S.t("sheets-table.cancel") }),
1644
+ /* @__PURE__ */ w("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
1645
+ /* @__PURE__ */ o(ye, { onClick: i, children: _.t("sheets-table.cancel") }),
1690
1646
  /* @__PURE__ */ o(
1691
- Ze,
1647
+ ye,
1692
1648
  {
1693
1649
  variant: "primary",
1694
1650
  onClick: () => {
@@ -1699,70 +1655,70 @@ const yi = (n) => {
1699
1655
  });
1700
1656
  },
1701
1657
  className: "univer-ml-2",
1702
- children: S.t("sheets-table.confirm")
1658
+ children: _.t("sheets-table.confirm")
1703
1659
  }
1704
1660
  )
1705
1661
  ] })
1706
1662
  ] });
1707
- }, Mi = (n) => {
1708
- var Le, we, Ie, I, A, N, F, Ae, de, qe, ut, Ye;
1709
- const { unitId: e, subUnitId: t, tableId: r } = n, i = R(ce), a = R(ue), l = R(ne), c = l.getTableById(e, r), d = R(an), h = R(xe), u = Re(d.rangeThemeMapChange$), g = Re(h.refreshTable$), S = R($n), [, C] = q(Math.random()), T = Re(l.tableThemeChanged$, {
1663
+ }, Ri = (n) => {
1664
+ var Le, Te, de, b, P, H, q, ct, je, Ze, ut, qe;
1665
+ const { unitId: e, subUnitId: t, tableId: r } = n, i = R(ce), a = R(ue), l = R(ne), c = l.getTableById(e, r), d = R(an), h = R(Ne), u = Me(d.rangeThemeMapChange$), g = Me(h.refreshTable$), _ = R($n), [, S] = Z(Math.random()), T = Me(l.tableThemeChanged$, {
1710
1666
  theme: c == null ? void 0 : c.getTableStyleId(),
1711
1667
  oldTheme: c == null ? void 0 : c.getTableStyleId(),
1712
1668
  unitId: e,
1713
1669
  subUnitId: t,
1714
1670
  tableId: r
1715
- }), O = d.getRegisteredRangeThemes().filter((b) => b == null ? void 0 : b.startsWith(Dr)), p = d.getALLRegisteredTheme(e).filter((b) => b == null ? void 0 : b.startsWith(ht)), E = c == null ? void 0 : c.getTableStyleId(), y = p.find((b) => b === E), D = y || p[0], v = d.getCustomRangeThemeStyle(e, D), m = (Ie = (we = (Le = v == null ? void 0 : v.getHeaderRowStyle()) == null ? void 0 : Le.bg) == null ? void 0 : we.rgb) != null ? Ie : me, L = (N = (A = (I = v == null ? void 0 : v.getFirstRowStyle()) == null ? void 0 : I.bg) == null ? void 0 : A.rgb) != null ? N : me, M = (de = (Ae = (F = v == null ? void 0 : v.getSecondRowStyle()) == null ? void 0 : F.bg) == null ? void 0 : Ae.rgb) != null ? de : me, f = (Ye = (ut = (qe = v == null ? void 0 : v.getLastRowStyle()) == null ? void 0 : qe.bg) == null ? void 0 : ut.rgb) != null ? Ye : me, [U, P] = q(null), Q = (b) => {
1671
+ }), O = d.getRegisteredRangeThemes().filter((m) => m == null ? void 0 : m.startsWith(Dr)), f = d.getALLRegisteredTheme(e).filter((m) => m == null ? void 0 : m.startsWith(ht)), E = c == null ? void 0 : c.getTableStyleId(), y = f.find((m) => m === E), k = y || f[0], v = d.getCustomRangeThemeStyle(e, k), p = (de = (Te = (Le = v == null ? void 0 : v.getHeaderRowStyle()) == null ? void 0 : Le.bg) == null ? void 0 : Te.rgb) != null ? de : me, L = (H = (P = (b = v == null ? void 0 : v.getFirstRowStyle()) == null ? void 0 : b.bg) == null ? void 0 : P.rgb) != null ? H : me, M = (je = (ct = (q = v == null ? void 0 : v.getSecondRowStyle()) == null ? void 0 : q.bg) == null ? void 0 : ct.rgb) != null ? je : me, C = (qe = (ut = (Ze = v == null ? void 0 : v.getLastRowStyle()) == null ? void 0 : Ze.bg) == null ? void 0 : ut.rgb) != null ? qe : me, [F, x] = Z(null), Q = (m) => {
1716
1672
  i.executeCommand(bt.id, {
1717
1673
  unitId: e,
1718
1674
  tableId: r,
1719
- theme: b
1675
+ theme: m
1720
1676
  });
1721
- }, B = () => {
1722
- if (p.length >= 11) {
1723
- S.emit(a.t("sheets-table.customTooMore"));
1677
+ }, U = () => {
1678
+ if (f.length >= 11) {
1679
+ _.emit(a.t("sheets-table.customTooMore"));
1724
1680
  return;
1725
1681
  }
1726
- const b = p[p.length - 1];
1727
- let w = `${ht}1`;
1728
- if (b) {
1729
- const K = Number(b.split("-")[2]);
1730
- w = `${ht}${K + 1}`;
1682
+ const m = f[f.length - 1];
1683
+ let I = `${ht}1`;
1684
+ if (m) {
1685
+ const K = Number(m.split("-")[2]);
1686
+ I = `${ht}${K + 1}`;
1731
1687
  }
1732
- const X = new Nr(w, { ...Yn });
1688
+ const X = new Er(I, { ...Yn });
1733
1689
  i.executeCommand(Qn.id, {
1734
1690
  unitId: e,
1735
1691
  tableId: r,
1736
1692
  themeStyle: X
1737
1693
  });
1738
- }, ee = (b, w) => {
1694
+ }, ee = (m, I) => {
1739
1695
  i.executeCommand(nn.id, {
1740
1696
  unitId: e,
1741
1697
  subUnitId: t,
1742
- styleName: b,
1743
- style: w
1698
+ styleName: m,
1699
+ style: I
1744
1700
  });
1745
- }, Te = (b) => {
1701
+ }, xe = (m) => {
1746
1702
  i.executeCommand(zn.id, {
1747
1703
  unitId: e,
1748
1704
  tableId: r,
1749
- themeName: b
1705
+ themeName: m
1750
1706
  });
1751
1707
  };
1752
1708
  return on(() => {
1753
- C(Math.random());
1754
- }, [u, g]), c ? /* @__PURE__ */ _("div", { children: [
1709
+ S(Math.random());
1710
+ }, [u, g]), c ? /* @__PURE__ */ w("div", { children: [
1755
1711
  /* @__PURE__ */ o("h5", { children: a.t("sheets-table.defaultStyle") }),
1756
- /* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children: O.map((b) => {
1757
- var he, ve, ge, Y, ye, Me, Ue, je;
1758
- const w = d.getDefaultRangeThemeStyle(b), X = ((ve = (he = w == null ? void 0 : w.getHeaderRowStyle()) == null ? void 0 : he.bg) == null ? void 0 : ve.rgb) || me, K = ((Y = (ge = w == null ? void 0 : w.getFirstRowStyle()) == null ? void 0 : ge.bg) == null ? void 0 : Y.rgb) || me, se = ((Me = (ye = w == null ? void 0 : w.getSecondRowStyle()) == null ? void 0 : ye.bg) == null ? void 0 : Me.rgb) || me, le = ((je = (Ue = w == null ? void 0 : w.getLastRowStyle()) == null ? void 0 : Ue.bg) == null ? void 0 : je.rgb) || me;
1759
- return /* @__PURE__ */ _(
1712
+ /* @__PURE__ */ o("div", { className: "univer-flex univer-gap-2", children: O.map((m) => {
1713
+ var he, ve, ge, Y, we, Ie, Ae, Ue;
1714
+ const I = d.getDefaultRangeThemeStyle(m), X = ((ve = (he = I == null ? void 0 : I.getHeaderRowStyle()) == null ? void 0 : he.bg) == null ? void 0 : ve.rgb) || me, K = ((Y = (ge = I == null ? void 0 : I.getFirstRowStyle()) == null ? void 0 : ge.bg) == null ? void 0 : Y.rgb) || me, se = ((Ie = (we = I == null ? void 0 : I.getSecondRowStyle()) == null ? void 0 : we.bg) == null ? void 0 : Ie.rgb) || me, le = ((Ue = (Ae = I == null ? void 0 : I.getLastRowStyle()) == null ? void 0 : Ae.bg) == null ? void 0 : Ue.rgb) || me;
1715
+ return /* @__PURE__ */ w(
1760
1716
  "div",
1761
1717
  {
1762
1718
  className: "univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px",
1763
- onClick: () => Q(b),
1719
+ onClick: () => Q(m),
1764
1720
  style: {
1765
- border: b === T.theme ? Ft : Oe
1721
+ border: m === T.theme ? Ft : Oe
1766
1722
  },
1767
1723
  children: [
1768
1724
  /* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: X, border: `${z}` } }),
@@ -1771,35 +1727,35 @@ const yi = (n) => {
1771
1727
  /* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: le, border: `${z}` } })
1772
1728
  ]
1773
1729
  },
1774
- b
1730
+ m
1775
1731
  );
1776
1732
  }) }),
1777
1733
  /* @__PURE__ */ o("h5", { children: a.t("sheets-table.customStyle") }),
1778
- /* @__PURE__ */ _("div", { className: k("univer-w-full univer-rounded-sm", H), children: [
1779
- /* @__PURE__ */ _("div", { className: "univer-flex univer-flex-wrap univer-gap-2 univer-p-2", children: [
1734
+ /* @__PURE__ */ w("div", { className: B("univer-w-full univer-rounded-sm", A), children: [
1735
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-flex-wrap univer-gap-2 univer-p-2", children: [
1780
1736
  /* @__PURE__ */ o(
1781
1737
  "div",
1782
1738
  {
1783
- className: k(`
1739
+ className: B(`
1784
1740
  univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px univer-text-center univer-leading-10
1785
- `, H),
1786
- onClick: B,
1741
+ `, A),
1742
+ onClick: U,
1787
1743
  children: "+"
1788
1744
  }
1789
1745
  ),
1790
- p.map((b) => {
1791
- var he, ve, ge, Y, ye, Me, Ue, je;
1792
- const w = d.getCustomRangeThemeStyle(e, b), X = (ve = (he = w == null ? void 0 : w.getHeaderRowStyle()) == null ? void 0 : he.bg) == null ? void 0 : ve.rgb, K = (Y = (ge = w == null ? void 0 : w.getFirstRowStyle()) == null ? void 0 : ge.bg) == null ? void 0 : Y.rgb, se = (Me = (ye = w == null ? void 0 : w.getSecondRowStyle()) == null ? void 0 : ye.bg) == null ? void 0 : Me.rgb, le = (je = (Ue = w == null ? void 0 : w.getLastRowStyle()) == null ? void 0 : Ue.bg) == null ? void 0 : je.rgb;
1793
- return /* @__PURE__ */ _(
1746
+ f.map((m) => {
1747
+ var he, ve, ge, Y, we, Ie, Ae, Ue;
1748
+ const I = d.getCustomRangeThemeStyle(e, m), X = (ve = (he = I == null ? void 0 : I.getHeaderRowStyle()) == null ? void 0 : he.bg) == null ? void 0 : ve.rgb, K = (Y = (ge = I == null ? void 0 : I.getFirstRowStyle()) == null ? void 0 : ge.bg) == null ? void 0 : Y.rgb, se = (Ie = (we = I == null ? void 0 : I.getSecondRowStyle()) == null ? void 0 : we.bg) == null ? void 0 : Ie.rgb, le = (Ue = (Ae = I == null ? void 0 : I.getLastRowStyle()) == null ? void 0 : Ae.bg) == null ? void 0 : Ue.rgb;
1749
+ return /* @__PURE__ */ w(
1794
1750
  "div",
1795
1751
  {
1796
1752
  className: "univer-relative univer-h-10 univer-w-8 univer-cursor-pointer univer-p-px",
1797
- onClick: () => Q(b),
1753
+ onClick: () => Q(m),
1798
1754
  style: {
1799
- border: b === T.theme ? Ft : Oe
1755
+ border: m === T.theme ? Ft : Oe
1800
1756
  },
1801
- onMouseEnter: () => P(b),
1802
- onMouseLeave: () => P(null),
1757
+ onMouseEnter: () => x(m),
1758
+ onMouseLeave: () => x(null),
1803
1759
  children: [
1804
1760
  /* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: X != null ? X : z, border: `${X ? z : Oe}` } }),
1805
1761
  /* @__PURE__ */ o("div", { className: "univer-box-border univer-h-2.5", style: { background: K != null ? K : z, border: `${K ? z : Oe}` } }),
@@ -1813,72 +1769,72 @@ const yi = (n) => {
1813
1769
  univer-rounded-md univer-bg-gray-200 univer-text-center univer-text-xs
1814
1770
  univer-leading-[10px]
1815
1771
  `,
1816
- style: { display: U === b ? "block" : "none" },
1772
+ style: { display: F === m ? "block" : "none" },
1817
1773
  onClick: (Mn) => {
1818
- Mn.stopPropagation(), Te(b);
1774
+ Mn.stopPropagation(), xe(m);
1819
1775
  },
1820
1776
  children: "x"
1821
1777
  }
1822
1778
  )
1823
1779
  ]
1824
1780
  },
1825
- b
1781
+ m
1826
1782
  );
1827
1783
  })
1828
1784
  ] }),
1829
- y && /* @__PURE__ */ _(Tt, { children: [
1785
+ y && /* @__PURE__ */ w(Tt, { children: [
1830
1786
  /* @__PURE__ */ o("div", { className: "univer-h-px univer-w-full univer-bg-gray-200" }),
1831
- /* @__PURE__ */ _("div", { className: "univer-flex univer-flex-col univer-gap-2 univer-p-2", children: [
1832
- /* @__PURE__ */ _("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1787
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-flex-col univer-gap-2 univer-p-2", children: [
1788
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1833
1789
  /* @__PURE__ */ o(
1834
1790
  "div",
1835
1791
  {
1836
- className: k(`
1792
+ className: B(`
1837
1793
  univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center
1838
1794
  univer-leading-9
1839
- `, H),
1795
+ `, A),
1840
1796
  style: {
1841
- background: m,
1842
- color: new oe(m).isDark() ? "#fff" : "#000"
1797
+ background: p,
1798
+ color: new oe(p).isDark() ? "#fff" : "#000"
1843
1799
  },
1844
1800
  children: a.t("sheets-table.header")
1845
1801
  }
1846
1802
  ),
1847
1803
  /* @__PURE__ */ o(
1848
- De,
1804
+ Be,
1849
1805
  {
1850
1806
  overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
1851
- ze,
1807
+ Qe,
1852
1808
  {
1853
- value: m,
1854
- onChange: (b) => {
1855
- const w = Et("headerRowStyle", {
1809
+ value: p,
1810
+ onChange: (m) => {
1811
+ const I = xt("headerRowStyle", {
1856
1812
  bg: {
1857
- rgb: b
1813
+ rgb: m
1858
1814
  },
1859
1815
  cl: {
1860
- rgb: new oe(b).isDark() ? "#fff" : "#000"
1816
+ rgb: new oe(m).isDark() ? "#fff" : "#000"
1861
1817
  }
1862
1818
  });
1863
- ee(c.getTableStyleId(), { headerRowStyle: w });
1819
+ ee(c.getTableStyleId(), { headerRowStyle: I });
1864
1820
  }
1865
1821
  }
1866
1822
  ) }),
1867
- children: /* @__PURE__ */ _(
1823
+ children: /* @__PURE__ */ w(
1868
1824
  "div",
1869
1825
  {
1870
- className: k(`
1826
+ className: B(`
1871
1827
  univer-flex univer-cursor-pointer univer-items-center univer-gap-2
1872
1828
  univer-rounded-sm univer-bg-white univer-p-1
1873
- `, H),
1829
+ `, A),
1874
1830
  children: [
1875
1831
  /* @__PURE__ */ o(
1876
1832
  "div",
1877
1833
  {
1878
- className: k("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
1834
+ className: B("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", A),
1879
1835
  style: {
1880
- background: m,
1881
- color: new oe(m).isDark() ? "#fff" : "#000"
1836
+ background: p,
1837
+ color: new oe(p).isDark() ? "#fff" : "#000"
1882
1838
  }
1883
1839
  }
1884
1840
  ),
@@ -1889,14 +1845,14 @@ const yi = (n) => {
1889
1845
  }
1890
1846
  )
1891
1847
  ] }),
1892
- /* @__PURE__ */ _("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1848
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1893
1849
  /* @__PURE__ */ o(
1894
1850
  "div",
1895
1851
  {
1896
- className: k(`
1852
+ className: B(`
1897
1853
  univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center
1898
1854
  univer-leading-9
1899
- `, H),
1855
+ `, A),
1900
1856
  style: {
1901
1857
  background: L,
1902
1858
  color: new oe(L).isDark() ? "#fff" : "#000"
@@ -1905,38 +1861,38 @@ const yi = (n) => {
1905
1861
  }
1906
1862
  ),
1907
1863
  /* @__PURE__ */ o(
1908
- De,
1864
+ Be,
1909
1865
  {
1910
1866
  overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
1911
- ze,
1867
+ Qe,
1912
1868
  {
1913
1869
  value: L,
1914
- onChange: (b) => {
1870
+ onChange: (m) => {
1915
1871
  ee(c.getTableStyleId(), {
1916
1872
  firstRowStyle: {
1917
1873
  bg: {
1918
- rgb: b
1874
+ rgb: m
1919
1875
  },
1920
1876
  cl: {
1921
- rgb: new oe(b).isDark() ? "#fff" : "#000"
1877
+ rgb: new oe(m).isDark() ? "#fff" : "#000"
1922
1878
  }
1923
1879
  }
1924
1880
  });
1925
1881
  }
1926
1882
  }
1927
1883
  ) }),
1928
- children: /* @__PURE__ */ _(
1884
+ children: /* @__PURE__ */ w(
1929
1885
  "div",
1930
1886
  {
1931
- className: k(`
1887
+ className: B(`
1932
1888
  univer-flex univer-cursor-pointer univer-items-center univer-gap-2
1933
1889
  univer-rounded-sm univer-bg-white univer-p-1
1934
- `, H),
1890
+ `, A),
1935
1891
  children: [
1936
1892
  /* @__PURE__ */ o(
1937
1893
  "div",
1938
1894
  {
1939
- className: k("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
1895
+ className: B("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", A),
1940
1896
  style: { background: L }
1941
1897
  }
1942
1898
  ),
@@ -1947,14 +1903,14 @@ const yi = (n) => {
1947
1903
  }
1948
1904
  )
1949
1905
  ] }),
1950
- /* @__PURE__ */ _("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1906
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1951
1907
  /* @__PURE__ */ o(
1952
1908
  "div",
1953
1909
  {
1954
- className: k(`
1910
+ className: B(`
1955
1911
  univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center
1956
1912
  univer-leading-9
1957
- `, H),
1913
+ `, A),
1958
1914
  style: {
1959
1915
  background: M,
1960
1916
  color: new oe(M).isDark() ? "#fff" : "#000"
@@ -1963,28 +1919,28 @@ const yi = (n) => {
1963
1919
  }
1964
1920
  ),
1965
1921
  /* @__PURE__ */ o(
1966
- De,
1922
+ Be,
1967
1923
  {
1968
1924
  overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
1969
- ze,
1925
+ Qe,
1970
1926
  {
1971
1927
  value: M,
1972
- onChange: (b) => ee(c.getTableStyleId(), {
1928
+ onChange: (m) => ee(c.getTableStyleId(), {
1973
1929
  secondRowStyle: {
1974
1930
  bg: {
1975
- rgb: b
1931
+ rgb: m
1976
1932
  },
1977
1933
  cl: {
1978
- rgb: new oe(b).isDark() ? "#fff" : "#000"
1934
+ rgb: new oe(m).isDark() ? "#fff" : "#000"
1979
1935
  }
1980
1936
  }
1981
1937
  })
1982
1938
  }
1983
1939
  ) }),
1984
- children: /* @__PURE__ */ _(
1940
+ children: /* @__PURE__ */ w(
1985
1941
  "div",
1986
1942
  {
1987
- className: k(`
1943
+ className: B(`
1988
1944
  univer-flex univer-cursor-pointer univer-items-center univer-gap-2
1989
1945
  univer-rounded-sm univer-bg-white univer-p-1
1990
1946
  `),
@@ -1992,7 +1948,7 @@ const yi = (n) => {
1992
1948
  /* @__PURE__ */ o(
1993
1949
  "div",
1994
1950
  {
1995
- className: k("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
1951
+ className: B("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", A),
1996
1952
  style: { background: M }
1997
1953
  }
1998
1954
  ),
@@ -2003,54 +1959,54 @@ const yi = (n) => {
2003
1959
  }
2004
1960
  )
2005
1961
  ] }),
2006
- /* @__PURE__ */ _("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
1962
+ /* @__PURE__ */ w("div", { className: "univer-flex univer-h-9 univer-gap-2", children: [
2007
1963
  /* @__PURE__ */ o(
2008
1964
  "div",
2009
1965
  {
2010
- className: k(`
1966
+ className: B(`
2011
1967
  univer-box-border univer-h-full univer-w-52 univer-rounded-sm univer-text-center
2012
1968
  univer-leading-9
2013
- `, H),
1969
+ `, A),
2014
1970
  style: {
2015
- background: f,
2016
- color: new oe(f).isDark() ? "#fff" : "#000"
1971
+ background: C,
1972
+ color: new oe(C).isDark() ? "#fff" : "#000"
2017
1973
  },
2018
1974
  children: a.t("sheets-table.footer")
2019
1975
  }
2020
1976
  ),
2021
1977
  /* @__PURE__ */ o(
2022
- De,
1978
+ Be,
2023
1979
  {
2024
1980
  overlay: /* @__PURE__ */ o("div", { className: "univer-p-2", children: /* @__PURE__ */ o(
2025
- ze,
1981
+ Qe,
2026
1982
  {
2027
- value: f,
2028
- onChange: (b) => {
2029
- const w = Et("lastRowStyle", {
1983
+ value: C,
1984
+ onChange: (m) => {
1985
+ const I = xt("lastRowStyle", {
2030
1986
  bg: {
2031
- rgb: b
1987
+ rgb: m
2032
1988
  },
2033
1989
  cl: {
2034
- rgb: new oe(b).isDark() ? "#fff" : "#000"
1990
+ rgb: new oe(m).isDark() ? "#fff" : "#000"
2035
1991
  }
2036
1992
  });
2037
- ee(c.getTableStyleId(), { lastRowStyle: w });
1993
+ ee(c.getTableStyleId(), { lastRowStyle: I });
2038
1994
  }
2039
1995
  }
2040
1996
  ) }),
2041
- children: /* @__PURE__ */ _(
1997
+ children: /* @__PURE__ */ w(
2042
1998
  "div",
2043
1999
  {
2044
- className: k(`
2000
+ className: B(`
2045
2001
  univer-flex univer-cursor-pointer univer-items-center univer-gap-2
2046
2002
  univer-rounded-sm univer-bg-white univer-p-1
2047
- `, H),
2003
+ `, A),
2048
2004
  children: [
2049
2005
  /* @__PURE__ */ o(
2050
2006
  "div",
2051
2007
  {
2052
- className: k("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", H),
2053
- style: { background: f }
2008
+ className: B("univer-h-4 univer-w-4 univer-rounded-lg univer-bg-gray-400", A),
2009
+ style: { background: C }
2054
2010
  }
2055
2011
  ),
2056
2012
  /* @__PURE__ */ o(We, { className: "univer-h-2 univer-w-2" })
@@ -2065,7 +2021,7 @@ const yi = (n) => {
2065
2021
  ] })
2066
2022
  ] }) : null;
2067
2023
  }, _n = "sheet.table.context-insert_menu-id", Tn = "sheet.table.context-remove_menu-id";
2068
- function Ri(n) {
2024
+ function Ni(n) {
2069
2025
  return {
2070
2026
  id: Mt.id,
2071
2027
  type: Ee.BUTTON,
@@ -2074,7 +2030,7 @@ function Ri(n) {
2074
2030
  title: "sheets-table.title"
2075
2031
  };
2076
2032
  }
2077
- function Ni(n) {
2033
+ function Ei(n) {
2078
2034
  return {
2079
2035
  id: _n,
2080
2036
  type: Ee.SUBITEMS,
@@ -2092,7 +2048,7 @@ function xi(n) {
2092
2048
  hidden$: wn(n)
2093
2049
  };
2094
2050
  }
2095
- function Ei(n) {
2051
+ function Li(n) {
2096
2052
  return {
2097
2053
  id: Gt.id,
2098
2054
  type: Ee.BUTTON,
@@ -2100,14 +2056,14 @@ function Ei(n) {
2100
2056
  hidden$: In(n)
2101
2057
  };
2102
2058
  }
2103
- function Li(n) {
2059
+ function $i(n) {
2104
2060
  return {
2105
2061
  id: zt.id,
2106
2062
  title: "sheets-table.insert.col",
2107
2063
  type: Ee.BUTTON
2108
2064
  };
2109
2065
  }
2110
- function $i(n) {
2066
+ function Oi(n) {
2111
2067
  return {
2112
2068
  id: Qt.id,
2113
2069
  type: Ee.BUTTON,
@@ -2115,7 +2071,7 @@ function $i(n) {
2115
2071
  hidden$: In(n)
2116
2072
  };
2117
2073
  }
2118
- function Oi(n) {
2074
+ function Pi(n) {
2119
2075
  return {
2120
2076
  id: Yt.id,
2121
2077
  title: "sheets-table.remove.col",
@@ -2123,11 +2079,11 @@ function Oi(n) {
2123
2079
  };
2124
2080
  }
2125
2081
  function wn(n) {
2126
- const e = n.get(ct);
2127
- return n.get(_e).getCurrentTypeOfUnit$(st.UNIVER_SHEET).pipe(
2128
- Ne((i) => i ? i.activeSheet$.pipe(
2129
- Ne((a) => a ? e.selectionMoveEnd$.pipe(
2130
- Ne((l) => {
2082
+ const e = n.get(ot);
2083
+ return n.get(_e).getCurrentTypeOfUnit$(at.UNIVER_SHEET).pipe(
2084
+ Re((i) => i ? i.activeSheet$.pipe(
2085
+ Re((a) => a ? e.selectionMoveEnd$.pipe(
2086
+ Re((l) => {
2131
2087
  if (!l.length || l.length > 1) return J(!0);
2132
2088
  const d = l[0].range, u = n.get(Xt).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), d);
2133
2089
  return J(!u);
@@ -2137,11 +2093,11 @@ function wn(n) {
2137
2093
  );
2138
2094
  }
2139
2095
  function In(n) {
2140
- const e = n.get(ct);
2141
- return n.get(_e).getCurrentTypeOfUnit$(st.UNIVER_SHEET).pipe(
2142
- Ne((i) => i ? i.activeSheet$.pipe(
2143
- Ne((a) => a ? e.selectionMoveEnd$.pipe(
2144
- Ne((l) => {
2096
+ const e = n.get(ot);
2097
+ return n.get(_e).getCurrentTypeOfUnit$(at.UNIVER_SHEET).pipe(
2098
+ Re((i) => i ? i.activeSheet$.pipe(
2099
+ Re((a) => a ? e.selectionMoveEnd$.pipe(
2100
+ Re((l) => {
2145
2101
  if (!l.length || l.length > 1) return J(!0);
2146
2102
  const d = l[0].range, u = n.get(Xt).getContainerTableWithRange(i.getUnitId(), a.getSheetId(), d);
2147
2103
  if (!u)
@@ -2153,25 +2109,25 @@ function In(n) {
2153
2109
  ) : J(!0))
2154
2110
  );
2155
2111
  }
2156
- const Pi = {
2112
+ const ki = {
2157
2113
  [ur.FORMULAS_VIEW]: {
2158
2114
  [Mt.id]: {
2159
2115
  order: 0,
2160
- menuItemFactory: Ri
2116
+ menuItemFactory: Ni
2161
2117
  }
2162
2118
  },
2163
2119
  [or.MAIN_AREA]: {
2164
2120
  [cr.LAYOUT]: {
2165
2121
  [_n]: {
2166
2122
  order: 5,
2167
- menuItemFactory: Ni,
2123
+ menuItemFactory: Ei,
2168
2124
  [Gt.id]: {
2169
2125
  order: 1,
2170
- menuItemFactory: Ei
2126
+ menuItemFactory: Li
2171
2127
  },
2172
2128
  [zt.id]: {
2173
2129
  order: 2,
2174
- menuItemFactory: Li
2130
+ menuItemFactory: $i
2175
2131
  }
2176
2132
  },
2177
2133
  [Tn]: {
@@ -2179,47 +2135,47 @@ const Pi = {
2179
2135
  menuItemFactory: xi,
2180
2136
  [Qt.id]: {
2181
2137
  order: 1,
2182
- menuItemFactory: $i
2138
+ menuItemFactory: Oi
2183
2139
  },
2184
2140
  [Yt.id]: {
2185
2141
  order: 2,
2186
- menuItemFactory: Oi
2142
+ menuItemFactory: Pi
2187
2143
  }
2188
2144
  }
2189
2145
  }
2190
2146
  }
2191
2147
  };
2192
- var ki = Object.getOwnPropertyDescriptor, Di = (n, e, t, r) => {
2193
- for (var i = r > 1 ? void 0 : r ? ki(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2148
+ var Bi = Object.getOwnPropertyDescriptor, Di = (n, e, t, r) => {
2149
+ for (var i = r > 1 ? void 0 : r ? Bi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2194
2150
  (l = n[a]) && (i = l(i) || i);
2195
2151
  return i;
2196
2152
  }, Vt = (n, e) => (t, r) => e(t, r, n);
2197
- let rt = class extends He {
2153
+ let nt = class extends He {
2198
2154
  constructor(n, e) {
2199
2155
  super(), this._componentManager = n, this._menuManagerService = e, this._initComponents(), this._initMenu();
2200
2156
  }
2201
2157
  _initComponents() {
2202
2158
  [
2203
2159
  [cn, fn],
2204
- [ke, yi],
2205
- [un, Mi]
2160
+ [ke, Mi],
2161
+ [un, Ri]
2206
2162
  ].forEach(([n, e]) => {
2207
2163
  this.disposeWithMe(this._componentManager.register(n, e));
2208
2164
  });
2209
2165
  }
2210
2166
  _initMenu() {
2211
- this._menuManagerService.mergeMenu(Pi);
2167
+ this._menuManagerService.mergeMenu(ki);
2212
2168
  }
2213
2169
  };
2214
- rt = Di([
2215
- Vt(0, x(Kt)),
2216
- Vt(1, x(dr))
2217
- ], rt);
2218
- var Bi = Object.getOwnPropertyDescriptor, Fi = (n, e, t, r) => {
2219
- for (var i = r > 1 ? void 0 : r ? Bi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2170
+ nt = Di([
2171
+ Vt(0, N(Kt)),
2172
+ Vt(1, N(dr))
2173
+ ], nt);
2174
+ var Fi = Object.getOwnPropertyDescriptor, Hi = (n, e, t, r) => {
2175
+ for (var i = r > 1 ? void 0 : r ? Fi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2220
2176
  (l = n[a]) && (i = l(i) || i);
2221
2177
  return i;
2222
- }, et = (n, e) => (t, r) => e(t, r, n);
2178
+ }, Je = (n, e) => (t, r) => e(t, r, n);
2223
2179
  let Ct = class extends Zt {
2224
2180
  constructor(n, e, t, r, i) {
2225
2181
  super(), this._context = n, this._injector = e, this._sheetSkeletonManagerService = t, this._tableManager = r, this._sheetTableThemeUIController = i, this._initListener();
@@ -2251,18 +2207,18 @@ let Ct = class extends Zt {
2251
2207
  );
2252
2208
  }
2253
2209
  };
2254
- Ct = Fi([
2255
- et(1, x(Ve)),
2256
- et(2, x(lt)),
2257
- et(3, x(ne)),
2258
- et(4, x(xe))
2210
+ Ct = Hi([
2211
+ Je(1, N(Ve)),
2212
+ Je(2, N(st)),
2213
+ Je(3, N(ne)),
2214
+ Je(4, N(Ne))
2259
2215
  ], Ct);
2260
- var Hi = Object.getOwnPropertyDescriptor, Vi = (n, e, t, r) => {
2261
- for (var i = r > 1 ? void 0 : r ? Hi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2216
+ var Vi = Object.getOwnPropertyDescriptor, Ai = (n, e, t, r) => {
2217
+ for (var i = r > 1 ? void 0 : r ? Vi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2262
2218
  (l = n[a]) && (i = l(i) || i);
2263
2219
  return i;
2264
2220
  }, gt = (n, e) => (t, r) => e(t, r, n);
2265
- let it = class extends He {
2221
+ let rt = class extends He {
2266
2222
  constructor(n, e, t) {
2267
2223
  super(), this._sheetInterceptorService = n, this._univerInstanceService = e, this._tableManager = t, this._initSelectionChange();
2268
2224
  }
@@ -2271,7 +2227,7 @@ let it = class extends He {
2271
2227
  this._sheetInterceptorService.interceptCommand({
2272
2228
  getMutations: (n) => {
2273
2229
  if (n.id === rr.id) {
2274
- const e = ot(this._univerInstanceService);
2230
+ const e = lt(this._univerInstanceService);
2275
2231
  if (!e)
2276
2232
  return { redos: [], undos: [] };
2277
2233
  const t = n.params, { range: r } = t, { unitId: i, subUnitId: a, worksheet: l } = e, d = this._tableManager.getTablesBySubunitId(i, a).find((h) => {
@@ -2326,36 +2282,36 @@ let it = class extends He {
2326
2282
  );
2327
2283
  }
2328
2284
  };
2329
- it = Vi([
2330
- gt(0, x(sn)),
2331
- gt(1, x(_e)),
2332
- gt(2, x(ne))
2333
- ], it);
2334
- var Ai = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, ji = (n, e, t) => e in n ? Ai(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Wi = (n, e, t, r) => {
2335
- for (var i = r > 1 ? void 0 : r ? Ui(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2285
+ rt = Ai([
2286
+ gt(0, N(sn)),
2287
+ gt(1, N(_e)),
2288
+ gt(2, N(ne))
2289
+ ], rt);
2290
+ var Ui = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, ji = (n, e, t) => e in n ? Ui(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Zi = (n, e, t, r) => {
2291
+ for (var i = r > 1 ? void 0 : r ? Wi(e, t) : e, a = n.length - 1, l; a >= 0; a--)
2336
2292
  (l = n[a]) && (i = l(i) || i);
2337
2293
  return i;
2338
- }, tt = (n, e) => (t, r) => e(t, r, n), yn = (n, e, t) => ji(n, typeof e != "symbol" ? e + "" : e, t);
2339
- let at = class extends Pn {
2294
+ }, et = (n, e) => (t, r) => e(t, r, n), yn = (n, e, t) => ji(n, typeof e != "symbol" ? e + "" : e, t);
2295
+ let it = class extends Pn {
2340
2296
  constructor(n = {}, e, t, r, i) {
2341
2297
  super(), this._config = n, this._injector = e, this._commandService = t, this._configService = r, this._renderManagerService = i, this._initRegisterCommand(), this._configService.setConfig(Sn, this._config);
2342
2298
  }
2343
2299
  onStarting() {
2344
2300
  kn(this._injector, [
2345
2301
  [Fe],
2346
- [Be],
2347
- [rt],
2348
- [xe],
2349
- [it]
2302
+ [De],
2303
+ [nt],
2304
+ [Ne],
2305
+ [rt]
2350
2306
  ]);
2351
2307
  }
2352
2308
  onReady() {
2353
- Dn(this._injector, [
2309
+ Bn(this._injector, [
2354
2310
  [Fe],
2355
- [Be],
2356
- [rt],
2357
- [xe],
2358
- [it]
2311
+ [De],
2312
+ [nt],
2313
+ [Ne],
2314
+ [rt]
2359
2315
  ]);
2360
2316
  }
2361
2317
  onRendered() {
@@ -2366,8 +2322,8 @@ let at = class extends Pn {
2366
2322
  [ft],
2367
2323
  [Ct]
2368
2324
  ];
2369
- this._config.hideAnchor !== !0 && n.push([nt]), n.forEach((e) => {
2370
- this.disposeWithMe(this._renderManagerService.registerRenderModule(st.UNIVER_SHEET, e));
2325
+ this._config.hideAnchor !== !0 && n.push([tt]), n.forEach((e) => {
2326
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(at.UNIVER_SHEET, e));
2371
2327
  });
2372
2328
  }
2373
2329
  _initRegisterCommand() {
@@ -2377,15 +2333,15 @@ let at = class extends Pn {
2377
2333
  ].forEach((n) => this._commandService.registerCommand(n));
2378
2334
  }
2379
2335
  };
2380
- yn(at, "pluginName", Or);
2381
- yn(at, "type", st.UNIVER_SHEET);
2382
- at = Wi([
2336
+ yn(it, "pluginName", Pr);
2337
+ yn(it, "type", at.UNIVER_SHEET);
2338
+ it = Zi([
2383
2339
  On(Gn),
2384
- tt(1, x(Ve)),
2385
- tt(2, x(ce)),
2386
- tt(3, Wt),
2387
- tt(4, qt)
2388
- ], at);
2340
+ et(1, N(Ve)),
2341
+ et(2, N(ce)),
2342
+ et(3, jt),
2343
+ et(4, qt)
2344
+ ], it);
2389
2345
  export {
2390
- at as UniverSheetTableUIPlugin
2346
+ it as UniverSheetTableUIPlugin
2391
2347
  };