@univerjs/preset-sheets-collaboration 0.14.0-insiders.20251222-4efcfbb → 0.15.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/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@univerjs-pro/collaboration"),n=require("@univerjs-pro/collaboration-client"),o=require("@univerjs-pro/collaboration-client-ui"),l=require("@univerjs-pro/edit-history-loader");require("@univerjs-pro/collaboration-client/lib/facade");require("@univerjs-pro/collaboration-client-ui/lib/facade");const a=require("@univerjs-pro/edit-history-viewer");function p(e){const t=new URL(e,window.location.origin);switch(t.protocol){case"https:":t.protocol="wss:";break;case"http:":t.protocol="ws:";break}return t.toString()}function b(e={}){const{universerEndpoint:t,univerContainerId:s="app",enableOfflineEditing:c=!0,enableSingleActiveInstanceLock:u=!0}=e,r=t!=null?t:`${window.location.protocol}//${window.location.host}`;return{plugins:[i.UniverCollaborationPlugin,[n.UniverCollaborationClientPlugin,{socketService:o.BrowserCollaborationSocketService,enableOfflineEditing:c,enableSingleActiveInstanceLock:u,enableAuthServer:!0,authzUrl:`${r}/universer-api/authz`,snapshotServerUrl:`${r}/universer-api/snapshot`,collabSubmitChangesetUrl:`${r}/universer-api/comb`,collabWebSocketUrl:p(`${r}/universer-api/comb/connect`),loginUrlKey:`${r}/universer-api/oidc/authpage`,uploadFileServerUrl:`${r}/universer-api/stream/file/upload`,signUrlServerUrl:`${r}/universer-api/file/{fileID}/sign-url`,downloadEndpointUrl:`${r}/`,wsSessionTicketUrl:`${r}/universer-api/user/session-ticket`,sendChangesetTimeout:200}],[o.UniverCollaborationClientUIPlugin,{}],[l.UniverEditHistoryLoaderPlugin,{univerContainerId:s,historyListServerUrl:`${r}/universer-api/history`}]]}}exports.UniverSheetsCollaborationPreset=b;Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[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(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[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(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@univerjs-pro/collaboration"),n=require("@univerjs-pro/collaboration-client"),o=require("@univerjs-pro/collaboration-client-ui"),l=require("@univerjs-pro/edit-history-loader");require("@univerjs-pro/collaboration-client/lib/facade");require("@univerjs-pro/collaboration-client-ui/lib/facade");const a=require("@univerjs-pro/edit-history-viewer");function b(e){const t=new URL(e,window.location.origin);switch(t.protocol){case"https:":t.protocol="wss:";break;case"http:":t.protocol="ws:";break}return t.toString()}function d(e={}){const{universerEndpoint:t,univerContainerId:s="app",enableOfflineEditing:c=!0,enableSingleActiveInstanceLock:u=!0,enableFrontendLog:p=!1}=e,r=t!=null?t:`${window.location.protocol}//${window.location.host}`;return{plugins:[i.UniverCollaborationPlugin,[n.UniverCollaborationClientPlugin,{socketService:o.BrowserCollaborationSocketService,enableOfflineEditing:c,enableSingleActiveInstanceLock:u,enableAuthServer:!0,authzUrl:`${r}/universer-api/authz`,snapshotServerUrl:`${r}/universer-api/snapshot`,collabSubmitChangesetUrl:`${r}/universer-api/comb`,collabWebSocketUrl:b(`${r}/universer-api/comb/connect`),loginUrlKey:`${r}/universer-api/oidc/authpage`,uploadFileServerUrl:`${r}/universer-api/stream/file/upload`,signUrlServerUrl:`${r}/universer-api/file/{fileID}/sign-url`,downloadEndpointUrl:`${r}/`,wsSessionTicketUrl:`${r}/universer-api/user/session-ticket`,sendChangesetTimeout:200}],[o.UniverCollaborationClientUIPlugin,{enableFrontendLog:p}],[l.UniverEditHistoryLoaderPlugin,{univerContainerId:s,historyListServerUrl:`${r}/universer-api/history`}]]}}exports.UniverSheetsCollaborationPreset=d;Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[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(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[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(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});
package/lib/es/index.js CHANGED
@@ -1,45 +1,46 @@
1
- import { UniverCollaborationPlugin as l } from "@univerjs-pro/collaboration";
1
+ import { UniverCollaborationPlugin as s } from "@univerjs-pro/collaboration";
2
2
  export * from "@univerjs-pro/collaboration";
3
- import { UniverCollaborationClientPlugin as s } from "@univerjs-pro/collaboration-client";
3
+ import { UniverCollaborationClientPlugin as a } from "@univerjs-pro/collaboration-client";
4
4
  export * from "@univerjs-pro/collaboration-client";
5
- import { BrowserCollaborationSocketService as a, UniverCollaborationClientUIPlugin as p } from "@univerjs-pro/collaboration-client-ui";
5
+ import { BrowserCollaborationSocketService as p, UniverCollaborationClientUIPlugin as c } from "@univerjs-pro/collaboration-client-ui";
6
6
  export * from "@univerjs-pro/collaboration-client-ui";
7
- import { UniverEditHistoryLoaderPlugin as c } from "@univerjs-pro/edit-history-loader";
7
+ import { UniverEditHistoryLoaderPlugin as u } from "@univerjs-pro/edit-history-loader";
8
8
  export * from "@univerjs-pro/edit-history-loader";
9
9
  import "@univerjs-pro/collaboration-client/lib/facade";
10
10
  import "@univerjs-pro/collaboration-client-ui/lib/facade";
11
11
  export * from "@univerjs-pro/edit-history-viewer";
12
- function u(e) {
13
- const o = new URL(e, window.location.origin);
14
- switch (o.protocol) {
12
+ function v(o) {
13
+ const e = new URL(o, window.location.origin);
14
+ switch (e.protocol) {
15
15
  case "https:":
16
- o.protocol = "wss:";
16
+ e.protocol = "wss:";
17
17
  break;
18
18
  case "http:":
19
- o.protocol = "ws:";
19
+ e.protocol = "ws:";
20
20
  break;
21
21
  }
22
- return o.toString();
22
+ return e.toString();
23
23
  }
24
- function h(e = {}) {
24
+ function h(o = {}) {
25
25
  const {
26
- universerEndpoint: o,
26
+ universerEndpoint: e,
27
27
  univerContainerId: i = "app",
28
28
  enableOfflineEditing: t = !0,
29
- enableSingleActiveInstanceLock: n = !0
30
- } = e, r = o != null ? o : `${window.location.protocol}//${window.location.host}`;
29
+ enableSingleActiveInstanceLock: n = !0,
30
+ enableFrontendLog: l = !1
31
+ } = o, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
31
32
  return {
32
33
  plugins: [
33
- l,
34
- [s, {
35
- socketService: a,
34
+ s,
35
+ [a, {
36
+ socketService: p,
36
37
  enableOfflineEditing: t,
37
38
  enableSingleActiveInstanceLock: n,
38
39
  enableAuthServer: !0,
39
40
  authzUrl: `${r}/universer-api/authz`,
40
41
  snapshotServerUrl: `${r}/universer-api/snapshot`,
41
42
  collabSubmitChangesetUrl: `${r}/universer-api/comb`,
42
- collabWebSocketUrl: u(`${r}/universer-api/comb/connect`),
43
+ collabWebSocketUrl: v(`${r}/universer-api/comb/connect`),
43
44
  loginUrlKey: `${r}/universer-api/oidc/authpage`,
44
45
  uploadFileServerUrl: `${r}/universer-api/stream/file/upload`,
45
46
  signUrlServerUrl: `${r}/universer-api/file/{fileID}/sign-url`,
@@ -47,8 +48,10 @@ function h(e = {}) {
47
48
  wsSessionTicketUrl: `${r}/universer-api/user/session-ticket`,
48
49
  sendChangesetTimeout: 200
49
50
  }],
50
- [p, {}],
51
51
  [c, {
52
+ enableFrontendLog: l
53
+ }],
54
+ [u, {
52
55
  univerContainerId: i,
53
56
  historyListServerUrl: `${r}/universer-api/history`
54
57
  }]
package/lib/index.js CHANGED
@@ -1,45 +1,46 @@
1
- import { UniverCollaborationPlugin as l } from "@univerjs-pro/collaboration";
1
+ import { UniverCollaborationPlugin as s } from "@univerjs-pro/collaboration";
2
2
  export * from "@univerjs-pro/collaboration";
3
- import { UniverCollaborationClientPlugin as s } from "@univerjs-pro/collaboration-client";
3
+ import { UniverCollaborationClientPlugin as a } from "@univerjs-pro/collaboration-client";
4
4
  export * from "@univerjs-pro/collaboration-client";
5
- import { BrowserCollaborationSocketService as a, UniverCollaborationClientUIPlugin as p } from "@univerjs-pro/collaboration-client-ui";
5
+ import { BrowserCollaborationSocketService as p, UniverCollaborationClientUIPlugin as c } from "@univerjs-pro/collaboration-client-ui";
6
6
  export * from "@univerjs-pro/collaboration-client-ui";
7
- import { UniverEditHistoryLoaderPlugin as c } from "@univerjs-pro/edit-history-loader";
7
+ import { UniverEditHistoryLoaderPlugin as u } from "@univerjs-pro/edit-history-loader";
8
8
  export * from "@univerjs-pro/edit-history-loader";
9
9
  import "@univerjs-pro/collaboration-client/lib/facade";
10
10
  import "@univerjs-pro/collaboration-client-ui/lib/facade";
11
11
  export * from "@univerjs-pro/edit-history-viewer";
12
- function u(e) {
13
- const o = new URL(e, window.location.origin);
14
- switch (o.protocol) {
12
+ function v(o) {
13
+ const e = new URL(o, window.location.origin);
14
+ switch (e.protocol) {
15
15
  case "https:":
16
- o.protocol = "wss:";
16
+ e.protocol = "wss:";
17
17
  break;
18
18
  case "http:":
19
- o.protocol = "ws:";
19
+ e.protocol = "ws:";
20
20
  break;
21
21
  }
22
- return o.toString();
22
+ return e.toString();
23
23
  }
24
- function h(e = {}) {
24
+ function h(o = {}) {
25
25
  const {
26
- universerEndpoint: o,
26
+ universerEndpoint: e,
27
27
  univerContainerId: i = "app",
28
28
  enableOfflineEditing: t = !0,
29
- enableSingleActiveInstanceLock: n = !0
30
- } = e, r = o != null ? o : `${window.location.protocol}//${window.location.host}`;
29
+ enableSingleActiveInstanceLock: n = !0,
30
+ enableFrontendLog: l = !1
31
+ } = o, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
31
32
  return {
32
33
  plugins: [
33
- l,
34
- [s, {
35
- socketService: a,
34
+ s,
35
+ [a, {
36
+ socketService: p,
36
37
  enableOfflineEditing: t,
37
38
  enableSingleActiveInstanceLock: n,
38
39
  enableAuthServer: !0,
39
40
  authzUrl: `${r}/universer-api/authz`,
40
41
  snapshotServerUrl: `${r}/universer-api/snapshot`,
41
42
  collabSubmitChangesetUrl: `${r}/universer-api/comb`,
42
- collabWebSocketUrl: u(`${r}/universer-api/comb/connect`),
43
+ collabWebSocketUrl: v(`${r}/universer-api/comb/connect`),
43
44
  loginUrlKey: `${r}/universer-api/oidc/authpage`,
44
45
  uploadFileServerUrl: `${r}/universer-api/stream/file/upload`,
45
46
  signUrlServerUrl: `${r}/universer-api/file/{fileID}/sign-url`,
@@ -47,8 +48,10 @@ function h(e = {}) {
47
48
  wsSessionTicketUrl: `${r}/universer-api/user/session-ticket`,
48
49
  sendChangesetTimeout: 200
49
50
  }],
50
- [p, {}],
51
51
  [c, {
52
+ enableFrontendLog: l
53
+ }],
54
+ [u, {
52
55
  univerContainerId: i,
53
56
  historyListServerUrl: `${r}/universer-api/history`
54
57
  }]
@@ -1,3 +1,4 @@
1
+ import { IUniverCollaborationClientUIConfig } from '@univerjs-pro/collaboration-client-ui';
1
2
  import { IPreset } from './types';
2
3
  import '@univerjs-pro/collaboration-client-ui/lib/index.css';
3
4
  import '@univerjs-pro/edit-history-viewer/lib/index.css';
@@ -5,7 +6,7 @@ import '@univerjs-pro/collaboration-client/lib/facade';
5
6
  import '@univerjs-pro/collaboration-client-ui/lib/facade';
6
7
  export type * from '@univerjs-pro/collaboration-client-ui/lib/facade';
7
8
  export type * from '@univerjs-pro/collaboration-client/lib/facade';
8
- export interface IUniverSheetsCollaborationPresetConfig {
9
+ export interface IUniverSheetsCollaborationPresetConfig extends Pick<IUniverCollaborationClientUIConfig, 'enableFrontendLog'> {
9
10
  universerEndpoint?: string;
10
11
  /**
11
12
  * The container id of the history list, which is used to load the history list. same as the container id of the univer.