@univerjs/sheets-numfmt-ui 0.10.13 → 0.10.14-nightly.202511031023

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,26 +1,26 @@
1
1
  var ut = Object.defineProperty;
2
2
  var mt = (e, t, r) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var X = (e, t, r) => mt(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Inject as C, LocaleService as E, IConfigService as Ue, Disposable as te, isTextFormat as ke, Tools as dt, isRealNum as De, CommandType as Fe, ILocalStorageService as Le, isPatternEqualWithoutDecimal as ne, numfmt as ht, ThemeService as vt, IUniverInstanceService as he, ICommandService as ve, UniverInstanceType as T, CellValueType as P, toDisposable as me, DisposableCollection as ft, InterceptorEffectEnum as Te, Range as Ae, Injector as He, Optional as pt, getNumfmtParseValueFilter as gt, willLoseNumericPrecision as _t, fromCallback as St, isDefaultFormat as Ct, DEFAULT_TEXT_FORMAT_EXCEL as yt, DependentOn as bt, Plugin as It, merge as Nt, registerDependencies as Et, touchDependencies as Tt } from "@univerjs/core";
4
+ import { Inject as C, LocaleService as E, IConfigService as Ue, Disposable as te, isTextFormat as ke, Tools as dt, isRealNum as De, CommandType as Fe, ILocalStorageService as Le, isPatternEqualWithoutDecimal as ne, numfmt as ht, ThemeService as vt, IUniverInstanceService as de, ICommandService as he, UniverInstanceType as T, CellValueType as P, toDisposable as ue, DisposableCollection as ft, InterceptorEffectEnum as Ee, Range as Ae, Injector as He, Optional as pt, getNumfmtParseValueFilter as gt, willLoseNumericPrecision as _t, fromCallback as St, isDefaultFormat as Ct, DEFAULT_TEXT_FORMAT_EXCEL as yt, DependentOn as bt, Plugin as It, merge as Nt, registerDependencies as Et, touchDependencies as Tt } from "@univerjs/core";
5
5
  import { IRenderManagerService as je } from "@univerjs/engine-render";
6
- import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as Mt, currencySymbols as Me, getDecimalFromPattern as q, getCurrencyType as B, setPatternDecimal as $, getCurrencyFormatOptions as se, CURRENCYFORMAT as wt, DATEFMTLISG as Pt, NUMBERFORMAT as xt, getDateFormatOptions as Be, getNumberFormatOptions as Ve, isPatternHasDecimal as Rt, SheetsNumfmtCellContentController as We, getPatternPreviewIgnoreGeneral as $t, getPatternType as fe, SetNumfmtCommand as Ge, getCurrencySymbolByLocale as Ot, SetPercentCommand as Ke, SubtractDecimalCommand as Ze, AddDecimalCommand as Ye, SetCurrencyCommand as ze, getCurrencySymbolIconByLocale as we, localeCurrencySymbolMap as Ut, getPatternPreview as kt, UniverSheetsNumfmtPlugin as Dt } from "@univerjs/sheets-numfmt";
6
+ import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as Mt, currencySymbols as Te, getDecimalFromPattern as q, getCurrencyType as B, setPatternDecimal as $, getCurrencyFormatOptions as se, CURRENCYFORMAT as wt, DATEFMTLISG as Pt, NUMBERFORMAT as xt, getDateFormatOptions as Be, getNumberFormatOptions as Ve, isPatternHasDecimal as Rt, SheetsNumfmtCellContentController as We, getPatternPreviewIgnoreGeneral as $t, getPatternType as ve, SetNumfmtCommand as Ge, getCurrencySymbolByLocale as Ot, SetPercentCommand as Ke, SubtractDecimalCommand as Ze, AddDecimalCommand as Ye, SetCurrencyCommand as ze, getCurrencySymbolIconByLocale as Me, localeCurrencySymbolMap as Ut, getPatternPreview as kt, UniverSheetsNumfmtPlugin as Dt } from "@univerjs/sheets-numfmt";
7
7
  import { HoverManagerService as Ft, CellAlertManagerService as Lt, CellAlertType as At, SheetSkeletonManagerService as Ht, IEditorBridgeService as jt, deriveStateFromActiveSheet$ as Bt, getCurrentRangeDisable$ as V, UniverSheetsUIPlugin as Vt } from "@univerjs/sheets-ui";
8
- import { INumfmtService as pe, SheetInterceptorService as Xe, SheetsSelectionsService as ge, INTERCEPTOR_POINT as Wt, RemoveNumfmtMutation as _e, SetNumfmtMutation as Se, BEFORE_CELL_EDIT as Gt, AFTER_CELL_EDIT as Kt, SetRangeValuesCommand as Zt, transformCellsToRange as Yt, factorySetNumfmtUndoMutation as zt, factoryRemoveNumfmtUndoMutation as Xt, RangeProtectionPermissionEditPoint as W, WorksheetSetCellStylePermission as G, WorksheetEditPermission as K, WorkbookEditablePermission as Z } from "@univerjs/sheets";
8
+ import { INumfmtService as fe, SheetInterceptorService as Xe, SheetsSelectionsService as pe, INTERCEPTOR_POINT as Wt, RemoveNumfmtMutation as ge, SetNumfmtMutation as _e, BEFORE_CELL_EDIT as Gt, AFTER_CELL_EDIT as Kt, SetRangeValuesCommand as Zt, transformCellsToRange as Yt, factorySetNumfmtUndoMutation as zt, factoryRemoveNumfmtUndoMutation as Xt, RangeProtectionPermissionEditPoint as W, WorksheetSetCellStylePermission as G, WorksheetEditPermission as K, WorkbookEditablePermission as Z } from "@univerjs/sheets";
9
9
  import { IZenZoneService as qt, useDependency as b, ComponentManager as qe, ISidebarService as Jt, getMenuHiddenObservable as Y, MenuItemType as z, ILayoutService as Qt, RibbonDataGroup as en, IMenuManagerService as tn } from "@univerjs/ui";
10
10
  import { debounceTime as nn, merge as Je, Observable as L, combineLatest as rn, filter as sn } from "rxjs";
11
11
  import { map as on, switchMap as cn, tap as an, debounceTime as ln } from "rxjs/operators";
12
- import { jsxs as y, jsx as h } from "react/jsx-runtime";
13
- import { createContext as un, useState as N, useEffect as re, useRef as Ce, useContext as Qe, useMemo as x, createElement as ye, forwardRef as mn, useCallback as dn } from "react";
14
- import { InputNumber as be, Select as Ie, SelectList as Ne, Input as hn, clsx as et, borderClassName as vn, Button as Pe, scrollbarClassName as fn, Separator as pn } from "@univerjs/design";
12
+ import { jsxs as y, jsx as v } from "react/jsx-runtime";
13
+ import { createContext as un, useState as N, useEffect as re, useRef as Se, useContext as Qe, useMemo as x, createElement as Ce, forwardRef as mn, useCallback as dn } from "react";
14
+ import { InputNumber as ye, Select as be, SelectList as Ie, Input as hn, clsx as et, borderClassName as vn, Button as we, scrollbarClassName as fn, Separator as pn } from "@univerjs/design";
15
15
  import { stripErrorMargin as gn } from "@univerjs/engine-formula";
16
- const xe = {};
16
+ const Pe = {};
17
17
  var _n = Object.getOwnPropertyDescriptor, Sn = (e, t, r, n) => {
18
18
  for (var i = n > 1 ? void 0 : n ? _n(t, r) : t, s = e.length - 1, o; s >= 0; s--)
19
19
  (o = e[s]) && (i = o(i) || i);
20
20
  return i;
21
21
  }, k = (e, t) => (r, n) => t(r, n, e);
22
- const oe = "SHEET_NUMFMT_ALERT";
23
- let de = class extends te {
22
+ const xe = "SHEET_NUMFMT_ALERT";
23
+ let me = class extends te {
24
24
  constructor(e, t, r, n, i, s, o) {
25
25
  super(), this._context = e, this._hoverManagerService = t, this._cellAlertManagerService = r, this._localeService = n, this._zenZoneService = i, this._numfmtService = s, this._configService = o, this._init();
26
26
  }
@@ -33,23 +33,26 @@ let de = class extends te {
33
33
  if (e) {
34
34
  const n = e.location, i = this._context.unit, s = i.getActiveSheet();
35
35
  if (!s) return;
36
- const o = n.unitId, m = n.subUnitId;
36
+ const o = n.unitId, l = n.subUnitId;
37
37
  let c;
38
38
  const a = s.getCell(n.row, n.col);
39
39
  if (a != null && a.s) {
40
40
  const u = i.getStyles().get(a.s);
41
41
  u != null && u.n && (c = u.n);
42
42
  }
43
- if (c || (c = this._numfmtService.getValue(o, m, n.row, n.col)), !c) {
43
+ if (c || (c = this._numfmtService.getValue(o, l, n.row, n.col)), !c) {
44
44
  this._hideAlert();
45
45
  return;
46
46
  }
47
47
  if (ke(c.pattern) && dt.isDefine(a == null ? void 0 : a.v) && De(a.v)) {
48
48
  if ((t = this._configService.getConfig(Mt)) != null && t.disableTextFormatAlert)
49
49
  return;
50
- const u = this._cellAlertManagerService.currentAlert.get(oe), l = (r = u == null ? void 0 : u.alert) == null ? void 0 : r.location;
51
- if (l && l.row === n.row && l.col === n.col && l.subUnitId === n.subUnitId && l.unitId === n.unitId)
52
- return;
50
+ const u = this._cellAlertManagerService.currentAlert;
51
+ for (const [m, d] of u.entries()) {
52
+ const f = (r = d == null ? void 0 : d.alert) == null ? void 0 : r.location;
53
+ if (f && f.row === n.row && f.col === n.col && f.subUnitId === n.subUnitId && f.unitId === n.unitId)
54
+ return;
55
+ }
53
56
  this._cellAlertManagerService.showAlert({
54
57
  type: At.ERROR,
55
58
  title: this._localeService.t("info.error"),
@@ -57,7 +60,7 @@ let de = class extends te {
57
60
  location: n,
58
61
  width: 200,
59
62
  height: 74,
60
- key: oe
63
+ key: xe
61
64
  });
62
65
  return;
63
66
  }
@@ -71,18 +74,18 @@ let de = class extends te {
71
74
  }));
72
75
  }
73
76
  _hideAlert() {
74
- this._cellAlertManagerService.removeAlert(oe);
77
+ this._cellAlertManagerService.removeAlert(xe);
75
78
  }
76
79
  };
77
- de = Sn([
80
+ me = Sn([
78
81
  k(1, C(Ft)),
79
82
  k(2, C(Lt)),
80
83
  k(3, C(E)),
81
84
  k(4, qt),
82
- k(5, C(pe)),
85
+ k(5, C(fe)),
83
86
  k(6, Ue)
84
- ], de);
85
- const ce = {
87
+ ], me);
88
+ const oe = {
86
89
  id: "sheet.operation.close.numfmt.panel",
87
90
  type: Fe.OPERATION,
88
91
  handler: () => (
@@ -99,7 +102,7 @@ var Cn = Object.getOwnPropertyDescriptor, yn = (e, t, r, n) => {
99
102
  (o = e[s]) && (i = o(i) || i);
100
103
  return i;
101
104
  }, bn = (e, t) => (r, n) => t(r, n, e);
102
- const Ee = un([]);
105
+ const Ne = un([]);
103
106
  let H = class {
104
107
  constructor(e) {
105
108
  this._localStorageService = e;
@@ -125,8 +128,8 @@ let H = class {
125
128
  async getHabit(e, t) {
126
129
  const r = this._getKey(e), n = await this._localStorageService.getItem(r);
127
130
  if (t && n) {
128
- const i = n.map((s, o, m) => {
129
- const c = m.length;
131
+ const i = n.map((s, o, l) => {
132
+ const c = l.length;
130
133
  return {
131
134
  value: s,
132
135
  priority: c - o
@@ -134,8 +137,8 @@ let H = class {
134
137
  });
135
138
  return t.sort((s, o) => {
136
139
  var a, u;
137
- const m = ((a = i.find((l) => l.value === s)) == null ? void 0 : a.priority) || -1;
138
- return (((u = i.find((l) => l.value === o)) == null ? void 0 : u.priority) || -1) - m;
140
+ const l = ((a = i.find((m) => m.value === s)) == null ? void 0 : a.priority) || -1;
141
+ return (((u = i.find((m) => m.value === o)) == null ? void 0 : u.priority) || -1) - l;
139
142
  });
140
143
  }
141
144
  return n || [];
@@ -148,10 +151,10 @@ H = yn([
148
151
  bn(0, C(Le))
149
152
  ], H);
150
153
  const Re = "numfmtCurrency", In = (e) => {
151
- const t = b(H), [r, n] = N(Me);
154
+ const t = b(H), [r, n] = N(Te);
152
155
  return re(() => {
153
156
  t.addHabit("numfmtCurrency", []).then(() => {
154
- t.getHabit(Re, [...Me]).then((s) => {
157
+ t.getHabit(Re, [...Te]).then((s) => {
155
158
  n(s), e && e(s);
156
159
  });
157
160
  });
@@ -159,7 +162,7 @@ const Re = "numfmtCurrency", In = (e) => {
159
162
  t.markHabit(Re, s);
160
163
  } };
161
164
  }, Nn = () => {
162
- const e = Ce([]), [t, r] = N({});
165
+ const e = Se([]), [t, r] = N({});
163
166
  return re(() => {
164
167
  e.current.forEach((i) => {
165
168
  i();
@@ -168,20 +171,20 @@ const Re = "numfmtCurrency", In = (e) => {
168
171
  e.current.push(i), r({});
169
172
  };
170
173
  }, En = (e) => !!B(e) && e.startsWith("_("), Tn = (e) => {
171
- const { defaultPattern: t, action: r, onChange: n } = e, [i, s] = N(() => q(t || "", 2)), o = Qe(Ee), [m, c] = N(() => B(t) || o[0]), a = x(() => o.map((p) => ({ label: p, value: p })), []), l = b(E).t;
172
- r.current = () => $(`_("${m}"* #,##0${i > 0 ? ".0" : ""}_)`, i);
173
- const v = (p) => {
174
+ const { defaultPattern: t, action: r, onChange: n } = e, [i, s] = N(() => q(t || "", 2)), o = Qe(Ne), [l, c] = N(() => B(t) || o[0]), a = x(() => o.map((p) => ({ label: p, value: p })), []), m = b(E).t;
175
+ r.current = () => $(`_("${l}"* #,##0${i > 0 ? ".0" : ""}_)`, i);
176
+ const d = (p) => {
174
177
  c(p), n($(`_("${p}"* #,##0${i > 0 ? ".0" : ""}_)`, i));
175
178
  }, f = (p) => {
176
- const d = p || 0;
177
- s(d), n($(`_("${m}"* #,##0${d > 0 ? ".0" : ""}_)`, d));
179
+ const h = p || 0;
180
+ s(h), n($(`_("${l}"* #,##0${h > 0 ? ".0" : ""}_)`, h));
178
181
  };
179
182
  return /* @__PURE__ */ y("div", { children: [
180
183
  /* @__PURE__ */ y("div", { className: "univer-mt-4 univer-flex univer-justify-between", children: [
181
184
  /* @__PURE__ */ y("div", { className: "option", children: [
182
- /* @__PURE__ */ h("div", { className: "univer-text-sm univer-text-gray-400", children: l("sheet.numfmt.decimalLength") }),
183
- /* @__PURE__ */ h("div", { className: "univer-mt-2 univer-w-32", children: /* @__PURE__ */ h(
184
- be,
185
+ /* @__PURE__ */ v("div", { className: "univer-text-sm univer-text-gray-400", children: m("sheet.numfmt.decimalLength") }),
186
+ /* @__PURE__ */ v("div", { className: "univer-mt-2 univer-w-32", children: /* @__PURE__ */ v(
187
+ ye,
185
188
  {
186
189
  value: i,
187
190
  step: 1,
@@ -193,43 +196,43 @@ const Re = "numfmtCurrency", In = (e) => {
193
196
  ) })
194
197
  ] }),
195
198
  /* @__PURE__ */ y("div", { className: "option", children: [
196
- /* @__PURE__ */ h("div", { className: "univer-text-sm univer-text-gray-400", children: l("sheet.numfmt.currencyType") }),
197
- /* @__PURE__ */ h("div", { className: "univer-mt-2 univer-w-36", children: /* @__PURE__ */ h(
198
- Ie,
199
+ /* @__PURE__ */ v("div", { className: "univer-text-sm univer-text-gray-400", children: m("sheet.numfmt.currencyType") }),
200
+ /* @__PURE__ */ v("div", { className: "univer-mt-2 univer-w-36", children: /* @__PURE__ */ v(
201
+ be,
199
202
  {
200
203
  options: a,
201
- value: m,
202
- onChange: v
204
+ value: l,
205
+ onChange: d
203
206
  }
204
207
  ) })
205
208
  ] })
206
209
  ] }),
207
- /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: l("sheet.numfmt.accountingDes") })
210
+ /* @__PURE__ */ v("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: m("sheet.numfmt.accountingDes") })
208
211
  ] });
209
212
  }, Mn = (e) => !!B(e) && !e.startsWith("_("), wn = (e) => {
210
- const r = b(E).t, n = Qe(Ee), [i, s] = N(() => B(e.defaultPattern) || n[0]), [o, m] = N(() => q(e.defaultPattern || "", 2)), [c, a] = N(() => {
213
+ const r = b(E).t, n = Qe(Ne), [i, s] = N(() => B(e.defaultPattern) || n[0]), [o, l] = N(() => q(e.defaultPattern || "", 2)), [c, a] = N(() => {
211
214
  var g;
212
- const d = se(i);
213
- return ((g = d.find((I) => ne(I.value, e.defaultPattern))) == null ? void 0 : g.value) || d[0].value;
214
- }), u = x(() => se(i), [i]), l = x(() => n.map((d) => ({ label: d, value: d })), [n]);
215
+ const h = se(i);
216
+ return ((g = h.find((I) => ne(I.value, e.defaultPattern))) == null ? void 0 : g.value) || h[0].value;
217
+ }), u = x(() => se(i), [i]), m = x(() => n.map((h) => ({ label: h, value: h })), [n]);
215
218
  e.action.current = () => $(c, o);
216
- const v = (d) => {
217
- if (d === void 0)
219
+ const d = (h) => {
220
+ if (h === void 0)
218
221
  return;
219
- s(d);
220
- const S = se(d)[0].value;
222
+ s(h);
223
+ const S = se(h)[0].value;
221
224
  a(S), e.onChange($(S, o));
222
- }, f = (d) => {
223
- d !== void 0 && (a(d), e.onChange($(d, o)));
224
- }, p = (d) => {
225
- m(d || 0), e.onChange($(c, d || 0));
225
+ }, f = (h) => {
226
+ h !== void 0 && (a(h), e.onChange($(h, o)));
227
+ }, p = (h) => {
228
+ l(h || 0), e.onChange($(c, h || 0));
226
229
  };
227
230
  return /* @__PURE__ */ y("div", { children: [
228
231
  /* @__PURE__ */ y("div", { className: "univer-mt-4 univer-flex univer-justify-between", children: [
229
232
  /* @__PURE__ */ y("div", { className: "option", children: [
230
- /* @__PURE__ */ h("div", { className: "univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.decimalLength") }),
231
- /* @__PURE__ */ h("div", { className: "univer-mt-2 univer-w-32", children: /* @__PURE__ */ h(
232
- be,
233
+ /* @__PURE__ */ v("div", { className: "univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.decimalLength") }),
234
+ /* @__PURE__ */ v("div", { className: "univer-mt-2 univer-w-32", children: /* @__PURE__ */ v(
235
+ ye,
233
236
  {
234
237
  value: o,
235
238
  max: 20,
@@ -239,35 +242,35 @@ const Re = "numfmtCurrency", In = (e) => {
239
242
  ) })
240
243
  ] }),
241
244
  /* @__PURE__ */ y("div", { className: "option", children: [
242
- /* @__PURE__ */ h("div", { className: "univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.currencyType") }),
243
- /* @__PURE__ */ h("div", { className: "univer-mt-2 univer-w-36", children: /* @__PURE__ */ h(
244
- Ie,
245
+ /* @__PURE__ */ v("div", { className: "univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.currencyType") }),
246
+ /* @__PURE__ */ v("div", { className: "univer-mt-2 univer-w-36", children: /* @__PURE__ */ v(
247
+ be,
245
248
  {
246
249
  value: i,
247
- options: l,
248
- onChange: v
250
+ options: m,
251
+ onChange: d
249
252
  }
250
253
  ) })
251
254
  ] })
252
255
  ] }),
253
- /* @__PURE__ */ h("div", { className: "label univer-mt-4", children: r("sheet.numfmt.negType") }),
254
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ne, { value: c, options: u, onChange: f }) }),
255
- /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.currencyDes") })
256
+ /* @__PURE__ */ v("div", { className: "label univer-mt-4", children: r("sheet.numfmt.negType") }),
257
+ /* @__PURE__ */ v("div", { className: "univer-mt-2", children: /* @__PURE__ */ v(Ie, { value: c, options: u, onChange: f }) }),
258
+ /* @__PURE__ */ v("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: r("sheet.numfmt.currencyDes") })
256
259
  ] });
257
260
  };
258
261
  function tt({ ref: e, ...t }) {
259
- const { icon: r, id: n, className: i, extend: s, ...o } = t, m = `univerjs-icon univerjs-icon-${n} ${i || ""}`.trim(), c = Ce(`_${Rn()}`);
262
+ const { icon: r, id: n, className: i, extend: s, ...o } = t, l = `univerjs-icon univerjs-icon-${n} ${i || ""}`.trim(), c = Se(`_${Rn()}`);
260
263
  return nt(r, `${n}`, {
261
264
  defIds: r.defIds,
262
265
  idSuffix: c.current
263
266
  }, {
264
267
  ref: e,
265
- className: m,
268
+ className: l,
266
269
  ...o
267
270
  }, s);
268
271
  }
269
272
  function nt(e, t, r, n, i) {
270
- return ye(e.tag, {
273
+ return Ce(e.tag, {
271
274
  key: t,
272
275
  ...Pn(e, r, i),
273
276
  ...n
@@ -320,71 +323,71 @@ const $n = {
320
323
  }
321
324
  }]
322
325
  }, rt = mn(function(t, r) {
323
- return ye(tt, Object.assign({}, t, {
326
+ return Ce(tt, Object.assign({}, t, {
324
327
  id: "check-mark-icon",
325
328
  ref: r,
326
329
  icon: $n
327
330
  }));
328
331
  });
329
332
  rt.displayName = "CheckMarkIcon";
330
- const ae = "customFormat", le = "numfmt_custom_pattern";
333
+ const ce = "customFormat", ae = "numfmt_custom_pattern";
331
334
  function On(e) {
332
- const { defaultPattern: t, action: r, onChange: n } = e, i = b(H), s = b(Le), o = b(E), [m, c] = N(t);
333
- r.current = () => (i.markHabit(ae, m), s.getItem(le).then((f = []) => {
334
- const p = [.../* @__PURE__ */ new Set([m, ...f || []])].splice(0, 10).filter((d) => !!d);
335
- s.setItem(le, p);
336
- }), m);
335
+ const { defaultPattern: t, action: r, onChange: n } = e, i = b(H), s = b(Le), o = b(E), [l, c] = N(t);
336
+ r.current = () => (i.markHabit(ce, l), s.getItem(ae).then((f = []) => {
337
+ const p = [.../* @__PURE__ */ new Set([l, ...f || []])].splice(0, 10).filter((h) => !!h);
338
+ s.setItem(ae, p);
339
+ }), l);
337
340
  const [a, u] = N([]);
338
341
  re(() => {
339
- s.getItem(le).then((f) => {
342
+ s.getItem(ae).then((f) => {
340
343
  const p = [
341
- ...wt.map((d) => d.suffix("$")),
342
- ...Pt.map((d) => d.suffix),
343
- ...xt.map((d) => d.suffix)
344
+ ...wt.map((h) => h.suffix("$")),
345
+ ...Pt.map((h) => h.suffix),
346
+ ...xt.map((h) => h.suffix)
344
347
  ];
345
- p.push(...f || []), i.addHabit(ae, []).finally(() => {
346
- i.getHabit(ae, p).then((d) => {
347
- u([...new Set(d)]);
348
+ p.push(...f || []), i.addHabit(ce, []).finally(() => {
349
+ i.getHabit(ce, p).then((h) => {
350
+ u([...new Set(h)]);
348
351
  });
349
352
  });
350
353
  });
351
354
  }, []);
352
- const l = (f) => {
355
+ const m = (f) => {
353
356
  c(f), n(f);
354
- }, v = () => {
355
- n(m);
357
+ }, d = () => {
358
+ n(l);
356
359
  };
357
360
  return /* @__PURE__ */ y("div", { children: [
358
- /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: o.t("sheet.numfmt.customFormat") }),
359
- /* @__PURE__ */ h(
361
+ /* @__PURE__ */ v("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: o.t("sheet.numfmt.customFormat") }),
362
+ /* @__PURE__ */ v(
360
363
  hn,
361
364
  {
362
365
  placeholder: o.t("sheet.numfmt.customFormat"),
363
- onBlur: v,
364
- value: m,
366
+ onBlur: d,
367
+ value: l,
365
368
  onChange: c,
366
369
  className: "univer-mt-2 univer-w-full"
367
370
  }
368
371
  ),
369
- /* @__PURE__ */ h(
372
+ /* @__PURE__ */ v(
370
373
  "div",
371
374
  {
372
375
  className: et("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2", vn),
373
376
  children: a.map((f) => /* @__PURE__ */ y(
374
377
  "div",
375
378
  {
376
- onClick: () => l(f),
379
+ onClick: () => m(f),
377
380
  className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1.5 univer-py-1.5 univer-text-sm",
378
381
  children: [
379
- /* @__PURE__ */ h("div", { className: "univer-flex univer-w-4 univer-items-center univer-text-primary-600", children: m === f && /* @__PURE__ */ h(rt, {}) }),
380
- /* @__PURE__ */ h("div", { children: f })
382
+ /* @__PURE__ */ v("div", { className: "univer-flex univer-w-4 univer-items-center univer-text-primary-600", children: l === f && /* @__PURE__ */ v(rt, {}) }),
383
+ /* @__PURE__ */ v("div", { children: f })
381
384
  ]
382
385
  },
383
386
  f
384
387
  ))
385
388
  }
386
389
  ),
387
- /* @__PURE__ */ h(
390
+ /* @__PURE__ */ v(
388
391
  "div",
389
392
  {
390
393
  className: "univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
@@ -407,13 +410,13 @@ function kn(e) {
407
410
  return n[0].value;
408
411
  });
409
412
  e.action.current = () => s;
410
- const m = (c) => {
413
+ const l = (c) => {
411
414
  c !== void 0 && (o(c), t(c));
412
415
  };
413
416
  return /* @__PURE__ */ y("div", { children: [
414
- /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: i.t("sheet.numfmt.dateType") }),
415
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ne, { value: s, options: n, onChange: m }) }),
416
- /* @__PURE__ */ h(
417
+ /* @__PURE__ */ v("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: i.t("sheet.numfmt.dateType") }),
418
+ /* @__PURE__ */ v("div", { className: "univer-mt-2", children: /* @__PURE__ */ v(Ie, { value: s, options: n, onChange: l }) }),
419
+ /* @__PURE__ */ v(
417
420
  "div",
418
421
  {
419
422
  className: "univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",
@@ -424,7 +427,7 @@ function kn(e) {
424
427
  }
425
428
  const Dn = (e) => !e, Fn = (e) => {
426
429
  const r = b(E).t;
427
- return e.action.current = () => "", /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(
430
+ return e.action.current = () => "", /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(
428
431
  "div",
429
432
  {
430
433
  className: "univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",
@@ -434,17 +437,17 @@ const Dn = (e) => !e, Fn = (e) => {
434
437
  }, Ln = (e) => Ve().some((t) => ne(t.value, e));
435
438
  function An(e) {
436
439
  const t = b(E), r = x(Ve, []), [n, i] = N(() => q(e.defaultPattern || "", 0)), [s, o] = N(() => {
437
- const l = r.find((v) => ne(v.value, e.defaultPattern || ""));
438
- return (l == null ? void 0 : l.value) || r[0].value;
439
- }), m = x(() => $(s, Number(n || 0)), [s, n]), c = x(() => !Rt(s), [s]), a = (l) => {
440
- i(l || 0), e.onChange($(s, Number(l || 0)));
441
- }, u = (l) => {
442
- l !== void 0 && (i(q(l, 0)), o(l), e.onChange(l));
440
+ const m = r.find((d) => ne(d.value, e.defaultPattern || ""));
441
+ return (m == null ? void 0 : m.value) || r[0].value;
442
+ }), l = x(() => $(s, Number(n || 0)), [s, n]), c = x(() => !Rt(s), [s]), a = (m) => {
443
+ i(m || 0), e.onChange($(s, Number(m || 0)));
444
+ }, u = (m) => {
445
+ m !== void 0 && (i(q(m, 0)), o(m), e.onChange(m));
443
446
  };
444
- return e.action.current = () => m, /* @__PURE__ */ y("div", { children: [
445
- /* @__PURE__ */ h("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: t.t("sheet.numfmt.decimalLength") }),
446
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(
447
- be,
447
+ return e.action.current = () => l, /* @__PURE__ */ y("div", { children: [
448
+ /* @__PURE__ */ v("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: t.t("sheet.numfmt.decimalLength") }),
449
+ /* @__PURE__ */ v("div", { className: "univer-mt-2", children: /* @__PURE__ */ v(
450
+ ye,
448
451
  {
449
452
  disabled: c,
450
453
  value: n,
@@ -457,8 +460,8 @@ function An(e) {
457
460
  " ",
458
461
  t.t("sheet.numfmt.negType")
459
462
  ] }),
460
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ne, { onChange: u, options: r, value: s }) }),
461
- /* @__PURE__ */ h(
463
+ /* @__PURE__ */ v("div", { className: "univer-mt-2", children: /* @__PURE__ */ v(Ie, { onChange: u, options: r, value: s }) }),
464
+ /* @__PURE__ */ v(
462
465
  "div",
463
466
  {
464
467
  className: "univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",
@@ -468,7 +471,7 @@ function An(e) {
468
471
  ] });
469
472
  }
470
473
  const Hn = (e) => {
471
- const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = b(E), o = Ce(() => ""), m = s.t, c = Nn(), a = x(
474
+ const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = b(E), o = Se(() => ""), l = s.t, c = Nn(), a = x(
472
475
  () => [
473
476
  { label: "sheet.numfmt.general", component: Fn },
474
477
  { label: "sheet.numfmt.accounting", component: Tn },
@@ -476,9 +479,9 @@ const Hn = (e) => {
476
479
  { label: "sheet.numfmt.date", component: kn },
477
480
  { label: "sheet.numfmt.thousandthPercentile", component: An },
478
481
  { label: "sheet.numfmt.customFormat", component: On }
479
- ].map((_) => ({ ..._, label: m(_.label) })),
482
+ ].map((_) => ({ ..._, label: l(_.label) })),
480
483
  []
481
- ), [u, l] = N(g), [v, f] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: d } = In(() => f(`${n}_${i}_userCurrency'`)), S = x(() => {
484
+ ), [u, m] = N(g), [d, f] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: h } = In(() => f(`${n}_${i}_userCurrency'`)), S = x(() => {
482
485
  var _;
483
486
  return (_ = a.find((U) => U.label === u)) == null ? void 0 : _.component;
484
487
  }, [u]);
@@ -489,7 +492,7 @@ const Hn = (e) => {
489
492
  label: _.label,
490
493
  value: _.label
491
494
  })), w = (_) => {
492
- l(_), c(() => e.onChange({ type: "change", value: o.current() || "" }));
495
+ m(_), c(() => e.onChange({ type: "change", value: o.current() || "" }));
493
496
  }, R = dn((_) => {
494
497
  e.onChange({ type: "change", value: _ });
495
498
  }, []), O = () => {
@@ -504,20 +507,20 @@ const Hn = (e) => {
504
507
  action: o
505
508
  };
506
509
  return re(() => {
507
- l(g()), f(`${n}_${i}`);
510
+ m(g()), f(`${n}_${i}`);
508
511
  }, [n, i]), /* @__PURE__ */ y(
509
512
  "div",
510
513
  {
511
514
  className: et("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5", fn),
512
515
  children: [
513
516
  /* @__PURE__ */ y("div", { children: [
514
- /* @__PURE__ */ h("div", { className: "univer-mt-3.5 univer-text-sm univer-text-gray-400", children: m("sheet.numfmt.numfmtType") }),
515
- /* @__PURE__ */ h("div", { className: "univer-mt-2", children: /* @__PURE__ */ h(Ie, { className: "univer-w-full", value: u, options: I, onChange: w }) }),
516
- /* @__PURE__ */ h("div", { children: S && /* @__PURE__ */ h(Ee.Provider, { value: d, children: /* @__PURE__ */ ye(S, { ...ie, key: v }) }) })
517
+ /* @__PURE__ */ v("div", { className: "univer-mt-3.5 univer-text-sm univer-text-gray-400", children: l("sheet.numfmt.numfmtType") }),
518
+ /* @__PURE__ */ v("div", { className: "univer-mt-2", children: /* @__PURE__ */ v(be, { className: "univer-w-full", value: u, options: I, onChange: w }) }),
519
+ /* @__PURE__ */ v("div", { children: S && /* @__PURE__ */ v(Ne.Provider, { value: h, children: /* @__PURE__ */ Ce(S, { ...ie, key: d }) }) })
517
520
  ] }),
518
521
  /* @__PURE__ */ y("div", { className: "univer-mb-5 univer-mt-3.5 univer-flex univer-justify-end", children: [
519
- /* @__PURE__ */ h(Pe, { onClick: D, className: "univer-mr-3", children: m("sheet.numfmt.cancel") }),
520
- /* @__PURE__ */ h(Pe, { variant: "primary", onClick: O, children: m("sheet.numfmt.confirm") })
522
+ /* @__PURE__ */ v(we, { onClick: D, className: "univer-mr-3", children: l("sheet.numfmt.cancel") }),
523
+ /* @__PURE__ */ v(we, { variant: "primary", onClick: O, children: l("sheet.numfmt.confirm") })
521
524
  ] })
522
525
  ]
523
526
  }
@@ -530,7 +533,7 @@ var jn = Object.getOwnPropertyDescriptor, Bn = (e, t, r, n) => {
530
533
  }, M = (e, t) => (r, n) => t(r, n, e);
531
534
  const $e = "SHEET_NUMFMT_PANEL";
532
535
  let j = class extends te {
533
- constructor(t, r, n, i, s, o, m, c, a, u, l) {
536
+ constructor(t, r, n, i, s, o, l, c, a, u, m) {
534
537
  super();
535
538
  /**
536
539
  * If _previewPattern is null ,the realTimeRenderingInterceptor will skip and if it is '',realTimeRenderingInterceptor will clear numfmt.
@@ -540,7 +543,7 @@ let j = class extends te {
540
543
  */
541
544
  X(this, "_previewPattern", "");
542
545
  X(this, "_sidebarDisposable", null);
543
- this._sheetInterceptorService = t, this._themeService = r, this._univerInstanceService = n, this._commandService = i, this._selectionManagerService = s, this._renderManagerService = o, this._numfmtService = m, this._componentManager = c, this._sidebarService = a, this._localeService = u, this._sheetsNumfmtCellContentController = l, this._initRealTimeRenderingInterceptor(), this._initPanel(), this._initCommands(), this._initCloseListener(), this._commandExecutedListener(), this._initNumfmtLocalChange();
546
+ this._sheetInterceptorService = t, this._themeService = r, this._univerInstanceService = n, this._commandService = i, this._selectionManagerService = s, this._renderManagerService = o, this._numfmtService = l, this._componentManager = c, this._sidebarService = a, this._localeService = u, this._sheetsNumfmtCellContentController = m, this._initRealTimeRenderingInterceptor(), this._initPanel(), this._initCommands(), this._initCloseListener(), this._commandExecutedListener(), this._initNumfmtLocalChange();
544
547
  }
545
548
  _initNumfmtLocalChange() {
546
549
  this.disposeWithMe(Je(this._sheetsNumfmtCellContentController.locale$, this._localeService.currentLocale$).subscribe(() => {
@@ -555,21 +558,21 @@ let j = class extends te {
555
558
  const a = i.getCurrentUnitForType(T.UNIVER_SHEET), u = a.getActiveSheet();
556
559
  if (!u)
557
560
  return !1;
558
- const l = u.getCellRaw(c.startRow, c.startColumn), v = s.getValue(
561
+ const m = u.getCellRaw(c.startRow, c.startColumn), d = s.getValue(
559
562
  a.getUnitId(),
560
563
  u.getSheetId(),
561
564
  c.startRow,
562
565
  c.startColumn
563
566
  );
564
567
  let f = "";
565
- v && (f = v.pattern);
566
- const p = (l == null ? void 0 : l.t) === P.NUMBER ? l.v : 12345678, d = {
568
+ d && (f = d.pattern);
569
+ const p = (m == null ? void 0 : m.t) === P.NUMBER ? m.v : 12345678, h = {
567
570
  onChange: (g) => {
568
571
  var I;
569
572
  if (g.type === "change")
570
573
  this._previewPattern = g.value, this._forceUpdate();
571
574
  else if (g.type === "confirm") {
572
- const w = ((I = r.getCurrentSelections()) == null ? void 0 : I.map((D) => D.range)) || [], R = { values: [] }, O = fe(g.value);
575
+ const w = ((I = r.getCurrentSelections()) == null ? void 0 : I.map((D) => D.range)) || [], R = { values: [] }, O = ve(g.value);
573
576
  w.forEach((D) => {
574
577
  Ae.foreach(D, (ie, _) => {
575
578
  R.values.push({
@@ -588,11 +591,11 @@ let j = class extends te {
588
591
  header: { title: o.t("sheet.numfmt.title") },
589
592
  children: {
590
593
  label: $e,
591
- ...d
594
+ ...h
592
595
  // need passthrough to react props.
593
596
  },
594
597
  onClose: () => {
595
- this._forceUpdate(), n.executeCommand(ce.id);
598
+ this._forceUpdate(), n.executeCommand(oe.id);
596
599
  }
597
600
  }), !0;
598
601
  }
@@ -606,7 +609,7 @@ let j = class extends te {
606
609
  _initCommands() {
607
610
  [
608
611
  A,
609
- ce
612
+ oe
610
613
  ].forEach((t) => {
611
614
  this.disposeWithMe(this._commandService.registerCommand(t));
612
615
  });
@@ -620,7 +623,7 @@ let j = class extends te {
620
623
  _initRealTimeRenderingInterceptor() {
621
624
  const t = new L((n) => {
622
625
  this._commandService.onCommandExecuted((i) => {
623
- i.id === A.id && n.next(!0), i.id === ce.id && n.next(!1);
626
+ i.id === A.id && n.next(!0), i.id === oe.id && n.next(!1);
624
627
  });
625
628
  }), r = rn([
626
629
  t,
@@ -629,7 +632,7 @@ let j = class extends te {
629
632
  )
630
633
  ]);
631
634
  this.disposeWithMe(
632
- me(
635
+ ue(
633
636
  r.pipe(
634
637
  cn(
635
638
  ([n, i]) => new L((s) => {
@@ -643,19 +646,19 @@ let j = class extends te {
643
646
  this._previewPattern = null;
644
647
  })
645
648
  ).subscribe(({ disposableCollection: n, selectionRanges: i }) => {
646
- var o, m;
649
+ var o, l;
647
650
  const s = this._univerInstanceService.getCurrentUnitForType(T.UNIVER_SHEET);
648
651
  this.openPanel(), n.add(
649
652
  this._sheetInterceptorService.intercept(Wt.CELL_CONTENT, {
650
653
  priority: 99,
651
- effect: Te.Value | Te.Style,
654
+ effect: Ee.Value | Ee.Style,
652
655
  handler: (c, a, u) => {
653
656
  var p;
654
- const { row: l, col: v } = a, f = u(c) || {};
657
+ const { row: m, col: d } = a, f = u(c) || {};
655
658
  if (i.find(
656
- (d) => d.startColumn <= v && d.endColumn >= v && d.startRow <= l && d.endRow >= l
659
+ (h) => h.startColumn <= d && h.endColumn >= d && h.startRow <= m && h.endRow >= m
657
660
  )) {
658
- const d = a.worksheet.getCellRaw(l, v), S = d == null ? void 0 : d.v, g = d == null ? void 0 : d.t;
661
+ const h = a.worksheet.getCellRaw(m, d), S = h == null ? void 0 : h.v, g = h == null ? void 0 : h.t;
659
662
  if (S == null || g !== P.NUMBER || this._previewPattern === null)
660
663
  return f;
661
664
  const I = $t(this._previewPattern, S, this._sheetsNumfmtCellContentController.locale);
@@ -677,13 +680,13 @@ let j = class extends te {
677
680
  return f;
678
681
  }
679
682
  })
680
- ), (m = (o = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : o.mainComponent) == null || m.makeDirty();
683
+ ), (l = (o = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : o.mainComponent) == null || l.makeDirty();
681
684
  })
682
685
  )
683
686
  );
684
687
  }
685
688
  _commandExecutedListener() {
686
- const t = [_e.id, Se.id];
689
+ const t = [ge.id, _e.id];
687
690
  this.disposeWithMe(
688
691
  new L((r) => {
689
692
  const n = this._commandService.onCommandExecuted((i) => {
@@ -706,11 +709,11 @@ let j = class extends te {
706
709
  j = Bn([
707
710
  M(0, C(Xe)),
708
711
  M(1, C(vt)),
709
- M(2, he),
710
- M(3, ve),
711
- M(4, C(ge)),
712
+ M(2, de),
713
+ M(3, he),
714
+ M(4, C(pe)),
712
715
  M(5, je),
713
- M(6, pe),
716
+ M(6, fe),
714
717
  M(7, C(qe)),
715
718
  M(8, Jt),
716
719
  M(9, C(E)),
@@ -724,7 +727,7 @@ var Vn = Object.getOwnPropertyDescriptor, Wn = (e, t, r, n) => {
724
727
  const Gn = () => {
725
728
  let e = [];
726
729
  return {
727
- add: (i, s, o, m, c) => e.push({ unitId: i, subUnitId: s, row: o, col: m, value: c }),
730
+ add: (i, s, o, l, c) => e.push({ unitId: i, subUnitId: s, row: o, col: l, value: c }),
728
731
  getEffects: () => e,
729
732
  clean: () => {
730
733
  e = [];
@@ -740,7 +743,7 @@ let J = class extends te {
740
743
  }
741
744
  _initInterceptorEditorStart() {
742
745
  this._editorBridgeService && this.disposeWithMe(
743
- me(
746
+ ue(
744
747
  this._sheetInterceptorService.writeCellInterceptor.intercept(Gt, {
745
748
  handler: (t, r, n) => {
746
749
  const i = r.row, s = r.col, o = this._numfmtService.getValue(
@@ -750,7 +753,7 @@ let J = class extends te {
750
753
  s
751
754
  );
752
755
  if (o)
753
- switch (fe(o.pattern)) {
756
+ switch (ve(o.pattern)) {
754
757
  case "scientific":
755
758
  case "currency":
756
759
  case "grouped":
@@ -779,11 +782,11 @@ let J = class extends te {
779
782
  // eslint-disable-next-line max-lines-per-function
780
783
  _initInterceptorEditorEnd() {
781
784
  this.disposeWithMe(
782
- me(
785
+ ue(
783
786
  this._sheetInterceptorService.writeCellInterceptor.intercept(Kt, {
784
787
  // eslint-disable-next-line complexity
785
788
  handler: (t, r, n) => {
786
- var a, u, l;
789
+ var a, u, m;
787
790
  if (!(t != null && t.v) && !(t != null && t.p))
788
791
  return n(t);
789
792
  this._collectEffectMutation.clean();
@@ -795,20 +798,20 @@ let J = class extends te {
795
798
  ), s = r.worksheet.getCellRaw(r.row, r.col);
796
799
  if (ke(i == null ? void 0 : i.pattern) || t.t === P.FORCE_STRING)
797
800
  return n(t);
798
- const o = (a = t.p) == null ? void 0 : a.body, m = (l = (u = t == null ? void 0 : t.p) == null ? void 0 : u.body) != null && l.dataStream ? t.p.body.dataStream.replace(/\r\n$/, "") : String(t.v), c = gt(m);
801
+ const o = (a = t.p) == null ? void 0 : a.body, l = (m = (u = t == null ? void 0 : t.p) == null ? void 0 : u.body) != null && m.dataStream ? t.p.body.dataStream.replace(/\r\n$/, "") : String(t.v), c = gt(l);
799
802
  if (o)
800
803
  if (Kn(o)) {
801
- const { dataStream: v } = o, f = v.replace(/\r\n$/, ""), p = Number(f);
804
+ const { dataStream: d } = o, f = d.replace(/\r\n$/, ""), p = Number(f);
802
805
  if (Number.isNaN(p) && !c)
803
806
  return n(t);
804
807
  } else
805
808
  return n(t);
806
809
  if (c) {
807
- if (!c.z && !(i != null && i.pattern) && (s == null ? void 0 : s.t) !== P.STRING && (s == null ? void 0 : s.t) !== P.FORCE_STRING && _t(m))
810
+ if (!c.z && !(i != null && i.pattern) && (s == null ? void 0 : s.t) !== P.STRING && (s == null ? void 0 : s.t) !== P.FORCE_STRING && _t(l))
808
811
  return n({
809
812
  ...t,
810
813
  p: void 0,
811
- v: m,
814
+ v: l,
812
815
  t: P.FORCE_STRING
813
816
  });
814
817
  c.z && this._collectEffectMutation.add(
@@ -820,8 +823,8 @@ let J = class extends te {
820
823
  pattern: c.z
821
824
  }
822
825
  );
823
- const v = Number(c.v);
824
- return n({ ...t, p: void 0, v, t: P.NUMBER });
826
+ const d = Number(c.v);
827
+ return n({ ...t, p: void 0, v: d, t: P.NUMBER });
825
828
  }
826
829
  return n(t);
827
830
  }
@@ -843,49 +846,49 @@ let J = class extends te {
843
846
  redos: [],
844
847
  undos: []
845
848
  };
846
- const m = t._collectEffectMutation.getEffects();
847
- if (t._collectEffectMutation.clean(), !m.length)
849
+ const l = t._collectEffectMutation.getEffects();
850
+ if (t._collectEffectMutation.clean(), !l.length)
848
851
  return {
849
852
  redos: [],
850
853
  undos: []
851
854
  };
852
- const c = m.filter((v) => {
855
+ const c = l.filter((d) => {
853
856
  var f;
854
- return !!((f = v.value) != null && f.pattern);
855
- }).map((v) => ({
856
- row: v.row,
857
- col: v.col,
858
- pattern: v.value.pattern
859
- })), a = m.filter((v) => {
857
+ return !!((f = d.value) != null && f.pattern);
858
+ }).map((d) => ({
859
+ row: d.row,
860
+ col: d.col,
861
+ pattern: d.value.pattern
862
+ })), a = l.filter((d) => {
860
863
  var f;
861
- return !((f = v.value) != null && f.pattern);
862
- }).map((v) => ({
863
- startRow: v.row,
864
- endColumn: v.col,
865
- startColumn: v.col,
866
- endRow: v.row
867
- })), u = [], l = [];
864
+ return !((f = d.value) != null && f.pattern);
865
+ }).map((d) => ({
866
+ startRow: d.row,
867
+ endColumn: d.col,
868
+ startColumn: d.col,
869
+ endRow: d.row
870
+ })), u = [], m = [];
868
871
  if (c.length) {
869
- const v = {
870
- id: Se.id,
872
+ const d = {
873
+ id: _e.id,
871
874
  params: Yt(s, o, c)
872
875
  };
873
- u.push(v), l.push(...zt(t._injector, v.params));
876
+ u.push(d), m.push(...zt(t._injector, d.params));
874
877
  }
875
878
  if (a.length) {
876
- const v = {
877
- id: _e.id,
879
+ const d = {
880
+ id: ge.id,
878
881
  params: {
879
882
  unitId: s,
880
883
  subUnitId: o,
881
884
  ranges: a
882
885
  }
883
886
  };
884
- u.push(v), l.push(...Xt(t._injector, v.params));
887
+ u.push(d), m.push(...Xt(t._injector, d.params));
885
888
  }
886
889
  return {
887
890
  redos: u,
888
- undos: l.reverse()
891
+ undos: m.reverse()
889
892
  };
890
893
  }
891
894
  }
@@ -903,8 +906,8 @@ let J = class extends te {
903
906
  };
904
907
  J = Wn([
905
908
  F(0, C(Xe)),
906
- F(1, C(pe)),
907
- F(2, C(he)),
909
+ F(1, C(fe)),
910
+ F(2, C(de)),
908
911
  F(3, C(He)),
909
912
  F(4, pt(jt))
910
913
  ], J);
@@ -976,8 +979,8 @@ const it = (e) => [
976
979
  ], Zn = (e) => ({
977
980
  icon: new L((t) => {
978
981
  const r = e.get(E);
979
- return t.next(we(r.getCurrentLocale()).icon), r.localeChanged$.subscribe(() => {
980
- t.next(we(r.getCurrentLocale()).icon);
982
+ return t.next(Me(r.getCurrentLocale()).icon), r.localeChanged$.subscribe(() => {
983
+ t.next(Me(r.getCurrentLocale()).icon);
981
984
  });
982
985
  }),
983
986
  id: ze.id,
@@ -1011,20 +1014,20 @@ const it = (e) => [
1011
1014
  hidden$: Y(e, T.UNIVER_SHEET),
1012
1015
  disabled$: V(e, { workbookTypes: [Z], worksheetTypes: [K, G], rangeTypes: [W] })
1013
1016
  }), qn = (e) => {
1014
- const t = e.get(he), r = e.get(ve), n = e.get(E), i = e.get(ge), s = [_e.id, Se.id], o = Bt(
1017
+ const t = e.get(de), r = e.get(he), n = e.get(E), i = e.get(pe), s = [ge.id, _e.id], o = Bt(
1015
1018
  t,
1016
1019
  "",
1017
- ({ workbook: m, worksheet: c }) => new L(
1020
+ ({ workbook: l, worksheet: c }) => new L(
1018
1021
  (a) => Je(
1019
1022
  i.selectionMoveEnd$,
1020
1023
  St(r.onCommandExecuted.bind(r)).pipe(
1021
1024
  sn(([u]) => s.includes(u.id))
1022
1025
  )
1023
1026
  ).subscribe(() => {
1024
- var l, v;
1027
+ var m, d;
1025
1028
  const u = i.getCurrentSelections();
1026
1029
  if (u && u[0]) {
1027
- const f = u[0].range, p = f.startRow, d = f.startColumn, S = (v = m.getStyles().get((l = c.getCell(p, d)) == null ? void 0 : l.s)) == null ? void 0 : v.n, g = S == null ? void 0 : S.pattern, I = Ot(n.getCurrentLocale());
1030
+ const f = u[0].range, p = f.startRow, h = f.startColumn, S = (d = l.getStyles().get((m = c.getCell(p, h)) == null ? void 0 : m.s)) == null ? void 0 : d.n, g = S == null ? void 0 : S.pattern, I = Ot(n.getCurrentLocale());
1028
1031
  let w = n.t("sheet.numfmt.general");
1029
1032
  if (Ct(g)) {
1030
1033
  a.next(w);
@@ -1062,20 +1065,20 @@ const it = (e) => [
1062
1065
  };
1063
1066
  }, st = "sheet.numfmt.moreNumfmtType", ot = "sheet.numfmt.moreNumfmtType.options", Jn = (e) => {
1064
1067
  const { value: t } = e, r = b(E), n = t != null ? t : r.t("sheet.numfmt.general");
1065
- return /* @__PURE__ */ h("span", { className: "univer-text-sm", children: n });
1068
+ return /* @__PURE__ */ v("span", { className: "univer-text-sm", children: n });
1066
1069
  }, Qn = () => {
1067
- const e = b(ve), t = b(E), r = b(Qt), n = b(We), i = b(ge), s = (a) => {
1070
+ const e = b(he), t = b(E), r = b(Qt), n = b(We), i = b(pe), s = (a) => {
1068
1071
  const u = i.getCurrentLastSelection();
1069
1072
  if (!u)
1070
1073
  return;
1071
- const l = u.range, v = [];
1072
- Ae.foreach(l, (f, p) => {
1073
- a ? v.push({ row: f, col: p, pattern: a, type: fe(a) }) : v.push({ row: f, col: p });
1074
- }), e.executeCommand(Ge.id, { values: v }), r.focus();
1074
+ const m = u.range, d = [];
1075
+ Ae.foreach(m, (f, p) => {
1076
+ a ? d.push({ row: f, col: p, pattern: a, type: ve(a) }) : d.push({ row: f, col: p });
1077
+ }), e.executeCommand(Ge.id, { values: d }), r.focus();
1075
1078
  }, o = x(() => {
1076
1079
  const a = Ut.get(t.getCurrentLocale());
1077
1080
  return it(a);
1078
- }, [t]), m = (a) => {
1081
+ }, [t]), l = (a) => {
1079
1082
  if (a === 0)
1080
1083
  s(null);
1081
1084
  else if (a === o.length - 1)
@@ -1085,16 +1088,16 @@ const it = (e) => [
1085
1088
  u.pattern && s(u.pattern);
1086
1089
  }
1087
1090
  }, c = 1220;
1088
- return /* @__PURE__ */ h("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: o.map((a, u) => a === "|" ? /* @__PURE__ */ h(pn, {}, u) : /* @__PURE__ */ y(
1091
+ return /* @__PURE__ */ v("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: o.map((a, u) => a === "|" ? /* @__PURE__ */ v(pn, {}, u) : /* @__PURE__ */ y(
1089
1092
  "div",
1090
1093
  {
1091
1094
  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",
1092
1095
  onClick: () => {
1093
- m(u);
1096
+ l(u);
1094
1097
  },
1095
1098
  children: [
1096
- /* @__PURE__ */ h("span", { children: t.t(a.label) }),
1097
- /* @__PURE__ */ h("span", { className: "univer-text-xs univer-text-gray-500", children: a.pattern ? kt(a.pattern || "", c, n.locale).result.trim() : "" })
1099
+ /* @__PURE__ */ v("span", { children: t.t(a.label) }),
1100
+ /* @__PURE__ */ v("span", { className: "univer-text-xs univer-text-gray-500", children: a.pattern ? kt(a.pattern || "", c, n.locale).result.trim() : "" })
1098
1101
  ]
1099
1102
  },
1100
1103
  u
@@ -1151,14 +1154,14 @@ var rr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, sr = (e, t
1151
1154
  for (var i = n > 1 ? void 0 : n ? ir(t, r) : t, s = e.length - 1, o; s >= 0; s--)
1152
1155
  (o = e[s]) && (i = o(i) || i);
1153
1156
  return i;
1154
- }, ue = (e, t) => (r, n) => t(r, n, e), ct = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
1157
+ }, le = (e, t) => (r, n) => t(r, n, e), ct = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
1155
1158
  const cr = "SHEET_NUMFMT_UI_PLUGIN";
1156
1159
  let ee = class extends It {
1157
- constructor(e = xe, t, r, n) {
1160
+ constructor(e = Pe, t, r, n) {
1158
1161
  super(), this._config = e, this._injector = t, this._configService = r, this._renderManagerService = n;
1159
1162
  const { menu: i, ...s } = Nt(
1160
1163
  {},
1161
- xe,
1164
+ Pe,
1162
1165
  this._config
1163
1166
  );
1164
1167
  i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig("sheets-numfmt-ui.config", s);
@@ -1180,7 +1183,7 @@ let ee = class extends It {
1180
1183
  }
1181
1184
  _registerRenderModules() {
1182
1185
  [
1183
- [de]
1186
+ [me]
1184
1187
  ].forEach((t) => {
1185
1188
  this.disposeWithMe(this._renderManagerService.registerRenderModule(T.UNIVER_SHEET, t));
1186
1189
  });
@@ -1190,9 +1193,9 @@ ct(ee, "pluginName", cr);
1190
1193
  ct(ee, "type", T.UNIVER_SHEET);
1191
1194
  ee = or([
1192
1195
  bt(Vt, Dt),
1193
- ue(1, C(He)),
1194
- ue(2, Ue),
1195
- ue(3, je)
1196
+ le(1, C(He)),
1197
+ le(2, Ue),
1198
+ le(3, je)
1196
1199
  ], ee);
1197
1200
  export {
1198
1201
  ee as UniverSheetsNumfmtUIPlugin