@univerjs/sheets-thread-comment 0.10.12 → 0.10.13
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/es/index.js +272 -181
- package/lib/index.js +272 -181
- package/lib/types/controllers/sheets-thread-comment-resource.controller.d.ts +11 -0
- package/lib/umd/index.js +1 -1
- package/package.json +6 -6
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var w=(c,a,e)=>a in c?v(c,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[a]=e;var _=(c,a,e)=>w(c,typeof a!="symbol"?a+"":a,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@univerjs/core"),u=require("@univerjs/engine-formula"),p=require("@univerjs/sheets"),g=require("@univerjs/thread-comment"),S=require("rxjs");var T=Object.getOwnPropertyDescriptor,y=(c,a,e,n)=>{for(var t=n>1?void 0:n?T(a,e):a,r=c.length-1,o;r>=0;r--)(o=c[r])&&(t=o(t)||t);return t},f=(c,a)=>(e,n)=>a(e,n,c);exports.SheetsThreadCommentModel=class extends d.Disposable{constructor(e,n){super();_(this,"_matrixMap",new Map);_(this,"_locationMap",new Map);_(this,"_commentUpdate$",new S.Subject);_(this,"commentUpdate$",this._commentUpdate$.asObservable());this._threadCommentModel=e,this._univerInstanceService=n,this._init(),this.disposeWithMe(()=>{this._commentUpdate$.complete()})}_init(){this._initData(),this._initUpdateTransform()}_ensureCommentMatrix(e,n){let t=this._matrixMap.get(e);t||(t=new Map,this._matrixMap.set(e,t));let r=t.get(n);return r||(r=new d.ObjectMatrix,t.set(n,r)),r}_ensureCommentLocationMap(e,n){let t=this._locationMap.get(e);t||(t=new Map,this._locationMap.set(e,t));let r=t.get(n);return r||(r=new Map,t.set(n,r)),r}_addCommentToMatrix(e,n,t,r){var s;const o=(s=e.getValue(n,t))!=null?s:new Set;o.add(r),e.setValue(n,t,o)}_deleteCommentFromMatrix(e,n,t,r){if(n>=0&&t>=0){const o=e.getValue(n,t);o&&o.has(r)&&(o.delete(r),o.size===0&&e.realDeleteValue(n,t))}}_ensure(e,n){const t=this._ensureCommentMatrix(e,n),r=this._ensureCommentLocationMap(e,n);return{matrix:t,locationMap:r}}_initData(){const e=this._threadCommentModel.getAll();for(const n of e)for(const t of n.threads){const{unitId:r,subUnitId:o,root:s}=t;this._addComment(r,o,s)}}_addComment(e,n,t){const r=u.singleReferenceToGrid(t.ref),o=t.parentId,{row:s,column:i}=r,m=t.id,{matrix:h,locationMap:l}=this._ensure(e,n);!o&&s>=0&&i>=0&&(this._addCommentToMatrix(h,s,i,m),l.set(m,{row:s,column:i})),o||this._commentUpdate$.next({unitId:e,subUnitId:n,payload:t,type:"add",isRoot:!o,...r})}_initUpdateTransform(){this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe(e=>{const{unitId:n,subUnitId:t}=e;try{if(this._univerInstanceService.getUnitType(n)!==d.UniverInstanceType.UNIVER_SHEET)return}catch{}const{matrix:r,locationMap:o}=this._ensure(n,t);switch(e.type){case"add":{this._addComment(e.unitId,e.subUnitId,e.payload);break}case"delete":{const{isRoot:s,comment:i}=e.payload;if(s){const m=u.singleReferenceToGrid(i.ref),{row:h,column:l}=m;this._deleteCommentFromMatrix(r,h,l,i.id),this._commentUpdate$.next({...e,...m})}break}case"update":{const{commentId:s}=e.payload,i=this._threadCommentModel.getComment(n,t,s);if(!i)return;const m=u.singleReferenceToGrid(i.ref);this._commentUpdate$.next({...e,...m});break}case"updateRef":{const s=u.singleReferenceToGrid(e.payload.ref),{commentId:i}=e.payload,m=o.get(i);if(!m)return;const{row:h,column:l}=m;this._deleteCommentFromMatrix(r,h,l,i),o.delete(i),s.row>=0&&s.column>=0&&(this._addCommentToMatrix(r,s.row,s.column,i),o.set(i,{row:s.row,column:s.column})),this._commentUpdate$.next({...e,...s});break}case"resolve":{const{unitId:s,subUnitId:i,payload:m}=e,{locationMap:h}=this._ensure(s,i),l=h.get(m.commentId);l&&this._commentUpdate$.next({...e,...l});break}}}))}getByLocation(e,n,t,r){var i;return(i=this.getAllByLocation(e,n,t,r).filter(m=>!m.resolved)[0])==null?void 0:i.id}getAllByLocation(e,n,t,r){const s=this._ensureCommentMatrix(e,n).getValue(t,r);return s?Array.from(s).map(i=>this.getComment(e,n,i)).filter(Boolean):[]}getComment(e,n,t){return this._threadCommentModel.getComment(e,n,t)}getCommentWithChildren(e,n,t,r){const o=this.getByLocation(e,n,t,r);if(!o)return;const s=this.getComment(e,n,o);if(s)return this._threadCommentModel.getThread(e,n,s.threadId)}showCommentMarker(e,n,t,r){const o=this.getByLocation(e,n,t,r);if(!o)return!1;const s=this.getComment(e,n,o);return!!(s&&!s.resolved)}getSubUnitAll(e,n){return this._threadCommentModel.getUnit(e).filter(t=>t.subUnitId===n).map(t=>t.root)}};exports.SheetsThreadCommentModel=y([f(0,d.Inject(g.ThreadCommentModel)),f(1,d.IUniverInstanceService)],exports.SheetsThreadCommentModel);var I=Object.getOwnPropertyDescriptor,b=(c,a,e,n)=>{for(var t=n>1?void 0:n?I(a,e):a,r=c.length-1,o;r>=0;r--)(o=c[r])&&(t=o(t)||t);return t},C=(c,a)=>(e,n)=>a(e,n,c);exports.SheetsThreadCommentRefRangeController=class extends d.Disposable{constructor(e,n,t,r,o){super();_(this,"_disposableMap",new Map);_(this,"_watcherMap",new Map);_(this,"_handleRangeChange",(e,n,t,r,o)=>{const s=t.id,i={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};return r?{redos:[{id:g.UpdateCommentRefMutation.id,params:{unitId:e,subUnitId:n,payload:{ref:u.serializeRange(r),commentId:s},silent:o}}],undos:[{id:g.UpdateCommentRefMutation.id,params:{unitId:e,subUnitId:n,payload:{ref:u.serializeRange(i),commentId:s},silent:o}}]}:{redos:[{id:g.DeleteCommentMutation.id,params:{unitId:e,subUnitId:n,commentId:s}}],undos:[{id:g.AddCommentMutation.id,params:{unitId:e,subUnitId:n,comment:t,sync:!0}}]}});this._refRangeService=e,this._sheetsThreadCommentModel=n,this._threadCommentModel=t,this._selectionManagerService=r,this._commandService=o,this._initData(),this._initRefRange()}_getIdWithUnitId(e,n,t){return`${e}-${n}-${t}`}_register(e,n,t){const r=t.id,o={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};this._disposableMap.set(this._getIdWithUnitId(e,n,r),this._refRangeService.registerRefRange(o,s=>{const i=p.handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests(o,s,{selectionManagerService:this._selectionManagerService}),m=Array.isArray(i)?i[0]:i;return m&&m.startColumn===o.startColumn&&m.startRow===o.startRow?{undos:[],redos:[]}:this._handleRangeChange(e,n,t,m,!1)},e,n))}_watch(e,n,t){const r=t.id,o={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};this._watcherMap.set(this._getIdWithUnitId(e,n,r),this._refRangeService.watchRange(e,n,o,(s,i)=>{const{redos:m}=this._handleRangeChange(e,n,t,i,!0);d.sequenceExecuteAsync(m,this._commandService,{onlyLocal:!0})},!0))}_unwatch(e,n,t){var o;const r=this._getIdWithUnitId(e,n,t);(o=this._watcherMap.get(r))==null||o.dispose(),this._watcherMap.delete(r)}_unregister(e,n,t){var o;const r=this._getIdWithUnitId(e,n,t);(o=this._disposableMap.get(r))==null||o.dispose(),this._disposableMap.delete(r)}_initData(){const e=this._threadCommentModel.getAll();for(const n of e)for(const t of n.threads){const{unitId:r,subUnitId:o,root:s}=t,i=u.singleReferenceToGrid(s.ref),m={...s,...i};this._register(r,o,m),this._watch(r,o,m)}}_initRefRange(){this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.subscribe(e=>{const{unitId:n,subUnitId:t}=e;switch(e.type){case"add":{if(e.payload.parentId)return;const r={...e.payload,row:e.row,column:e.column};this._register(e.unitId,e.subUnitId,r),this._watch(e.unitId,e.subUnitId,r);break}case"delete":{this._unregister(n,t,e.payload.commentId),this._unwatch(n,t,e.payload.commentId);break}case"updateRef":{const r=this._sheetsThreadCommentModel.getComment(n,t,e.payload.commentId);if(!r)return;this._unregister(n,t,e.payload.commentId);const o={...r,row:e.row,column:e.column};e.silent||(this._unwatch(n,t,e.payload.commentId),this._watch(n,t,o)),this._register(e.unitId,e.subUnitId,o);break}}})),this.disposeWithMe(d.toDisposable(()=>{this._disposableMap.forEach(e=>{e.dispose()}),this._disposableMap.clear()}))}};exports.SheetsThreadCommentRefRangeController=b([C(0,d.Inject(p.RefRangeService)),C(1,d.Inject(exports.SheetsThreadCommentModel)),C(2,d.Inject(g.ThreadCommentModel)),C(3,d.Inject(p.SheetsSelectionsService)),C(4,d.ICommandService)],exports.SheetsThreadCommentRefRangeController);const U={},x="SHEET_THREAD_COMMENT_BASE_PLUGIN";var P=Object.defineProperty,E=Object.getOwnPropertyDescriptor,$=(c,a,e)=>a in c?P(c,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[a]=e,D=(c,a,e,n)=>{for(var t=n>1?void 0:n?E(a,e):a,r=c.length-1,o;r>=0;r--)(o=c[r])&&(t=o(t)||t);return t},M=(c,a)=>(e,n)=>a(e,n,c),R=(c,a,e)=>$(c,typeof a!="symbol"?a+"":a,e);exports.UniverSheetsThreadCommentPlugin=class extends d.Plugin{constructor(a=U,e,n){super(),this._config=a,this._injector=e,this._commandService=n}onStarting(){[[exports.SheetsThreadCommentModel],[exports.SheetsThreadCommentRefRangeController]].forEach(a=>{this._injector.add(a)}),this._injector.get(exports.SheetsThreadCommentRefRangeController)}};R(exports.UniverSheetsThreadCommentPlugin,"pluginName",x);R(exports.UniverSheetsThreadCommentPlugin,"type",d.UniverInstanceType.UNIVER_SHEET);exports.UniverSheetsThreadCommentPlugin=D([d.DependentOn(g.UniverThreadCommentPlugin),M(1,d.Inject(d.Injector)),M(2,d.Inject(d.ICommandService))],exports.UniverSheetsThreadCommentPlugin);
|
|
1
|
+
"use strict";var T=Object.defineProperty;var w=(i,a,e)=>a in i?T(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e;var _=(i,a,e)=>w(i,typeof a!="symbol"?a+"":a,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@univerjs/core"),p=require("@univerjs/engine-formula"),C=require("@univerjs/sheets"),u=require("@univerjs/thread-comment"),y=require("rxjs");var U=Object.getOwnPropertyDescriptor,b=(i,a,e,n)=>{for(var t=n>1?void 0:n?U(a,e):a,r=i.length-1,o;r>=0;r--)(o=i[r])&&(t=o(t)||t);return t},S=(i,a)=>(e,n)=>a(e,n,i);exports.SheetsThreadCommentModel=class extends m.Disposable{constructor(e,n){super();_(this,"_matrixMap",new Map);_(this,"_locationMap",new Map);_(this,"_commentUpdate$",new y.Subject);_(this,"commentUpdate$",this._commentUpdate$.asObservable());this._threadCommentModel=e,this._univerInstanceService=n,this._init(),this.disposeWithMe(()=>{this._commentUpdate$.complete()})}_init(){this._initData(),this._initUpdateTransform()}_ensureCommentMatrix(e,n){let t=this._matrixMap.get(e);t||(t=new Map,this._matrixMap.set(e,t));let r=t.get(n);return r||(r=new m.ObjectMatrix,t.set(n,r)),r}_ensureCommentLocationMap(e,n){let t=this._locationMap.get(e);t||(t=new Map,this._locationMap.set(e,t));let r=t.get(n);return r||(r=new Map,t.set(n,r)),r}_addCommentToMatrix(e,n,t,r){var s;const o=(s=e.getValue(n,t))!=null?s:new Set;o.add(r),e.setValue(n,t,o)}_deleteCommentFromMatrix(e,n,t,r){if(n>=0&&t>=0){const o=e.getValue(n,t);o&&o.has(r)&&(o.delete(r),o.size===0&&e.realDeleteValue(n,t))}}_ensure(e,n){const t=this._ensureCommentMatrix(e,n),r=this._ensureCommentLocationMap(e,n);return{matrix:t,locationMap:r}}_initData(){const e=this._threadCommentModel.getAll();for(const n of e)for(const t of n.threads){const{unitId:r,subUnitId:o,root:s}=t;this._addComment(r,o,s)}}_addComment(e,n,t){const r=p.singleReferenceToGrid(t.ref),o=t.parentId,{row:s,column:c}=r,d=t.id,{matrix:l,locationMap:h}=this._ensure(e,n);!o&&s>=0&&c>=0&&(this._addCommentToMatrix(l,s,c,d),h.set(d,{row:s,column:c})),o||this._commentUpdate$.next({unitId:e,subUnitId:n,payload:t,type:"add",isRoot:!o,...r})}_initUpdateTransform(){this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe(e=>{const{unitId:n,subUnitId:t}=e;try{if(this._univerInstanceService.getUnitType(n)!==m.UniverInstanceType.UNIVER_SHEET)return}catch{}const{matrix:r,locationMap:o}=this._ensure(n,t);switch(e.type){case"add":{this._addComment(e.unitId,e.subUnitId,e.payload);break}case"delete":{const{isRoot:s,comment:c}=e.payload;if(s){const d=p.singleReferenceToGrid(c.ref),{row:l,column:h}=d;this._deleteCommentFromMatrix(r,l,h,c.id),this._commentUpdate$.next({...e,...d})}break}case"update":{const{commentId:s}=e.payload,c=this._threadCommentModel.getComment(n,t,s);if(!c)return;const d=p.singleReferenceToGrid(c.ref);this._commentUpdate$.next({...e,...d});break}case"updateRef":{const s=p.singleReferenceToGrid(e.payload.ref),{commentId:c}=e.payload,d=o.get(c);if(!d)return;const{row:l,column:h}=d;this._deleteCommentFromMatrix(r,l,h,c),o.delete(c),s.row>=0&&s.column>=0&&(this._addCommentToMatrix(r,s.row,s.column,c),o.set(c,{row:s.row,column:s.column})),this._commentUpdate$.next({...e,...s});break}case"resolve":{const{unitId:s,subUnitId:c,payload:d}=e,{locationMap:l}=this._ensure(s,c),h=l.get(d.commentId);h&&this._commentUpdate$.next({...e,...h});break}}}))}getByLocation(e,n,t,r){var c;return(c=this.getAllByLocation(e,n,t,r).filter(d=>!d.resolved)[0])==null?void 0:c.id}getAllByLocation(e,n,t,r){const s=this._ensureCommentMatrix(e,n).getValue(t,r);return s?Array.from(s).map(c=>this.getComment(e,n,c)).filter(Boolean):[]}getComment(e,n,t){return this._threadCommentModel.getComment(e,n,t)}getCommentWithChildren(e,n,t,r){const o=this.getByLocation(e,n,t,r);if(!o)return;const s=this.getComment(e,n,o);if(s)return this._threadCommentModel.getThread(e,n,s.threadId)}showCommentMarker(e,n,t,r){const o=this.getByLocation(e,n,t,r);if(!o)return!1;const s=this.getComment(e,n,o);return!!(s&&!s.resolved)}getSubUnitAll(e,n){return this._threadCommentModel.getUnit(e).filter(t=>t.subUnitId===n).map(t=>t.root)}};exports.SheetsThreadCommentModel=b([S(0,m.Inject(u.ThreadCommentModel)),S(1,m.IUniverInstanceService)],exports.SheetsThreadCommentModel);var D=Object.getOwnPropertyDescriptor,E=(i,a,e,n)=>{for(var t=n>1?void 0:n?D(a,e):a,r=i.length-1,o;r>=0;r--)(o=i[r])&&(t=o(t)||t);return t},g=(i,a)=>(e,n)=>a(e,n,i);exports.SheetsThreadCommentRefRangeController=class extends m.Disposable{constructor(e,n,t,r,o){super();_(this,"_disposableMap",new Map);_(this,"_watcherMap",new Map);_(this,"_handleRangeChange",(e,n,t,r,o)=>{const s=t.id,c={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};return r?{redos:[{id:u.UpdateCommentRefMutation.id,params:{unitId:e,subUnitId:n,payload:{ref:p.serializeRange(r),commentId:s},silent:o}}],undos:[{id:u.UpdateCommentRefMutation.id,params:{unitId:e,subUnitId:n,payload:{ref:p.serializeRange(c),commentId:s},silent:o}}]}:{redos:[{id:u.DeleteCommentMutation.id,params:{unitId:e,subUnitId:n,commentId:s}}],undos:[{id:u.AddCommentMutation.id,params:{unitId:e,subUnitId:n,comment:t,sync:!0}}]}});this._refRangeService=e,this._sheetsThreadCommentModel=n,this._threadCommentModel=t,this._selectionManagerService=r,this._commandService=o,this._initData(),this._initRefRange()}_getIdWithUnitId(e,n,t){return`${e}-${n}-${t}`}_register(e,n,t){const r=t.id,o={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};this._disposableMap.set(this._getIdWithUnitId(e,n,r),this._refRangeService.registerRefRange(o,s=>{const c=C.handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests(o,s,{selectionManagerService:this._selectionManagerService}),d=Array.isArray(c)?c[0]:c;return d&&d.startColumn===o.startColumn&&d.startRow===o.startRow?{undos:[],redos:[]}:this._handleRangeChange(e,n,t,d,!1)},e,n))}_watch(e,n,t){const r=t.id,o={startColumn:t.column,endColumn:t.column,startRow:t.row,endRow:t.row};this._watcherMap.set(this._getIdWithUnitId(e,n,r),this._refRangeService.watchRange(e,n,o,(s,c)=>{const{redos:d}=this._handleRangeChange(e,n,t,c,!0);m.sequenceExecuteAsync(d,this._commandService,{onlyLocal:!0})},!0))}_unwatch(e,n,t){var o;const r=this._getIdWithUnitId(e,n,t);(o=this._watcherMap.get(r))==null||o.dispose(),this._watcherMap.delete(r)}_unregister(e,n,t){var o;const r=this._getIdWithUnitId(e,n,t);(o=this._disposableMap.get(r))==null||o.dispose(),this._disposableMap.delete(r)}_initData(){const e=this._threadCommentModel.getAll();for(const n of e)for(const t of n.threads){const{unitId:r,subUnitId:o,root:s}=t,c=p.singleReferenceToGrid(s.ref),d={...s,...c};this._register(r,o,d),this._watch(r,o,d)}}_initRefRange(){this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.subscribe(e=>{const{unitId:n,subUnitId:t}=e;switch(e.type){case"add":{if(e.payload.parentId)return;const r={...e.payload,row:e.row,column:e.column};this._register(e.unitId,e.subUnitId,r),this._watch(e.unitId,e.subUnitId,r);break}case"delete":{this._unregister(n,t,e.payload.commentId),this._unwatch(n,t,e.payload.commentId);break}case"updateRef":{const r=this._sheetsThreadCommentModel.getComment(n,t,e.payload.commentId);if(!r)return;this._unregister(n,t,e.payload.commentId);const o={...r,row:e.row,column:e.column};e.silent||(this._unwatch(n,t,e.payload.commentId),this._watch(n,t,o)),this._register(e.unitId,e.subUnitId,o);break}}})),this.disposeWithMe(m.toDisposable(()=>{this._disposableMap.forEach(e=>{e.dispose()}),this._disposableMap.clear()}))}};exports.SheetsThreadCommentRefRangeController=E([g(0,m.Inject(C.RefRangeService)),g(1,m.Inject(exports.SheetsThreadCommentModel)),g(2,m.Inject(u.ThreadCommentModel)),g(3,m.Inject(C.SheetsSelectionsService)),g(4,m.ICommandService)],exports.SheetsThreadCommentRefRangeController);const x={};var P=Object.getOwnPropertyDescriptor,$=(i,a,e,n)=>{for(var t=n>1?void 0:n?P(a,e):a,r=i.length-1,o;r>=0;r--)(o=i[r])&&(t=o(t)||t);return t},f=(i,a)=>(e,n)=>a(e,n,i);let M=class extends m.Disposable{constructor(i,a,e,n){super(),this._univerInstanceService=i,this._sheetInterceptorService=a,this._threadCommentModel=e,this._threadCommentDataSourceService=n,this._initSheetChange()}_initSheetChange(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:i=>{var a;if(i.id===C.RemoveSheetCommand.id){const e=i.params,n=e.unitId||this._univerInstanceService.getCurrentUnitOfType(m.UniverInstanceType.UNIVER_SHEET).getUnitId(),t=e.subUnitId||((a=this._univerInstanceService.getCurrentUnitOfType(m.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:a.getSheetId());if(!n||!t)return{redos:[],undos:[]};const r=this._threadCommentModel.ensureMap(n,t),o=Array.from(r.values()).filter(l=>!l.parentId),s=this._threadCommentDataSourceService.syncUpdateMutationToColla,c=[],d=[];return o.forEach(({children:l,...h})=>{c.push({id:u.DeleteCommentMutation.id,params:{unitId:n,subUnitId:t,commentId:h.id}}),d.push({id:u.AddCommentMutation.id,params:{unitId:n,subUnitId:t,comment:{...h,children:s?l:void 0},sync:!s}})}),{redos:c,undos:d}}else if(i.id===C.CopySheetCommand.id){const e=i.params,{unitId:n,subUnitId:t,targetSubUnitId:r}=e;if(!n||!t||!r)return{redos:[],undos:[]};const o=this._threadCommentModel.ensureMap(n,t),s=Array.from(o.values()).map(h=>({...h,subUnitId:r,id:m.generateRandomId(),threadId:m.generateRandomId()})).filter(h=>!h.parentId),c=this._threadCommentDataSourceService.syncUpdateMutationToColla,d=[],l=[];return s.forEach(({children:h,...v})=>{d.push({id:u.AddCommentMutation.id,params:{unitId:n,subUnitId:r,comment:{...v,children:c?h:void 0},sync:!c}}),l.push({id:u.DeleteCommentMutation.id,params:{unitId:n,subUnitId:r,commentId:v.id}})}),{redos:d,undos:l}}return{redos:[],undos:[]}}}))}};M=$([f(0,m.IUniverInstanceService),f(1,m.Inject(C.SheetInterceptorService)),f(2,m.Inject(u.ThreadCommentModel)),f(3,u.IThreadCommentDataSourceService)],M);const O="SHEET_THREAD_COMMENT_BASE_PLUGIN";var j=Object.defineProperty,A=Object.getOwnPropertyDescriptor,W=(i,a,e)=>a in i?j(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e,L=(i,a,e,n)=>{for(var t=n>1?void 0:n?A(a,e):a,r=i.length-1,o;r>=0;r--)(o=i[r])&&(t=o(t)||t);return t},I=(i,a)=>(e,n)=>a(e,n,i),R=(i,a,e)=>W(i,typeof a!="symbol"?a+"":a,e);exports.UniverSheetsThreadCommentPlugin=class extends m.Plugin{constructor(a=x,e,n){super(),this._config=a,this._injector=e,this._commandService=n}onStarting(){[[exports.SheetsThreadCommentModel],[exports.SheetsThreadCommentRefRangeController],[M]].forEach(a=>{this._injector.add(a)}),m.touchDependencies(this._injector,[[exports.SheetsThreadCommentRefRangeController],[M]])}};R(exports.UniverSheetsThreadCommentPlugin,"pluginName",O);R(exports.UniverSheetsThreadCommentPlugin,"type",m.UniverInstanceType.UNIVER_SHEET);exports.UniverSheetsThreadCommentPlugin=L([m.DependentOn(u.UniverThreadCommentPlugin),I(1,m.Inject(m.Injector)),I(2,m.Inject(m.ICommandService))],exports.UniverSheetsThreadCommentPlugin);
|