@univerjs/core 0.1.4 → 0.1.5

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 (85) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +1075 -1058
  3. package/lib/types/basics/plugin-holder.d.ts +5 -19
  4. package/lib/types/basics/univer-doc.d.ts +5 -19
  5. package/lib/types/basics/univer-sheet.d.ts +5 -20
  6. package/lib/types/basics/univer-slide.d.ts +5 -19
  7. package/lib/types/basics/univer.d.ts +9 -23
  8. package/lib/types/common/interceptor.d.ts +2 -16
  9. package/lib/types/docs/data-model/action-types.d.ts +3 -17
  10. package/lib/types/docs/data-model/apply-utils/common.d.ts +2 -16
  11. package/lib/types/docs/data-model/apply-utils/delete-apply.d.ts +2 -16
  12. package/lib/types/docs/data-model/apply-utils/insert-apply.d.ts +2 -16
  13. package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +2 -16
  14. package/lib/types/docs/data-model/document-data-model.d.ts +8 -22
  15. package/lib/types/docs/data-model/empty-snapshot.d.ts +2 -16
  16. package/lib/types/docs/data-model/preset-list-type.d.ts +1 -15
  17. package/lib/types/docs/data-model/replacement.d.ts +2 -16
  18. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +2 -17
  19. package/lib/types/docs/data-model/text-x/text-x.d.ts +4 -18
  20. package/lib/types/docs/data-model/text-x/utils.d.ts +3 -17
  21. package/lib/types/index.d.ts +1 -0
  22. package/lib/types/observer/observable-hooks.d.ts +3 -18
  23. package/lib/types/observer/observable.d.ts +2 -16
  24. package/lib/types/plugin/plugin.d.ts +2 -16
  25. package/lib/types/services/command/command.service.d.ts +6 -21
  26. package/lib/types/services/config/config.service.d.ts +3 -17
  27. package/lib/types/services/context/context.service.d.ts +3 -17
  28. package/lib/types/services/error/error.service.d.ts +2 -16
  29. package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -20
  30. package/lib/types/services/instance/instance.service.d.ts +9 -23
  31. package/lib/types/services/lifecycle/lifecycle.d.ts +2 -16
  32. package/lib/types/services/lifecycle/lifecycle.service.d.ts +5 -19
  33. package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
  34. package/lib/types/services/locale/locale.service.d.ts +5 -18
  35. package/lib/types/services/log/log.service.d.ts +2 -16
  36. package/lib/types/services/permission/permission-point.d.ts +1 -15
  37. package/lib/types/services/permission/permission.service.d.ts +6 -21
  38. package/lib/types/services/permission/univer.permission.service.d.ts +3 -17
  39. package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -18
  40. package/lib/types/services/resource-manager/type.d.ts +7 -21
  41. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +5 -19
  42. package/lib/types/services/snapshot/snapshot-server.service.d.ts +4 -18
  43. package/lib/types/services/snapshot/snapshot-transform.d.ts +6 -20
  44. package/lib/types/services/snapshot/snapshot-utils.d.ts +7 -21
  45. package/lib/types/services/theme/theme.service.d.ts +2 -16
  46. package/lib/types/services/undoredo/undoredo.service.d.ts +8 -24
  47. package/lib/types/shared/__test__/common.spec.d.ts +16 -0
  48. package/lib/types/shared/color/color.d.ts +2 -16
  49. package/lib/types/shared/common.d.ts +15 -22
  50. package/lib/types/shared/compare.d.ts +2 -16
  51. package/lib/types/shared/doc-tool.d.ts +2 -16
  52. package/lib/types/shared/lifecycle.d.ts +5 -20
  53. package/lib/types/shared/lru/lru-map.d.ts +2 -16
  54. package/lib/types/shared/object-matrix.d.ts +3 -17
  55. package/lib/types/shared/props-from.d.ts +2 -16
  56. package/lib/types/shared/rectangle.d.ts +4 -18
  57. package/lib/types/shared/ref-alias.d.ts +8 -1
  58. package/lib/types/shared/rxjs.d.ts +2 -16
  59. package/lib/types/shared/tools.d.ts +2 -16
  60. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +9 -23
  61. package/lib/types/sheets/column-manager.d.ts +4 -18
  62. package/lib/types/sheets/range.d.ts +6 -22
  63. package/lib/types/sheets/row-manager.d.ts +4 -18
  64. package/lib/types/sheets/sheet-snapshot-utils.d.ts +2 -16
  65. package/lib/types/sheets/styles.d.ts +3 -17
  66. package/lib/types/sheets/view-model.d.ts +4 -18
  67. package/lib/types/sheets/workbook.d.ts +9 -23
  68. package/lib/types/sheets/worksheet.d.ts +8 -23
  69. package/lib/types/slides/domain/slide-model.d.ts +5 -19
  70. package/lib/types/types/const/const.d.ts +2 -16
  71. package/lib/types/types/enum/interpolation-point-type.d.ts +3 -3
  72. package/lib/types/types/interfaces/i-cell-data.d.ts +4 -18
  73. package/lib/types/types/interfaces/i-column-data.d.ts +2 -16
  74. package/lib/types/types/interfaces/i-document-data.d.ts +5 -19
  75. package/lib/types/types/interfaces/i-placeholder.d.ts +2 -16
  76. package/lib/types/types/interfaces/i-row-data.d.ts +2 -16
  77. package/lib/types/types/interfaces/i-selection-data.d.ts +3 -17
  78. package/lib/types/types/interfaces/i-shape-properties.d.ts +3 -17
  79. package/lib/types/types/interfaces/i-slide-data.d.ts +12 -26
  80. package/lib/types/types/interfaces/i-style-data.d.ts +5 -19
  81. package/lib/types/types/interfaces/i-univer-data.d.ts +5 -19
  82. package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -20
  83. package/lib/types/types/interfaces/i-worksheet-data.d.ts +8 -22
  84. package/lib/umd/index.js +8 -8
  85. package/package.json +6 -7
@@ -1,20 +1,6 @@
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
- */
1
+ import { IWorkbookData } from '../interfaces';
16
2
  import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
17
- import type { IWorkbookData } from '../interfaces';
3
+
18
4
  /**
19
5
  * Used as an illegal range array return value
20
6
  */
@@ -15,9 +15,9 @@
15
15
  */
16
16
  export declare enum InterpolationPointType {
17
17
  INTERPOLATION_POINT_TYPE_UNSPECIFIED = 0,// The default value, do not use.
18
- MIN = 1,// The interpolation point uses the minimum value in the cells over the range of the conditional format.
19
- MAX = 2,// The interpolation point uses the maximum value in the cells over the range of the conditional format.
18
+ MIN = 1,// The interpolation point uses the minimum value in the cells over the range of the conditional formatting.
19
+ MAX = 2,// The interpolation point uses the maximum value in the cells over the range of the conditional formatting.
20
20
  NUMBER = 3,// The interpolation point uses exactly the value in InterpolationPoint.value
21
- PERCENT = 4,// The interpolation point is the given percentage over all the cells in the range of the conditional format. This is equivalent to NUMBER if the value was: =(MAX(FLATTEN(range)) * (value / 100)) + (MIN(FLATTEN(range)) * (1 - (value / 100))) (where errors in the range are ignored when flattening).
21
+ PERCENT = 4,// The interpolation point is the given percentage over all the cells in the range of the conditional formatting. This is equivalent to NUMBER if the value was: =(MAX(FLATTEN(range)) * (value / 100)) + (MIN(FLATTEN(range)) * (1 - (value / 100))) (where errors in the range are ignored when flattening).
22
22
  PERCENTILE = 5
23
23
  }
@@ -1,22 +1,8 @@
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 { Nullable } from '../../shared/types';
1
+ import { IStyleData } from './i-style-data';
2
+ import { IDocumentData } from './i-document-data';
17
3
  import { CellValueType } from '../enum/text-style';
18
- import type { IDocumentData } from './i-document-data';
19
- import type { IStyleData } from './i-style-data';
4
+ import { Nullable } from '../../shared/types';
5
+
20
6
  /**
21
7
  * Cell value type
22
8
  */
@@ -1,19 +1,5 @@
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 { BooleanNumber } from '../enum';
1
+ import { BooleanNumber } from '../enum';
2
+
17
3
  /**
18
4
  * Properties of column data
19
5
  */
@@ -1,22 +1,8 @@
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 { ISize } from '../../services/floating-object/floating-object-interfaces';
17
- import type { BooleanNumber, CellValueType, HorizontalAlign, LocaleType, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
18
- import type { IExtraModelData } from './i-extra-model-data';
19
- import type { IColorStyle, IStyleBase } from './i-style-data';
1
+ import { IColorStyle, IStyleBase } from './i-style-data';
2
+ import { IExtraModelData } from './i-extra-model-data';
3
+ import { BooleanNumber, CellValueType, HorizontalAlign, LocaleType, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
4
+ import { ISize } from '../../services/floating-object/floating-object-interfaces';
5
+
20
6
  /**
21
7
  * Properties of document
22
8
  */
@@ -1,19 +1,5 @@
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 { PlaceholderType } from '../enum/place-holder-type';
1
+ import { PlaceholderType } from '../enum/place-holder-type';
2
+
17
3
  export interface IPlaceholder {
18
4
  type: PlaceholderType;
19
5
  index: number;
@@ -1,19 +1,5 @@
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 { BooleanNumber } from '../enum';
1
+ import { BooleanNumber } from '../enum';
2
+
17
3
  /**
18
4
  * Properties of row data
19
5
  */
@@ -1,20 +1,6 @@
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 { Nullable } from '../../shared/types';
17
- import type { IRange } from './i-range';
1
+ import { IRange } from './i-range';
2
+ import { Nullable } from '../../shared/types';
3
+
18
4
  /**
19
5
  * Properties of selection data
20
6
  */
@@ -1,20 +1,6 @@
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 { BorderStyleTypes } from '../enum/border-style-types';
17
- import type { IColorStyle } from './i-style-data';
1
+ import { IColorStyle } from './i-style-data';
2
+ import { BorderStyleTypes } from '../enum/border-style-types';
3
+
18
4
  /**
19
5
  * ShapeProperties
20
6
  */
@@ -1,29 +1,15 @@
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 { ISize, ITransformState } from '../../services/floating-object/floating-object-interfaces';
17
- import type { IKeyType, Nullable } from '../../shared/types';
18
- import type { LocaleType, ThemeColorType } from '../enum';
19
- import type { ShapeType } from '../enum/shape-type';
20
- import type { ICustomBlock, IDocumentData, ILists } from './i-document-data';
21
- import type { IExtraModelData } from './i-extra-model-data';
22
- import type { IImageProperties } from './i-image-properties';
23
- import type { IPlaceholder } from './i-placeholder';
24
- import type { IShapeProperties } from './i-shape-properties';
25
- import type { IColorStyle, IStyleBase, IStyleData } from './i-style-data';
26
- import type { IWorksheetData } from './i-worksheet-data';
1
+ import { IWorksheetData } from './i-worksheet-data';
2
+ import { IColorStyle, IStyleBase, IStyleData } from './i-style-data';
3
+ import { IShapeProperties } from './i-shape-properties';
4
+ import { IPlaceholder } from './i-placeholder';
5
+ import { IImageProperties } from './i-image-properties';
6
+ import { IExtraModelData } from './i-extra-model-data';
7
+ import { ICustomBlock, IDocumentData, ILists } from './i-document-data';
8
+ import { ShapeType } from '../enum/shape-type';
9
+ import { LocaleType, ThemeColorType } from '../enum';
10
+ import { IKeyType, Nullable } from '../../shared/types';
11
+ import { ISize, ITransformState } from '../../services/floating-object/floating-object-interfaces';
12
+
27
13
  export interface ISlideData extends IReferenceSource, IExtraModelData {
28
14
  id: string;
29
15
  locale?: LocaleType;
@@ -1,22 +1,8 @@
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 { Nullable } from '../../shared/types';
17
- import type { BorderStyleTypes } from '../enum/border-style-types';
18
- import type { BaselineOffset, BooleanNumber, HorizontalAlign, TextDecoration, TextDirection, VerticalAlign, WrapStrategy } from '../enum/text-style';
19
- import type { ThemeColorType } from '../enum/theme-color-type';
1
+ import { ThemeColorType } from '../enum/theme-color-type';
2
+ import { BaselineOffset, BooleanNumber, HorizontalAlign, TextDecoration, TextDirection, VerticalAlign, WrapStrategy } from '../enum/text-style';
3
+ import { BorderStyleTypes } from '../enum/border-style-types';
4
+ import { Nullable } from '../../shared/types';
5
+
20
6
  /**
21
7
  * Properties of text decoration
22
8
  */
@@ -1,22 +1,8 @@
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 { LogLevel } from '../../services/log/log.service';
17
- import type { IStyleSheet } from '../../services/theme/theme.service';
18
- import type { ILocales } from '../../shared/locale';
19
- import type { LocaleType } from '../enum';
1
+ import { LocaleType } from '../enum';
2
+ import { ILocales } from '../../shared/locale';
3
+ import { IStyleSheet } from '../../services/theme/theme.service';
4
+ import { LogLevel } from '../../services/log/log.service';
5
+
20
6
  export interface IUniverData {
21
7
  theme: IStyleSheet;
22
8
  locale: LocaleType;
@@ -1,23 +1,9 @@
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 { IKeyType, Nullable } from '../../shared/types';
17
- import type { LocaleType } from '../enum';
18
- import type { IExtraModelData } from './i-extra-model-data';
19
- import type { IStyleData } from './i-style-data';
20
- import type { IWorksheetData } from './i-worksheet-data';
1
+ import { IWorksheetData } from './i-worksheet-data';
2
+ import { IStyleData } from './i-style-data';
3
+ import { IExtraModelData } from './i-extra-model-data';
4
+ import { LocaleType } from '../enum';
5
+ import { IKeyType, Nullable } from '../../shared/types';
6
+
21
7
  /**
22
8
  * Properties of a workbook's configuration
23
9
  */
@@ -1,25 +1,11 @@
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 { IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
17
- import type { BooleanNumber } from '../enum';
18
- import type { ICellData } from './i-cell-data';
19
- import type { IColumnData } from './i-column-data';
20
- import type { IFreeze } from './i-freeze';
21
- import type { IRange, IRangeType } from './i-range';
22
- import type { IRowData } from './i-row-data';
1
+ import { IRowData } from './i-row-data';
2
+ import { IRange, IRangeType } from './i-range';
3
+ import { IFreeze } from './i-freeze';
4
+ import { IColumnData } from './i-column-data';
5
+ import { ICellData } from './i-cell-data';
6
+ import { BooleanNumber } from '../enum';
7
+ import { IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
8
+
23
9
  /**
24
10
  * Snapshot of a worksheet.
25
11
  */