@univerjs/preset-sheets-node-core 0.5.1 → 0.5.2

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/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@univerjs/docs"),o=require("@univerjs/engine-formula"),n=require("@univerjs/rpc-node"),i=require("@univerjs/sheets"),a=require("@univerjs/sheets-data-validation"),c=require("@univerjs/sheets-drawing"),u=require("@univerjs/sheets-filter"),l=require("@univerjs/sheets-formula"),s=require("@univerjs/sheets-hyper-link"),p=require("@univerjs/sheets-sort"),y=require("@univerjs/sheets-thread-comment"),f=require("@univerjs/thread-comment");require("@univerjs/sheets/facade");require("@univerjs/sheets-formula/facade");require("@univerjs/sheets-data-validation/facade");require("@univerjs/engine-formula/facade");require("@univerjs/sheets-filter/facade");function h(e){const{workerSrc:b}=e,t=!!b;return{plugins:[t?[n.UniverRPCNodeMainPlugin,{workerSrc:b}]:null,[o.UniverFormulaEnginePlugin,{notExecuteFormula:t}],f.UniverThreadCommentPlugin,r.UniverDocsPlugin,i.UniverSheetsPlugin,[l.UniverSheetsFormulaPlugin,{notExecuteFormula:t}],a.UniverSheetsDataValidationPlugin,u.UniverSheetsFilterPlugin,s.UniverSheetsHyperLinkPlugin,c.UniverSheetsDrawingPlugin,p.UniverSheetsSortPlugin,y.UniverSheetsThreadCommentPlugin].filter(O=>!!O)}}exports.UniverSheetsNodeCorePreset=h;Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[e]})});Object.keys(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});Object.keys(c).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>c[e]})});Object.keys(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[e]})});Object.keys(l).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>l[e]})});Object.keys(s).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>s[e]})});Object.keys(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});Object.keys(y).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>y[e]})});Object.keys(f).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>f[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@univerjs/docs"),o=require("@univerjs/engine-formula"),i=require("@univerjs/rpc-node"),c=require("@univerjs/sheets"),a=require("@univerjs/sheets-data-validation"),u=require("@univerjs/sheets-drawing"),l=require("@univerjs/sheets-filter"),s=require("@univerjs/sheets-formula"),p=require("@univerjs/sheets-hyper-link"),y=require("@univerjs/sheets-sort"),b=require("@univerjs/sheets-thread-comment"),f=require("@univerjs/thread-comment");require("@univerjs/sheets/facade");require("@univerjs/sheets-formula/facade");require("@univerjs/sheets-data-validation/facade");require("@univerjs/engine-formula/facade");require("@univerjs/sheets-filter/facade");function P(e){const{workerSrc:O,formula:t}=e,r=!!O;return{plugins:[r?[i.UniverRPCNodeMainPlugin,{workerSrc:O}]:null,[o.UniverFormulaEnginePlugin,{notExecuteFormula:r,function:t==null?void 0:t.function}],f.UniverThreadCommentPlugin,n.UniverDocsPlugin,c.UniverSheetsPlugin,[s.UniverSheetsFormulaPlugin,{notExecuteFormula:r,description:t==null?void 0:t.description}],a.UniverSheetsDataValidationPlugin,l.UniverSheetsFilterPlugin,p.UniverSheetsHyperLinkPlugin,u.UniverSheetsDrawingPlugin,y.UniverSheetsSortPlugin,b.UniverSheetsThreadCommentPlugin].filter(h=>!!h)}}exports.UniverSheetsNodeCorePreset=P;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[e]})});Object.keys(c).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>c[e]})});Object.keys(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});Object.keys(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[e]})});Object.keys(l).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>l[e]})});Object.keys(s).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>s[e]})});Object.keys(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});Object.keys(y).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>y[e]})});Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>b[e]})});Object.keys(f).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>f[e]})});
package/lib/cjs/worker.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@univerjs/engine-formula"),t=require("@univerjs/rpc-node"),o=require("@univerjs/sheets"),n=require("@univerjs/sheets-formula");function u(){return{plugins:[[o.UniverSheetsPlugin,{onlyRegisterFormulaRelatedMutations:!0}],r.UniverFormulaEnginePlugin,t.UniverRPCNodeWorkerPlugin,n.UniverRemoteSheetsFormulaPlugin]}}exports.UniverSheetsNodeCoreWorkerPreset=u;Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs/engine-formula"),o=require("@univerjs/rpc-node"),n=require("@univerjs/sheets"),u=require("@univerjs/sheets-formula");function i(e={}){const{formula:r}=e;return{plugins:[[n.UniverSheetsPlugin,{onlyRegisterFormulaRelatedMutations:!0}],[t.UniverFormulaEnginePlugin,{function:r==null?void 0:r.function}],o.UniverRPCNodeWorkerPlugin,u.UniverRemoteSheetsFormulaPlugin]}}exports.UniverSheetsNodeCoreWorkerPreset=i;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[e]})});
package/lib/es/index.js CHANGED
@@ -1,51 +1,51 @@
1
- import { UniverDocsPlugin as i } from "@univerjs/docs";
1
+ import { UniverDocsPlugin as n } from "@univerjs/docs";
2
2
  export * from "@univerjs/docs";
3
3
  import { UniverFormulaEnginePlugin as m } from "@univerjs/engine-formula";
4
4
  export * from "@univerjs/engine-formula";
5
- import { UniverRPCNodeMainPlugin as n } from "@univerjs/rpc-node";
5
+ import { UniverRPCNodeMainPlugin as p } from "@univerjs/rpc-node";
6
6
  export * from "@univerjs/rpc-node";
7
- import { UniverSheetsPlugin as p } from "@univerjs/sheets";
7
+ import { UniverSheetsPlugin as f } from "@univerjs/sheets";
8
8
  export * from "@univerjs/sheets";
9
- import { UniverSheetsDataValidationPlugin as f } from "@univerjs/sheets-data-validation";
9
+ import { UniverSheetsDataValidationPlugin as u } from "@univerjs/sheets-data-validation";
10
10
  export * from "@univerjs/sheets-data-validation";
11
- import { UniverSheetsDrawingPlugin as u } from "@univerjs/sheets-drawing";
11
+ import { UniverSheetsDrawingPlugin as l } from "@univerjs/sheets-drawing";
12
12
  export * from "@univerjs/sheets-drawing";
13
- import { UniverSheetsFilterPlugin as l } from "@univerjs/sheets-filter";
13
+ import { UniverSheetsFilterPlugin as s } from "@univerjs/sheets-filter";
14
14
  export * from "@univerjs/sheets-filter";
15
15
  import { UniverSheetsFormulaPlugin as g } from "@univerjs/sheets-formula";
16
16
  export * from "@univerjs/sheets-formula";
17
- import { UniverSheetsHyperLinkPlugin as s } from "@univerjs/sheets-hyper-link";
17
+ import { UniverSheetsHyperLinkPlugin as x } from "@univerjs/sheets-hyper-link";
18
18
  export * from "@univerjs/sheets-hyper-link";
19
- import { UniverSheetsSortPlugin as x } from "@univerjs/sheets-sort";
19
+ import { UniverSheetsSortPlugin as P } from "@univerjs/sheets-sort";
20
20
  export * from "@univerjs/sheets-sort";
21
- import { UniverSheetsThreadCommentPlugin as P } from "@univerjs/sheets-thread-comment";
21
+ import { UniverSheetsThreadCommentPlugin as v } from "@univerjs/sheets-thread-comment";
22
22
  export * from "@univerjs/sheets-thread-comment";
23
- import { UniverThreadCommentPlugin as v } from "@univerjs/thread-comment";
23
+ import { UniverThreadCommentPlugin as U } from "@univerjs/thread-comment";
24
24
  export * from "@univerjs/thread-comment";
25
25
  import "@univerjs/sheets/facade";
26
26
  import "@univerjs/sheets-formula/facade";
27
27
  import "@univerjs/sheets-data-validation/facade";
28
28
  import "@univerjs/engine-formula/facade";
29
29
  import "@univerjs/sheets-filter/facade";
30
- function M(e) {
31
- const { workerSrc: o } = e, r = !!o;
30
+ function R(t) {
31
+ const { workerSrc: e, formula: r } = t, o = !!e;
32
32
  return {
33
33
  plugins: [
34
- r ? [n, { workerSrc: o }] : null,
35
- [m, { notExecuteFormula: r }],
36
- v,
37
- i,
38
- p,
39
- [g, { notExecuteFormula: r }],
34
+ o ? [p, { workerSrc: e }] : null,
35
+ [m, { notExecuteFormula: o, function: r == null ? void 0 : r.function }],
36
+ U,
37
+ n,
40
38
  f,
41
- l,
42
- s,
39
+ [g, { notExecuteFormula: o, description: r == null ? void 0 : r.description }],
43
40
  u,
41
+ s,
44
42
  x,
45
- P
46
- ].filter((t) => !!t)
43
+ l,
44
+ P,
45
+ v
46
+ ].filter((i) => !!i)
47
47
  };
48
48
  }
49
49
  export {
50
- M as UniverSheetsNodeCorePreset
50
+ R as UniverSheetsNodeCorePreset
51
51
  };
package/lib/es/worker.js CHANGED
@@ -1,18 +1,21 @@
1
- import { UniverFormulaEnginePlugin as r } from "@univerjs/engine-formula";
1
+ import { UniverFormulaEnginePlugin as o } from "@univerjs/engine-formula";
2
2
  export * from "@univerjs/engine-formula";
3
- import { UniverRPCNodeWorkerPlugin as e } from "@univerjs/rpc-node";
3
+ import { UniverRPCNodeWorkerPlugin as t } from "@univerjs/rpc-node";
4
4
  export * from "@univerjs/rpc-node";
5
- import { UniverSheetsPlugin as o } from "@univerjs/sheets";
5
+ import { UniverSheetsPlugin as n } from "@univerjs/sheets";
6
6
  export * from "@univerjs/sheets";
7
- import { UniverRemoteSheetsFormulaPlugin as t } from "@univerjs/sheets-formula";
7
+ import { UniverRemoteSheetsFormulaPlugin as i } from "@univerjs/sheets-formula";
8
8
  export * from "@univerjs/sheets-formula";
9
- function l() {
9
+ function l(e = {}) {
10
+ const {
11
+ formula: r
12
+ } = e;
10
13
  return {
11
14
  plugins: [
12
- [o, { onlyRegisterFormulaRelatedMutations: !0 }],
13
- r,
14
- e,
15
- t
15
+ [n, { onlyRegisterFormulaRelatedMutations: !0 }],
16
+ [o, { function: r == null ? void 0 : r.function }],
17
+ t,
18
+ i
16
19
  ]
17
20
  };
18
21
  }
@@ -1,9 +1,4 @@
1
- import { IPreset } from './types';
2
- import '@univerjs/sheets/facade';
3
- import '@univerjs/sheets-formula/facade';
4
- import '@univerjs/sheets-data-validation/facade';
5
- import '@univerjs/engine-formula/facade';
6
- import '@univerjs/sheets-filter/facade';
1
+ export * from './umd';
7
2
  export * from '@univerjs/docs';
8
3
  export * from '@univerjs/engine-formula';
9
4
  export * from '@univerjs/rpc-node';
@@ -16,7 +11,3 @@ export * from '@univerjs/sheets-hyper-link';
16
11
  export * from '@univerjs/sheets-sort';
17
12
  export * from '@univerjs/sheets-thread-comment';
18
13
  export * from '@univerjs/thread-comment';
19
- export interface IUniverSheetsNodeCorePresetConfig {
20
- workerSrc?: string;
21
- }
22
- export declare function UniverSheetsNodeCorePreset(config: Partial<IUniverSheetsNodeCorePresetConfig>): IPreset;
@@ -1,4 +1,6 @@
1
1
  import { IUniverConfig, Plugin, PluginCtor } from '@univerjs/core';
2
+ import { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
3
+ import { IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';
2
4
  /**
3
5
  * A collection of plugins and their default configs.
4
6
  */
@@ -9,3 +11,7 @@ export interface IPreset {
9
11
  export interface IPresetOptions {
10
12
  lazy?: boolean;
11
13
  }
14
+ export interface IUniverFormulaConfig extends Pick<IUniverEngineFormulaConfig, 'function'>, Pick<IUniverSheetsFormulaBaseConfig, 'description'> {
15
+ }
16
+ export interface IUniverFormulaWorkerConfig extends Pick<IUniverEngineFormulaConfig, 'function'> {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { IPreset, IUniverFormulaConfig } from './types';
2
+ import '@univerjs/sheets/facade';
3
+ import '@univerjs/sheets-formula/facade';
4
+ import '@univerjs/sheets-data-validation/facade';
5
+ import '@univerjs/engine-formula/facade';
6
+ import '@univerjs/sheets-filter/facade';
7
+ export interface IUniverSheetsNodeCorePresetConfig {
8
+ /**
9
+ * The formula configuration.
10
+ */
11
+ formula?: IUniverFormulaConfig;
12
+ /**
13
+ * The URL of the worker script.
14
+ */
15
+ workerSrc?: string;
16
+ }
17
+ export declare function UniverSheetsNodeCorePreset(config: Partial<IUniverSheetsNodeCorePresetConfig>): IPreset;
@@ -1,6 +1,12 @@
1
- import { IPreset } from './types';
1
+ import { IPreset, IUniverFormulaWorkerConfig } from './types';
2
2
  export * from '@univerjs/engine-formula';
3
3
  export * from '@univerjs/rpc-node';
4
4
  export * from '@univerjs/sheets';
5
5
  export * from '@univerjs/sheets-formula';
6
- export declare function UniverSheetsNodeCoreWorkerPreset(): IPreset;
6
+ export interface IUniverSheetsNodeCoreWorkerPresetConfig {
7
+ /**
8
+ * The formula worker config.
9
+ */
10
+ formula?: IUniverFormulaWorkerConfig;
11
+ }
12
+ export declare function UniverSheetsNodeCoreWorkerPreset(config?: Partial<IUniverSheetsNodeCoreWorkerPresetConfig>): IPreset;