@univerjs-pro/collaboration-client 0.5.0-alpha.0 → 0.5.0-beta.1
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 +49 -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 +58 -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 +33 -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 +75 -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 +23 -24
package/lib/es/locale/en-US.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const _0x3539f2=_0x5ea5;function _0x5ea5(_0x2016ea,_0x393a44){const _0x2cbe9e=_0x2cbe();return _0x5ea5=function(_0x5ea526,_0x1c972b){_0x5ea526=_0x5ea526-0x85;let _0x4af016=_0x2cbe9e[_0x5ea526];return _0x4af016;},_0x5ea5(_0x2016ea,_0x393a44);}function _0x2cbe(){const _0x8b747e=['54OjRbty','2594vbUPfZ','324630HLGsuj','Authentication\x20Error','27132snTnWY','Click\x20to\x20Reconnect','Edit\x20conflicts','2440144dzENVk','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','1744803POWGWX','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','Syncing\x20server\x20data...','282XRkOhW','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','2214964oJZVza','20nnsJmP','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','Syncing...','8881749mPxSqU','Local\x20file','Connection\x20failed,\x20please\x20check\x20your\x20network.','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.','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','Synced'];_0x2cbe=function(){return _0x8b747e;};return _0x2cbe();}(function(_0x186fe1,_0x3a1efa){const _0x2dfa25=_0x5ea5,_0xbc5244=_0x186fe1();while(!![]){try{const _0x385063=parseInt(_0x2dfa25(0x9d))/0x1*(parseInt(_0x2dfa25(0x90))/0x2)+-parseInt(_0x2dfa25(0x98))/0x3+-parseInt(_0x2dfa25(0x85))/0x4+-parseInt(_0x2dfa25(0x91))/0x5*(parseInt(_0x2dfa25(0x8f))/0x6)+parseInt(_0x2dfa25(0x93))/0x7+-parseInt(_0x2dfa25(0x96))/0x8+-parseInt(_0x2dfa25(0x89))/0x9*(-parseInt(_0x2dfa25(0x86))/0xa);if(_0x385063===_0x3a1efa)break;else _0xbc5244['push'](_0xbc5244['shift']());}catch(_0x2b133b){_0xbc5244['push'](_0xbc5244['shift']());}}}(_0x2cbe,0x4dcc2));const e={'collab-client':{'tooltip':{'reconnect':_0x3539f2(0x94)}},'collabStatus':{'fetchMiss':_0x3539f2(0x9c),'conflict':_0x3539f2(0x95),'notCollab':_0x3539f2(0x8a),'synced':_0x3539f2(0x8e),'syncing':_0x3539f2(0x88),'offline':_0x3539f2(0x87)},'session':{'connection-failed':_0x3539f2(0x8b),'will-retry':_0x3539f2(0x8d),'room-full':_0x3539f2(0x99),'collaboration-timeout':_0x3539f2(0x9e)},'conflict':{'title':'Collaboration\x20Conflict','content':_0x3539f2(0x8c)},'permission':{'title':_0x3539f2(0x92),'content':_0x3539f2(0x9b)},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':_0x3539f2(0x9a)},'auth':{'needGotoLoginAlert':_0x3539f2(0x97)}};export{e as default};
|
package/lib/es/locale/fa-IR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0xeb8372=_0x5aa4;(function(_0x458671,_0x3a0857){const _0x54c9c5=_0x5aa4,_0x33175e=_0x458671();while(!![]){try{const _0x42c8a5=parseInt(_0x54c9c5(0xa6))/0x1*(parseInt(_0x54c9c5(0xb0))/0x2)+-parseInt(_0x54c9c5(0xa9))/0x3*(parseInt(_0x54c9c5(0xb4))/0x4)+-parseInt(_0x54c9c5(0xa7))/0x5+-parseInt(_0x54c9c5(0xa3))/0x6*(parseInt(_0x54c9c5(0xb7))/0x7)+parseInt(_0x54c9c5(0xaa))/0x8+parseInt(_0x54c9c5(0xa5))/0x9+parseInt(_0x54c9c5(0x9f))/0xa*(parseInt(_0x54c9c5(0xa0))/0xb);if(_0x42c8a5===_0x3a0857)break;else _0x33175e['push'](_0x33175e['shift']());}catch(_0x40e68e){_0x33175e['push'](_0x33175e['shift']());}}}(_0x1c0f,0xee384));const o={'collab-client':{'tooltip':{'reconnect':_0xeb8372(0xad)}},'collabStatus':{'fetchMiss':_0xeb8372(0xa8),'conflict':'تداخل\x20ویرایش','notCollab':_0xeb8372(0xb1),'synced':_0xeb8372(0xb3),'syncing':_0xeb8372(0xa4),'offline':'آفلاین،\x20ویرایش\x20ها\x20در\x20محلی\x20ذخیره\x20می\x20شوند'},'session':{'connection-failed':_0xeb8372(0xa1),'will-retry':_0xeb8372(0xab),'room-full':_0xeb8372(0xaf),'collaboration-timeout':_0xeb8372(0xb2)},'conflict':{'title':_0xeb8372(0xb6),'content':_0xeb8372(0xae)},'permission':{'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رفت.'},'collaboration':{'single-unit':{'warning':_0xeb8372(0xa2)},'closeRoom':_0xeb8372(0xb5)},'auth':{'needGotoLoginAlert':_0xeb8372(0xac)}};function _0x5aa4(_0xd08375,_0x56a74e){const _0x1c0f09=_0x1c0f();return _0x5aa4=function(_0x5aa4d3,_0x2166c2){_0x5aa4d3=_0x5aa4d3-0x9f;let _0xe69c13=_0x1c0f09[_0x5aa4d3];return _0xe69c13;},_0x5aa4(_0xd08375,_0x56a74e);}function _0x1c0f(){const _0xcd4912=['اتصال\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کنید.','6LceeZg','در\x20حال\x20همگام\x20سازی...','3871314xwOnFZ','1JYKbnc','5347285GoDwJo','در\x20حال\x20همگام\x20سازی\x20داده\x20های\x20سرور...','237987lRdJpx','1425584rpsYNO','اتصال\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کرد.','3418018qOJhVQ','پرونده\x20محلی','سرور\x20به\x20درخواست\x20همکاری\x20شما\x20پاسخ\x20نمی\x20دهد.\x20ویرایش\x20های\x20شما\x20در\x20محلی\x20ذخیره\x20می\x20شوند.','همگام\x20سازی','44ktlreZ','امتیازات\x20ویرایش\x20به\x20دلیل\x20بسته\x20شدن\x20اتاق\x20همکاری\x20لغو\x20شد.','تداخل\x20همکاری','1675821wvfeva','420vagNuj','219967cKayIV'];_0x1c0f=function(){return _0xcd4912;};return _0x1c0f();}export{o as default};
|
package/lib/es/locale/ru-RU.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const _0x31ea5f=_0x42ee;(function(_0x1607d9,_0x28ea88){const _0x4f3c59=_0x42ee,_0xec2081=_0x1607d9();while(!![]){try{const _0x19472e=-parseInt(_0x4f3c59(0x78))/0x1+parseInt(_0x4f3c59(0x7f))/0x2+-parseInt(_0x4f3c59(0x83))/0x3*(parseInt(_0x4f3c59(0x7e))/0x4)+parseInt(_0x4f3c59(0x8b))/0x5+-parseInt(_0x4f3c59(0x85))/0x6+parseInt(_0x4f3c59(0x8e))/0x7*(parseInt(_0x4f3c59(0x8a))/0x8)+-parseInt(_0x4f3c59(0x7a))/0x9*(parseInt(_0x4f3c59(0x8c))/0xa);if(_0x19472e===_0x28ea88)break;else _0xec2081['push'](_0xec2081['shift']());}catch(_0x359c02){_0xec2081['push'](_0xec2081['shift']());}}}(_0x52b5,0x408e0));function _0x52b5(){const _0x330043=['Synced','244176aMZjiZ','Syncing...','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.','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','232sgPMKP','1323230Vxbdpg','3513030AkBnrM','Local\x20file','77021BmwJyg','354024KeiFKA','Edit\x20conflicts','9yDDZGx','Syncing\x20server\x20data...','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','Collaboration\x20Conflict','132QEaxDE','880076FKjLeL','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','Click\x20to\x20Reconnect','1212YWdXWj'];_0x52b5=function(){return _0x330043;};return _0x52b5();}function _0x42ee(_0x203a57,_0x4ab2e0){const _0x52b5f5=_0x52b5();return _0x42ee=function(_0x42eed2,_0x5da200){_0x42eed2=_0x42eed2-0x78;let _0x4373f2=_0x52b5f5[_0x42eed2];return _0x4373f2;},_0x42ee(_0x203a57,_0x4ab2e0);}const e={'collab-client':{'tooltip':{'reconnect':_0x31ea5f(0x82)}},'collabStatus':{'fetchMiss':_0x31ea5f(0x7b),'conflict':_0x31ea5f(0x79),'notCollab':_0x31ea5f(0x8d),'synced':_0x31ea5f(0x84),'syncing':_0x31ea5f(0x86),'offline':_0x31ea5f(0x89)},'session':{'connection-failed':'Connection\x20failed,\x20please\x20check\x20your\x20network.','will-retry':'Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','room-full':_0x31ea5f(0x81),'collaboration-timeout':_0x31ea5f(0x88)},'conflict':{'title':_0x31ea5f(0x7d),'content':_0x31ea5f(0x87)},'permission':{'title':'Authentication\x20Error','content':'Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.'},'collaboration':{'single-unit':{'warning':'You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.'},'closeRoom':_0x31ea5f(0x7c)},'auth':{'needGotoLoginAlert':_0x31ea5f(0x80)}},o=e;export{o as default};
|
package/lib/es/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x1144ae=_0xbaa4;function _0xbaa4(_0x3322b4,_0x57bef7){const _0x54c56e=_0x54c5();return _0xbaa4=function(_0xbaa492,_0x58f73c){_0xbaa492=_0xbaa492-0x11a;let _0x55dca8=_0x54c56e[_0xbaa492];return _0x55dca8;},_0xbaa4(_0x3322b4,_0x57bef7);}(function(_0x1ab363,_0x1400fc){const _0x5dfdd3=_0xbaa4,_0x6309b8=_0x1ab363();while(!![]){try{const _0x56fe8e=parseInt(_0x5dfdd3(0x12a))/0x1*(-parseInt(_0x5dfdd3(0x12e))/0x2)+-parseInt(_0x5dfdd3(0x126))/0x3+-parseInt(_0x5dfdd3(0x128))/0x4*(-parseInt(_0x5dfdd3(0x11f))/0x5)+-parseInt(_0x5dfdd3(0x132))/0x6*(parseInt(_0x5dfdd3(0x130))/0x7)+parseInt(_0x5dfdd3(0x11c))/0x8+parseInt(_0x5dfdd3(0x12c))/0x9*(-parseInt(_0x5dfdd3(0x124))/0xa)+parseInt(_0x5dfdd3(0x129))/0xb*(parseInt(_0x5dfdd3(0x131))/0xc);if(_0x56fe8e===_0x1400fc)break;else _0x6309b8['push'](_0x6309b8['shift']());}catch(_0x2900a6){_0x6309b8['push'](_0x6309b8['shift']());}}}(_0x54c5,0x93497));function _0x54c5(){const _0x53850e=['Syncing...','Local\x20file','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.','5967856IWkLWk','Connection\x20failed,\x20please\x20check\x20your\x20network.','Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','495NDCYwR','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','Authentication\x20Error','10hmRdPu','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','326643XZtdLz','Synced','45824oufzUF','1797708LofowE','80681SdOdLY','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.','8833545OMSnMF','Syncing\x20server\x20data...','2lhIzos','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','196wWXaks','24JaMbVL','92706ICODPw','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.'];_0x54c5=function(){return _0x53850e;};return _0x54c5();}const e={'collab-client':{'tooltip':{'reconnect':'Click\x20to\x20Reconnect'}},'collabStatus':{'fetchMiss':_0x1144ae(0x12d),'conflict':_0x1144ae(0x122),'notCollab':_0x1144ae(0x11a),'synced':_0x1144ae(0x127),'syncing':_0x1144ae(0x134),'offline':_0x1144ae(0x125)},'session':{'connection-failed':_0x1144ae(0x11d),'will-retry':_0x1144ae(0x11e),'room-full':_0x1144ae(0x12f),'collaboration-timeout':_0x1144ae(0x11b)},'conflict':{'title':'Collaboration\x20Conflict','content':_0x1144ae(0x12b)},'permission':{'title':_0x1144ae(0x123),'content':_0x1144ae(0x121)},'collaboration':{'single-unit':{'warning':_0x1144ae(0x120)},'closeRoom':'Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.'},'auth':{'needGotoLoginAlert':_0x1144ae(0x133)}},o=e;export{o as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x3e7979=_0x52f9;(function(_0x52b5e6,_0x468969){const _0xb78069=_0x52f9,_0x2d691f=_0x52b5e6();while(!![]){try{const _0x5a430a=-parseInt(_0xb78069(0x94))/0x1*(parseInt(_0xb78069(0x89))/0x2)+-parseInt(_0xb78069(0x7d))/0x3*(-parseInt(_0xb78069(0x7f))/0x4)+-parseInt(_0xb78069(0x83))/0x5*(parseInt(_0xb78069(0x8e))/0x6)+-parseInt(_0xb78069(0x80))/0x7+-parseInt(_0xb78069(0x8a))/0x8*(-parseInt(_0xb78069(0x81))/0x9)+parseInt(_0xb78069(0x82))/0xa*(-parseInt(_0xb78069(0x8c))/0xb)+parseInt(_0xb78069(0x91))/0xc;if(_0x5a430a===_0x468969)break;else _0x2d691f['push'](_0x2d691f['shift']());}catch(_0x1d9c23){_0x2d691f['push'](_0x2d691f['shift']());}}}(_0x5346,0x5440c));function _0x52f9(_0x4c97f7,_0x240d58){const _0x5346fe=_0x5346();return _0x52f9=function(_0x52f936,_0x223ae5){_0x52f936=_0x52f936-0x7d;let _0x107e01=_0x5346fe[_0x52f936];return _0x107e01;},_0x52f9(_0x4c97f7,_0x240d58);}function _0x5346(){const _0x27d6a8=['你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。','2894796jpKFUW','已离线,编辑将在本地缓存','由于协同房间被关闭,编辑权限被收回。','3qLDIJt','服务器未响应,你的编辑将在本地缓存','你的本地文档和服务器的文档存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','已同步','协同房间已满,你的编辑将在本地缓存','6033DSdvME','你的操作和服务器的权限存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。','1236Npdpoo','11473tnmBTL','693bYUsqp','11130qzHBgp','470670NJAKFp','连接失败,将在一会儿之后重试连接','连接失败,请检查你的网络','你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。','本地文件','协同冲突','188782vvURyh','30584LjRIUD','权限错误','4279KbaBVn','点击重新连接','6mZXoMc','正在拉取服务端数据...'];_0x5346=function(){return _0x27d6a8;};return _0x5346();}const o={'collab-client':{'tooltip':{'reconnect':_0x3e7979(0x8d)}},'collabStatus':{'fetchMiss':_0x3e7979(0x8f),'conflict':'编辑冲突','notCollab':_0x3e7979(0x87),'synced':_0x3e7979(0x97),'syncing':'保存中...','offline':_0x3e7979(0x92)},'session':{'connection-failed':_0x3e7979(0x85),'will-retry':_0x3e7979(0x84),'room-full':_0x3e7979(0x98),'collaboration-timeout':_0x3e7979(0x95)},'conflict':{'title':_0x3e7979(0x88),'content':_0x3e7979(0x96)},'permission':{'title':_0x3e7979(0x8b),'content':_0x3e7979(0x7e)},'collaboration':{'single-unit':{'warning':_0x3e7979(0x90)},'closeRoom':_0x3e7979(0x93)},'auth':{'needGotoLoginAlert':_0x3e7979(0x86)}};export{o as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x183c(){const _0x4e97b8=['Your\x20actions\x20are\x20conflicting\x20with\x20the\x20server\x27s\x20permissions.\x20Please\x20save\x20your\x20local\x20edits\x20elsewhere\x20as\x20they\x20will\x20be\x20discarded\x20after\x20refreshing\x20the\x20page.','530854naCZIM','Editing\x20privileges\x20were\x20revoked\x20because\x20the\x20collaborative\x20room\x20was\x20closed.','113568XOJZwp','Your\x20login\x20has\x20expired,\x20click\x20OK\x20to\x20re-login,\x20click\x20Cancel\x20to\x20save\x20your\x20local\x20edits.','Click\x20to\x20Reconnect','Edit\x20conflicts','Collaboration\x20room\x20is\x20full.\x20You\x20edits\x20would\x20be\x20saved\x20locally.','You\x20opened\x20the\x20same\x20file\x20in\x20another\x20tab.\x20In\x20case\x20of\x20data\x20missing,\x20you\x20cannot\x20edit\x20on\x20this\x20tab.','Connection\x20failed,\x20please\x20check\x20your\x20network.','947862hSiRCa','14208bPZgRv','18NOOMGM','3730310xGjKfm','285aHYsom','Synced','Authentication\x20Error','1122543hlHVov','1cCkPbw','Local\x20file','157283BMJIgn','11kYqGeI','Offline,\x20edits\x20would\x20be\x20save\x20on\x20local','The\x20server\x20is\x20not\x20responding\x20to\x20your\x20collaboration\x20request.\x20Your\x20edits\x20would\x20be\x20saved\x20locally.'];_0x183c=function(){return _0x4e97b8;};return _0x183c();}const _0x44e368=_0x6bd0;function _0x6bd0(_0x1fbdf0,_0x4edea8){const _0x183cc8=_0x183c();return _0x6bd0=function(_0x6bd018,_0xbd2a2b){_0x6bd018=_0x6bd018-0x1dd;let _0x366b94=_0x183cc8[_0x6bd018];return _0x366b94;},_0x6bd0(_0x1fbdf0,_0x4edea8);}(function(_0x1afc7f,_0x41aa34){const _0x3ba192=_0x6bd0,_0x57c2e1=_0x1afc7f();while(!![]){try{const _0x440b0a=-parseInt(_0x3ba192(0x1e0))/0x1*(parseInt(_0x3ba192(0x1e7))/0x2)+parseInt(_0x3ba192(0x1f0))/0x3+parseInt(_0x3ba192(0x1f1))/0x4*(-parseInt(_0x3ba192(0x1f4))/0x5)+-parseInt(_0x3ba192(0x1f2))/0x6*(-parseInt(_0x3ba192(0x1e2))/0x7)+parseInt(_0x3ba192(0x1e9))/0x8+-parseInt(_0x3ba192(0x1df))/0x9+parseInt(_0x3ba192(0x1f3))/0xa*(parseInt(_0x3ba192(0x1e3))/0xb);if(_0x440b0a===_0x41aa34)break;else _0x57c2e1['push'](_0x57c2e1['shift']());}catch(_0x5435f8){_0x57c2e1['push'](_0x57c2e1['shift']());}}}(_0x183c,0x2b732));const e={'collab-client':{'tooltip':{'reconnect':_0x44e368(0x1eb)}},'collabStatus':{'fetchMiss':'Syncing\x20server\x20data...','conflict':_0x44e368(0x1ec),'notCollab':_0x44e368(0x1e1),'synced':_0x44e368(0x1dd),'syncing':'Syncing...','offline':_0x44e368(0x1e4)},'session':{'connection-failed':_0x44e368(0x1ef),'will-retry':'Connection\x20failed,\x20we\x20retry\x20in\x20a\x20while.','room-full':_0x44e368(0x1ed),'collaboration-timeout':_0x44e368(0x1e5)},'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':_0x44e368(0x1de),'content':_0x44e368(0x1e6)},'collaboration':{'single-unit':{'warning':_0x44e368(0x1ee)},'closeRoom':_0x44e368(0x1e8)},'auth':{'needGotoLoginAlert':_0x44e368(0x1ea)}},o=e;export{o as default};
|
@@ -0,0 +1,49 @@
|
|
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
|
+
export declare const DEFAULT_WS_SESSION_TICKET_URL = "/universer-api/user/session-ticket";
|
27
|
+
/** The heartbeat interval in milliseconds. */
|
28
|
+
export declare const HEARTBEAT_INTERVAL_KEY = "HEARTBEAT_INTERVAL";
|
29
|
+
export declare const DEFAULT_HEARTBEAT_INTERVAL = 30000;
|
30
|
+
export declare const HEARTBEAT_TIMEOUT_KEY = "HEARTBEAT_TIMEOUT";
|
31
|
+
export declare const DEFAULT_HEARTBEAT_TIMEOUT = 20000;
|
32
|
+
export declare const DEFAULT_RETRY_CONNECTING_INTERVAL = 20000;
|
33
|
+
export declare const RETRY_CONNECTING_MAX_COUNT_KEY = "RETRY_CONNECTING_MAX_COUNT";
|
34
|
+
export declare const DEFAULT_RETRY_CONNECTING_MAX_COUNT = 3;
|
35
|
+
/**
|
36
|
+
* A config key to determine how often should Univer save local edits.
|
37
|
+
*/
|
38
|
+
export declare const LOCAL_CACHE_INTERVAL_KEY = "LOCAL_CACHE_INTERVAL";
|
39
|
+
export declare const LOCAL_CACHE_INTERVAL = 1000;
|
40
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
41
|
+
export declare const COLLAB_SUBMIT_CHANGESET_URL_KEY = "COLLAB_SUBMIT_CHANGESET_URL";
|
42
|
+
/** The url prefix is determined by protocol in submodules/protocol/universer/v1/comb.proto */
|
43
|
+
export declare const DEFAULT_COLLAB_SUBMIT_CHANGESET_URL = "/universer-api/comb";
|
44
|
+
/**
|
45
|
+
* The config key to determined the URL provided by the auth server
|
46
|
+
*/
|
47
|
+
/** @deprecated Will be removed in the 0.2.19 release */
|
48
|
+
export declare const LOGIN_URL_KEY = "LOGIN_URL_KEY";
|
49
|
+
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,58 @@
|
|
1
|
+
import { IDisposable, ILocalStorageService, Nullable, ILogService } from '@univerjs/core';
|
2
|
+
import { IMessageOptions, IMessageProps } from '@univerjs/design';
|
3
|
+
import { HTTPResponse } from '@univerjs/network';
|
4
|
+
import { IBeforeCloseService, IMessageService, INotificationService } from '@univerjs/ui';
|
5
|
+
import { ICombResponseEvent } from '@univerjs-pro/collaboration';
|
6
|
+
import { ICollaborationSocket, ICollaborationSocketService } from '../../../services/socket/collaboration-socket.service';
|
7
|
+
import { Subject } from 'rxjs';
|
8
|
+
/**
|
9
|
+
* The handler object for a mocked socket connection. You can terminate, send messages / error through this object.
|
10
|
+
*/
|
11
|
+
export interface IMockCollabSessionSocketHandler extends ICollaborationSocket {
|
12
|
+
socket: ICollaborationSocket;
|
13
|
+
close$: Subject<CloseEvent>;
|
14
|
+
error$: Subject<Event>;
|
15
|
+
open$: Subject<Event>;
|
16
|
+
message$: Subject<ICombResponseEvent>;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* This service provides a mocked
|
20
|
+
*/
|
21
|
+
export declare class MockCollaborationSocketService implements ICollaborationSocketService {
|
22
|
+
private readonly _logService;
|
23
|
+
private readonly _handlers;
|
24
|
+
constructor(_logService: ILogService);
|
25
|
+
createSocket(url: string): Nullable<ICollaborationSocket>;
|
26
|
+
/** Test scripts could get the session handler from this method to mock network events. */
|
27
|
+
getHandler(url: string): Nullable<IMockCollabSessionSocketHandler>;
|
28
|
+
}
|
29
|
+
export declare class MockBeforeCloseService implements IBeforeCloseService {
|
30
|
+
private _onCloseCallbacks;
|
31
|
+
private _beforeCloseCallbacks;
|
32
|
+
registerBeforeClose(callback: () => string | undefined): IDisposable;
|
33
|
+
registerOnClose(callback: () => void): IDisposable;
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* A mocked local storage service which use in-memory storage.
|
37
|
+
*/
|
38
|
+
export declare class MockLocalStorageService implements ILocalStorageService {
|
39
|
+
private readonly _inMemoryCache;
|
40
|
+
getItem<T>(key: string): Promise<T | null>;
|
41
|
+
setItem<T>(key: string, value: T): Promise<T>;
|
42
|
+
removeItem(_key: string): Promise<void>;
|
43
|
+
clear(): Promise<void>;
|
44
|
+
key(_index: number): Promise<string | null>;
|
45
|
+
keys(): Promise<string[]>;
|
46
|
+
iterate<T, U>(_iteratee: (value: T, key: string, iterationNumber: number) => U): Promise<U>;
|
47
|
+
}
|
48
|
+
export declare class MockMessageService implements IMessageService {
|
49
|
+
show(_options: IMessageOptions & Omit<IMessageProps, 'key'>): IDisposable;
|
50
|
+
setContainer(_container: HTMLElement): void;
|
51
|
+
getContainer(): HTMLElement;
|
52
|
+
}
|
53
|
+
export declare class MockNotificationService implements INotificationService {
|
54
|
+
show(): IDisposable;
|
55
|
+
}
|
56
|
+
export declare class MockHTTPService {
|
57
|
+
get(url: string): Promise<HTTPResponse<any>>;
|
58
|
+
}
|
@@ -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
|
+
}
|