@univerjs/sheets-numfmt-ui 0.10.5 → 0.10.6-experimental.20250904-44da50e

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,21 @@
1
- var mt = Object.defineProperty;
2
- var dt = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var q = (e, t, r) => dt(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Inject as y, LocaleService as E, IConfigService as $e, Disposable as ne, isTextFormat as De, Tools as ht, isRealNum as ft, CommandType as Fe, ILocalStorageService as Le, isPatternEqualWithoutDecimal as re, numfmt as vt, ThemeService as pt, IUniverInstanceService as fe, ICommandService as ve, UniverInstanceType as w, CellValueType as U, toDisposable as de, DisposableCollection as gt, InterceptorEffectEnum as we, Range as Ae, Injector as He, Optional as _t, willLoseNumericPrecision as St, fromCallback as yt, isDefaultFormat as Ct, DEFAULT_TEXT_FORMAT_EXCEL as bt, DependentOn as It, Plugin as Nt, merge as Et, registerDependencies as Tt, touchDependencies as wt } from "@univerjs/core";
5
- import { IRenderManagerService as je } from "@univerjs/engine-render";
6
- import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as Mt, currencySymbols as Me, getDecimalFromPattern as J, getCurrencyType as V, setPatternDecimal as R, getCurrencyFormatOptions as oe, CURRENCYFORMAT as Pt, DATEFMTLISG as xt, NUMBERFORMAT as Ot, getDateFormatOptions as Be, getNumberFormatOptions as Ve, isPatternHasDecimal as Rt, SheetsNumfmtCellContentController as We, getPatternPreviewIgnoreGeneral as kt, getPatternType as pe, SetNumfmtCommand as Ge, getNumfmtParseValueFilter as Ut, getCurrencySymbolByLocale as $t, SetPercentCommand as Ke, SubtractDecimalCommand as Ze, AddDecimalCommand as Ye, SetCurrencyCommand as ze, getCurrencySymbolIconByLocale as Pe, localeCurrencySymbolMap as Dt, getPatternPreview as Ft, UniverSheetsNumfmtPlugin as Lt } from "@univerjs/sheets-numfmt";
1
+ var dt = Object.defineProperty;
2
+ var ht = (e, t, r) => t in e ? dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var q = (e, t, r) => ht(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { Inject as y, LocaleService as E, IConfigService as $e, Disposable as ne, isTextFormat as De, Tools as vt, isRealNum as Fe, CommandType as Le, ILocalStorageService as Ae, isPatternEqualWithoutDecimal as re, numfmt as ft, ThemeService as pt, IUniverInstanceService as ve, ICommandService as fe, UniverInstanceType as M, CellValueType as k, toDisposable as de, DisposableCollection as gt, InterceptorEffectEnum as Me, Range as He, Injector as je, Optional as _t, willLoseNumericPrecision as St, fromCallback as yt, isDefaultFormat as Ct, DEFAULT_TEXT_FORMAT_EXCEL as bt, DependentOn as It, Plugin as Nt, merge as Et, registerDependencies as Tt, touchDependencies as Mt } from "@univerjs/core";
5
+ import { IRenderManagerService as Be } from "@univerjs/engine-render";
6
+ import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as wt, currencySymbols as we, getDecimalFromPattern as J, getCurrencyType as V, setPatternDecimal as O, getCurrencyFormatOptions as oe, CURRENCYFORMAT as Pt, DATEFMTLISG as xt, NUMBERFORMAT as Rt, getDateFormatOptions as Ve, getNumberFormatOptions as We, isPatternHasDecimal as Ot, SheetsNumfmtCellContentController as Ge, getPatternPreviewIgnoreGeneral as Ut, getPatternType as pe, SetNumfmtCommand as Ke, getNumfmtParseValueFilter as kt, getCurrencySymbolByLocale as $t, SetPercentCommand as Ze, SubtractDecimalCommand as Ye, AddDecimalCommand as ze, SetCurrencyCommand as Xe, getCurrencySymbolIconByLocale as Pe, localeCurrencySymbolMap as Dt, getPatternPreview as Ft, UniverSheetsNumfmtPlugin as Lt } from "@univerjs/sheets-numfmt";
7
7
  import { HoverManagerService as At, CellAlertManagerService as Ht, CellAlertType as jt, SheetSkeletonManagerService as Bt, IEditorBridgeService as Vt, deriveStateFromActiveSheet$ as Wt, getCurrentRangeDisable$ as W, UniverSheetsUIPlugin as Gt } from "@univerjs/sheets-ui";
8
- import { INumfmtService as ge, SheetInterceptorService as Xe, SheetsSelectionsService as _e, INTERCEPTOR_POINT as Kt, RemoveNumfmtMutation as Se, SetNumfmtMutation as ye, BEFORE_CELL_EDIT as Zt, AFTER_CELL_EDIT as Yt, SetRangeValuesCommand as zt, transformCellsToRange as Xt, factorySetNumfmtUndoMutation as qt, factoryRemoveNumfmtUndoMutation as Jt, RangeProtectionPermissionEditPoint as G, WorksheetSetCellStylePermission as K, WorksheetEditPermission as Z, WorkbookEditablePermission as Y } from "@univerjs/sheets";
9
- import { IZenZoneService as Qt, useDependency as b, ComponentManager as qe, ISidebarService as en, getMenuHiddenObservable as z, MenuItemType as X, ILayoutService as tn, RibbonDataGroup as nn, IMenuManagerService as rn } from "@univerjs/ui";
10
- import { debounceTime as sn, merge as Je, Observable as A, combineLatest as on, filter as an } from "rxjs";
8
+ import { INumfmtService as ge, SheetInterceptorService as qe, SheetsSelectionsService as _e, INTERCEPTOR_POINT as Kt, RemoveNumfmtMutation as Se, SetNumfmtMutation as ye, BEFORE_CELL_EDIT as Zt, AFTER_CELL_EDIT as Yt, SetRangeValuesCommand as zt, transformCellsToRange as Xt, factorySetNumfmtUndoMutation as qt, factoryRemoveNumfmtUndoMutation as Jt, RangeProtectionPermissionEditPoint as G, WorksheetSetCellStylePermission as K, WorksheetEditPermission as Z, WorkbookEditablePermission as Y } from "@univerjs/sheets";
9
+ import { IZenZoneService as Qt, useDependency as b, ComponentManager as Je, ISidebarService as en, getMenuHiddenObservable as z, MenuItemType as X, ILayoutService as tn, RibbonDataGroup as nn, IMenuManagerService as rn } from "@univerjs/ui";
10
+ import { debounceTime as sn, merge as Qe, Observable as A, combineLatest as on, filter as an } from "rxjs";
11
11
  import { map as cn, switchMap as ln, tap as un, debounceTime as mn } from "rxjs/operators";
12
12
  import { jsxs as C, jsx as h } from "react/jsx-runtime";
13
- import { createContext as dn, useState as N, useEffect as ie, useRef as Ce, useContext as Qe, useMemo as x, forwardRef as et, createElement as be, useCallback as hn } from "react";
14
- import { InputNumber as Ie, Select as Ne, SelectList as Ee, Input as fn, clsx as tt, borderClassName as vn, Button as xe, scrollbarClassName as pn, Separator as gn } from "@univerjs/design";
15
- const Oe = {};
16
- var _n = Object.getOwnPropertyDescriptor, Sn = (e, t, r, n) => {
17
- for (var i = n > 1 ? void 0 : n ? _n(t, r) : t, s = e.length - 1, o; s >= 0; s--)
13
+ import { createContext as dn, useState as N, useEffect as ie, useRef as Ce, useContext as et, useMemo as x, forwardRef as tt, createElement as be, useCallback as hn } from "react";
14
+ import { InputNumber as Ie, Select as Ne, SelectList as Ee, Input as vn, clsx as nt, borderClassName as fn, Button as xe, scrollbarClassName as pn, Separator as gn } from "@univerjs/design";
15
+ import { stripErrorMargin as _n } from "@univerjs/engine-formula";
16
+ const Re = {};
17
+ var Sn = Object.getOwnPropertyDescriptor, yn = (e, t, r, n) => {
18
+ for (var i = n > 1 ? void 0 : n ? Sn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
18
19
  (o = e[s]) && (i = o(i) || i);
19
20
  return i;
20
21
  }, D = (e, t) => (r, n) => t(r, n, e);
@@ -32,19 +33,19 @@ let he = class extends ne {
32
33
  if (e) {
33
34
  const n = e.location, i = this._context.unit, s = i.getActiveSheet();
34
35
  if (!s) return;
35
- const o = n.unitId, a = n.subUnitId;
36
- let l;
37
- const c = s.getCell(n.row, n.col);
38
- if (c != null && c.s) {
39
- const m = i.getStyles().get(c.s);
40
- m != null && m.n && (l = m.n);
36
+ const o = n.unitId, c = n.subUnitId;
37
+ let a;
38
+ const l = s.getCell(n.row, n.col);
39
+ if (l != null && l.s) {
40
+ const m = i.getStyles().get(l.s);
41
+ m != null && m.n && (a = m.n);
41
42
  }
42
- if (l || (l = this._numfmtService.getValue(o, a, n.row, n.col)), !l) {
43
+ if (a || (a = this._numfmtService.getValue(o, c, n.row, n.col)), !a) {
43
44
  this._hideAlert();
44
45
  return;
45
46
  }
46
- if (De(l.pattern) && ht.isDefine(c == null ? void 0 : c.v) && ft(c.v)) {
47
- if ((t = this._configService.getConfig(Mt)) != null && t.disableTextFormatAlert)
47
+ if (De(a.pattern) && vt.isDefine(l == null ? void 0 : l.v) && Fe(l.v)) {
48
+ if ((t = this._configService.getConfig(wt)) != null && t.disableTextFormatAlert)
48
49
  return;
49
50
  const m = this._cellAlertManagerService.currentAlert.get(ae), u = (r = m == null ? void 0 : m.alert) == null ? void 0 : r.location;
50
51
  if (u && u.row === n.row && u.col === n.col && u.subUnitId === n.subUnitId && u.unitId === n.unitId)
@@ -73,7 +74,7 @@ let he = class extends ne {
73
74
  this._cellAlertManagerService.removeAlert(ae);
74
75
  }
75
76
  };
76
- he = Sn([
77
+ he = yn([
77
78
  D(1, y(At)),
78
79
  D(2, y(Ht)),
79
80
  D(3, y(E)),
@@ -83,21 +84,21 @@ he = Sn([
83
84
  ], he);
84
85
  const ce = {
85
86
  id: "sheet.operation.close.numfmt.panel",
86
- type: Fe.OPERATION,
87
+ type: Le.OPERATION,
87
88
  handler: () => (
88
89
  // do nothing, just notify panel is closed
89
90
  !0
90
91
  )
91
92
  }, H = {
92
93
  id: "sheet.operation.open.numfmt.panel",
93
- type: Fe.OPERATION,
94
+ type: Le.OPERATION,
94
95
  handler: (e) => (e.get(B).openPanel(), !0)
95
96
  };
96
- var yn = Object.getOwnPropertyDescriptor, Cn = (e, t, r, n) => {
97
- for (var i = n > 1 ? void 0 : n ? yn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
97
+ var Cn = Object.getOwnPropertyDescriptor, bn = (e, t, r, n) => {
98
+ for (var i = n > 1 ? void 0 : n ? Cn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
98
99
  (o = e[s]) && (i = o(i) || i);
99
100
  return i;
100
- }, bn = (e, t) => (r, n) => t(r, n, e);
101
+ }, In = (e, t) => (r, n) => t(r, n, e);
101
102
  const Te = dn([]);
102
103
  let j = class {
103
104
  constructor(e) {
@@ -124,17 +125,17 @@ let j = class {
124
125
  async getHabit(e, t) {
125
126
  const r = this._getKey(e), n = await this._localStorageService.getItem(r);
126
127
  if (t && n) {
127
- const i = n.map((s, o, a) => {
128
- const l = a.length;
128
+ const i = n.map((s, o, c) => {
129
+ const a = c.length;
129
130
  return {
130
131
  value: s,
131
- priority: l - o
132
+ priority: a - o
132
133
  };
133
134
  });
134
135
  return t.sort((s, o) => {
135
- var c, m;
136
- const a = ((c = i.find((u) => u.value === s)) == null ? void 0 : c.priority) || -1;
137
- return (((m = i.find((u) => u.value === o)) == null ? void 0 : m.priority) || -1) - a;
136
+ var l, m;
137
+ const c = ((l = i.find((u) => u.value === s)) == null ? void 0 : l.priority) || -1;
138
+ return (((m = i.find((u) => u.value === o)) == null ? void 0 : m.priority) || -1) - c;
138
139
  });
139
140
  }
140
141
  return n || [];
@@ -143,21 +144,21 @@ let j = class {
143
144
  this._localStorageService.removeItem(e);
144
145
  }
145
146
  };
146
- j = Cn([
147
- bn(0, y(Le))
147
+ j = bn([
148
+ In(0, y(Ae))
148
149
  ], j);
149
- const Re = "numfmtCurrency", In = (e) => {
150
- const t = b(j), [r, n] = N(Me);
150
+ const Oe = "numfmtCurrency", Nn = (e) => {
151
+ const t = b(j), [r, n] = N(we);
151
152
  return ie(() => {
152
153
  t.addHabit("numfmtCurrency", []).then(() => {
153
- t.getHabit(Re, [...Me]).then((s) => {
154
+ t.getHabit(Oe, [...we]).then((s) => {
154
155
  n(s), e && e(s);
155
156
  });
156
157
  });
157
158
  }, []), { userHabitCurrency: r, mark: (s) => {
158
- t.markHabit(Re, s);
159
+ t.markHabit(Oe, s);
159
160
  } };
160
- }, Nn = () => {
161
+ }, En = () => {
161
162
  const e = Ce([]), [t, r] = N({});
162
163
  return ie(() => {
163
164
  e.current.forEach((i) => {
@@ -166,14 +167,14 @@ const Re = "numfmtCurrency", In = (e) => {
166
167
  }, [t]), (i) => {
167
168
  e.current.push(i), r({});
168
169
  };
169
- }, En = (e) => !!V(e) && e.startsWith("_("), Tn = (e) => {
170
- const { defaultPattern: t, action: r, onChange: n } = e, [i, s] = N(() => J(t || "", 2)), o = Qe(Te), [a, l] = N(() => V(t) || o[0]), c = x(() => o.map((p) => ({ label: p, value: p })), []), u = b(E).t;
171
- r.current = () => R(`_("${a}"* #,##0${i > 0 ? ".0" : ""}_)`, i);
172
- const f = (p) => {
173
- l(p), n(R(`_("${p}"* #,##0${i > 0 ? ".0" : ""}_)`, i));
174
- }, v = (p) => {
170
+ }, Tn = (e) => !!V(e) && e.startsWith("_("), Mn = (e) => {
171
+ const { defaultPattern: t, action: r, onChange: n } = e, [i, s] = N(() => J(t || "", 2)), o = et(Te), [c, a] = N(() => V(t) || o[0]), l = x(() => o.map((p) => ({ label: p, value: p })), []), u = b(E).t;
172
+ r.current = () => O(`_("${c}"* #,##0${i > 0 ? ".0" : ""}_)`, i);
173
+ const v = (p) => {
174
+ a(p), n(O(`_("${p}"* #,##0${i > 0 ? ".0" : ""}_)`, i));
175
+ }, f = (p) => {
175
176
  const d = p || 0;
176
- s(d), n(R(`_("${a}"* #,##0${d > 0 ? ".0" : ""}_)`, d));
177
+ s(d), n(O(`_("${c}"* #,##0${d > 0 ? ".0" : ""}_)`, d));
177
178
  };
178
179
  return /* @__PURE__ */ C("div", { children: [
179
180
  /* @__PURE__ */ C("div", { className: "univer-mt-4 univer-flex univer-justify-between", children: [
@@ -187,7 +188,7 @@ const Re = "numfmtCurrency", In = (e) => {
187
188
  precision: 0,
188
189
  max: 20,
189
190
  min: 0,
190
- onChange: v
191
+ onChange: f
191
192
  }
192
193
  ) })
193
194
  ] }),
@@ -196,32 +197,32 @@ const Re = "numfmtCurrency", In = (e) => {
196
197
  /* @__PURE__ */ h("div", { className: "univer-mt-2 univer-w-36", children: /* @__PURE__ */ h(
197
198
  Ne,
198
199
  {
199
- options: c,
200
- value: a,
201
- onChange: f
200
+ options: l,
201
+ value: c,
202
+ onChange: v
202
203
  }
203
204
  ) })
204
205
  ] })
205
206
  ] }),
206
207
  /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: u("sheet.numfmt.accountingDes") })
207
208
  ] });
208
- }, wn = (e) => !!V(e) && !e.startsWith("_("), Mn = (e) => {
209
- const r = b(E).t, n = Qe(Te), [i, s] = N(() => V(e.defaultPattern) || n[0]), [o, a] = N(() => J(e.defaultPattern || "", 2)), [l, c] = N(() => {
209
+ }, wn = (e) => !!V(e) && !e.startsWith("_("), Pn = (e) => {
210
+ const r = b(E).t, n = et(Te), [i, s] = N(() => V(e.defaultPattern) || n[0]), [o, c] = N(() => J(e.defaultPattern || "", 2)), [a, l] = N(() => {
210
211
  var g;
211
212
  const d = oe(i);
212
213
  return ((g = d.find((I) => re(I.value, e.defaultPattern))) == null ? void 0 : g.value) || d[0].value;
213
214
  }), m = x(() => oe(i), [i]), u = x(() => n.map((d) => ({ label: d, value: d })), [n]);
214
- e.action.current = () => R(l, o);
215
- const f = (d) => {
215
+ e.action.current = () => O(a, o);
216
+ const v = (d) => {
216
217
  if (d === void 0)
217
218
  return;
218
219
  s(d);
219
220
  const S = oe(d)[0].value;
220
- c(S), e.onChange(R(S, o));
221
- }, v = (d) => {
222
- d !== void 0 && (c(d), e.onChange(R(d, o)));
221
+ l(S), e.onChange(O(S, o));
222
+ }, f = (d) => {
223
+ d !== void 0 && (l(d), e.onChange(O(d, o)));
223
224
  }, p = (d) => {
224
- a(d || 0), e.onChange(R(l, d || 0));
225
+ c(d || 0), e.onChange(O(a, d || 0));
225
226
  };
226
227
  return /* @__PURE__ */ C("div", { children: [
227
228
  /* @__PURE__ */ C("div", { className: "univer-mt-4 univer-flex univer-justify-between", children: [
@@ -244,13 +245,13 @@ const Re = "numfmtCurrency", In = (e) => {
244
245
  {
245
246
  value: i,
246
247
  options: u,
247
- onChange: f
248
+ onChange: v
248
249
  }
249
250
  ) })
250
251
  ] })
251
252
  ] }),
252
253
  /* @__PURE__ */ h("div", { className: "label univer-mt-4", children: r("sheet.numfmt.negType") }),
253
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ee, { value: l, options: m, onChange: v }) }),
254
+ /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ee, { value: a, options: m, onChange: f }) }),
254
255
  /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.currencyDes") })
255
256
  ] });
256
257
  };
@@ -262,32 +263,32 @@ var T = function() {
262
263
  }
263
264
  return e;
264
265
  }, T.apply(this, arguments);
265
- }, Pn = function(e, t) {
266
+ }, xn = function(e, t) {
266
267
  var r = {};
267
268
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
268
269
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
269
270
  for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
270
271
  t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
271
272
  return r;
272
- }, nt = et(function(e, t) {
273
- var r = e.icon, n = e.id, i = e.className, s = e.extend, o = Pn(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), l = Ce("_".concat(Rn()));
274
- return rt(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, T({ ref: t, className: a }, o), s);
273
+ }, rt = tt(function(e, t) {
274
+ var r = e.icon, n = e.id, i = e.className, s = e.extend, o = xn(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), a = Ce("_".concat(Un()));
275
+ return it(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, T({ ref: t, className: c }, o), s);
275
276
  });
276
- function rt(e, t, r, n, i) {
277
- return be(e.tag, T(T({ key: t }, xn(e, r, i)), n), (On(e, r).children || []).map(function(s, o) {
278
- return rt(s, "".concat(t, "-").concat(e.tag, "-").concat(o), r, void 0, i);
277
+ function it(e, t, r, n, i) {
278
+ return be(e.tag, T(T({ key: t }, Rn(e, r, i)), n), (On(e, r).children || []).map(function(s, o) {
279
+ return it(s, "".concat(t, "-").concat(e.tag, "-").concat(o), r, void 0, i);
279
280
  }));
280
281
  }
281
- function xn(e, t, r) {
282
+ function Rn(e, t, r) {
282
283
  var n = T({}, e.attrs);
283
284
  r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(s) {
284
- var o = s[0], a = s[1];
285
- o === "mask" && typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
285
+ var o = s[0], c = s[1];
286
+ o === "mask" && typeof c == "string" && (n[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
286
287
  });
287
288
  var i = t.defIds;
288
289
  return !i || i.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(s) {
289
- var o = s[0], a = s[1];
290
- typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
290
+ var o = s[0], c = s[1];
291
+ typeof c == "string" && (n[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
291
292
  })), n;
292
293
  }
293
294
  function On(e, t) {
@@ -296,72 +297,72 @@ function On(e, t) {
296
297
  return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? T(T({}, i), { attrs: T(T({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
297
298
  }) }) : e;
298
299
  }
299
- function Rn() {
300
+ function Un() {
300
301
  return Math.random().toString(36).substring(2, 8);
301
302
  }
302
- nt.displayName = "UniverIcon";
303
- var kn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, it = et(function(e, t) {
304
- return be(nt, Object.assign({}, e, {
303
+ rt.displayName = "UniverIcon";
304
+ var kn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, st = tt(function(e, t) {
305
+ return be(rt, Object.assign({}, e, {
305
306
  id: "check-mark-icon",
306
307
  ref: t,
307
308
  icon: kn
308
309
  }));
309
310
  });
310
- it.displayName = "CheckMarkIcon";
311
+ st.displayName = "CheckMarkIcon";
311
312
  const le = "customFormat", ue = "numfmt_custom_pattern";
312
- function Un(e) {
313
- const { defaultPattern: t, action: r, onChange: n } = e, i = b(j), s = b(Le), o = b(E), [a, l] = N(t);
314
- r.current = () => (i.markHabit(le, a), s.getItem(ue).then((v = []) => {
315
- const p = [.../* @__PURE__ */ new Set([a, ...v || []])].splice(0, 10).filter((d) => !!d);
313
+ function $n(e) {
314
+ const { defaultPattern: t, action: r, onChange: n } = e, i = b(j), s = b(Ae), o = b(E), [c, a] = N(t);
315
+ r.current = () => (i.markHabit(le, c), s.getItem(ue).then((f = []) => {
316
+ const p = [.../* @__PURE__ */ new Set([c, ...f || []])].splice(0, 10).filter((d) => !!d);
316
317
  s.setItem(ue, p);
317
- }), a);
318
- const [c, m] = N([]);
318
+ }), c);
319
+ const [l, m] = N([]);
319
320
  ie(() => {
320
- s.getItem(ue).then((v) => {
321
+ s.getItem(ue).then((f) => {
321
322
  const p = [
322
323
  ...Pt.map((d) => d.suffix("$")),
323
324
  ...xt.map((d) => d.suffix),
324
- ...Ot.map((d) => d.suffix)
325
+ ...Rt.map((d) => d.suffix)
325
326
  ];
326
- p.push(...v || []), i.addHabit(le, []).finally(() => {
327
+ p.push(...f || []), i.addHabit(le, []).finally(() => {
327
328
  i.getHabit(le, p).then((d) => {
328
329
  m([...new Set(d)]);
329
330
  });
330
331
  });
331
332
  });
332
333
  }, []);
333
- const u = (v) => {
334
- l(v), n(v);
335
- }, f = () => {
336
- n(a);
334
+ const u = (f) => {
335
+ a(f), n(f);
336
+ }, v = () => {
337
+ n(c);
337
338
  };
338
339
  return /* @__PURE__ */ C("div", { children: [
339
340
  /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: o.t("sheet.numfmt.customFormat") }),
340
341
  /* @__PURE__ */ h(
341
- fn,
342
+ vn,
342
343
  {
343
344
  placeholder: o.t("sheet.numfmt.customFormat"),
344
- onBlur: f,
345
- value: a,
346
- onChange: l,
345
+ onBlur: v,
346
+ value: c,
347
+ onChange: a,
347
348
  className: "univer-mt-2 univer-w-full"
348
349
  }
349
350
  ),
350
351
  /* @__PURE__ */ h(
351
352
  "div",
352
353
  {
353
- className: tt("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2", vn),
354
- children: c.map((v) => /* @__PURE__ */ C(
354
+ className: nt("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2", fn),
355
+ children: l.map((f) => /* @__PURE__ */ C(
355
356
  "div",
356
357
  {
357
- onClick: () => u(v),
358
+ onClick: () => u(f),
358
359
  className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1.5 univer-py-1.5 univer-text-sm",
359
360
  children: [
360
- /* @__PURE__ */ h("div", { className: "univer-flex univer-w-4 univer-items-center univer-text-primary-600", children: a === v && /* @__PURE__ */ h(it, {}) }),
361
- /* @__PURE__ */ h("div", { children: v })
361
+ /* @__PURE__ */ h("div", { className: "univer-flex univer-w-4 univer-items-center univer-text-primary-600", children: c === f && /* @__PURE__ */ h(st, {}) }),
362
+ /* @__PURE__ */ h("div", { children: f })
362
363
  ]
363
364
  },
364
- v
365
+ f
365
366
  ))
366
367
  }
367
368
  ),
@@ -374,26 +375,26 @@ function Un(e) {
374
375
  )
375
376
  ] });
376
377
  }
377
- const $n = (e) => {
378
- const t = vt.getFormatInfo(e);
379
- return Be().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
378
+ const Dn = (e) => {
379
+ const t = ft.getFormatInfo(e);
380
+ return Ve().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
380
381
  };
381
- function Dn(e) {
382
- const { onChange: t, defaultPattern: r } = e, n = x(Be, []), i = b(E), [s, o] = N(() => {
382
+ function Fn(e) {
383
+ const { onChange: t, defaultPattern: r } = e, n = x(Ve, []), i = b(E), [s, o] = N(() => {
383
384
  if (r) {
384
- const l = n.find((c) => c.value === r);
385
- if (l)
386
- return l.value;
385
+ const a = n.find((l) => l.value === r);
386
+ if (a)
387
+ return a.value;
387
388
  }
388
389
  return n[0].value;
389
390
  });
390
391
  e.action.current = () => s;
391
- const a = (l) => {
392
- l !== void 0 && (o(l), t(l));
392
+ const c = (a) => {
393
+ a !== void 0 && (o(a), t(a));
393
394
  };
394
395
  return /* @__PURE__ */ C("div", { children: [
395
396
  /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: i.t("sheet.numfmt.dateType") }),
396
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ee, { value: s, options: n, onChange: a }) }),
397
+ /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ee, { value: s, options: n, onChange: c }) }),
397
398
  /* @__PURE__ */ h(
398
399
  "div",
399
400
  {
@@ -403,7 +404,7 @@ function Dn(e) {
403
404
  )
404
405
  ] });
405
406
  }
406
- const Fn = (e) => !e, Ln = (e) => {
407
+ const Ln = (e) => !e, An = (e) => {
407
408
  const r = b(E).t;
408
409
  return e.action.current = () => "", /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(
409
410
  "div",
@@ -412,26 +413,26 @@ const Fn = (e) => !e, Ln = (e) => {
412
413
  children: r("sheet.numfmt.generalDes")
413
414
  }
414
415
  ) });
415
- }, An = (e) => Ve().some((t) => re(t.value, e));
416
- function Hn(e) {
417
- const t = b(E), r = x(Ve, []), [n, i] = N(() => J(e.defaultPattern || "", 0)), [s, o] = N(() => {
418
- const u = r.find((f) => re(f.value, e.defaultPattern || ""));
416
+ }, Hn = (e) => We().some((t) => re(t.value, e));
417
+ function jn(e) {
418
+ const t = b(E), r = x(We, []), [n, i] = N(() => J(e.defaultPattern || "", 0)), [s, o] = N(() => {
419
+ const u = r.find((v) => re(v.value, e.defaultPattern || ""));
419
420
  return (u == null ? void 0 : u.value) || r[0].value;
420
- }), a = x(() => R(s, Number(n || 0)), [s, n]), l = x(() => !Rt(s), [s]), c = (u) => {
421
- i(u || 0), e.onChange(R(s, Number(u || 0)));
421
+ }), c = x(() => O(s, Number(n || 0)), [s, n]), a = x(() => !Ot(s), [s]), l = (u) => {
422
+ i(u || 0), e.onChange(O(s, Number(u || 0)));
422
423
  }, m = (u) => {
423
424
  u !== void 0 && (i(J(u, 0)), o(u), e.onChange(u));
424
425
  };
425
- return e.action.current = () => a, /* @__PURE__ */ C("div", { children: [
426
+ return e.action.current = () => c, /* @__PURE__ */ C("div", { children: [
426
427
  /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: t.t("sheet.numfmt.decimalLength") }),
427
428
  /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(
428
429
  Ie,
429
430
  {
430
- disabled: l,
431
+ disabled: a,
431
432
  value: n,
432
433
  max: 20,
433
434
  min: 0,
434
- onChange: c
435
+ onChange: l
435
436
  }
436
437
  ) }),
437
438
  /* @__PURE__ */ C("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: [
@@ -448,70 +449,70 @@ function Hn(e) {
448
449
  )
449
450
  ] });
450
451
  }
451
- const jn = (e) => {
452
- const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = b(E), o = Ce(() => ""), a = s.t, l = Nn(), c = x(
452
+ const Bn = (e) => {
453
+ const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = b(E), o = Ce(() => ""), c = s.t, a = En(), l = x(
453
454
  () => [
454
- { label: "sheet.numfmt.general", component: Ln },
455
- { label: "sheet.numfmt.accounting", component: Tn },
456
- { label: "sheet.numfmt.currency", component: Mn },
457
- { label: "sheet.numfmt.date", component: Dn },
458
- { label: "sheet.numfmt.thousandthPercentile", component: Hn },
459
- { label: "sheet.numfmt.customFormat", component: Un }
460
- ].map((_) => ({ ..._, label: a(_.label) })),
455
+ { label: "sheet.numfmt.general", component: An },
456
+ { label: "sheet.numfmt.accounting", component: Mn },
457
+ { label: "sheet.numfmt.currency", component: Pn },
458
+ { label: "sheet.numfmt.date", component: Fn },
459
+ { label: "sheet.numfmt.thousandthPercentile", component: jn },
460
+ { label: "sheet.numfmt.customFormat", component: $n }
461
+ ].map((_) => ({ ..._, label: c(_.label) })),
461
462
  []
462
- ), [m, u] = N(g), [f, v] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: d } = In(() => v(`${n}_${i}_userCurrency'`)), S = x(() => {
463
+ ), [m, u] = N(g), [v, f] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: d } = Nn(() => f(`${n}_${i}_userCurrency'`)), S = x(() => {
463
464
  var _;
464
- return (_ = c.find(($) => $.label === m)) == null ? void 0 : _.component;
465
+ return (_ = l.find(($) => $.label === m)) == null ? void 0 : _.component;
465
466
  }, [m]);
466
467
  function g() {
467
- return [Fn, En, wn, $n, An].reduce(($, lt, ut) => $ || (lt(r) ? c[ut].label : ""), "") || c[0].label;
468
+ return [Ln, Tn, wn, Dn, Hn].reduce(($, ut, mt) => $ || (ut(r) ? l[mt].label : ""), "") || l[0].label;
468
469
  }
469
- const I = c.map((_) => ({
470
+ const I = l.map((_) => ({
470
471
  label: _.label,
471
472
  value: _.label
472
473
  })), P = (_) => {
473
- u(_), l(() => e.onChange({ type: "change", value: o.current() || "" }));
474
- }, O = hn((_) => {
474
+ u(_), a(() => e.onChange({ type: "change", value: o.current() || "" }));
475
+ }, R = hn((_) => {
475
476
  e.onChange({ type: "change", value: _ });
476
- }, []), k = () => {
477
+ }, []), U = () => {
477
478
  const _ = o.current() || "", $ = V(_);
478
479
  $ && p($), e.onChange({ type: "confirm", value: _ });
479
480
  }, F = () => {
480
481
  e.onChange({ type: "cancel", value: "" });
481
482
  }, se = {
482
- onChange: O,
483
+ onChange: R,
483
484
  defaultValue: t,
484
485
  defaultPattern: r,
485
486
  action: o
486
487
  };
487
488
  return ie(() => {
488
- u(g()), v(`${n}_${i}`);
489
+ u(g()), f(`${n}_${i}`);
489
490
  }, [n, i]), /* @__PURE__ */ C(
490
491
  "div",
491
492
  {
492
- className: tt("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5", pn),
493
+ className: nt("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5", pn),
493
494
  children: [
494
495
  /* @__PURE__ */ C("div", { children: [
495
- /* @__PURE__ */ h("div", { className: "univer-mt-3.5 univer-text-sm univer-text-gray-400", children: a("sheet.numfmt.numfmtType") }),
496
+ /* @__PURE__ */ h("div", { className: "univer-mt-3.5 univer-text-sm univer-text-gray-400", children: c("sheet.numfmt.numfmtType") }),
496
497
  /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ne, { className: "univer-w-full", value: m, options: I, onChange: P }) }),
497
- /* @__PURE__ */ h("div", { children: S && /* @__PURE__ */ h(Te.Provider, { value: d, children: /* @__PURE__ */ be(S, { ...se, key: f }) }) })
498
+ /* @__PURE__ */ h("div", { children: S && /* @__PURE__ */ h(Te.Provider, { value: d, children: /* @__PURE__ */ be(S, { ...se, key: v }) }) })
498
499
  ] }),
499
500
  /* @__PURE__ */ C("div", { className: "univer-mb-5 univer-mt-3.5 univer-flex univer-justify-end", children: [
500
- /* @__PURE__ */ h(xe, { onClick: F, className: "univer-mr-3", children: a("sheet.numfmt.cancel") }),
501
- /* @__PURE__ */ h(xe, { variant: "primary", onClick: k, children: a("sheet.numfmt.confirm") })
501
+ /* @__PURE__ */ h(xe, { onClick: F, className: "univer-mr-3", children: c("sheet.numfmt.cancel") }),
502
+ /* @__PURE__ */ h(xe, { variant: "primary", onClick: U, children: c("sheet.numfmt.confirm") })
502
503
  ] })
503
504
  ]
504
505
  }
505
506
  );
506
507
  };
507
- var Bn = Object.getOwnPropertyDescriptor, Vn = (e, t, r, n) => {
508
- for (var i = n > 1 ? void 0 : n ? Bn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
508
+ var Vn = Object.getOwnPropertyDescriptor, Wn = (e, t, r, n) => {
509
+ for (var i = n > 1 ? void 0 : n ? Vn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
509
510
  (o = e[s]) && (i = o(i) || i);
510
511
  return i;
511
- }, M = (e, t) => (r, n) => t(r, n, e);
512
- const ke = "SHEET_NUMFMT_PANEL";
512
+ }, w = (e, t) => (r, n) => t(r, n, e);
513
+ const Ue = "SHEET_NUMFMT_PANEL";
513
514
  let B = class extends ne {
514
- constructor(t, r, n, i, s, o, a, l, c, m, u) {
515
+ constructor(t, r, n, i, s, o, c, a, l, m, u) {
515
516
  super();
516
517
  /**
517
518
  * If _previewPattern is null ,the realTimeRenderingInterceptor will skip and if it is '',realTimeRenderingInterceptor will clear numfmt.
@@ -521,54 +522,54 @@ let B = class extends ne {
521
522
  */
522
523
  q(this, "_previewPattern", "");
523
524
  q(this, "_sidebarDisposable", null);
524
- this._sheetInterceptorService = t, this._themeService = r, this._univerInstanceService = n, this._commandService = i, this._selectionManagerService = s, this._renderManagerService = o, this._numfmtService = a, this._componentManager = l, this._sidebarService = c, this._localeService = m, this._sheetsNumfmtCellContentController = u, this._initRealTimeRenderingInterceptor(), this._initPanel(), this._initCommands(), this._initCloseListener(), this._commandExecutedListener(), this._initNumfmtLocalChange();
525
+ this._sheetInterceptorService = t, this._themeService = r, this._univerInstanceService = n, this._commandService = i, this._selectionManagerService = s, this._renderManagerService = o, this._numfmtService = c, this._componentManager = a, this._sidebarService = l, this._localeService = m, this._sheetsNumfmtCellContentController = u, this._initRealTimeRenderingInterceptor(), this._initPanel(), this._initCommands(), this._initCloseListener(), this._commandExecutedListener(), this._initNumfmtLocalChange();
525
526
  }
526
527
  _initNumfmtLocalChange() {
527
- this.disposeWithMe(Je(this._sheetsNumfmtCellContentController.locale$, this._localeService.currentLocale$).subscribe(() => {
528
+ this.disposeWithMe(Qe(this._sheetsNumfmtCellContentController.locale$, this._localeService.currentLocale$).subscribe(() => {
528
529
  this._forceUpdate();
529
530
  }));
530
531
  }
531
532
  openPanel() {
532
533
  var S;
533
- const t = this._sidebarService, r = this._selectionManagerService, n = this._commandService, i = this._univerInstanceService, s = this._numfmtService, o = this._localeService, l = (((S = r.getCurrentSelections()) == null ? void 0 : S.map((g) => g.range)) || [])[0];
534
- if (!l)
534
+ const t = this._sidebarService, r = this._selectionManagerService, n = this._commandService, i = this._univerInstanceService, s = this._numfmtService, o = this._localeService, a = (((S = r.getCurrentSelections()) == null ? void 0 : S.map((g) => g.range)) || [])[0];
535
+ if (!a)
535
536
  return !1;
536
- const c = i.getCurrentUnitForType(w.UNIVER_SHEET), m = c.getActiveSheet();
537
+ const l = i.getCurrentUnitForType(M.UNIVER_SHEET), m = l.getActiveSheet();
537
538
  if (!m)
538
539
  return !1;
539
- const u = m.getCellRaw(l.startRow, l.startColumn), f = s.getValue(
540
- c.getUnitId(),
540
+ const u = m.getCellRaw(a.startRow, a.startColumn), v = s.getValue(
541
+ l.getUnitId(),
541
542
  m.getSheetId(),
542
- l.startRow,
543
- l.startColumn
543
+ a.startRow,
544
+ a.startColumn
544
545
  );
545
- let v = "";
546
- f && (v = f.pattern);
547
- const p = (u == null ? void 0 : u.t) === U.NUMBER ? u.v : 12345678, d = {
546
+ let f = "";
547
+ v && (f = v.pattern);
548
+ const p = (u == null ? void 0 : u.t) === k.NUMBER ? u.v : 12345678, d = {
548
549
  onChange: (g) => {
549
550
  var I;
550
551
  if (g.type === "change")
551
552
  this._previewPattern = g.value, this._forceUpdate();
552
553
  else if (g.type === "confirm") {
553
- const P = ((I = r.getCurrentSelections()) == null ? void 0 : I.map((F) => F.range)) || [], O = { values: [] }, k = pe(g.value);
554
+ const P = ((I = r.getCurrentSelections()) == null ? void 0 : I.map((F) => F.range)) || [], R = { values: [] }, U = pe(g.value);
554
555
  P.forEach((F) => {
555
- Ae.foreach(F, (se, _) => {
556
- O.values.push({
556
+ He.foreach(F, (se, _) => {
557
+ R.values.push({
557
558
  row: se,
558
559
  col: _,
559
560
  pattern: g.value,
560
- type: k
561
+ type: U
561
562
  });
562
563
  });
563
- }), n.executeCommand(Ge.id, O), t.close();
564
+ }), n.executeCommand(Ke.id, R), t.close();
564
565
  } else g.type === "cancel" && t.close();
565
566
  },
566
- value: { defaultPattern: v, defaultValue: p, row: l.startRow, col: l.startColumn }
567
+ value: { defaultPattern: f, defaultValue: p, row: a.startRow, col: a.startColumn }
567
568
  };
568
569
  return this._sidebarDisposable = t.open({
569
570
  header: { title: o.t("sheet.numfmt.title") },
570
571
  children: {
571
- label: ke,
572
+ label: Ue,
572
573
  ...d
573
574
  // need passthrough to react props.
574
575
  },
@@ -580,7 +581,7 @@ let B = class extends ne {
580
581
  _forceUpdate(t) {
581
582
  var n;
582
583
  const r = this._renderManagerService.getRenderById(
583
- t != null ? t : this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET).getUnitId()
584
+ t != null ? t : this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET).getUnitId()
584
585
  );
585
586
  r == null || r.with(Bt).reCalculate(), (n = r == null ? void 0 : r.mainComponent) == null || n.makeDirty();
586
587
  }
@@ -594,7 +595,7 @@ let B = class extends ne {
594
595
  }
595
596
  _initPanel() {
596
597
  this.disposeWithMe(
597
- this._componentManager.register(ke, jn)
598
+ this._componentManager.register(Ue, Bn)
598
599
  );
599
600
  }
600
601
  // eslint-disable-next-line max-lines-per-function
@@ -624,41 +625,41 @@ let B = class extends ne {
624
625
  this._previewPattern = null;
625
626
  })
626
627
  ).subscribe(({ disposableCollection: n, selectionRanges: i }) => {
627
- var o, a;
628
- const s = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
628
+ var o, c;
629
+ const s = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
629
630
  this.openPanel(), n.add(
630
631
  this._sheetInterceptorService.intercept(Kt.CELL_CONTENT, {
631
632
  priority: 99,
632
- effect: we.Value | we.Style,
633
- handler: (l, c, m) => {
633
+ effect: Me.Value | Me.Style,
634
+ handler: (a, l, m) => {
634
635
  var p;
635
- const { row: u, col: f } = c, v = m(l) || {};
636
+ const { row: u, col: v } = l, f = m(a) || {};
636
637
  if (i.find(
637
- (d) => d.startColumn <= f && d.endColumn >= f && d.startRow <= u && d.endRow >= u
638
+ (d) => d.startColumn <= v && d.endColumn >= v && d.startRow <= u && d.endRow >= u
638
639
  )) {
639
- const d = c.worksheet.getCellRaw(u, f), S = d == null ? void 0 : d.v, g = d == null ? void 0 : d.t;
640
- if (S == null || g !== U.NUMBER || this._previewPattern === null)
641
- return v;
642
- const I = kt(this._previewPattern, S, this._sheetsNumfmtCellContentController.locale);
640
+ const d = l.worksheet.getCellRaw(u, v), S = d == null ? void 0 : d.v, g = d == null ? void 0 : d.t;
641
+ if (S == null || g !== k.NUMBER || this._previewPattern === null)
642
+ return f;
643
+ const I = Ut(this._previewPattern, S, this._sheetsNumfmtCellContentController.locale);
643
644
  if (I.color) {
644
645
  const P = (p = this._themeService.getColorFromTheme(`${I.color}.500`)) != null ? p : I.color;
645
646
  return {
646
- ...v,
647
+ ...f,
647
648
  v: I.result,
648
- t: U.STRING,
649
+ t: k.STRING,
649
650
  s: { cl: { rgb: P } }
650
651
  };
651
652
  }
652
653
  return {
653
- ...v,
654
+ ...f,
654
655
  v: I.result,
655
- t: U.STRING
656
+ t: k.STRING
656
657
  };
657
658
  }
658
- return v;
659
+ return f;
659
660
  }
660
661
  })
661
- ), (a = (o = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : o.mainComponent) == null || a.makeDirty();
662
+ ), (c = (o = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : o.mainComponent) == null || c.makeDirty();
662
663
  })
663
664
  )
664
665
  );
@@ -678,34 +679,34 @@ let B = class extends ne {
678
679
  );
679
680
  }
680
681
  _initCloseListener() {
681
- this._univerInstanceService.getCurrentTypeOfUnit$(w.UNIVER_SHEET).subscribe((t) => {
682
+ this._univerInstanceService.getCurrentTypeOfUnit$(M.UNIVER_SHEET).subscribe((t) => {
682
683
  var r;
683
684
  t || ((r = this._sidebarDisposable) == null || r.dispose(), this._sidebarDisposable = null);
684
685
  });
685
686
  }
686
687
  };
687
- B = Vn([
688
- M(0, y(Xe)),
689
- M(1, y(pt)),
690
- M(2, fe),
691
- M(3, ve),
692
- M(4, y(_e)),
693
- M(5, je),
694
- M(6, ge),
695
- M(7, y(qe)),
696
- M(8, en),
697
- M(9, y(E)),
698
- M(10, y(We))
688
+ B = Wn([
689
+ w(0, y(qe)),
690
+ w(1, y(pt)),
691
+ w(2, ve),
692
+ w(3, fe),
693
+ w(4, y(_e)),
694
+ w(5, Be),
695
+ w(6, ge),
696
+ w(7, y(Je)),
697
+ w(8, en),
698
+ w(9, y(E)),
699
+ w(10, y(Ge))
699
700
  ], B);
700
- var Wn = Object.getOwnPropertyDescriptor, Gn = (e, t, r, n) => {
701
- for (var i = n > 1 ? void 0 : n ? Wn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
701
+ var Gn = Object.getOwnPropertyDescriptor, Kn = (e, t, r, n) => {
702
+ for (var i = n > 1 ? void 0 : n ? Gn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
702
703
  (o = e[s]) && (i = o(i) || i);
703
704
  return i;
704
705
  }, L = (e, t) => (r, n) => t(r, n, e);
705
- const Kn = () => {
706
+ const Zn = () => {
706
707
  let e = [];
707
708
  return {
708
- add: (i, s, o, a, l) => e.push({ unitId: i, subUnitId: s, row: o, col: a, value: l }),
709
+ add: (i, s, o, c, a) => e.push({ unitId: i, subUnitId: s, row: o, col: c, value: a }),
709
710
  getEffects: () => e,
710
711
  clean: () => {
711
712
  e = [];
@@ -716,7 +717,7 @@ let Q = class extends ne {
716
717
  constructor(t, r, n, i, s) {
717
718
  super();
718
719
  // collect effect mutations when edit end and push this to commands stack in next commands progress
719
- q(this, "_collectEffectMutation", Kn());
720
+ q(this, "_collectEffectMutation", Zn());
720
721
  this._sheetInterceptorService = t, this._numfmtService = r, this._univerInstanceService = n, this._injector = i, this._editorBridgeService = s, this._initInterceptorEditorStart(), this._initInterceptorEditorEnd(), this._initInterceptorCommands();
721
722
  }
722
723
  _initInterceptorEditorStart() {
@@ -736,8 +737,8 @@ let Q = class extends ne {
736
737
  case "currency":
737
738
  case "grouped":
738
739
  case "number": {
739
- const l = r.worksheet.getCellRaw(i, s);
740
- return n && n(l);
740
+ const a = r.worksheet.getCellRaw(i, s);
741
+ return (a == null ? void 0 : a.t) === k.NUMBER && (a == null ? void 0 : a.v) !== void 0 && a.v !== null && Fe(a.v) && (a.v = _n(Number(a.v))), n && n(a);
741
742
  }
742
743
  case "percent":
743
744
  case "date":
@@ -764,7 +765,7 @@ let Q = class extends ne {
764
765
  this._sheetInterceptorService.writeCellInterceptor.intercept(Yt, {
765
766
  // eslint-disable-next-line complexity
766
767
  handler: (t, r, n) => {
767
- var l, c, m;
768
+ var a, l, m;
768
769
  this._collectEffectMutation.clean();
769
770
  const i = this._numfmtService.getValue(
770
771
  r.unitId,
@@ -772,35 +773,35 @@ let Q = class extends ne {
772
773
  r.row,
773
774
  r.col
774
775
  );
775
- if (!(t != null && t.v) && !(t != null && t.p) || De(i == null ? void 0 : i.pattern) || t.t === U.FORCE_STRING)
776
+ if (!(t != null && t.v) && !(t != null && t.p) || De(i == null ? void 0 : i.pattern) || t.t === k.FORCE_STRING)
776
777
  return n(t);
777
- const s = (l = t.p) == null ? void 0 : l.body, o = (m = (c = t == null ? void 0 : t.p) == null ? void 0 : c.body) != null && m.dataStream ? t.p.body.dataStream.replace(/\r\n$/, "") : String(t.v), a = Ut(o);
778
+ const s = (a = t.p) == null ? void 0 : a.body, o = (m = (l = t == null ? void 0 : t.p) == null ? void 0 : l.body) != null && m.dataStream ? t.p.body.dataStream.replace(/\r\n$/, "") : String(t.v), c = kt(o);
778
779
  if (s)
779
- if (Zn(s)) {
780
- const { dataStream: u } = s, f = u.replace(/\r\n$/, ""), v = Number(f);
781
- if (Number.isNaN(v) && !a)
780
+ if (Yn(s)) {
781
+ const { dataStream: u } = s, v = u.replace(/\r\n$/, ""), f = Number(v);
782
+ if (Number.isNaN(f) && !c)
782
783
  return n(t);
783
784
  } else
784
785
  return n(t);
785
- if (a) {
786
- if (!a.z && St(o))
786
+ if (c) {
787
+ if (!c.z && St(o))
787
788
  return n({
788
789
  ...t,
789
790
  p: void 0,
790
791
  v: o,
791
- t: U.FORCE_STRING
792
+ t: k.FORCE_STRING
792
793
  });
793
- a.z && this._collectEffectMutation.add(
794
+ c.z && this._collectEffectMutation.add(
794
795
  r.unitId,
795
796
  r.subUnitId,
796
797
  r.row,
797
798
  r.col,
798
799
  {
799
- pattern: a.z
800
+ pattern: c.z
800
801
  }
801
802
  );
802
- const u = Number(a.v);
803
- return n({ ...t, p: void 0, v: u, t: U.NUMBER });
803
+ const u = Number(c.v);
804
+ return n({ ...t, p: void 0, v: u, t: k.NUMBER });
804
805
  }
805
806
  return n(t);
806
807
  }
@@ -816,51 +817,51 @@ let Q = class extends ne {
816
817
  var n;
817
818
  switch (r.id) {
818
819
  case zt.id: {
819
- const i = t._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET), s = i.getUnitId(), o = (n = i.getActiveSheet()) == null ? void 0 : n.getSheetId();
820
+ const i = t._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET), s = i.getUnitId(), o = (n = i.getActiveSheet()) == null ? void 0 : n.getSheetId();
820
821
  if (!o)
821
822
  return {
822
823
  redos: [],
823
824
  undos: []
824
825
  };
825
- const a = t._collectEffectMutation.getEffects();
826
- if (t._collectEffectMutation.clean(), !a.length)
826
+ const c = t._collectEffectMutation.getEffects();
827
+ if (t._collectEffectMutation.clean(), !c.length)
827
828
  return {
828
829
  redos: [],
829
830
  undos: []
830
831
  };
831
- const l = a.filter((f) => {
832
- var v;
833
- return !!((v = f.value) != null && v.pattern);
834
- }).map((f) => ({
835
- row: f.row,
836
- col: f.col,
837
- pattern: f.value.pattern
838
- })), c = a.filter((f) => {
839
- var v;
840
- return !((v = f.value) != null && v.pattern);
841
- }).map((f) => ({
842
- startRow: f.row,
843
- endColumn: f.col,
844
- startColumn: f.col,
845
- endRow: f.row
832
+ const a = c.filter((v) => {
833
+ var f;
834
+ return !!((f = v.value) != null && f.pattern);
835
+ }).map((v) => ({
836
+ row: v.row,
837
+ col: v.col,
838
+ pattern: v.value.pattern
839
+ })), l = c.filter((v) => {
840
+ var f;
841
+ return !((f = v.value) != null && f.pattern);
842
+ }).map((v) => ({
843
+ startRow: v.row,
844
+ endColumn: v.col,
845
+ startColumn: v.col,
846
+ endRow: v.row
846
847
  })), m = [], u = [];
847
- if (l.length) {
848
- const f = {
848
+ if (a.length) {
849
+ const v = {
849
850
  id: ye.id,
850
- params: Xt(s, o, l)
851
+ params: Xt(s, o, a)
851
852
  };
852
- m.push(f), u.push(...qt(t._injector, f.params));
853
+ m.push(v), u.push(...qt(t._injector, v.params));
853
854
  }
854
- if (c.length) {
855
- const f = {
855
+ if (l.length) {
856
+ const v = {
856
857
  id: Se.id,
857
858
  params: {
858
859
  unitId: s,
859
860
  subUnitId: o,
860
- ranges: c
861
+ ranges: l
861
862
  }
862
863
  };
863
- m.push(f), u.push(...Jt(t._injector, f.params));
864
+ m.push(v), u.push(...Jt(t._injector, v.params));
864
865
  }
865
866
  return {
866
867
  redos: m,
@@ -877,18 +878,18 @@ let Q = class extends ne {
877
878
  );
878
879
  }
879
880
  };
880
- Q = Gn([
881
- L(0, y(Xe)),
881
+ Q = Kn([
882
+ L(0, y(qe)),
882
883
  L(1, y(ge)),
883
- L(2, y(fe)),
884
- L(3, y(He)),
884
+ L(2, y(ve)),
885
+ L(3, y(je)),
885
886
  L(4, _t(Vt))
886
887
  ], Q);
887
- function Zn(e) {
888
+ function Yn(e) {
888
889
  const { textRuns: t = [], paragraphs: r = [], customRanges: n, customBlocks: i = [] } = e, s = ["va"];
889
- return !(t.some((o) => !!(o.ts && Object.keys(o.ts).some((l) => s.includes(l)))) || r.some((o) => o.bullet) || r.length >= 2 || n != null && n.length || i.length > 0);
890
+ return !(t.some((o) => !!(o.ts && Object.keys(o.ts).some((a) => s.includes(a)))) || r.some((o) => o.bullet) || r.length >= 2 || n != null && n.length || i.length > 0);
890
891
  }
891
- const st = (e) => [
892
+ const ot = (e) => [
892
893
  {
893
894
  label: "sheet.numfmt.general",
894
895
  pattern: null
@@ -949,76 +950,76 @@ const st = (e) => [
949
950
  label: "sheet.numfmt.moreFmt",
950
951
  pattern: ""
951
952
  }
952
- ], Yn = (e) => ({
953
+ ], zn = (e) => ({
953
954
  icon: new A((t) => {
954
955
  const r = e.get(E);
955
956
  return t.next(Pe(r.getCurrentLocale()).icon), r.localeChanged$.subscribe(() => {
956
957
  t.next(Pe(r.getCurrentLocale()).icon);
957
958
  });
958
959
  }),
959
- id: ze.id,
960
+ id: Xe.id,
960
961
  title: "sheet.numfmt.currency",
961
962
  tooltip: "sheet.numfmt.currency",
962
963
  type: X.BUTTON,
963
- hidden$: z(e, w.UNIVER_SHEET),
964
+ hidden$: z(e, M.UNIVER_SHEET),
964
965
  disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
965
- }), zn = (e) => ({
966
+ }), Xn = (e) => ({
966
967
  icon: "AddDigitsIcon",
967
- id: Ye.id,
968
+ id: ze.id,
968
969
  title: "sheet.numfmt.addDecimal",
969
970
  tooltip: "sheet.numfmt.addDecimal",
970
971
  type: X.BUTTON,
971
- hidden$: z(e, w.UNIVER_SHEET),
972
+ hidden$: z(e, M.UNIVER_SHEET),
972
973
  disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
973
- }), Xn = (e) => ({
974
+ }), qn = (e) => ({
974
975
  icon: "ReduceDigitsIcon",
975
- id: Ze.id,
976
+ id: Ye.id,
976
977
  title: "sheet.numfmt.subtractDecimal",
977
978
  tooltip: "sheet.numfmt.subtractDecimal",
978
979
  type: X.BUTTON,
979
- hidden$: z(e, w.UNIVER_SHEET),
980
+ hidden$: z(e, M.UNIVER_SHEET),
980
981
  disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
981
- }), qn = (e) => ({
982
+ }), Jn = (e) => ({
982
983
  icon: "PercentIcon",
983
- id: Ke.id,
984
+ id: Ze.id,
984
985
  title: "sheet.numfmt.percent",
985
986
  tooltip: "sheet.numfmt.percent",
986
987
  type: X.BUTTON,
987
- hidden$: z(e, w.UNIVER_SHEET),
988
+ hidden$: z(e, M.UNIVER_SHEET),
988
989
  disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
989
- }), Jn = (e) => {
990
- const t = e.get(fe), r = e.get(ve), n = e.get(E), i = e.get(_e), s = [Se.id, ye.id], o = Wt(
990
+ }), Qn = (e) => {
991
+ const t = e.get(ve), r = e.get(fe), n = e.get(E), i = e.get(_e), s = [Se.id, ye.id], o = Wt(
991
992
  t,
992
993
  "",
993
- ({ workbook: a, worksheet: l }) => new A(
994
- (c) => Je(
994
+ ({ workbook: c, worksheet: a }) => new A(
995
+ (l) => Qe(
995
996
  i.selectionMoveEnd$,
996
997
  yt(r.onCommandExecuted.bind(r)).pipe(
997
998
  an(([m]) => s.includes(m.id))
998
999
  )
999
1000
  ).subscribe(() => {
1000
- var u, f;
1001
+ var u, v;
1001
1002
  const m = i.getCurrentSelections();
1002
1003
  if (m && m[0]) {
1003
- const v = m[0].range, p = v.startRow, d = v.startColumn, S = (f = a.getStyles().get((u = l.getCell(p, d)) == null ? void 0 : u.s)) == null ? void 0 : f.n, g = S == null ? void 0 : S.pattern, I = $t(n.getCurrentLocale());
1004
+ const f = m[0].range, p = f.startRow, d = f.startColumn, S = (v = c.getStyles().get((u = a.getCell(p, d)) == null ? void 0 : u.s)) == null ? void 0 : v.n, g = S == null ? void 0 : S.pattern, I = $t(n.getCurrentLocale());
1004
1005
  let P = n.t("sheet.numfmt.general");
1005
1006
  if (Ct(g)) {
1006
- c.next(P);
1007
+ l.next(P);
1007
1008
  return;
1008
1009
  }
1009
1010
  if (g) {
1010
- const O = st(I).filter((k) => typeof k == "object" && k.pattern).find(
1011
- (k) => re(g, k.pattern)
1011
+ const R = ot(I).filter((U) => typeof U == "object" && U.pattern).find(
1012
+ (U) => re(g, U.pattern)
1012
1013
  );
1013
- O && typeof O == "object" && O.pattern ? P = n.t(O.label) : P = n.t("sheet.numfmt.moreFmt");
1014
+ R && typeof R == "object" && R.pattern ? P = n.t(R.label) : P = n.t("sheet.numfmt.moreFmt");
1014
1015
  }
1015
- c.next(P);
1016
+ l.next(P);
1016
1017
  }
1017
1018
  })
1018
1019
  )
1019
1020
  );
1020
1021
  return {
1021
- label: ot,
1022
+ label: at,
1022
1023
  id: H.id,
1023
1024
  tooltip: "sheet.numfmt.title",
1024
1025
  type: X.SELECTOR,
@@ -1026,92 +1027,92 @@ const st = (e) => [
1026
1027
  selections: [
1027
1028
  {
1028
1029
  label: {
1029
- name: at,
1030
+ name: ct,
1030
1031
  hoverable: !1,
1031
1032
  selectable: !1
1032
1033
  }
1033
1034
  }
1034
1035
  ],
1035
1036
  value$: o,
1036
- hidden$: z(e, w.UNIVER_SHEET),
1037
+ hidden$: z(e, M.UNIVER_SHEET),
1037
1038
  disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [K, Z], rangeTypes: [G] })
1038
1039
  };
1039
- }, ot = "sheet.numfmt.moreNumfmtType", at = "sheet.numfmt.moreNumfmtType.options", Qn = (e) => {
1040
+ }, at = "sheet.numfmt.moreNumfmtType", ct = "sheet.numfmt.moreNumfmtType.options", er = (e) => {
1040
1041
  const { value: t } = e, r = b(E), n = t != null ? t : r.t("sheet.numfmt.general");
1041
1042
  return /* @__PURE__ */ h("span", { className: "univer-text-sm", children: n });
1042
- }, er = () => {
1043
- const e = b(ve), t = b(E), r = b(tn), n = b(We), i = b(_e), s = (c) => {
1043
+ }, tr = () => {
1044
+ const e = b(fe), t = b(E), r = b(tn), n = b(Ge), i = b(_e), s = (l) => {
1044
1045
  const m = i.getCurrentLastSelection();
1045
1046
  if (!m)
1046
1047
  return;
1047
- const u = m.range, f = [];
1048
- Ae.foreach(u, (v, p) => {
1049
- c ? f.push({ row: v, col: p, pattern: c, type: pe(c) }) : f.push({ row: v, col: p });
1050
- }), e.executeCommand(Ge.id, { values: f }), r.focus();
1048
+ const u = m.range, v = [];
1049
+ He.foreach(u, (f, p) => {
1050
+ l ? v.push({ row: f, col: p, pattern: l, type: pe(l) }) : v.push({ row: f, col: p });
1051
+ }), e.executeCommand(Ke.id, { values: v }), r.focus();
1051
1052
  }, o = x(() => {
1052
- const c = Dt.get(t.getCurrentLocale());
1053
- return st(c);
1054
- }, [t]), a = (c) => {
1055
- if (c === 0)
1053
+ const l = Dt.get(t.getCurrentLocale());
1054
+ return ot(l);
1055
+ }, [t]), c = (l) => {
1056
+ if (l === 0)
1056
1057
  s(null);
1057
- else if (c === o.length - 1)
1058
+ else if (l === o.length - 1)
1058
1059
  e.executeCommand(H.id), r.focus();
1059
1060
  else {
1060
- const m = o[c];
1061
+ const m = o[l];
1061
1062
  m.pattern && s(m.pattern);
1062
1063
  }
1063
- }, l = 1220;
1064
- return /* @__PURE__ */ h("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: o.map((c, m) => c === "|" ? /* @__PURE__ */ h(gn, {}, m) : /* @__PURE__ */ C(
1064
+ }, a = 1220;
1065
+ return /* @__PURE__ */ h("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: o.map((l, m) => l === "|" ? /* @__PURE__ */ h(gn, {}, m) : /* @__PURE__ */ C(
1065
1066
  "div",
1066
1067
  {
1067
1068
  className: "univer-flex univer-h-7 univer-items-center univer-justify-between univer-gap-6 univer-rounded univer-px-2 univer-text-sm hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
1068
1069
  onClick: () => {
1069
- a(m);
1070
+ c(m);
1070
1071
  },
1071
1072
  children: [
1072
- /* @__PURE__ */ h("span", { children: t.t(c.label) }),
1073
- /* @__PURE__ */ h("span", { className: "univer-text-xs univer-text-gray-500", children: c.pattern ? Ft(c.pattern || "", l, n.locale).result.trim() : "" })
1073
+ /* @__PURE__ */ h("span", { children: t.t(l.label) }),
1074
+ /* @__PURE__ */ h("span", { className: "univer-text-xs univer-text-gray-500", children: l.pattern ? Ft(l.pattern || "", a, n.locale).result.trim() : "" })
1074
1075
  ]
1075
1076
  },
1076
1077
  m
1077
1078
  )) });
1078
- }, tr = {
1079
+ }, nr = {
1079
1080
  [nn.FORMULAS]: {
1080
- [ze.id]: {
1081
+ [Xe.id]: {
1081
1082
  order: 0,
1082
- menuItemFactory: Yn
1083
+ menuItemFactory: zn
1083
1084
  },
1084
- [Ye.id]: {
1085
+ [ze.id]: {
1085
1086
  order: 1,
1086
- menuItemFactory: zn
1087
+ menuItemFactory: Xn
1087
1088
  },
1088
- [Ze.id]: {
1089
+ [Ye.id]: {
1089
1090
  order: 2,
1090
- menuItemFactory: Xn
1091
+ menuItemFactory: qn
1091
1092
  },
1092
- [Ke.id]: {
1093
+ [Ze.id]: {
1093
1094
  order: 3,
1094
- menuItemFactory: qn
1095
+ menuItemFactory: Jn
1095
1096
  },
1096
1097
  [H.id]: {
1097
1098
  order: 4,
1098
- menuItemFactory: Jn
1099
+ menuItemFactory: Qn
1099
1100
  }
1100
1101
  }
1101
1102
  };
1102
- var nr = Object.getOwnPropertyDescriptor, rr = (e, t, r, n) => {
1103
- for (var i = n > 1 ? void 0 : n ? nr(t, r) : t, s = e.length - 1, o; s >= 0; s--)
1103
+ var rr = Object.getOwnPropertyDescriptor, ir = (e, t, r, n) => {
1104
+ for (var i = n > 1 ? void 0 : n ? rr(t, r) : t, s = e.length - 1, o; s >= 0; s--)
1104
1105
  (o = e[s]) && (i = o(i) || i);
1105
1106
  return i;
1106
- }, Ue = (e, t) => (r, n) => t(r, n, e);
1107
+ }, ke = (e, t) => (r, n) => t(r, n, e);
1107
1108
  let ee = class extends ne {
1108
1109
  constructor(e, t) {
1109
1110
  super(), this._componentManager = e, this._menuManagerService = t, this._initMenu();
1110
1111
  }
1111
1112
  _initMenu() {
1112
- this._menuManagerService.mergeMenu(tr), [
1113
- [ot, Qn],
1114
- [at, er]
1113
+ this._menuManagerService.mergeMenu(nr), [
1114
+ [at, er],
1115
+ [ct, tr]
1115
1116
  ].forEach(([e, t]) => {
1116
1117
  this.disposeWithMe(
1117
1118
  this._componentManager.register(e, t)
@@ -1119,22 +1120,22 @@ let ee = class extends ne {
1119
1120
  });
1120
1121
  }
1121
1122
  };
1122
- ee = rr([
1123
- Ue(0, y(qe)),
1124
- Ue(1, rn)
1123
+ ee = ir([
1124
+ ke(0, y(Je)),
1125
+ ke(1, rn)
1125
1126
  ], ee);
1126
- var ir = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, or = (e, t, r) => t in e ? ir(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ar = (e, t, r, n) => {
1127
- for (var i = n > 1 ? void 0 : n ? sr(t, r) : t, s = e.length - 1, o; s >= 0; s--)
1127
+ var sr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ar = (e, t, r) => t in e ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, cr = (e, t, r, n) => {
1128
+ for (var i = n > 1 ? void 0 : n ? or(t, r) : t, s = e.length - 1, o; s >= 0; s--)
1128
1129
  (o = e[s]) && (i = o(i) || i);
1129
1130
  return i;
1130
- }, me = (e, t) => (r, n) => t(r, n, e), ct = (e, t, r) => or(e, typeof t != "symbol" ? t + "" : t, r);
1131
- const cr = "SHEET_NUMFMT_UI_PLUGIN";
1131
+ }, me = (e, t) => (r, n) => t(r, n, e), lt = (e, t, r) => ar(e, typeof t != "symbol" ? t + "" : t, r);
1132
+ const lr = "SHEET_NUMFMT_UI_PLUGIN";
1132
1133
  let te = class extends Nt {
1133
- constructor(e = Oe, t, r, n) {
1134
+ constructor(e = Re, t, r, n) {
1134
1135
  super(), this._config = e, this._injector = t, this._configService = r, this._renderManagerService = n;
1135
1136
  const { menu: i, ...s } = Et(
1136
1137
  {},
1137
- Oe,
1138
+ Re,
1138
1139
  this._config
1139
1140
  );
1140
1141
  i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig("sheets-numfmt-ui.config", s);
@@ -1148,7 +1149,7 @@ let te = class extends Nt {
1148
1149
  ]);
1149
1150
  }
1150
1151
  onRendered() {
1151
- this._registerRenderModules(), wt(this._injector, [
1152
+ this._registerRenderModules(), Mt(this._injector, [
1152
1153
  [B],
1153
1154
  [Q],
1154
1155
  [ee]
@@ -1158,17 +1159,17 @@ let te = class extends Nt {
1158
1159
  [
1159
1160
  [he]
1160
1161
  ].forEach((t) => {
1161
- this.disposeWithMe(this._renderManagerService.registerRenderModule(w.UNIVER_SHEET, t));
1162
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(M.UNIVER_SHEET, t));
1162
1163
  });
1163
1164
  }
1164
1165
  };
1165
- ct(te, "pluginName", cr);
1166
- ct(te, "type", w.UNIVER_SHEET);
1167
- te = ar([
1166
+ lt(te, "pluginName", lr);
1167
+ lt(te, "type", M.UNIVER_SHEET);
1168
+ te = cr([
1168
1169
  It(Gt, Lt),
1169
- me(1, y(He)),
1170
+ me(1, y(je)),
1170
1171
  me(2, $e),
1171
- me(3, je)
1172
+ me(3, Be)
1172
1173
  ], te);
1173
1174
  export {
1174
1175
  te as UniverSheetsNumfmtUIPlugin