@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;
|
package/lib/umd/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
// @univerjs/sheets-note/facade
|
|
6
|
-
(function(
|
|
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.
|
|
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.
|
|
62
|
-
"@univerjs/sheets-note-ui": "0.15.
|
|
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.
|
|
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.
|
|
70
|
+
"@univerjs-infra/shared": "0.15.4"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"prebuild:preset": "tsx prepare.ts",
|