@univerjs/sheets 0.1.0-alpha.2 → 0.1.0-beta.0

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 (61) hide show
  1. package/lib/cjs/index.js +1 -3
  2. package/lib/es/index.js +3403 -4183
  3. package/lib/types/basics/interfaces/mutation-interface.d.ts +29 -29
  4. package/lib/types/basics/interfaces/selection-config.d.ts +1 -1
  5. package/lib/types/commands/commands/add-worksheet-merge.command.d.ts +2 -2
  6. package/lib/types/commands/commands/clear-selection-format.command.d.ts +2 -2
  7. package/lib/types/commands/commands/copy-to-worksheet.command.d.ts +3 -3
  8. package/lib/types/commands/commands/copy-worksheet.command.d.ts +2 -2
  9. package/lib/types/commands/commands/delete-range-move-left.command.d.ts +1 -1
  10. package/lib/types/commands/commands/delete-range-move-up.command.d.ts +1 -1
  11. package/lib/types/commands/commands/insert-range-move-down.command.d.ts +1 -1
  12. package/lib/types/commands/commands/insert-range-move-right.command.d.ts +1 -1
  13. package/lib/types/commands/commands/insert-row-col.command.d.ts +7 -5
  14. package/lib/types/commands/commands/insert-sheet.command.d.ts +2 -2
  15. package/lib/types/commands/commands/remove-row-col.command.d.ts +1 -1
  16. package/lib/types/commands/commands/remove-sheet.command.d.ts +2 -2
  17. package/lib/types/commands/commands/set-col-visible.command.d.ts +2 -2
  18. package/lib/types/commands/commands/set-hide-gridlines.command.d.ts +2 -2
  19. package/lib/types/commands/commands/set-range-values.command.d.ts +5 -5
  20. package/lib/types/commands/commands/set-row-visible.command.d.ts +2 -2
  21. package/lib/types/commands/commands/set-style.command.d.ts +2 -2
  22. package/lib/types/commands/commands/set-worksheet-activate.command.d.ts +2 -2
  23. package/lib/types/commands/commands/set-worksheet-hide.command.d.ts +1 -1
  24. package/lib/types/commands/commands/set-worksheet-name.command.d.ts +2 -2
  25. package/lib/types/commands/commands/set-worksheet-order.command.d.ts +2 -2
  26. package/lib/types/commands/commands/set-worksheet-right-to-left.command.d.ts +2 -2
  27. package/lib/types/commands/commands/set-worksheet-row-height.command.d.ts +2 -1
  28. package/lib/types/commands/commands/utils/selection-utils.d.ts +42 -0
  29. package/lib/types/commands/mutations/delete-range.mutation.d.ts +1 -1
  30. package/lib/types/commands/mutations/insert-range.mutation.d.ts +2 -2
  31. package/lib/types/commands/mutations/move-range.mutation.d.ts +5 -5
  32. package/lib/types/commands/mutations/move-rows-cols.mutation.d.ts +4 -4
  33. package/lib/types/commands/mutations/numfmt-mutation.d.ts +5 -5
  34. package/lib/types/commands/mutations/set-col-visible.mutation.d.ts +8 -8
  35. package/lib/types/commands/mutations/set-frozen.mutation.d.ts +2 -2
  36. package/lib/types/commands/mutations/set-hide-gridlines.mutatiom.d.ts +2 -2
  37. package/lib/types/commands/mutations/set-range-values.mutation.d.ts +4 -4
  38. package/lib/types/commands/mutations/set-row-visible.mutation.d.ts +8 -8
  39. package/lib/types/commands/mutations/set-tab-color.mutation.d.ts +2 -2
  40. package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +4 -5
  41. package/lib/types/commands/mutations/set-worksheet-config.mutation.d.ts +2 -2
  42. package/lib/types/commands/mutations/set-worksheet-hide.mutation.d.ts +2 -2
  43. package/lib/types/commands/mutations/set-worksheet-name.mutation.d.ts +2 -2
  44. package/lib/types/commands/mutations/set-worksheet-order.mutation.d.ts +2 -2
  45. package/lib/types/commands/mutations/set-worksheet-right-to-left.mutation.d.ts +2 -2
  46. package/lib/types/commands/mutations/set-worksheet-row-height.mutation.d.ts +9 -10
  47. package/lib/types/commands/operations/selection.operation.d.ts +2 -2
  48. package/lib/types/commands/operations/set-worksheet-active.operation.d.ts +2 -2
  49. package/lib/types/commands/utils/interface.d.ts +2 -2
  50. package/lib/types/index.d.ts +5 -5
  51. package/lib/types/locale/en-US.d.ts +5 -1
  52. package/lib/types/locale/zh-CN.d.ts +5 -1
  53. package/lib/types/services/numfmt/numfmt.service.d.ts +5 -5
  54. package/lib/types/services/numfmt/type.d.ts +7 -7
  55. package/lib/types/services/permission/permission-point.d.ts +3 -3
  56. package/lib/types/services/permission/sheet-permission.service.d.ts +3 -3
  57. package/lib/types/services/ref-range/ref-range.service.d.ts +3 -3
  58. package/lib/types/services/sheet-interceptor/utils/interceptor.d.ts +2 -2
  59. package/lib/umd/index.js +1 -3
  60. package/package.json +10 -12
  61. package/lib/types/commands/commands/utils/selection-util.d.ts +0 -66
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-beta.0",
4
4
  "description": "UniverSheet normal base-sheets",
5
5
  "keywords": [],
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -31,28 +31,26 @@
31
31
  ],
32
32
  "private": false,
33
33
  "devDependencies": {
34
- "@ctrl/tinycolor": "^4.0.2",
35
- "@vitest/coverage-istanbul": "^1.0.2",
34
+ "@vitest/coverage-istanbul": "^1.0.4",
36
35
  "@wendellhu/redi": "^0.12.12",
37
36
  "happy-dom": "^12.10.3",
38
37
  "less": "^4.2.0",
39
38
  "rxjs": "^7.8.1",
40
39
  "typescript": "^5.3.3",
41
- "vite": "^5.0.7",
40
+ "vite": "^5.0.8",
42
41
  "vite-plugin-dts": "^3.6.4",
43
42
  "vite-plugin-externals": "^0.6.2",
44
- "vitest": "^1.0.2",
45
- "@univerjs/core": "0.1.0-alpha.2",
46
- "@univerjs/engine-render": "0.1.0-alpha.2",
47
- "@univerjs/engine-formula": "0.1.0-alpha.2"
43
+ "vitest": "^1.0.4",
44
+ "@univerjs/core": "0.1.0-beta.0",
45
+ "@univerjs/engine-formula": "0.1.0-beta.0",
46
+ "@univerjs/engine-render": "0.1.0-beta.0"
48
47
  },
49
48
  "peerDependencies": {
50
- "@ctrl/tinycolor": ">=4.0.0",
51
49
  "@wendellhu/redi": ">=0.12.12",
52
50
  "rxjs": ">=7.0.0",
53
- "@univerjs/core": "0.1.0-alpha.2",
54
- "@univerjs/engine-formula": "0.1.0-alpha.2",
55
- "@univerjs/engine-render": "0.1.0-alpha.2"
51
+ "@univerjs/core": "0.1.0-beta.0",
52
+ "@univerjs/engine-formula": "0.1.0-beta.0",
53
+ "@univerjs/engine-render": "0.1.0-beta.0"
56
54
  },
57
55
  "scripts": {
58
56
  "test": "vitest run",
@@ -1,66 +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
- import type { IRange, ISelection, ISelectionCell, Nullable, Worksheet } from '@univerjs/core';
17
- import { Direction } from '@univerjs/core';
18
- export interface IExpandParams {
19
- left?: boolean;
20
- right?: boolean;
21
- up?: boolean;
22
- down?: boolean;
23
- }
24
- export declare function getCellAtRowCol(row: number, col: number, worksheet: Worksheet): ISelectionCell;
25
- export declare function findNextRange(startRange: IRange, direction: Direction, worksheet: Worksheet, boundary?: IRange, isFindNext?: boolean, nextStep?: number, isGoBack?: boolean): IRange;
26
- export declare function findNextGapRange(startRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
27
- export declare function findNextRangeExpand(startRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
28
- export declare function expandToNextGapRange(startRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
29
- /**
30
- * Adjust the range to align merged cell's borders.
31
- */
32
- export declare function alignToMergedCellsBorders(startRange: IRange, worksheet: Worksheet, shouldRecursive?: boolean): IRange;
33
- export declare function expandToNextCell(startRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
34
- /**
35
- * This function is considered as a reversed operation of `expandToNextGapCell` but there are slightly differences.
36
- * @param startRange
37
- * @param direction
38
- * @param worksheet
39
- */
40
- export declare function shrinkToNextGapRange(startRange: IRange, anchorRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
41
- /**
42
- * This function is considered as a reversed operation of `expandToNextCell` but there are some slightly differences.
43
- * @param startRange
44
- * @param direction
45
- * @param worksheet
46
- */
47
- export declare function shrinkToNextCell(startRange: IRange, direction: Direction, worksheet: Worksheet): IRange;
48
- export declare function expandToContinuousRange(startRange: IRange, directions: IExpandParams, worksheet: Worksheet): IRange;
49
- export declare function expandToWholeSheet(worksheet: Worksheet): IRange;
50
- export declare function getStartRange(range: IRange, primary: Nullable<ISelectionCell>, direction: Direction): IRange;
51
- export declare function checkIfShrink(selection: ISelection, direction: Direction, worksheet: Worksheet): boolean;
52
- /**
53
- * Get the default primary cell (the most top-left cell) of a range.
54
- * @param range
55
- * @param worksheet
56
- */
57
- export declare function getPrimaryForRange(range: IRange, worksheet: Worksheet): ISelectionCell;
58
- export interface IInterval {
59
- [index: string]: [start: number, end: number];
60
- }
61
- /**
62
- * Calculate the real length of the intervals
63
- * @param intervalsObject
64
- * @returns
65
- */
66
- export declare function calculateTotalLength(intervalsObject: IInterval): number;