@univerjs/sheets-numfmt 0.4.1 → 0.4.2-nightly.202410301606

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.
Files changed (51) hide show
  1. package/README.md +10 -10
  2. package/lib/es/facade.js +16 -0
  3. package/lib/es/index.js +228 -1203
  4. package/lib/set-numfmt.command-CzUTkdYu.mjs +52 -0
  5. package/lib/types/{controllers/__tests__/editor.controller.spec.d.ts → facade/f-range.d.ts} +12 -0
  6. package/lib/types/facade/index.d.ts +0 -0
  7. package/lib/types/index.d.ts +7 -1
  8. package/lib/types/numfmt-plugin.d.ts +3 -4
  9. package/lib/umd/facade.js +1 -0
  10. package/lib/umd/index.js +1 -9
  11. package/package.json +14 -28
  12. package/LICENSE +0 -176
  13. package/lib/cjs/index.js +0 -9
  14. package/lib/index.css +0 -1
  15. package/lib/locale/en-US.json +0 -38
  16. package/lib/locale/fa-IR.json +0 -38
  17. package/lib/locale/ru-RU.json +0 -38
  18. package/lib/locale/vi-VN.json +0 -38
  19. package/lib/locale/zh-CN.json +0 -38
  20. package/lib/locale/zh-TW.json +0 -38
  21. package/lib/types/base/const/MENU-OPTIONS.d.ts +0 -19
  22. package/lib/types/base/types/index.d.ts +0 -7
  23. package/lib/types/components/accounting/index.d.ts +0 -4
  24. package/lib/types/components/currency/index.d.ts +0 -4
  25. package/lib/types/components/custom-format/index.d.ts +0 -3
  26. package/lib/types/components/date/index.d.ts +0 -4
  27. package/lib/types/components/general/index.d.ts +0 -4
  28. package/lib/types/components/index.d.ts +0 -14
  29. package/lib/types/components/more-numfmt-type/MoreNumfmtType.d.ts +0 -7
  30. package/lib/types/components/stories/Panel.stories.d.ts +0 -5
  31. package/lib/types/components/thousandth-percentile/index.d.ts +0 -4
  32. package/lib/types/context/user-habit.d.ts +0 -16
  33. package/lib/types/controllers/__tests__/cell-content.controller.spec.d.ts +0 -16
  34. package/lib/types/controllers/__tests__/test.util.d.ts +0 -15
  35. package/lib/types/controllers/config.schema.d.ts +0 -7
  36. package/lib/types/controllers/menu.schema.d.ts +0 -2
  37. package/lib/types/controllers/numfmt.controller.d.ts +0 -33
  38. package/lib/types/controllers/numfmt.editor.controller.d.ts +0 -20
  39. package/lib/types/controllers/numfmt.menu.controller.d.ts +0 -8
  40. package/lib/types/controllers/user-habit.controller.d.ts +0 -18
  41. package/lib/types/hooks/useCurrencyOptions.d.ts +0 -19
  42. package/lib/types/hooks/useNextTick.d.ts +0 -16
  43. package/lib/types/locale/en-US.d.ts +0 -3
  44. package/lib/types/locale/fa-IR.d.ts +0 -3
  45. package/lib/types/locale/ru-RU.d.ts +0 -3
  46. package/lib/types/locale/vi-VN.d.ts +0 -3
  47. package/lib/types/locale/zh-CN.d.ts +0 -54
  48. package/lib/types/locale/zh-TW.d.ts +0 -3
  49. package/lib/types/menu/menu.d.ts +0 -40
  50. /package/lib/types/controllers/{numfmt.cell-content.controller.d.ts → numfmt-cell-content.controller.d.ts} +0 -0
  51. /package/lib/types/controllers/{numfmt.currency.controller.d.ts → numfmt-currency.controller.d.ts} +0 -0
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @univerjs/sheets-numfmt
1
+ # @univerjs/sheets-numfmt-ui
2
2
  sheets-numfmt
3
3
 
4
4
  ## Package Overview
5
5
 
6
6
  | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
7
7
  | --- | --- | --- | --- | --- | :---: | :---: |
8
- | `@univerjs/sheets-numfmt` | `UniverSheetsNumfmt` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
8
+ | `@univerjs/sheets-numfmt-ui` | `UniverSheetsNumfmt` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
9
9
 
10
10
  ## Introduction
11
11
 
@@ -20,20 +20,20 @@ Providing editing/rendering capabilities around `number format`, such as edit pa
20
20
 
21
21
  ```shell
22
22
  # Using npm
23
- npm install @univerjs/sheets-numfmt
23
+ npm install @univerjs/sheets-numfmt-ui
24
24
 
25
25
  # Using pnpm
26
- pnpm add @univerjs/sheets-numfmt
26
+ pnpm add @univerjs/sheets-numfmt-ui
27
27
  ```
28
28
 
29
29
  ### How to use
30
30
 
31
- Import `@univerjs/sheets-numfmt` at the entrance .
31
+ Import `@univerjs/sheets-numfmt-ui` at the entrance .
32
32
 
33
33
  ```typescript
34
34
  import { LocaleType, LogLevel, Univer } from '@univerjs/core';
35
35
  import { defaultTheme } from '@univerjs/design';
36
- import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
36
+ import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt-ui';
37
37
 
38
38
  // univer
39
39
  const univer = new Univer({
@@ -52,7 +52,7 @@ univer.registerPlugin(UniverSheetsNumfmtPlugin);
52
52
  > If you need to export the snapshot to support the export data format, you need to add [some additional code](/)
53
53
 
54
54
  <!-- Links -->
55
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-numfmt?style=flat-square
56
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-numfmt
57
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-numfmt?style=flat-square
58
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-numfmt?style=flat-square
55
+ [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-numfmt-ui?style=flat-square
56
+ [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-numfmt-ui
57
+ [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-numfmt-ui?style=flat-square
58
+ [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-numfmt-ui?style=flat-square
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ import { FRange } from "@univerjs/sheets/facade";
4
+ import { S as SetNumfmtCommand } from "../set-numfmt.command-CzUTkdYu.mjs";
5
+ const _FRangeLegacy = class _FRangeLegacy extends FRange {
6
+ setNumberFormat(pattern) {
7
+ const values = [];
8
+ return this.forEach((row, col) => values.push({ row, col, pattern })), this._commandService.executeCommand(SetNumfmtCommand.id, {
9
+ unitId: this._workbook.getUnitId(),
10
+ subUnitId: this._worksheet.getSheetId()
11
+ });
12
+ }
13
+ };
14
+ __name(_FRangeLegacy, "FRangeLegacy");
15
+ let FRangeLegacy = _FRangeLegacy;
16
+ FRange.extend(FRangeLegacy);