@univerjs-pro/bases 1.6.2 → 1.7.0-alpha.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.
package/lib/worker.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t,b as n,g as r,i,l as a,n as o,o as s,s as c,u as l,v as u,y as d}from"./config-DI8L5ihb.js";import{BaseDataModel as f,DependentOn as p,ICommandService as m,IConfigService as h,IUniverInstanceService as g,Inject as _,Injector as v,Plugin as y,UniverInstanceType as b,merge as x}from"@univerjs/core";import{UniverLicensePlugin as S}from"@univerjs-pro/license";import{UniverProFormulaEnginePlugin as C}from"@univerjs-pro/engine-formula/worker";let w=class extends y{constructor(e=i,t,n,r,s){super(),this._config=e,this._injector=t,this._commandService=n,this._configService=r,this._univerInstanceService=s;let{...p}=x({},i,this._config);this._configService.setConfig(o,p),this._univerInstanceService.registerCtorForType(b.UNIVER_BASE,f),[[d,{useClass:u}],[l,{useClass:a}]].forEach(e=>this._injector.add(e)),this.disposeWithMe(this._commandService.registerCommand(c))}};n(w,`pluginName`,`REMOTE_BASES_PLUGIN`),n(w,`packageName`,t),n(w,`version`,s),n(w,`type`,b.UNIVER_BASE),w=r([p(S,C),e(1,_(v)),e(2,m),e(3,h),e(4,g)],w);export{w as UniverRemoteBasesPlugin};
1
+ import{_ as e,a as t,b as n,g as r,i,l as a,n as o,o as s,s as c,u as l,v as u,y as d}from"./config-D64l6SYF.js";import{BaseDataModel as f,DependentOn as p,ICommandService as m,IConfigService as h,IUniverInstanceService as g,Inject as _,Injector as v,Plugin as y,UniverInstanceType as b,merge as x}from"@univerjs/core";import{UniverLicensePlugin as S}from"@univerjs-pro/license";import{UniverFormulaEnginePlugin as C}from"@univerjs/engine-formula/worker";let w=class extends y{constructor(e=i,t,n,r,s){super(),this._config=e,this._injector=t,this._commandService=n,this._configService=r,this._univerInstanceService=s;let{...p}=x({},i,this._config);this._configService.setConfig(o,p),this._univerInstanceService.registerCtorForType(b.UNIVER_BASE,f),[[d,{useClass:u}],[l,{useClass:a}]].forEach(e=>this._injector.add(e)),this.disposeWithMe(this._commandService.registerCommand(c))}};n(w,`pluginName`,`REMOTE_BASES_PLUGIN`),n(w,`packageName`,t),n(w,`version`,s),n(w,`type`,b.UNIVER_BASE),w=r([p(S,C),e(1,_(v)),e(2,m),e(3,h),e(4,g)],w);export{w as UniverRemoteBasesPlugin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/bases",
3
- "version": "1.6.2",
3
+ "version": "1.7.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "Base database core model and commands for Univer.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -69,18 +69,17 @@
69
69
  "lib"
70
70
  ],
71
71
  "dependencies": {
72
- "@univerjs-pro/engine-formula": "1.6.2",
73
- "@univerjs-pro/license": "1.6.2",
74
- "@univerjs/core": "1.6.2",
75
- "@univerjs/engine-formula": "1.6.2",
76
- "@univerjs/protocol": "1.6.2",
77
- "@univerjs/rpc": "1.6.2",
72
+ "@univerjs-pro/license": "1.7.0-alpha.0",
73
+ "@univerjs/core": "1.7.0-alpha.0",
74
+ "@univerjs/engine-formula": "1.7.0-alpha.0",
75
+ "@univerjs/protocol": "1.7.0-alpha.0",
76
+ "@univerjs/rpc": "1.7.0-alpha.0",
78
77
  "rxjs": "7.8.2"
79
78
  },
80
79
  "devDependencies": {
81
- "@univerjs-infra/shared": "1.6.2",
82
- "tsrs": "7.1.0-beta.tsrs2",
83
- "vitest": "^5.1.1"
80
+ "@univerjs-infra/shared": "1.7.0-alpha.0",
81
+ "tsrs": "7.1.0-beta.tsrs6",
82
+ "vitest": "^5.1.2"
84
83
  },
85
84
  "scripts": {
86
85
  "test": "vitest run",
@@ -1,2 +0,0 @@
1
- import type { BaseDataModel, IAccessor, JSONXActions } from '@univerjs/core';
2
- export declare function executeBaseUndoableMutation(accessor: IAccessor, unitId: string, createRedoOp: (base: BaseDataModel) => JSONXActions): boolean;
@@ -1 +0,0 @@
1
- export declare function createBaseOptionalFormulaIdentifier<T>(id: string): import("@univerjs/core").IdentifierDecorator<T>;
@@ -1,102 +0,0 @@
1
- import type { IBaseInvalidation, IBaseSnapshot, IFieldSnapshot, IRecordSnapshot, ITableSnapshot, IViewSnapshot, JSONXActions } from '@univerjs/core';
2
- export type BaseJson1Command = {
3
- type: 'createTable';
4
- table: ITableSnapshot;
5
- index?: number;
6
- } | {
7
- type: 'renameTable';
8
- tableId: string;
9
- name: string;
10
- } | {
11
- type: 'deleteTable';
12
- tableId: string;
13
- } | {
14
- type: 'createField';
15
- tableId: string;
16
- field: IFieldSnapshot;
17
- index?: number;
18
- } | {
19
- type: 'updateField';
20
- tableId: string;
21
- fieldId: string;
22
- patch: Partial<IFieldSnapshot>;
23
- } | {
24
- type: 'deleteField';
25
- tableId: string;
26
- fieldId: string;
27
- } | {
28
- type: 'createRecord';
29
- tableId: string;
30
- record: IRecordSnapshot;
31
- } | {
32
- type: 'deleteRecord';
33
- tableId: string;
34
- recordId: string;
35
- } | {
36
- type: 'updateRecordOrder';
37
- tableId: string;
38
- recordId: string;
39
- orderKey: string;
40
- } | {
41
- type: 'updateCell';
42
- tableId: string;
43
- recordId: string;
44
- fieldId: string;
45
- value: unknown;
46
- } | {
47
- type: 'setRecordValues';
48
- tableId: string;
49
- patches: Array<{
50
- recordId: string;
51
- values: Record<string, unknown>;
52
- }>;
53
- } | {
54
- type: 'setRangeValues';
55
- tableId: string;
56
- patches: Array<{
57
- row: number;
58
- col: number;
59
- value: unknown;
60
- }>;
61
- } | {
62
- type: 'createView';
63
- tableId: string;
64
- view: IViewSnapshot;
65
- index?: number;
66
- } | {
67
- type: 'deleteView';
68
- tableId: string;
69
- viewId: string;
70
- } | {
71
- type: 'updateViewConfig';
72
- tableId: string;
73
- viewId: string;
74
- patch: Record<string, unknown>;
75
- };
76
- export interface IBaseCollaborativeOp {
77
- unitId: string;
78
- unitType: 'base';
79
- rev: number;
80
- op: JSONXActions;
81
- meta?: {
82
- commandId: string;
83
- commandType: string;
84
- actorId: string;
85
- timestamp: number;
86
- };
87
- }
88
- export interface IBaseJson1Adapter {
89
- createOp(command: BaseJson1Command, snapshot: IBaseSnapshot): JSONXActions;
90
- applyOp(snapshot: IBaseSnapshot, op: JSONXActions): IBaseSnapshot;
91
- invertOp(snapshot: IBaseSnapshot, op: JSONXActions): JSONXActions;
92
- getAffectedRanges(op: JSONXActions): IBaseInvalidation[];
93
- }
94
- export declare class BaseJson1Adapter implements IBaseJson1Adapter {
95
- private readonly _factory;
96
- private readonly _applier;
97
- createOp(command: BaseJson1Command, snapshot: IBaseSnapshot): JSONXActions;
98
- createCollaborativeOp(input: Omit<IBaseCollaborativeOp, 'unitType'>): IBaseCollaborativeOp;
99
- applyOp(snapshot: IBaseSnapshot, op: JSONXActions): IBaseSnapshot;
100
- invertOp(snapshot: IBaseSnapshot, op: JSONXActions): JSONXActions;
101
- getAffectedRanges(op: JSONXActions): IBaseInvalidation[];
102
- }