@univerjs/preset-sheets-note 0.15.2 → 0.15.4

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.
@@ -0,0 +1 @@
1
+ "use strict";const e=require("@univerjs/core"),s=require("@univerjs/sheets-note-ui/locale/sk-SK"),r=e.mergeLocales(s);module.exports=r;
@@ -0,0 +1,8 @@
1
+ import { mergeLocales as e } from "@univerjs/core";
2
+ import o from "@univerjs/sheets-note-ui/locale/sk-SK";
3
+ const t = e(
4
+ o
5
+ );
6
+ export {
7
+ t as default
8
+ };
@@ -0,0 +1,8 @@
1
+ import { mergeLocales as e } from "@univerjs/core";
2
+ import o from "@univerjs/sheets-note-ui/locale/sk-SK";
3
+ const t = e(
4
+ o
5
+ );
6
+ export {
7
+ t as default
8
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ [x: string]: any;
3
+ };
4
+ export default _default;
package/lib/umd/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
  // @univerjs/sheets-note/facade
6
- (function(l,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("@univerjs/core/facade"),require("@univerjs/sheets-note"),require("@univerjs/sheets/facade"),require("@univerjs/core")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core/facade","@univerjs/sheets-note","@univerjs/sheets/facade","@univerjs/core"],m):(l=typeof globalThis<"u"?globalThis:l||self,m(l.UniverSheetsNoteFacade={},l.UniverCoreFacade,l.UniverSheetsNote,l.UniverSheetsFacade,l.UniverCore))})(this,(function(l,m,h,f,g){"use strict";class w{get SheetNoteAdd(){return"SheetNoteAdd"}get SheetNoteDelete(){return"SheetNoteDelete"}get SheetNoteUpdate(){return"SheetNoteUpdate"}get SheetNoteShow(){return"SheetNoteShow"}get SheetNoteHide(){return"SheetNoteHide"}get BeforeSheetNoteAdd(){return"BeforeSheetNoteAdd"}get BeforeSheetNoteDelete(){return"BeforeSheetNoteDelete"}get BeforeSheetNoteUpdate(){return"BeforeSheetNoteUpdate"}get BeforeSheetNoteShow(){return"BeforeSheetNoteShow"}get BeforeSheetNoteHide(){return"BeforeSheetNoteHide"}}m.FEventName.extend(w);class E extends f.FRange{createOrUpdateNote(c){return this._commandService.syncExecuteCommand(h.UpdateNoteMutation.id,{unitId:this.getUnitId(),sheetId:this.getSheetId(),row:this.getRow(),col:this.getColumn(),note:c}),this}deleteNote(){return this._commandService.syncExecuteCommand(h.RemoveNoteMutation.id,{unitId:this.getUnitId(),sheetId:this.getSheetId(),row:this.getRow(),col:this.getColumn()}),this}getNote(){return this._injector.get(h.SheetsNoteModel).getNote(this.getUnitId(),this.getSheetId(),this.getRow(),this.getColumn())}}f.FRange.extend(E);class I extends m.FUniver{_initialize(c){this.registerEventHandler(this.Event.SheetNoteAdd,()=>c.get(h.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&!e.oldNote&&e.note){const{unitId:d,sheetId:t,row:o,col:i,note:r,oldNote:s}=e,n=this.getSheetTarget(d,t);if(!n)return;const{workbook:S,worksheet:a}=n;this.fireEvent(this.Event.SheetNoteAdd,{workbook:S,worksheet:a,row:o,col:i,note:r})}})),this.registerEventHandler(this.Event.SheetNoteDelete,()=>c.get(h.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&!e.note){const{unitId:d,sheetId:t,row:o,col:i,note:r,oldNote:s}=e,n=this.getSheetTarget(d,t);if(!n)return;const{workbook:S,worksheet:a}=n;this.fireEvent(this.Event.SheetNoteDelete,{workbook:S,worksheet:a,row:o,col:i,oldNote:s})}})),this.registerEventHandler(this.Event.SheetNoteUpdate,()=>c.get(h.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note){const{unitId:d,sheetId:t,row:o,col:i,note:r,oldNote:s}=e,n=this.getSheetTarget(d,t);if(!n)return;const{workbook:S,worksheet:a}=n;this.fireEvent(this.Event.SheetNoteUpdate,{workbook:S,worksheet:a,row:o,col:i,note:r,oldNote:s})}})),this.registerEventHandler(this.Event.SheetNoteShow,()=>c.get(h.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note&&!e.oldNote.show&&e.note.show){const{unitId:d,sheetId:t,row:o,col:i}=e,r=this.getSheetTarget(d,t);if(!r)return;const{workbook:s,worksheet:n}=r;this.fireEvent(this.Event.SheetNoteShow,{workbook:s,worksheet:n,row:o,col:i})}})),this.registerEventHandler(this.Event.SheetNoteHide,()=>c.get(h.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note&&e.oldNote.show&&!e.note.show){const{unitId:d,sheetId:t,row:o,col:i}=e,r=this.getSheetTarget(d,t);if(!r)return;const{workbook:s,worksheet:n}=r;this.fireEvent(this.Event.SheetNoteHide,{workbook:s,worksheet:n,row:o,col:i})}})),this.registerEventHandler(this.Event.BeforeSheetNoteAdd,()=>c.get(g.ICommandService).beforeCommandExecuted(e=>{if(e.id===h.SheetUpdateNoteCommand.id){const d=c.get(h.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:r,note:s}=e.params;if(d.getNote(t,o,i,r))return;const S=this.getSheetTarget(t,o);if(!S)return;const{workbook:a,worksheet:v}=S;if(this.fireEvent(this.Event.BeforeSheetNoteAdd,{workbook:a,worksheet:v,row:i,col:r,note:s}))throw new g.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetNoteDelete,()=>c.get(g.ICommandService).beforeCommandExecuted(e=>{if(e.id===h.SheetDeleteNoteCommand.id){const d=c.get(h.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:r}=e.params,s=d.getNote(t,o,i,r);if(!s)return;const n=this.getSheetTarget(t,o);if(!n)return;const{workbook:S,worksheet:a}=n;if(this.fireEvent(this.Event.BeforeSheetNoteDelete,{workbook:S,worksheet:a,row:i,col:r,oldNote:s}))throw new g.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetNoteUpdate,()=>c.get(g.ICommandService).beforeCommandExecuted(e=>{if(e.id===h.SheetUpdateNoteCommand.id){const d=c.get(h.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:r,note:s}=e.params,n=d.getNote(t,o,i,r);if(!n)return;const S=this.getSheetTarget(t,o);if(!S)return;const{workbook:a,worksheet:v}=S;if(this.fireEvent(this.Event.BeforeSheetNoteUpdate,{workbook:a,worksheet:v,row:i,col:r,note:s,oldNote:n}))throw new g.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetNoteShow,()=>c.get(g.ICommandService).beforeCommandExecuted(e=>{if(e.id===h.SheetToggleNotePopupCommand.id){const d=c.get(h.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:r}=e.params,s=d.getNote(t,o,i,r);if(s!=null&&s.show)return;const n=this.getSheetTarget(t,o);if(!n)return;const{workbook:S,worksheet:a}=n;if(this.fireEvent(this.Event.BeforeSheetNoteShow,{workbook:S,worksheet:a,row:i,col:r}))throw new g.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetNoteHide,()=>c.get(g.ICommandService).beforeCommandExecuted(e=>{if(e.id===h.SheetToggleNotePopupCommand.id){const d=c.get(h.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:r}=e.params,s=d.getNote(t,o,i,r);if(!(s!=null&&s.show))return;const n=this.getSheetTarget(t,o);if(!n)return;const{workbook:S,worksheet:a}=n;if(this.fireEvent(this.Event.BeforeSheetNoteHide,{workbook:S,worksheet:a,row:i,col:r}))throw new g.CanceledError}}))}}m.FUniver.extend(I);class k extends f.FWorksheet{getNotes(){const u=this._injector.get(h.SheetsNoteModel).getSheetNotes(this.getWorkbook().getUnitId(),this.getSheetId()),e=[];return u==null||u.forValue((d,t,o)=>{e.push({...o,row:d,col:t})}),e}}f.FWorksheet.extend(k),l.FSheetNoteEvent=w,l.FSheetsNoteRangeMixin=E,l.FSheetsNoteWorksheet=k,l.FUniverSheetNoteMixin=I,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
6
+ (function(u,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("@univerjs/core/facade"),require("@univerjs/sheets-note"),require("@univerjs/sheets/facade"),require("@univerjs/core")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core/facade","@univerjs/sheets-note","@univerjs/sheets/facade","@univerjs/core"],f):(u=typeof globalThis<"u"?globalThis:u||self,f(u.UniverSheetsNoteFacade={},u.UniverCoreFacade,u.UniverSheetsNote,u.UniverSheetsFacade,u.UniverCore))})(this,(function(u,f,l,v,N){"use strict";class E{get SheetNoteAdd(){return"SheetNoteAdd"}get SheetNoteDelete(){return"SheetNoteDelete"}get SheetNoteUpdate(){return"SheetNoteUpdate"}get SheetNoteShow(){return"SheetNoteShow"}get SheetNoteHide(){return"SheetNoteHide"}get BeforeSheetNoteAdd(){return"BeforeSheetNoteAdd"}get BeforeSheetNoteDelete(){return"BeforeSheetNoteDelete"}get BeforeSheetNoteUpdate(){return"BeforeSheetNoteUpdate"}get BeforeSheetNoteShow(){return"BeforeSheetNoteShow"}get BeforeSheetNoteHide(){return"BeforeSheetNoteHide"}}f.FEventName.extend(E);class m extends v.FRange{createOrUpdateNote(S){return this._commandService.syncExecuteCommand(l.UpdateNoteMutation.id,{unitId:this.getUnitId(),sheetId:this.getSheetId(),row:this.getRow(),col:this.getColumn(),note:S}),this}deleteNote(){return this._commandService.syncExecuteCommand(l.RemoveNoteMutation.id,{unitId:this.getUnitId(),sheetId:this.getSheetId(),row:this.getRow(),col:this.getColumn()}),this}getNote(){return this._injector.get(l.SheetsNoteModel).getNote(this.getUnitId(),this.getSheetId(),this.getRow(),this.getColumn())}}v.FRange.extend(m);class p extends f.FUniver{_initialize(S){const a=S.get(N.ICommandService);this.disposeWithMe(this.registerEventHandler(this.Event.SheetNoteAdd,()=>S.get(l.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&!e.oldNote&&e.note){const{unitId:t,sheetId:o,row:i,col:n,note:r}=e,s=this.getSheetTarget(t,o);if(!s)return;const{workbook:d,worksheet:c}=s;this.fireEvent(this.Event.SheetNoteAdd,{workbook:d,worksheet:c,row:i,col:n,note:r})}}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetNoteDelete,()=>S.get(l.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&!e.note){const{unitId:t,sheetId:o,row:i,col:n,oldNote:r}=e,s=this.getSheetTarget(t,o);if(!s)return;const{workbook:d,worksheet:c}=s;this.fireEvent(this.Event.SheetNoteDelete,{workbook:d,worksheet:c,row:i,col:n,oldNote:r})}}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetNoteUpdate,()=>S.get(l.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note){const{unitId:t,sheetId:o,row:i,col:n,note:r,oldNote:s}=e,d=this.getSheetTarget(t,o);if(!d)return;const{workbook:c,worksheet:g}=d;this.fireEvent(this.Event.SheetNoteUpdate,{workbook:c,worksheet:g,row:i,col:n,note:r,oldNote:s})}}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetNoteShow,()=>S.get(l.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note&&!e.oldNote.show&&e.note.show){const{unitId:t,sheetId:o,row:i,col:n}=e,r=this.getSheetTarget(t,o);if(!r)return;const{workbook:s,worksheet:d}=r;this.fireEvent(this.Event.SheetNoteShow,{workbook:s,worksheet:d,row:i,col:n})}}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetNoteHide,()=>S.get(l.SheetsNoteModel).change$.subscribe(e=>{if(e.type==="update"&&e.oldNote&&e.note&&e.oldNote.show&&!e.note.show){const{unitId:t,sheetId:o,row:i,col:n}=e,r=this.getSheetTarget(t,o);if(!r)return;const{workbook:s,worksheet:d}=r;this.fireEvent(this.Event.SheetNoteHide,{workbook:s,worksheet:d,row:i,col:n})}}))),this.disposeWithMe(this.registerEventHandler(this.Event.BeforeSheetNoteAdd,()=>a.beforeCommandExecuted(h=>{if(h.id===l.SheetUpdateNoteCommand.id){const e=S.get(l.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:n,note:r}=h.params;if(e.getNote(t,o,i,n))return;const d=this.getSheetTarget(t,o);if(!d)return;const{workbook:c,worksheet:g}=d;if(this.fireEvent(this.Event.BeforeSheetNoteAdd,{workbook:c,worksheet:g,row:i,col:n,note:r}))throw new N.CanceledError}}))),this.disposeWithMe(this.registerEventHandler(this.Event.BeforeSheetNoteDelete,()=>a.beforeCommandExecuted(h=>{if(h.id===l.SheetDeleteNoteCommand.id){const e=S.get(l.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:n}=h.params,r=e.getNote(t,o,i,n);if(!r)return;const s=this.getSheetTarget(t,o);if(!s)return;const{workbook:d,worksheet:c}=s;if(this.fireEvent(this.Event.BeforeSheetNoteDelete,{workbook:d,worksheet:c,row:i,col:n,oldNote:r}))throw new N.CanceledError}}))),this.disposeWithMe(this.registerEventHandler(this.Event.BeforeSheetNoteUpdate,()=>a.beforeCommandExecuted(h=>{if(h.id===l.SheetUpdateNoteCommand.id){const e=S.get(l.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:n,note:r}=h.params,s=e.getNote(t,o,i,n);if(!s)return;const d=this.getSheetTarget(t,o);if(!d)return;const{workbook:c,worksheet:g}=d;if(this.fireEvent(this.Event.BeforeSheetNoteUpdate,{workbook:c,worksheet:g,row:i,col:n,note:r,oldNote:s}))throw new N.CanceledError}}))),this.disposeWithMe(this.registerEventHandler(this.Event.BeforeSheetNoteShow,()=>a.beforeCommandExecuted(h=>{if(h.id===l.SheetToggleNotePopupCommand.id){const e=S.get(l.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:n}=h.params,r=e.getNote(t,o,i,n);if(r!=null&&r.show)return;const s=this.getSheetTarget(t,o);if(!s)return;const{workbook:d,worksheet:c}=s;if(this.fireEvent(this.Event.BeforeSheetNoteShow,{workbook:d,worksheet:c,row:i,col:n}))throw new N.CanceledError}}))),this.disposeWithMe(this.registerEventHandler(this.Event.BeforeSheetNoteHide,()=>a.beforeCommandExecuted(h=>{if(h.id===l.SheetToggleNotePopupCommand.id){const e=S.get(l.SheetsNoteModel),{unitId:t,sheetId:o,row:i,col:n}=h.params,r=e.getNote(t,o,i,n);if(!(r!=null&&r.show))return;const s=this.getSheetTarget(t,o);if(!s)return;const{workbook:d,worksheet:c}=s;if(this.fireEvent(this.Event.BeforeSheetNoteHide,{workbook:d,worksheet:c,row:i,col:n}))throw new N.CanceledError}})))}}f.FUniver.extend(p);class k extends v.FWorksheet{getNotes(){const a=this._injector.get(l.SheetsNoteModel).getSheetNotes(this.getWorkbook().getUnitId(),this.getSheetId()),h=[];return a==null||a.forValue((e,t,o)=>{h.push({...o,row:e,col:t})}),h}}v.FWorksheet.extend(k),u.FSheetNoteEvent=E,u.FSheetsNoteRangeMixin=m,u.FSheetsNoteWorksheet=k,u.FUniverSheetNoteMixin=p,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
7
7
 
8
8
 
9
9
  // @univerjs/sheets-note-ui/index
@@ -0,0 +1,6 @@
1
+ // @univerjs/sheets-note-ui/locale/sk-SK
2
+ (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNoteUiSkSK=o())})(this,(function(){"use strict";return{rightClick:{addNote:"Pridať poznámku",deleteNote:"Odstrániť poznámku",toggleNote:"Zobraziť/Skryť poznámku"},note:{placeholder:"Píšte sem"}}}));
3
+
4
+
5
+ // locale/sk-SK
6
+ (function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("@univerjs/core"),require("@univerjs/sheets-note-ui/locale/sk-SK")):typeof define=="function"&&define.amd?define(["@univerjs/core","@univerjs/sheets-note-ui/locale/sk-SK"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverPresetSheetsNoteSkSK=s(e.UniverCore,e.UniverSheetsNoteUiSkSK))})(this,(function(e,s){"use strict";return e.mergeLocales(s)}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-sheets-note",
3
- "version": "0.15.2",
3
+ "version": "0.15.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -58,16 +58,16 @@
58
58
  "rxjs": ">=7.0.0"
59
59
  },
60
60
  "dependencies": {
61
- "@univerjs/sheets-note": "0.15.2",
62
- "@univerjs/sheets-note-ui": "0.15.2"
61
+ "@univerjs/sheets-note": "0.15.4",
62
+ "@univerjs/sheets-note-ui": "0.15.4"
63
63
  },
64
64
  "devDependencies": {
65
- "@univerjs/core": "0.15.2",
65
+ "@univerjs/core": "0.15.4",
66
66
  "react": "18.3.1",
67
67
  "react-dom": "18.3.1",
68
68
  "rxjs": "7.8.2",
69
69
  "typescript": "^5.9.3",
70
- "@univerjs-infra/shared": "0.15.2"
70
+ "@univerjs-infra/shared": "0.15.4"
71
71
  },
72
72
  "scripts": {
73
73
  "prebuild:preset": "tsx prepare.ts",