@univerjs/sheets-numfmt-ui 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +132 -132
- package/lib/index.js +132 -132
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var dt = Object.defineProperty;
|
|
2
2
|
var ht = (e, t, r) => t in e ? dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var q = (e, t, r) => ht(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { Inject as C, LocaleService as M, IConfigService as Fe, Disposable as ie, isTextFormat as Ae,
|
|
4
|
+
import { Inject as C, LocaleService as M, IConfigService as Fe, Disposable as ie, isTextFormat as Ae, Tools as ft, isRealNum as vt, CommandType as Le, ILocalStorageService as He, isPatternEqualWithoutDecimal as se, numfmt as J, ThemeService as pt, IUniverInstanceService as ge, ICommandService as _e, UniverInstanceType as T, CellValueType as U, toDisposable as ve, DisposableCollection as gt, InterceptorEffectEnum as Pe, Range as je, Injector as Be, 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
5
|
import { IRenderManagerService as Ve } from "@univerjs/engine-render";
|
|
6
|
-
import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as
|
|
7
|
-
import { HoverManagerService as
|
|
8
|
-
import { INumfmtService as ye, SheetInterceptorService as Je, SheetsSelectionsService as Ce, INTERCEPTOR_POINT as
|
|
9
|
-
import { IZenZoneService as
|
|
10
|
-
import { debounceTime as
|
|
11
|
-
import { map as
|
|
6
|
+
import { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY as wt, currencySymbols as Re, getDecimalFromPattern as ee, getCurrencyType as V, setPatternDecimal as R, getCurrencyFormatOptions as le, CURRENCYFORMAT as xt, DATEFMTLISG as Pt, NUMBERFORMAT as Rt, getDateFormatOptions as We, getNumberFormatOptions as Ge, isPatternHasDecimal as Ot, SheetsNumfmtCellContentController as Ke, getPatternPreviewIgnoreGeneral as Ut, getPatternType as Se, SetNumfmtCommand as Ze, SetPercentCommand as Ye, SubtractDecimalCommand as ze, AddDecimalCommand as Xe, SetCurrencyCommand as qe, MenuCurrencyService as kt, countryCurrencyMap as D, getPatternPreview as Dt, UniverSheetsNumfmtPlugin as $t } from "@univerjs/sheets-numfmt";
|
|
7
|
+
import { HoverManagerService as Ft, CellAlertManagerService as At, CellAlertType as Lt, SheetSkeletonManagerService as Ht, IEditorBridgeService as jt, deriveStateFromActiveSheet$ as Bt, getCurrentRangeDisable$ as W, UniverSheetsUIPlugin as Vt } from "@univerjs/sheets-ui";
|
|
8
|
+
import { INumfmtService as ye, SheetInterceptorService as Je, SheetsSelectionsService as Ce, INTERCEPTOR_POINT as Wt, RemoveNumfmtMutation as be, SetNumfmtMutation as Ie, BEFORE_CELL_EDIT as Gt, AFTER_CELL_EDIT as Kt, SetRangeValuesCommand as Zt, transformCellsToRange as Yt, factorySetNumfmtUndoMutation as zt, factoryRemoveNumfmtUndoMutation as Xt, RangeProtectionPermissionEditPoint as G, WorksheetSetCellStylePermission as K, WorksheetEditPermission as Z, WorkbookEditablePermission as Y } from "@univerjs/sheets";
|
|
9
|
+
import { IZenZoneService as qt, useDependency as I, ComponentManager as Qe, ISidebarService as Jt, getMenuHiddenObservable as z, MenuItemType as X, ILayoutService as Qt, RibbonDataGroup as en, IMenuManagerService as tn } from "@univerjs/ui";
|
|
10
|
+
import { debounceTime as nn, merge as et, Observable as L, combineLatest as rn, filter as sn } from "rxjs";
|
|
11
|
+
import { map as on, switchMap as cn, tap as an, debounceTime as ln } from "rxjs/operators";
|
|
12
12
|
import { jsxs as b, jsx as d } from "react/jsx-runtime";
|
|
13
|
-
import { createContext as
|
|
14
|
-
import { InputNumber as Te, Select as Me, SelectList as we, Input as
|
|
13
|
+
import { createContext as un, useState as N, useEffect as oe, useRef as Ne, useContext as tt, useMemo as O, forwardRef as nt, createElement as Ee, useCallback as mn } from "react";
|
|
14
|
+
import { InputNumber as Te, Select as Me, SelectList as we, Input as dn, clsx as rt, borderClassName as hn, Button as Oe, scrollbarClassName as fn, Separator as vn } from "@univerjs/design";
|
|
15
15
|
const Ue = {};
|
|
16
|
-
var
|
|
17
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
16
|
+
var pn = Object.getOwnPropertyDescriptor, gn = (e, t, r, n) => {
|
|
17
|
+
for (var i = n > 1 ? void 0 : n ? pn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
18
18
|
(o = e[s]) && (i = o(i) || i);
|
|
19
19
|
return i;
|
|
20
20
|
}, $ = (e, t) => (r, n) => t(r, n, e);
|
|
@@ -27,7 +27,7 @@ let pe = class extends ie {
|
|
|
27
27
|
this._initCellAlertPopup(), this._initZenService();
|
|
28
28
|
}
|
|
29
29
|
_initCellAlertPopup() {
|
|
30
|
-
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(
|
|
30
|
+
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(nn(100)).subscribe((e) => {
|
|
31
31
|
var t, r;
|
|
32
32
|
if (e) {
|
|
33
33
|
const n = e.location, i = this._context.unit, s = i.getActiveSheet();
|
|
@@ -43,14 +43,14 @@ let pe = class extends ie {
|
|
|
43
43
|
this._hideAlert();
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
if (Ae(c.pattern) && (u
|
|
47
|
-
if ((t = this._configService.getConfig(
|
|
46
|
+
if (Ae(c.pattern) && ft.isDefine(u == null ? void 0 : u.v) && vt(u.v)) {
|
|
47
|
+
if ((t = this._configService.getConfig(wt)) != null && t.disableTextFormatAlert)
|
|
48
48
|
return;
|
|
49
49
|
const h = this._cellAlertManagerService.currentAlert.get(ue), l = (r = h == null ? void 0 : h.alert) == null ? void 0 : r.location;
|
|
50
50
|
if (l && l.row === n.row && l.col === n.col && l.subUnitId === n.subUnitId && l.unitId === n.unitId)
|
|
51
51
|
return;
|
|
52
52
|
this._cellAlertManagerService.showAlert({
|
|
53
|
-
type:
|
|
53
|
+
type: Lt.ERROR,
|
|
54
54
|
title: this._localeService.t("info.error"),
|
|
55
55
|
message: this._localeService.t("info.forceStringInfo"),
|
|
56
56
|
location: n,
|
|
@@ -73,11 +73,11 @@ let pe = class extends ie {
|
|
|
73
73
|
this._cellAlertManagerService.removeAlert(ue);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
pe =
|
|
77
|
-
$(1, C(
|
|
78
|
-
$(2, C(
|
|
76
|
+
pe = gn([
|
|
77
|
+
$(1, C(Ft)),
|
|
78
|
+
$(2, C(At)),
|
|
79
79
|
$(3, C(M)),
|
|
80
|
-
$(4,
|
|
80
|
+
$(4, qt),
|
|
81
81
|
$(5, C(ye)),
|
|
82
82
|
$(6, Fe)
|
|
83
83
|
], pe);
|
|
@@ -93,12 +93,12 @@ const me = {
|
|
|
93
93
|
type: Le.OPERATION,
|
|
94
94
|
handler: (e) => (e.get(B).openPanel(), !0)
|
|
95
95
|
};
|
|
96
|
-
var
|
|
97
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
96
|
+
var _n = Object.getOwnPropertyDescriptor, Sn = (e, t, r, n) => {
|
|
97
|
+
for (var i = n > 1 ? void 0 : n ? _n(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
98
98
|
(o = e[s]) && (i = o(i) || i);
|
|
99
99
|
return i;
|
|
100
|
-
},
|
|
101
|
-
const xe =
|
|
100
|
+
}, yn = (e, t) => (r, n) => t(r, n, e);
|
|
101
|
+
const xe = un([]);
|
|
102
102
|
let j = class {
|
|
103
103
|
constructor(e) {
|
|
104
104
|
this._localStorageService = e;
|
|
@@ -143,10 +143,10 @@ let j = class {
|
|
|
143
143
|
this._localStorageService.removeItem(e);
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
j =
|
|
147
|
-
|
|
146
|
+
j = Sn([
|
|
147
|
+
yn(0, C(He))
|
|
148
148
|
], j);
|
|
149
|
-
const ke = "numfmtCurrency",
|
|
149
|
+
const ke = "numfmtCurrency", Cn = (e) => {
|
|
150
150
|
const t = I(j), [r, n] = N(Re);
|
|
151
151
|
return oe(() => {
|
|
152
152
|
t.addHabit("numfmtCurrency", []).then(() => {
|
|
@@ -157,7 +157,7 @@ const ke = "numfmtCurrency", yn = (e) => {
|
|
|
157
157
|
}, []), { userHabitCurrency: r, mark: (s) => {
|
|
158
158
|
t.markHabit(ke, s);
|
|
159
159
|
} };
|
|
160
|
-
},
|
|
160
|
+
}, bn = () => {
|
|
161
161
|
const e = Ne([]), [t, r] = N({});
|
|
162
162
|
return oe(() => {
|
|
163
163
|
e.current.forEach((i) => {
|
|
@@ -166,7 +166,7 @@ const ke = "numfmtCurrency", yn = (e) => {
|
|
|
166
166
|
}, [t]), (i) => {
|
|
167
167
|
e.current.push(i), r({});
|
|
168
168
|
};
|
|
169
|
-
},
|
|
169
|
+
}, In = (e) => !!V(e) && e.startsWith("_("), Nn = (e) => {
|
|
170
170
|
const { defaultPattern: t, action: r, onChange: n } = e, [i, s] = N(() => ee(t || "", 2)), o = tt(xe), [a, c] = N(() => V(t) || o[0]), u = O(() => o.map((p) => ({ label: p, value: p })), []), l = I(M).t;
|
|
171
171
|
r.current = () => R(`_("${a}"* #,##0${i > 0 ? ".0" : ""}_)`, i);
|
|
172
172
|
const f = (p) => {
|
|
@@ -205,7 +205,7 @@ const ke = "numfmtCurrency", yn = (e) => {
|
|
|
205
205
|
] }),
|
|
206
206
|
/* @__PURE__ */ d("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: l("sheet.numfmt.accountingDes") })
|
|
207
207
|
] });
|
|
208
|
-
},
|
|
208
|
+
}, En = (e) => !!V(e) && !e.startsWith("_("), Tn = (e) => {
|
|
209
209
|
const r = I(M).t, n = tt(xe), [i, s] = N(() => V(e.defaultPattern) || n[0]), [o, a] = N(() => ee(e.defaultPattern || "", 2)), [c, u] = N(() => {
|
|
210
210
|
var g;
|
|
211
211
|
const m = le(i);
|
|
@@ -262,7 +262,7 @@ var E = function() {
|
|
|
262
262
|
}
|
|
263
263
|
return e;
|
|
264
264
|
}, E.apply(this, arguments);
|
|
265
|
-
},
|
|
265
|
+
}, Mn = function(e, t) {
|
|
266
266
|
var r = {};
|
|
267
267
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
268
268
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -270,15 +270,15 @@ var E = function() {
|
|
|
270
270
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
|
271
271
|
return r;
|
|
272
272
|
}, it = nt(function(e, t) {
|
|
273
|
-
var r = e.icon, n = e.id, i = e.className, s = e.extend, o =
|
|
273
|
+
var r = e.icon, n = e.id, i = e.className, s = e.extend, o = Mn(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), c = Ne("_".concat(Pn()));
|
|
274
274
|
return st(r, "".concat(n), { defIds: r.defIds, idSuffix: c.current }, E({ ref: t, className: a }, o), s);
|
|
275
275
|
});
|
|
276
276
|
function st(e, t, r, n, i) {
|
|
277
|
-
return Ee(e.tag, E(E({ key: t },
|
|
277
|
+
return Ee(e.tag, E(E({ key: t }, wn(e, r, i)), n), (xn(e, r).children || []).map(function(s, o) {
|
|
278
278
|
return st(s, "".concat(t, "-").concat(e.tag, "-").concat(o), r, void 0, i);
|
|
279
279
|
}));
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function wn(e, t, r) {
|
|
282
282
|
var n = E({}, e.attrs);
|
|
283
283
|
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
284
|
var o = s[0], a = s[1];
|
|
@@ -290,26 +290,26 @@ function Mn(e, t, r) {
|
|
|
290
290
|
typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
291
291
|
})), n;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function xn(e, t) {
|
|
294
294
|
var r, n = t.defIds;
|
|
295
295
|
return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? E(E({}, e), { children: e.children.map(function(i) {
|
|
296
296
|
return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? E(E({}, i), { attrs: E(E({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
|
|
297
297
|
}) }) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Pn() {
|
|
300
300
|
return Math.random().toString(36).substring(2, 8);
|
|
301
301
|
}
|
|
302
302
|
it.displayName = "UniverIcon";
|
|
303
|
-
var
|
|
303
|
+
var Rn = { 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" } }] }, ot = nt(function(e, t) {
|
|
304
304
|
return Ee(it, Object.assign({}, e, {
|
|
305
305
|
id: "check-mark-icon",
|
|
306
306
|
ref: t,
|
|
307
|
-
icon:
|
|
307
|
+
icon: Rn
|
|
308
308
|
}));
|
|
309
309
|
});
|
|
310
310
|
ot.displayName = "CheckMarkIcon";
|
|
311
311
|
const de = "customFormat", he = "numfmt_custom_pattern";
|
|
312
|
-
function
|
|
312
|
+
function On(e) {
|
|
313
313
|
const { defaultPattern: t, action: r, onChange: n } = e, i = I(j), s = I(He), o = I(M), [a, c] = N(t);
|
|
314
314
|
r.current = () => (i.markHabit(de, a), s.getItem(he).then((v = []) => {
|
|
315
315
|
const p = [.../* @__PURE__ */ new Set([a, ...v || []])].splice(0, 10).filter((m) => !!m);
|
|
@@ -319,9 +319,9 @@ function Rn(e) {
|
|
|
319
319
|
oe(() => {
|
|
320
320
|
s.getItem(he).then((v) => {
|
|
321
321
|
const p = [
|
|
322
|
-
...
|
|
323
|
-
...
|
|
324
|
-
...
|
|
322
|
+
...xt.map((m) => m.suffix("$")),
|
|
323
|
+
...Pt.map((m) => m.suffix),
|
|
324
|
+
...Rt.map((m) => m.suffix)
|
|
325
325
|
];
|
|
326
326
|
p.push(...v || []), i.addHabit(de, []).finally(() => {
|
|
327
327
|
i.getHabit(de, p).then((m) => {
|
|
@@ -338,7 +338,7 @@ function Rn(e) {
|
|
|
338
338
|
return /* @__PURE__ */ b("div", { children: [
|
|
339
339
|
/* @__PURE__ */ d("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-400", children: o.t("sheet.numfmt.customFormat") }),
|
|
340
340
|
/* @__PURE__ */ d(
|
|
341
|
-
|
|
341
|
+
dn,
|
|
342
342
|
{
|
|
343
343
|
placeholder: o.t("sheet.numfmt.customFormat"),
|
|
344
344
|
onBlur: f,
|
|
@@ -350,7 +350,7 @@ function Rn(e) {
|
|
|
350
350
|
/* @__PURE__ */ d(
|
|
351
351
|
"div",
|
|
352
352
|
{
|
|
353
|
-
className: rt("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2",
|
|
353
|
+
className: rt("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2", hn),
|
|
354
354
|
children: u.map((v) => /* @__PURE__ */ b(
|
|
355
355
|
"div",
|
|
356
356
|
{
|
|
@@ -374,11 +374,11 @@ function Rn(e) {
|
|
|
374
374
|
)
|
|
375
375
|
] });
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const Un = (e) => {
|
|
378
378
|
const t = J.getFormatInfo(e);
|
|
379
379
|
return We().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
|
|
380
380
|
};
|
|
381
|
-
function
|
|
381
|
+
function kn(e) {
|
|
382
382
|
const { onChange: t, defaultPattern: r } = e, n = O(We, []), i = I(M), [s, o] = N(() => {
|
|
383
383
|
if (r) {
|
|
384
384
|
const c = n.find((u) => u.value === r);
|
|
@@ -403,7 +403,7 @@ function Un(e) {
|
|
|
403
403
|
)
|
|
404
404
|
] });
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const Dn = (e) => !e, $n = (e) => {
|
|
407
407
|
const r = I(M).t;
|
|
408
408
|
return e.action.current = () => "", /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(
|
|
409
409
|
"div",
|
|
@@ -412,12 +412,12 @@ const kn = (e) => !e, Dn = (e) => {
|
|
|
412
412
|
children: r("sheet.numfmt.generalDes")
|
|
413
413
|
}
|
|
414
414
|
) });
|
|
415
|
-
},
|
|
416
|
-
function
|
|
415
|
+
}, Fn = (e) => Ge().some((t) => se(t.value, e));
|
|
416
|
+
function An(e) {
|
|
417
417
|
const t = I(M), r = O(Ge, []), [n, i] = N(() => ee(e.defaultPattern || "", 0)), [s, o] = N(() => {
|
|
418
418
|
const l = r.find((f) => se(f.value, e.defaultPattern || ""));
|
|
419
419
|
return (l == null ? void 0 : l.value) || r[0].value;
|
|
420
|
-
}), a = O(() => R(s, Number(n || 0)), [s, n]), c = O(() => !
|
|
420
|
+
}), a = O(() => R(s, Number(n || 0)), [s, n]), c = O(() => !Ot(s), [s]), u = (l) => {
|
|
421
421
|
i(l || 0), e.onChange(R(s, Number(l || 0)));
|
|
422
422
|
}, h = (l) => {
|
|
423
423
|
l !== void 0 && (i(ee(l, 0)), o(l), e.onChange(l));
|
|
@@ -448,30 +448,30 @@ function Fn(e) {
|
|
|
448
448
|
)
|
|
449
449
|
] });
|
|
450
450
|
}
|
|
451
|
-
const
|
|
452
|
-
const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = I(M), o = Ne(() => ""), a = s.t, c =
|
|
451
|
+
const Ln = (e) => {
|
|
452
|
+
const { defaultValue: t, defaultPattern: r, row: n, col: i } = e.value, s = I(M), o = Ne(() => ""), a = s.t, c = bn(), u = O(
|
|
453
453
|
() => [
|
|
454
|
-
{ label: "sheet.numfmt.general", component:
|
|
455
|
-
{ label: "sheet.numfmt.accounting", component:
|
|
456
|
-
{ label: "sheet.numfmt.currency", component:
|
|
457
|
-
{ label: "sheet.numfmt.date", component:
|
|
458
|
-
{ label: "sheet.numfmt.thousandthPercentile", component:
|
|
459
|
-
{ label: "sheet.numfmt.customFormat", component:
|
|
454
|
+
{ label: "sheet.numfmt.general", component: $n },
|
|
455
|
+
{ label: "sheet.numfmt.accounting", component: Nn },
|
|
456
|
+
{ label: "sheet.numfmt.currency", component: Tn },
|
|
457
|
+
{ label: "sheet.numfmt.date", component: kn },
|
|
458
|
+
{ label: "sheet.numfmt.thousandthPercentile", component: An },
|
|
459
|
+
{ label: "sheet.numfmt.customFormat", component: On }
|
|
460
460
|
].map((_) => ({ ..._, label: a(_.label) })),
|
|
461
461
|
[]
|
|
462
|
-
), [h, l] = N(g), [f, v] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: m } =
|
|
462
|
+
), [h, l] = N(g), [f, v] = N(() => `${n}_${i}`), { mark: p, userHabitCurrency: m } = Cn(() => v(`${n}_${i}_userCurrency'`)), S = O(() => {
|
|
463
463
|
var _;
|
|
464
464
|
return (_ = u.find((k) => k.label === h)) == null ? void 0 : _.component;
|
|
465
465
|
}, [h]);
|
|
466
466
|
function g() {
|
|
467
|
-
return [
|
|
467
|
+
return [Dn, In, En, Un, Fn].reduce((k, ut, mt) => k || (ut(r) ? u[mt].label : ""), "") || u[0].label;
|
|
468
468
|
}
|
|
469
469
|
const y = u.map((_) => ({
|
|
470
470
|
label: _.label,
|
|
471
471
|
value: _.label
|
|
472
472
|
})), x = (_) => {
|
|
473
473
|
l(_), c(() => e.onChange({ type: "change", value: o.current() || "" }));
|
|
474
|
-
}, P =
|
|
474
|
+
}, P = mn((_) => {
|
|
475
475
|
e.onChange({ type: "change", value: _ });
|
|
476
476
|
}, []), ce = () => {
|
|
477
477
|
const _ = o.current() || "", k = V(_);
|
|
@@ -489,7 +489,7 @@ const An = (e) => {
|
|
|
489
489
|
}, [n, i]), /* @__PURE__ */ b(
|
|
490
490
|
"div",
|
|
491
491
|
{
|
|
492
|
-
className: rt("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5",
|
|
492
|
+
className: rt("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5", fn),
|
|
493
493
|
children: [
|
|
494
494
|
/* @__PURE__ */ b("div", { children: [
|
|
495
495
|
/* @__PURE__ */ d("div", { className: "univer-mt-3.5 univer-text-sm univer-text-gray-400", children: a("sheet.numfmt.numfmtType") }),
|
|
@@ -504,8 +504,8 @@ const An = (e) => {
|
|
|
504
504
|
}
|
|
505
505
|
);
|
|
506
506
|
};
|
|
507
|
-
var
|
|
508
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
507
|
+
var Hn = Object.getOwnPropertyDescriptor, jn = (e, t, r, n) => {
|
|
508
|
+
for (var i = n > 1 ? void 0 : n ? Hn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
509
509
|
(o = e[s]) && (i = o(i) || i);
|
|
510
510
|
return i;
|
|
511
511
|
}, w = (e, t) => (r, n) => t(r, n, e);
|
|
@@ -582,7 +582,7 @@ let B = class extends ie {
|
|
|
582
582
|
const r = this._renderManagerService.getRenderById(
|
|
583
583
|
t != null ? t : this._univerInstanceService.getCurrentUnitForType(T.UNIVER_SHEET).getUnitId()
|
|
584
584
|
);
|
|
585
|
-
r == null || r.with(
|
|
585
|
+
r == null || r.with(Ht).reCalculate(), (n = r == null ? void 0 : r.mainComponent) == null || n.makeDirty();
|
|
586
586
|
}
|
|
587
587
|
_initCommands() {
|
|
588
588
|
[
|
|
@@ -594,7 +594,7 @@ let B = class extends ie {
|
|
|
594
594
|
}
|
|
595
595
|
_initPanel() {
|
|
596
596
|
this.disposeWithMe(
|
|
597
|
-
this._componentManager.register(De,
|
|
597
|
+
this._componentManager.register(De, Ln)
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
600
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -603,31 +603,31 @@ let B = class extends ie {
|
|
|
603
603
|
this._commandService.onCommandExecuted((i) => {
|
|
604
604
|
i.id === H.id && n.next(!0), i.id === me.id && n.next(!1);
|
|
605
605
|
});
|
|
606
|
-
}), r =
|
|
606
|
+
}), r = rn([
|
|
607
607
|
t,
|
|
608
608
|
this._selectionManagerService.selectionMoveEnd$.pipe(
|
|
609
|
-
|
|
609
|
+
on((n) => n ? n.map((i) => i.range) : [])
|
|
610
610
|
)
|
|
611
611
|
]);
|
|
612
612
|
this.disposeWithMe(
|
|
613
613
|
ve(
|
|
614
614
|
r.pipe(
|
|
615
|
-
|
|
615
|
+
cn(
|
|
616
616
|
([n, i]) => new L((s) => {
|
|
617
|
-
const o = new
|
|
617
|
+
const o = new gt();
|
|
618
618
|
return n && i.length && s.next({ selectionRanges: i, disposableCollection: o }), () => {
|
|
619
619
|
o.dispose();
|
|
620
620
|
};
|
|
621
621
|
})
|
|
622
622
|
),
|
|
623
|
-
|
|
623
|
+
an(() => {
|
|
624
624
|
this._previewPattern = null;
|
|
625
625
|
})
|
|
626
626
|
).subscribe(({ disposableCollection: n, selectionRanges: i }) => {
|
|
627
627
|
var o, a;
|
|
628
628
|
const s = this._univerInstanceService.getCurrentUnitForType(T.UNIVER_SHEET);
|
|
629
629
|
this.openPanel(), n.add(
|
|
630
|
-
this._sheetInterceptorService.intercept(
|
|
630
|
+
this._sheetInterceptorService.intercept(Wt.CELL_CONTENT, {
|
|
631
631
|
priority: 99,
|
|
632
632
|
effect: Pe.Value | Pe.Style,
|
|
633
633
|
handler: (c, u, h) => {
|
|
@@ -639,7 +639,7 @@ let B = class extends ie {
|
|
|
639
639
|
const m = u.worksheet.getCellRaw(l, f), S = m == null ? void 0 : m.v, g = m == null ? void 0 : m.t;
|
|
640
640
|
if (S == null || g !== U.NUMBER || this._previewPattern === null)
|
|
641
641
|
return v;
|
|
642
|
-
const y =
|
|
642
|
+
const y = Ut(this._previewPattern, S, this._sheetsNumfmtCellContentController.locale);
|
|
643
643
|
if (y.color) {
|
|
644
644
|
const x = (p = this._themeService.getColorFromTheme(`${y.color}.500`)) != null ? p : y.color;
|
|
645
645
|
return {
|
|
@@ -674,7 +674,7 @@ let B = class extends ie {
|
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
676
|
return () => n.dispose();
|
|
677
|
-
}).pipe(
|
|
677
|
+
}).pipe(ln(16)).subscribe((r) => this._forceUpdate(r))
|
|
678
678
|
);
|
|
679
679
|
}
|
|
680
680
|
_initCloseListener() {
|
|
@@ -684,25 +684,25 @@ let B = class extends ie {
|
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
686
|
};
|
|
687
|
-
B =
|
|
687
|
+
B = jn([
|
|
688
688
|
w(0, C(Je)),
|
|
689
|
-
w(1, C(
|
|
689
|
+
w(1, C(pt)),
|
|
690
690
|
w(2, ge),
|
|
691
691
|
w(3, _e),
|
|
692
692
|
w(4, C(Ce)),
|
|
693
693
|
w(5, Ve),
|
|
694
694
|
w(6, ye),
|
|
695
695
|
w(7, C(Qe)),
|
|
696
|
-
w(8,
|
|
696
|
+
w(8, Jt),
|
|
697
697
|
w(9, C(M)),
|
|
698
698
|
w(10, C(Ke))
|
|
699
699
|
], B);
|
|
700
|
-
var
|
|
701
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
700
|
+
var Bn = Object.getOwnPropertyDescriptor, Vn = (e, t, r, n) => {
|
|
701
|
+
for (var i = n > 1 ? void 0 : n ? Bn(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
702
702
|
(o = e[s]) && (i = o(i) || i);
|
|
703
703
|
return i;
|
|
704
704
|
}, A = (e, t) => (r, n) => t(r, n, e);
|
|
705
|
-
const
|
|
705
|
+
const Wn = () => {
|
|
706
706
|
let e = [];
|
|
707
707
|
return {
|
|
708
708
|
add: (i, s, o, a, c) => e.push({ unitId: i, subUnitId: s, row: o, col: a, value: c }),
|
|
@@ -716,13 +716,13 @@ let te = class extends ie {
|
|
|
716
716
|
constructor(t, r, n, i, s) {
|
|
717
717
|
super();
|
|
718
718
|
// collect effect mutations when edit end and push this to commands stack in next commands progress
|
|
719
|
-
q(this, "_collectEffectMutation",
|
|
719
|
+
q(this, "_collectEffectMutation", Wn());
|
|
720
720
|
this._sheetInterceptorService = t, this._numfmtService = r, this._univerInstanceService = n, this._injector = i, this._editorBridgeService = s, this._initInterceptorEditorStart(), this._initInterceptorEditorEnd(), this._initInterceptorCommands();
|
|
721
721
|
}
|
|
722
722
|
_initInterceptorEditorStart() {
|
|
723
723
|
this._editorBridgeService && this.disposeWithMe(
|
|
724
724
|
ve(
|
|
725
|
-
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
725
|
+
this._sheetInterceptorService.writeCellInterceptor.intercept(Gt, {
|
|
726
726
|
handler: (t, r, n) => {
|
|
727
727
|
const i = r.row, s = r.col, o = this._numfmtService.getValue(
|
|
728
728
|
r.unitId,
|
|
@@ -761,7 +761,7 @@ let te = class extends ie {
|
|
|
761
761
|
_initInterceptorEditorEnd() {
|
|
762
762
|
this.disposeWithMe(
|
|
763
763
|
ve(
|
|
764
|
-
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
764
|
+
this._sheetInterceptorService.writeCellInterceptor.intercept(Kt, {
|
|
765
765
|
// eslint-disable-next-line complexity
|
|
766
766
|
handler: (t, r, n) => {
|
|
767
767
|
var c, u, h;
|
|
@@ -776,14 +776,14 @@ let te = class extends ie {
|
|
|
776
776
|
return n(t);
|
|
777
777
|
const s = (c = t.p) == null ? void 0 : c.body, o = (h = (u = t == null ? void 0 : t.p) == null ? void 0 : u.body) != null && h.dataStream ? t.p.body.dataStream.replace(/\r\n$/, "") : String(t.v), a = J.parseDate(o) || J.parseTime(o) || J.parseNumber(o);
|
|
778
778
|
if (s)
|
|
779
|
-
if (
|
|
779
|
+
if (Gn(s)) {
|
|
780
780
|
const { dataStream: l } = s, f = l.replace(/\r\n$/, ""), v = Number(f);
|
|
781
781
|
if (Number.isNaN(v) && !a)
|
|
782
782
|
return n(t);
|
|
783
783
|
} else
|
|
784
784
|
return n(t);
|
|
785
785
|
if (a) {
|
|
786
|
-
if (!a.z &&
|
|
786
|
+
if (!a.z && St(o))
|
|
787
787
|
return n({
|
|
788
788
|
...t,
|
|
789
789
|
p: void 0,
|
|
@@ -815,7 +815,7 @@ let te = class extends ie {
|
|
|
815
815
|
getMutations(r) {
|
|
816
816
|
var n;
|
|
817
817
|
switch (r.id) {
|
|
818
|
-
case
|
|
818
|
+
case Zt.id: {
|
|
819
819
|
const i = t._univerInstanceService.getCurrentUnitForType(T.UNIVER_SHEET), s = i.getUnitId(), o = (n = i.getActiveSheet()) == null ? void 0 : n.getSheetId();
|
|
820
820
|
if (!o)
|
|
821
821
|
return {
|
|
@@ -847,9 +847,9 @@ let te = class extends ie {
|
|
|
847
847
|
if (c.length) {
|
|
848
848
|
const f = {
|
|
849
849
|
id: Ie.id,
|
|
850
|
-
params:
|
|
850
|
+
params: Yt(s, o, c)
|
|
851
851
|
};
|
|
852
|
-
h.push(f), l.push(...
|
|
852
|
+
h.push(f), l.push(...zt(t._injector, f.params));
|
|
853
853
|
}
|
|
854
854
|
if (u.length) {
|
|
855
855
|
const f = {
|
|
@@ -860,7 +860,7 @@ let te = class extends ie {
|
|
|
860
860
|
ranges: u
|
|
861
861
|
}
|
|
862
862
|
};
|
|
863
|
-
h.push(f), l.push(...
|
|
863
|
+
h.push(f), l.push(...Xt(t._injector, f.params));
|
|
864
864
|
}
|
|
865
865
|
return {
|
|
866
866
|
redos: h,
|
|
@@ -877,14 +877,14 @@ let te = class extends ie {
|
|
|
877
877
|
);
|
|
878
878
|
}
|
|
879
879
|
};
|
|
880
|
-
te =
|
|
880
|
+
te = Vn([
|
|
881
881
|
A(0, C(Je)),
|
|
882
882
|
A(1, C(ye)),
|
|
883
883
|
A(2, C(ge)),
|
|
884
884
|
A(3, C(Be)),
|
|
885
|
-
A(4,
|
|
885
|
+
A(4, _t(jt))
|
|
886
886
|
], te);
|
|
887
|
-
function
|
|
887
|
+
function Gn(e) {
|
|
888
888
|
const { textRuns: t = [], paragraphs: r = [], customRanges: n, customBlocks: i = [] } = e, s = ["va"];
|
|
889
889
|
return !(t.some((o) => !!(o.ts && Object.keys(o.ts).some((c) => s.includes(c)))) || r.some((o) => o.bullet) || r.length >= 2 || n != null && n.length || i.length > 0);
|
|
890
890
|
}
|
|
@@ -895,7 +895,7 @@ const Q = [
|
|
|
895
895
|
},
|
|
896
896
|
{
|
|
897
897
|
label: "sheet.numfmt.text",
|
|
898
|
-
pattern:
|
|
898
|
+
pattern: bt
|
|
899
899
|
},
|
|
900
900
|
"|",
|
|
901
901
|
{
|
|
@@ -949,10 +949,10 @@ const Q = [
|
|
|
949
949
|
label: "sheet.numfmt.moreFmt",
|
|
950
950
|
pattern: ""
|
|
951
951
|
}
|
|
952
|
-
],
|
|
952
|
+
], Kn = (e) => ({
|
|
953
953
|
icon: new L((t) => {
|
|
954
954
|
var s;
|
|
955
|
-
const r = e.get(
|
|
955
|
+
const r = e.get(kt);
|
|
956
956
|
function n(o) {
|
|
957
957
|
var c;
|
|
958
958
|
return (c = {
|
|
@@ -975,7 +975,7 @@ const Q = [
|
|
|
975
975
|
type: X.BUTTON,
|
|
976
976
|
hidden$: z(e, T.UNIVER_SHEET),
|
|
977
977
|
disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
|
|
978
|
-
}),
|
|
978
|
+
}), Zn = (e) => ({
|
|
979
979
|
icon: "AddDigitsIcon",
|
|
980
980
|
id: Xe.id,
|
|
981
981
|
title: "sheet.numfmt.addDecimal",
|
|
@@ -983,7 +983,7 @@ const Q = [
|
|
|
983
983
|
type: X.BUTTON,
|
|
984
984
|
hidden$: z(e, T.UNIVER_SHEET),
|
|
985
985
|
disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
|
|
986
|
-
}),
|
|
986
|
+
}), Yn = (e) => ({
|
|
987
987
|
icon: "ReduceDigitsIcon",
|
|
988
988
|
id: ze.id,
|
|
989
989
|
title: "sheet.numfmt.subtractDecimal",
|
|
@@ -991,7 +991,7 @@ const Q = [
|
|
|
991
991
|
type: X.BUTTON,
|
|
992
992
|
hidden$: z(e, T.UNIVER_SHEET),
|
|
993
993
|
disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
|
|
994
|
-
}),
|
|
994
|
+
}), zn = (e) => ({
|
|
995
995
|
icon: "PercentIcon",
|
|
996
996
|
id: Ye.id,
|
|
997
997
|
title: "sheet.numfmt.percent",
|
|
@@ -999,15 +999,15 @@ const Q = [
|
|
|
999
999
|
type: X.BUTTON,
|
|
1000
1000
|
hidden$: z(e, T.UNIVER_SHEET),
|
|
1001
1001
|
disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [Z, K], rangeTypes: [G] })
|
|
1002
|
-
}),
|
|
1003
|
-
const t = e.get(ge), r = e.get(_e), n = e.get(M), i = e.get(Ce), s = [be.id, Ie.id], o =
|
|
1002
|
+
}), Xn = (e) => {
|
|
1003
|
+
const t = e.get(ge), r = e.get(_e), n = e.get(M), i = e.get(Ce), s = [be.id, Ie.id], o = Bt(
|
|
1004
1004
|
t,
|
|
1005
1005
|
"",
|
|
1006
1006
|
({ workbook: a, worksheet: c }) => new L(
|
|
1007
1007
|
(u) => et(
|
|
1008
1008
|
i.selectionMoveEnd$,
|
|
1009
|
-
|
|
1010
|
-
|
|
1009
|
+
yt(r.onCommandExecuted.bind(r)).pipe(
|
|
1010
|
+
sn(([h]) => s.includes(h.id))
|
|
1011
1011
|
)
|
|
1012
1012
|
).subscribe(() => {
|
|
1013
1013
|
var l, f;
|
|
@@ -1015,7 +1015,7 @@ const Q = [
|
|
|
1015
1015
|
if (h && h[0]) {
|
|
1016
1016
|
const v = h[0].range, p = v.startRow, m = v.startColumn, S = (f = a.getStyles().get((l = c.getCell(p, m)) == null ? void 0 : l.s)) == null ? void 0 : f.n, g = S == null ? void 0 : S.pattern;
|
|
1017
1017
|
let y = n.t("sheet.numfmt.general");
|
|
1018
|
-
if (
|
|
1018
|
+
if (Ct(g)) {
|
|
1019
1019
|
u.next(y);
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
@@ -1049,11 +1049,11 @@ const Q = [
|
|
|
1049
1049
|
hidden$: z(e, T.UNIVER_SHEET),
|
|
1050
1050
|
disabled$: W(e, { workbookTypes: [Y], worksheetTypes: [K, Z], rangeTypes: [G] })
|
|
1051
1051
|
};
|
|
1052
|
-
}, ct = "sheet.numfmt.moreNumfmtType", at = "sheet.numfmt.moreNumfmtType.options",
|
|
1052
|
+
}, ct = "sheet.numfmt.moreNumfmtType", at = "sheet.numfmt.moreNumfmtType.options", qn = (e) => {
|
|
1053
1053
|
const { value: t } = e, r = I(M), n = t != null ? t : r.t("sheet.numfmt.general");
|
|
1054
1054
|
return /* @__PURE__ */ d("span", { className: "univer-text-sm", children: n });
|
|
1055
|
-
},
|
|
1056
|
-
const e = I(_e), t = I(M), r = I(
|
|
1055
|
+
}, Jn = () => {
|
|
1056
|
+
const e = I(_e), t = I(M), r = I(Qt), n = I(Ke), i = I(Ce), s = (c) => {
|
|
1057
1057
|
const u = i.getCurrentLastSelection();
|
|
1058
1058
|
if (!u)
|
|
1059
1059
|
return;
|
|
@@ -1071,7 +1071,7 @@ const Q = [
|
|
|
1071
1071
|
u.pattern && s(u.pattern);
|
|
1072
1072
|
}
|
|
1073
1073
|
}, a = 1220;
|
|
1074
|
-
return /* @__PURE__ */ d("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: Q.map((c, u) => c === "|" ? /* @__PURE__ */ d(
|
|
1074
|
+
return /* @__PURE__ */ d("div", { className: "univer-grid univer-gap-1 univer-p-1.5", children: Q.map((c, u) => c === "|" ? /* @__PURE__ */ d(vn, {}, u) : /* @__PURE__ */ b(
|
|
1075
1075
|
"div",
|
|
1076
1076
|
{
|
|
1077
1077
|
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",
|
|
@@ -1080,37 +1080,37 @@ const Q = [
|
|
|
1080
1080
|
},
|
|
1081
1081
|
children: [
|
|
1082
1082
|
/* @__PURE__ */ d("span", { children: t.t(c.label) }),
|
|
1083
|
-
/* @__PURE__ */ d("span", { className: "univer-text-xs univer-text-gray-500", children: c.pattern ?
|
|
1083
|
+
/* @__PURE__ */ d("span", { className: "univer-text-xs univer-text-gray-500", children: c.pattern ? Dt(c.pattern || "", a, n.locale).result.trim() : "" })
|
|
1084
1084
|
]
|
|
1085
1085
|
},
|
|
1086
1086
|
u
|
|
1087
1087
|
)) });
|
|
1088
|
-
},
|
|
1089
|
-
[
|
|
1088
|
+
}, Qn = {
|
|
1089
|
+
[en.FORMULAS]: {
|
|
1090
1090
|
[qe.id]: {
|
|
1091
1091
|
order: 0,
|
|
1092
|
-
menuItemFactory:
|
|
1092
|
+
menuItemFactory: Kn
|
|
1093
1093
|
},
|
|
1094
1094
|
[Xe.id]: {
|
|
1095
1095
|
order: 1,
|
|
1096
|
-
menuItemFactory:
|
|
1096
|
+
menuItemFactory: Zn
|
|
1097
1097
|
},
|
|
1098
1098
|
[ze.id]: {
|
|
1099
1099
|
order: 2,
|
|
1100
|
-
menuItemFactory:
|
|
1100
|
+
menuItemFactory: Yn
|
|
1101
1101
|
},
|
|
1102
1102
|
[Ye.id]: {
|
|
1103
1103
|
order: 3,
|
|
1104
|
-
menuItemFactory:
|
|
1104
|
+
menuItemFactory: zn
|
|
1105
1105
|
},
|
|
1106
1106
|
[H.id]: {
|
|
1107
1107
|
order: 4,
|
|
1108
|
-
menuItemFactory:
|
|
1108
|
+
menuItemFactory: Xn
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
};
|
|
1112
|
-
var
|
|
1113
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
1112
|
+
var er = Object.getOwnPropertyDescriptor, tr = (e, t, r, n) => {
|
|
1113
|
+
for (var i = n > 1 ? void 0 : n ? er(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
1114
1114
|
(o = e[s]) && (i = o(i) || i);
|
|
1115
1115
|
return i;
|
|
1116
1116
|
}, $e = (e, t) => (r, n) => t(r, n, e);
|
|
@@ -1119,9 +1119,9 @@ let ne = class extends ie {
|
|
|
1119
1119
|
super(), this._componentManager = e, this._menuManagerService = t, this._initMenu();
|
|
1120
1120
|
}
|
|
1121
1121
|
_initMenu() {
|
|
1122
|
-
this._menuManagerService.mergeMenu(
|
|
1123
|
-
[ct,
|
|
1124
|
-
[at,
|
|
1122
|
+
this._menuManagerService.mergeMenu(Qn), [
|
|
1123
|
+
[ct, qn],
|
|
1124
|
+
[at, Jn]
|
|
1125
1125
|
].forEach(([e, t]) => {
|
|
1126
1126
|
this.disposeWithMe(
|
|
1127
1127
|
this._componentManager.register(e, t)
|
|
@@ -1129,20 +1129,20 @@ let ne = class extends ie {
|
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
|
-
ne =
|
|
1132
|
+
ne = tr([
|
|
1133
1133
|
$e(0, C(Qe)),
|
|
1134
|
-
$e(1,
|
|
1134
|
+
$e(1, tn)
|
|
1135
1135
|
], ne);
|
|
1136
|
-
var
|
|
1137
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
1136
|
+
var nr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ir = (e, t, r) => t in e ? nr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, sr = (e, t, r, n) => {
|
|
1137
|
+
for (var i = n > 1 ? void 0 : n ? rr(t, r) : t, s = e.length - 1, o; s >= 0; s--)
|
|
1138
1138
|
(o = e[s]) && (i = o(i) || i);
|
|
1139
1139
|
return i;
|
|
1140
|
-
}, fe = (e, t) => (r, n) => t(r, n, e), lt = (e, t, r) =>
|
|
1141
|
-
const
|
|
1142
|
-
let re = class extends
|
|
1140
|
+
}, fe = (e, t) => (r, n) => t(r, n, e), lt = (e, t, r) => ir(e, typeof t != "symbol" ? t + "" : t, r);
|
|
1141
|
+
const or = "SHEET_NUMFMT_UI_PLUGIN";
|
|
1142
|
+
let re = class extends Nt {
|
|
1143
1143
|
constructor(e = Ue, t, r, n) {
|
|
1144
1144
|
super(), this._config = e, this._injector = t, this._configService = r, this._renderManagerService = n;
|
|
1145
|
-
const { menu: i, ...s } =
|
|
1145
|
+
const { menu: i, ...s } = Et(
|
|
1146
1146
|
{},
|
|
1147
1147
|
Ue,
|
|
1148
1148
|
this._config
|
|
@@ -1150,7 +1150,7 @@ let re = class extends It {
|
|
|
1150
1150
|
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig("sheets-numfmt-ui.config", s);
|
|
1151
1151
|
}
|
|
1152
1152
|
onStarting() {
|
|
1153
|
-
|
|
1153
|
+
Tt(this._injector, [
|
|
1154
1154
|
[B],
|
|
1155
1155
|
[te],
|
|
1156
1156
|
[j],
|
|
@@ -1158,7 +1158,7 @@ let re = class extends It {
|
|
|
1158
1158
|
]);
|
|
1159
1159
|
}
|
|
1160
1160
|
onRendered() {
|
|
1161
|
-
this._registerRenderModules(),
|
|
1161
|
+
this._registerRenderModules(), Mt(this._injector, [
|
|
1162
1162
|
[B],
|
|
1163
1163
|
[te],
|
|
1164
1164
|
[ne]
|
|
@@ -1172,10 +1172,10 @@ let re = class extends It {
|
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
1174
|
};
|
|
1175
|
-
lt(re, "pluginName",
|
|
1175
|
+
lt(re, "pluginName", or);
|
|
1176
1176
|
lt(re, "type", T.UNIVER_SHEET);
|
|
1177
|
-
re =
|
|
1178
|
-
|
|
1177
|
+
re = sr([
|
|
1178
|
+
It(Vt, $t),
|
|
1179
1179
|
fe(1, C(Be)),
|
|
1180
1180
|
fe(2, Fe),
|
|
1181
1181
|
fe(3, Ve)
|