@univerjs/preset-sheets-advanced 0.10.6 → 0.10.7

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 o=require("@univerjs-pro/engine-formula"),a=require("@univerjs-pro/exchange-client"),c=require("@univerjs-pro/license"),l=require("@univerjs-pro/sheets-chart"),s=require("@univerjs-pro/sheets-chart-ui"),u=require("@univerjs-pro/sheets-exchange-client"),t=require("@univerjs-pro/sheets-pivot"),p=require("@univerjs-pro/sheets-pivot-ui"),h=require("@univerjs-pro/sheets-print"),f=require("@univerjs-pro/sheets-sparkline"),b=require("@univerjs-pro/sheets-sparkline-ui");require("@univerjs-pro/exchange-client/lib/facade");require("@univerjs-pro/sheets-pivot/lib/facade");require("@univerjs-pro/engine-formula/lib/facade");require("@univerjs-pro/sheets-print/lib/facade");require("@univerjs-pro/sheets-chart-ui/lib/facade");require("@univerjs-pro/sheets-sparkline/lib/facade");const O=require("@univerjs-pro/engine-chart"),P=require("@univerjs/sheets-graphics");function v(e={license:"",universerEndpoint:""}){const{license:g,universerEndpoint:n,useWorker:y,formula:i,exchangeClientOptions:d}=e,r=n!=null?n:`${window.location.protocol}//${window.location.host}`;return{plugins:[[c.UniverLicensePlugin,{license:g}],y?[t.UniverSheetsPivotTablePlugin,{notExecuteFormula:!0}]:[t.UniverSheetsPivotTablePlugin],p.UniverSheetsPivotTableUIPlugin,[o.UniverProFormulaEnginePlugin,{notExecuteFormula:y,function:i==null?void 0:i.function}],h.UniverSheetsPrintPlugin,l.UniverSheetsChartPlugin,s.UniverSheetsChartUIPlugin,f.UniverSheetSparklinePlugin,b.UniverSheetSparklineUIPlugin,[a.UniverExchangeClientPlugin,{uploadFileServerUrl:`${r}/universer-api/stream/file/upload`,getTaskServerUrl:`${r}/universer-api/exchange/task/{taskID}`,signUrlServerUrl:`${r}/universer-api/file/{fileID}/sign-url`,importServerUrl:`${r}/universer-api/exchange/{type}/import`,exportServerUrl:`${r}/universer-api/exchange/{type}/export`,downloadEndpointUrl:`${r}/`,options:d}],u.UniverSheetsExchangeClientPlugin].filter(j=>!!j)}}exports.UniverSheetsAdvancedPreset=v;Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[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(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(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[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(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});Object.keys(h).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>h[e]})});Object.keys(f).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>f[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(O).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>O[e]})});Object.keys(P).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>P[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@univerjs-pro/engine-formula"),c=require("@univerjs-pro/exchange-client"),l=require("@univerjs-pro/license"),s=require("@univerjs-pro/sheets-chart"),u=require("@univerjs-pro/sheets-chart-ui"),p=require("@univerjs-pro/sheets-exchange-client"),t=require("@univerjs-pro/sheets-pivot"),f=require("@univerjs-pro/sheets-pivot-ui"),h=require("@univerjs-pro/sheets-print"),b=require("@univerjs-pro/sheets-sparkline"),y=require("@univerjs-pro/sheets-sparkline-ui");require("@univerjs-pro/exchange-client/lib/facade");require("@univerjs-pro/sheets-pivot/lib/facade");require("@univerjs-pro/engine-formula/lib/facade");require("@univerjs-pro/sheets-print/lib/facade");require("@univerjs-pro/sheets-chart-ui/lib/facade");require("@univerjs-pro/sheets-sparkline/lib/facade");const P=require("@univerjs-pro/engine-chart"),g=require("@univerjs/sheets-graphics");function U(e={license:"",universerEndpoint:""}){const{license:d,universerEndpoint:n,useWorker:O,formula:i,exchangeClientOptions:j,print:o}=e,r=n!=null?n:`${window.location.protocol}//${window.location.host}`;return{plugins:[[l.UniverLicensePlugin,{license:d}],O?[t.UniverSheetsPivotTablePlugin,{notExecuteFormula:!0}]:[t.UniverSheetsPivotTablePlugin],f.UniverSheetsPivotTableUIPlugin,[a.UniverProFormulaEnginePlugin,{notExecuteFormula:O,function:i==null?void 0:i.function}],[h.UniverSheetsPrintPlugin,{enforceWatermark:o==null?void 0:o.enforceWatermark}],s.UniverSheetsChartPlugin,u.UniverSheetsChartUIPlugin,b.UniverSheetSparklinePlugin,y.UniverSheetSparklineUIPlugin,[c.UniverExchangeClientPlugin,{uploadFileServerUrl:`${r}/universer-api/stream/file/upload`,getTaskServerUrl:`${r}/universer-api/exchange/task/{taskID}`,signUrlServerUrl:`${r}/universer-api/file/{fileID}/sign-url`,importServerUrl:`${r}/universer-api/exchange/{type}/import`,exportServerUrl:`${r}/universer-api/exchange/{type}/export`,downloadEndpointUrl:`${r}/`,options:j}],p.UniverSheetsExchangeClientPlugin].filter(v=>!!v)}}exports.UniverSheetsAdvancedPreset=U;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(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(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[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(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(f).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>f[e]})});Object.keys(h).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>h[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(y).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>y[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(g).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>g[e]})});
package/lib/es/index.js CHANGED
@@ -4,21 +4,21 @@ import { UniverExchangeClientPlugin as s } from "@univerjs-pro/exchange-client";
4
4
  export * from "@univerjs-pro/exchange-client";
5
5
  import { UniverLicensePlugin as u } from "@univerjs-pro/license";
6
6
  export * from "@univerjs-pro/license";
7
- import { UniverSheetsChartPlugin as a } from "@univerjs-pro/sheets-chart";
7
+ import { UniverSheetsChartPlugin as v } from "@univerjs-pro/sheets-chart";
8
8
  export * from "@univerjs-pro/sheets-chart";
9
- import { UniverSheetsChartUIPlugin as v } from "@univerjs-pro/sheets-chart-ui";
9
+ import { UniverSheetsChartUIPlugin as x } from "@univerjs-pro/sheets-chart-ui";
10
10
  export * from "@univerjs-pro/sheets-chart-ui";
11
- import { UniverSheetsExchangeClientPlugin as x } from "@univerjs-pro/sheets-exchange-client";
11
+ import { UniverSheetsExchangeClientPlugin as c } from "@univerjs-pro/sheets-exchange-client";
12
12
  export * from "@univerjs-pro/sheets-exchange-client";
13
- import { UniverSheetsPivotTablePlugin as t } from "@univerjs-pro/sheets-pivot";
13
+ import { UniverSheetsPivotTablePlugin as n } from "@univerjs-pro/sheets-pivot";
14
14
  export * from "@univerjs-pro/sheets-pivot";
15
15
  import { UniverSheetsPivotTableUIPlugin as g } from "@univerjs-pro/sheets-pivot-ui";
16
16
  export * from "@univerjs-pro/sheets-pivot-ui";
17
17
  import { UniverSheetsPrintPlugin as U } from "@univerjs-pro/sheets-print";
18
18
  export * from "@univerjs-pro/sheets-print";
19
- import { UniverSheetSparklinePlugin as c } from "@univerjs-pro/sheets-sparkline";
19
+ import { UniverSheetSparklinePlugin as h } from "@univerjs-pro/sheets-sparkline";
20
20
  export * from "@univerjs-pro/sheets-sparkline";
21
- import { UniverSheetSparklineUIPlugin as h } from "@univerjs-pro/sheets-sparkline-ui";
21
+ import { UniverSheetSparklineUIPlugin as P } from "@univerjs-pro/sheets-sparkline-ui";
22
22
  export * from "@univerjs-pro/sheets-sparkline-ui";
23
23
  import "@univerjs-pro/exchange-client/lib/facade";
24
24
  import "@univerjs-pro/sheets-pivot/lib/facade";
@@ -28,32 +28,35 @@ import "@univerjs-pro/sheets-chart-ui/lib/facade";
28
28
  import "@univerjs-pro/sheets-sparkline/lib/facade";
29
29
  export * from "@univerjs-pro/engine-chart";
30
30
  export * from "@univerjs/sheets-graphics";
31
- function W(n = {
31
+ function j(p = {
32
32
  license: "",
33
33
  universerEndpoint: ""
34
34
  }) {
35
35
  const {
36
- license: p,
36
+ license: m,
37
37
  universerEndpoint: e,
38
- useWorker: i,
38
+ useWorker: t,
39
39
  formula: o,
40
- exchangeClientOptions: m
41
- } = n, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
40
+ exchangeClientOptions: l,
41
+ print: i
42
+ } = p, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
42
43
  return {
43
44
  plugins: [
44
- [u, { license: p }],
45
+ [u, { license: m }],
45
46
  // TODO: @wzhudev: if we use worker, we need to add different configurations to SheetsPivotTable
46
- i ? [t, { notExecuteFormula: !0 }] : [t],
47
+ t ? [n, { notExecuteFormula: !0 }] : [n],
47
48
  g,
48
49
  [f, {
49
- notExecuteFormula: i,
50
+ notExecuteFormula: t,
50
51
  function: o == null ? void 0 : o.function
51
52
  }],
52
- U,
53
- a,
53
+ [U, {
54
+ enforceWatermark: i == null ? void 0 : i.enforceWatermark
55
+ }],
54
56
  v,
55
- c,
57
+ x,
56
58
  h,
59
+ P,
57
60
  [s, {
58
61
  uploadFileServerUrl: `${r}/universer-api/stream/file/upload`,
59
62
  getTaskServerUrl: `${r}/universer-api/exchange/task/{taskID}`,
@@ -61,12 +64,12 @@ function W(n = {
61
64
  importServerUrl: `${r}/universer-api/exchange/{type}/import`,
62
65
  exportServerUrl: `${r}/universer-api/exchange/{type}/export`,
63
66
  downloadEndpointUrl: `${r}/`,
64
- options: m
67
+ options: l
65
68
  }],
66
- x
67
- ].filter((l) => !!l)
69
+ c
70
+ ].filter((a) => !!a)
68
71
  };
69
72
  }
70
73
  export {
71
- W as UniverSheetsAdvancedPreset
74
+ j as UniverSheetsAdvancedPreset
72
75
  };
package/lib/index.js CHANGED
@@ -4,21 +4,21 @@ import { UniverExchangeClientPlugin as s } from "@univerjs-pro/exchange-client";
4
4
  export * from "@univerjs-pro/exchange-client";
5
5
  import { UniverLicensePlugin as u } from "@univerjs-pro/license";
6
6
  export * from "@univerjs-pro/license";
7
- import { UniverSheetsChartPlugin as a } from "@univerjs-pro/sheets-chart";
7
+ import { UniverSheetsChartPlugin as v } from "@univerjs-pro/sheets-chart";
8
8
  export * from "@univerjs-pro/sheets-chart";
9
- import { UniverSheetsChartUIPlugin as v } from "@univerjs-pro/sheets-chart-ui";
9
+ import { UniverSheetsChartUIPlugin as x } from "@univerjs-pro/sheets-chart-ui";
10
10
  export * from "@univerjs-pro/sheets-chart-ui";
11
- import { UniverSheetsExchangeClientPlugin as x } from "@univerjs-pro/sheets-exchange-client";
11
+ import { UniverSheetsExchangeClientPlugin as c } from "@univerjs-pro/sheets-exchange-client";
12
12
  export * from "@univerjs-pro/sheets-exchange-client";
13
- import { UniverSheetsPivotTablePlugin as t } from "@univerjs-pro/sheets-pivot";
13
+ import { UniverSheetsPivotTablePlugin as n } from "@univerjs-pro/sheets-pivot";
14
14
  export * from "@univerjs-pro/sheets-pivot";
15
15
  import { UniverSheetsPivotTableUIPlugin as g } from "@univerjs-pro/sheets-pivot-ui";
16
16
  export * from "@univerjs-pro/sheets-pivot-ui";
17
17
  import { UniverSheetsPrintPlugin as U } from "@univerjs-pro/sheets-print";
18
18
  export * from "@univerjs-pro/sheets-print";
19
- import { UniverSheetSparklinePlugin as c } from "@univerjs-pro/sheets-sparkline";
19
+ import { UniverSheetSparklinePlugin as h } from "@univerjs-pro/sheets-sparkline";
20
20
  export * from "@univerjs-pro/sheets-sparkline";
21
- import { UniverSheetSparklineUIPlugin as h } from "@univerjs-pro/sheets-sparkline-ui";
21
+ import { UniverSheetSparklineUIPlugin as P } from "@univerjs-pro/sheets-sparkline-ui";
22
22
  export * from "@univerjs-pro/sheets-sparkline-ui";
23
23
  import "@univerjs-pro/exchange-client/lib/facade";
24
24
  import "@univerjs-pro/sheets-pivot/lib/facade";
@@ -28,32 +28,35 @@ import "@univerjs-pro/sheets-chart-ui/lib/facade";
28
28
  import "@univerjs-pro/sheets-sparkline/lib/facade";
29
29
  export * from "@univerjs-pro/engine-chart";
30
30
  export * from "@univerjs/sheets-graphics";
31
- function W(n = {
31
+ function j(p = {
32
32
  license: "",
33
33
  universerEndpoint: ""
34
34
  }) {
35
35
  const {
36
- license: p,
36
+ license: m,
37
37
  universerEndpoint: e,
38
- useWorker: i,
38
+ useWorker: t,
39
39
  formula: o,
40
- exchangeClientOptions: m
41
- } = n, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
40
+ exchangeClientOptions: l,
41
+ print: i
42
+ } = p, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
42
43
  return {
43
44
  plugins: [
44
- [u, { license: p }],
45
+ [u, { license: m }],
45
46
  // TODO: @wzhudev: if we use worker, we need to add different configurations to SheetsPivotTable
46
- i ? [t, { notExecuteFormula: !0 }] : [t],
47
+ t ? [n, { notExecuteFormula: !0 }] : [n],
47
48
  g,
48
49
  [f, {
49
- notExecuteFormula: i,
50
+ notExecuteFormula: t,
50
51
  function: o == null ? void 0 : o.function
51
52
  }],
52
- U,
53
- a,
53
+ [U, {
54
+ enforceWatermark: i == null ? void 0 : i.enforceWatermark
55
+ }],
54
56
  v,
55
- c,
57
+ x,
56
58
  h,
59
+ P,
57
60
  [s, {
58
61
  uploadFileServerUrl: `${r}/universer-api/stream/file/upload`,
59
62
  getTaskServerUrl: `${r}/universer-api/exchange/task/{taskID}`,
@@ -61,12 +64,12 @@ function W(n = {
61
64
  importServerUrl: `${r}/universer-api/exchange/{type}/import`,
62
65
  exportServerUrl: `${r}/universer-api/exchange/{type}/export`,
63
66
  downloadEndpointUrl: `${r}/`,
64
- options: m
67
+ options: l
65
68
  }],
66
- x
67
- ].filter((l) => !!l)
69
+ c
70
+ ].filter((a) => !!a)
68
71
  };
69
72
  }
70
73
  export {
71
- W as UniverSheetsAdvancedPreset
74
+ j as UniverSheetsAdvancedPreset
72
75
  };
@@ -1,5 +1,6 @@
1
1
  import { IUniverEngineFormulaConfig } from '@univerjs-pro/engine-formula';
2
2
  import { IUniverExchangeClientOptions } from '@univerjs-pro/exchange-client';
3
+ import { IUniverSheetsPrintConfig } from '@univerjs-pro/sheets-print';
3
4
  import { IPreset } from './types';
4
5
  import '@univerjs-pro/exchange-client/lib/facade';
5
6
  import '@univerjs-pro/sheets-pivot/lib/facade';
@@ -24,6 +25,7 @@ export interface IUniverSheetsAdvancedPresetConfig {
24
25
  useWorker?: boolean;
25
26
  formula?: Pick<IUniverEngineFormulaConfig, 'function'>;
26
27
  exchangeClientOptions?: IUniverExchangeClientOptions;
28
+ print?: Partial<IUniverSheetsPrintConfig>;
27
29
  }
28
30
  /**
29
31
  * This presets helps you to create a Univer sheet with open sourced features.