@univerjs/docs-thread-comment-ui 0.4.2-nightly.202411011606 → 0.4.2-nightly.202411021605
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/es/index.js +2 -4
- package/lib/umd/index.js +3 -3
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
-
import { Inject, Disposable, CommandType, ICommandService, CustomDecorationType, sequenceExecute, UniverInstanceType, useDependency, IUniverInstanceService, Injector, useObservable, UserManagerService, BuildTextUtils, DependentOn, Plugin, IConfigService } from "@univerjs/core";
|
|
5
|
+
import { Inject, Disposable, CommandType, ICommandService, CustomDecorationType, sequenceExecute, UniverInstanceType, SHEET_EDITOR_UNITS, useDependency, IUniverInstanceService, Injector, useObservable, UserManagerService, BuildTextUtils, DependentOn, Plugin, IConfigService } from "@univerjs/core";
|
|
6
6
|
import { IRenderManagerService, DocumentEditArea } from "@univerjs/engine-render";
|
|
7
7
|
import { ThreadCommentPanelService, SetActiveCommentOperation, ThreadCommentPanel, UniverThreadCommentUIPlugin } from "@univerjs/thread-comment-ui";
|
|
8
8
|
import { DocSelectionManagerService, DocSkeletonManagerService, RichTextEditingMutation, SetTextSelectionsOperation, DocInterceptorService, DOC_INTERCEPTOR_POINT } from "@univerjs/docs";
|
|
@@ -99,7 +99,7 @@ function AddDocCommentMenuItemFactory(accessor) {
|
|
|
99
99
|
icon: "CommentSingle",
|
|
100
100
|
title: "threadCommentUI.panel.addComment",
|
|
101
101
|
tooltip: "threadCommentUI.panel.addComment",
|
|
102
|
-
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
|
|
102
|
+
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC, void 0, SHEET_EDITOR_UNITS),
|
|
103
103
|
disabled$: new Observable(function(subscribe) {
|
|
104
104
|
const observer = accessor.get(DocSelectionManagerService).textSelection$.pipe(debounceTime(16)).subscribe(() => {
|
|
105
105
|
subscribe.next(shouldDisableAddComment(accessor));
|
|
@@ -485,8 +485,6 @@ let DocThreadCommentRenderController = (_a4 = class extends Disposable {
|
|
|
485
485
|
currentIds.has(id) || deleteIds.add(id);
|
|
486
486
|
}), prevThreadIds = currentThreadIdsSorted, addIds.forEach((id) => {
|
|
487
487
|
this._threadCommentModel.getComment(unitId, subUnitId, id) || this._threadCommentModel.addComment(unitId, subUnitId, { id, threadId: id, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId, subUnitId });
|
|
488
|
-
}), deleteIds.forEach((id) => {
|
|
489
|
-
this._threadCommentModel.deleteThread(unitId, subUnitId, id);
|
|
490
488
|
}), this._threadCommentModel.syncThreadComments(unitId, subUnitId, [...addIds]);
|
|
491
489
|
}
|
|
492
490
|
}
|
package/lib/umd/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(c,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/thread-comment-ui"),require("@univerjs/docs"),require("@univerjs/docs-ui"),require("@univerjs/thread-comment"),require("@univerjs/ui"),require("rxjs"),require("react")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/thread-comment-ui","@univerjs/docs","@univerjs/docs-ui","@univerjs/thread-comment","@univerjs/ui","rxjs","react"],o):(c=typeof globalThis<"u"?globalThis:c||self,o(c.UniverDocsThreadCommentUi={},c.UniverCore,c.UniverEngineRender,c.UniverThreadCommentUi,c.UniverDocs,c.UniverDocsUi,c.UniverThreadComment,c.UniverUi,c.rxjs,c.React))})(this,function(c,o,g,M,
|
|
1
|
+
(function(c,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/thread-comment-ui"),require("@univerjs/docs"),require("@univerjs/docs-ui"),require("@univerjs/thread-comment"),require("@univerjs/ui"),require("rxjs"),require("react")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/thread-comment-ui","@univerjs/docs","@univerjs/docs-ui","@univerjs/thread-comment","@univerjs/ui","rxjs","react"],o):(c=typeof globalThis<"u"?globalThis:c||self,o(c.UniverDocsThreadCommentUi={},c.UniverCore,c.UniverEngineRender,c.UniverThreadCommentUi,c.UniverDocs,c.UniverDocsUi,c.UniverThreadComment,c.UniverUi,c.rxjs,c.React))})(this,function(c,o,g,T,M,j,w,C,A,O){"use strict";var Fe=Object.defineProperty;var Le=(c,o,g)=>o in c?Fe(c,o,{enumerable:!0,configurable:!0,writable:!0,value:g}):c[o]=g;var Y=(c,o,g)=>Le(c,typeof o!="symbol"?o+"":o,g);const se="DOC_THREAD_COMMENT_UI_PLUGIN",y="default_doc",de="docs-thread-comment-ui.config",ae={};var ce=Object.defineProperty,me=Object.getOwnPropertyDescriptor,le=(e,t,r,n)=>{for(var i=n>1?void 0:n?me(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&ce(t,r,i),i},Q=(e,t)=>(r,n)=>t(r,n,e);let U=class extends o.Disposable{constructor(t,r){super();Y(this,"_addingComment$",new A.BehaviorSubject(void 0));Y(this,"addingComment$",this._addingComment$.asObservable());this._sidebarService=t,this._threadCommentPanelService=r,this.disposeWithMe(()=>{this._addingComment$.complete()})}get addingComment(){return this._addingComment$.getValue()}startAdd(t){this._addingComment$.next(t)}endAdd(){this._addingComment$.next(void 0)}};U=le([Q(0,C.ISidebarService),Q(1,o.Inject(T.ThreadCommentPanelService))],U);var X={exports:{}},B={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ue=O,ve=Symbol.for("react.element"),fe=Symbol.for("react.fragment"),he=Object.prototype.hasOwnProperty,Ce=ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pe={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var n,i={},s=null,d=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(d=t.ref);for(n in t)he.call(t,n)&&!pe.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:ve,type:e,key:s,ref:d,props:i,_owner:Ce.current}}B.Fragment=fe,B.jsx=k,B.jsxs=k,X.exports=B;var Ie=X.exports;const W={id:"docs.command.add-comment",type:o.CommandType.COMMAND,async handler(e,t){if(!t)return!1;const{comment:r,unitId:n}=t,s=await e.get(w.IThreadCommentDataSourceService).addComment(r),d=e.get(o.ICommandService),a=j.addCustomDecorationBySelectionFactory(e,{id:s.threadId,type:o.CustomDecorationType.COMMENT});if(a){const
|
|
10
|
-
`},startOffset:m.startOffset,endOffset:m.endOffset,collapsed:!0,threadId:D};return _==null||_.blurEditor(),a.startAdd(U),t.setActiveComment({unitId:S,subUnitId:u,commentId:D}),!0}};var ge=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Me=(e,t,r,n)=>{for(var i=n>1?void 0:n?Oe(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&ge(t,r,i),i},R=(e,t)=>(r,n)=>t(r,n,e);let F=class extends o.Disposable{constructor(e,t,r,n,i,s){super(),this._threadCommentPanelService=e,this._univerInstanceService=t,this._commandService=r,this._docThreadCommentService=n,this._renderManagerService=i,this._threadCommentModel=s,this._initSelectionChange(),this._initActiveCommandChange()}_initSelectionChange(){let e;this.disposeWithMe(this._commandService.onCommandExecuted(t=>{var r,n,i,s;if(t.id===T.SetTextSelectionsOperation.id){const d=t.params,{unitId:a,ranges:f}=d,h=this._univerInstanceService.getUnit(a,o.UniverInstanceType.UNIVER_DOC),m=f[0];if((e==null?void 0:e.startOffset)===(m==null?void 0:m.startOffset)&&(e==null?void 0:e.endOffset)===(m==null?void 0:m.endOffset))return;if(e=m,m&&h){const{startOffset:_,endOffset:S,collapsed:p}=m;let l;if(p?l=(n=(r=h.getBody())==null?void 0:r.customDecorations)==null?void 0:n.find(u=>u.startIndex<=_&&u.endIndex>=S-1):l=(s=(i=h.getBody())==null?void 0:i.customDecorations)==null?void 0:s.find(u=>u.startIndex<=_&&u.endIndex>=S-1),l){const u=this._threadCommentModel.getComment(a,y,l.id);u&&!u.resolved&&this._commandService.executeCommand(N.id,{activeComment:{unitId:a,subUnitId:y,commentId:l.id}});return}}if(!this._threadCommentPanelService.activeCommentId)return;this._commandService.executeCommand(M.SetActiveCommentOperation.id)}}))}_initActiveCommandChange(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(e=>{var t,r,n,i;if(e){const s=this._univerInstanceService.getUnit(e.unitId);if(s){const d=(t=this._renderManagerService.getRenderById(e.unitId))==null?void 0:t.with(j.DocBackScrollRenderController),a=(n=(r=s.getBody())==null?void 0:r.customDecorations)==null?void 0:n.find(f=>f.id===e.commentId);a&&d&&d.scrollToRange({startOffset:a.startIndex,endOffset:a.endIndex,collapsed:!1})}}(!e||e.commentId!==((i=this._docThreadCommentService.addingComment)==null?void 0:i.id))&&this._docThreadCommentService.endAdd()}))}};F=Me([R(0,o.Inject(M.ThreadCommentPanelService)),R(1,o.IUniverInstanceService),R(2,o.ICommandService),R(3,o.Inject(P)),R(4,g.IRenderManagerService),R(5,o.Inject(w.ThreadCommentModel))],F);var I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},I.apply(this,arguments)},Te=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},te=O.forwardRef(function(e,t){var r=e.icon,n=e.id,i=e.className,s=e.extend,d=Te(e,["icon","id","className","extend"]),a="univerjs-icon univerjs-icon-".concat(n," ").concat(i||"").trim(),f=O.useRef("_".concat(be()));return ne(r,"".concat(n),{defIds:r.defIds,idSuffix:f.current},I({ref:t,className:a},d),s)});function ne(e,t,r,n,i){return O.createElement(e.tag,I(I({key:t},ye(e,r,i)),n),(De(e,r).children||[]).map(function(s,d){return ne(s,"".concat(t,"-").concat(e.tag,"-").concat(d),r,void 0,i)}))}function ye(e,t,r){var n=I({},e.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1);var i=t.defIds;return!i||i.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var d=s[0],a=s[1];typeof a=="string"&&(n[d]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function De(e,t){var r,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((r=e.children)===null||r===void 0)&&r.length)?I(I({},e),{children:e.children.map(function(i){return typeof i.attrs.id=="string"&&n&&n.indexOf(i.attrs.id)>-1?I(I({},i),{attrs:I(I({},i.attrs),{id:i.attrs.id+t.idSuffix})}):i})}):e}function be(){return Math.random().toString(36).substring(2,8)}te.displayName="UniverIcon";var Ue={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z",fillRule:"evenodd",clipRule:"evenodd"}}]},re=O.forwardRef(function(e,t){return O.createElement(te,Object.assign({},e,{id:"comment-single",ref:t,icon:Ue}))});re.displayName="CommentSingle";const Pe={[C.RibbonStartGroup.OTHERS]:{[G.id]:{order:1,menuItemFactory:Se}},[C.ContextMenuPosition.MAIN_AREA]:{[C.ContextMenuGroup.DATA]:{[V.id]:{order:1,menuItemFactory:_e}}}};var xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,Ee=(e,t,r,n)=>{for(var i=n>1?void 0:n?Re(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&xe(t,r,i),i},Z=(e,t)=>(r,n)=>t(r,n,e);let L=class extends o.Disposable{constructor(e,t,r){super(),this._commandService=e,this._menuManagerService=t,this._componentManager=r,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[W,K,N,V,G].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){this._menuManagerService.mergeMenu(Pe)}_initComponents(){[x].forEach(e=>{this.disposeWithMe(this._componentManager.register(e.componentKey,e))}),this.disposeWithMe(this._componentManager.register("CommentSingle",re))}};L=Ee([Z(0,o.ICommandService),Z(1,C.IMenuManagerService),Z(2,o.Inject(C.ComponentManager))],L);var je=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var i=n>1?void 0:n?we(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&je(t,r,i),i},E=(e,t)=>(r,n)=>t(r,n,e);let z=class extends o.Disposable{constructor(e,t,r,n,i,s,d){super(),this._context=e,this._docInterceptorService=t,this._threadCommentPanelService=r,this._docRenderController=n,this._univerInstanceService=i,this._threadCommentModel=s,this._commandService=d,this._interceptorViewModel(),this._initReRender(),this._initSyncComments()}_initReRender(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(e=>{var r;if(e){this._docRenderController.reRender(e.unitId);return}const t=(r=this._univerInstanceService.getCurrentUnitForType(o.UniverInstanceType.UNIVER_DOC))==null?void 0:r.getUnitId();t&&this._docRenderController.reRender(t)})),this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe(e=>{e.type==="resolve"&&this._docRenderController.reRender(e.unitId)}))}_interceptorViewModel(){this._docInterceptorService.intercept(T.DOC_INTERCEPTOR_POINT.CUSTOM_DECORATION,{handler:(e,t,r)=>{if(!e)return r(e);const{unitId:n,index:i,customDecorations:s}=t,d=this._threadCommentPanelService.activeCommentId,{commentId:a,unitId:f}=d||{},h=s.find(p=>p.id===a),m=this._threadCommentModel.getComment(n,y,e.id);if(!m)return r({...e,show:!1});const _=h&&i>=h.startIndex&&i<=h.endIndex,S=f===n&&e.id===a;return r({...e,active:S||_,show:!m.resolved})}})}_initSyncComments(){var i,s,d;const e=this._context.unit.getUnitId(),t=y,r=(d=(s=(i=this._context.unit.getBody())==null?void 0:i.customDecorations)==null?void 0:s.filter(a=>a.type===o.CustomDecorationType.COMMENT).map(a=>a.id))!=null?d:[];r.forEach(a=>{this._threadCommentModel.getComment(e,t,a)||this._threadCommentModel.addComment(e,t,{id:a,threadId:a,ref:"",dT:"",personId:"",text:{dataStream:""},unitId:e,subUnitId:t})}),r.length&&this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(),y,r);let n=r.sort();this.disposeWithMe(this._commandService.onCommandExecuted(a=>{var f,h,m;if(a.id===T.RichTextEditingMutation.id){if(a.params.unitId!==this._context.unit.getUnitId())return;const S=(m=(h=(f=this._context.unit.getBody())==null?void 0:f.customDecorations)==null?void 0:h.filter(l=>l.type===o.CustomDecorationType.COMMENT).map(l=>l.id))!=null?m:[],p=S.sort();if(JSON.stringify(n)!==JSON.stringify(p)){const l=new Set(n),u=new Set(p),D=new Set,U=new Set;S.forEach(v=>{l.has(v)||D.add(v)}),n.forEach(v=>{u.has(v)||U.add(v)}),n=p,D.forEach(v=>{this._threadCommentModel.getComment(e,t,v)||this._threadCommentModel.addComment(e,t,{id:v,threadId:v,ref:"",dT:"",personId:"",text:{dataStream:""},unitId:e,subUnitId:t})}),U.forEach(v=>{this._threadCommentModel.deleteThread(e,t,v)}),this._threadCommentModel.syncThreadComments(e,t,[...D])}}}))}};z=Ae([E(1,o.Inject(T.DocInterceptorService)),E(2,o.Inject(M.ThreadCommentPanelService)),E(3,o.Inject(j.DocRenderController)),E(4,o.IUniverInstanceService),E(5,o.Inject(w.ThreadCommentModel)),E(6,o.ICommandService)],z);var ie=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ve=(e,t,r)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$e=(e,t,r,n)=>{for(var i=n>1?void 0:n?Ne(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&ie(t,r,i),i},J=(e,t)=>(r,n)=>t(r,n,e),oe=(e,t,r)=>Ve(e,typeof t!="symbol"?t+"":t,r);c.UniverDocsThreadCommentUIPlugin=class extends o.Plugin{constructor(t=ae,r,n,i){super(),this._config=t,this._injector=r,this._renderManagerSrv=n,this._configService=i;const{menu:s,...d}=this._config;s&&this._configService.setConfig("menu",s,{merge:!0}),this._configService.setConfig(de,d)}onStarting(){[[L],[F],[P]].forEach(t=>{this._injector.add(t)})}onRendered(){this._initRenderModule(),this._injector.get(F),this._injector.get(L)}_initRenderModule(){[z].forEach(t=>{this._renderManagerSrv.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,t)})}},oe(c.UniverDocsThreadCommentUIPlugin,"pluginName",se),oe(c.UniverDocsThreadCommentUIPlugin,"type",o.UniverInstanceType.UNIVER_DOC),c.UniverDocsThreadCommentUIPlugin=$e([o.DependentOn(M.UniverThreadCommentUIPlugin),J(1,o.Inject(o.Injector)),J(2,g.IRenderManagerService),J(3,o.IConfigService)],c.UniverDocsThreadCommentUIPlugin),c.AddDocCommentComment=W,c.DeleteDocCommentComment=K,c.ShowCommentPanelOperation=N,c.StartAddCommentOperation=V,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
9
|
+
*/var ue=O,ve=Symbol.for("react.element"),fe=Symbol.for("react.fragment"),he=Object.prototype.hasOwnProperty,Ce=ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pe={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var n,i={},s=null,d=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(d=t.ref);for(n in t)he.call(t,n)&&!pe.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:ve,type:e,key:s,ref:d,props:i,_owner:Ce.current}}B.Fragment=fe,B.jsx=k,B.jsxs=k,X.exports=B;var Ie=X.exports;const W={id:"docs.command.add-comment",type:o.CommandType.COMMAND,async handler(e,t){if(!t)return!1;const{comment:r,unitId:n}=t,s=await e.get(w.IThreadCommentDataSourceService).addComment(r),d=e.get(o.ICommandService),a=j.addCustomDecorationBySelectionFactory(e,{id:s.threadId,type:o.CustomDecorationType.COMMENT});if(a){const v={id:w.AddCommentMutation.id,params:{unitId:n,subUnitId:y,comment:s}},h={id:T.SetActiveCommentOperation.id,params:{unitId:n,subUnitId:y,commentId:s.id}};return(await o.sequenceExecute([v,a,h],d)).result}return!1}},K={id:"docs.command.delete-comment",type:o.CommandType.COMMAND,async handler(e,t){if(!t)return!1;const{commentId:r,unitId:n}=t,i=e.get(o.ICommandService),s=j.deleteCustomDecorationFactory(e,{id:r,unitId:n});return s?(await o.sequenceExecute([s],i)).result:!1}},ee=e=>{const t=e.get(g.IRenderManagerService),r=e.get(M.DocSelectionManagerService),n=t.getCurrent(),i=n==null?void 0:n.with(M.DocSkeletonManagerService).getSkeleton(),s=i==null?void 0:i.getViewModel().getEditArea();if(s===g.DocumentEditArea.FOOTER||s===g.DocumentEditArea.HEADER)return!0;const d=r.getActiveTextRange();return!!(d==null||d.collapsed)};function _e(e){return{id:V.id,type:C.MenuItemType.BUTTON,icon:"CommentSingle",title:"threadCommentUI.panel.addComment",tooltip:"threadCommentUI.panel.addComment",hidden$:C.getMenuHiddenObservable(e,o.UniverInstanceType.UNIVER_DOC,void 0,o.SHEET_EDITOR_UNITS),disabled$:new A.Observable(function(t){const n=e.get(M.DocSelectionManagerService).textSelection$.pipe(A.debounceTime(16)).subscribe(()=>{t.next(ee(e))});return()=>{n.unsubscribe()}})}}function Se(e){return{id:G.id,type:C.MenuItemType.BUTTON,icon:"CommentSingle",title:"threadCommentUI.panel.addComment",tooltip:"threadCommentUI.panel.addComment",hidden$:C.getMenuHiddenObservable(e,o.UniverInstanceType.UNIVER_DOC)}}const P=()=>{const e=o.useDependency(o.IUniverInstanceService),t=o.useDependency(o.Injector),r=O.useMemo(()=>e.getCurrentTypeOfUnit$(o.UniverInstanceType.UNIVER_DOC),[e]),n=o.useObservable(r),i=O.useMemo(()=>new A.Observable(l=>l.next(y)),[]),s=o.useDependency(M.DocSelectionManagerService),d=O.useMemo(()=>s.textSelection$.pipe(A.debounceTime(16)),[s.textSelection$]);o.useObservable(d);const a=o.useDependency(o.ICommandService),v=o.useDependency(U),h=o.useObservable(v.addingComment$),[m,_]=O.useState([]);if(O.useEffect(()=>{var E;const l=new Set,u=n==null?void 0:n.getCustomDecorations();_((E=u==null?void 0:u.map(f=>f.id).filter(f=>{const b=l.has(f);return l.add(f),!b}))!=null?E:[]);const D=a.onCommandExecuted(f=>{var b;if(f.id===M.RichTextEditingMutation.id){const $=new Set,q=n==null?void 0:n.getCustomDecorations();_((b=q==null?void 0:q.map(H=>H.id).filter(H=>{const Be=$.has(H);return $.add(H),!Be}))!=null?b:[])}});return()=>{D.dispose()}},[a,n]),!n)return null;const S=ee(t),p=n.getUnitId();return Ie.jsx(T.ThreadCommentPanel,{unitId:p,subUnitId$:i,type:o.UniverInstanceType.UNIVER_DOC,onAdd:()=>{a.executeCommand(V.id)},getSubUnitName:()=>"",disableAdd:S,tempComment:h,onAddComment:l=>{if(!l.parentId){const u={unitId:p,range:h,comment:l};return a.executeCommand(W.id,u),v.endAdd(),!1}return!0},onDeleteComment:l=>{if(!l.parentId){const u={unitId:p,commentId:l.id};return a.executeCommand(K.id,u),!1}return!0},showComments:m})};P.componentKey="univer.doc.thread-comment-panel";const N={id:"docs.operation.show-comment-panel",type:o.CommandType.OPERATION,handler(e,t){var i;const r=e.get(T.ThreadCommentPanelService),n=e.get(C.ISidebarService);return(!r.panelVisible||((i=n.options.children)==null?void 0:i.label)!==P.componentKey)&&(n.open({header:{title:"threadCommentUI.panel.title"},children:{label:P.componentKey},width:320,onClose:()=>r.setPanelVisible(!1)}),r.setPanelVisible(!0)),t&&r.setActiveComment(t==null?void 0:t.activeComment),!0}},G={id:"docs.operation.toggle-comment-panel",type:o.CommandType.OPERATION,handler(e){var n;const t=e.get(T.ThreadCommentPanelService),r=e.get(C.ISidebarService);return!t.panelVisible||((n=r.options.children)==null?void 0:n.label)!==P.componentKey?(r.open({header:{title:"threadCommentUI.panel.title"},children:{label:P.componentKey},width:320,onClose:()=>t.setPanelVisible(!1)}),t.setPanelVisible(!0)):(r.close(),t.setPanelVisible(!1),t.setActiveComment(null)),!0}},V={id:"docs.operation.start-add-comment",type:o.CommandType.OPERATION,handler(e){var f,b,$;const t=e.get(T.ThreadCommentPanelService),n=e.get(o.IUniverInstanceService).getCurrentUnitForType(o.UniverInstanceType.UNIVER_DOC),i=e.get(M.DocSelectionManagerService),s=e.get(g.IRenderManagerService),d=e.get(o.UserManagerService),a=e.get(U),v=e.get(o.ICommandService),h=e.get(C.ISidebarService),m=i.getActiveTextRange();if(!n||!m)return!1;const _=(f=s.getRenderById(n.getUnitId()))==null?void 0:f.with(j.DocSelectionRenderService);if(m.collapsed)return t.panelVisible?(t.setPanelVisible(!1),h.close()):v.executeCommand(N.id),!0;v.executeCommand(N.id);const S=n.getUnitId(),p=(($=(b=n.getBody())==null?void 0:b.dataStream)!=null?$:"").slice(m.startOffset,m.endOffset),l=o.BuildTextUtils.transform.getPlainText(p),u=y,D="",E={unitId:S,subUnitId:u,id:D,ref:l,dT:w.getDT(),personId:d.getCurrentUser().userID,text:{dataStream:`\r
|
|
10
|
+
`},startOffset:m.startOffset,endOffset:m.endOffset,collapsed:!0,threadId:D};return _==null||_.blurEditor(),a.startAdd(E),t.setActiveComment({unitId:S,subUnitId:u,commentId:D}),!0}};var ge=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var i=n>1?void 0:n?Oe(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&ge(t,r,i),i},x=(e,t)=>(r,n)=>t(r,n,e);let F=class extends o.Disposable{constructor(e,t,r,n,i,s){super(),this._threadCommentPanelService=e,this._univerInstanceService=t,this._commandService=r,this._docThreadCommentService=n,this._renderManagerService=i,this._threadCommentModel=s,this._initSelectionChange(),this._initActiveCommandChange()}_initSelectionChange(){let e;this.disposeWithMe(this._commandService.onCommandExecuted(t=>{var r,n,i,s;if(t.id===M.SetTextSelectionsOperation.id){const d=t.params,{unitId:a,ranges:v}=d,h=this._univerInstanceService.getUnit(a,o.UniverInstanceType.UNIVER_DOC),m=v[0];if((e==null?void 0:e.startOffset)===(m==null?void 0:m.startOffset)&&(e==null?void 0:e.endOffset)===(m==null?void 0:m.endOffset))return;if(e=m,m&&h){const{startOffset:_,endOffset:S,collapsed:p}=m;let l;if(p?l=(n=(r=h.getBody())==null?void 0:r.customDecorations)==null?void 0:n.find(u=>u.startIndex<=_&&u.endIndex>=S-1):l=(s=(i=h.getBody())==null?void 0:i.customDecorations)==null?void 0:s.find(u=>u.startIndex<=_&&u.endIndex>=S-1),l){const u=this._threadCommentModel.getComment(a,y,l.id);u&&!u.resolved&&this._commandService.executeCommand(N.id,{activeComment:{unitId:a,subUnitId:y,commentId:l.id}});return}}if(!this._threadCommentPanelService.activeCommentId)return;this._commandService.executeCommand(T.SetActiveCommentOperation.id)}}))}_initActiveCommandChange(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(e=>{var t,r,n,i;if(e){const s=this._univerInstanceService.getUnit(e.unitId);if(s){const d=(t=this._renderManagerService.getRenderById(e.unitId))==null?void 0:t.with(j.DocBackScrollRenderController),a=(n=(r=s.getBody())==null?void 0:r.customDecorations)==null?void 0:n.find(v=>v.id===e.commentId);a&&d&&d.scrollToRange({startOffset:a.startIndex,endOffset:a.endIndex,collapsed:!1})}}(!e||e.commentId!==((i=this._docThreadCommentService.addingComment)==null?void 0:i.id))&&this._docThreadCommentService.endAdd()}))}};F=Te([x(0,o.Inject(T.ThreadCommentPanelService)),x(1,o.IUniverInstanceService),x(2,o.ICommandService),x(3,o.Inject(U)),x(4,g.IRenderManagerService),x(5,o.Inject(w.ThreadCommentModel))],F);var I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},I.apply(this,arguments)},Me=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},te=O.forwardRef(function(e,t){var r=e.icon,n=e.id,i=e.className,s=e.extend,d=Me(e,["icon","id","className","extend"]),a="univerjs-icon univerjs-icon-".concat(n," ").concat(i||"").trim(),v=O.useRef("_".concat(be()));return ne(r,"".concat(n),{defIds:r.defIds,idSuffix:v.current},I({ref:t,className:a},d),s)});function ne(e,t,r,n,i){return O.createElement(e.tag,I(I({key:t},ye(e,r,i)),n),(De(e,r).children||[]).map(function(s,d){return ne(s,"".concat(t,"-").concat(e.tag,"-").concat(d),r,void 0,i)}))}function ye(e,t,r){var n=I({},e.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1);var i=t.defIds;return!i||i.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var d=s[0],a=s[1];typeof a=="string"&&(n[d]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function De(e,t){var r,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((r=e.children)===null||r===void 0)&&r.length)?I(I({},e),{children:e.children.map(function(i){return typeof i.attrs.id=="string"&&n&&n.indexOf(i.attrs.id)>-1?I(I({},i),{attrs:I(I({},i.attrs),{id:i.attrs.id+t.idSuffix})}):i})}):e}function be(){return Math.random().toString(36).substring(2,8)}te.displayName="UniverIcon";var Ue={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z",fillRule:"evenodd",clipRule:"evenodd"}}]},re=O.forwardRef(function(e,t){return O.createElement(te,Object.assign({},e,{id:"comment-single",ref:t,icon:Ue}))});re.displayName="CommentSingle";const Pe={[C.RibbonStartGroup.OTHERS]:{[G.id]:{order:1,menuItemFactory:Se}},[C.ContextMenuPosition.MAIN_AREA]:{[C.ContextMenuGroup.DATA]:{[V.id]:{order:1,menuItemFactory:_e}}}};var xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,Ee=(e,t,r,n)=>{for(var i=n>1?void 0:n?Re(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&xe(t,r,i),i},Z=(e,t)=>(r,n)=>t(r,n,e);let L=class extends o.Disposable{constructor(e,t,r){super(),this._commandService=e,this._menuManagerService=t,this._componentManager=r,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[W,K,N,V,G].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){this._menuManagerService.mergeMenu(Pe)}_initComponents(){[P].forEach(e=>{this.disposeWithMe(this._componentManager.register(e.componentKey,e))}),this.disposeWithMe(this._componentManager.register("CommentSingle",re))}};L=Ee([Z(0,o.ICommandService),Z(1,C.IMenuManagerService),Z(2,o.Inject(C.ComponentManager))],L);var je=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var i=n>1?void 0:n?we(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&je(t,r,i),i},R=(e,t)=>(r,n)=>t(r,n,e);let z=class extends o.Disposable{constructor(e,t,r,n,i,s,d){super(),this._context=e,this._docInterceptorService=t,this._threadCommentPanelService=r,this._docRenderController=n,this._univerInstanceService=i,this._threadCommentModel=s,this._commandService=d,this._interceptorViewModel(),this._initReRender(),this._initSyncComments()}_initReRender(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(e=>{var r;if(e){this._docRenderController.reRender(e.unitId);return}const t=(r=this._univerInstanceService.getCurrentUnitForType(o.UniverInstanceType.UNIVER_DOC))==null?void 0:r.getUnitId();t&&this._docRenderController.reRender(t)})),this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe(e=>{e.type==="resolve"&&this._docRenderController.reRender(e.unitId)}))}_interceptorViewModel(){this._docInterceptorService.intercept(M.DOC_INTERCEPTOR_POINT.CUSTOM_DECORATION,{handler:(e,t,r)=>{if(!e)return r(e);const{unitId:n,index:i,customDecorations:s}=t,d=this._threadCommentPanelService.activeCommentId,{commentId:a,unitId:v}=d||{},h=s.find(p=>p.id===a),m=this._threadCommentModel.getComment(n,y,e.id);if(!m)return r({...e,show:!1});const _=h&&i>=h.startIndex&&i<=h.endIndex,S=v===n&&e.id===a;return r({...e,active:S||_,show:!m.resolved})}})}_initSyncComments(){var i,s,d;const e=this._context.unit.getUnitId(),t=y,r=(d=(s=(i=this._context.unit.getBody())==null?void 0:i.customDecorations)==null?void 0:s.filter(a=>a.type===o.CustomDecorationType.COMMENT).map(a=>a.id))!=null?d:[];r.forEach(a=>{this._threadCommentModel.getComment(e,t,a)||this._threadCommentModel.addComment(e,t,{id:a,threadId:a,ref:"",dT:"",personId:"",text:{dataStream:""},unitId:e,subUnitId:t})}),r.length&&this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(),y,r);let n=r.sort();this.disposeWithMe(this._commandService.onCommandExecuted(a=>{var v,h,m;if(a.id===M.RichTextEditingMutation.id){if(a.params.unitId!==this._context.unit.getUnitId())return;const S=(m=(h=(v=this._context.unit.getBody())==null?void 0:v.customDecorations)==null?void 0:h.filter(l=>l.type===o.CustomDecorationType.COMMENT).map(l=>l.id))!=null?m:[],p=S.sort();if(JSON.stringify(n)!==JSON.stringify(p)){const l=new Set(n),u=new Set(p),D=new Set,E=new Set;S.forEach(f=>{l.has(f)||D.add(f)}),n.forEach(f=>{u.has(f)||E.add(f)}),n=p,D.forEach(f=>{this._threadCommentModel.getComment(e,t,f)||this._threadCommentModel.addComment(e,t,{id:f,threadId:f,ref:"",dT:"",personId:"",text:{dataStream:""},unitId:e,subUnitId:t})}),this._threadCommentModel.syncThreadComments(e,t,[...D])}}}))}};z=Ae([R(1,o.Inject(M.DocInterceptorService)),R(2,o.Inject(T.ThreadCommentPanelService)),R(3,o.Inject(j.DocRenderController)),R(4,o.IUniverInstanceService),R(5,o.Inject(w.ThreadCommentModel)),R(6,o.ICommandService)],z);var ie=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ve=(e,t,r)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$e=(e,t,r,n)=>{for(var i=n>1?void 0:n?Ne(t,r):t,s=e.length-1,d;s>=0;s--)(d=e[s])&&(i=(n?d(t,r,i):d(i))||i);return n&&i&&ie(t,r,i),i},J=(e,t)=>(r,n)=>t(r,n,e),oe=(e,t,r)=>Ve(e,typeof t!="symbol"?t+"":t,r);c.UniverDocsThreadCommentUIPlugin=class extends o.Plugin{constructor(t=ae,r,n,i){super(),this._config=t,this._injector=r,this._renderManagerSrv=n,this._configService=i;const{menu:s,...d}=this._config;s&&this._configService.setConfig("menu",s,{merge:!0}),this._configService.setConfig(de,d)}onStarting(){[[L],[F],[U]].forEach(t=>{this._injector.add(t)})}onRendered(){this._initRenderModule(),this._injector.get(F),this._injector.get(L)}_initRenderModule(){[z].forEach(t=>{this._renderManagerSrv.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,t)})}},oe(c.UniverDocsThreadCommentUIPlugin,"pluginName",se),oe(c.UniverDocsThreadCommentUIPlugin,"type",o.UniverInstanceType.UNIVER_DOC),c.UniverDocsThreadCommentUIPlugin=$e([o.DependentOn(T.UniverThreadCommentUIPlugin),J(1,o.Inject(o.Injector)),J(2,g.IRenderManagerService),J(3,o.IConfigService)],c.UniverDocsThreadCommentUIPlugin),c.AddDocCommentComment=W,c.DeleteDocCommentComment=K,c.ShowCommentPanelOperation=N,c.StartAddCommentOperation=V,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/docs-thread-comment-ui",
|
|
3
|
-
"version": "0.4.2-nightly.
|
|
3
|
+
"version": "0.4.2-nightly.202411021605",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Univer thread comment plugin",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@univerjs/icons": "^0.2.2",
|
|
49
49
|
"clsx": "^2.1.1",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/engine-
|
|
55
|
-
"@univerjs/thread-comment
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/thread-comment": "0.4.2-nightly.
|
|
50
|
+
"@univerjs/core": "0.4.2-nightly.202411021605",
|
|
51
|
+
"@univerjs/design": "0.4.2-nightly.202411021605",
|
|
52
|
+
"@univerjs/docs": "0.4.2-nightly.202411021605",
|
|
53
|
+
"@univerjs/docs-ui": "0.4.2-nightly.202411021605",
|
|
54
|
+
"@univerjs/engine-formula": "0.4.2-nightly.202411021605",
|
|
55
|
+
"@univerjs/thread-comment": "0.4.2-nightly.202411021605",
|
|
56
|
+
"@univerjs/engine-render": "0.4.2-nightly.202411021605",
|
|
57
|
+
"@univerjs/ui": "0.4.2-nightly.202411021605",
|
|
58
|
+
"@univerjs/thread-comment-ui": "0.4.2-nightly.202411021605"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"react": "18.3.1",
|