@univerjs/sheets-numfmt 0.3.0-alpha.1 → 0.3.0-nightly.202410111606

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
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value;
3
3
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
4
4
  var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 != "symbol" ? key2 + "" : key2, value);
5
- import { numfmt, LocaleType, OnLifecycle, LifecycleStages, Inject, ThemeService, ICommandService, LocaleService, Disposable, ObjectMatrix, InterceptorEffectEnum, CellValueType, Range, UniverInstanceType, IUniverInstanceService, CommandType, IUndoRedoService, sequenceExecute, createIdentifier, runOnLifecycle, ILocalStorageService, useDependency, toDisposable, DisposableCollection, Injector, Optional, useInjector, DependentOn, Plugin, IConfigService } from "@univerjs/core";
5
+ import { numfmt, LocaleType, Inject, ThemeService, ICommandService, LocaleService, IUniverInstanceService, Disposable, ObjectMatrix, InterceptorEffectEnum, CellValueType, Range, UniverInstanceType, CommandType, IUndoRedoService, sequenceExecute, createIdentifier, ILocalStorageService, useDependency, toDisposable, DisposableCollection, Injector, Optional, useInjector, DependentOn, Plugin, IConfigService } from "@univerjs/core";
6
6
  import { SheetInterceptorService, INumfmtService, INTERCEPTOR_POINT, InterceptCellContentPriority, SetNumfmtMutation, SetRangeValuesMutation, getSheetCommandTarget, transformCellsToRange, rangeMerge, factorySetNumfmtUndoMutation, RemoveNumfmtMutation, factoryRemoveNumfmtUndoMutation, SheetsSelectionsService, SetRangeValuesCommand, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, RangeProtectionPermissionEditPoint, UniverSheetsPlugin } from "@univerjs/sheets";
7
7
  import { SheetSkeletonManagerService, IEditorBridgeService, getCurrentRangeDisable$, deriveStateFromActiveSheet$, UniverSheetsUIPlugin } from "@univerjs/sheets-ui";
8
8
  import { switchMap, of, skip, BehaviorSubject, Observable, combineLatest, merge } from "rxjs";
@@ -80,7 +80,7 @@ const currencySymbols = [
80
80
  SI: "€",
81
81
  ES: "€"
82
82
  // Add more mappings as needed
83
- }, SHEET_NUMFMT_PLUGIN = "SHEET_NUMFMT_PLUGIN", getPatternType = /* @__PURE__ */ __name((pattern) => numfmt.getInfo(pattern).type || "unknown", "getPatternType"), getPatternPreview = /* @__PURE__ */ __name((pattern, value, _locale) => {
83
+ }, SHEET_NUMFMT_PLUGIN = "SHEET_NUMFMT_PLUGIN", PLUGIN_CONFIG_KEY = "sheets-numfmt.config", defaultPluginConfig = {}, getPatternType = /* @__PURE__ */ __name((pattern) => numfmt.getInfo(pattern).type || "unknown", "getPatternType"), getPatternPreview = /* @__PURE__ */ __name((pattern, value, _locale) => {
84
84
  const info = numfmt.getInfo(pattern), locale = _locale === LocaleType.ZH_CN ? "zh-CN" : "en", negInfo = info._partitions[1], result = numfmt.format(pattern, value, { locale, throws: !1 });
85
85
  return value < 0 ? {
86
86
  result,
@@ -91,11 +91,11 @@ const currencySymbols = [
91
91
  }, "getPatternPreview"), getPatternPreviewIgnoreGeneral = /* @__PURE__ */ __name((pattern, value, _locale) => pattern === "General" ? {
92
92
  result: String(value)
93
93
  } : getPatternPreview(pattern, value, _locale), "getPatternPreviewIgnoreGeneral");
94
- var __defProp$7 = Object.defineProperty, __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor, __decorateClass$7 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
95
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
94
+ var __defProp$5 = Object.defineProperty, __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor, __decorateClass$5 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
95
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
96
96
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
97
- return kind && result && __defProp$7(target, key2, result), result;
98
- }, "__decorateClass$7"), __decorateParam$7 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$7"), _a;
97
+ return kind && result && __defProp$5(target, key2, result), result;
98
+ }, "__decorateClass$5"), __decorateParam$5 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$5"), _a;
99
99
  let SheetsNumfmtCellContentController = (_a = class extends Disposable {
100
100
  constructor(_instanceService, _sheetInterceptorService, _themeService, _commandService, _numfmtService, _localeService) {
101
101
  super(), this._instanceService = _instanceService, this._sheetInterceptorService = _sheetInterceptorService, this._themeService = _themeService, this._commandService = _commandService, this._numfmtService = _numfmtService, this._localeService = _localeService, this._initInterceptorCellContent();
@@ -154,26 +154,25 @@ let SheetsNumfmtCellContentController = (_a = class extends Disposable {
154
154
  })), this.disposeWithMe(
155
155
  this._instanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_SHEET).pipe(
156
156
  switchMap((workbook) => {
157
- var _a9;
158
- return (_a9 = workbook == null ? void 0 : workbook.activeSheet$) != null ? _a9 : of(null);
157
+ var _a7;
158
+ return (_a7 = workbook == null ? void 0 : workbook.activeSheet$) != null ? _a7 : of(null);
159
159
  }),
160
160
  skip(1)
161
161
  ).subscribe(() => renderCache.reset())
162
162
  );
163
163
  }
164
164
  }, __name(_a, "SheetsNumfmtCellContentController"), _a);
165
- SheetsNumfmtCellContentController = __decorateClass$7([
166
- OnLifecycle(LifecycleStages.Rendered, SheetsNumfmtCellContentController),
167
- __decorateParam$7(0, IUniverInstanceService),
168
- __decorateParam$7(1, Inject(SheetInterceptorService)),
169
- __decorateParam$7(2, Inject(ThemeService)),
170
- __decorateParam$7(3, Inject(ICommandService)),
171
- __decorateParam$7(4, Inject(INumfmtService)),
172
- __decorateParam$7(5, Inject(LocaleService))
165
+ SheetsNumfmtCellContentController = __decorateClass$5([
166
+ __decorateParam$5(0, IUniverInstanceService),
167
+ __decorateParam$5(1, Inject(SheetInterceptorService)),
168
+ __decorateParam$5(2, Inject(ThemeService)),
169
+ __decorateParam$5(3, Inject(ICommandService)),
170
+ __decorateParam$5(4, Inject(INumfmtService)),
171
+ __decorateParam$5(5, Inject(LocaleService))
173
172
  ], SheetsNumfmtCellContentController);
174
173
  const getDecimalFromPattern = /* @__PURE__ */ __name((pattern, defaultValue = 0) => {
175
- var _a9;
176
- return pattern && (_a9 = numfmt.getInfo(pattern).maxDecimals) != null ? _a9 : defaultValue;
174
+ var _a7;
175
+ return pattern && (_a7 = numfmt.getInfo(pattern).maxDecimals) != null ? _a7 : defaultValue;
177
176
  }, "getDecimalFromPattern"), isPatternEqualWithoutDecimal = /* @__PURE__ */ __name((patternA, patternB) => {
178
177
  if (patternA && !patternB || !patternA && patternB)
179
178
  return !1;
@@ -494,9 +493,7 @@ const SetCurrencyCommand = {
494
493
  // do nothing,just notify panel is closed
495
494
  !0
496
495
  ), "handler")
497
- }, INumfmtController = createIdentifier("INumfmtController");
498
- runOnLifecycle(LifecycleStages.Rendered, INumfmtController);
499
- const OpenNumfmtPanelOperator = {
496
+ }, INumfmtController = createIdentifier("INumfmtController"), OpenNumfmtPanelOperator = {
500
497
  id: "sheet.operation.open.numfmt.panel",
501
498
  type: CommandType.OPERATION,
502
499
  handler: /* @__PURE__ */ __name((accessor) => (accessor.get(INumfmtController).openPanel(), !0), "handler")
@@ -526,11 +523,11 @@ reactJsxRuntime_production_min.jsxs = q;
526
523
  jsxRuntime.exports = reactJsxRuntime_production_min;
527
524
  var jsxRuntimeExports = jsxRuntime.exports;
528
525
  const UserHabitCurrencyContext = createContext([]);
529
- var __defProp$6 = Object.defineProperty, __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor, __decorateClass$6 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
530
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
526
+ var __defProp$4 = Object.defineProperty, __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor, __decorateClass$4 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
527
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
531
528
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
532
- return kind && result && __defProp$6(target, key2, result), result;
533
- }, "__decorateClass$6"), __decorateParam$6 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$6"), _a2;
529
+ return kind && result && __defProp$4(target, key2, result), result;
530
+ }, "__decorateClass$4"), __decorateParam$4 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$4"), _a2;
534
531
  let UserHabitController = (_a2 = class {
535
532
  constructor(_localStorageService) {
536
533
  this._localStorageService = _localStorageService;
@@ -564,8 +561,8 @@ let UserHabitController = (_a2 = class {
564
561
  };
565
562
  });
566
563
  return sortList.sort((a, b) => {
567
- var _a9, _b;
568
- const ap = ((_a9 = priority.find((item) => item.value === a)) == null ? void 0 : _a9.priority) || -1;
564
+ var _a7, _b;
565
+ const ap = ((_a7 = priority.find((item) => item.value === a)) == null ? void 0 : _a7.priority) || -1;
569
566
  return (((_b = priority.find((item) => item.value === b)) == null ? void 0 : _b.priority) || -1) - ap;
570
567
  });
571
568
  }
@@ -575,8 +572,8 @@ let UserHabitController = (_a2 = class {
575
572
  this._localStorageService.removeItem(habit);
576
573
  }
577
574
  }, __name(_a2, "UserHabitController"), _a2);
578
- UserHabitController = __decorateClass$6([
579
- __decorateParam$6(0, Inject(ILocalStorageService))
575
+ UserHabitController = __decorateClass$4([
576
+ __decorateParam$4(0, Inject(ILocalStorageService))
580
577
  ], UserHabitController);
581
578
  const key$1 = "numfmtCurrency", useCurrencyOptions = /* @__PURE__ */ __name((onOptionChange) => {
582
579
  const userHabitController = useDependency(UserHabitController), [options, optionsSet] = useState(currencySymbols);
@@ -626,9 +623,9 @@ const key$1 = "numfmtCurrency", useCurrencyOptions = /* @__PURE__ */ __name((onO
626
623
  color: item.color
627
624
  })), "getCurrencyFormatOptions"), getDateFormatOptions = /* @__PURE__ */ __name(() => DATEFMTLISG.map((item) => ({ label: item.label, value: item.suffix })), "getDateFormatOptions"), getNumberFormatOptions = /* @__PURE__ */ __name(() => NUMBERFORMAT.map((item) => ({ label: item.label, value: item.suffix, color: item.color })), "getNumberFormatOptions"), isCurrencyPanel = /* @__PURE__ */ __name((pattern) => !!getCurrencyType(pattern) && !pattern.startsWith("_("), "isCurrencyPanel"), CurrencyPanel = /* @__PURE__ */ __name((props) => {
628
625
  const t = useDependency(LocaleService).t, userHabitCurrency = useContext(UserHabitCurrencyContext), [suffix, suffixSet] = useState(() => getCurrencyType(props.defaultPattern) || userHabitCurrency[0]), [decimal, decimalSet] = useState(() => getDecimalFromPattern(props.defaultPattern || "", 2)), [pattern, patternSet] = useState(() => {
629
- var _a9;
626
+ var _a7;
630
627
  const negativeOptions2 = getCurrencyFormatOptions(suffix);
631
- return ((_a9 = negativeOptions2.find((item) => isPatternEqualWithoutDecimal(item.value, props.defaultPattern))) == null ? void 0 : _a9.value) || negativeOptions2[0].value;
628
+ return ((_a7 = negativeOptions2.find((item) => isPatternEqualWithoutDecimal(item.value, props.defaultPattern))) == null ? void 0 : _a7.value) || negativeOptions2[0].value;
632
629
  }), negativeOptions = useMemo(() => getCurrencyFormatOptions(suffix), [suffix]), options = useMemo(() => userHabitCurrency.map((key2) => ({ label: key2, value: key2 })), [userHabitCurrency]);
633
630
  props.action.current = () => setPatternDecimal(pattern, decimal);
634
631
  const onSelect = /* @__PURE__ */ __name((value) => {
@@ -687,15 +684,15 @@ function replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend) {
687
684
  var attrs = __assign({}, node.attrs);
688
685
  extend != null && extend.colorChannel1 && attrs.fill === "colorChannel1" && (attrs.fill = extend.colorChannel1);
689
686
  var defIds = runtimeProps.defIds;
690
- return !defIds || defIds.length === 0 || (node.tag === "use" && attrs["xlink:href"] && (attrs["xlink:href"] = attrs["xlink:href"] + runtimeProps.idSuffix), Object.entries(attrs).forEach(function(_a9) {
691
- var key2 = _a9[0], value = _a9[1];
687
+ return !defIds || defIds.length === 0 || (node.tag === "use" && attrs["xlink:href"] && (attrs["xlink:href"] = attrs["xlink:href"] + runtimeProps.idSuffix), Object.entries(attrs).forEach(function(_a7) {
688
+ var key2 = _a7[0], value = _a7[1];
692
689
  typeof value == "string" && (attrs[key2] = value.replace(/url\(#(.*)\)/, "url(#$1".concat(runtimeProps.idSuffix, ")")));
693
690
  })), attrs;
694
691
  }
695
692
  __name(replaceRuntimeIdsAndExtInAttrs, "replaceRuntimeIdsAndExtInAttrs");
696
693
  function replaceRuntimeIdsInDefs(node, runtimeProps) {
697
- var _a9, defIds = runtimeProps.defIds;
698
- return !defIds || defIds.length === 0 ? node : node.tag === "defs" && (!((_a9 = node.children) === null || _a9 === void 0) && _a9.length) ? __assign(__assign({}, node), { children: node.children.map(function(child) {
694
+ var _a7, defIds = runtimeProps.defIds;
695
+ return !defIds || defIds.length === 0 ? node : node.tag === "defs" && (!((_a7 = node.children) === null || _a7 === void 0) && _a7.length) ? __assign(__assign({}, node), { children: node.children.map(function(child) {
699
696
  return typeof child.attrs.id == "string" && defIds && defIds.indexOf(child.attrs.id) > -1 ? __assign(__assign({}, child), { attrs: __assign(__assign({}, child.attrs), { id: child.attrs.id + runtimeProps.idSuffix }) }) : child;
700
697
  }) }) : node;
701
698
  }
@@ -822,8 +819,8 @@ const isDatePanel = /* @__PURE__ */ __name((pattern) => {
822
819
  ].map((item) => ({ ...item, label: t(item.label) })),
823
820
  []
824
821
  ), [type, typeSet] = useState(findDefaultType), [key2, keySet] = useState(() => `${row}_${col}`), { mark, userHabitCurrency } = useCurrencyOptions(() => keySet(`${row}_${col}_userCurrency'`)), BusinessComponent = useMemo(() => {
825
- var _a9;
826
- return (_a9 = typeOptions.find((item) => item.label === type)) == null ? void 0 : _a9.component;
822
+ var _a7;
823
+ return (_a7 = typeOptions.find((item) => item.label === type)) == null ? void 0 : _a7.component;
827
824
  }, [type]);
828
825
  function findDefaultType() {
829
826
  return [isGeneralPanel, isAccountingPanel, isCurrencyPanel, isDatePanel, isThousandthPercentilePanel].reduce((pre, curFn, index) => pre || (curFn(defaultPattern) ? typeOptions[index].label : ""), "") || typeOptions[0].label;
@@ -861,11 +858,11 @@ const isDatePanel = /* @__PURE__ */ __name((pattern) => {
861
858
  ] })
862
859
  ] });
863
860
  }, "SheetNumfmtPanel");
864
- var __defProp$5 = Object.defineProperty, __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor, __decorateClass$5 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
865
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
861
+ var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor, __decorateClass$3 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
862
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
866
863
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
867
- return kind && result && __defProp$5(target, key2, result), result;
868
- }, "__decorateClass$5"), __decorateParam$5 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$5"), _a3;
864
+ return kind && result && __defProp$3(target, key2, result), result;
865
+ }, "__decorateClass$3"), __decorateParam$3 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$3"), _a3;
869
866
  let NumfmtController = (_a3 = class extends Disposable {
870
867
  constructor(_sheetInterceptorService, _themeService, _univerInstanceService, _commandService, _selectionManagerService, _renderManagerService, _numfmtService, _componentManager, _sidebarService, _localeService) {
871
868
  super();
@@ -880,8 +877,8 @@ let NumfmtController = (_a3 = class extends Disposable {
880
877
  this._sheetInterceptorService = _sheetInterceptorService, this._themeService = _themeService, this._univerInstanceService = _univerInstanceService, this._commandService = _commandService, this._selectionManagerService = _selectionManagerService, this._renderManagerService = _renderManagerService, this._numfmtService = _numfmtService, this._componentManager = _componentManager, this._sidebarService = _sidebarService, this._localeService = _localeService, this._initRealTimeRenderingInterceptor(), this._initPanel(), this._initCommands(), this._initCloseListener(), this._commandExecutedListener();
881
878
  }
882
879
  openPanel() {
883
- var _a9;
884
- const sidebarService = this._sidebarService, selectionManagerService = this._selectionManagerService, commandService = this._commandService, univerInstanceService = this._univerInstanceService, numfmtService = this._numfmtService, localeService = this._localeService, range = (((_a9 = selectionManagerService.getCurrentSelections()) == null ? void 0 : _a9.map((s) => s.range)) || [])[0];
880
+ var _a7;
881
+ const sidebarService = this._sidebarService, selectionManagerService = this._selectionManagerService, commandService = this._commandService, univerInstanceService = this._univerInstanceService, numfmtService = this._numfmtService, localeService = this._localeService, range = (((_a7 = selectionManagerService.getCurrentSelections()) == null ? void 0 : _a7.map((s) => s.range)) || [])[0];
885
882
  if (!range)
886
883
  return !1;
887
884
  const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), sheet = workbook.getActiveSheet();
@@ -897,11 +894,11 @@ let NumfmtController = (_a3 = class extends Disposable {
897
894
  numfmtValue && (pattern = numfmtValue.pattern);
898
895
  const defaultValue = (cellValue == null ? void 0 : cellValue.t) === CellValueType.NUMBER ? cellValue.v : 12345678, props = {
899
896
  onChange: /* @__PURE__ */ __name((config) => {
900
- var _a10;
897
+ var _a8;
901
898
  if (config.type === "change")
902
899
  this._previewPattern = config.value, this._forceUpdate();
903
900
  else if (config.type === "confirm") {
904
- const selections2 = ((_a10 = selectionManagerService.getCurrentSelections()) == null ? void 0 : _a10.map((s) => s.range)) || [], params = { values: [] }, patternType = getPatternType(config.value);
901
+ const selections2 = ((_a8 = selectionManagerService.getCurrentSelections()) == null ? void 0 : _a8.map((s) => s.range)) || [], params = { values: [] }, patternType = getPatternType(config.value);
905
902
  selections2.forEach((rangeInfo) => {
906
903
  Range.foreach(rangeInfo, (row, col) => {
907
904
  params.values.push({
@@ -929,11 +926,11 @@ let NumfmtController = (_a3 = class extends Disposable {
929
926
  }), !0;
930
927
  }
931
928
  _forceUpdate(unitId) {
932
- var _a9;
929
+ var _a7;
933
930
  const renderUnit = this._renderManagerService.getRenderById(
934
931
  unitId != null ? unitId : this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET).getUnitId()
935
932
  );
936
- renderUnit == null || renderUnit.with(SheetSkeletonManagerService).reCalculate(), (_a9 = renderUnit == null ? void 0 : renderUnit.mainComponent) == null || _a9.makeDirty();
933
+ renderUnit == null || renderUnit.with(SheetSkeletonManagerService).reCalculate(), (_a7 = renderUnit == null ? void 0 : renderUnit.mainComponent) == null || _a7.makeDirty();
937
934
  }
938
935
  _initCommands() {
939
936
  [
@@ -977,7 +974,7 @@ let NumfmtController = (_a3 = class extends Disposable {
977
974
  this._previewPattern = null;
978
975
  })
979
976
  ).subscribe(({ disposableCollection, selectionRanges }) => {
980
- var _a9, _b;
977
+ var _a7, _b;
981
978
  const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET);
982
979
  this.openPanel(), disposableCollection.add(
983
980
  this._sheetInterceptorService.intercept(INTERCEPTOR_POINT.CELL_CONTENT, {
@@ -1010,7 +1007,7 @@ let NumfmtController = (_a3 = class extends Disposable {
1010
1007
  return defaultValue;
1011
1008
  }, "handler")
1012
1009
  })
1013
- ), (_b = (_a9 = this._renderManagerService.getRenderById(workbook.getUnitId())) == null ? void 0 : _a9.mainComponent) == null || _b.makeDirty();
1010
+ ), (_b = (_a7 = this._renderManagerService.getRenderById(workbook.getUnitId())) == null ? void 0 : _a7.mainComponent) == null || _b.makeDirty();
1014
1011
  })
1015
1012
  )
1016
1013
  );
@@ -1031,29 +1028,46 @@ let NumfmtController = (_a3 = class extends Disposable {
1031
1028
  }
1032
1029
  _initCloseListener() {
1033
1030
  this._univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_SHEET).subscribe((unit) => {
1034
- var _a9;
1035
- unit || ((_a9 = this._sidebarDisposable) == null || _a9.dispose(), this._sidebarDisposable = null);
1031
+ var _a7;
1032
+ unit || ((_a7 = this._sidebarDisposable) == null || _a7.dispose(), this._sidebarDisposable = null);
1036
1033
  });
1037
1034
  }
1038
1035
  }, __name(_a3, "NumfmtController"), _a3);
1039
- NumfmtController = __decorateClass$5([
1040
- OnLifecycle(LifecycleStages.Rendered, NumfmtController),
1041
- __decorateParam$5(0, Inject(SheetInterceptorService)),
1042
- __decorateParam$5(1, Inject(ThemeService)),
1043
- __decorateParam$5(2, IUniverInstanceService),
1044
- __decorateParam$5(3, ICommandService),
1045
- __decorateParam$5(4, Inject(SheetsSelectionsService)),
1046
- __decorateParam$5(5, IRenderManagerService),
1047
- __decorateParam$5(6, INumfmtService),
1048
- __decorateParam$5(7, Inject(ComponentManager)),
1049
- __decorateParam$5(8, ISidebarService),
1050
- __decorateParam$5(9, Inject(LocaleService))
1036
+ NumfmtController = __decorateClass$3([
1037
+ __decorateParam$3(0, Inject(SheetInterceptorService)),
1038
+ __decorateParam$3(1, Inject(ThemeService)),
1039
+ __decorateParam$3(2, IUniverInstanceService),
1040
+ __decorateParam$3(3, ICommandService),
1041
+ __decorateParam$3(4, Inject(SheetsSelectionsService)),
1042
+ __decorateParam$3(5, IRenderManagerService),
1043
+ __decorateParam$3(6, INumfmtService),
1044
+ __decorateParam$3(7, Inject(ComponentManager)),
1045
+ __decorateParam$3(8, ISidebarService),
1046
+ __decorateParam$3(9, Inject(LocaleService))
1051
1047
  ], NumfmtController);
1052
- var __defProp$4 = Object.defineProperty, __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor, __decorateClass$4 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1053
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1048
+ const _NumfmtCurrencyController = class _NumfmtCurrencyController extends Disposable {
1049
+ constructor() {
1050
+ super(...arguments);
1051
+ __publicField(this, "_currencySymbol$", new BehaviorSubject("US"));
1052
+ __publicField(this, "currencySymbol$", this._currencySymbol$.asObservable());
1053
+ }
1054
+ /**
1055
+ * Set the currency symbol by setting the country code.
1056
+ */
1057
+ setCurrencySymbolByCountryCode(symbol) {
1058
+ this._currencySymbol$.next(symbol);
1059
+ }
1060
+ getCurrencySymbol() {
1061
+ return this._currencySymbol$.getValue();
1062
+ }
1063
+ };
1064
+ __name(_NumfmtCurrencyController, "NumfmtCurrencyController");
1065
+ let NumfmtCurrencyController = _NumfmtCurrencyController;
1066
+ var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor, __decorateClass$2 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1067
+ for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1054
1068
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
1055
- return kind && result && __defProp$4(target, key2, result), result;
1056
- }, "__decorateClass$4"), __decorateParam$4 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$4");
1069
+ return kind && result && __defProp$2(target, key2, result), result;
1070
+ }, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$2");
1057
1071
  const createCollectEffectMutation = /* @__PURE__ */ __name(() => {
1058
1072
  let list = [];
1059
1073
  return {
@@ -1118,14 +1132,14 @@ let NumfmtEditorController = (_a4 = class extends Disposable {
1118
1132
  this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT,
1119
1133
  {
1120
1134
  handler: /* @__PURE__ */ __name((value, context, next) => {
1121
- var _a9;
1135
+ var _a7;
1122
1136
  this._collectEffectMutation.clean();
1123
1137
  const currentNumfmtValue = this._numfmtService.getValue(
1124
1138
  context.unitId,
1125
1139
  context.subUnitId,
1126
1140
  context.row,
1127
1141
  context.col
1128
- ), currentNumfmtType = (_a9 = currentNumfmtValue && getPatternType(currentNumfmtValue.pattern)) != null ? _a9 : "", clean = /* @__PURE__ */ __name(() => {
1142
+ ), currentNumfmtType = (_a7 = currentNumfmtValue && getPatternType(currentNumfmtValue.pattern)) != null ? _a7 : "", clean = /* @__PURE__ */ __name(() => {
1129
1143
  currentNumfmtValue && this._collectEffectMutation.add(
1130
1144
  context.unitId,
1131
1145
  context.subUnitId,
@@ -1163,10 +1177,10 @@ let NumfmtEditorController = (_a4 = class extends Disposable {
1163
1177
  this.disposeWithMe(
1164
1178
  this._sheetInterceptorService.interceptCommand({
1165
1179
  getMutations(command) {
1166
- var _a9;
1180
+ var _a7;
1167
1181
  switch (command.id) {
1168
1182
  case SetRangeValuesCommand.id: {
1169
- const workbook = self._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), unitId = workbook.getUnitId(), subUnitId = (_a9 = workbook.getActiveSheet()) == null ? void 0 : _a9.getSheetId();
1183
+ const workbook = self._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), unitId = workbook.getUnitId(), subUnitId = (_a7 = workbook.getActiveSheet()) == null ? void 0 : _a7.getSheetId();
1170
1184
  if (!subUnitId)
1171
1185
  return {
1172
1186
  redos: [],
@@ -1179,15 +1193,15 @@ let NumfmtEditorController = (_a4 = class extends Disposable {
1179
1193
  undos: []
1180
1194
  };
1181
1195
  const cells = list.filter((item) => {
1182
- var _a10;
1183
- return !!((_a10 = item.value) != null && _a10.pattern);
1196
+ var _a8;
1197
+ return !!((_a8 = item.value) != null && _a8.pattern);
1184
1198
  }).map((item) => ({
1185
1199
  row: item.row,
1186
1200
  col: item.col,
1187
1201
  pattern: item.value.pattern
1188
1202
  })), removeCells = list.filter((item) => {
1189
- var _a10;
1190
- return !((_a10 = item.value) != null && _a10.pattern);
1203
+ var _a8;
1204
+ return !((_a8 = item.value) != null && _a8.pattern);
1191
1205
  }).map((item) => ({
1192
1206
  startRow: item.row,
1193
1207
  endColumn: item.col,
@@ -1227,32 +1241,17 @@ let NumfmtEditorController = (_a4 = class extends Disposable {
1227
1241
  );
1228
1242
  }
1229
1243
  }, __name(_a4, "NumfmtEditorController"), _a4);
1230
- NumfmtEditorController = __decorateClass$4([
1231
- OnLifecycle(LifecycleStages.Rendered, NumfmtEditorController),
1232
- __decorateParam$4(0, Inject(SheetInterceptorService)),
1233
- __decorateParam$4(1, Inject(INumfmtService)),
1234
- __decorateParam$4(2, Inject(IUniverInstanceService)),
1235
- __decorateParam$4(3, Inject(Injector)),
1236
- __decorateParam$4(4, Optional(IEditorBridgeService))
1244
+ NumfmtEditorController = __decorateClass$2([
1245
+ __decorateParam$2(0, Inject(SheetInterceptorService)),
1246
+ __decorateParam$2(1, Inject(INumfmtService)),
1247
+ __decorateParam$2(2, Inject(IUniverInstanceService)),
1248
+ __decorateParam$2(3, Inject(Injector)),
1249
+ __decorateParam$2(4, Optional(IEditorBridgeService))
1237
1250
  ], NumfmtEditorController);
1238
1251
  function isNumeric(str) {
1239
1252
  return /^-?\d+(\.\d+)?$/.test(str);
1240
1253
  }
1241
1254
  __name(isNumeric, "isNumeric");
1242
- var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor, __decorateClass$3 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1243
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1244
- (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
1245
- return kind && result && __defProp$3(target, key2, result), result;
1246
- }, "__decorateClass$3"), __decorateParam$3 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$3"), _a5;
1247
- let NumfmtI18nController = (_a5 = class extends Disposable {
1248
- constructor(_localeService) {
1249
- super(), this._localeService = _localeService;
1250
- }
1251
- }, __name(_a5, "NumfmtI18nController"), _a5);
1252
- NumfmtI18nController = __decorateClass$3([
1253
- OnLifecycle(LifecycleStages.Rendered, NumfmtI18nController),
1254
- __decorateParam$3(0, Inject(LocaleService))
1255
- ], NumfmtI18nController);
1256
1255
  const MENU_OPTIONS = [
1257
1256
  {
1258
1257
  label: "sheet.numfmt.general",
@@ -1307,8 +1306,8 @@ const MENU_OPTIONS = [
1307
1306
  pattern: ""
1308
1307
  }
1309
1308
  ], MORE_NUMFMT_TYPE_KEY = "sheet.numfmt.moreNumfmtType", OPTIONS_KEY = "sheet.numfmt.moreNumfmtType.options", MoreNumfmtType = /* @__PURE__ */ __name((props) => {
1310
- var _a9;
1311
- const localeService = useDependency(LocaleService), value = (_a9 = props.value) != null ? _a9 : localeService.t("sheet.numfmt.general");
1309
+ var _a7;
1310
+ const localeService = useDependency(LocaleService), value = (_a7 = props.value) != null ? _a7 : localeService.t("sheet.numfmt.general");
1312
1311
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "more-numfmt-type", children: value });
1313
1312
  }, "MoreNumfmtType"), Options = /* @__PURE__ */ __name(() => {
1314
1313
  const commandService = useDependency(ICommandService), localeService = useDependency(LocaleService), layoutService = useDependency(ILayoutService);
@@ -1404,10 +1403,10 @@ const MENU_OPTIONS = [
1404
1403
  return () => disposable.dispose();
1405
1404
  })
1406
1405
  ).subscribe(() => {
1407
- var _a9, _b;
1406
+ var _a7, _b;
1408
1407
  const selections = selectionManagerService.getCurrentSelections();
1409
1408
  if (selections && selections[0]) {
1410
- const range = selections[0].range, row = range.startRow, col = range.startColumn, numfmtValue = (_b = workbook.getStyles().get((_a9 = worksheet.getCell(row, col)) == null ? void 0 : _a9.s)) == null ? void 0 : _b.n, pattern = numfmtValue == null ? void 0 : numfmtValue.pattern;
1409
+ const range = selections[0].range, row = range.startRow, col = range.startColumn, numfmtValue = (_b = workbook.getStyles().get((_a7 = worksheet.getCell(row, col)) == null ? void 0 : _a7.s)) == null ? void 0 : _b.n, pattern = numfmtValue == null ? void 0 : numfmtValue.pattern;
1411
1410
  let value = localeService.t("sheet.numfmt.general");
1412
1411
  if (pattern) {
1413
1412
  const item = MENU_OPTIONS.filter((item2) => typeof item2 == "object" && item2.pattern).find(
@@ -1460,67 +1459,41 @@ const MENU_OPTIONS = [
1460
1459
  }
1461
1460
  }
1462
1461
  };
1463
- var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor, __decorateClass$2 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1464
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1465
- (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
1466
- return kind && result && __defProp$2(target, key2, result), result;
1467
- }, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$2"), _a6;
1468
- let NumfmtMenuController = (_a6 = class extends Disposable {
1469
- constructor(_injector, _componentManager, _menuManagerService) {
1470
- super(), this._injector = _injector, this._componentManager = _componentManager, this._menuManagerService = _menuManagerService, this._initMenu();
1471
- }
1472
- _initMenu() {
1473
- this._menuManagerService.mergeMenu(menuSchema), this.disposeWithMe(this._componentManager.register(MORE_NUMFMT_TYPE_KEY, MoreNumfmtType)), this.disposeWithMe(this._componentManager.register(OPTIONS_KEY, Options));
1474
- }
1475
- }, __name(_a6, "NumfmtMenuController"), _a6);
1476
- NumfmtMenuController = __decorateClass$2([
1477
- OnLifecycle(LifecycleStages.Rendered, NumfmtMenuController),
1478
- __decorateParam$2(0, Inject(Injector)),
1479
- __decorateParam$2(1, Inject(ComponentManager)),
1480
- __decorateParam$2(2, IMenuManagerService)
1481
- ], NumfmtMenuController);
1482
1462
  var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1483
1463
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1484
1464
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
1485
1465
  return kind && result && __defProp$1(target, key2, result), result;
1486
- }, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$1"), _a7;
1487
- let NumfmtCurrencyController = (_a7 = class extends Disposable {
1488
- constructor(_injector) {
1489
- super();
1490
- __publicField(this, "_currencySymbol$", new BehaviorSubject("US"));
1491
- __publicField(this, "currencySymbol$", this._currencySymbol$.asObservable());
1492
- this._injector = _injector;
1466
+ }, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam$1"), _a5;
1467
+ let NumfmtMenuController = (_a5 = class extends Disposable {
1468
+ constructor(_componentManager, _menuManagerService) {
1469
+ super(), this._componentManager = _componentManager, this._menuManagerService = _menuManagerService, this._initMenu();
1493
1470
  }
1494
- /**
1495
- * Set the currency symbol by setting the country code.
1496
- */
1497
- setCurrencySymbolByCountryCode(symbol) {
1498
- this._currencySymbol$.next(symbol);
1499
- }
1500
- getCurrencySymbol() {
1501
- return this._currencySymbol$.getValue();
1471
+ _initMenu() {
1472
+ this._menuManagerService.mergeMenu(menuSchema), this.disposeWithMe(this._componentManager.register(MORE_NUMFMT_TYPE_KEY, MoreNumfmtType)), this.disposeWithMe(this._componentManager.register(OPTIONS_KEY, Options));
1502
1473
  }
1503
- }, __name(_a7, "NumfmtCurrencyController"), _a7);
1504
- NumfmtCurrencyController = __decorateClass$1([
1505
- OnLifecycle(LifecycleStages.Rendered, NumfmtCurrencyController),
1506
- __decorateParam$1(0, Inject(Injector))
1507
- ], NumfmtCurrencyController);
1508
- const PLUGIN_CONFIG_KEY = "sheets-numfmt.config", defaultPluginConfig = {};
1474
+ }, __name(_a5, "NumfmtMenuController"), _a5);
1475
+ NumfmtMenuController = __decorateClass$1([
1476
+ __decorateParam$1(0, Inject(ComponentManager)),
1477
+ __decorateParam$1(1, IMenuManagerService)
1478
+ ], NumfmtMenuController);
1509
1479
  var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __defNormalProp2 = /* @__PURE__ */ __name((obj, key2, value) => key2 in obj ? __defProp2(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, "__defNormalProp"), __decorateClass = /* @__PURE__ */ __name((decorators, target, key2, kind) => {
1510
1480
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key2) : target, i = decorators.length - 1, decorator; i >= 0; i--)
1511
1481
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key2, result) : decorator(result)) || result);
1512
1482
  return kind && result && __defProp2(target, key2, result), result;
1513
- }, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam"), __publicField2 = /* @__PURE__ */ __name((obj, key2, value) => __defNormalProp2(obj, typeof key2 != "symbol" ? key2 + "" : key2, value), "__publicField"), _a8;
1514
- let UniverSheetsNumfmtPlugin = (_a8 = class extends Plugin {
1483
+ }, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key2) => decorator(target, key2, index), "__decorateParam"), __publicField2 = /* @__PURE__ */ __name((obj, key2, value) => __defNormalProp2(obj, typeof key2 != "symbol" ? key2 + "" : key2, value), "__publicField"), _a6;
1484
+ let UniverSheetsNumfmtPlugin = (_a6 = class extends Plugin {
1515
1485
  constructor(_config = defaultPluginConfig, _injector, _configService) {
1516
1486
  super(), this._config = _config, this._injector = _injector, this._configService = _configService;
1517
1487
  const { menu, ...rest } = this._config;
1518
1488
  menu && this._configService.setConfig("menu", menu, { merge: !0 }), this._configService.setConfig(PLUGIN_CONFIG_KEY, rest);
1519
1489
  }
1520
1490
  onStarting() {
1521
- this._injector.add([INumfmtController, { useClass: NumfmtController, lazy: !1 }]), this._injector.add([NumfmtEditorController]), this._injector.add([UserHabitController]), this._injector.add([SheetsNumfmtCellContentController]), this._injector.add([NumfmtI18nController]), this._injector.add([MenuCurrencyService]), this._injector.add([NumfmtCurrencyController]), this._injector.add([NumfmtMenuController]);
1491
+ this._injector.add([INumfmtController, { useClass: NumfmtController, lazy: !1 }]), this._injector.add([NumfmtEditorController]), this._injector.add([UserHabitController]), this._injector.add([SheetsNumfmtCellContentController]), this._injector.add([MenuCurrencyService]), this._injector.add([NumfmtCurrencyController]), this._injector.add([NumfmtMenuController]);
1492
+ }
1493
+ onRendered() {
1494
+ this._injector.get(INumfmtController), this._injector.get(SheetsNumfmtCellContentController), this._injector.get(NumfmtCurrencyController), this._injector.get(NumfmtEditorController), this._injector.get(NumfmtMenuController);
1522
1495
  }
1523
- }, __name(_a8, "UniverSheetsNumfmtPlugin"), _a8);
1496
+ }, __name(_a6, "UniverSheetsNumfmtPlugin"), _a6);
1524
1497
  __publicField2(UniverSheetsNumfmtPlugin, "pluginName", SHEET_NUMFMT_PLUGIN);
1525
1498
  __publicField2(UniverSheetsNumfmtPlugin, "type", UniverInstanceType.UNIVER_SHEET);
1526
1499
  UniverSheetsNumfmtPlugin = __decorateClass([
@@ -0,0 +1,38 @@
1
+ {
2
+ "sheet": {
3
+ "numfmt": {
4
+ "percent": "درصد",
5
+ "title": "قالب‌بندی عدد",
6
+ "numfmtType": "انواع قالب‌بندی",
7
+ "cancel": "انصراف",
8
+ "confirm": "تایید",
9
+ "general": "عمومی",
10
+ "accounting": "حسابداری",
11
+ "text": "متن",
12
+ "number": "عدد",
13
+ "currency": "ارز",
14
+ "date": "تاریخ",
15
+ "time": "زمان",
16
+ "thousandthPercentile": "جداساز هزارتایی",
17
+ "preview": "پیش‌نمایش",
18
+ "dateTime": "تاریخ و زمان",
19
+ "decimalLength": "اعشار",
20
+ "currencyType": "نماد ارز",
21
+ "moreFmt": "قالب‌ها",
22
+ "financialValue": "مقدار مالی",
23
+ "roundingCurrency": "گرد کردن ارز",
24
+ "timeDuration": "مدت زمان",
25
+ "currencyDes": "قالب‌بندی ارز برای نمایش مقادیر عمومی ارز استفاده می‌شود. قالب‌بندی حسابداری ستونی از مقادیر را با اعشار تراز می‌کند.",
26
+ "accountingDes": "قالب‌بندی عددی حسابداری ستونی از مقادیر را با نمادهای ارز و اعشار تراز می‌کند.",
27
+ "dateType": "نوع تاریخ",
28
+ "dateDes": "قالب‌بندی تاریخ مقادیر سری تاریخ و زمان را به عنوان مقادیر تاریخ ارائه می‌دهد.",
29
+ "negType": "نوع عدد منفی",
30
+ "generalDes": "قالب‌بندی معمولی حاوی هیچ قالب‌بندی عدد خاصی نیست.",
31
+ "thousandthPercentileDes": "قالب‌بندی درصدی برای نمایش اعداد معمولی استفاده می‌شود. قالب‌بندی‌های پولی و حسابداری قالب تخصصی برای محاسبات مقدار پولی ارائه می‌دهند.",
32
+ "addDecimal": "افزایش اعشار",
33
+ "subtractDecimal": "کاهش اعشار",
34
+ "customFormat": "قالب‌بندی سفارشی",
35
+ "customFormatDes": "ایجاد قالب‌بندی‌های عددی سفارشی بر اساس قالب‌بندی‌های موجود."
36
+ }
37
+ }
38
+ }
@@ -1,8 +1,8 @@
1
+ import { INumfmtController } from './type';
1
2
  import { Disposable, ICommandService, IUniverInstanceService, LocaleService, ThemeService } from '@univerjs/core';
2
3
  import { IRenderManagerService } from '@univerjs/engine-render';
3
4
  import { INumfmtService, SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
4
5
  import { ComponentManager, ISidebarService } from '@univerjs/ui';
5
- import { INumfmtController } from './type';
6
6
  export declare class NumfmtController extends Disposable implements INumfmtController {
7
7
  private _sheetInterceptorService;
8
8
  private _themeService;
@@ -1,10 +1,8 @@
1
- import { Disposable, Injector } from '@univerjs/core';
2
1
  import { countryCurrencyMap } from '../base/const/CURRENCY-SYMBOLS';
2
+ import { Disposable } from '@univerjs/core';
3
3
  export declare class NumfmtCurrencyController extends Disposable {
4
- private _injector;
5
4
  private _currencySymbol$;
6
5
  readonly currencySymbol$: import('rxjs').Observable<"AT" | "US" | "CA" | "GB" | "JP" | "IN" | "AU" | "CN" | "KR" | "RU" | "BE" | "CY" | "EE" | "FI" | "FR" | "DE" | "GR" | "IE" | "IT" | "LV" | "LT" | "LU" | "MT" | "NL" | "PT" | "SK" | "SI" | "ES">;
7
- constructor(_injector: Injector);
8
6
  /**
9
7
  * Set the currency symbol by setting the country code.
10
8
  */
@@ -1,9 +1,8 @@
1
- import { Disposable, Injector } from '@univerjs/core';
1
+ import { Disposable } from '@univerjs/core';
2
2
  import { ComponentManager, IMenuManagerService } from '@univerjs/ui';
3
3
  export declare class NumfmtMenuController extends Disposable {
4
- private _injector;
5
4
  private _componentManager;
6
5
  private readonly _menuManagerService;
7
- constructor(_injector: Injector, _componentManager: ComponentManager, _menuManagerService: IMenuManagerService);
6
+ constructor(_componentManager: ComponentManager, _menuManagerService: IMenuManagerService);
8
7
  private _initMenu;
9
8
  }
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export declare const INumfmtController: import('@wendellhu/redi').IdentifierDecorator<INumfmtController>;
16
17
  export interface INumfmtController {
17
18
  openPanel(): void;
18
19
  }
19
- export declare const INumfmtController: import('@wendellhu/redi').IdentifierDecorator<INumfmtController>;
@@ -0,0 +1,3 @@
1
+ import { default as zhCN } from './zh-CN';
2
+ declare const locale: typeof zhCN;
3
+ export default locale;
@@ -1,5 +1,5 @@
1
- import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
1
  import { IUniverSheetsNumfmtConfig } from './controllers/config.schema';
2
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
3
  export declare class UniverSheetsNumfmtPlugin extends Plugin {
4
4
  private readonly _config;
5
5
  readonly _injector: Injector;
@@ -8,4 +8,5 @@ export declare class UniverSheetsNumfmtPlugin extends Plugin {
8
8
  static type: UniverInstanceType;
9
9
  constructor(_config: Partial<IUniverSheetsNumfmtConfig> | undefined, _injector: Injector, _configService: IConfigService);
10
10
  onStarting(): void;
11
+ onRendered(): void;
11
12
  }