@univerjs/sheets-numfmt-ui 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +134 -134
- package/lib/es/index.js +134 -135
- package/lib/index.js +134 -135
- package/lib/types/controllers/ui.controller.d.ts +2 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/menu/numfmt.menu.controller.d.ts +2 -3
- package/lib/umd/index.js +1 -1
- package/package.json +13 -13
package/lib/cjs/index.js
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _univerjs_core = require("@univerjs/core");
|
|
3
|
-
let _univerjs_engine_render = require("@univerjs/engine-render");
|
|
4
2
|
let _univerjs_sheets_numfmt = require("@univerjs/sheets-numfmt");
|
|
5
|
-
let _univerjs_sheets_ui = require("@univerjs/sheets-ui");
|
|
6
|
-
let _univerjs_icons = require("@univerjs/icons");
|
|
7
3
|
let _univerjs_ui = require("@univerjs/ui");
|
|
8
|
-
let
|
|
4
|
+
let _univerjs_core = require("@univerjs/core");
|
|
5
|
+
let _univerjs_engine_render = require("@univerjs/engine-render");
|
|
9
6
|
let _univerjs_sheets = require("@univerjs/sheets");
|
|
10
|
-
let
|
|
7
|
+
let _univerjs_sheets_ui = require("@univerjs/sheets-ui");
|
|
11
8
|
let rxjs = require("rxjs");
|
|
12
9
|
let rxjs_operators = require("rxjs/operators");
|
|
10
|
+
let _univerjs_design = require("@univerjs/design");
|
|
11
|
+
let react = require("react");
|
|
13
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
let _univerjs_icons = require("@univerjs/icons");
|
|
14
14
|
let _univerjs_engine_formula = require("@univerjs/engine-formula");
|
|
15
15
|
|
|
16
|
-
//#region package.json
|
|
17
|
-
var name = "@univerjs/sheets-numfmt-ui";
|
|
18
|
-
var version = "1.0.0-alpha.2";
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/config/config.ts
|
|
22
|
-
const SHEETS_NUMFMT_UI_PLUGIN_CONFIG_KEY = "sheets-numfmt-ui.config";
|
|
23
|
-
const configSymbol = Symbol(SHEETS_NUMFMT_UI_PLUGIN_CONFIG_KEY);
|
|
24
|
-
const defaultPluginConfig = {};
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
16
|
//#region src/commands/operations/close.numfmt.panel.operation.ts
|
|
28
17
|
const CloseNumfmtPanelOperator = {
|
|
29
18
|
id: "sheet.operation.close.numfmt.panel",
|
|
@@ -94,7 +83,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
94
83
|
//#region src/controllers/ui.controller.ts
|
|
95
84
|
const SHEET_NUMFMT_PANEL$1 = "SHEET_NUMFMT_PANEL";
|
|
96
85
|
let SheetNumfmtUIController = class SheetNumfmtUIController extends _univerjs_core.Disposable {
|
|
97
|
-
constructor(_sheetInterceptorService, _themeService, _univerInstanceService, _commandService, _selectionManagerService, _renderManagerService, _numfmtService,
|
|
86
|
+
constructor(_sheetInterceptorService, _themeService, _univerInstanceService, _commandService, _selectionManagerService, _renderManagerService, _numfmtService, _sidebarService, _localeService, _sheetsNumfmtCellContentController) {
|
|
98
87
|
super();
|
|
99
88
|
this._sheetInterceptorService = _sheetInterceptorService;
|
|
100
89
|
this._themeService = _themeService;
|
|
@@ -103,7 +92,6 @@ let SheetNumfmtUIController = class SheetNumfmtUIController extends _univerjs_co
|
|
|
103
92
|
this._selectionManagerService = _selectionManagerService;
|
|
104
93
|
this._renderManagerService = _renderManagerService;
|
|
105
94
|
this._numfmtService = _numfmtService;
|
|
106
|
-
this._componentManager = _componentManager;
|
|
107
95
|
this._sidebarService = _sidebarService;
|
|
108
96
|
this._localeService = _localeService;
|
|
109
97
|
this._sheetsNumfmtCellContentController = _sheetsNumfmtCellContentController;
|
|
@@ -183,8 +171,10 @@ let SheetNumfmtUIController = class SheetNumfmtUIController extends _univerjs_co
|
|
|
183
171
|
return true;
|
|
184
172
|
}
|
|
185
173
|
_forceUpdate(unitId) {
|
|
186
|
-
var _renderUnit$mainCompo;
|
|
187
|
-
const
|
|
174
|
+
var _this$_univerInstance, _renderUnit$mainCompo;
|
|
175
|
+
const resolvedUnitId = unitId !== null && unitId !== void 0 ? unitId : (_this$_univerInstance = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET)) === null || _this$_univerInstance === void 0 ? void 0 : _this$_univerInstance.getUnitId();
|
|
176
|
+
if (!resolvedUnitId) return;
|
|
177
|
+
const renderUnit = this._renderManagerService.getRenderById(resolvedUnitId);
|
|
188
178
|
renderUnit === null || renderUnit === void 0 || renderUnit.with(_univerjs_sheets_ui.SheetSkeletonManagerService).reCalculate();
|
|
189
179
|
renderUnit === null || renderUnit === void 0 || (_renderUnit$mainCompo = renderUnit.mainComponent) === null || _renderUnit$mainCompo === void 0 || _renderUnit$mainCompo.makeDirty();
|
|
190
180
|
}
|
|
@@ -282,10 +272,9 @@ SheetNumfmtUIController = __decorate([
|
|
|
282
272
|
__decorateParam(4, (0, _univerjs_core.Inject)(_univerjs_sheets.SheetsSelectionsService)),
|
|
283
273
|
__decorateParam(5, _univerjs_engine_render.IRenderManagerService),
|
|
284
274
|
__decorateParam(6, _univerjs_sheets.INumfmtService),
|
|
285
|
-
__decorateParam(7,
|
|
286
|
-
__decorateParam(8,
|
|
287
|
-
__decorateParam(9, (0, _univerjs_core.Inject)(
|
|
288
|
-
__decorateParam(10, (0, _univerjs_core.Inject)(_univerjs_sheets_numfmt.SheetsNumfmtCellContentController))
|
|
275
|
+
__decorateParam(7, _univerjs_ui.ISidebarService),
|
|
276
|
+
__decorateParam(8, (0, _univerjs_core.Inject)(_univerjs_core.LocaleService)),
|
|
277
|
+
__decorateParam(9, (0, _univerjs_core.Inject)(_univerjs_sheets_numfmt.SheetsNumfmtCellContentController))
|
|
289
278
|
], SheetNumfmtUIController);
|
|
290
279
|
|
|
291
280
|
//#endregion
|
|
@@ -299,6 +288,76 @@ const OpenNumfmtPanelOperator = {
|
|
|
299
288
|
}
|
|
300
289
|
};
|
|
301
290
|
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/views/components/MoreNumfmtType.tsx
|
|
293
|
+
const MORE_NUMFMT_TYPE_KEY = "sheets-numfmt-ui.moreNumfmtType";
|
|
294
|
+
const OPTIONS_KEY = "sheets-numfmt-ui.moreNumfmtType.options";
|
|
295
|
+
function MoreNumfmtType(props) {
|
|
296
|
+
const { value } = props;
|
|
297
|
+
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
298
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
299
|
+
className: "univer-text-sm",
|
|
300
|
+
children: value !== null && value !== void 0 ? value : localeService.t("sheets-numfmt-ui.general")
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function Options() {
|
|
304
|
+
const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
|
|
305
|
+
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
306
|
+
const layoutService = (0, _univerjs_ui.useDependency)(_univerjs_ui.ILayoutService);
|
|
307
|
+
const sheetsNumfmtCellContentController = (0, _univerjs_ui.useDependency)(_univerjs_sheets_numfmt.SheetsNumfmtCellContentController);
|
|
308
|
+
const direction = (0, _univerjs_ui.useObservable)(localeService.direction$, localeService.getDirection());
|
|
309
|
+
const selectionManagerService = (0, _univerjs_ui.useDependency)(_univerjs_sheets.SheetsSelectionsService);
|
|
310
|
+
const setNumfmt = (pattern) => {
|
|
311
|
+
const selection = selectionManagerService.getCurrentLastSelection();
|
|
312
|
+
if (!selection) return;
|
|
313
|
+
const range = selection.range;
|
|
314
|
+
const values = [];
|
|
315
|
+
_univerjs_core.Range.foreach(range, (row, col) => {
|
|
316
|
+
if (pattern) values.push({
|
|
317
|
+
row,
|
|
318
|
+
col,
|
|
319
|
+
pattern,
|
|
320
|
+
type: (0, _univerjs_sheets_numfmt.getPatternType)(pattern)
|
|
321
|
+
});
|
|
322
|
+
else values.push({
|
|
323
|
+
row,
|
|
324
|
+
col
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
commandService.executeCommand(_univerjs_sheets_numfmt.SetNumfmtCommand.id, { values });
|
|
328
|
+
layoutService.focus();
|
|
329
|
+
};
|
|
330
|
+
const menuOptions = (0, react.useMemo)(() => {
|
|
331
|
+
return MENU_OPTIONS(_univerjs_sheets_numfmt.localeCurrencySymbolMap.get(localeService.getCurrentLocale()));
|
|
332
|
+
}, [localeService]);
|
|
333
|
+
const handleClick = (index) => {
|
|
334
|
+
if (index === 0) setNumfmt(null);
|
|
335
|
+
else if (index === menuOptions.length - 1) {
|
|
336
|
+
commandService.executeCommand(OpenNumfmtPanelOperator.id);
|
|
337
|
+
layoutService.focus();
|
|
338
|
+
} else {
|
|
339
|
+
const item = menuOptions[index];
|
|
340
|
+
item.pattern && setNumfmt(item.pattern);
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
const defaultValue = 1220;
|
|
344
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
345
|
+
dir: direction,
|
|
346
|
+
className: "univer-grid univer-gap-1 univer-p-1.5",
|
|
347
|
+
children: menuOptions.map((item, index) => {
|
|
348
|
+
if (item === "|") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Separator, {}, index);
|
|
349
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
350
|
+
className: "univer-flex univer-h-7 univer-cursor-default 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",
|
|
351
|
+
onClick: () => handleClick(index),
|
|
352
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t(item.label) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
353
|
+
className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
|
|
354
|
+
children: item.pattern ? (0, _univerjs_sheets_numfmt.getPatternPreview)(item.pattern || "", defaultValue, sheetsNumfmtCellContentController.locale).result.trim() : ""
|
|
355
|
+
})]
|
|
356
|
+
}, index);
|
|
357
|
+
})
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
|
|
302
361
|
//#endregion
|
|
303
362
|
//#region src/menu/menu.ts
|
|
304
363
|
const MENU_OPTIONS = (currencySymbol) => {
|
|
@@ -482,74 +541,40 @@ function FactoryOtherMenuItem(accessor) {
|
|
|
482
541
|
}
|
|
483
542
|
|
|
484
543
|
//#endregion
|
|
485
|
-
//#region src/
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
});
|
|
520
|
-
commandService.executeCommand(_univerjs_sheets_numfmt.SetNumfmtCommand.id, { values });
|
|
521
|
-
layoutService.focus();
|
|
522
|
-
};
|
|
523
|
-
const menuOptions = (0, react.useMemo)(() => {
|
|
524
|
-
return MENU_OPTIONS(_univerjs_sheets_numfmt.localeCurrencySymbolMap.get(localeService.getCurrentLocale()));
|
|
525
|
-
}, [localeService]);
|
|
526
|
-
const handleClick = (index) => {
|
|
527
|
-
if (index === 0) setNumfmt(null);
|
|
528
|
-
else if (index === menuOptions.length - 1) {
|
|
529
|
-
commandService.executeCommand(OpenNumfmtPanelOperator.id);
|
|
530
|
-
layoutService.focus();
|
|
531
|
-
} else {
|
|
532
|
-
const item = menuOptions[index];
|
|
533
|
-
item.pattern && setNumfmt(item.pattern);
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
const defaultValue = 1220;
|
|
537
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
538
|
-
dir: direction,
|
|
539
|
-
className: "univer-grid univer-gap-1 univer-p-1.5",
|
|
540
|
-
children: menuOptions.map((item, index) => {
|
|
541
|
-
if (item === "|") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Separator, {}, index);
|
|
542
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
543
|
-
className: "univer-flex univer-h-7 univer-cursor-default 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",
|
|
544
|
-
onClick: () => handleClick(index),
|
|
545
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t(item.label) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
546
|
-
className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
|
|
547
|
-
children: item.pattern ? (0, _univerjs_sheets_numfmt.getPatternPreview)(item.pattern || "", defaultValue, sheetsNumfmtCellContentController.locale).result.trim() : ""
|
|
548
|
-
})]
|
|
549
|
-
}, index);
|
|
550
|
-
})
|
|
551
|
-
});
|
|
552
|
-
}
|
|
544
|
+
//#region src/menu/schema.ts
|
|
545
|
+
const menuSchema = { [_univerjs_ui.RibbonStartGroup.LAYOUT]: {
|
|
546
|
+
[OpenNumfmtPanelOperator.id]: {
|
|
547
|
+
order: 9,
|
|
548
|
+
menuItemFactory: FactoryOtherMenuItem
|
|
549
|
+
},
|
|
550
|
+
[_univerjs_sheets_numfmt.SetPercentCommand.id]: {
|
|
551
|
+
order: 9.1,
|
|
552
|
+
menuItemFactory: PercentMenuItem
|
|
553
|
+
},
|
|
554
|
+
[_univerjs_sheets_numfmt.SetCurrencyCommand.id]: {
|
|
555
|
+
order: 9.2,
|
|
556
|
+
menuItemFactory: CurrencySymbolIconMenuItem
|
|
557
|
+
},
|
|
558
|
+
[_univerjs_sheets_numfmt.AddDecimalCommand.id]: {
|
|
559
|
+
order: 9.3,
|
|
560
|
+
menuItemFactory: AddDecimalMenuItem
|
|
561
|
+
},
|
|
562
|
+
[_univerjs_sheets_numfmt.SubtractDecimalCommand.id]: {
|
|
563
|
+
order: 9.4,
|
|
564
|
+
menuItemFactory: SubtractDecimalMenuItem
|
|
565
|
+
}
|
|
566
|
+
} };
|
|
567
|
+
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region package.json
|
|
570
|
+
var name = "@univerjs/sheets-numfmt-ui";
|
|
571
|
+
var version = "1.0.0-alpha.4";
|
|
572
|
+
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/config/config.ts
|
|
575
|
+
const SHEETS_NUMFMT_UI_PLUGIN_CONFIG_KEY = "sheets-numfmt-ui.config";
|
|
576
|
+
const configSymbol = Symbol(SHEETS_NUMFMT_UI_PLUGIN_CONFIG_KEY);
|
|
577
|
+
const defaultPluginConfig = {};
|
|
553
578
|
|
|
554
579
|
//#endregion
|
|
555
580
|
//#region src/controllers/user-habit.controller.ts
|
|
@@ -808,20 +833,22 @@ function CustomFormat(props) {
|
|
|
808
833
|
]);
|
|
809
834
|
const [options, setOptions] = (0, react.useState)([]);
|
|
810
835
|
(0, react.useEffect)(() => {
|
|
836
|
+
let cancelled = false;
|
|
811
837
|
localStorageService.getItem(historyPatternKey).then((historyList) => {
|
|
812
838
|
const list = [
|
|
813
839
|
..._univerjs_sheets_numfmt.CURRENCYFORMAT.map((item) => item.suffix("$")),
|
|
814
840
|
..._univerjs_sheets_numfmt.DATEFMTLISG.map((item) => item.suffix),
|
|
815
|
-
..._univerjs_sheets_numfmt.NUMBERFORMAT.map((item) => item.suffix)
|
|
841
|
+
..._univerjs_sheets_numfmt.NUMBERFORMAT.map((item) => item.suffix),
|
|
842
|
+
...historyList !== null && historyList !== void 0 ? historyList : []
|
|
816
843
|
];
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
setOptions([...new Set(list)]);
|
|
821
|
-
});
|
|
822
|
-
});
|
|
844
|
+
return userHabitController.addHabit(key$1, []).then(() => userHabitController.getHabit(key$1, list));
|
|
845
|
+
}).then((list) => {
|
|
846
|
+
if (!cancelled) setOptions([...new Set(list)]);
|
|
823
847
|
});
|
|
824
|
-
|
|
848
|
+
return () => {
|
|
849
|
+
cancelled = true;
|
|
850
|
+
};
|
|
851
|
+
}, [localStorageService, userHabitController]);
|
|
825
852
|
const handleClick = (p) => {
|
|
826
853
|
setPattern(p);
|
|
827
854
|
onChange(p);
|
|
@@ -936,7 +963,7 @@ function ThousandthPercentilePanel(props) {
|
|
|
936
963
|
return (item === null || item === void 0 ? void 0 : item.value) || options[0].value;
|
|
937
964
|
});
|
|
938
965
|
const pattern = (0, react.useMemo)(() => (0, _univerjs_sheets_numfmt.setPatternDecimal)(suffix, Number(decimal || 0)), [suffix, decimal]);
|
|
939
|
-
const isInputDisable =
|
|
966
|
+
const isInputDisable = !(0, _univerjs_sheets_numfmt.isPatternHasDecimal)(suffix);
|
|
940
967
|
const handleDecimalChange = (decimal) => {
|
|
941
968
|
setDecimal(decimal || 0);
|
|
942
969
|
onChange((0, _univerjs_sheets_numfmt.setPatternDecimal)(suffix, Number(decimal || 0)));
|
|
@@ -1058,6 +1085,7 @@ const useNextTick = () => {
|
|
|
1058
1085
|
//#endregion
|
|
1059
1086
|
//#region src/views/SheetNumfmtPanel.tsx
|
|
1060
1087
|
function SheetNumfmtPanel(props) {
|
|
1088
|
+
var _typeOptions$find;
|
|
1061
1089
|
const { defaultValue, defaultPattern, row, col } = props.value;
|
|
1062
1090
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
1063
1091
|
const currentPatternRef = (0, react.useRef)(() => "");
|
|
@@ -1096,10 +1124,7 @@ function SheetNumfmtPanel(props) {
|
|
|
1096
1124
|
const [type, setType] = (0, react.useState)(findDefaultType);
|
|
1097
1125
|
const [key, setKey] = (0, react.useState)(() => `${row}_${col}_${defaultPattern}`);
|
|
1098
1126
|
const { mark, userHabitCurrency } = useCurrencyOptions(() => setKey(`${row}_${col}_${defaultPattern}_userCurrency`));
|
|
1099
|
-
const BusinessComponent = (
|
|
1100
|
-
var _typeOptions$find;
|
|
1101
|
-
return (_typeOptions$find = typeOptions.find((item) => item.label === type)) === null || _typeOptions$find === void 0 ? void 0 : _typeOptions$find.component;
|
|
1102
|
-
}, [type]);
|
|
1127
|
+
const BusinessComponent = (_typeOptions$find = typeOptions.find((item) => item.label === type)) === null || _typeOptions$find === void 0 ? void 0 : _typeOptions$find.component;
|
|
1103
1128
|
function findDefaultType() {
|
|
1104
1129
|
return [
|
|
1105
1130
|
isGeneralPanel,
|
|
@@ -1565,31 +1590,6 @@ function canConvertRichTextToNumfmt(body) {
|
|
|
1565
1590
|
}) || paragraphs.some((paragraph) => paragraph.bullet) || paragraphs.length >= 2 || Boolean(customRanges === null || customRanges === void 0 ? void 0 : customRanges.length) || customBlocks.length > 0);
|
|
1566
1591
|
}
|
|
1567
1592
|
|
|
1568
|
-
//#endregion
|
|
1569
|
-
//#region src/menu/schema.ts
|
|
1570
|
-
const menuSchema = { [_univerjs_ui.RibbonStartGroup.LAYOUT]: {
|
|
1571
|
-
[OpenNumfmtPanelOperator.id]: {
|
|
1572
|
-
order: 9,
|
|
1573
|
-
menuItemFactory: FactoryOtherMenuItem
|
|
1574
|
-
},
|
|
1575
|
-
[_univerjs_sheets_numfmt.SetPercentCommand.id]: {
|
|
1576
|
-
order: 9.1,
|
|
1577
|
-
menuItemFactory: PercentMenuItem
|
|
1578
|
-
},
|
|
1579
|
-
[_univerjs_sheets_numfmt.SetCurrencyCommand.id]: {
|
|
1580
|
-
order: 9.2,
|
|
1581
|
-
menuItemFactory: CurrencySymbolIconMenuItem
|
|
1582
|
-
},
|
|
1583
|
-
[_univerjs_sheets_numfmt.AddDecimalCommand.id]: {
|
|
1584
|
-
order: 9.3,
|
|
1585
|
-
menuItemFactory: AddDecimalMenuItem
|
|
1586
|
-
},
|
|
1587
|
-
[_univerjs_sheets_numfmt.SubtractDecimalCommand.id]: {
|
|
1588
|
-
order: 9.4,
|
|
1589
|
-
menuItemFactory: SubtractDecimalMenuItem
|
|
1590
|
-
}
|
|
1591
|
-
} };
|
|
1592
|
-
|
|
1593
1593
|
//#endregion
|
|
1594
1594
|
//#region src/menu/numfmt.menu.controller.ts
|
|
1595
1595
|
/**
|
|
@@ -1608,9 +1608,8 @@ const menuSchema = { [_univerjs_ui.RibbonStartGroup.LAYOUT]: {
|
|
|
1608
1608
|
* limitations under the License.
|
|
1609
1609
|
*/
|
|
1610
1610
|
let NumfmtMenuController = class NumfmtMenuController extends _univerjs_core.Disposable {
|
|
1611
|
-
constructor(
|
|
1611
|
+
constructor(_menuManagerService) {
|
|
1612
1612
|
super();
|
|
1613
|
-
this._componentManager = _componentManager;
|
|
1614
1613
|
this._menuManagerService = _menuManagerService;
|
|
1615
1614
|
this._initMenu();
|
|
1616
1615
|
}
|
|
@@ -1618,7 +1617,7 @@ let NumfmtMenuController = class NumfmtMenuController extends _univerjs_core.Dis
|
|
|
1618
1617
|
this._menuManagerService.mergeMenu(menuSchema);
|
|
1619
1618
|
}
|
|
1620
1619
|
};
|
|
1621
|
-
NumfmtMenuController = __decorate([__decorateParam(0,
|
|
1620
|
+
NumfmtMenuController = __decorate([__decorateParam(0, _univerjs_ui.IMenuManagerService)], NumfmtMenuController);
|
|
1622
1621
|
|
|
1623
1622
|
//#endregion
|
|
1624
1623
|
//#region src/plugin.ts
|
|
@@ -1671,6 +1670,7 @@ UniverSheetsNumfmtUIPlugin = __decorate([
|
|
|
1671
1670
|
], UniverSheetsNumfmtUIPlugin);
|
|
1672
1671
|
|
|
1673
1672
|
//#endregion
|
|
1673
|
+
exports.SheetsNumfmtUIMenuSchema = menuSchema;
|
|
1674
1674
|
Object.defineProperty(exports, 'UniverSheetsNumfmtUIPlugin', {
|
|
1675
1675
|
enumerable: true,
|
|
1676
1676
|
get: function () {
|