@univerjs/sheets 0.1.9 → 0.1.11

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 (59) hide show
  1. package/lib/cjs/index.js +2 -2
  2. package/lib/es/index.js +1371 -1416
  3. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +1 -1
  4. package/lib/types/commands/commands/move-range.command.d.ts +1 -1
  5. package/lib/types/commands/commands/set-border-command.d.ts +1 -1
  6. package/lib/types/commands/commands/set-defined-name.command.d.ts +1 -1
  7. package/lib/types/commands/commands/set-range-values.command.d.ts +1 -1
  8. package/lib/types/commands/commands/set-workbook-name.command.d.ts +10 -0
  9. package/lib/types/commands/commands/set-worksheet-show.command.d.ts +2 -0
  10. package/lib/types/commands/commands/utils/selection-utils.d.ts +11 -2
  11. package/lib/types/commands/mutations/__tests__/create-command-test-bed.d.ts +1 -1
  12. package/lib/types/commands/mutations/add-worksheet-merge.mutation.d.ts +2 -2
  13. package/lib/types/commands/mutations/insert-row-col.mutation.d.ts +2 -2
  14. package/lib/types/commands/mutations/insert-sheet.mutation.d.ts +2 -2
  15. package/lib/types/commands/mutations/move-rows-cols.mutation.d.ts +1 -1
  16. package/lib/types/commands/mutations/numfmt-mutation.d.ts +1 -1
  17. package/lib/types/commands/mutations/remove-row-col.mutation.d.ts +2 -2
  18. package/lib/types/commands/mutations/remove-sheet.mutation.d.ts +2 -2
  19. package/lib/types/commands/mutations/remove-worksheet-merge.mutation.d.ts +2 -2
  20. package/lib/types/commands/mutations/set-col-visible.mutation.d.ts +1 -1
  21. package/lib/types/commands/mutations/set-frozen.mutation.d.ts +1 -1
  22. package/lib/types/commands/mutations/set-hide-gridlines.mutatiom.d.ts +1 -1
  23. package/lib/types/commands/mutations/set-range-values.mutation.d.ts +1 -1
  24. package/lib/types/commands/mutations/set-row-visible.mutation.d.ts +1 -1
  25. package/lib/types/commands/mutations/set-tab-color.mutation.d.ts +1 -1
  26. package/lib/types/commands/mutations/set-workbook-name.mutation.d.ts +7 -0
  27. package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +1 -1
  28. package/lib/types/commands/mutations/set-worksheet-hide.mutation.d.ts +1 -1
  29. package/lib/types/commands/mutations/set-worksheet-name.mutation.d.ts +1 -1
  30. package/lib/types/commands/mutations/set-worksheet-order.mutation.d.ts +1 -1
  31. package/lib/types/commands/mutations/set-worksheet-right-to-left.mutation.d.ts +1 -1
  32. package/lib/types/commands/mutations/set-worksheet-row-height.mutation.d.ts +2 -2
  33. package/lib/types/commands/operations/selection.operation.d.ts +2 -2
  34. package/lib/types/commands/utils/handle-merge-operation.d.ts +3 -3
  35. package/lib/types/commands/utils/handle-range-mutation.d.ts +2 -2
  36. package/lib/types/controllers/__tests__/util.d.ts +1 -1
  37. package/lib/types/controllers/basic-worksheet.controller.d.ts +1 -1
  38. package/lib/types/controllers/defined-name-data.controller.d.ts +1 -1
  39. package/lib/types/controllers/feature-calculation.controller.d.ts +1 -1
  40. package/lib/types/controllers/merge-cell.controller.d.ts +6 -6
  41. package/lib/types/index.d.ts +3 -1
  42. package/lib/types/locale/index.d.ts +1 -0
  43. package/lib/types/locale/ru-RU.d.ts +4 -0
  44. package/lib/types/services/__tests__/util.d.ts +1 -1
  45. package/lib/types/services/border-style-manager.service.d.ts +1 -1
  46. package/lib/types/services/numfmt/numfmt.service.d.ts +1 -1
  47. package/lib/types/services/ref-range/__tests__/__testing__.d.ts +1 -1
  48. package/lib/types/services/ref-range/ref-range.service.d.ts +4 -4
  49. package/lib/types/services/ref-range/type.d.ts +8 -8
  50. package/lib/types/services/ref-range/util.d.ts +5 -5
  51. package/lib/types/services/selection-manager.service.d.ts +2 -2
  52. package/lib/types/services/sheet-interceptor/__tests__/create-core-test-bed.d.ts +1 -1
  53. package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +1 -1
  54. package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +1 -1
  55. package/lib/types/sheets-plugin.d.ts +1 -1
  56. package/lib/umd/index.js +2 -2
  57. package/package.json +13 -14
  58. package/lib/types/basics/__tests__/numfmt-kit.spec.d.ts +0 -16
  59. package/lib/types/basics/numfmt-kit.d.ts +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": false,
5
5
  "description": "UniverSheet normal base-sheets",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -50,24 +50,23 @@
50
50
  "npm": ">=8.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@wendellhu/redi": "^0.13.3",
53
+ "@wendellhu/redi": "^0.15.1",
54
54
  "rxjs": ">=7.0.0",
55
- "@univerjs/core": "0.1.9",
56
- "@univerjs/engine-formula": "0.1.9",
57
- "@univerjs/engine-numfmt": "0.1.9",
58
- "@univerjs/engine-render": "0.1.9"
55
+ "@univerjs/core": "0.1.11",
56
+ "@univerjs/engine-formula": "0.1.11",
57
+ "@univerjs/engine-render": "0.1.11"
59
58
  },
60
59
  "devDependencies": {
61
- "@wendellhu/redi": "^0.13.3",
60
+ "@wendellhu/redi": "^0.15.1",
62
61
  "rxjs": "^7.8.1",
63
62
  "typescript": "^5.4.5",
64
- "vite": "^5.2.10",
65
- "vitest": "^1.5.0",
66
- "@univerjs/engine-numfmt": "0.1.9",
67
- "@univerjs/core": "0.1.9",
68
- "@univerjs/engine-formula": "0.1.9",
69
- "@univerjs/engine-render": "0.1.9",
70
- "@univerjs/shared": "0.1.9"
63
+ "vite": "^5.2.11",
64
+ "vitest": "^1.6.0",
65
+ "@univerjs/core": "0.1.11",
66
+ "@univerjs/engine-formula": "0.1.11",
67
+ "@univerjs/engine-numfmt": "0.1.11",
68
+ "@univerjs/shared": "0.1.11",
69
+ "@univerjs/engine-render": "0.1.11"
71
70
  },
72
71
  "scripts": {
73
72
  "test": "vitest run",
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export {};
@@ -1,41 +0,0 @@
1
- import { ICellData, Nullable, Styles } from '@univerjs/core';
2
-
3
- /**
4
- * Handling number formats in styles
5
- *
6
- * @param oldCell
7
- * @param cell
8
- */
9
- export declare function handleNumfmtInCell(oldCell: Nullable<ICellData>, cell: Nullable<ICellData>, styles: Styles | undefined): Nullable<ICellData>;
10
- /**
11
- * Process the priority of the newly set number format and the original format.
12
- *
13
- * Here is the priority of the number format in Excel:
14
- * ┌─────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
15
- * │ │ new format │
16
- * ├─────────────────┼────────────┬────────────┬────────────┬────────────┬──────────┬──────────┬────────────┬──────────┬────────────┬──────────┬────────────┬───────────┤
17
- * │ Original format │ General │ Number │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Special │ Custom │
18
- * ├─────────────────┼────────────┼────────────┼────────────┼────────────┼──────────┼──────────┼────────────┼──────────┼────────────┼──────────┼────────────┼───────────┤
19
- * │ General │ General │ Number │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Special │ Custom │
20
- * │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │ Number │
21
- * │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │ Currency │
22
- * │ Accounting │ Accounting │ Accounting │ Accounting │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Accounting │ Custom │
23
- * │ Date │ Date │ Date │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Date │ Custom │
24
- * │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │ Time │
25
- * │ Percentage │ Percentage │ Percentage │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Percentage │ Custom │
26
- * │ Fraction │ Fraction │ Fraction │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Fraction │ Custom │
27
- * │ Scientific │ Scientific │ Scientific │ Currency │ Accounting │ Date │ Time │ Percentage │ Fraction │ Scientific │ Text │ Scientific │ Custom │
28
- * │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │ Text │
29
- * │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │ Special │
30
- * │ Custom │ Custom │ Custom │ Currency │ Accounting │ Date │ Custom │ Percentage │ Fraction │ Scientific │ Text │ Custom │ Custom │
31
- * └─────────────────┴────────────┴────────────┴────────────┴────────────┴──────────┴──────────┴────────────┴──────────┴────────────┴──────────┴────────────┴───────────┘
32
- *
33
- * The number formats supported by Univer are different from Excel, so it only processes the parts that are the same as Excel. For different parts, we consider the newly set number format to have a higher priority.
34
- *
35
- * In the future, if Univer completely matches Excel, we will implement Excel’s priority rules.
36
- *
37
- * @param oldPattern
38
- * @param pattern
39
- * @returns
40
- */
41
- export declare function compareNumfmtPriority(oldPattern: string, pattern: string): string;