@univerjs-pro/collaboration-client-ui 1.0.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.css +4 -0
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/config/config.d.ts +7 -0
  66. package/lib/types/controllers/collaboration-client-ui.controller.d.ts +24 -3
  67. package/lib/types/controllers/snapshot-loading/snapshot-loading.controller.d.ts +2 -6
  68. package/lib/types/index.d.ts +0 -1
  69. package/lib/types/locale/en-US.d.ts +4 -0
  70. package/lib/types/services/collaboration-socket/collaboration-socket.service.d.ts +1 -0
  71. package/lib/types/services/local-cache/web-local-cache.service.d.ts +11 -7
  72. package/lib/umd/facade.js +1 -1
  73. package/lib/umd/index.js +1 -1
  74. package/lib/umd/locale/ar-SA.js +1 -1
  75. package/lib/umd/locale/ca-ES.js +1 -1
  76. package/lib/umd/locale/de-DE.js +1 -1
  77. package/lib/umd/locale/en-US.js +1 -1
  78. package/lib/umd/locale/es-ES.js +1 -1
  79. package/lib/umd/locale/fa-IR.js +1 -1
  80. package/lib/umd/locale/fr-FR.js +1 -1
  81. package/lib/umd/locale/id-ID.js +1 -1
  82. package/lib/umd/locale/it-IT.js +1 -1
  83. package/lib/umd/locale/ja-JP.js +1 -1
  84. package/lib/umd/locale/ko-KR.js +1 -1
  85. package/lib/umd/locale/pl-PL.js +1 -1
  86. package/lib/umd/locale/pt-BR.js +1 -1
  87. package/lib/umd/locale/ru-RU.js +1 -1
  88. package/lib/umd/locale/sk-SK.js +1 -1
  89. package/lib/umd/locale/vi-VN.js +1 -1
  90. package/lib/umd/locale/zh-CN.js +1 -1
  91. package/lib/umd/locale/zh-HK.js +1 -1
  92. package/lib/umd/locale/zh-TW.js +1 -1
  93. package/package.json +20 -21
  94. package/lib/types/controllers/collab-cursor/board-collab-cursor-entity.d.ts +0 -32
  95. package/lib/types/controllers/collab-cursor/board-collab-cursor-render.controller.d.ts +0 -21
  96. package/lib/types/controllers/collab-cursor/slide-collab-cursor-entity.d.ts +0 -35
  97. package/lib/types/controllers/collab-cursor/slide-collab-cursor-render.controller.d.ts +0 -21
  98. package/lib/types/controllers/data-loader/data-loader.controller.d.ts +0 -17
  99. package/lib/types/services/formula-calculation-guard/formula-calculation-guard.service.d.ts +0 -38
  100. package/lib/types/services/formula-calculation-guard/util.d.ts +0 -11
  101. package/lib/types/services/url/url.service.d.ts +0 -12
  102. package/lib/types/services/url/web-url.service.d.ts +0 -10
  103. package/lib/types/views/shapes/slide-collab-cursor.shape.d.ts +0 -15
@@ -1 +1 @@
1
- const _0x1f6065=_0x1f48;function _0x1f48(_0x268c83,_0x26dc8b){_0x268c83=_0x268c83-0x11f;const _0x34c65a=_0x34c6();let _0x1f48e2=_0x34c65a[_0x268c83];return _0x1f48e2;}(function(_0x44ee5f,_0x4ff5ad){const _0x46934e=_0x1f48,_0x4603c7=_0x44ee5f();while(!![]){try{const _0xd08a02=-parseInt(_0x46934e(0x126))/0x1+parseInt(_0x46934e(0x131))/0x2+parseInt(_0x46934e(0x122))/0x3*(parseInt(_0x46934e(0x139))/0x4)+-parseInt(_0x46934e(0x132))/0x5*(-parseInt(_0x46934e(0x125))/0x6)+parseInt(_0x46934e(0x136))/0x7*(-parseInt(_0x46934e(0x120))/0x8)+parseInt(_0x46934e(0x137))/0x9+-parseInt(_0x46934e(0x128))/0xa*(parseInt(_0x46934e(0x12b))/0xb);if(_0xd08a02===_0x4ff5ad)break;else _0x4603c7['push'](_0x4603c7['shift']());}catch(_0x2f982b){_0x4603c7['push'](_0x4603c7['shift']());}}}(_0x34c6,0xaaf2e));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x1f6065(0x13a)}},'collabStatus':{'fetchMiss':_0x1f6065(0x133),'conflict':_0x1f6065(0x127),'notCollab':_0x1f6065(0x130),'synced':_0x1f6065(0x12f),'syncing':'保存中...','offline':_0x1f6065(0x12a)},'snapshotLoading':{'timeout':'数据加载停留在\x20{0}/{1},请刷新页面后重试。','refresh':_0x1f6065(0x123)},'session':{'connection-failed':_0x1f6065(0x129),'will-retry':'连接失败,将在一会儿之后重试连接','room-full':_0x1f6065(0x12c),'collaboration-timeout':_0x1f6065(0x124)},'conflict':{'processing':_0x1f6065(0x135),'clearFailed':_0x1f6065(0x12e),'retry':_0x1f6065(0x11f),'title':'协同冲突','content':'你的本地文档和服务器的文档存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。'},'permission':{'title':'权限错误','content':'你的操作和服务器的权限存在冲突。请在别处保存你的本地编辑,本地编辑将在刷新页面后丢弃。'},'collaboration':{'offline-data-not-saved':_0x1f6065(0x134),'single-unit':{'warning':_0x1f6065(0x121)},'closeRoom':_0x1f6065(0x138)},'auth':{'needGotoLoginAlert':_0x1f6065(0x12d)}}};function _0x34c6(){const _0x3a11e6=['92706kRQMuW','762244JZDjnD','编辑冲突','260PsoDwD','连接失败,请检查你的网络','已离线,编辑将在本地缓存','239041lxpBtZ','协同房间已满,你的编辑将在本地缓存','你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。','无法清除本地冲突数据。刷新页面可能再次恢复异常数据,请重试。','已同步','本地文件','2393502FBopri','145NztTqb','正在拉取服务端数据...','你有离线编辑未保存到服务器,请检查网络后重试。','正在处理协同冲突…','14tbcyUL','7223481OyUpEQ','由于协同房间被关闭,编辑权限被收回。','932GdpUFz','点击重新连接','重试并刷新','4411624EADejF','你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。','8793XlJStV','刷新页面','服务器未响应,你的编辑将在本地缓存'];_0x34c6=function(){return _0x3a11e6;};return _0x34c6();}export{e as default};
1
+ function _0x51f4(_0x17b4fd,_0xca1786){_0x17b4fd=_0x17b4fd-0x1d1;const _0x21812f=_0x2181();let _0x51f416=_0x21812f[_0x17b4fd];return _0x51f416;}function _0x2181(){const _0xc6081a=['协同房间已满,你的编辑将在本地缓存','你在另一个标签页打开了同一个文件。为了避免数据丢失,这个标签页的编辑行为将会被限制。','由于协同房间被关闭,编辑权限被收回。','3137lmeQce','数据加载停留在\x20{0}/{1},请刷新页面后重试。','234DjFOoG','223374LllIRz','其他协作者将文档还原到了历史版本。刷新后将加载还原后的内容。','连接失败,请检查你的网络','1243620lmCAjJ','21uOEjNe','本地文件','333WZBDDb','编辑冲突','410706zHTXYh','协同冲突','正在拉取服务端数据...','你的登录已过期,点击确认重新登陆,点击取消去保存你的本地编辑。','65RVNdKi','2896730xpyCBO','已同步','权限错误','你有离线编辑未保存到服务器,请检查网络后重试。','你的本地文档和服务器的文档存在冲突,无法继续同步。刷新后将加载服务器上的最新内容,本地编辑将丢弃。','刷新页面','6VFkfQN','297764rARjQP','22yAYAyD','125752SQftpH','重试并刷新','无法清除本地冲突数据。刷新页面可能再次恢复异常数据,请重试。','正在处理协同冲突…','保存中...','已离线,编辑将在本地缓存'];_0x2181=function(){return _0xc6081a;};return _0x2181();}const _0x14ee76=_0x51f4;(function(_0xa82f5,_0x196e7a){const _0x16c4ce=_0x51f4,_0x17aa8a=_0xa82f5();while(!![]){try{const _0x3d51b9=parseInt(_0x16c4ce(0x1f2))/0x1*(parseInt(_0x16c4ce(0x1e6))/0x2)+parseInt(_0x16c4ce(0x1db))/0x3+-parseInt(_0x16c4ce(0x1e7))/0x4*(-parseInt(_0x16c4ce(0x1df))/0x5)+parseInt(_0x16c4ce(0x1d3))/0x6*(parseInt(_0x16c4ce(0x1d7))/0x7)+-parseInt(_0x16c4ce(0x1e9))/0x8*(-parseInt(_0x16c4ce(0x1d9))/0x9)+-parseInt(_0x16c4ce(0x1e0))/0xa*(-parseInt(_0x16c4ce(0x1e8))/0xb)+parseInt(_0x16c4ce(0x1d6))/0xc*(-parseInt(_0x16c4ce(0x1d2))/0xd);if(_0x3d51b9===_0x196e7a)break;else _0x17aa8a['push'](_0x17aa8a['shift']());}catch(_0x3194ca){_0x17aa8a['push'](_0x17aa8a['shift']());}}}(_0x2181,0x7f424));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'点击重新连接'}},'collabStatus':{'fetchMiss':_0x14ee76(0x1dd),'conflict':_0x14ee76(0x1da),'notCollab':_0x14ee76(0x1d8),'synced':_0x14ee76(0x1e1),'syncing':_0x14ee76(0x1ed),'offline':_0x14ee76(0x1ee)},'snapshotLoading':{'timeout':_0x14ee76(0x1d1),'refresh':_0x14ee76(0x1e5)},'session':{'connection-failed':_0x14ee76(0x1d5),'will-retry':'连接失败,将在一会儿之后重试连接','room-full':_0x14ee76(0x1ef),'collaboration-timeout':'保存超时,正在重试'},'conflict':{'processing':_0x14ee76(0x1ec),'clearFailed':_0x14ee76(0x1eb),'retry':_0x14ee76(0x1ea),'title':_0x14ee76(0x1dc),'content':_0x14ee76(0x1e4)},'permission':{'title':_0x14ee76(0x1e2),'content':'你的操作和服务器的权限存在冲突,无法继续同步。刷新后将加载服务器上的最新内容,本地编辑将丢弃。'},'remoteRevert':{'title':'文档已还原到历史版本','content':_0x14ee76(0x1d4)},'collaboration':{'offline-data-not-saved':_0x14ee76(0x1e3),'single-unit':{'warning':_0x14ee76(0x1f0)},'closeRoom':_0x14ee76(0x1f1)},'auth':{'needGotoLoginAlert':_0x14ee76(0x1de)}}};export{e as default};
@@ -1 +1 @@
1
- const _0x56fd6a=_0x2995;function _0x2dd1(){const _0x42ec8c=['25482kfqDJx','正在擷取伺服器資料...','13WYcfNQ','重試並重新整理','7phqlqF','本機檔案','91494074vHOzeW','646998udKyVB','4597809pqRzkZ','無法清除本機衝突資料。重新整理頁面可能再次還原異常資料,請重試。','54iWEXge','點擊重新連線','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','288CVwTPI','75rnWspj','4nrVtXX','同步中...','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','2323900vSPkCI','1187024GufTGC','協作衝突','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','2DooJzz','已離線,編輯將儲存在本機','伺服器未回應協作請求,您的編輯將儲存在本機。','1694664ayNxmD','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。'];_0x2dd1=function(){return _0x42ec8c;};return _0x2dd1();}function _0x2995(_0x4e04af,_0x506448){_0x4e04af=_0x4e04af-0x1ad;const _0x2dd1f4=_0x2dd1();let _0x2995d8=_0x2dd1f4[_0x4e04af];return _0x2995d8;}(function(_0x43299c,_0x9b3312){const _0x1bc94b=_0x2995,_0x2cd6fd=_0x43299c();while(!![]){try{const _0x3ad4c9=parseInt(_0x1bc94b(0x1c0))/0x1*(-parseInt(_0x1bc94b(0x1c3))/0x2)+parseInt(_0x1bc94b(0x1b5))/0x3*(-parseInt(_0x1bc94b(0x1bc))/0x4)+-parseInt(_0x1bc94b(0x1bb))/0x5*(-parseInt(_0x1bc94b(0x1ad))/0x6)+-parseInt(_0x1bc94b(0x1b1))/0x7*(parseInt(_0x1bc94b(0x1c6))/0x8)+-parseInt(_0x1bc94b(0x1b7))/0x9*(parseInt(_0x1bc94b(0x1bf))/0xa)+-parseInt(_0x1bc94b(0x1b4))/0xb*(parseInt(_0x1bc94b(0x1ba))/0xc)+-parseInt(_0x1bc94b(0x1af))/0xd*(-parseInt(_0x1bc94b(0x1b3))/0xe);if(_0x3ad4c9===_0x9b3312)break;else _0x2cd6fd['push'](_0x2cd6fd['shift']());}catch(_0xd8fdbf){_0x2cd6fd['push'](_0x2cd6fd['shift']());}}}(_0x2dd1,0xd257c));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x56fd6a(0x1b8)}},'collabStatus':{'fetchMiss':_0x56fd6a(0x1ae),'conflict':'編輯衝突','notCollab':_0x56fd6a(0x1b2),'synced':'已同步','syncing':_0x56fd6a(0x1bd),'offline':_0x56fd6a(0x1c4)},'snapshotLoading':{'timeout':_0x56fd6a(0x1c2),'refresh':'重新整理頁面'},'session':{'connection-failed':'連線失敗,請檢查您的網絡。','will-retry':'連線失敗,將在稍後重試連線。','room-full':'協作房間已滿,您的編輯將暫存於本機。','collaboration-timeout':_0x56fd6a(0x1c5)},'conflict':{'processing':'正在處理協同衝突…','clearFailed':_0x56fd6a(0x1b6),'retry':_0x56fd6a(0x1b0),'title':_0x56fd6a(0x1c1),'content':_0x56fd6a(0x1c7)},'permission':{'title':'認證錯誤','content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'offline-data-not-saved':'您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','single-unit':{'warning':_0x56fd6a(0x1be)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x56fd6a(0x1b9)}}};export{e as default};
1
+ const _0x1b641e=_0x20c5;(function(_0x4669e8,_0x568245){const _0x43d91d=_0x20c5,_0x50f8f5=_0x4669e8();while(!![]){try{const _0x2c4924=-parseInt(_0x43d91d(0x1db))/0x1*(parseInt(_0x43d91d(0x1dd))/0x2)+parseInt(_0x43d91d(0x1d6))/0x3*(-parseInt(_0x43d91d(0x1e7))/0x4)+parseInt(_0x43d91d(0x1de))/0x5*(-parseInt(_0x43d91d(0x1e2))/0x6)+-parseInt(_0x43d91d(0x1dc))/0x7+parseInt(_0x43d91d(0x1e6))/0x8+parseInt(_0x43d91d(0x1e4))/0x9+parseInt(_0x43d91d(0x1eb))/0xa;if(_0x2c4924===_0x568245)break;else _0x50f8f5['push'](_0x50f8f5['shift']());}catch(_0x1a66ed){_0x50f8f5['push'](_0x50f8f5['shift']());}}}(_0x3057,0x70b95));function _0x3057(){const _0x28c3d1=['40879KkFvKm','2517662stMAiQ','36XOLQvf','2305tFRuIA','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','已離線,編輯將儲存在本機','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','3126rwWSuj','已同步','996750aAPDfh','連線失敗,將在稍後重試連線。','4771120PHSQkm','7736QDDAFA','正在處理協同衝突…','其他協作者將文件還原至歷史版本。重新整理後將載入還原後的內容。','編輯衝突','17729480gSsPLd','同步中...','協作衝突','由於協作房間已關閉,編輯權限已被收回。','連線失敗,請檢查您的網絡。','重新整理頁面','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','點擊重新連線','本機檔案','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','1059vKFrpL','正在擷取伺服器資料...','儲存逾時,正在重試','文件已還原至歷史版本','您的本機文件與伺服器文件存在衝突,無法繼續同步。重新整理後將載入伺服器上的最新內容,本機編輯將被捨棄。'];_0x3057=function(){return _0x28c3d1;};return _0x3057();}function _0x20c5(_0x26afaf,_0x18b851){_0x26afaf=_0x26afaf-0x1d1;const _0x305781=_0x3057();let _0x20c536=_0x305781[_0x26afaf];return _0x20c536;}const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x1b641e(0x1d3)}},'collabStatus':{'fetchMiss':_0x1b641e(0x1d7),'conflict':_0x1b641e(0x1ea),'notCollab':_0x1b641e(0x1d4),'synced':_0x1b641e(0x1e3),'syncing':_0x1b641e(0x1ec),'offline':_0x1b641e(0x1e0)},'snapshotLoading':{'timeout':_0x1b641e(0x1d5),'refresh':_0x1b641e(0x1d1)},'session':{'connection-failed':_0x1b641e(0x1ef),'will-retry':_0x1b641e(0x1e5),'room-full':'協作房間已滿,您的編輯將暫存於本機。','collaboration-timeout':_0x1b641e(0x1d8)},'conflict':{'processing':_0x1b641e(0x1e8),'clearFailed':'無法清除本機衝突資料。重新整理頁面可能再次還原異常資料,請重試。','retry':'重試並重新整理','title':_0x1b641e(0x1ed),'content':_0x1b641e(0x1da)},'permission':{'title':'認證錯誤','content':'您的操作與伺服器權限存在衝突,無法繼續同步。重新整理後將載入伺服器上的最新內容,本機編輯將被捨棄。'},'remoteRevert':{'title':_0x1b641e(0x1d9),'content':_0x1b641e(0x1e9)},'collaboration':{'offline-data-not-saved':_0x1b641e(0x1df),'single-unit':{'warning':_0x1b641e(0x1e1)},'closeRoom':_0x1b641e(0x1ee)},'auth':{'needGotoLoginAlert':_0x1b641e(0x1d2)}}};export{e as default};
@@ -1 +1 @@
1
- const _0x4b54f9=_0x4fbf;(function(_0x272278,_0x170d1c){const _0x2eb8ac=_0x4fbf,_0x4b76ab=_0x272278();while(!![]){try{const _0x11ac1c=parseInt(_0x2eb8ac(0xaa))/0x1+-parseInt(_0x2eb8ac(0xa8))/0x2+parseInt(_0x2eb8ac(0x9f))/0x3*(-parseInt(_0x2eb8ac(0xb0))/0x4)+-parseInt(_0x2eb8ac(0xb9))/0x5*(parseInt(_0x2eb8ac(0xb2))/0x6)+-parseInt(_0x2eb8ac(0xa0))/0x7*(parseInt(_0x2eb8ac(0xa4))/0x8)+-parseInt(_0x2eb8ac(0xae))/0x9*(parseInt(_0x2eb8ac(0xa1))/0xa)+-parseInt(_0x2eb8ac(0xb6))/0xb*(-parseInt(_0x2eb8ac(0xab))/0xc);if(_0x11ac1c===_0x170d1c)break;else _0x4b76ab['push'](_0x4b76ab['shift']());}catch(_0x4ec139){_0x4b76ab['push'](_0x4b76ab['shift']());}}}(_0x3953,0xf175f));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x4b54f9(0xad)}},'collabStatus':{'fetchMiss':_0x4b54f9(0xac),'conflict':_0x4b54f9(0xaf),'notCollab':'本機檔案','synced':_0x4b54f9(0xa9),'syncing':'同步中...','offline':_0x4b54f9(0xa6)},'snapshotLoading':{'timeout':'資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','refresh':_0x4b54f9(0xa5)},'session':{'connection-failed':'連線失敗,請檢查您的網路。','will-retry':'連線失敗,將在稍後重試連線。','room-full':_0x4b54f9(0x9e),'collaboration-timeout':_0x4b54f9(0xb5)},'conflict':{'processing':_0x4b54f9(0xb4),'clearFailed':_0x4b54f9(0xa3),'retry':_0x4b54f9(0xb8),'title':'協作衝突','content':_0x4b54f9(0xa7)},'permission':{'title':_0x4b54f9(0xb3),'content':_0x4b54f9(0xb1)},'collaboration':{'offline-data-not-saved':_0x4b54f9(0xa2),'single-unit':{'warning':'您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。'},'closeRoom':_0x4b54f9(0xba)},'auth':{'needGotoLoginAlert':_0x4b54f9(0xb7)}}};export{e as default};function _0x4fbf(_0x4419fb,_0x290ed1){_0x4419fb=_0x4419fb-0x9e;const _0x3953dd=_0x3953();let _0x4fbfaf=_0x3953dd[_0x4419fb];return _0x4fbfaf;}function _0x3953(){const _0x1377c6=['您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','678SmVHyj','認證錯誤','正在處理協同衝突…','伺服器未回應協作請求,您的編輯將儲存在本機。','658570SKYwkf','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','重試並重新整理','85145pnjSSl','由於協作房間已關閉,編輯權限已被收回。','協作房間已滿,您的編輯將暫存於本機。','3dwdGBp','2470783XtYPIM','10owavcH','您有未儲存至伺服器的離線編輯,請檢查網路後重試。','無法清除本機衝突資料。重新整理頁面可能再次還原異常資料,請重試。','8iRMamU','重新整理頁面','已離線,編輯將儲存在本機','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','3287624dHIVfe','已同步','129889QLUexF','1164PKsofW','正在擷取伺服器資料...','點擊重新連線','3412791rJszQx','編輯衝突','2591996cXkpfj'];_0x3953=function(){return _0x1377c6;};return _0x3953();}
1
+ function _0x1690(){const _0x12cd02=['99UMCIjM','4148844yolNjN','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','2405754hLSxog','6219LnuRpS','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','本機檔案','您的操作與伺服器權限存在衝突,無法繼續同步。重新整理後將載入伺服器上的最新內容,本機編輯將被捨棄。','其他協作者將文件還原至歷史版本。重新整理後將載入還原後的內容。','41815PrYZoF','協作衝突','21451290mbtcqj','連線失敗,將在稍後重試連線。','正在處理協同衝突…','點擊重新連線','儲存逾時,正在重試','編輯衝突','302331BDsemp','72wBPRsq','16134aaHKio','同步中...','您的本機文件與伺服器文件存在衝突,無法繼續同步。重新整理後將載入伺服器上的最新內容,本機編輯將被捨棄。','已離線,編輯將儲存在本機','連線失敗,請檢查您的網路。','重新整理頁面','10936TeYOBt','正在擷取伺服器資料...','由於協作房間已關閉,編輯權限已被收回。'];_0x1690=function(){return _0x12cd02;};return _0x1690();}const _0x1ce5f3=_0x1f9e;function _0x1f9e(_0x428497,_0x4ad956){_0x428497=_0x428497-0x13c;const _0x16904d=_0x1690();let _0x1f9ed3=_0x16904d[_0x428497];return _0x1f9ed3;}(function(_0x42b9b9,_0x3e1072){const _0x3204e8=_0x1f9e,_0x1f76e5=_0x42b9b9();while(!![]){try{const _0x32600d=parseInt(_0x3204e8(0x145))/0x1*(-parseInt(_0x3204e8(0x13c))/0x2)+parseInt(_0x3204e8(0x156))/0x3+-parseInt(_0x3204e8(0x157))/0x4*(parseInt(_0x3204e8(0x14e))/0x5)+-parseInt(_0x3204e8(0x148))/0x6+parseInt(_0x3204e8(0x146))/0x7+parseInt(_0x3204e8(0x142))/0x8*(-parseInt(_0x3204e8(0x149))/0x9)+parseInt(_0x3204e8(0x150))/0xa;if(_0x32600d===_0x3e1072)break;else _0x1f76e5['push'](_0x1f76e5['shift']());}catch(_0x4044d2){_0x1f76e5['push'](_0x1f76e5['shift']());}}}(_0x1690,0x84c83));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x1ce5f3(0x153)}},'collabStatus':{'fetchMiss':_0x1ce5f3(0x143),'conflict':_0x1ce5f3(0x155),'notCollab':_0x1ce5f3(0x14b),'synced':'已同步','syncing':_0x1ce5f3(0x13d),'offline':_0x1ce5f3(0x13f)},'snapshotLoading':{'timeout':'資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','refresh':_0x1ce5f3(0x141)},'session':{'connection-failed':_0x1ce5f3(0x140),'will-retry':_0x1ce5f3(0x151),'room-full':'協作房間已滿,您的編輯將暫存於本機。','collaboration-timeout':_0x1ce5f3(0x154)},'conflict':{'processing':_0x1ce5f3(0x152),'clearFailed':'無法清除本機衝突資料。重新整理頁面可能再次還原異常資料,請重試。','retry':'重試並重新整理','title':_0x1ce5f3(0x14f),'content':_0x1ce5f3(0x13e)},'permission':{'title':'認證錯誤','content':_0x1ce5f3(0x14c)},'remoteRevert':{'title':'文件已還原至歷史版本','content':_0x1ce5f3(0x14d)},'collaboration':{'offline-data-not-saved':'您有未儲存至伺服器的離線編輯,請檢查網路後重試。','single-unit':{'warning':_0x1ce5f3(0x14a)},'closeRoom':_0x1ce5f3(0x144)},'auth':{'needGotoLoginAlert':_0x1ce5f3(0x147)}}};export{e as default};
@@ -19,5 +19,12 @@ export interface IUniverCollaborationClientUIConfig {
19
19
  * @default false
20
20
  */
21
21
  enableFrontendLog?: boolean;
22
+ /**
23
+ * Whether the plugin shows its conflict notification (a title and text per reason, with a "reload page" action).
24
+ * Set it to `false` to show nothing and handle the `CollaborationConflict` event in the host.
25
+ *
26
+ * @default true
27
+ */
28
+ enableDefaultConflictUI?: boolean;
22
29
  }
23
30
  export declare const defaultPluginConfig: IUniverCollaborationClientUIConfig;
@@ -1,5 +1,5 @@
1
- import { CollaborationUIEventService, ILocalCacheService } from '@univerjs-pro/collaboration-client';
2
- import { Disposable, LocaleService } from '@univerjs/core';
1
+ import { CollaborationController, CollaborationUIEventService, ILocalCacheService } from '@univerjs-pro/collaboration-client';
2
+ import { Disposable, IConfigService, LocaleService } from '@univerjs/core';
3
3
  import { IBeforeCloseService, IMessageService, INotificationService } from '@univerjs/ui';
4
4
  /**
5
5
  * This controller is responsible for the general UI of the collaboration client.
@@ -11,11 +11,32 @@ export declare class CollaborationClientUIController extends Disposable {
11
11
  protected readonly _messageService: IMessageService;
12
12
  private readonly _notificationService;
13
13
  protected readonly _localeService: LocaleService;
14
+ private readonly _collaborationController;
15
+ private readonly _configService;
14
16
  private _conflictNotification;
15
17
  private readonly _retryingConflictCacheUnitIDs;
16
- constructor(_beforeCloseService: IBeforeCloseService, _localCacheService: ILocalCacheService, _collaborationUIEventService: CollaborationUIEventService, _messageService: IMessageService, _notificationService: INotificationService, _localeService: LocaleService);
18
+ /** The "save timed out" message of each unit that is still waiting for an acknowledgement. */
19
+ private readonly _saveTimedOutMessages;
20
+ constructor(_beforeCloseService: IBeforeCloseService, _localCacheService: ILocalCacheService, _collaborationUIEventService: CollaborationUIEventService, _messageService: IMessageService, _notificationService: INotificationService, _localeService: LocaleService, _collaborationController: CollaborationController, _configService: IConfigService);
17
21
  dispose(): void;
22
+ /**
23
+ * Tell the user when a changeset has been resent and is still unacknowledged `SAVE_TIMED_OUT_AFTER` after it
24
+ * was first sent, whatever caused the resend: what matters to the user is that the edits are not saved yet.
25
+ * The notice stays until the unit leaves the awaiting states, i.e. the edits were saved.
26
+ */
27
+ private _initSaveTimedOutMessage;
28
+ private _showSaveTimedOutMessage;
29
+ private _removeSaveTimedOutMessage;
18
30
  private _setupBeforeClosingHandler;
31
+ /**
32
+ * The default handling of conflicts: a notification that names the reason and offers to reload the page.
33
+ * `conflict$` emits once the local edits are backed up and the offline cache is cleared, so reloading is safe
34
+ * from then on; until then the "processing" notice is shown. Hosts handle conflicts themselves by setting
35
+ * `enableDefaultConflictUI` to `false` and listening to the `CollaborationConflict` facade event, the same signal.
36
+ */
37
+ private _initConflictHandling;
38
+ private _onConflict;
39
+ protected _reloadPage(): void;
19
40
  private _initEvent;
20
41
  private _showConflictProcessingNotification;
21
42
  private _showConflictCacheClearFailedNotification;
@@ -1,24 +1,20 @@
1
- import type { ISnapshotLoadingTimeoutState } from '../../views/components/SnapshotLoadingTimeout';
2
1
  import { SnapshotLoadingService } from '@univerjs-pro/collaboration';
3
2
  import { Disposable, Injector, LocaleService } from '@univerjs/core';
4
3
  import { IMessageService, IUIPartsService } from '@univerjs/ui';
5
- import { IURLService } from '../../services/url/url.service';
4
+ import type { ISnapshotLoadingTimeoutState } from '../../views/components/SnapshotLoadingTimeout';
6
5
  export declare class SnapshotLoadingController extends Disposable {
7
6
  private readonly _snapshotLoadingService;
8
7
  private readonly _messageService;
9
8
  private readonly _localeService;
10
9
  private readonly _injector;
11
- private readonly _urlService;
12
10
  private readonly _timeoutState$;
13
11
  private readonly _messageIds;
14
12
  private readonly _blockProgressWatches;
15
- private _latestStates;
16
13
  readonly timeoutState$: import("rxjs").Observable<ISnapshotLoadingTimeoutState | null>;
17
- constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector, uiPartsService: IUIPartsService, _urlService: IURLService);
14
+ constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector, uiPartsService: IUIPartsService);
18
15
  dispose(): void;
19
16
  private _updateMessage;
20
17
  private _watchBlockProgress;
21
18
  private _clearBlockProgressWatch;
22
19
  private _clearTimeoutState;
23
- private _isVisibleUnit;
24
20
  }
@@ -5,6 +5,5 @@ export { UniverCollaborationClientUIPlugin } from './plugin';
5
5
  export { BrowserCollaborationSocketService } from './services/collaboration-socket/collaboration-socket.service';
6
6
  export { RemoteUniscriptService } from './services/remote-uniscript/remote-uniscript.service';
7
7
  export { WebBrowserSingleActiveUnitService } from './services/single-active-unit/single-active-unit.service';
8
- export { IURLService } from './services/url/url.service';
9
8
  export { SheetCollabCursorShape } from './views/shapes/sheet-collab-cursor.shape';
10
9
  export type { ISheetCollabCursorShapeProps } from './views/shapes/sheet-collab-cursor.shape';
@@ -34,6 +34,10 @@ declare const locale: {
34
34
  title: string;
35
35
  content: string;
36
36
  };
37
+ remoteRevert: {
38
+ title: string;
39
+ content: string;
40
+ };
37
41
  collaboration: {
38
42
  'offline-data-not-saved': string;
39
43
  'single-unit': {
@@ -5,6 +5,7 @@ import { CollaborationSocketService } from '@univerjs-pro/collaboration-client';
5
5
  import { IConfigService, ILogService, Injector } from '@univerjs/core';
6
6
  import { HTTPService } from '@univerjs/network';
7
7
  export declare class BrowserCollaborationSocketService extends CollaborationSocketService implements ICollaborationSocketService {
8
+ private readonly _dispose$;
8
9
  constructor(_injector: Injector, _httpService: HTTPService, _configService: IConfigService, _logService: ILogService, _snapshotServerService: ISnapshotServerService);
9
10
  createSocket(rawUrl: string): Promise<Nullable<ICollaborationSocket>>;
10
11
  protected _createSocketURL(url: string, ticket: string): string;
@@ -2,7 +2,7 @@ import type { IChangeset } from '@univerjs-pro/collaboration';
2
2
  import type { ILocalCacheService, IUnitCacheData } from '@univerjs-pro/collaboration-client';
3
3
  import type { IMutationInfo, Nullable, UniverInstanceType } from '@univerjs/core';
4
4
  import { RevisionService } from '@univerjs-pro/collaboration';
5
- import { Disposable, IConfigService, ILocalStorageService } from '@univerjs/core';
5
+ import { Disposable, IConfigService, ILocalStorageService, ILogService, UserManagerService } from '@univerjs/core';
6
6
  /**
7
7
  * This service provide caching to the collaboration controller.
8
8
  */
@@ -10,20 +10,24 @@ export declare class WebLocalCacheService extends Disposable implements ILocalCa
10
10
  private readonly _configService;
11
11
  private readonly _localStorageService;
12
12
  private readonly _revisionService;
13
+ private readonly _logService;
14
+ private readonly _userManagerService;
13
15
  private _cachedData;
14
16
  private _saveTaskMap;
15
17
  private _activeSaveTaskMap;
16
18
  private _disabled;
17
- constructor(_configService: IConfigService, _localStorageService: ILocalStorageService, _revisionService: RevisionService);
19
+ constructor(_configService: IConfigService, _localStorageService: ILocalStorageService, _revisionService: RevisionService, _logService: ILogService, _userManagerService: UserManagerService);
18
20
  disableLocalCache(): void;
19
21
  enableLocalCache(): void;
20
22
  get saveTaskMap(): Map<string, number>;
21
23
  dispose(): void;
22
- loadOfflineData(unitID: string): Promise<Nullable<IUnitCacheData>>;
23
- saveOfflineData(unitID: string, data: IUnitCacheData): Promise<boolean>;
24
- backupOfflineData(unitID: string, reason: string): Promise<void>;
25
- clearOfflineData(unitID: string): Promise<void>;
26
- updateOfflineData(unitID: string, type: UniverInstanceType, awaitingChangeset: Nullable<IChangeset>, pendingMutations: IMutationInfo[]): void;
24
+ loadOfflineData(unitID: string, userId?: string | null): Promise<Nullable<IUnitCacheData>>;
25
+ saveOfflineData(unitID: string, data: IUnitCacheData, userId?: string | null): Promise<boolean>;
26
+ backupOfflineData(unitID: string, reason: string, userId?: string | null): Promise<void>;
27
+ clearOfflineData(unitID: string, userId?: string | null): Promise<void>;
28
+ updateOfflineData(unitID: string, type: UniverInstanceType, awaitingChangeset: Nullable<IChangeset>, pendingMutations: IMutationInfo[], userId?: string | null): void;
29
+ private _getUserId;
30
+ private _normalizeUserId;
27
31
  private _scheduleSaving;
28
32
  private _getSaveTimeout;
29
33
  private _saveCache;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5869a7,_0x4dd345){var _0x30e965=_0x30a6,_0x2e6f95=_0x5869a7();while(!![]){try{var _0x177093=-parseInt(_0x30e965(0x171))/0x1+parseInt(_0x30e965(0x16e))/0x2+-parseInt(_0x30e965(0x16c))/0x3*(parseInt(_0x30e965(0x175))/0x4)+-parseInt(_0x30e965(0x16f))/0x5+-parseInt(_0x30e965(0x16d))/0x6*(parseInt(_0x30e965(0x170))/0x7)+-parseInt(_0x30e965(0x178))/0x8*(parseInt(_0x30e965(0x167))/0x9)+parseInt(_0x30e965(0x168))/0xa*(parseInt(_0x30e965(0x164))/0xb);if(_0x177093===_0x4dd345)break;else _0x2e6f95['push'](_0x2e6f95['shift']());}catch(_0x24815c){_0x2e6f95['push'](_0x2e6f95['shift']());}}}(_0x3a05,0x4b554),function(_0xaeccc6,_0xa12c53){var _0x139d1a=_0x30a6;typeof exports==_0x139d1a(0x16a)&&typeof module<'u'?_0xa12c53(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define=='function'&&define[_0x139d1a(0x173)]?define([_0x139d1a(0x177),_0x139d1a(0x174)],_0xa12c53):(_0xaeccc6=typeof globalThis<'u'?globalThis:_0xaeccc6||self,_0xa12c53(_0xaeccc6['UniverProCollaborationClientUi'],_0xaeccc6[_0x139d1a(0x176)]));}(this,function(_0x4cbf0f,_0x49ce87){var _0x17acfe=_0x30a6,_0x49c115=class extends _0x49ce87[_0x17acfe(0x166)]{['runOnServer'](_0x5ca2bb,_0xe3ba28,..._0x2c2be3){var _0x2a7111=_0x17acfe;return this[_0x2a7111(0x169)]['get'](_0x4cbf0f[_0x2a7111(0x16b)])[_0x2a7111(0x165)](_0x5ca2bb,_0xe3ba28,{},..._0x2c2be3);}};_0x49ce87[_0x17acfe(0x166)][_0x17acfe(0x172)](_0x49c115);}));function _0x30a6(_0x4babc7,_0xa0a41d){_0x4babc7=_0x4babc7-0x164;var _0x3a0506=_0x3a05();var _0x30a690=_0x3a0506[_0x4babc7];return _0x30a690;}function _0x3a05(){var _0x46a894=['UniverCoreFacade','@univerjs-pro/collaboration-client-ui','2424HmlYnN','187XfQywt','runOnServer','FUniver','513ZWtwBy','633310WYXMJP','_injector','object','RemoteUniscriptService','1581veeKfQ','288OQOSMo','581184bwvYly','21915EdCsgB','85736kgbpub','16957MHbubf','extend','amd','@univerjs/core/facade','3280LAsezU'];_0x3a05=function(){return _0x46a894;};return _0x3a05();}
1
+ function _0x3f68(){var _0x4a6b2e=['UniverCoreFacade','get','204676hyWnUR','1196206iyEvbm','330079TWpikq','5482036PKehuD','4396080RXKLCn','@univerjs-pro/collaboration-client-ui','FUniver','object','15OrUHyj','extend','function','RemoteUniscriptService','amd','@univerjs/core/facade','11472368gggOSs','601755UzOUVq'];_0x3f68=function(){return _0x4a6b2e;};return _0x3f68();}function _0xd9c2(_0x55491b,_0x196f79){_0x55491b=_0x55491b-0x145;var _0x3f685c=_0x3f68();var _0xd9c2ca=_0x3f685c[_0x55491b];return _0xd9c2ca;}(function(_0x59edd6,_0xa226bf){var _0x2a3df0=_0xd9c2,_0x3955ce=_0x59edd6();while(!![]){try{var _0x38ec92=-parseInt(_0x2a3df0(0x155))/0x1+-parseInt(_0x2a3df0(0x154))/0x2+-parseInt(_0x2a3df0(0x150))/0x3+-parseInt(_0x2a3df0(0x153))/0x4*(-parseInt(_0x2a3df0(0x149))/0x5)+parseInt(_0x2a3df0(0x145))/0x6+-parseInt(_0x2a3df0(0x156))/0x7+parseInt(_0x2a3df0(0x14f))/0x8;if(_0x38ec92===_0xa226bf)break;else _0x3955ce['push'](_0x3955ce['shift']());}catch(_0x22f68c){_0x3955ce['push'](_0x3955ce['shift']());}}}(_0x3f68,0x63afe),function(_0x21f393,_0x20f0ad){var _0x520928=_0xd9c2;typeof exports==_0x520928(0x148)&&typeof module<'u'?_0x20f0ad(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define==_0x520928(0x14b)&&define[_0x520928(0x14d)]?define([_0x520928(0x146),_0x520928(0x14e)],_0x20f0ad):(_0x21f393=typeof globalThis<'u'?globalThis:_0x21f393||self,_0x20f0ad(_0x21f393['UniverProCollaborationClientUi'],_0x21f393[_0x520928(0x151)]));}(this,function(_0x4a82f6,_0x49fae2){var _0x1f48c4=_0xd9c2,_0x3c2500=class extends _0x49fae2[_0x1f48c4(0x147)]{['runOnServer'](_0x39ad62,_0x5808c8,..._0x516a40){var _0x295f33=_0x1f48c4;return this['_injector'][_0x295f33(0x152)](_0x4a82f6[_0x295f33(0x14c)])['runOnServer'](_0x39ad62,_0x5808c8,{},..._0x516a40);}};_0x49fae2[_0x1f48c4(0x147)][_0x1f48c4(0x14a)](_0x3c2500);}));