@univerjs/sheets-note 0.7.0-nightly.202505121607 → 0.7.0-nightly.202505131607

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/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(u,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@univerjs/core"),require("@univerjs/sheets"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets","rxjs"],a):(u=typeof globalThis<"u"?globalThis:u||self,a(u.UniverSheetsNote={},u.UniverCore,u.UniverSheets,u.rxjs))})(this,function(u,a,l,_){"use strict";var H=Object.defineProperty;var z=(u,a,l)=>a in u?H(u,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):u[a]=l;var p=(u,a,l)=>z(u,typeof a!="symbol"?a+"":a,l);class m extends a.Disposable{constructor(){super(...arguments);p(this,"_noteMatrix",new Map);p(this,"_change$",new _.Subject);p(this,"change$",this._change$.asObservable())}_ensureNoteMatrix(e,t){let n=this._noteMatrix.get(e);n||(n=new Map,this._noteMatrix.set(e,n));let s=n.get(t);return s||(s=new a.ObjectMatrix,n.set(t,s)),s}getSheetShowNotes$(e,t){return this._change$.pipe(_.filter(({unitId:n,sheetId:s})=>n===e&&s===t),_.map(()=>{const n=this._ensureNoteMatrix(e,t),s=[];return n.forValue((i,h,c)=>{c.show&&s.push({loc:{row:i,col:h,unitId:e,subUnitId:t},note:c})}),s}))}getCellNoteChange$(e,t,n,s){return this._change$.pipe(_.filter(({unitId:i,sheetId:h,row:c,col:d})=>i===e&&h===t&&c===n&&d===s),_.map(({note:i})=>i))}updateNote(e,t,n,s,i,h){const c=this._ensureNoteMatrix(e,t),d=c.getValue(n,s);c.setValue(n,s,i),this._change$.next({unitId:e,sheetId:t,row:n,col:s,type:"update",note:i,oldNote:d,silent:h})}removeNote(e,t,n,s,i){const h=this._ensureNoteMatrix(e,t),c=h.getValue(n,s);h.realDeleteValue(n,s),this._change$.next({unitId:e,sheetId:t,row:n,col:s,type:"update",note:null,oldNote:c,silent:i})}toggleNotePopup(e,t,n,s,i){const h=this._ensureNoteMatrix(e,t),c=h.getValue(n,s);if(c){c.show=!c.show;const d={...c,show:c.show};h.setValue(n,s,d),this._change$.next({unitId:e,sheetId:t,row:n,col:s,type:"update",note:d,oldNote:c,silent:i})}}updateNotePosition(e,t,n,s,i,h,c){const d=this._ensureNoteMatrix(e,t),g=d.getValue(n,s);g&&(d.realDeleteValue(n,s),d.setValue(i,h,g),this._change$.next({unitId:e,sheetId:t,row:n,col:s,type:"ref",newPosition:{row:i,col:h},note:g,silent:c}))}getNote(e,t,n,s){return this._ensureNoteMatrix(e,t).getValue(n,s)}getUnitNotes(e){return this._noteMatrix.get(e)}getSheetNotes(e,t){const n=this._noteMatrix.get(e);if(n)return n.get(t)}getNotes(){return this._noteMatrix}deleteUnitNotes(e){this._noteMatrix.delete(e)}}const N={id:"sheet.mutation.update-note",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:e,sheetId:t,row:n,col:s,note:i,silent:h}=o;return r.get(m).updateNote(e,t,n,s,i,h),!0}},v={id:"sheet.mutation.remove-note",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:e,sheetId:t,row:n,col:s,silent:i}=o;return r.get(m).removeNote(e,t,n,s,i),!0}},I={id:"sheet.mutation.toggle-note-popup",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:e,sheetId:t,row:n,col:s,silent:i}=o;return r.get(m).toggleNotePopup(e,t,n,s,i),!0}},S={id:"sheet.mutation.update-note-position",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:e,sheetId:t,row:n,col:s,newPosition:i,silent:h}=o;return r.get(m).updateNotePosition(e,t,n,s,i.row,i.col,h),!0}};var b=Object.getOwnPropertyDescriptor,$=(r,o,e,t)=>{for(var n=t>1?void 0:t?b(o,e):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=i(n)||n);return n},f=(r,o)=>(e,t)=>o(e,t,r);let M=class extends a.Disposable{constructor(o,e,t,n){super();p(this,"_disposableMap",new Map);p(this,"_watcherMap",new Map);p(this,"_handleRangeChange",(o,e,t,n,s,i,h)=>i?{redos:[{id:S.id,params:{unitId:o,sheetId:e,row:n,col:s,newPosition:{row:i.startRow,col:i.startColumn},silent:h}}],undos:[{id:S.id,params:{unitId:o,sheetId:e,row:i.startRow,col:i.startColumn,newPosition:{row:n,col:s},note:t,silent:h}}]}:{redos:[{id:v.id,params:{unitId:o,sheetId:e,row:n,col:s}}],undos:[{id:N.id,params:{unitId:o,sheetId:e,row:n,col:s,note:t}}]});this._refRangeService=o,this._sheetsNoteModel=e,this._selectionManagerService=t,this._commandService=n,this._initData(),this._initRefRange()}_getIdWithUnitId(o,e,t,n){return`${o}-${e}-${t}-${n}`}_register(o,e,t,n,s){const i={startColumn:s,endColumn:s,startRow:n,endRow:n};this._disposableMap.set(this._getIdWithUnitId(o,e,n,s),this._refRangeService.registerRefRange(i,h=>{const c=l.handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests(i,h,{selectionManagerService:this._selectionManagerService}),d=Array.isArray(c)?c[0]:c;return d&&d.startColumn===i.startColumn&&d.startRow===i.startRow?{undos:[],redos:[]}:this._handleRangeChange(o,e,t,n,s,d,!1)},o,e))}_watch(o,e,t,n,s){const i={startColumn:s,endColumn:s,startRow:n,endRow:n};this._watcherMap.set(this._getIdWithUnitId(o,e,n,s),this._refRangeService.watchRange(o,e,i,(h,c)=>{const{redos:d}=this._handleRangeChange(o,e,t,h.startRow,h.startColumn,c,!0);a.sequenceExecuteAsync(d,this._commandService,{onlyLocal:!0})},!0))}_unwatch(o,e,t,n){var i;const s=this._getIdWithUnitId(o,e,t,n);(i=this._watcherMap.get(s))==null||i.dispose(),this._watcherMap.delete(s)}_unregister(o,e,t,n){var i;const s=this._getIdWithUnitId(o,e,t,n);(i=this._disposableMap.get(s))==null||i.dispose(),this._disposableMap.delete(s)}_initData(){const o=this._sheetsNoteModel.getNotes();for(const[e,t]of o)for(const[n,s]of t)s.forValue((i,h,c)=>(c&&(this._register(e,n,c,i,h),this._watch(e,n,c,i,h)),!0))}_initRefRange(){this.disposeWithMe(this._sheetsNoteModel.change$.subscribe(o=>{switch(o.type){case"update":{const{unitId:e,sheetId:t,row:n,col:s,note:i}=o,h=this._getIdWithUnitId(e,t,n,s);i?this._disposableMap.has(h)||(this._register(e,t,i,n,s),this._watch(e,t,i,n,s)):(this._unregister(e,t,n,s),this._unwatch(e,t,n,s));break}case"ref":{const{unitId:e,sheetId:t,row:n,col:s,newPosition:i,note:h,silent:c}=o;this._unregister(e,t,n,s),c||(this._unwatch(e,t,n,s),this._watch(e,t,h,i.row,i.col)),this._register(e,t,h,i.row,i.col);break}}}))}};M=$([f(0,a.Inject(l.RefRangeService)),f(1,a.Inject(m)),f(2,a.Inject(l.SheetsSelectionsService)),f(3,a.ICommandService)],M);var D=Object.getOwnPropertyDescriptor,j=(r,o,e,t)=>{for(var n=t>1?void 0:t?D(o,e):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=i(n)||n);return n},w=(r,o)=>(e,t)=>o(e,t,r);u.SheetsNoteResourceController=class extends a.Disposable{constructor(o,e,t){super(),this._resourceManagerService=o,this._univerInstanceService=e,this._sheetsNoteModel=t,this._initSnapshot()}_initSnapshot(){const o=t=>{const n=this._sheetsNoteModel.getUnitNotes(t);if(!n)return"";const s={};return n.forEach((i,h)=>{const c={};i.forValue((d,g,q)=>{c[d]||(c[d]={}),c[d][g]=q}),Object.keys(c).length>0&&(s[h]=c)}),JSON.stringify(s)},e=t=>{if(!t)return{};try{return JSON.parse(t)}catch{return{}}};this.disposeWithMe(this._resourceManagerService.registerPluginResource({pluginName:T,businesses:[a.UniverInstanceType.UNIVER_SHEET],toJson:t=>o(t),parseJson:t=>e(t),onUnLoad:t=>{this._sheetsNoteModel.deleteUnitNotes(t)},onLoad:(t,n)=>{Object.entries(n).forEach(([s,i])=>{Object.entries(i).forEach(([h,c])=>{Object.entries(c).forEach(([d,g])=>{this._sheetsNoteModel.updateNote(t,s,Number(h),Number(d),g)})})})}}))}},u.SheetsNoteResourceController=j([w(0,a.IResourceManagerService),w(1,a.IUniverInstanceService),w(2,a.Inject(m))],u.SheetsNoteResourceController);const y={id:"sheet.command.delete-note",type:a.CommandType.COMMAND,handler:(r,o)=>{const e=r.get(a.IUniverInstanceService),t=l.getSheetCommandTarget(e);if(!t)return!1;const s=r.get(l.SheetsSelectionsService).getCurrentLastSelection();if(!(s!=null&&s.primary))return!1;const{actualColumn:i,actualRow:h}=s.primary;return r.get(a.ICommandService).executeCommand(v.id,{unitId:t.unitId,sheetId:t.subUnitId,row:h,col:i})}},P={id:"sheet.command.toggle-note-popup",type:a.CommandType.COMMAND,handler:(r,o)=>{const e=r.get(a.IUniverInstanceService),t=l.getSheetCommandTarget(e);if(!t)return!1;const s=r.get(l.SheetsSelectionsService).getCurrentLastSelection();if(!(s!=null&&s.primary))return!1;const{actualColumn:i,actualRow:h}=s.primary;return r.get(a.ICommandService).executeCommand(I.id,{unitId:t.unitId,sheetId:t.subUnitId,row:h,col:i})}},R={id:"sheet.command.update-note",type:a.CommandType.COMMAND,handler:(r,o)=>r.get(a.ICommandService).syncExecuteCommand(N.id,o)};var x=Object.getOwnPropertyDescriptor,E=(r,o,e,t)=>{for(var n=t>1?void 0:t?x(o,e):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=i(n)||n);return n},V=(r,o)=>(e,t)=>o(e,t,r);let C=class extends a.Disposable{constructor(r){super(),this._commandService=r,this._initialize()}_initialize(){[S,I,N,v,y,P,R].forEach(r=>{this.disposeWithMe(this._commandService.registerCommand(r))})}};C=E([V(0,a.ICommandService)],C);var A=Object.defineProperty,W=Object.getOwnPropertyDescriptor,L=(r,o,e)=>o in r?A(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,J=(r,o,e,t)=>{for(var n=t>1?void 0:t?W(o,e):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=i(n)||n);return n},U=(r,o)=>(e,t)=>o(e,t,r),O=(r,o,e)=>L(r,typeof o!="symbol"?o+"":o,e);const T="SHEET_NOTE_PLUGIN";u.UniverSheetsNotePlugin=class extends a.Plugin{constructor(o,e){super(),this._configService=o,this._injector=e}onStarting(){[[m],[C],[u.SheetsNoteResourceController],[M]].forEach(o=>{this._injector.add(o)}),a.touchDependencies(this._injector,[[m],[C],[u.SheetsNoteResourceController]])}onReady(){a.touchDependencies(this._injector,[[M]])}},O(u.UniverSheetsNotePlugin,"pluginName",T),O(u.UniverSheetsNotePlugin,"type",a.UniverInstanceType.UNIVER_SHEET),u.UniverSheetsNotePlugin=J([a.DependentOn(l.UniverSheetsPlugin),U(0,a.IConfigService),U(1,a.Inject(a.Injector))],u.UniverSheetsNotePlugin),u.RemoveNoteMutation=v,u.SheetDeleteNoteCommand=y,u.SheetToggleNotePopupCommand=P,u.SheetUpdateNoteCommand=R,u.SheetsNoteModel=m,u.ToggleNotePopupMutation=I,u.UpdateNoteMutation=N,u.UpdateNotePositionMutation=S,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
1
+ (function(u,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@univerjs/core"),require("@univerjs/sheets"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets","rxjs"],a):(u=typeof globalThis<"u"?globalThis:u||self,a(u.UniverSheetsNote={},u.UniverCore,u.UniverSheets,u.rxjs))})(this,function(u,a,l,p){"use strict";var z=Object.defineProperty;var F=(u,a,l)=>a in u?z(u,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):u[a]=l;var _=(u,a,l)=>F(u,typeof a!="symbol"?a+"":a,l);const P="SHEET_NOTE_PLUGIN",$="sheets-note.config",y={};class g extends a.Disposable{constructor(){super(...arguments);_(this,"_noteMatrix",new Map);_(this,"_change$",new p.Subject);_(this,"change$",this._change$.asObservable())}_ensureNoteMatrix(n,e){let t=this._noteMatrix.get(n);t||(t=new Map,this._noteMatrix.set(n,t));let s=t.get(e);return s||(s=new a.ObjectMatrix,t.set(e,s)),s}getSheetShowNotes$(n,e){return this._change$.pipe(p.filter(({unitId:t,sheetId:s})=>t===n&&s===e),p.map(()=>{const t=this._ensureNoteMatrix(n,e),s=[];return t.forValue((i,h,c)=>{c.show&&s.push({loc:{row:i,col:h,unitId:n,subUnitId:e},note:c})}),s}))}getCellNoteChange$(n,e,t,s){return this._change$.pipe(p.filter(({unitId:i,sheetId:h,row:c,col:d})=>i===n&&h===e&&c===t&&d===s),p.map(({note:i})=>i))}updateNote(n,e,t,s,i,h){const c=this._ensureNoteMatrix(n,e),d=c.getValue(t,s);c.setValue(t,s,i),this._change$.next({unitId:n,sheetId:e,row:t,col:s,type:"update",note:i,oldNote:d,silent:h})}removeNote(n,e,t,s,i){const h=this._ensureNoteMatrix(n,e),c=h.getValue(t,s);h.realDeleteValue(t,s),this._change$.next({unitId:n,sheetId:e,row:t,col:s,type:"update",note:null,oldNote:c,silent:i})}toggleNotePopup(n,e,t,s,i){const h=this._ensureNoteMatrix(n,e),c=h.getValue(t,s);if(c){c.show=!c.show;const d={...c,show:c.show};h.setValue(t,s,d),this._change$.next({unitId:n,sheetId:e,row:t,col:s,type:"update",note:d,oldNote:c,silent:i})}}updateNotePosition(n,e,t,s,i,h,c){const d=this._ensureNoteMatrix(n,e),m=d.getValue(t,s);m&&(d.realDeleteValue(t,s),d.setValue(i,h,m),this._change$.next({unitId:n,sheetId:e,row:t,col:s,type:"ref",newPosition:{row:i,col:h},note:m,silent:c}))}getNote(n,e,t,s){return this._ensureNoteMatrix(n,e).getValue(t,s)}getUnitNotes(n){return this._noteMatrix.get(n)}getSheetNotes(n,e){const t=this._noteMatrix.get(n);if(t)return t.get(e)}getNotes(){return this._noteMatrix}deleteUnitNotes(n){this._noteMatrix.delete(n)}}const N={id:"sheet.mutation.update-note",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:n,sheetId:e,row:t,col:s,note:i,silent:h}=o;return r.get(g).updateNote(n,e,t,s,i,h),!0}},S={id:"sheet.mutation.remove-note",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:n,sheetId:e,row:t,col:s,silent:i}=o;return r.get(g).removeNote(n,e,t,s,i),!0}},I={id:"sheet.mutation.toggle-note-popup",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:n,sheetId:e,row:t,col:s,silent:i}=o;return r.get(g).toggleNotePopup(n,e,t,s,i),!0}},v={id:"sheet.mutation.update-note-position",type:a.CommandType.MUTATION,handler:(r,o)=>{const{unitId:n,sheetId:e,row:t,col:s,newPosition:i,silent:h}=o;return r.get(g).updateNotePosition(n,e,t,s,i.row,i.col,h),!0}};var D=Object.getOwnPropertyDescriptor,j=(r,o,n,e)=>{for(var t=e>1?void 0:e?D(o,n):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(t=i(t)||t);return t},f=(r,o)=>(n,e)=>o(n,e,r);let M=class extends a.Disposable{constructor(o,n,e,t){super();_(this,"_disposableMap",new Map);_(this,"_watcherMap",new Map);_(this,"_handleRangeChange",(o,n,e,t,s,i,h)=>i?{redos:[{id:v.id,params:{unitId:o,sheetId:n,row:t,col:s,newPosition:{row:i.startRow,col:i.startColumn},silent:h}}],undos:[{id:v.id,params:{unitId:o,sheetId:n,row:i.startRow,col:i.startColumn,newPosition:{row:t,col:s},note:e,silent:h}}]}:{redos:[{id:S.id,params:{unitId:o,sheetId:n,row:t,col:s}}],undos:[{id:N.id,params:{unitId:o,sheetId:n,row:t,col:s,note:e}}]});this._refRangeService=o,this._sheetsNoteModel=n,this._selectionManagerService=e,this._commandService=t,this._initData(),this._initRefRange()}_getIdWithUnitId(o,n,e,t){return`${o}-${n}-${e}-${t}`}_register(o,n,e,t,s){const i={startColumn:s,endColumn:s,startRow:t,endRow:t};this._disposableMap.set(this._getIdWithUnitId(o,n,t,s),this._refRangeService.registerRefRange(i,h=>{const c=l.handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests(i,h,{selectionManagerService:this._selectionManagerService}),d=Array.isArray(c)?c[0]:c;return d&&d.startColumn===i.startColumn&&d.startRow===i.startRow?{undos:[],redos:[]}:this._handleRangeChange(o,n,e,t,s,d,!1)},o,n))}_watch(o,n,e,t,s){const i={startColumn:s,endColumn:s,startRow:t,endRow:t};this._watcherMap.set(this._getIdWithUnitId(o,n,t,s),this._refRangeService.watchRange(o,n,i,(h,c)=>{const{redos:d}=this._handleRangeChange(o,n,e,h.startRow,h.startColumn,c,!0);a.sequenceExecuteAsync(d,this._commandService,{onlyLocal:!0})},!0))}_unwatch(o,n,e,t){var i;const s=this._getIdWithUnitId(o,n,e,t);(i=this._watcherMap.get(s))==null||i.dispose(),this._watcherMap.delete(s)}_unregister(o,n,e,t){var i;const s=this._getIdWithUnitId(o,n,e,t);(i=this._disposableMap.get(s))==null||i.dispose(),this._disposableMap.delete(s)}_initData(){const o=this._sheetsNoteModel.getNotes();for(const[n,e]of o)for(const[t,s]of e)s.forValue((i,h,c)=>(c&&(this._register(n,t,c,i,h),this._watch(n,t,c,i,h)),!0))}_initRefRange(){this.disposeWithMe(this._sheetsNoteModel.change$.subscribe(o=>{switch(o.type){case"update":{const{unitId:n,sheetId:e,row:t,col:s,note:i}=o,h=this._getIdWithUnitId(n,e,t,s);i?this._disposableMap.has(h)||(this._register(n,e,i,t,s),this._watch(n,e,i,t,s)):(this._unregister(n,e,t,s),this._unwatch(n,e,t,s));break}case"ref":{const{unitId:n,sheetId:e,row:t,col:s,newPosition:i,note:h,silent:c}=o;this._unregister(n,e,t,s),c||(this._unwatch(n,e,t,s),this._watch(n,e,h,i.row,i.col)),this._register(n,e,h,i.row,i.col);break}}}))}};M=j([f(0,a.Inject(l.RefRangeService)),f(1,a.Inject(g)),f(2,a.Inject(l.SheetsSelectionsService)),f(3,a.ICommandService)],M);var E=Object.getOwnPropertyDescriptor,x=(r,o,n,e)=>{for(var t=e>1?void 0:e?E(o,n):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(t=i(t)||t);return t},w=(r,o)=>(n,e)=>o(n,e,r);u.SheetsNoteResourceController=class extends a.Disposable{constructor(o,n,e){super(),this._resourceManagerService=o,this._univerInstanceService=n,this._sheetsNoteModel=e,this._initSnapshot()}_initSnapshot(){const o=e=>{const t=this._sheetsNoteModel.getUnitNotes(e);if(!t)return"";const s={};return t.forEach((i,h)=>{const c={};i.forValue((d,m,H)=>{c[d]||(c[d]={}),c[d][m]=H}),Object.keys(c).length>0&&(s[h]=c)}),JSON.stringify(s)},n=e=>{if(!e)return{};try{return JSON.parse(e)}catch{return{}}};this.disposeWithMe(this._resourceManagerService.registerPluginResource({pluginName:P,businesses:[a.UniverInstanceType.UNIVER_SHEET],toJson:e=>o(e),parseJson:e=>n(e),onUnLoad:e=>{this._sheetsNoteModel.deleteUnitNotes(e)},onLoad:(e,t)=>{Object.entries(t).forEach(([s,i])=>{Object.entries(i).forEach(([h,c])=>{Object.entries(c).forEach(([d,m])=>{this._sheetsNoteModel.updateNote(e,s,Number(h),Number(d),m)})})})}}))}},u.SheetsNoteResourceController=x([w(0,a.IResourceManagerService),w(1,a.IUniverInstanceService),w(2,a.Inject(g))],u.SheetsNoteResourceController);const R={id:"sheet.command.delete-note",type:a.CommandType.COMMAND,handler:(r,o)=>{const n=r.get(a.IUniverInstanceService),e=l.getSheetCommandTarget(n);if(!e)return!1;const s=r.get(l.SheetsSelectionsService).getCurrentLastSelection();if(!(s!=null&&s.primary))return!1;const{actualColumn:i,actualRow:h}=s.primary;return r.get(a.ICommandService).executeCommand(S.id,{unitId:e.unitId,sheetId:e.subUnitId,row:h,col:i})}},U={id:"sheet.command.toggle-note-popup",type:a.CommandType.COMMAND,handler:(r,o)=>{const n=r.get(a.IUniverInstanceService),e=l.getSheetCommandTarget(n);if(!e)return!1;const s=r.get(l.SheetsSelectionsService).getCurrentLastSelection();if(!(s!=null&&s.primary))return!1;const{actualColumn:i,actualRow:h}=s.primary;return r.get(a.ICommandService).executeCommand(I.id,{unitId:e.unitId,sheetId:e.subUnitId,row:h,col:i})}},O={id:"sheet.command.update-note",type:a.CommandType.COMMAND,handler:(r,o)=>r.get(a.ICommandService).syncExecuteCommand(N.id,o)};var V=Object.getOwnPropertyDescriptor,A=(r,o,n,e)=>{for(var t=e>1?void 0:e?V(o,n):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(t=i(t)||t);return t},W=(r,o)=>(n,e)=>o(n,e,r);let C=class extends a.Disposable{constructor(r){super(),this._commandService=r,this._initialize()}_initialize(){[v,I,N,S,R,U,O].forEach(r=>{this.disposeWithMe(this._commandService.registerCommand(r))})}};C=A([W(0,a.ICommandService)],C);var L=Object.defineProperty,J=Object.getOwnPropertyDescriptor,q=(r,o,n)=>o in r?L(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,G=(r,o,n,e)=>{for(var t=e>1?void 0:e?J(o,n):o,s=r.length-1,i;s>=0;s--)(i=r[s])&&(t=i(t)||t);return t},T=(r,o)=>(n,e)=>o(n,e,r),b=(r,o,n)=>q(r,typeof o!="symbol"?o+"":o,n);u.UniverSheetsNotePlugin=class extends a.Plugin{constructor(o=y,n,e){super(),this._config=o,this._configService=n,this._injector=e;const{...t}=a.merge({},y,this._config);this._configService.setConfig($,t)}onStarting(){[[g],[C],[u.SheetsNoteResourceController],[M]].forEach(o=>{this._injector.add(o)}),a.touchDependencies(this._injector,[[g],[C],[u.SheetsNoteResourceController]])}onReady(){a.touchDependencies(this._injector,[[M]])}},b(u.UniverSheetsNotePlugin,"pluginName",P),b(u.UniverSheetsNotePlugin,"type",a.UniverInstanceType.UNIVER_SHEET),u.UniverSheetsNotePlugin=G([a.DependentOn(l.UniverSheetsPlugin),T(1,a.IConfigService),T(2,a.Inject(a.Injector))],u.UniverSheetsNotePlugin),u.RemoveNoteMutation=S,u.SheetDeleteNoteCommand=R,u.SheetToggleNotePopupCommand=U,u.SheetUpdateNoteCommand=O,u.SheetsNoteModel=g,u.ToggleNotePopupMutation=I,u.UpdateNoteMutation=N,u.UpdateNotePositionMutation=v,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-note",
3
- "version": "0.7.0-nightly.202505121607",
3
+ "version": "0.7.0-nightly.202505131607",
4
4
  "private": false,
5
5
  "description": "Univer sheets note base plugin",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -56,8 +56,8 @@
56
56
  "rxjs": ">=7.0.0"
57
57
  },
58
58
  "dependencies": {
59
- "@univerjs/sheets": "0.7.0-nightly.202505121607",
60
- "@univerjs/core": "0.7.0-nightly.202505121607"
59
+ "@univerjs/core": "0.7.0-nightly.202505131607",
60
+ "@univerjs/sheets": "0.7.0-nightly.202505131607"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "^7.8.2",