@univerjs/preset-sheets-collaboration 0.5.0 → 0.5.1-nightly.202412041606
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 +1 -1
- package/lib/cjs/locales/fr-FR.js +1 -0
- package/lib/es/index.js +27 -14
- package/lib/es/locales/fr-FR.js +11 -0
- package/lib/index.css +1 -1
- package/lib/types/index.d.ts +4 -18
- package/lib/types/locales/fr-FR.d.ts +2 -0
- package/lib/types/umd.d.ts +18 -0
- package/lib/umd/index.js +5 -5
- package/lib/umd/locales/en-US.js +2 -2
- package/lib/umd/locales/fa-IR.js +2 -2
- package/lib/umd/locales/fr-FR.js +8 -0
- package/lib/umd/locales/ru-RU.js +2 -2
- package/lib/umd/locales/vi-VN.js +2 -2
- package/lib/umd/locales/zh-CN.js +2 -2
- package/lib/umd/locales/zh-TW.js +2 -2
- package/package.json +13 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs-pro/collaboration"),n=require("@univerjs-pro/collaboration-client"),l=require("@univerjs-pro/edit-history-loader");function s(o){const r=new URL(o,window.location.origin);switch(r.protocol){case"https:":r.protocol="wss:";break;case"http:":r.protocol="ws:";break}return r.toString()}function a(o={}){const{universerEndpoint:r,univerContainerId:i}=o,e=r!=null?r:`${window.location.protocol}//${window.location.host}`;return{plugins:[t.UniverCollaborationPlugin,[n.UniverCollaborationClientPlugin,{enableOfflineEditing:!0,enableSingleActiveInstanceLock:!0,enableAuthServer:!0,authzUrl:`${e}/universer-api/authz`,snapshotServerUrl:`${e}/universer-api/snapshot`,collabSubmitChangesetUrl:`${e}/universer-api/comb`,collabWebSocketUrl:s(`${e}/universer-api/comb/connect`),loginUrlKey:`${e}/universer-api/oidc/authpage`,uploadFileServerUrl:`${e}/universer-api/stream/file/upload`,signUrlServerUrl:`${e}/universer-api/file/{fileID}/sign-url`,downloadEndpointUrl:`${e}/`,wsSessionTicketUrl:`${e}/universer-api/user/session-ticket`,sendChangesetTimeout:200}],[l.UniverEditHistoryLoaderPlugin,{univerContainerId:i,historyListServerUrl:`${e}/universer-api/history`}]]}}exports.UniverSheetsCollaborationPreset=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@univerjs/core"),r=require("@univerjs-pro/collaboration-client/locale/fr-FR"),o=require("@univerjs-pro/edit-history-viewer/locale/fr-FR"),i=e.Tools.deepMerge({},r,o);module.exports=i;
|
package/lib/es/index.js
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
|
-
import { UniverCollaborationPlugin as
|
|
1
|
+
import { UniverCollaborationPlugin as n } from "@univerjs-pro/collaboration";
|
|
2
2
|
import { UniverCollaborationClientPlugin as t } from "@univerjs-pro/collaboration-client";
|
|
3
3
|
import { UniverEditHistoryLoaderPlugin as l } from "@univerjs-pro/edit-history-loader";
|
|
4
|
-
function
|
|
5
|
-
const
|
|
4
|
+
function s(o) {
|
|
5
|
+
const e = new URL(o, window.location.origin);
|
|
6
|
+
switch (e.protocol) {
|
|
7
|
+
case "https:":
|
|
8
|
+
e.protocol = "wss:";
|
|
9
|
+
break;
|
|
10
|
+
case "http:":
|
|
11
|
+
e.protocol = "ws:";
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
return e.toString();
|
|
15
|
+
}
|
|
16
|
+
function p(o = {}) {
|
|
17
|
+
const { universerEndpoint: e, univerContainerId: i } = o, r = e != null ? e : `${window.location.protocol}//${window.location.host}`;
|
|
6
18
|
return {
|
|
7
19
|
plugins: [
|
|
8
|
-
|
|
20
|
+
n,
|
|
9
21
|
[t, {
|
|
10
22
|
enableOfflineEditing: !0,
|
|
11
23
|
enableSingleActiveInstanceLock: !0,
|
|
12
24
|
enableAuthServer: !0,
|
|
13
|
-
authzUrl: `${
|
|
14
|
-
snapshotServerUrl: `${
|
|
15
|
-
collabSubmitChangesetUrl: `${
|
|
16
|
-
collabWebSocketUrl: `${
|
|
17
|
-
loginUrlKey: `${
|
|
18
|
-
uploadFileServerUrl: `${
|
|
19
|
-
signUrlServerUrl: `${
|
|
20
|
-
downloadEndpointUrl: `${
|
|
25
|
+
authzUrl: `${r}/universer-api/authz`,
|
|
26
|
+
snapshotServerUrl: `${r}/universer-api/snapshot`,
|
|
27
|
+
collabSubmitChangesetUrl: `${r}/universer-api/comb`,
|
|
28
|
+
collabWebSocketUrl: s(`${r}/universer-api/comb/connect`),
|
|
29
|
+
loginUrlKey: `${r}/universer-api/oidc/authpage`,
|
|
30
|
+
uploadFileServerUrl: `${r}/universer-api/stream/file/upload`,
|
|
31
|
+
signUrlServerUrl: `${r}/universer-api/file/{fileID}/sign-url`,
|
|
32
|
+
downloadEndpointUrl: `${r}/`,
|
|
33
|
+
wsSessionTicketUrl: `${r}/universer-api/user/session-ticket`,
|
|
21
34
|
sendChangesetTimeout: 200
|
|
22
35
|
}],
|
|
23
36
|
[l, {
|
|
24
|
-
univerContainerId:
|
|
25
|
-
historyListServerUrl: `${
|
|
37
|
+
univerContainerId: i,
|
|
38
|
+
historyListServerUrl: `${r}/universer-api/history`
|
|
26
39
|
}]
|
|
27
40
|
]
|
|
28
41
|
};
|
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.univer-online-status-icon{display:flex;margin-right:8px;font-size:20px}.univer-online-status-title{font-size:14px;line-height:32px;color:rgb(var(--grey-600))}.univer-online-status.univer-online .univer-online-status-icon{color:rgb(var(--green-500))}.univer-online-status.univer-offline .univer-online-status-icon{color:rgb(var(--red-500))}.univer-version-list-panel{margin-left:-20px;margin-right:-20px;overflow:hidden}.univer-version-list-panel-content{
|
|
1
|
+
.univer-online-status-icon{display:flex;margin-right:8px;font-size:20px}.univer-online-status-title{font-size:14px;line-height:32px;color:rgb(var(--grey-600))}.univer-online-status.univer-online .univer-online-status-icon{color:rgb(var(--green-500))}.univer-online-status.univer-offline .univer-online-status-icon{color:rgb(var(--red-500))}.univer-version-list-panel{margin-left:-20px;margin-right:-20px;overflow:hidden}.univer-version-list-panel-content{border-top:1px solid #e5e5e5;height:100%;overflow:auto}.univer-version-date{display:flex;padding:6px 0 6px 20px;align-items:center;gap:10px;align-self:stretch;color:var(---Black, #1e222b);font-family:PingFang SC;font-size:14px;font-style:normal;font-weight:500;line-height:normal}.univer-version-item{cursor:default;height:60px;display:flex;padding:6px 16px;flex-direction:column;justify-content:center;align-items:flex-start;align-self:stretch}.univer-version-item-header{height:24px;display:flex;justify-content:space-between;width:100%}.univer-version-item-header-expand{width:24px;height:24px;color:#4b4b4b;display:flex;align-items:center;justify-content:center}.univer-version-item-header-time{color:var(---Grey-500, #7a7a7a);font-family:PingFang SC;font-size:13px;font-style:normal;font-weight:400;line-height:normal;flex-grow:1;flex-shrink:1;display:flex;align-items:center}.univer-version-item-header-time-tag{border-radius:4px;border:1px solid #274fee;background:var(--hyacinth-blue-5008, rgba(39, 79, 238, .08));display:flex;height:20px;padding:0 6px;justify-content:center;align-items:center;color:#274fee;text-align:justify;font-size:12px;font-style:normal;font-weight:400;margin-left:8px}.univer-version-item-header-revert{width:24px;height:24px;color:#4b4b4b;border-radius:4px;display:flex;align-items:center;justify-content:center}.univer-version-item-header-revert:hover{background:var(--black-6, rgba(30, 34, 43, .06))}.univer-version-item-content{padding-left:26px;color:var(---Black, #1e222b);text-align:center;font-family:PingFang SC;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.univer-version-item.univer-active{background:#1e222b17}.univer-history-view-header{border-bottom:1px solid #e5e5e5;cursor:default;height:50px;display:flex;align-items:center}.univer-history-view-header-back{flex:0,0,85px;margin-left:10px;height:32px;width:32px;border-radius:4px;display:flex;align-items:center;justify-content:center}.univer-history-view-header-back:hover{background:var(--black-6, rgba(30, 34, 43, .06))}.univer-history-view-header-back-text{margin-left:5px}.univer-history-view-header-revert{flex-grow:1;flex-shrink:1;display:flex;align-items:center;justify-content:center}@keyframes univer-loading-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.univer-version-list-loading{width:100%;height:30px;display:flex;align-items:center;justify-content:center}.univer-version-list-loading-icon{animation:univer-loading-spin 1s linear infinite}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
universerEndpoint?: string;
|
|
6
|
-
/**
|
|
7
|
-
* The container id of the history list, which is used to load the history list. same as the container id of the univer.
|
|
8
|
-
*/
|
|
9
|
-
univerContainerId?: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This preset add collaboration features, including collaboration editing, collaboration cursors,
|
|
13
|
-
* and history into your application.
|
|
14
|
-
* To use this plugin, you should import {@link UniverSheetsAdvancedPreset} first.
|
|
15
|
-
*
|
|
16
|
-
* @param {Partial<IUniverSheetsCollaborationPresetConfig>} config - The configuration object.
|
|
17
|
-
*/
|
|
18
|
-
export declare function UniverSheetsCollaborationPreset(config?: Partial<IUniverSheetsCollaborationPresetConfig>): IPreset;
|
|
1
|
+
export * from './umd';
|
|
2
|
+
export * from '@univerjs-pro/collaboration';
|
|
3
|
+
export * from '@univerjs-pro/collaboration-client';
|
|
4
|
+
export * from '@univerjs-pro/edit-history-loader';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IPreset } from './types';
|
|
2
|
+
import '@univerjs-pro/collaboration-client/lib/index.css';
|
|
3
|
+
import '@univerjs-pro/edit-history-viewer/lib/index.css';
|
|
4
|
+
export interface IUniverSheetsCollaborationPresetConfig {
|
|
5
|
+
universerEndpoint?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The container id of the history list, which is used to load the history list. same as the container id of the univer.
|
|
8
|
+
*/
|
|
9
|
+
univerContainerId?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* This preset add collaboration features, including collaboration editing, collaboration cursors,
|
|
13
|
+
* and history into your application.
|
|
14
|
+
* To use this plugin, you should import {@link UniverSheetsAdvancedPreset} first.
|
|
15
|
+
*
|
|
16
|
+
* @param {Partial<IUniverSheetsCollaborationPresetConfig>} config - The configuration object.
|
|
17
|
+
*/
|
|
18
|
+
export declare function UniverSheetsCollaborationPreset(config?: Partial<IUniverSheetsCollaborationPresetConfig>): IPreset;
|