@univerjs-pro/collaboration-client 0.5.0-nightly.202411121606 → 0.5.0-nightly.202411141606
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/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/types/config/config.d.ts +48 -0
- package/lib/types/controllers/collab-cursor/__tests__/doc-collab-cursor.controller.spec.d.ts +23 -0
- package/lib/types/controllers/collab-cursor/__tests__/serialize-text-ranges.spec.d.ts +1 -0
- package/lib/types/controllers/collab-cursor/__tests__/sheet-collab-cursor.controller.spec.d.ts +1 -0
- package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +22 -0
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-entity.d.ts +38 -0
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-render.controller.d.ts +24 -0
- package/lib/types/controllers/collab-cursor/serialize-text-ranges.d.ts +3 -0
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-entity.d.ts +39 -0
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-render.controller.d.ts +21 -0
- package/lib/types/controllers/collab-status/collab-status.controller.d.ts +18 -0
- package/lib/types/controllers/collaboration/__tests__/collaboration.controller.spec.d.ts +4 -0
- package/lib/types/controllers/collaboration/__tests__/mock-text-selection-render-manager.service.d.ts +0 -0
- package/lib/types/controllers/collaboration/__tests__/mocks.d.ts +54 -0
- package/lib/types/controllers/collaboration/collaboration-entity.d.ts +91 -0
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +303 -0
- package/lib/types/controllers/collaboration/collaboration.controller.d.ts +24 -0
- package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +18 -0
- package/lib/types/controllers/collaboration/utils/empty.d.ts +2 -0
- package/lib/types/controllers/config.schema.d.ts +29 -0
- package/lib/types/controllers/data-loader/__tests__/data-loader.controller.spec.d.ts +1 -0
- package/lib/types/controllers/data-loader/data-loader.controller.d.ts +22 -0
- package/lib/types/controllers/file-name/file-name.controller.d.ts +12 -0
- package/lib/types/controllers/telemetry.d.ts +11 -0
- package/lib/types/index.d.ts +35 -890
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +39 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/models/cursor.d.ts +30 -0
- package/lib/types/plugin.d.ts +18 -0
- package/lib/types/services/auth-server/auth-server.service.d.ts +10 -0
- package/lib/types/services/auth-server/authz-io-http.service.d.ts +30 -0
- package/lib/types/services/auth-server/domain-request.service.d.ts +6 -0
- package/lib/types/services/auth-server/util.d.ts +1 -0
- package/lib/types/services/collaboration-session/collaboration-session.d.ts +59 -0
- package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +61 -0
- package/lib/types/services/color-assign/color-assign.service.d.ts +10 -0
- package/lib/types/services/comment/comment.service.d.ts +6 -0
- package/lib/types/services/image-remote/image-io.service.d.ts +34 -0
- package/lib/types/services/ime-cache-transform/doc-transform-ime-cache.service.d.ts +13 -0
- package/lib/types/services/local-cache/local-cache.service.d.ts +37 -0
- package/lib/types/services/member/member.service.d.ts +77 -0
- package/lib/types/services/permission/permission.service.d.ts +12 -0
- package/lib/types/services/range-selection/sheet-transform-selections.service.d.ts +13 -0
- package/lib/types/services/single-active-unit/single-active-unit.service.d.ts +39 -0
- package/lib/types/services/snapshot-server/snapshot-server.service.d.ts +21 -0
- package/lib/types/services/socket/collaboration-socket.service.d.ts +34 -0
- package/lib/types/services/socket/serialize.d.ts +3 -0
- package/lib/types/services/state-cache-transform/doc-transform-state-cache.service.d.ts +12 -0
- package/lib/types/services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service.d.ts +13 -0
- package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +8 -0
- package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +19 -0
- package/lib/types/services/url/url.service.d.ts +12 -0
- package/lib/types/services/url/web-url.service.d.ts +10 -0
- package/lib/types/views/components/CollabStatus.d.ts +10 -0
- package/lib/types/views/components/CollabStatus.stories.d.ts +8 -0
- package/lib/types/views/shapes/doc-collab-cursor.d.ts +27 -0
- package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +27 -0
- package/lib/types/views/shapes/text-bubble.shape.d.ts +19 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -16
package/lib/es/locale/en-US.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x3ecd8b=_0x43e4;function _0x1cd8(){const _0x3b907e=['Syncing...','10vSFLVf','606832RqhDqI','202fcbOIF','Click\x20to\x20Reconnect','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Local\x20file','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','7269vpHCmN','522968bteCVF','Syncing\x20server\x20data...','5859kgYjKv','905886VdLUUB','Synced','552vKIkDR','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Collaboration\x20Conflict','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','15379GVyZwB','Connection\x20failed,\x20please\x20check\x20your\x20network.','4205820lHkwSM','Authentication\x20Error'];_0x1cd8=function(){return _0x3b907e;};return _0x1cd8();}(function(_0xfcf609,_0x2cd140){const _0x33cc0a=_0x43e4,_0x438a8d=_0xfcf609();while(!![]){try{const _0x4e6849=parseInt(_0x33cc0a(0xcb))/0x1+-parseInt(_0x33cc0a(0xc5))/0x2*(-parseInt(_0x33cc0a(0xb7))/0x3)+parseInt(_0x33cc0a(0xcc))/0x4*(-parseInt(_0x33cc0a(0xc3))/0x5)+-parseInt(_0x33cc0a(0xba))/0x6*(parseInt(_0x33cc0a(0xbe))/0x7)+parseInt(_0x33cc0a(0xc4))/0x8+-parseInt(_0x33cc0a(0xb8))/0x9+parseInt(_0x33cc0a(0xc0))/0xa;if(_0x4e6849===_0x2cd140)break;else _0x438a8d['push'](_0x438a8d['shift']());}catch(_0x520c55){_0x438a8d['push'](_0x438a8d['shift']());}}}(_0x1cd8,0x215f8));const e={'collab-client':{'tooltip':{'reconnect':_0x3ecd8b(0xc6)}},'collabStatus':{'fetchMiss':_0x3ecd8b(0xcd),'conflict':'Edit\x20conflicts','notCollab':_0x3ecd8b(0xc8),'synced':_0x3ecd8b(0xb9),'syncing':_0x3ecd8b(0xc2),'offline':'Offline,\x20edits\x20would\x20be\x20save\x20on\x20local'},'session':{'connection-failed':_0x3ecd8b(0xbf),'will-retry':_0x3ecd8b(0xc7),'room-full':'Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','collaboration-timeout':'The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'},'conflict':{'title':_0x3ecd8b(0xbc),'content':_0x3ecd8b(0xc9)},'permission':{'title':_0x3ecd8b(0xc1),'content':_0x3ecd8b(0xca)},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':_0x3ecd8b(0xbd)},'auth':{'needGotoLoginAlert':_0x3ecd8b(0xbb)}};function _0x43e4(_0x4d0fae,_0x241177){const _0x1cd86b=_0x1cd8();return _0x43e4=function(_0x43e4f2,_0x35fe8d){_0x43e4f2=_0x43e4f2-0xb7;let _0x504b8f=_0x1cd86b[_0x43e4f2];return _0x504b8f;},_0x43e4(_0x4d0fae,_0x241177);}export{e as default};
|
package/lib/es/locale/fa-IR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x4f5b29=_0x5506;(function(_0x281040,_0x1cb933){const _0x34737d=_0x5506,_0x30472c=_0x281040();while(!![]){try{const _0x3b0064=parseInt(_0x34737d(0x13f))/0x1+parseInt(_0x34737d(0x149))/0x2*(parseInt(_0x34737d(0x142))/0x3)+-parseInt(_0x34737d(0x140))/0x4+-parseInt(_0x34737d(0x141))/0x5*(parseInt(_0x34737d(0x144))/0x6)+parseInt(_0x34737d(0x148))/0x7+-parseInt(_0x34737d(0x134))/0x8*(-parseInt(_0x34737d(0x146))/0x9)+parseInt(_0x34737d(0x132))/0xa*(-parseInt(_0x34737d(0x131))/0xb);if(_0x3b0064===_0x1cb933)break;else _0x30472c['push'](_0x30472c['shift']());}catch(_0x47b4d9){_0x30472c['push'](_0x30472c['shift']());}}}(_0x342a,0x5b0c0));const o={'collab-client':{'tooltip':{'reconnect':_0x4f5b29(0x13d)}},'collabStatus':{'fetchMiss':'در\x20حال\x20همگام\x20سازی\x20داده\x20های\x20سرور...','conflict':_0x4f5b29(0x135),'notCollab':'پرونده\x20محلی','synced':_0x4f5b29(0x13e),'syncing':_0x4f5b29(0x138),'offline':_0x4f5b29(0x136)},'session':{'connection-failed':_0x4f5b29(0x139),'will-retry':_0x4f5b29(0x143),'room-full':_0x4f5b29(0x133),'collaboration-timeout':_0x4f5b29(0x147)},'conflict':{'title':'تداخل\x20همکاری','content':'یک\x20تداخل\x20بین\x20نسخه\x20محلی\x20شما\x20و\x20نسخه\x20در\x20سرور\x20وجود\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20ذخیره\x20کنید،\x20زیرا\x20آنها\x20پس\x20از\x20بازیابی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.'},'permission':{'title':_0x4f5b29(0x13b),'content':_0x4f5b29(0x137)},'collaboration':{'single-unit':{'warning':_0x4f5b29(0x145)},'closeRoom':_0x4f5b29(0x13c)},'auth':{'needGotoLoginAlert':_0x4f5b29(0x13a)}};function _0x5506(_0x3711e4,_0x3640f6){const _0x342a62=_0x342a();return _0x5506=function(_0x5506ba,_0x5ba402){_0x5506ba=_0x5506ba-0x131;let _0x54d82f=_0x342a62[_0x5506ba];return _0x54d82f;},_0x5506(_0x3711e4,_0x3640f6);}function _0x342a(){const _0x3f7854=['سرور\x20به\x20درخواست\x20همکاری\x20شما\x20پاسخ\x20نمی\x20دهد.\x20ویرایش\x20های\x20شما\x20در\x20محلی\x20ذخیره\x20می\x20شوند.','4357731eQPWIc','509066EPOoqy','138677UwyCHH','730KyFuvM','اتاق\x20همکاری\x20پر\x20است.\x20شما\x20ویرایش\x20های\x20خود\x20را\x20در\x20محلی\x20ذخیره\x20خواهید\x20کرد.','1742584WYcwAB','تداخل\x20ویرایش','آفلاین،\x20ویرایش\x20ها\x20در\x20محلی\x20ذخیره\x20می\x20شوند','اعمال\x20شما\x20با\x20مجوزهای\x20سرور\x20تداخل\x20دارد.\x20لطفاً\x20ویرایش\x20های\x20محلی\x20خود\x20را\x20در\x20جای\x20دیگر\x20ذخیره\x20کنید\x20زیرا\x20پس\x20از\x20تازه\x20سازی\x20صفحه\x20از\x20بین\x20خواهند\x20رفت.','در\x20حال\x20همگام\x20سازی...','اتصال\x20ناموفق\x20بود،\x20لطفا\x20شبکه\x20خود\x20را\x20بررسی\x20کنید.','ورود\x20شما\x20منقضی\x20شده\x20است،\x20برای\x20ورود\x20مجدد\x20کلیک\x20کنید،\x20برای\x20ذخیره\x20ویرایش\x20های\x20محلی\x20خود\x20کلیک\x20کنید.','خطای\x20اعتبارسنجی','امتیازات\x20ویرایش\x20به\x20دلیل\x20بسته\x20شدن\x20اتاق\x20همکاری\x20لغو\x20شد.','برای\x20اتصال\x20مجدد\x20کلیک\x20کنید','همگام\x20سازی','495063YsyZWN','2765452XkfMUe','185vfigGz','3BvOjFL','اتصال\x20ناموفق\x20بود،\x20ما\x20بعداً\x20دوباره\x20تلاش\x20می\x20کنیم.','6648TXRxUe','شما\x20همان\x20پرونده\x20را\x20در\x20یک\x20تب\x20دیگر\x20باز\x20کرده\x20اید.\x20در\x20صورت\x20عدم\x20وجود\x20داده،\x20نمی\x20توانید\x20در\x20این\x20تب\x20ویرایش\x20کنید.','27yYawoE'];_0x342a=function(){return _0x3f7854;};return _0x342a();}export{o as default};
|
package/lib/es/locale/ru-RU.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x2384ca=_0x2a65;(function(_0x3a1c57,_0x2a4079){const _0x4104cb=_0x2a65,_0x2222c8=_0x3a1c57();while(!![]){try{const _0x2eb1b4=parseInt(_0x4104cb(0x1b1))/0x1*(-parseInt(_0x4104cb(0x1bb))/0x2)+-parseInt(_0x4104cb(0x1b7))/0x3+parseInt(_0x4104cb(0x1b3))/0x4+parseInt(_0x4104cb(0x1ba))/0x5*(parseInt(_0x4104cb(0x1c0))/0x6)+-parseInt(_0x4104cb(0x1bc))/0x7+-parseInt(_0x4104cb(0x1bf))/0x8*(-parseInt(_0x4104cb(0x1b6))/0x9)+parseInt(_0x4104cb(0x1b0))/0xa*(parseInt(_0x4104cb(0x1af))/0xb);if(_0x2eb1b4===_0x2a4079)break;else _0x2222c8['push'](_0x2222c8['shift']());}catch(_0x1ed778){_0x2222c8['push'](_0x2222c8['shift']());}}}(_0x440d,0xe674b));function _0x2a65(_0x293e64,_0x8a3063){const _0x440d44=_0x440d();return _0x2a65=function(_0x2a6543,_0x218e02){_0x2a6543=_0x2a6543-0x1af;let _0xe2939d=_0x440d44[_0x2a6543];return _0xe2939d;},_0x2a65(_0x293e64,_0x8a3063);}const e={'collab-client':{'tooltip':{'reconnect':_0x2384ca(0x1c5)}},'collabStatus':{'fetchMiss':_0x2384ca(0x1b5),'conflict':_0x2384ca(0x1c2),'notCollab':_0x2384ca(0x1b2),'synced':_0x2384ca(0x1b4),'syncing':_0x2384ca(0x1c8),'offline':_0x2384ca(0x1c4)},'session':{'connection-failed':_0x2384ca(0x1c7),'will-retry':_0x2384ca(0x1c6),'room-full':_0x2384ca(0x1c1),'collaboration-timeout':'The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'},'conflict':{'title':'Collaboration\x20Conflict','content':'There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.'},'permission':{'title':_0x2384ca(0x1b8),'content':_0x2384ca(0x1c3)},'collaboration':{'single-unit':{'warning':_0x2384ca(0x1be)},'closeRoom':_0x2384ca(0x1b9)},'auth':{'needGotoLoginAlert':_0x2384ca(0x1bd)}},o=e;export{o as default};function _0x440d(){const _0x112db9=['12564832hxaIVe','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','13240yawFOi','6RbstXz','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Edit\x20conflicts','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','Click\x20to\x20Reconnect','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Connection\x20failed,\x20please\x20check\x20your\x20network.','Syncing...','1903RbFpCz','53710MQLGcU','417ySZEIV','Local\x20file','175848auRECg','Synced','Syncing\x20server\x20data...','9405nUVOOn','2549292WmCZXi','Authentication\x20Error','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','6204670EhkAaK','1702MnJkYO'];_0x440d=function(){return _0x112db9;};return _0x440d();}
|
package/lib/es/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x32c3(_0x569327,_0x36e2cc){const _0x273c06=_0x273c();return _0x32c3=function(_0x32c3ea,_0x518f2d){_0x32c3ea=_0x32c3ea-0x1ea;let _0x482875=_0x273c06[_0x32c3ea];return _0x482875;},_0x32c3(_0x569327,_0x36e2cc);}const _0x326410=_0x32c3;(function(_0x4a1a12,_0x430626){const _0x8b52ef=_0x32c3,_0x17c51b=_0x4a1a12();while(!![]){try{const _0xb6f8f9=-parseInt(_0x8b52ef(0x1f4))/0x1+-parseInt(_0x8b52ef(0x1f2))/0x2+parseInt(_0x8b52ef(0x1f7))/0x3+-parseInt(_0x8b52ef(0x200))/0x4*(-parseInt(_0x8b52ef(0x1f8))/0x5)+parseInt(_0x8b52ef(0x1f3))/0x6*(-parseInt(_0x8b52ef(0x1ea))/0x7)+-parseInt(_0x8b52ef(0x1ec))/0x8+parseInt(_0x8b52ef(0x1fe))/0x9;if(_0xb6f8f9===_0x430626)break;else _0x17c51b['push'](_0x17c51b['shift']());}catch(_0x5c168e){_0x17c51b['push'](_0x17c51b['shift']());}}}(_0x273c,0x1b6ce));const e={'collab-client':{'tooltip':{'reconnect':_0x326410(0x1f9)}},'collabStatus':{'fetchMiss':_0x326410(0x1ee),'conflict':_0x326410(0x1fd),'notCollab':_0x326410(0x1fa),'synced':'Synced','syncing':_0x326410(0x1eb),'offline':_0x326410(0x1ed)},'session':{'connection-failed':_0x326410(0x1f1),'will-retry':_0x326410(0x1f6),'room-full':_0x326410(0x1f5),'collaboration-timeout':_0x326410(0x1ff)},'conflict':{'title':_0x326410(0x1ef),'content':_0x326410(0x1fb)},'permission':{'title':'Authentication\x20Error','content':_0x326410(0x1f0)},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':_0x326410(0x1fc)}},o=e;function _0x273c(){const _0x2eb458=['14IENDGm','Syncing...','949064ekhMVy','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','Syncing\x20server\x20data...','Collaboration\x20Conflict','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Connection\x20failed,\x20please\x20check\x20your\x20network.','316936xKQFFe','283296LbBYvM','43668KPziiU','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','497238wsbUMV','165tUWRwr','Click\x20to\x20Reconnect','Local\x20file','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Edit\x20conflicts','1956132AHTAvz','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','17508DZcDND'];_0x273c=function(){return _0x2eb458;};return _0x273c();}export{o as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const _0x590836=_0x2e71;function _0x5ccc(){const _0x5b6970=['你的本地文档和服务器的文档存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','1379WplKEC','4IJbUYy','协同冲突','22584tUrAAX','7321815YbOOBD','你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。','957160iFRViV','连接失败,将在一会儿之后重试连接','服务器未响应,你的编辑将在本地缓存','由于协同房间被关闭,编辑权限被收回。','1912782xKGyDe','你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。','正在拉取服务端数据...','1286835XThWMk','权限错误','已同步','本地文件','连接失败,请检查你的网络','1501470rFZkVJ','514954ILadoQ'];_0x5ccc=function(){return _0x5b6970;};return _0x5ccc();}function _0x2e71(_0x82831e,_0x49b5bb){const _0x5ccc3f=_0x5ccc();return _0x2e71=function(_0x2e71a9,_0x3fe8a1){_0x2e71a9=_0x2e71a9-0x99;let _0x3e6373=_0x5ccc3f[_0x2e71a9];return _0x3e6373;},_0x2e71(_0x82831e,_0x49b5bb);}(function(_0xe97d74,_0x33fc1d){const _0x166b2c=_0x2e71,_0x54d318=_0xe97d74();while(!![]){try{const _0x5b5145=parseInt(_0x166b2c(0xad))/0x1+parseInt(_0x166b2c(0xa0))/0x2+-parseInt(_0x166b2c(0xa7))/0x3+-parseInt(_0x166b2c(0x9b))/0x4*(-parseInt(_0x166b2c(0xac))/0x5)+-parseInt(_0x166b2c(0xa4))/0x6+parseInt(_0x166b2c(0x9a))/0x7*(parseInt(_0x166b2c(0x9d))/0x8)+-parseInt(_0x166b2c(0x9e))/0x9;if(_0x5b5145===_0x33fc1d)break;else _0x54d318['push'](_0x54d318['shift']());}catch(_0x5034ae){_0x54d318['push'](_0x54d318['shift']());}}}(_0x5ccc,0x467aa));const o={'collab-client':{'tooltip':{'reconnect':'点击重新连接'}},'collabStatus':{'fetchMiss':_0x590836(0xa6),'conflict':'编辑冲突','notCollab':_0x590836(0xaa),'synced':_0x590836(0xa9),'syncing':'保存中...','offline':'已离线,编辑将在本地缓存'},'session':{'connection-failed':_0x590836(0xab),'will-retry':_0x590836(0xa1),'room-full':'协同房间已满,你的编辑将在本地缓存','collaboration-timeout':_0x590836(0xa2)},'conflict':{'title':_0x590836(0x9c),'content':_0x590836(0x99)},'permission':{'title':_0x590836(0xa8),'content':'你的操作和服务器的权限存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。'},'collaboration':{'single-unit':{'warning':_0x590836(0xa5)},'closeRoom':_0x590836(0xa3)},'auth':{'needGotoLoginAlert':_0x590836(0x9f)}};export{o as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x274e(_0x1cacb0,_0x145e67){const _0x185a9d=_0x185a();return _0x274e=function(_0x274e24,_0x46e1a7){_0x274e24=_0x274e24-0x166;let _0x15c2dd=_0x185a9d[_0x274e24];return _0x15c2dd;},_0x274e(_0x1cacb0,_0x145e67);}const _0x8710f1=_0x274e;(function(_0x4dedf5,_0x2efc97){const _0x1408a1=_0x274e,_0x112163=_0x4dedf5();while(!![]){try{const _0x357b0a=-parseInt(_0x1408a1(0x169))/0x1+-parseInt(_0x1408a1(0x166))/0x2*(-parseInt(_0x1408a1(0x173))/0x3)+-parseInt(_0x1408a1(0x16e))/0x4*(parseInt(_0x1408a1(0x16b))/0x5)+parseInt(_0x1408a1(0x179))/0x6+parseInt(_0x1408a1(0x17c))/0x7+parseInt(_0x1408a1(0x170))/0x8+-parseInt(_0x1408a1(0x17d))/0x9*(parseInt(_0x1408a1(0x17b))/0xa);if(_0x357b0a===_0x2efc97)break;else _0x112163['push'](_0x112163['shift']());}catch(_0x3079fb){_0x112163['push'](_0x112163['shift']());}}}(_0x185a,0xcab4a));const e={'collab-client':{'tooltip':{'reconnect':_0x8710f1(0x174)}},'collabStatus':{'fetchMiss':'Syncing\x20server\x20data...','conflict':_0x8710f1(0x177),'notCollab':_0x8710f1(0x16c),'synced':_0x8710f1(0x167),'syncing':'Syncing...','offline':'Offline,\x20edits\x20would\x20be\x20save\x20on\x20local'},'session':{'connection-failed':_0x8710f1(0x16d),'will-retry':_0x8710f1(0x172),'room-full':_0x8710f1(0x17e),'collaboration-timeout':_0x8710f1(0x16f)},'conflict':{'title':_0x8710f1(0x16a),'content':_0x8710f1(0x168)},'permission':{'title':_0x8710f1(0x171),'content':_0x8710f1(0x176)},'collaboration':{'single-unit':{'warning':_0x8710f1(0x175)},'closeRoom':_0x8710f1(0x178)},'auth':{'needGotoLoginAlert':_0x8710f1(0x17a)}},o=e;function _0x185a(){const _0xc26aa5=['9502472uFzGfu','Authentication\x20Error','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','38091SPftoN','Click\x20to\x20Reconnect','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Edit\x20conflicts','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','8989176zFiYbo','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','11494750TVsQkV','3711799pTJfJT','9fYjsFQ','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','184Tzrflc','Synced','There\x20is\x20a\x20conflict\x20between\x20your\x20local\x20copy\x20and\x20the\x20copy\x20on\x20the\x20server.\x20Please\x20save\x20your\x20local\x20edits,\x20because\x20they\x20will\x20be\x20lost\x20when\x20you\x20reload\x20the\x20page.','989454PWFTZx','Collaboration\x20Conflict','25jlvjlo','Local\x20file','Connection\x20failed,\x20please\x20check\x20your\x20network.','1132140lLwUWB','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'];_0x185a=function(){return _0xc26aa5;};return _0x185a();}export{o as default};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* The config key to determined the URL provided by the snapshot server
|
3
|
+
* to load snapshot. The URL should not ends with a slash.
|
4
|
+
*/
|
5
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
6
|
+
export declare const SNAPSHOT_SERVER_URL_KEY = "SNAPSHOT_SERVER_URL_KEY";
|
7
|
+
/**
|
8
|
+
* Default value for `SNAPSHOT_SERVER_URL_KEY`.
|
9
|
+
*
|
10
|
+
* Determined in the protocol file in `submodules/protocol/universer/v1/snapshot.proto`.
|
11
|
+
*/
|
12
|
+
export declare const DEFAULT_SNAPSHOT_SERVER_URL = "/universer-api/snapshot";
|
13
|
+
/**
|
14
|
+
* @ignore
|
15
|
+
*/
|
16
|
+
export declare const SNAPSHOT_URL_KEY = "SNAPSHOT_URL_KEY";
|
17
|
+
/**
|
18
|
+
* Determines how often should we send changesets.
|
19
|
+
*/
|
20
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
21
|
+
export declare const SEND_CHANGESET_TIMEOUT_KEY = "SEND_CHANGESET_TIMEOUT";
|
22
|
+
export declare const DEFAULT_SEND_CHANGESET_TIMEOUT = 2000;
|
23
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
24
|
+
export declare const COLLAB_WEB_SOCKET_URL_KEY = "COLLAB_WEB_SOCKET_URL";
|
25
|
+
export declare const DEFAULT_COLLAB_WEB_SOCKET_URL = "ws://127.0.0.1:8000/universer-api/comb/connect";
|
26
|
+
/** The heartbeat interval in milliseconds. */
|
27
|
+
export declare const HEARTBEAT_INTERVAL_KEY = "HEARTBEAT_INTERVAL";
|
28
|
+
export declare const DEFAULT_HEARTBEAT_INTERVAL = 30000;
|
29
|
+
export declare const HEARTBEAT_TIMEOUT_KEY = "HEARTBEAT_TIMEOUT";
|
30
|
+
export declare const DEFAULT_HEARTBEAT_TIMEOUT = 20000;
|
31
|
+
export declare const DEFAULT_RETRY_CONNECTING_INTERVAL = 20000;
|
32
|
+
export declare const RETRY_CONNECTING_MAX_COUNT_KEY = "RETRY_CONNECTING_MAX_COUNT";
|
33
|
+
export declare const DEFAULT_RETRY_CONNECTING_MAX_COUNT = 3;
|
34
|
+
/**
|
35
|
+
* A config key to determine how often should Univer save local edits.
|
36
|
+
*/
|
37
|
+
export declare const LOCAL_CACHE_INTERVAL_KEY = "LOCAL_CACHE_INTERVAL";
|
38
|
+
export declare const LOCAL_CACHE_INTERVAL = 1000;
|
39
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
40
|
+
export declare const COLLAB_SUBMIT_CHANGESET_URL_KEY = "COLLAB_SUBMIT_CHANGESET_URL";
|
41
|
+
/** The url prefix is determined by protocol in submodules/protocol/universer/v1/comb.proto */
|
42
|
+
export declare const DEFAULT_COLLAB_SUBMIT_CHANGESET_URL = "/universer-api/comb";
|
43
|
+
/**
|
44
|
+
* The config key to determined the URL provided by the auth server
|
45
|
+
*/
|
46
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
47
|
+
export declare const LOGIN_URL_KEY = "LOGIN_URL_KEY";
|
48
|
+
export declare const DEFAULT_LOGIN_URL = "/universer-api/oidc/authpage";
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { DocumentDataModel, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
|
+
import { DocumentSkeleton, IRender, IRenderContext, IRenderModule, DocumentViewModel, IRenderManagerService } from '@univerjs/engine-render';
|
3
|
+
import { Nullable } from 'vitest';
|
4
|
+
export declare class MockRenderManagerService implements Pick<IRenderManagerService, 'getRenderById'> {
|
5
|
+
private readonly _injector;
|
6
|
+
constructor(_injector: Injector);
|
7
|
+
getRenderById(_unitId: string): Nullable<IRender>;
|
8
|
+
}
|
9
|
+
export declare class MockDocSkeletonManagerService extends RxDisposable implements IRenderModule {
|
10
|
+
private readonly _context;
|
11
|
+
private readonly _univerInstanceService;
|
12
|
+
private _docViewModel;
|
13
|
+
private readonly _currentSkeleton$;
|
14
|
+
readonly currentSkeleton$: import('rxjs').Observable<Nullable<DocumentSkeleton>>;
|
15
|
+
private readonly _currentSkeletonBefore$;
|
16
|
+
readonly currentSkeletonBefore$: import('rxjs').Observable<Nullable<DocumentSkeleton>>;
|
17
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService);
|
18
|
+
dispose(): void;
|
19
|
+
private _update;
|
20
|
+
getSkeleton(): DocumentSkeleton;
|
21
|
+
getViewModel(): DocumentViewModel;
|
22
|
+
private _buildDocViewModel;
|
23
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/lib/types/controllers/collab-cursor/__tests__/sheet-collab-cursor.controller.spec.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
|
3
|
+
import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
4
|
+
import { CollaborationSessionService } from '../../services/collaboration-session/collaboration-session.service';
|
5
|
+
/**
|
6
|
+
* This controller adds collaboration cursors to Univer. It works with `CollabCursorRenderController`.
|
7
|
+
*
|
8
|
+
* This controller is also responsible for managing online collaborators' data.
|
9
|
+
*/
|
10
|
+
export declare class CollabCursorController extends RxDisposable {
|
11
|
+
private readonly _univerInstanceService;
|
12
|
+
private readonly _injector;
|
13
|
+
private readonly _collabSessionService;
|
14
|
+
private readonly _entities;
|
15
|
+
private readonly _entityInit$;
|
16
|
+
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService);
|
17
|
+
dispose(): void;
|
18
|
+
getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor>>;
|
19
|
+
private _init;
|
20
|
+
private _startSheetCollabCursor;
|
21
|
+
private _startDocCollabCursor;
|
22
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { ICollaborationUser, ITransformService } from '@univerjs-pro/collaboration';
|
2
|
+
import { IDocCollabCursor } from '../../models/cursor';
|
3
|
+
import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
4
|
+
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
|
5
|
+
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
6
|
+
import { MemberService } from '../../services/member/member.service';
|
7
|
+
import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
|
8
|
+
/**
|
9
|
+
* Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
|
10
|
+
*/
|
11
|
+
export declare class DocCollabCursorEntity extends RxDisposable {
|
12
|
+
readonly unitID: string;
|
13
|
+
private readonly _session;
|
14
|
+
private readonly _injector;
|
15
|
+
private readonly _colorAssignService;
|
16
|
+
private readonly _memberService;
|
17
|
+
private readonly _syncEditingCollabCursorService;
|
18
|
+
private readonly _transformService;
|
19
|
+
private readonly _univerInstanceService;
|
20
|
+
private readonly _commandService;
|
21
|
+
private _online;
|
22
|
+
private _init;
|
23
|
+
/** Cursor info of the collaboration room members. The key would be the memberID. */
|
24
|
+
private _cursorInfo$;
|
25
|
+
cursorInfo$: import('rxjs').Observable<Map<string, IDocCollabCursor>>;
|
26
|
+
get cursorInfo(): Readonly<Map<string, IDocCollabCursor>>;
|
27
|
+
private _roomMembers$;
|
28
|
+
roomMembers$: import('rxjs').Observable<ICollaborationUser[]>;
|
29
|
+
get roomMembers(): Readonly<ICollaborationUser[]>;
|
30
|
+
constructor(unitID: string, _session: CollaborationSession, _injector: Injector, _colorAssignService: ColorAssignService, _memberService: MemberService, _syncEditingCollabCursorService: DocSyncEditingCollabCursorService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
|
31
|
+
dispose(): void;
|
32
|
+
init(): void;
|
33
|
+
private _onCursorUpdate;
|
34
|
+
private _onCursorDelete;
|
35
|
+
private _updateLocalCursor;
|
36
|
+
private _toggleOnline;
|
37
|
+
private _toggleOffline;
|
38
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { DocumentDataModel, ICommandService, RxDisposable, ThemeService } from '@univerjs/core';
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
|
+
import { DocSkeletonManagerService } from '@univerjs/docs';
|
4
|
+
import { CollabCursorController } from './collab-cursor.controller';
|
5
|
+
/**
|
6
|
+
* This controller works with `CollabCursorController` to render doc collaboration cursors.
|
7
|
+
*/
|
8
|
+
export declare class DocCollabCursorRenderController extends RxDisposable implements IRenderModule {
|
9
|
+
private readonly _context;
|
10
|
+
private readonly _docSkeletonManagerService;
|
11
|
+
private readonly _collabCursorController;
|
12
|
+
private readonly _commandService;
|
13
|
+
private readonly _themeService;
|
14
|
+
/** Cursors stored for different Workbooks. */
|
15
|
+
private _cursorShapes;
|
16
|
+
private _cursors;
|
17
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService, _collabCursorController: CollabCursorController, _commandService: ICommandService, _themeService: ThemeService);
|
18
|
+
private _init;
|
19
|
+
private _updateCollabCursors;
|
20
|
+
private _refreshCollabCursors;
|
21
|
+
private _removeCollabCursors;
|
22
|
+
private _initCommandExecutedListener;
|
23
|
+
private _initResize;
|
24
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ICollaborationUser } from '@univerjs-pro/collaboration';
|
2
|
+
import { ISheetCollabCursor } from '../../models/cursor';
|
3
|
+
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
|
4
|
+
import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
5
|
+
import { RefRangeService } from '@univerjs/sheets';
|
6
|
+
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
7
|
+
import { MemberService } from '../../services/member/member.service';
|
8
|
+
/**
|
9
|
+
* Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
|
10
|
+
*/
|
11
|
+
export declare class SheetCollabCursorEntity extends RxDisposable {
|
12
|
+
readonly unitID: string;
|
13
|
+
private readonly _session;
|
14
|
+
private readonly _injector;
|
15
|
+
private readonly _colorAssignService;
|
16
|
+
private readonly _memberService;
|
17
|
+
private readonly _univerInstanceService;
|
18
|
+
private readonly _commandService;
|
19
|
+
private _refRangeService;
|
20
|
+
private _online;
|
21
|
+
private _init;
|
22
|
+
/** Cursor info of the collaboration room members. The key would be the memberID. */
|
23
|
+
private _cursorInfo$;
|
24
|
+
cursorInfo$: import('rxjs').Observable<Map<string, ISheetCollabCursor>>;
|
25
|
+
get cursorInfo(): Readonly<Map<string, ISheetCollabCursor>>;
|
26
|
+
private _roomMembers$;
|
27
|
+
roomMembers$: import('rxjs').Observable<ICollaborationUser[]>;
|
28
|
+
get roomMembers(): Readonly<ICollaborationUser[]>;
|
29
|
+
constructor(unitID: string, _session: CollaborationSession, _injector: Injector, _colorAssignService: ColorAssignService, _memberService: MemberService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _refRangeService: RefRangeService);
|
30
|
+
dispose(): void;
|
31
|
+
init(): void;
|
32
|
+
private _onCursorUpdate;
|
33
|
+
private _onCursorDelete;
|
34
|
+
private _getMergeRange;
|
35
|
+
private _onRefRangeChange;
|
36
|
+
private _updateLocalCursor;
|
37
|
+
private _toggleOnline;
|
38
|
+
private _toggleOffline;
|
39
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Workbook, RxDisposable, ThemeService } from '@univerjs/core';
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
4
|
+
import { CollabCursorController } from './collab-cursor.controller';
|
5
|
+
/**
|
6
|
+
* This controller works with `CollabCursorController` to render sheet collaboration cursors.
|
7
|
+
*/
|
8
|
+
export declare class SheetCollabCursorRenderController extends RxDisposable implements IRenderModule {
|
9
|
+
private readonly _context;
|
10
|
+
private readonly _sheetSkeletonManagerService;
|
11
|
+
private readonly _collabCursorController;
|
12
|
+
private readonly _themeService;
|
13
|
+
/** Cursors stored for different Workbooks. */
|
14
|
+
private _cursors;
|
15
|
+
private _lastPointer;
|
16
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _collabCursorController: CollabCursorController, _themeService: ThemeService);
|
17
|
+
private _init;
|
18
|
+
private _updateCollabCursors;
|
19
|
+
private _removeCollabCursors;
|
20
|
+
private _getSheetObject;
|
21
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
|
2
|
+
import { IUIPartsService } from '@univerjs/ui';
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
4
|
+
import { CollaborationController } from '../collaboration/collaboration.controller';
|
5
|
+
import { CollaborationStatus } from '../collaboration/collaboration-state';
|
6
|
+
/**
|
7
|
+
* This controller is responsible for monitoring the collaboration status of the currently focused unit.
|
8
|
+
*/
|
9
|
+
export declare class DesktopCollaborationStatusDisplayController extends Disposable {
|
10
|
+
private readonly _univerInstanceService;
|
11
|
+
private readonly _uiPartsService;
|
12
|
+
private readonly _injector;
|
13
|
+
private readonly _collaborationController;
|
14
|
+
protected readonly _status$: BehaviorSubject<CollaborationStatus>;
|
15
|
+
constructor(_univerInstanceService: IUniverInstanceService, _uiPartsService: IUIPartsService, _injector: Injector, _collaborationController: CollaborationController);
|
16
|
+
private _initStatusListener;
|
17
|
+
protected _initStatusComponent(): void;
|
18
|
+
}
|
File without changes
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { IDisposable, ILocalStorageService, Nullable, ILogService } from '@univerjs/core';
|
2
|
+
import { IMessageOptions, IMessageProps } from '@univerjs/design';
|
3
|
+
import { IBeforeCloseService, IMessageService, INotificationService } from '@univerjs/ui';
|
4
|
+
import { ICombResponseEvent } from '@univerjs-pro/collaboration';
|
5
|
+
import { Subject } from 'rxjs';
|
6
|
+
import { ICollaborationSocket, ICollaborationSocketService } from '../../../services/socket/collaboration-socket.service';
|
7
|
+
/**
|
8
|
+
* The handler object for a mocked socket connection. You can terminate, send messages / error through this object.
|
9
|
+
*/
|
10
|
+
export interface IMockCollabSessionSocketHandler extends ICollaborationSocket {
|
11
|
+
socket: ICollaborationSocket;
|
12
|
+
close$: Subject<CloseEvent>;
|
13
|
+
error$: Subject<Event>;
|
14
|
+
open$: Subject<Event>;
|
15
|
+
message$: Subject<ICombResponseEvent>;
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* This service provides a mocked
|
19
|
+
*/
|
20
|
+
export declare class MockCollaborationSocketService implements ICollaborationSocketService {
|
21
|
+
private readonly _logService;
|
22
|
+
private readonly _handlers;
|
23
|
+
constructor(_logService: ILogService);
|
24
|
+
createSocket(url: string): Nullable<ICollaborationSocket>;
|
25
|
+
/** Test scripts could get the session handler from this method to mock network events. */
|
26
|
+
getHandler(url: string): Nullable<IMockCollabSessionSocketHandler>;
|
27
|
+
}
|
28
|
+
export declare class MockBeforeCloseService implements IBeforeCloseService {
|
29
|
+
private _onCloseCallbacks;
|
30
|
+
private _beforeCloseCallbacks;
|
31
|
+
registerBeforeClose(callback: () => string | undefined): IDisposable;
|
32
|
+
registerOnClose(callback: () => void): IDisposable;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* A mocked local storage service which use in-memory storage.
|
36
|
+
*/
|
37
|
+
export declare class MockLocalStorageService implements ILocalStorageService {
|
38
|
+
private readonly _inMemoryCache;
|
39
|
+
getItem<T>(key: string): Promise<T | null>;
|
40
|
+
setItem<T>(key: string, value: T): Promise<T>;
|
41
|
+
removeItem(_key: string): Promise<void>;
|
42
|
+
clear(): Promise<void>;
|
43
|
+
key(_index: number): Promise<string | null>;
|
44
|
+
keys(): Promise<string[]>;
|
45
|
+
iterate<T, U>(_iteratee: (value: T, key: string, iterationNumber: number) => U): Promise<U>;
|
46
|
+
}
|
47
|
+
export declare class MockMessageService implements IMessageService {
|
48
|
+
show(_options: IMessageOptions & Omit<IMessageProps, 'key'>): IDisposable;
|
49
|
+
setContainer(_container: HTMLElement): void;
|
50
|
+
getContainer(): HTMLElement;
|
51
|
+
}
|
52
|
+
export declare class MockNotificationService implements INotificationService {
|
53
|
+
show(): IDisposable;
|
54
|
+
}
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { IDisposable, IMutationInfo, Nullable, ICommandService, ILogService, Injector, IPermissionService, LocaleService, RxDisposable } from '@univerjs/core';
|
2
|
+
import { UniverType } from '@univerjs/protocol';
|
3
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
4
|
+
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
|
5
|
+
import { CollaborationState, ICollaborationStateHandler, CollaborationStatus } from './collaboration-state';
|
6
|
+
import { DocStateChangeManagerService } from '@univerjs/docs-ui';
|
7
|
+
import { IMessageService } from '@univerjs/ui';
|
8
|
+
import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
|
9
|
+
import { DocTransformIMECacheService } from '../../services/ime-cache-transform/doc-transform-ime-cache.service';
|
10
|
+
import { LocalCacheService } from '../../services/local-cache/local-cache.service';
|
11
|
+
import { SheetTransformSelectionsService } from '../../services/range-selection/sheet-transform-selections.service';
|
12
|
+
import { ISingleActiveUnitService } from '../../services/single-active-unit/single-active-unit.service';
|
13
|
+
import { DocTransformStateCacheService } from '../../services/state-cache-transform/doc-transform-state-cache.service';
|
14
|
+
import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
|
15
|
+
import { DocTransformSelectionsService } from '../../services/text-selection/doc-transform-selections.service';
|
16
|
+
/**
|
17
|
+
* Each univer document instance would map to an `CollaborationEntity` to handle collaborated editing events.
|
18
|
+
*/
|
19
|
+
export declare abstract class CollaborationEntity extends RxDisposable {
|
20
|
+
readonly unitID: string;
|
21
|
+
readonly session: CollaborationSession;
|
22
|
+
protected readonly _type: UniverType;
|
23
|
+
protected readonly _injector: Injector;
|
24
|
+
protected readonly _localCacheService: LocalCacheService;
|
25
|
+
protected readonly _compressMutationService: CompressMutationService;
|
26
|
+
protected readonly _localeService: LocaleService;
|
27
|
+
protected readonly _revisionService: RevisionService;
|
28
|
+
protected readonly _logService: ILogService;
|
29
|
+
protected readonly _commandService: ICommandService;
|
30
|
+
protected readonly _messageService: IMessageService;
|
31
|
+
private _permissionService;
|
32
|
+
protected readonly _singleActiveUnitService?: ISingleActiveUnitService | undefined;
|
33
|
+
protected _state$: BehaviorSubject<Nullable<CollaborationState>>;
|
34
|
+
readonly state$: Observable<Nullable<CollaborationState>>;
|
35
|
+
protected _state: CollaborationState;
|
36
|
+
get state(): CollaborationState;
|
37
|
+
protected _collaborationPaused: boolean;
|
38
|
+
protected _changesetSessionId: string;
|
39
|
+
protected _changesetReqId: number;
|
40
|
+
readonly status$: Observable<CollaborationStatus>;
|
41
|
+
constructor(unitID: string, session: CollaborationSession, _type: UniverType, _injector: Injector, _localCacheService: LocalCacheService, _compressMutationService: CompressMutationService, _localeService: LocaleService, _revisionService: RevisionService, _logService: ILogService, _commandService: ICommandService, _messageService: IMessageService, _permissionService: IPermissionService, _singleActiveUnitService?: ISingleActiveUnitService | undefined);
|
42
|
+
init(): Promise<void>;
|
43
|
+
/**
|
44
|
+
* Pause collaboration on the document. Remote changesets would be inserted to a queue and wait for resuming.
|
45
|
+
* @returns a disposable which will resume collaboration when called.
|
46
|
+
*/
|
47
|
+
pauseCollaboration(): IDisposable;
|
48
|
+
private _updateState;
|
49
|
+
protected _init(): Promise<CollaborationState>;
|
50
|
+
/**
|
51
|
+
* Could not transit the state twice at the same time. So we put a lock here in case of implementation fault.
|
52
|
+
*/
|
53
|
+
private _transitionLocked;
|
54
|
+
private _unlockTransition;
|
55
|
+
private _lockTransition;
|
56
|
+
protected _onLocalMutation(command: IMutationInfo): void;
|
57
|
+
private _remoteChangesetQueue;
|
58
|
+
private _onRemoteChangeset;
|
59
|
+
private _exhaustRemoteChangesetQueue;
|
60
|
+
private _applyRemoteChangeset;
|
61
|
+
private _onRemoteACK;
|
62
|
+
private _onRemoteRejected;
|
63
|
+
private _onRemoteRetry;
|
64
|
+
private _onFetchMissResult;
|
65
|
+
private _toggleOffline;
|
66
|
+
private _toggleOnline;
|
67
|
+
private _createInitialState;
|
68
|
+
protected _createHandler(): ICollaborationStateHandler;
|
69
|
+
private _createInitialStateImpl;
|
70
|
+
private _replayCachedMutations;
|
71
|
+
}
|
72
|
+
export declare class DocCollaborationEntity extends CollaborationEntity {
|
73
|
+
readonly unitID: string;
|
74
|
+
readonly type: UniverType;
|
75
|
+
private readonly _docStateChangeManagerService;
|
76
|
+
private readonly _docTransformIMECacheService;
|
77
|
+
private readonly _docTransformStateCacheService;
|
78
|
+
private readonly _docTransformSelectionsService;
|
79
|
+
private readonly _docSyncEditingCollabCursorService;
|
80
|
+
constructor(unitID: string, type: UniverType, session: CollaborationSession, injector: Injector, localCacheService: LocalCacheService, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, _docStateChangeManagerService: DocStateChangeManagerService, _docTransformIMECacheService: DocTransformIMECacheService, _docTransformStateCacheService: DocTransformStateCacheService, _docTransformSelectionsService: DocTransformSelectionsService, _docSyncEditingCollabCursorService: DocSyncEditingCollabCursorService, logService: ILogService, commandService: ICommandService, messageService: IMessageService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService);
|
81
|
+
protected _createHandler(): ICollaborationStateHandler;
|
82
|
+
protected _init(): Promise<CollaborationState>;
|
83
|
+
}
|
84
|
+
export declare class SheetCollaborationEntity extends CollaborationEntity {
|
85
|
+
readonly unitID: string;
|
86
|
+
readonly type: UniverType;
|
87
|
+
private readonly _sheetTransformSelectionsService;
|
88
|
+
constructor(unitID: string, type: UniverType, session: CollaborationSession, injector: Injector, localCacheService: LocalCacheService, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, _sheetTransformSelectionsService: SheetTransformSelectionsService, logService: ILogService, commandService: ICommandService, messageService: IMessageService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService);
|
89
|
+
protected _createHandler(): ICollaborationStateHandler;
|
90
|
+
protected _init(): Promise<CollaborationState>;
|
91
|
+
}
|