@univerjs-pro/shape-thread-comment 1.3.1 → 1.4.0
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/README.md +4 -4
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/element-comment.d.ts +16 -0
- package/lib/types/facade/index.d.ts +1 -5
- package/lib/types/index.d.ts +2 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -14
- package/lib/types/facade/element-comment.d.ts +0 -15
- package/lib/types/facade/f-doc-chart.d.ts +0 -52
- package/lib/types/facade/f-doc-image.d.ts +0 -52
- package/lib/types/facade/f-sheet-chart.d.ts +0 -52
- package/lib/types/facade/f-sheet-image.d.ts +0 -52
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://npmjs.com/package/@univerjs-pro/shape-thread-comment)
|
|
5
5
|
[](https://npmjs.com/package/@univerjs-pro/shape-thread-comment)
|
|
6
6
|
|
|
7
|
-
`@univerjs-pro/shape-thread-comment` provides
|
|
7
|
+
`@univerjs-pro/shape-thread-comment` provides generic Shape comment Facade methods and host-independent helpers for floating-element comments.
|
|
8
8
|
|
|
9
9
|
## Package Overview
|
|
10
10
|
|
|
@@ -26,13 +26,13 @@ Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
|
26
26
|
|
|
27
27
|
Register `UniverShapeThreadCommentPlugin` with the Univer thread comment plugin.
|
|
28
28
|
|
|
29
|
-
Import the Facade entry to add `createCommentAsync`, `getComments`, and `listCommentsAsync` to
|
|
29
|
+
Import the Facade entry to add `createCommentAsync`, `getComments`, and `listCommentsAsync` to `FShape`.
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
32
|
import '@univerjs-pro/shape-thread-comment/facade';
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
await
|
|
34
|
+
const shape = univerAPI.getActivePresentation()?.getSlideByIndex(0)?.getShapes()[0];
|
|
35
|
+
await shape?.createCommentAsync('Align this shape.', { id: 'review-shape-1' });
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Integration Notes
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x58e819=_0xaa4f;(function(_0x9b2133,_0x298830){const _0x3e65e4=_0xaa4f,_0x5e449d=_0x9b2133();while(!![]){try{const _0x247c74=parseInt(_0x3e65e4(0x187))/0x1+parseInt(_0x3e65e4(0x194))/0x2+-parseInt(_0x3e65e4(0x18d))/0x3+parseInt(_0x3e65e4(0x18f))/0x4+parseInt(_0x3e65e4(0x180))/0x5+parseInt(_0x3e65e4(0x181))/0x6*(parseInt(_0x3e65e4(0x17b))/0x7)+-parseInt(_0x3e65e4(0x192))/0x8;if(_0x247c74===_0x298830)break;else _0x5e449d['push'](_0x5e449d['shift']());}catch(_0xfb4ba1){_0x5e449d['push'](_0x5e449d['shift']());}}}(_0x2af2,0xd3b09),Object[_0x58e819(0x1a2)](exports,Symbol[_0x58e819(0x191)],{'value':_0x58e819(0x18a)}));var e=Object[_0x58e819(0x188)],t=Object['defineProperty'],n=Object['getOwnPropertyDescriptor'],r=Object[_0x58e819(0x19a)],i=Object[_0x58e819(0x193)],a=Object[_0x58e819(0x1a7)][_0x58e819(0x1a0)],o=(_0x12af14,_0x182b2b,_0xed9288,_0x43a685)=>{const _0x22a00e=_0x58e819;if(_0x182b2b&&typeof _0x182b2b=='object'||typeof _0x182b2b=='function'){for(var _0x2f4843=r(_0x182b2b),_0x382024=0x0,_0x25d686=_0x2f4843[_0x22a00e(0x18c)],_0x13d521;_0x382024<_0x25d686;_0x382024++)_0x13d521=_0x2f4843[_0x382024],!a[_0x22a00e(0x186)](_0x12af14,_0x13d521)&&_0x13d521!==_0xed9288&&t(_0x12af14,_0x13d521,{'get':(_0x3b404d=>_0x182b2b[_0x3b404d])[_0x22a00e(0x17d)](null,_0x13d521),'enumerable':!(_0x43a685=n(_0x182b2b,_0x13d521))||_0x43a685[_0x22a00e(0x185)]});}return _0x12af14;},s=(_0x8d2729,_0x348b8e,_0x59c87f)=>(_0x59c87f=_0x8d2729==null?{}:e(i(_0x8d2729)),o(_0x348b8e||!_0x8d2729||!_0x8d2729[_0x58e819(0x17f)]||!a[_0x58e819(0x186)](_0x8d2729,'default')?t(_0x59c87f,_0x58e819(0x197),{'value':_0x8d2729,'enumerable':!0x0}):_0x59c87f,_0x8d2729));function _0x2af2(){const _0x2edbb6=['ThreadCommentFacadeService','default','_shapeRef','elementId','getOwnPropertyNames','listCommentsAsync','DOC_DRAWING','FShapeThreadCommentMixin','set','hostType','hasOwnProperty','UNIVER_SHEET','defineProperty','Unsupported\x20Shape\x20host\x20type:\x20','kind','filter','createCommentAsync','prototype','UNIVER_SLIDE','UNIVER_BOARD','unitId','_injector','ThreadCommentAnchorKind','subUnitId','_getThreadCommentService','anchor','5128466pNkOLJ','FShape','bind','get','__esModule','5117170MKOPGS','12cbNTCu','extend','getComments','SHEET_DRAWING','enumerable','call','1702522FgrtHg','create','UNIVER_DOC','Module','SLIDE_ELEMENT','length','2197788MKlMIp','UniverInstanceType','529708ktkobu','shapeId','toStringTag','33589472twOGyL','getPrototypeOf','2949404GdMpYo','BOARD_ELEMENT'];_0x2af2=function(){return _0x2edbb6;};return _0x2af2();}let c=require('@univerjs-pro/engine-shape/facade'),l=require('@univerjs/core'),u=require('@univerjs/thread-comment');function _0xaa4f(_0x2c71ed,_0xee1987){_0x2c71ed=_0x2c71ed-0x17a;const _0x2af2f5=_0x2af2();let _0xaa4f5e=_0x2af2f5[_0x2c71ed];return _0xaa4f5e;}u=s(u);const d=new WeakMap();function f(_0xeef212){const _0x3a816c=_0x58e819;switch(_0xeef212){case l[_0x3a816c(0x18e)][_0x3a816c(0x1a1)]:return u['ThreadCommentAnchorKind'][_0x3a816c(0x184)];case l[_0x3a816c(0x18e)][_0x3a816c(0x189)]:return u[_0x3a816c(0x1ac)][_0x3a816c(0x19c)];case l[_0x3a816c(0x18e)][_0x3a816c(0x1a8)]:return u['ThreadCommentAnchorKind'][_0x3a816c(0x18b)];case l[_0x3a816c(0x18e)][_0x3a816c(0x1a9)]:return u['ThreadCommentAnchorKind'][_0x3a816c(0x195)];default:throw Error(_0x3a816c(0x1a3)+_0xeef212);}}var p=class extends c['FShape']{['_getThreadCommentService'](){const _0x80721c=_0x58e819;let _0x2e9a27=d[_0x80721c(0x17e)](this);if(_0x2e9a27)return _0x2e9a27;let _0xb0c1b5=this[_0x80721c(0x1ab)][_0x80721c(0x17e)](u[_0x80721c(0x196)]);return d[_0x80721c(0x19e)](this,_0xb0c1b5),_0xb0c1b5;}['createCommentAsync'](_0x3ba55f,_0x5548c9={}){const _0x22a054=_0x58e819;return this[_0x22a054(0x1ae)]()[_0x22a054(0x1a6)]({..._0x5548c9,'unitId':this[_0x22a054(0x198)][_0x22a054(0x1aa)],'subUnitId':this[_0x22a054(0x198)][_0x22a054(0x1ad)],'anchor':{'kind':f(this['_shapeRef'][_0x22a054(0x19f)]),'elementId':this['_shapeRef'][_0x22a054(0x190)],'pageId':this['_shapeRef'][_0x22a054(0x1ad)]},'content':_0x3ba55f});}['getComments'](){const _0x1abe56=_0x58e819;let _0x38c325=f(this['_shapeRef'][_0x1abe56(0x19f)]);return this[_0x1abe56(0x1ae)]()[_0x1abe56(0x183)]({'unitIds':[this[_0x1abe56(0x198)][_0x1abe56(0x1aa)]],'subUnitIds':[this[_0x1abe56(0x198)][_0x1abe56(0x1ad)]],'anchorKinds':[_0x38c325]})['filter'](_0x3c8729=>{const _0x5d0d55=_0x1abe56;var _0x4b9cf6;return((_0x4b9cf6=_0x3c8729[_0x5d0d55(0x17a)])==null?void 0x0:_0x4b9cf6['kind'])===_0x38c325&&_0x5d0d55(0x199)in _0x3c8729[_0x5d0d55(0x17a)]&&_0x3c8729['anchor'][_0x5d0d55(0x199)]===this['_shapeRef'][_0x5d0d55(0x190)];});}async['listCommentsAsync'](){const _0x579483=_0x58e819;let _0x3bc71e=f(this[_0x579483(0x198)][_0x579483(0x19f)]);return(await this[_0x579483(0x1ae)]()[_0x579483(0x19b)]({'unitIds':[this[_0x579483(0x198)][_0x579483(0x1aa)]],'subUnitIds':[this['_shapeRef'][_0x579483(0x1ad)]],'anchorKinds':[_0x3bc71e]}))[_0x579483(0x1a5)](_0x314340=>{const _0x3da8e6=_0x579483;var _0xeea084;return((_0xeea084=_0x314340['anchor'])==null?void 0x0:_0xeea084[_0x3da8e6(0x1a4)])===_0x3bc71e&&'elementId'in _0x314340[_0x3da8e6(0x17a)]&&_0x314340[_0x3da8e6(0x17a)][_0x3da8e6(0x199)]===this[_0x3da8e6(0x198)][_0x3da8e6(0x190)];});}};c[_0x58e819(0x17c)][_0x58e819(0x182)](p),exports[_0x58e819(0x19d)]=p;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1b8fb6=_0x5714;(function(_0x571d2a,_0x1535a4){var _0x5e12b1=_0x5714,_0x74c686=_0x571d2a();while(!![]){try{var _0x2995da=parseInt(_0x5e12b1(0x107))/0x1+-parseInt(_0x5e12b1(0x106))/0x2+parseInt(_0x5e12b1(0x119))/0x3*(-parseInt(_0x5e12b1(0x12e))/0x4)+parseInt(_0x5e12b1(0x11d))/0x5*(parseInt(_0x5e12b1(0x120))/0x6)+parseInt(_0x5e12b1(0x105))/0x7*(parseInt(_0x5e12b1(0x11c))/0x8)+-parseInt(_0x5e12b1(0x134))/0x9*(-parseInt(_0x5e12b1(0x12f))/0xa)+parseInt(_0x5e12b1(0x117))/0xb*(-parseInt(_0x5e12b1(0x115))/0xc);if(_0x2995da===_0x1535a4)break;else _0x74c686['push'](_0x74c686['shift']());}catch(_0x4e8cf9){_0x74c686['push'](_0x74c686['shift']());}}}(_0x58ea,0x8c9fc),Object[_0x1b8fb6(0x12d)](exports,Symbol[_0x1b8fb6(0x110)],{'value':_0x1b8fb6(0x128)}));let e=require('@univerjs/thread-comment'),t=require('@univerjs-pro/license'),n=require('@univerjs/core');const r=_0x1b8fb6(0x112),i={};function a(_0x47e5c1){var _0x12ff1d=_0x1b8fb6;return _0x47e5c1[_0x12ff1d(0x130)](e[_0x12ff1d(0x10c)]);}function _0x5714(_0x48bad9,_0x3f16d9){_0x48bad9=_0x48bad9-0xf9;var _0x58ea4a=_0x58ea();var _0x57140f=_0x58ea4a[_0x48bad9];return _0x57140f;}function o(_0x5d074b,_0x456572,_0x3377dc,_0x2a62fe){var _0x5b133e=_0x1b8fb6;return _0x5d074b[_0x5b133e(0x109)]({..._0x2a62fe,'unitId':_0x456572[_0x5b133e(0x10e)],'subUnitId':_0x456572['subUnitId'],'anchor':{'kind':_0x456572[_0x5b133e(0x10f)],'pageId':_0x456572[_0x5b133e(0x131)],'elementId':_0x456572[_0x5b133e(0xfb)]},'content':_0x3377dc});}function s(_0xab9af2,_0x438879){var _0x5e927a=_0x1b8fb6;return _0xab9af2[_0x5e927a(0xf9)]({'unitIds':[_0x438879[_0x5e927a(0x10e)]],'subUnitIds':[_0x438879[_0x5e927a(0x131)]],'anchorKinds':[_0x438879[_0x5e927a(0x10f)]]})['filter'](_0x4ad8f7=>{var _0x404615=_0x5e927a,_0x385ac;return((_0x385ac=_0x4ad8f7[_0x404615(0x124)])==null?void 0x0:_0x385ac[_0x404615(0x10f)])===_0x438879[_0x404615(0x10f)]&&_0x404615(0xfb)in _0x4ad8f7['anchor']&&_0x4ad8f7[_0x404615(0x124)]['elementId']===_0x438879[_0x404615(0xfb)];});}async function c(_0x2c1cac,_0x57554c){var _0x47ef53=_0x1b8fb6;return(await _0x2c1cac[_0x47ef53(0x116)]({'unitIds':[_0x57554c[_0x47ef53(0x10e)]],'subUnitIds':[_0x57554c[_0x47ef53(0x131)]],'anchorKinds':[_0x57554c[_0x47ef53(0x10f)]]}))[_0x47ef53(0xfd)](_0x1d8552=>{var _0x49c150=_0x47ef53,_0x2590c9;return((_0x2590c9=_0x1d8552[_0x49c150(0x124)])==null?void 0x0:_0x2590c9[_0x49c150(0x10f)])===_0x57554c[_0x49c150(0x10f)]&&_0x49c150(0xfb)in _0x1d8552['anchor']&&_0x1d8552[_0x49c150(0x124)][_0x49c150(0xfb)]===_0x57554c['elementId'];});}var l='@univerjs-pro/shape-thread-comment',u=_0x1b8fb6(0xfc);function d(_0x4a1746,_0x5e1c7a){return function(_0x236313,_0x2f9e9b){_0x5e1c7a(_0x236313,_0x2f9e9b,_0x4a1746);};}function f(_0x1b6488,_0x576b72,_0x403061,_0x3c0da9){var _0x407cc0=_0x1b8fb6,_0x3eb44f=arguments[_0x407cc0(0x12c)],_0xdab5ff=_0x3eb44f<0x3?_0x576b72:_0x3c0da9===null?_0x3c0da9=Object[_0x407cc0(0xff)](_0x576b72,_0x403061):_0x3c0da9,_0x4b1433;if(typeof Reflect==_0x407cc0(0x101)&&typeof Reflect['decorate']==_0x407cc0(0x132))_0xdab5ff=Reflect['decorate'](_0x1b6488,_0x576b72,_0x403061,_0x3c0da9);else{for(var _0x235f10=_0x1b6488[_0x407cc0(0x12c)]-0x1;_0x235f10>=0x0;_0x235f10--)(_0x4b1433=_0x1b6488[_0x235f10])&&(_0xdab5ff=(_0x3eb44f<0x3?_0x4b1433(_0xdab5ff):_0x3eb44f>0x3?_0x4b1433(_0x576b72,_0x403061,_0xdab5ff):_0x4b1433(_0x576b72,_0x403061))||_0xdab5ff);}return _0x3eb44f>0x3&&_0xdab5ff&&Object[_0x407cc0(0x12d)](_0x576b72,_0x403061,_0xdab5ff),_0xdab5ff;}function p(_0x1838e8){'@babel/helpers - typeof';var _0x50089d=_0x1b8fb6;return p=typeof Symbol==_0x50089d(0x132)&&typeof Symbol[_0x50089d(0x125)]==_0x50089d(0x102)?function(_0x111702){return typeof _0x111702;}:function(_0x4cfb86){var _0xe81b1a=_0x50089d;return _0x4cfb86&&typeof Symbol=='function'&&_0x4cfb86[_0xe81b1a(0x10d)]===Symbol&&_0x4cfb86!==Symbol[_0xe81b1a(0x12a)]?_0xe81b1a(0x102):typeof _0x4cfb86;},p(_0x1838e8);}function _0x58ea(){var _0x50e0da=['_config','getOwnPropertyDescriptor','DependentOn','object','symbol','SHAPE_THREAD_COMMENT_PLUGIN_CONFIG_KEY','getFloatingElementComments','3668JfWNKI','42118qrEnAS','472375zKYGOj','IConfigService','createCommentAsync','toPrimitive','pluginName','ThreadCommentFacadeService','constructor','unitId','kind','toStringTag','merge','shape-thread-comment.config','createFloatingElementCommentAsync','Plugin','2685576BEcgMi','listCommentsAsync','55uLqNZZ','UniverShapeThreadCommentPlugin','181647WIrOBG','_injector','_configService','2192bnwtrX','20DvFyBd','Inject','packageName','1512684hdHDgU','call','UNIVER_SHAPE_THREAD_COMMENT_PLUGIN','Injector','anchor','iterator','getThreadCommentService','default','Module','setConfig','prototype','type','length','defineProperty','20otJGfl','570rcVBXa','get','subUnitId','function','UNIVER_UNKNOWN','62271TNWuIB','getComments','string','elementId','1.4.0','filter'];_0x58ea=function(){return _0x50e0da;};return _0x58ea();}function m(_0x28dcda,_0x769c0a){var _0x337ff6=_0x1b8fb6;if(p(_0x28dcda)!=_0x337ff6(0x101)||!_0x28dcda)return _0x28dcda;var _0x525a26=_0x28dcda[Symbol[_0x337ff6(0x10a)]];if(_0x525a26!==void 0x0){var _0x53dc52=_0x525a26[_0x337ff6(0x121)](_0x28dcda,_0x769c0a||_0x337ff6(0x127));if(p(_0x53dc52)!=_0x337ff6(0x101))return _0x53dc52;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x769c0a===_0x337ff6(0xfa)?String:Number)(_0x28dcda);}function h(_0x2c605e){var _0x5b1f61=_0x1b8fb6,_0x3c00d0=m(_0x2c605e,_0x5b1f61(0xfa));return p(_0x3c00d0)==_0x5b1f61(0x102)?_0x3c00d0:_0x3c00d0+'';}function g(_0x4f8e0f,_0xf16bf1,_0x50449e){var _0xd25881=_0x1b8fb6;return(_0xf16bf1=h(_0xf16bf1))in _0x4f8e0f?Object[_0xd25881(0x12d)](_0x4f8e0f,_0xf16bf1,{'value':_0x50449e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f8e0f[_0xf16bf1]=_0x50449e,_0x4f8e0f;}let _=class extends n[_0x1b8fb6(0x114)]{constructor(_0x336718=i,_0x3c670a,_0x4c3fb9){var _0x2e690e=_0x1b8fb6;super(),this[_0x2e690e(0xfe)]=_0x336718,this[_0x2e690e(0x11a)]=_0x3c670a,this[_0x2e690e(0x11b)]=_0x4c3fb9;let {..._0x166b05}=(0x0,n[_0x2e690e(0x111)])({},i,this[_0x2e690e(0xfe)]);this['_configService'][_0x2e690e(0x129)](r,_0x166b05);}};g(_,_0x1b8fb6(0x10b),_0x1b8fb6(0x122)),g(_,_0x1b8fb6(0x11f),l),g(_,'version',u),g(_,_0x1b8fb6(0x12b),n['UniverInstanceType'][_0x1b8fb6(0x133)]),_=f([(0x0,n[_0x1b8fb6(0x100)])(t['UniverLicensePlugin'],e['UniverThreadCommentPlugin']),d(0x1,(0x0,n[_0x1b8fb6(0x11e)])(n[_0x1b8fb6(0x123)])),d(0x2,n[_0x1b8fb6(0x108)])],_),exports[_0x1b8fb6(0x103)]=r,Object[_0x1b8fb6(0x12d)](exports,_0x1b8fb6(0x118),{'enumerable':!0x0,'get':function(){return _;}}),exports[_0x1b8fb6(0x113)]=o,exports[_0x1b8fb6(0x104)]=s,exports[_0x1b8fb6(0x126)]=a,exports['listFloatingElementCommentsAsync']=c;
|
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x5a84(){const _0x119157=['filter','408084Vxfbod','BOARD_ELEMENT','1393553AajnDM','DOC_DRAWING','SLIDE_ELEMENT','3941yiMElX','get','_shapeRef','SHEET_DRAWING','12645IgoeZh','ThreadCommentAnchorKind','537HGIgpG','UNIVER_DOC','9230gQjcdI','subUnitId','_getThreadCommentService','36198rFXCxA','6711396AtnUEv','listCommentsAsync','4696Dgtpfx','set','UNIVER_SLIDE','anchor','ThreadCommentFacadeService','UNIVER_SHEET','unitId','kind','getComments','2035MZxEZi','extend','createCommentAsync','elementId','4324ZJaLBE','shapeId','270esrCFp','hostType','Unsupported\x20Shape\x20host\x20type:\x20'];_0x5a84=function(){return _0x119157;};return _0x5a84();}const _0x5d8a94=_0x48de;(function(_0x4e7a8c,_0xd0be0a){const _0x15680a=_0x48de,_0x2e439c=_0x4e7a8c();while(!![]){try{const _0x30b62f=-parseInt(_0x15680a(0x17d))/0x1+parseInt(_0x15680a(0x175))/0x2*(-parseInt(_0x15680a(0x186))/0x3)+-parseInt(_0x15680a(0x18c))/0x4+parseInt(_0x15680a(0x177))/0x5*(-parseInt(_0x15680a(0x18b))/0x6)+parseInt(_0x15680a(0x180))/0x7*(-parseInt(_0x15680a(0x18e))/0x8)+parseInt(_0x15680a(0x184))/0x9*(-parseInt(_0x15680a(0x188))/0xa)+-parseInt(_0x15680a(0x171))/0xb*(-parseInt(_0x15680a(0x17b))/0xc);if(_0x30b62f===_0xd0be0a)break;else _0x2e439c['push'](_0x2e439c['shift']());}catch(_0x4686cb){_0x2e439c['push'](_0x2e439c['shift']());}}}(_0x5a84,0xd6cc9));import{FShape as _0x18b6a2}from'@univerjs-pro/engine-shape/facade';import{UniverInstanceType as _0x30d54f}from'@univerjs/core';import*as _0x28a89a from'@univerjs/thread-comment';const r=new WeakMap();function i(_0x1c6b38){const _0x1408d7=_0x48de;switch(_0x1c6b38){case _0x30d54f[_0x1408d7(0x16d)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x183)];case _0x30d54f[_0x1408d7(0x187)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17e)];case _0x30d54f[_0x1408d7(0x190)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17f)];case _0x30d54f['UNIVER_BOARD']:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17c)];default:throw Error(_0x1408d7(0x179)+_0x1c6b38);}}var a=class extends _0x18b6a2{[_0x5d8a94(0x18a)](){const _0x22345b=_0x5d8a94;let _0x268f3c=r[_0x22345b(0x181)](this);if(_0x268f3c)return _0x268f3c;let _0x583831=this['_injector']['get'](_0x28a89a[_0x22345b(0x16c)]);return r[_0x22345b(0x18f)](this,_0x583831),_0x583831;}['createCommentAsync'](_0x39dbed,_0x3c6d1e={}){const _0x5e4308=_0x5d8a94;return this['_getThreadCommentService']()[_0x5e4308(0x173)]({..._0x3c6d1e,'unitId':this[_0x5e4308(0x182)][_0x5e4308(0x16e)],'subUnitId':this[_0x5e4308(0x182)][_0x5e4308(0x189)],'anchor':{'kind':i(this[_0x5e4308(0x182)][_0x5e4308(0x178)]),'elementId':this['_shapeRef'][_0x5e4308(0x176)],'pageId':this[_0x5e4308(0x182)][_0x5e4308(0x189)]},'content':_0x39dbed});}[_0x5d8a94(0x170)](){const _0x28777f=_0x5d8a94;let _0x5c88b3=i(this['_shapeRef']['hostType']);return this[_0x28777f(0x18a)]()[_0x28777f(0x170)]({'unitIds':[this[_0x28777f(0x182)][_0x28777f(0x16e)]],'subUnitIds':[this[_0x28777f(0x182)][_0x28777f(0x189)]],'anchorKinds':[_0x5c88b3]})[_0x28777f(0x17a)](_0x5334e2=>{const _0x6bc57f=_0x28777f;var _0x1dbffd;return((_0x1dbffd=_0x5334e2[_0x6bc57f(0x16b)])==null?void 0x0:_0x1dbffd[_0x6bc57f(0x16f)])===_0x5c88b3&&'elementId'in _0x5334e2[_0x6bc57f(0x16b)]&&_0x5334e2[_0x6bc57f(0x16b)][_0x6bc57f(0x174)]===this[_0x6bc57f(0x182)][_0x6bc57f(0x176)];});}async[_0x5d8a94(0x18d)](){const _0x46e0a1=_0x5d8a94;let _0x55fa08=i(this[_0x46e0a1(0x182)][_0x46e0a1(0x178)]);return(await this['_getThreadCommentService']()['listCommentsAsync']({'unitIds':[this[_0x46e0a1(0x182)][_0x46e0a1(0x16e)]],'subUnitIds':[this['_shapeRef'][_0x46e0a1(0x189)]],'anchorKinds':[_0x55fa08]}))['filter'](_0x20f03c=>{const _0x4668b7=_0x46e0a1;var _0x2f00f4;return((_0x2f00f4=_0x20f03c[_0x4668b7(0x16b)])==null?void 0x0:_0x2f00f4['kind'])===_0x55fa08&&_0x4668b7(0x174)in _0x20f03c['anchor']&&_0x20f03c[_0x4668b7(0x16b)]['elementId']===this[_0x4668b7(0x182)]['shapeId'];});}};_0x18b6a2[_0x5d8a94(0x172)](a);function _0x48de(_0x32af18,_0x1d4c20){_0x32af18=_0x32af18-0x16b;const _0x5a84a7=_0x5a84();let _0x48de9e=_0x5a84a7[_0x32af18];return _0x48de9e;}export{a as FShapeThreadCommentMixin};
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x53f011=_0x16e1;function _0x16e1(_0x23677e,_0x134df2){_0x23677e=_0x23677e-0x118;var _0x439923=_0x4399();var _0x16e1b7=_0x439923[_0x23677e];return _0x16e1b7;}(function(_0x1831ac,_0x25555d){var _0x5e1089=_0x16e1,_0x57992b=_0x1831ac();while(!![]){try{var _0x313037=-parseInt(_0x5e1089(0x123))/0x1+parseInt(_0x5e1089(0x12e))/0x2+-parseInt(_0x5e1089(0x11b))/0x3+-parseInt(_0x5e1089(0x124))/0x4*(parseInt(_0x5e1089(0x120))/0x5)+parseInt(_0x5e1089(0x133))/0x6*(-parseInt(_0x5e1089(0x134))/0x7)+parseInt(_0x5e1089(0x138))/0x8*(-parseInt(_0x5e1089(0x126))/0x9)+parseInt(_0x5e1089(0x141))/0xa;if(_0x313037===_0x25555d)break;else _0x57992b['push'](_0x57992b['shift']());}catch(_0x52bfba){_0x57992b['push'](_0x57992b['shift']());}}}(_0x4399,0x1c9e9));import{ThreadCommentFacadeService as _0x4ac0bf,UniverThreadCommentPlugin as _0x19efdb}from'@univerjs/thread-comment';import{UniverLicensePlugin as _0x5eaff6}from'@univerjs-pro/license';import{DependentOn as _0x3b9cec,IConfigService as _0x1246a8,Inject as _0x5a3b3b,Injector as _0x1dfd63,Plugin as _0x23aaa0,UniverInstanceType as _0x367f06,merge as _0x560e47}from'@univerjs/core';const u=_0x53f011(0x136),d={};function f(_0x132b33){var _0x1ef1e8=_0x53f011;return _0x132b33[_0x1ef1e8(0x140)](_0x4ac0bf);}function p(_0x3e25c2,_0xb1d49e,_0x539229,_0x4e832d){var _0x245e4a=_0x53f011;return _0x3e25c2[_0x245e4a(0x11c)]({..._0x4e832d,'unitId':_0xb1d49e['unitId'],'subUnitId':_0xb1d49e[_0x245e4a(0x121)],'anchor':{'kind':_0xb1d49e[_0x245e4a(0x130)],'pageId':_0xb1d49e[_0x245e4a(0x121)],'elementId':_0xb1d49e[_0x245e4a(0x11e)]},'content':_0x539229});}function m(_0xba8457,_0x4d23ea){var _0xe641a=_0x53f011;return _0xba8457[_0xe641a(0x13f)]({'unitIds':[_0x4d23ea[_0xe641a(0x122)]],'subUnitIds':[_0x4d23ea[_0xe641a(0x121)]],'anchorKinds':[_0x4d23ea[_0xe641a(0x130)]]})[_0xe641a(0x12d)](_0x6f3261=>{var _0x56bf99=_0xe641a,_0x388309;return((_0x388309=_0x6f3261[_0x56bf99(0x13b)])==null?void 0x0:_0x388309[_0x56bf99(0x130)])===_0x4d23ea[_0x56bf99(0x130)]&&_0x56bf99(0x11e)in _0x6f3261['anchor']&&_0x6f3261[_0x56bf99(0x13b)][_0x56bf99(0x11e)]===_0x4d23ea[_0x56bf99(0x11e)];});}function _0x4399(){var _0x3c23b7=['default','decorate','anchor','_config','UNIVER_SHAPE_THREAD_COMMENT_PLUGIN','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getComments','get','7307840zjlFrE','string','pluginName','_configService','toPrimitive','listCommentsAsync','type','115743NEUpxP','createCommentAsync','symbol','elementId','call','98265jDSNTX','subUnitId','unitId','113370RPdyrV','44GzUjfQ','defineProperty','954927lJYjjQ','@univerjs-pro/shape-thread-comment','UNIVER_UNKNOWN','packageName','function','length','_injector','filter','70646sYIIxy','object','kind','setConfig','prototype','12XuoeAT','239897ajaIgz','constructor','shape-thread-comment.config','iterator','16DJaDBY'];_0x4399=function(){return _0x3c23b7;};return _0x4399();}async function h(_0x4cfaef,_0x558ca6){var _0x167c0a=_0x53f011;return(await _0x4cfaef[_0x167c0a(0x119)]({'unitIds':[_0x558ca6[_0x167c0a(0x122)]],'subUnitIds':[_0x558ca6[_0x167c0a(0x121)]],'anchorKinds':[_0x558ca6['kind']]}))['filter'](_0x2f881d=>{var _0x1806e6=_0x167c0a,_0x4b89a2;return((_0x4b89a2=_0x2f881d[_0x1806e6(0x13b)])==null?void 0x0:_0x4b89a2['kind'])===_0x558ca6[_0x1806e6(0x130)]&&'elementId'in _0x2f881d['anchor']&&_0x2f881d[_0x1806e6(0x13b)][_0x1806e6(0x11e)]===_0x558ca6['elementId'];});}var g=_0x53f011(0x127),_='1.4.0';function v(_0x1e12dc,_0x5e37eb){return function(_0x10fa4b,_0x18cc99){_0x5e37eb(_0x10fa4b,_0x18cc99,_0x1e12dc);};}function y(_0x1b0975,_0x1650f2,_0x50f8dd,_0x198991){var _0x2248fa=_0x53f011,_0x5708b7=arguments[_0x2248fa(0x12b)],_0x2c8fbf=_0x5708b7<0x3?_0x1650f2:_0x198991===null?_0x198991=Object['getOwnPropertyDescriptor'](_0x1650f2,_0x50f8dd):_0x198991,_0x45b0bf;if(typeof Reflect==_0x2248fa(0x12f)&&typeof Reflect[_0x2248fa(0x13a)]=='function')_0x2c8fbf=Reflect[_0x2248fa(0x13a)](_0x1b0975,_0x1650f2,_0x50f8dd,_0x198991);else{for(var _0x1444cc=_0x1b0975[_0x2248fa(0x12b)]-0x1;_0x1444cc>=0x0;_0x1444cc--)(_0x45b0bf=_0x1b0975[_0x1444cc])&&(_0x2c8fbf=(_0x5708b7<0x3?_0x45b0bf(_0x2c8fbf):_0x5708b7>0x3?_0x45b0bf(_0x1650f2,_0x50f8dd,_0x2c8fbf):_0x45b0bf(_0x1650f2,_0x50f8dd))||_0x2c8fbf);}return _0x5708b7>0x3&&_0x2c8fbf&&Object['defineProperty'](_0x1650f2,_0x50f8dd,_0x2c8fbf),_0x2c8fbf;}function b(_0x3dd6b1){'@babel/helpers - typeof';var _0x53f8ab=_0x53f011;return b=typeof Symbol==_0x53f8ab(0x12a)&&typeof Symbol[_0x53f8ab(0x137)]=='symbol'?function(_0x1f6227){return typeof _0x1f6227;}:function(_0x289286){var _0x402500=_0x53f8ab;return _0x289286&&typeof Symbol==_0x402500(0x12a)&&_0x289286[_0x402500(0x135)]===Symbol&&_0x289286!==Symbol[_0x402500(0x132)]?_0x402500(0x11d):typeof _0x289286;},b(_0x3dd6b1);}function x(_0x33870c,_0x3fe15f){var _0x182cc6=_0x53f011;if(b(_0x33870c)!='object'||!_0x33870c)return _0x33870c;var _0x487775=_0x33870c[Symbol[_0x182cc6(0x118)]];if(_0x487775!==void 0x0){var _0x537bd8=_0x487775[_0x182cc6(0x11f)](_0x33870c,_0x3fe15f||_0x182cc6(0x139));if(b(_0x537bd8)!=_0x182cc6(0x12f))return _0x537bd8;throw TypeError(_0x182cc6(0x13e));}return(_0x3fe15f===_0x182cc6(0x142)?String:Number)(_0x33870c);}function S(_0x204bd5){var _0x282d8e=_0x53f011,_0x5d513d=x(_0x204bd5,_0x282d8e(0x142));return b(_0x5d513d)==_0x282d8e(0x11d)?_0x5d513d:_0x5d513d+'';}function C(_0x40715f,_0x2c5e66,_0x35afda){var _0xc4b90e=_0x53f011;return(_0x2c5e66=S(_0x2c5e66))in _0x40715f?Object[_0xc4b90e(0x125)](_0x40715f,_0x2c5e66,{'value':_0x35afda,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40715f[_0x2c5e66]=_0x35afda,_0x40715f;}let w=class extends _0x23aaa0{constructor(_0x2c8b25=d,_0x456c4c,_0x557faa){var _0x5e03ca=_0x53f011;super(),this[_0x5e03ca(0x13c)]=_0x2c8b25,this[_0x5e03ca(0x12c)]=_0x456c4c,this[_0x5e03ca(0x144)]=_0x557faa;let {..._0xbe832f}=_0x560e47({},d,this['_config']);this[_0x5e03ca(0x144)][_0x5e03ca(0x131)](u,_0xbe832f);}};C(w,_0x53f011(0x143),_0x53f011(0x13d)),C(w,_0x53f011(0x129),g),C(w,'version',_),C(w,_0x53f011(0x11a),_0x367f06[_0x53f011(0x128)]),w=y([_0x3b9cec(_0x5eaff6,_0x19efdb),v(0x1,_0x5a3b3b(_0x1dfd63)),v(0x2,_0x1246a8)],w);export{u as SHAPE_THREAD_COMMENT_PLUGIN_CONFIG_KEY,w as UniverShapeThreadCommentPlugin,p as createFloatingElementCommentAsync,m as getFloatingElementComments,f as getThreadCommentService,h as listFloatingElementCommentsAsync};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x5a84(){const _0x119157=['filter','408084Vxfbod','BOARD_ELEMENT','1393553AajnDM','DOC_DRAWING','SLIDE_ELEMENT','3941yiMElX','get','_shapeRef','SHEET_DRAWING','12645IgoeZh','ThreadCommentAnchorKind','537HGIgpG','UNIVER_DOC','9230gQjcdI','subUnitId','_getThreadCommentService','36198rFXCxA','6711396AtnUEv','listCommentsAsync','4696Dgtpfx','set','UNIVER_SLIDE','anchor','ThreadCommentFacadeService','UNIVER_SHEET','unitId','kind','getComments','2035MZxEZi','extend','createCommentAsync','elementId','4324ZJaLBE','shapeId','270esrCFp','hostType','Unsupported\x20Shape\x20host\x20type:\x20'];_0x5a84=function(){return _0x119157;};return _0x5a84();}const _0x5d8a94=_0x48de;(function(_0x4e7a8c,_0xd0be0a){const _0x15680a=_0x48de,_0x2e439c=_0x4e7a8c();while(!![]){try{const _0x30b62f=-parseInt(_0x15680a(0x17d))/0x1+parseInt(_0x15680a(0x175))/0x2*(-parseInt(_0x15680a(0x186))/0x3)+-parseInt(_0x15680a(0x18c))/0x4+parseInt(_0x15680a(0x177))/0x5*(-parseInt(_0x15680a(0x18b))/0x6)+parseInt(_0x15680a(0x180))/0x7*(-parseInt(_0x15680a(0x18e))/0x8)+parseInt(_0x15680a(0x184))/0x9*(-parseInt(_0x15680a(0x188))/0xa)+-parseInt(_0x15680a(0x171))/0xb*(-parseInt(_0x15680a(0x17b))/0xc);if(_0x30b62f===_0xd0be0a)break;else _0x2e439c['push'](_0x2e439c['shift']());}catch(_0x4686cb){_0x2e439c['push'](_0x2e439c['shift']());}}}(_0x5a84,0xd6cc9));import{FShape as _0x18b6a2}from'@univerjs-pro/engine-shape/facade';import{UniverInstanceType as _0x30d54f}from'@univerjs/core';import*as _0x28a89a from'@univerjs/thread-comment';const r=new WeakMap();function i(_0x1c6b38){const _0x1408d7=_0x48de;switch(_0x1c6b38){case _0x30d54f[_0x1408d7(0x16d)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x183)];case _0x30d54f[_0x1408d7(0x187)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17e)];case _0x30d54f[_0x1408d7(0x190)]:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17f)];case _0x30d54f['UNIVER_BOARD']:return _0x28a89a[_0x1408d7(0x185)][_0x1408d7(0x17c)];default:throw Error(_0x1408d7(0x179)+_0x1c6b38);}}var a=class extends _0x18b6a2{[_0x5d8a94(0x18a)](){const _0x22345b=_0x5d8a94;let _0x268f3c=r[_0x22345b(0x181)](this);if(_0x268f3c)return _0x268f3c;let _0x583831=this['_injector']['get'](_0x28a89a[_0x22345b(0x16c)]);return r[_0x22345b(0x18f)](this,_0x583831),_0x583831;}['createCommentAsync'](_0x39dbed,_0x3c6d1e={}){const _0x5e4308=_0x5d8a94;return this['_getThreadCommentService']()[_0x5e4308(0x173)]({..._0x3c6d1e,'unitId':this[_0x5e4308(0x182)][_0x5e4308(0x16e)],'subUnitId':this[_0x5e4308(0x182)][_0x5e4308(0x189)],'anchor':{'kind':i(this[_0x5e4308(0x182)][_0x5e4308(0x178)]),'elementId':this['_shapeRef'][_0x5e4308(0x176)],'pageId':this[_0x5e4308(0x182)][_0x5e4308(0x189)]},'content':_0x39dbed});}[_0x5d8a94(0x170)](){const _0x28777f=_0x5d8a94;let _0x5c88b3=i(this['_shapeRef']['hostType']);return this[_0x28777f(0x18a)]()[_0x28777f(0x170)]({'unitIds':[this[_0x28777f(0x182)][_0x28777f(0x16e)]],'subUnitIds':[this[_0x28777f(0x182)][_0x28777f(0x189)]],'anchorKinds':[_0x5c88b3]})[_0x28777f(0x17a)](_0x5334e2=>{const _0x6bc57f=_0x28777f;var _0x1dbffd;return((_0x1dbffd=_0x5334e2[_0x6bc57f(0x16b)])==null?void 0x0:_0x1dbffd[_0x6bc57f(0x16f)])===_0x5c88b3&&'elementId'in _0x5334e2[_0x6bc57f(0x16b)]&&_0x5334e2[_0x6bc57f(0x16b)][_0x6bc57f(0x174)]===this[_0x6bc57f(0x182)][_0x6bc57f(0x176)];});}async[_0x5d8a94(0x18d)](){const _0x46e0a1=_0x5d8a94;let _0x55fa08=i(this[_0x46e0a1(0x182)][_0x46e0a1(0x178)]);return(await this['_getThreadCommentService']()['listCommentsAsync']({'unitIds':[this[_0x46e0a1(0x182)][_0x46e0a1(0x16e)]],'subUnitIds':[this['_shapeRef'][_0x46e0a1(0x189)]],'anchorKinds':[_0x55fa08]}))['filter'](_0x20f03c=>{const _0x4668b7=_0x46e0a1;var _0x2f00f4;return((_0x2f00f4=_0x20f03c[_0x4668b7(0x16b)])==null?void 0x0:_0x2f00f4['kind'])===_0x55fa08&&_0x4668b7(0x174)in _0x20f03c['anchor']&&_0x20f03c[_0x4668b7(0x16b)]['elementId']===this[_0x4668b7(0x182)]['shapeId'];});}};_0x18b6a2[_0x5d8a94(0x172)](a);function _0x48de(_0x32af18,_0x1d4c20){_0x32af18=_0x32af18-0x16b;const _0x5a84a7=_0x5a84();let _0x48de9e=_0x5a84a7[_0x32af18];return _0x48de9e;}export{a as FShapeThreadCommentMixin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x53f011=_0x16e1;function _0x16e1(_0x23677e,_0x134df2){_0x23677e=_0x23677e-0x118;var _0x439923=_0x4399();var _0x16e1b7=_0x439923[_0x23677e];return _0x16e1b7;}(function(_0x1831ac,_0x25555d){var _0x5e1089=_0x16e1,_0x57992b=_0x1831ac();while(!![]){try{var _0x313037=-parseInt(_0x5e1089(0x123))/0x1+parseInt(_0x5e1089(0x12e))/0x2+-parseInt(_0x5e1089(0x11b))/0x3+-parseInt(_0x5e1089(0x124))/0x4*(parseInt(_0x5e1089(0x120))/0x5)+parseInt(_0x5e1089(0x133))/0x6*(-parseInt(_0x5e1089(0x134))/0x7)+parseInt(_0x5e1089(0x138))/0x8*(-parseInt(_0x5e1089(0x126))/0x9)+parseInt(_0x5e1089(0x141))/0xa;if(_0x313037===_0x25555d)break;else _0x57992b['push'](_0x57992b['shift']());}catch(_0x52bfba){_0x57992b['push'](_0x57992b['shift']());}}}(_0x4399,0x1c9e9));import{ThreadCommentFacadeService as _0x4ac0bf,UniverThreadCommentPlugin as _0x19efdb}from'@univerjs/thread-comment';import{UniverLicensePlugin as _0x5eaff6}from'@univerjs-pro/license';import{DependentOn as _0x3b9cec,IConfigService as _0x1246a8,Inject as _0x5a3b3b,Injector as _0x1dfd63,Plugin as _0x23aaa0,UniverInstanceType as _0x367f06,merge as _0x560e47}from'@univerjs/core';const u=_0x53f011(0x136),d={};function f(_0x132b33){var _0x1ef1e8=_0x53f011;return _0x132b33[_0x1ef1e8(0x140)](_0x4ac0bf);}function p(_0x3e25c2,_0xb1d49e,_0x539229,_0x4e832d){var _0x245e4a=_0x53f011;return _0x3e25c2[_0x245e4a(0x11c)]({..._0x4e832d,'unitId':_0xb1d49e['unitId'],'subUnitId':_0xb1d49e[_0x245e4a(0x121)],'anchor':{'kind':_0xb1d49e[_0x245e4a(0x130)],'pageId':_0xb1d49e[_0x245e4a(0x121)],'elementId':_0xb1d49e[_0x245e4a(0x11e)]},'content':_0x539229});}function m(_0xba8457,_0x4d23ea){var _0xe641a=_0x53f011;return _0xba8457[_0xe641a(0x13f)]({'unitIds':[_0x4d23ea[_0xe641a(0x122)]],'subUnitIds':[_0x4d23ea[_0xe641a(0x121)]],'anchorKinds':[_0x4d23ea[_0xe641a(0x130)]]})[_0xe641a(0x12d)](_0x6f3261=>{var _0x56bf99=_0xe641a,_0x388309;return((_0x388309=_0x6f3261[_0x56bf99(0x13b)])==null?void 0x0:_0x388309[_0x56bf99(0x130)])===_0x4d23ea[_0x56bf99(0x130)]&&_0x56bf99(0x11e)in _0x6f3261['anchor']&&_0x6f3261[_0x56bf99(0x13b)][_0x56bf99(0x11e)]===_0x4d23ea[_0x56bf99(0x11e)];});}function _0x4399(){var _0x3c23b7=['default','decorate','anchor','_config','UNIVER_SHAPE_THREAD_COMMENT_PLUGIN','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getComments','get','7307840zjlFrE','string','pluginName','_configService','toPrimitive','listCommentsAsync','type','115743NEUpxP','createCommentAsync','symbol','elementId','call','98265jDSNTX','subUnitId','unitId','113370RPdyrV','44GzUjfQ','defineProperty','954927lJYjjQ','@univerjs-pro/shape-thread-comment','UNIVER_UNKNOWN','packageName','function','length','_injector','filter','70646sYIIxy','object','kind','setConfig','prototype','12XuoeAT','239897ajaIgz','constructor','shape-thread-comment.config','iterator','16DJaDBY'];_0x4399=function(){return _0x3c23b7;};return _0x4399();}async function h(_0x4cfaef,_0x558ca6){var _0x167c0a=_0x53f011;return(await _0x4cfaef[_0x167c0a(0x119)]({'unitIds':[_0x558ca6[_0x167c0a(0x122)]],'subUnitIds':[_0x558ca6[_0x167c0a(0x121)]],'anchorKinds':[_0x558ca6['kind']]}))['filter'](_0x2f881d=>{var _0x1806e6=_0x167c0a,_0x4b89a2;return((_0x4b89a2=_0x2f881d[_0x1806e6(0x13b)])==null?void 0x0:_0x4b89a2['kind'])===_0x558ca6[_0x1806e6(0x130)]&&'elementId'in _0x2f881d['anchor']&&_0x2f881d[_0x1806e6(0x13b)][_0x1806e6(0x11e)]===_0x558ca6['elementId'];});}var g=_0x53f011(0x127),_='1.4.0';function v(_0x1e12dc,_0x5e37eb){return function(_0x10fa4b,_0x18cc99){_0x5e37eb(_0x10fa4b,_0x18cc99,_0x1e12dc);};}function y(_0x1b0975,_0x1650f2,_0x50f8dd,_0x198991){var _0x2248fa=_0x53f011,_0x5708b7=arguments[_0x2248fa(0x12b)],_0x2c8fbf=_0x5708b7<0x3?_0x1650f2:_0x198991===null?_0x198991=Object['getOwnPropertyDescriptor'](_0x1650f2,_0x50f8dd):_0x198991,_0x45b0bf;if(typeof Reflect==_0x2248fa(0x12f)&&typeof Reflect[_0x2248fa(0x13a)]=='function')_0x2c8fbf=Reflect[_0x2248fa(0x13a)](_0x1b0975,_0x1650f2,_0x50f8dd,_0x198991);else{for(var _0x1444cc=_0x1b0975[_0x2248fa(0x12b)]-0x1;_0x1444cc>=0x0;_0x1444cc--)(_0x45b0bf=_0x1b0975[_0x1444cc])&&(_0x2c8fbf=(_0x5708b7<0x3?_0x45b0bf(_0x2c8fbf):_0x5708b7>0x3?_0x45b0bf(_0x1650f2,_0x50f8dd,_0x2c8fbf):_0x45b0bf(_0x1650f2,_0x50f8dd))||_0x2c8fbf);}return _0x5708b7>0x3&&_0x2c8fbf&&Object['defineProperty'](_0x1650f2,_0x50f8dd,_0x2c8fbf),_0x2c8fbf;}function b(_0x3dd6b1){'@babel/helpers - typeof';var _0x53f8ab=_0x53f011;return b=typeof Symbol==_0x53f8ab(0x12a)&&typeof Symbol[_0x53f8ab(0x137)]=='symbol'?function(_0x1f6227){return typeof _0x1f6227;}:function(_0x289286){var _0x402500=_0x53f8ab;return _0x289286&&typeof Symbol==_0x402500(0x12a)&&_0x289286[_0x402500(0x135)]===Symbol&&_0x289286!==Symbol[_0x402500(0x132)]?_0x402500(0x11d):typeof _0x289286;},b(_0x3dd6b1);}function x(_0x33870c,_0x3fe15f){var _0x182cc6=_0x53f011;if(b(_0x33870c)!='object'||!_0x33870c)return _0x33870c;var _0x487775=_0x33870c[Symbol[_0x182cc6(0x118)]];if(_0x487775!==void 0x0){var _0x537bd8=_0x487775[_0x182cc6(0x11f)](_0x33870c,_0x3fe15f||_0x182cc6(0x139));if(b(_0x537bd8)!=_0x182cc6(0x12f))return _0x537bd8;throw TypeError(_0x182cc6(0x13e));}return(_0x3fe15f===_0x182cc6(0x142)?String:Number)(_0x33870c);}function S(_0x204bd5){var _0x282d8e=_0x53f011,_0x5d513d=x(_0x204bd5,_0x282d8e(0x142));return b(_0x5d513d)==_0x282d8e(0x11d)?_0x5d513d:_0x5d513d+'';}function C(_0x40715f,_0x2c5e66,_0x35afda){var _0xc4b90e=_0x53f011;return(_0x2c5e66=S(_0x2c5e66))in _0x40715f?Object[_0xc4b90e(0x125)](_0x40715f,_0x2c5e66,{'value':_0x35afda,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40715f[_0x2c5e66]=_0x35afda,_0x40715f;}let w=class extends _0x23aaa0{constructor(_0x2c8b25=d,_0x456c4c,_0x557faa){var _0x5e03ca=_0x53f011;super(),this[_0x5e03ca(0x13c)]=_0x2c8b25,this[_0x5e03ca(0x12c)]=_0x456c4c,this[_0x5e03ca(0x144)]=_0x557faa;let {..._0xbe832f}=_0x560e47({},d,this['_config']);this[_0x5e03ca(0x144)][_0x5e03ca(0x131)](u,_0xbe832f);}};C(w,_0x53f011(0x143),_0x53f011(0x13d)),C(w,_0x53f011(0x129),g),C(w,'version',_),C(w,_0x53f011(0x11a),_0x367f06[_0x53f011(0x128)]),w=y([_0x3b9cec(_0x5eaff6,_0x19efdb),v(0x1,_0x5a3b3b(_0x1dfd63)),v(0x2,_0x1246a8)],w);export{u as SHAPE_THREAD_COMMENT_PLUGIN_CONFIG_KEY,w as UniverShapeThreadCommentPlugin,p as createFloatingElementCommentAsync,m as getFloatingElementComments,f as getThreadCommentService,h as listFloatingElementCommentsAsync};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Injector } from '@univerjs/core';
|
|
2
|
+
import type { ICreateThreadCommentOptions, IFacadeThreadCommentInfo, IThreadCommentElementAnchor, ThreadCommentContent } from '@univerjs/thread-comment';
|
|
3
|
+
import { ThreadCommentFacadeService } from '@univerjs/thread-comment';
|
|
4
|
+
type ThreadCommentService = Pick<ThreadCommentFacadeService, 'createCommentAsync' | 'getComments' | 'listCommentsAsync'>;
|
|
5
|
+
export declare function getThreadCommentService(injector: Injector): ThreadCommentFacadeService;
|
|
6
|
+
export type IFloatingElementCommentCreateOptions = Omit<ICreateThreadCommentOptions, 'unitId' | 'subUnitId' | 'anchor' | 'content'>;
|
|
7
|
+
export interface IFloatingElementCommentTarget {
|
|
8
|
+
unitId: string;
|
|
9
|
+
subUnitId: string;
|
|
10
|
+
elementId: string;
|
|
11
|
+
kind: IThreadCommentElementAnchor['kind'];
|
|
12
|
+
}
|
|
13
|
+
export declare function createFloatingElementCommentAsync(service: ThreadCommentService, target: IFloatingElementCommentTarget, content: ThreadCommentContent, options: IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
14
|
+
export declare function getFloatingElementComments(service: ThreadCommentService, target: IFloatingElementCommentTarget): IFacadeThreadCommentInfo[];
|
|
15
|
+
export declare function listFloatingElementCommentsAsync(service: ThreadCommentService, target: IFloatingElementCommentTarget): Promise<IFacadeThreadCommentInfo[]>;
|
|
16
|
+
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { FDocumentChartThreadCommentMixin, type IFDocumentChartThreadCommentMixin } from './f-doc-chart';
|
|
3
|
-
export { FDocumentImageThreadCommentMixin, type IFDocumentImageThreadCommentMixin } from './f-doc-image';
|
|
1
|
+
export type { IFloatingElementCommentCreateOptions, IFloatingElementCommentTarget } from '../element-comment';
|
|
4
2
|
export type { IFShapeThreadCommentMixin, IShapeCommentCreateOptions } from './f-shape';
|
|
5
3
|
export { FShapeThreadCommentMixin } from './f-shape';
|
|
6
|
-
export { FSheetChartThreadCommentMixin, type IFSheetChartThreadCommentMixin } from './f-sheet-chart';
|
|
7
|
-
export { FSheetImageThreadCommentMixin, type IFSheetImageThreadCommentMixin } from './f-sheet-image';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { SHAPE_THREAD_COMMENT_PLUGIN_CONFIG_KEY } from './config/config';
|
|
2
2
|
export type { IUniverShapeThreadCommentConfig } from './config/config';
|
|
3
|
+
export type { IFloatingElementCommentCreateOptions, IFloatingElementCommentTarget } from './element-comment';
|
|
4
|
+
export { createFloatingElementCommentAsync, getFloatingElementComments, getThreadCommentService, listFloatingElementCommentsAsync, } from './element-comment';
|
|
3
5
|
export { UniverShapeThreadCommentPlugin } from './plugin';
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x35f3db,_0x3fe12a){var _0x32b653=_0x3054,_0x45e6d3=_0x35f3db();while(!![]){try{var _0x2d55bb=-parseInt(_0x32b653(0xae))/0x1+parseInt(_0x32b653(0xad))/0x2*(-parseInt(_0x32b653(0xc5))/0x3)+parseInt(_0x32b653(0x9e))/0x4+parseInt(_0x32b653(0xa5))/0x5+-parseInt(_0x32b653(0xb4))/0x6*(parseInt(_0x32b653(0xcb))/0x7)+-parseInt(_0x32b653(0xd6))/0x8*(-parseInt(_0x32b653(0xd2))/0x9)+parseInt(_0x32b653(0x95))/0xa*(parseInt(_0x32b653(0xc7))/0xb);if(_0x2d55bb===_0x3fe12a)break;else _0x45e6d3['push'](_0x45e6d3['shift']());}catch(_0xc57ed9){_0x45e6d3['push'](_0x45e6d3['shift']());}}}(_0x5d2a,0x8f07e),function(_0x18cf50,_0x52b5fc){var _0x48857a=_0x3054;typeof exports==_0x48857a(0xb6)&&typeof module<'u'?_0x52b5fc(exports,require('@univerjs-pro/docs-chart/facade'),require('@univerjs/thread-comment'),require('@univerjs/docs-drawing/facade'),require('@univerjs-pro/engine-shape/facade'),require('@univerjs/core'),require('@univerjs-pro/sheets-chart/facade'),require('@univerjs/sheets-drawing/facade')):typeof define==_0x48857a(0xd7)&&define['amd']?define([_0x48857a(0xca),'@univerjs-pro/docs-chart/facade',_0x48857a(0xcd),_0x48857a(0x8c),_0x48857a(0xcf),_0x48857a(0xb7),'@univerjs-pro/sheets-chart/facade','@univerjs/sheets-drawing/facade'],_0x52b5fc):(_0x18cf50=typeof globalThis<'u'?globalThis:_0x18cf50||self,_0x52b5fc(_0x18cf50['UniverProShapeThreadCommentFacade']={},_0x18cf50[_0x48857a(0xb2)],_0x18cf50[_0x48857a(0x99)],_0x18cf50[_0x48857a(0xc4)],_0x18cf50[_0x48857a(0xac)],_0x18cf50[_0x48857a(0x9c)],_0x18cf50[_0x48857a(0x96)],_0x18cf50[_0x48857a(0xce)]));}(this,function(_0x4fd66b,_0x3e66cd,_0x2cf618,_0x34fe4d,_0x5b2330,_0x72173,_0x1540da,_0x4371f4){var _0x4572a6=_0x3054;Object[_0x4572a6(0xb0)](_0x4fd66b,Symbol[_0x4572a6(0x98)],{'value':_0x4572a6(0x90)});var _0x598e95=Object[_0x4572a6(0xbf)],_0x229110=Object[_0x4572a6(0xb0)],_0x5c44df=Object[_0x4572a6(0x8b)],_0xe31871=Object[_0x4572a6(0x8f)],_0x10f142=Object[_0x4572a6(0xbc)],_0x515b84=Object[_0x4572a6(0xd4)]['hasOwnProperty'],_0xa4d574=(_0x5bd3ae,_0x4a6ebc,_0x46c26d,_0x11b5bb)=>{var _0x289da5=_0x4572a6;if(_0x4a6ebc&&typeof _0x4a6ebc==_0x289da5(0xb6)||typeof _0x4a6ebc==_0x289da5(0xd7)){for(var _0x2afb9b=_0xe31871(_0x4a6ebc),_0x2c3965=0x0,_0x31ca16=_0x2afb9b[_0x289da5(0xa6)],_0x59abe6;_0x2c3965<_0x31ca16;_0x2c3965++)_0x59abe6=_0x2afb9b[_0x2c3965],!_0x515b84[_0x289da5(0xaa)](_0x5bd3ae,_0x59abe6)&&_0x59abe6!==_0x46c26d&&_0x229110(_0x5bd3ae,_0x59abe6,{'get':(_0x1073df=>_0x4a6ebc[_0x1073df])['bind'](null,_0x59abe6),'enumerable':!(_0x11b5bb=_0x5c44df(_0x4a6ebc,_0x59abe6))||_0x11b5bb['enumerable']});}return _0x5bd3ae;};_0x2cf618=((_0x1e194d,_0x41c0e3,_0x418ae0)=>(_0x418ae0=_0x1e194d==null?{}:_0x598e95(_0x10f142(_0x1e194d)),_0xa4d574(_0x41c0e3||!_0x1e194d||!_0x1e194d[_0x4572a6(0xd0)]||!_0x515b84[_0x4572a6(0xaa)](_0x1e194d,_0x4572a6(0x9f))?_0x229110(_0x418ae0,'default',{'value':_0x1e194d,'enumerable':!0x0}):_0x418ae0,_0x1e194d)))(_0x2cf618);let _0x1b42d8=new WeakMap();function _0x33d8b0(_0x566f5d){var _0x21b21b=_0x4572a6;let _0x6a0cda=_0x1b42d8[_0x21b21b(0xa7)](_0x566f5d);if(_0x6a0cda)return _0x6a0cda;let _0x33b8fd=_0x566f5d[_0x21b21b(0xa7)](_0x2cf618[_0x21b21b(0x91)]);return _0x1b42d8[_0x21b21b(0x8e)](_0x566f5d,_0x33b8fd),_0x33b8fd;}function _0x4b74ea(_0x1c5039,_0x15f068,_0x31502c,_0x104ad9){var _0x4c65b4=_0x4572a6;return _0x1c5039[_0x4c65b4(0xab)]({..._0x104ad9,'unitId':_0x15f068[_0x4c65b4(0xbe)],'subUnitId':_0x15f068[_0x4c65b4(0xc3)],'anchor':{'kind':_0x15f068[_0x4c65b4(0xa4)],'pageId':_0x15f068[_0x4c65b4(0xc3)],'elementId':_0x15f068[_0x4c65b4(0xa8)]},'content':_0x31502c});}function _0x118bb4(_0x53a1b1,_0x2fb64a){var _0x28922c=_0x4572a6;return _0x53a1b1[_0x28922c(0x8d)]({'unitIds':[_0x2fb64a[_0x28922c(0xbe)]],'subUnitIds':[_0x2fb64a['subUnitId']],'anchorKinds':[_0x2fb64a['kind']]})[_0x28922c(0x97)](_0x20cee5=>{var _0x5604c1=_0x28922c,_0x35df79;return((_0x35df79=_0x20cee5[_0x5604c1(0x92)])==null?void 0x0:_0x35df79['kind'])===_0x2fb64a[_0x5604c1(0xa4)]&&'elementId'in _0x20cee5[_0x5604c1(0x92)]&&_0x20cee5[_0x5604c1(0x92)]['elementId']===_0x2fb64a[_0x5604c1(0xa8)];});}async function _0x46e08a(_0x559c17,_0x4fe838){var _0x5bc042=_0x4572a6;return(await _0x559c17[_0x5bc042(0xa1)]({'unitIds':[_0x4fe838[_0x5bc042(0xbe)]],'subUnitIds':[_0x4fe838['subUnitId']],'anchorKinds':[_0x4fe838[_0x5bc042(0xa4)]]}))[_0x5bc042(0x97)](_0xd8806c=>{var _0x48d849=_0x5bc042,_0x48e94b;return((_0x48e94b=_0xd8806c[_0x48d849(0x92)])==null?void 0x0:_0x48e94b[_0x48d849(0xa4)])===_0x4fe838[_0x48d849(0xa4)]&&_0x48d849(0xa8)in _0xd8806c[_0x48d849(0x92)]&&_0xd8806c[_0x48d849(0x92)]['elementId']===_0x4fe838[_0x48d849(0xa8)];});}var _0x32f95f=class extends _0x3e66cd[_0x4572a6(0xbb)]{['createCommentAsync'](_0x261c09,_0x1f9a75={}){var _0x49b19f=_0x4572a6;return _0x4b74ea(_0x33d8b0(this[_0x49b19f(0xa0)]),this[_0x49b19f(0xa2)](),_0x261c09,_0x1f9a75);}[_0x4572a6(0x8d)](){var _0xf696cb=_0x4572a6;return _0x118bb4(_0x33d8b0(this[_0xf696cb(0xa0)]),this[_0xf696cb(0xa2)]());}[_0x4572a6(0xa1)](){var _0x36de1c=_0x4572a6;return _0x46e08a(_0x33d8b0(this[_0x36de1c(0xa0)]),this['_commentTarget']());}[_0x4572a6(0xa2)](){var _0x3486ec=_0x4572a6;return{'unitId':this['unitId'],'subUnitId':this[_0x3486ec(0xbe)],'elementId':this['getDrawingId'](),'kind':_0x2cf618['ThreadCommentAnchorKind'][_0x3486ec(0x9d)]};}};_0x3e66cd[_0x4572a6(0xbb)][_0x4572a6(0xb3)](_0x32f95f);var _0x19ebd6=class extends _0x34fe4d['FDocumentImage']{[_0x4572a6(0xab)](_0x2154aa,_0x499233={}){var _0x7eea8e=_0x4572a6;return _0x4b74ea(_0x33d8b0(this[_0x7eea8e(0xa0)]),this[_0x7eea8e(0xa2)](),_0x2154aa,_0x499233);}[_0x4572a6(0x8d)](){var _0x33b9bb=_0x4572a6;return _0x118bb4(_0x33d8b0(this[_0x33b9bb(0xa0)]),this[_0x33b9bb(0xa2)]());}[_0x4572a6(0xa1)](){var _0x3936af=_0x4572a6;return _0x46e08a(_0x33d8b0(this[_0x3936af(0xa0)]),this[_0x3936af(0xa2)]());}['_commentTarget'](){var _0x4db24e=_0x4572a6;return{'unitId':this[_0x4db24e(0xc0)](),'subUnitId':this[_0x4db24e(0xc0)](),'elementId':this[_0x4db24e(0x94)](),'kind':_0x2cf618[_0x4db24e(0xb8)][_0x4db24e(0x9d)]};}};_0x34fe4d[_0x4572a6(0x9b)][_0x4572a6(0xb3)](_0x19ebd6);let _0x2258e4=new WeakMap();function _0x19b141(_0x2898b2){var _0x32f774=_0x4572a6;switch(_0x2898b2){case _0x72173[_0x32f774(0xcc)][_0x32f774(0xb9)]:return _0x2cf618['ThreadCommentAnchorKind'][_0x32f774(0xc9)];case _0x72173[_0x32f774(0xcc)][_0x32f774(0xbd)]:return _0x2cf618[_0x32f774(0xb8)][_0x32f774(0x9d)];case _0x72173['UniverInstanceType'][_0x32f774(0xaf)]:return _0x2cf618[_0x32f774(0xb8)][_0x32f774(0xd3)];case _0x72173[_0x32f774(0xcc)]['UNIVER_BOARD']:return _0x2cf618[_0x32f774(0xb8)][_0x32f774(0xc2)];default:throw Error(_0x32f774(0x93)+_0x2898b2);}}var _0x33fc2d=class extends _0x5b2330[_0x4572a6(0xba)]{[_0x4572a6(0xc6)](){var _0xf1d665=_0x4572a6;let _0x5efa16=_0x2258e4[_0xf1d665(0xa7)](this);if(_0x5efa16)return _0x5efa16;let _0xe91c98=this[_0xf1d665(0xa0)]['get'](_0x2cf618[_0xf1d665(0x91)]);return _0x2258e4[_0xf1d665(0x8e)](this,_0xe91c98),_0xe91c98;}[_0x4572a6(0xab)](_0x4529b3,_0x112786={}){var _0x284c06=_0x4572a6;return this['_getThreadCommentService']()[_0x284c06(0xab)]({..._0x112786,'unitId':this[_0x284c06(0xc1)][_0x284c06(0xbe)],'subUnitId':this['_shapeRef'][_0x284c06(0xc3)],'anchor':{'kind':_0x19b141(this['_shapeRef']['hostType']),'elementId':this[_0x284c06(0xc1)]['shapeId'],'pageId':this[_0x284c06(0xc1)]['subUnitId']},'content':_0x4529b3});}['getComments'](){var _0x365928=_0x4572a6;let _0x4672b8=_0x19b141(this[_0x365928(0xc1)][_0x365928(0x8a)]);return this[_0x365928(0xc6)]()[_0x365928(0x8d)]({'unitIds':[this[_0x365928(0xc1)]['unitId']],'subUnitIds':[this[_0x365928(0xc1)][_0x365928(0xc3)]],'anchorKinds':[_0x4672b8]})[_0x365928(0x97)](_0x105486=>{var _0x5d72f2=_0x365928,_0xd96454;return((_0xd96454=_0x105486[_0x5d72f2(0x92)])==null?void 0x0:_0xd96454['kind'])===_0x4672b8&&_0x5d72f2(0xa8)in _0x105486[_0x5d72f2(0x92)]&&_0x105486[_0x5d72f2(0x92)][_0x5d72f2(0xa8)]===this[_0x5d72f2(0xc1)][_0x5d72f2(0x9a)];});}async[_0x4572a6(0xa1)](){var _0x1e1f85=_0x4572a6;let _0x9af002=_0x19b141(this[_0x1e1f85(0xc1)][_0x1e1f85(0x8a)]);return(await this[_0x1e1f85(0xc6)]()[_0x1e1f85(0xa1)]({'unitIds':[this[_0x1e1f85(0xc1)][_0x1e1f85(0xbe)]],'subUnitIds':[this['_shapeRef'][_0x1e1f85(0xc3)]],'anchorKinds':[_0x9af002]}))[_0x1e1f85(0x97)](_0x251451=>{var _0xefecca=_0x1e1f85,_0xe6513c;return((_0xe6513c=_0x251451[_0xefecca(0x92)])==null?void 0x0:_0xe6513c[_0xefecca(0xa4)])===_0x9af002&&_0xefecca(0xa8)in _0x251451[_0xefecca(0x92)]&&_0x251451[_0xefecca(0x92)][_0xefecca(0xa8)]===this[_0xefecca(0xc1)][_0xefecca(0x9a)];});}};_0x5b2330[_0x4572a6(0xba)][_0x4572a6(0xb3)](_0x33fc2d);var _0x207265=class extends _0x1540da[_0x4572a6(0xd5)]{[_0x4572a6(0xab)](_0x330b10,_0x14d3a7={}){var _0x501b9c=_0x4572a6;return _0x4b74ea(_0x33d8b0(this['_injector']),this[_0x501b9c(0xa2)](),_0x330b10,_0x14d3a7);}[_0x4572a6(0x8d)](){var _0x2fcea0=_0x4572a6;return _0x118bb4(_0x33d8b0(this[_0x2fcea0(0xa0)]),this[_0x2fcea0(0xa2)]());}[_0x4572a6(0xa1)](){var _0x13f531=_0x4572a6;return _0x46e08a(_0x33d8b0(this[_0x13f531(0xa0)]),this[_0x13f531(0xa2)]());}['_commentTarget'](){var _0x58d788=_0x4572a6;return{'unitId':this[_0x58d788(0xbe)],'subUnitId':this[_0x58d788(0xc3)],'elementId':this[_0x58d788(0xa3)],'kind':_0x2cf618[_0x58d788(0xb8)][_0x58d788(0xc9)]};}};_0x1540da[_0x4572a6(0xd5)][_0x4572a6(0xb3)](_0x207265);var _0x4d9f9e=class extends _0x4371f4[_0x4572a6(0xb1)]{['createCommentAsync'](_0x525ec2,_0x550579={}){var _0x3d831a=_0x4572a6;return _0x4b74ea(_0x33d8b0(this['_injector']),this[_0x3d831a(0xa2)](),_0x525ec2,_0x550579);}[_0x4572a6(0x8d)](){var _0x4f841d=_0x4572a6;return _0x118bb4(_0x33d8b0(this[_0x4f841d(0xa0)]),this[_0x4f841d(0xa2)]());}[_0x4572a6(0xa1)](){var _0x3d1e66=_0x4572a6;return _0x46e08a(_0x33d8b0(this[_0x3d1e66(0xa0)]),this[_0x3d1e66(0xa2)]());}[_0x4572a6(0xa2)](){var _0x4c1106=_0x4572a6;return{'unitId':this['getUnitId'](),'subUnitId':this['getSubUnitId'](),'elementId':this[_0x4c1106(0x94)](),'kind':_0x2cf618[_0x4c1106(0xb8)][_0x4c1106(0xc9)]};}};_0x4371f4['FOverGridImage']['extend'](_0x4d9f9e),_0x4fd66b[_0x4572a6(0xa9)]=_0x32f95f,_0x4fd66b[_0x4572a6(0xc8)]=_0x19ebd6,_0x4fd66b['FShapeThreadCommentMixin']=_0x33fc2d,_0x4fd66b[_0x4572a6(0xb5)]=_0x207265,_0x4fd66b[_0x4572a6(0xd1)]=_0x4d9f9e;}));function _0x3054(_0x1d57d9,_0x17a7d5){_0x1d57d9=_0x1d57d9-0x8a;var _0x5d2a4b=_0x5d2a();var _0x305480=_0x5d2a4b[_0x1d57d9];return _0x305480;}function _0x5d2a(){var _0x181cc9=['kind','734200aTAARq','length','get','elementId','FDocumentChartThreadCommentMixin','call','createCommentAsync','UniverProEngineShapeFacade','2pgThhH','709242OmRXIH','UNIVER_SLIDE','defineProperty','FOverGridImage','UniverProDocsChartFacade','extend','258soGhrH','FSheetChartThreadCommentMixin','object','@univerjs/core','ThreadCommentAnchorKind','UNIVER_SHEET','FShape','FDocumentChart','getPrototypeOf','UNIVER_DOC','unitId','create','getUnitId','_shapeRef','BOARD_ELEMENT','subUnitId','UniverDocsDrawingFacade','2615223DQPSYx','_getThreadCommentService','3410DFCibb','FDocumentImageThreadCommentMixin','SHEET_DRAWING','exports','182651JqrxaC','UniverInstanceType','@univerjs/thread-comment','UniverSheetsDrawingFacade','@univerjs-pro/engine-shape/facade','__esModule','FSheetImageThreadCommentMixin','131130dYAYGs','SLIDE_ELEMENT','prototype','FSheetChart','496tMUNWk','function','hostType','getOwnPropertyDescriptor','@univerjs/docs-drawing/facade','getComments','set','getOwnPropertyNames','Module','ThreadCommentFacadeService','anchor','Unsupported\x20Shape\x20host\x20type:\x20','getId','40130JaQitV','UniverProSheetsChartFacade','filter','toStringTag','UniverThreadComment','shapeId','FDocumentImage','UniverCore','DOC_DRAWING','3978504nQDDJo','default','_injector','listCommentsAsync','_commentTarget','chartId'];_0x5d2a=function(){return _0x181cc9;};return _0x5d2a();}
|
|
1
|
+
function _0x23e7(_0x182eb7,_0xa19ee0){_0x182eb7=_0x182eb7-0x7c;const _0x579364=_0x5793();let _0x23e751=_0x579364[_0x182eb7];return _0x23e751;}(function(_0x5cdb12,_0x3a184b){const _0x4f12a8=_0x23e7,_0x564e2f=_0x5cdb12();while(!![]){try{const _0xeb35f0=parseInt(_0x4f12a8(0x8c))/0x1*(parseInt(_0x4f12a8(0xb3))/0x2)+-parseInt(_0x4f12a8(0xab))/0x3*(-parseInt(_0x4f12a8(0x91))/0x4)+-parseInt(_0x4f12a8(0xa4))/0x5*(parseInt(_0x4f12a8(0xb1))/0x6)+-parseInt(_0x4f12a8(0x81))/0x7*(-parseInt(_0x4f12a8(0xa8))/0x8)+parseInt(_0x4f12a8(0x89))/0x9+-parseInt(_0x4f12a8(0x84))/0xa+-parseInt(_0x4f12a8(0x8b))/0xb;if(_0xeb35f0===_0x3a184b)break;else _0x564e2f['push'](_0x564e2f['shift']());}catch(_0x30f910){_0x564e2f['push'](_0x564e2f['shift']());}}}(_0x5793,0xa4432),function(_0x1c9f60,_0x239c35){const _0x5e181b=_0x23e7;typeof exports==_0x5e181b(0x97)&&typeof module<'u'?_0x239c35(exports,require('@univerjs-pro/engine-shape/facade'),require('@univerjs/core'),require('@univerjs/thread-comment')):typeof define=='function'&&define[_0x5e181b(0x9c)]?define(['exports',_0x5e181b(0x96),_0x5e181b(0xb6),_0x5e181b(0x94)],_0x239c35):(_0x1c9f60=typeof globalThis<'u'?globalThis:_0x1c9f60||self,_0x239c35(_0x1c9f60[_0x5e181b(0x80)]={},_0x1c9f60['UniverProEngineShapeFacade'],_0x1c9f60['UniverCore'],_0x1c9f60['UniverThreadComment']));}(this,function(_0x4257f3,_0x54ef77,_0x4bde27,_0x29a010){const _0xa9dc54=_0x23e7;Object[_0xa9dc54(0x92)](_0x4257f3,Symbol[_0xa9dc54(0xa3)],{'value':_0xa9dc54(0xac)});var _0x5317b9=Object[_0xa9dc54(0xa1)],_0x4e3e03=Object[_0xa9dc54(0x92)],_0x1562fa=Object['getOwnPropertyDescriptor'],_0xe3a871=Object[_0xa9dc54(0xb2)],_0x26c215=Object[_0xa9dc54(0x98)],_0x5f24d1=Object[_0xa9dc54(0x7e)][_0xa9dc54(0x8e)],_0x3fd2c0=(_0x1fbe5c,_0x331842,_0x2fecc4,_0x2c5c18)=>{const _0xd3287=_0xa9dc54;if(_0x331842&&typeof _0x331842=='object'||typeof _0x331842=='function'){for(var _0x4d0923=_0xe3a871(_0x331842),_0x1ea90a=0x0,_0x20df87=_0x4d0923['length'],_0x19465e;_0x1ea90a<_0x20df87;_0x1ea90a++)_0x19465e=_0x4d0923[_0x1ea90a],!_0x5f24d1[_0xd3287(0x82)](_0x1fbe5c,_0x19465e)&&_0x19465e!==_0x2fecc4&&_0x4e3e03(_0x1fbe5c,_0x19465e,{'get':(_0x2515bc=>_0x331842[_0x2515bc])[_0xd3287(0xb5)](null,_0x19465e),'enumerable':!(_0x2c5c18=_0x1562fa(_0x331842,_0x19465e))||_0x2c5c18[_0xd3287(0x8d)]});}return _0x1fbe5c;};_0x29a010=((_0x738a4,_0x3dcb8f,_0x41e53d)=>(_0x41e53d=_0x738a4==null?{}:_0x5317b9(_0x26c215(_0x738a4)),_0x3fd2c0(_0x3dcb8f||!_0x738a4||!_0x738a4[_0xa9dc54(0x86)]||!_0x5f24d1[_0xa9dc54(0x82)](_0x738a4,'default')?_0x4e3e03(_0x41e53d,_0xa9dc54(0x8f),{'value':_0x738a4,'enumerable':!0x0}):_0x41e53d,_0x738a4)))(_0x29a010);let _0x4adfaa=new WeakMap();function _0x174ca7(_0x17c5f2){const _0xeb3a8b=_0xa9dc54;switch(_0x17c5f2){case _0x4bde27['UniverInstanceType']['UNIVER_SHEET']:return _0x29a010[_0xeb3a8b(0x90)][_0xeb3a8b(0x9a)];case _0x4bde27['UniverInstanceType']['UNIVER_DOC']:return _0x29a010[_0xeb3a8b(0x90)][_0xeb3a8b(0x83)];case _0x4bde27[_0xeb3a8b(0x99)][_0xeb3a8b(0xa6)]:return _0x29a010[_0xeb3a8b(0x90)][_0xeb3a8b(0xaf)];case _0x4bde27[_0xeb3a8b(0x99)][_0xeb3a8b(0x7c)]:return _0x29a010[_0xeb3a8b(0x90)][_0xeb3a8b(0xad)];default:throw Error(_0xeb3a8b(0xa0)+_0x17c5f2);}}var _0x1d896a=class extends _0x54ef77[_0xa9dc54(0x93)]{[_0xa9dc54(0x9f)](){const _0x41ea83=_0xa9dc54;let _0x2f88af=_0x4adfaa[_0x41ea83(0xa2)](this);if(_0x2f88af)return _0x2f88af;let _0x497a17=this[_0x41ea83(0xa7)][_0x41ea83(0xa2)](_0x29a010[_0x41ea83(0xa5)]);return _0x4adfaa[_0x41ea83(0x85)](this,_0x497a17),_0x497a17;}[_0xa9dc54(0xaa)](_0xff2e89,_0x565ae3={}){const _0x5ca5a5=_0xa9dc54;return this[_0x5ca5a5(0x9f)]()[_0x5ca5a5(0xaa)]({..._0x565ae3,'unitId':this[_0x5ca5a5(0xa9)][_0x5ca5a5(0x9e)],'subUnitId':this['_shapeRef'][_0x5ca5a5(0x8a)],'anchor':{'kind':_0x174ca7(this[_0x5ca5a5(0xa9)]['hostType']),'elementId':this['_shapeRef'][_0x5ca5a5(0x9b)],'pageId':this['_shapeRef']['subUnitId']},'content':_0xff2e89});}[_0xa9dc54(0xae)](){const _0x41e84c=_0xa9dc54;let _0x1d525b=_0x174ca7(this[_0x41e84c(0xa9)][_0x41e84c(0x95)]);return this[_0x41e84c(0x9f)]()[_0x41e84c(0xae)]({'unitIds':[this[_0x41e84c(0xa9)][_0x41e84c(0x9e)]],'subUnitIds':[this[_0x41e84c(0xa9)][_0x41e84c(0x8a)]],'anchorKinds':[_0x1d525b]})[_0x41e84c(0xb0)](_0xab4b9e=>{const _0xd39ca4=_0x41e84c;var _0x1e1fda;return((_0x1e1fda=_0xab4b9e[_0xd39ca4(0x9d)])==null?void 0x0:_0x1e1fda[_0xd39ca4(0x7d)])===_0x1d525b&&'elementId'in _0xab4b9e['anchor']&&_0xab4b9e[_0xd39ca4(0x9d)][_0xd39ca4(0x7f)]===this['_shapeRef'][_0xd39ca4(0x9b)];});}async['listCommentsAsync'](){const _0x287825=_0xa9dc54;let _0x4b3b33=_0x174ca7(this[_0x287825(0xa9)][_0x287825(0x95)]);return(await this[_0x287825(0x9f)]()[_0x287825(0xb4)]({'unitIds':[this[_0x287825(0xa9)][_0x287825(0x9e)]],'subUnitIds':[this[_0x287825(0xa9)][_0x287825(0x8a)]],'anchorKinds':[_0x4b3b33]}))[_0x287825(0xb0)](_0x58eb06=>{const _0x1c881b=_0x287825;var _0x1e433e;return((_0x1e433e=_0x58eb06[_0x1c881b(0x9d)])==null?void 0x0:_0x1e433e[_0x1c881b(0x7d)])===_0x4b3b33&&_0x1c881b(0x7f)in _0x58eb06[_0x1c881b(0x9d)]&&_0x58eb06[_0x1c881b(0x9d)][_0x1c881b(0x7f)]===this[_0x1c881b(0xa9)][_0x1c881b(0x9b)];});}};_0x54ef77[_0xa9dc54(0x93)][_0xa9dc54(0x88)](_0x1d896a),_0x4257f3[_0xa9dc54(0x87)]=_0x1d896a;}));function _0x5793(){const _0x2d21e7=['95vcbDvG','ThreadCommentFacadeService','UNIVER_SLIDE','_injector','32xpBbdW','_shapeRef','createCommentAsync','417YvMilz','Module','BOARD_ELEMENT','getComments','SLIDE_ELEMENT','filter','46668UFCupW','getOwnPropertyNames','51458FLngjC','listCommentsAsync','bind','@univerjs/core','UNIVER_BOARD','kind','prototype','elementId','UniverProShapeThreadCommentFacade','2147642HHpDpf','call','DOC_DRAWING','73590MTsNaL','set','__esModule','FShapeThreadCommentMixin','extend','3725676UZWFVW','subUnitId','16944356OanpVq','24QydxEO','enumerable','hasOwnProperty','default','ThreadCommentAnchorKind','3156NGBRds','defineProperty','FShape','@univerjs/thread-comment','hostType','@univerjs-pro/engine-shape/facade','object','getPrototypeOf','UniverInstanceType','SHEET_DRAWING','shapeId','amd','anchor','unitId','_getThreadCommentService','Unsupported\x20Shape\x20host\x20type:\x20','create','get','toStringTag'];_0x5793=function(){return _0x2d21e7;};return _0x5793();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3507d5,_0x14cd8f){var _0xc3c437=_0x3e7a,_0x451368=_0x3507d5();while(!![]){try{var _0xd5369f=-parseInt(_0xc3c437(0xd5))/0x1+-parseInt(_0xc3c437(0xc4))/0x2+-parseInt(_0xc3c437(0xc3))/0x3*(parseInt(_0xc3c437(0xb1))/0x4)+-parseInt(_0xc3c437(0xd8))/0x5*(-parseInt(_0xc3c437(0xd4))/0x6)+parseInt(_0xc3c437(0xaf))/0x7+parseInt(_0xc3c437(0xb8))/0x8+parseInt(_0xc3c437(0xc8))/0x9*(-parseInt(_0xc3c437(0xdc))/0xa);if(_0xd5369f===_0x14cd8f)break;else _0x451368['push'](_0x451368['shift']());}catch(_0x4d580f){_0x451368['push'](_0x451368['shift']());}}}(_0x1daf,0x41df2),function(_0x4282a9,_0x132585){var _0xf4eee5=_0x3e7a;typeof exports=='object'&&typeof module<'u'?_0x132585(exports,require('@univerjs/thread-comment'),require('@univerjs-pro/license'),require('@univerjs/core')):typeof define==_0xf4eee5(0xcc)&&define[_0xf4eee5(0xbb)]?define(['exports','@univerjs/thread-comment',_0xf4eee5(0xd3),'@univerjs/core'],_0x132585):(_0x4282a9=typeof globalThis<'u'?globalThis:_0x4282a9||self,_0x132585(_0x4282a9[_0xf4eee5(0xc5)]={},_0x4282a9['UniverThreadComment'],_0x4282a9[_0xf4eee5(0xc7)],_0x4282a9[_0xf4eee5(0xe0)]));}(this,function(_0x12849f,_0x4538f5,_0xd27620,_0x4f4e50){var _0x1140f4=_0x3e7a;Object[_0x1140f4(0xa1)](_0x12849f,Symbol[_0x1140f4(0xba)],{'value':_0x1140f4(0xa4)});let _0x47761c=_0x1140f4(0xbc),_0x2aef0d={};function _0x1cb776(_0x4f113d){var _0x48f517=_0x1140f4;return _0x4f113d[_0x48f517(0xc0)](_0x4538f5[_0x48f517(0xaa)]);}function _0x1f09b1(_0xd22769,_0x40f463,_0x4edefc,_0xa1405a){var _0x3ee5ac=_0x1140f4;return _0xd22769[_0x3ee5ac(0xd9)]({..._0xa1405a,'unitId':_0x40f463[_0x3ee5ac(0xa9)],'subUnitId':_0x40f463[_0x3ee5ac(0xa3)],'anchor':{'kind':_0x40f463[_0x3ee5ac(0xd2)],'pageId':_0x40f463['subUnitId'],'elementId':_0x40f463[_0x3ee5ac(0xd1)]},'content':_0x4edefc});}function _0x4ea841(_0x40254e,_0x314d81){var _0x71c396=_0x1140f4;return _0x40254e['getComments']({'unitIds':[_0x314d81[_0x71c396(0xa9)]],'subUnitIds':[_0x314d81[_0x71c396(0xa3)]],'anchorKinds':[_0x314d81[_0x71c396(0xd2)]]})[_0x71c396(0xe1)](_0x219869=>{var _0x4082ed=_0x71c396,_0x4fbc96;return((_0x4fbc96=_0x219869[_0x4082ed(0xe2)])==null?void 0x0:_0x4fbc96[_0x4082ed(0xd2)])===_0x314d81[_0x4082ed(0xd2)]&&'elementId'in _0x219869['anchor']&&_0x219869[_0x4082ed(0xe2)][_0x4082ed(0xd1)]===_0x314d81[_0x4082ed(0xd1)];});}async function _0x41558a(_0x32589b,_0xfba39a){var _0x3c4ccf=_0x1140f4;return(await _0x32589b[_0x3c4ccf(0xdd)]({'unitIds':[_0xfba39a[_0x3c4ccf(0xa9)]],'subUnitIds':[_0xfba39a['subUnitId']],'anchorKinds':[_0xfba39a[_0x3c4ccf(0xd2)]]}))[_0x3c4ccf(0xe1)](_0x1a30ea=>{var _0x25d943=_0x3c4ccf,_0x4bcef0;return((_0x4bcef0=_0x1a30ea[_0x25d943(0xe2)])==null?void 0x0:_0x4bcef0['kind'])===_0xfba39a[_0x25d943(0xd2)]&&_0x25d943(0xd1)in _0x1a30ea[_0x25d943(0xe2)]&&_0x1a30ea['anchor']['elementId']===_0xfba39a[_0x25d943(0xd1)];});}var _0x3e3beb=_0x1140f4(0xb7),_0xc30239=_0x1140f4(0xb6);function _0x2a082e(_0x44ede4,_0xf8ca0d){return function(_0x4bd637,_0x42e007){_0xf8ca0d(_0x4bd637,_0x42e007,_0x44ede4);};}function _0x4a8ab3(_0x4ac7a4,_0x53dc71,_0x1ad7cf,_0x198d63){var _0x1365b7=_0x1140f4,_0xc9f28d=arguments[_0x1365b7(0xcf)],_0x28a26b=_0xc9f28d<0x3?_0x53dc71:_0x198d63===null?_0x198d63=Object[_0x1365b7(0xda)](_0x53dc71,_0x1ad7cf):_0x198d63,_0x21650f;if(typeof Reflect=='object'&&typeof Reflect[_0x1365b7(0xbd)]==_0x1365b7(0xcc))_0x28a26b=Reflect[_0x1365b7(0xbd)](_0x4ac7a4,_0x53dc71,_0x1ad7cf,_0x198d63);else{for(var _0xd2185f=_0x4ac7a4[_0x1365b7(0xcf)]-0x1;_0xd2185f>=0x0;_0xd2185f--)(_0x21650f=_0x4ac7a4[_0xd2185f])&&(_0x28a26b=(_0xc9f28d<0x3?_0x21650f(_0x28a26b):_0xc9f28d>0x3?_0x21650f(_0x53dc71,_0x1ad7cf,_0x28a26b):_0x21650f(_0x53dc71,_0x1ad7cf))||_0x28a26b);}return _0xc9f28d>0x3&&_0x28a26b&&Object[_0x1365b7(0xa1)](_0x53dc71,_0x1ad7cf,_0x28a26b),_0x28a26b;}function _0x3db53d(_0x1f5dc2){'@babel/helpers - typeof';var _0x43e2fc=_0x1140f4;return _0x3db53d=typeof Symbol=='function'&&typeof Symbol[_0x43e2fc(0xc2)]==_0x43e2fc(0xbe)?function(_0x18e813){return typeof _0x18e813;}:function(_0x169e0d){var _0x48a2dd=_0x43e2fc;return _0x169e0d&&typeof Symbol=='function'&&_0x169e0d['constructor']===Symbol&&_0x169e0d!==Symbol[_0x48a2dd(0xad)]?_0x48a2dd(0xbe):typeof _0x169e0d;},_0x3db53d(_0x1f5dc2);}function _0x3adce6(_0x4fff2b,_0x8385fd){var _0x3a4334=_0x1140f4;if(_0x3db53d(_0x4fff2b)!=_0x3a4334(0xab)||!_0x4fff2b)return _0x4fff2b;var _0xcec921=_0x4fff2b[Symbol[_0x3a4334(0xb0)]];if(_0xcec921!==void 0x0){var _0x1e9802=_0xcec921[_0x3a4334(0xd7)](_0x4fff2b,_0x8385fd||_0x3a4334(0xa0));if(_0x3db53d(_0x1e9802)!=_0x3a4334(0xab))return _0x1e9802;throw TypeError(_0x3a4334(0xc9));}return(_0x8385fd===_0x3a4334(0xcd)?String:Number)(_0x4fff2b);}function _0x8ee09f(_0x2b3f82){var _0x4524eb=_0x1140f4,_0x24143d=_0x3adce6(_0x2b3f82,_0x4524eb(0xcd));return _0x3db53d(_0x24143d)=='symbol'?_0x24143d:_0x24143d+'';}function _0xd00b53(_0x285eea,_0x585733,_0x21addc){var _0x2fbfa7=_0x1140f4;return(_0x585733=_0x8ee09f(_0x585733))in _0x285eea?Object[_0x2fbfa7(0xa1)](_0x285eea,_0x585733,{'value':_0x21addc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x285eea[_0x585733]=_0x21addc,_0x285eea;}let _0x459990=class extends _0x4f4e50[_0x1140f4(0xdf)]{constructor(_0x25b232=_0x2aef0d,_0x5ba064,_0xfee53f){var _0x595de6=_0x1140f4;super(),this[_0x595de6(0xb2)]=_0x25b232,this[_0x595de6(0xb9)]=_0x5ba064,this['_configService']=_0xfee53f;let {..._0x462a90}=(0x0,_0x4f4e50[_0x595de6(0xdb)])({},_0x2aef0d,this[_0x595de6(0xb2)]);this[_0x595de6(0xc1)][_0x595de6(0xb3)](_0x47761c,_0x462a90);}};_0xd00b53(_0x459990,_0x1140f4(0xca),_0x1140f4(0xcb)),_0xd00b53(_0x459990,_0x1140f4(0xa5),_0x3e3beb),_0xd00b53(_0x459990,_0x1140f4(0xac),_0xc30239),_0xd00b53(_0x459990,'type',_0x4f4e50[_0x1140f4(0xa6)][_0x1140f4(0xa2)]),_0x459990=_0x4a8ab3([(0x0,_0x4f4e50[_0x1140f4(0xc6)])(_0xd27620[_0x1140f4(0xd0)],_0x4538f5[_0x1140f4(0xae)]),_0x2a082e(0x1,(0x0,_0x4f4e50[_0x1140f4(0xb5)])(_0x4f4e50[_0x1140f4(0xde)])),_0x2a082e(0x2,_0x4f4e50[_0x1140f4(0xa7)])],_0x459990),_0x12849f['SHAPE_THREAD_COMMENT_PLUGIN_CONFIG_KEY']=_0x47761c,Object[_0x1140f4(0xa1)](_0x12849f,_0x1140f4(0xd6),{'enumerable':!0x0,'get':function(){return _0x459990;}}),_0x12849f[_0x1140f4(0xbf)]=_0x1f09b1,_0x12849f[_0x1140f4(0xb4)]=_0x4ea841,_0x12849f[_0x1140f4(0xa8)]=_0x1cb776,_0x12849f[_0x1140f4(0xce)]=_0x41558a;}));function _0x3e7a(_0x27f626,_0x30a95f){_0x27f626=_0x27f626-0xa0;var _0x1daf3d=_0x1daf();var _0x3e7add=_0x1daf3d[_0x27f626];return _0x3e7add;}function _0x1daf(){var _0x280399=['3690519YPeWfS','toPrimitive','4pwFiXY','_config','setConfig','getFloatingElementComments','Inject','1.4.0','@univerjs-pro/shape-thread-comment','2326936njKmlG','_injector','toStringTag','amd','shape-thread-comment.config','decorate','symbol','createFloatingElementCommentAsync','get','_configService','iterator','146325lIgGvn','883922umyTkS','UniverProShapeThreadComment','DependentOn','UniverProLicense','12816CVQLVY','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pluginName','UNIVER_SHAPE_THREAD_COMMENT_PLUGIN','function','string','listFloatingElementCommentsAsync','length','UniverLicensePlugin','elementId','kind','@univerjs-pro/license','28428CkDNxf','244184FZHbuD','UniverShapeThreadCommentPlugin','call','215FNWdYg','createCommentAsync','getOwnPropertyDescriptor','merge','120GFPGzK','listCommentsAsync','Injector','Plugin','UniverCore','filter','anchor','default','defineProperty','UNIVER_UNKNOWN','subUnitId','Module','packageName','UniverInstanceType','IConfigService','getThreadCommentService','unitId','ThreadCommentFacadeService','object','version','prototype','UniverThreadCommentPlugin'];_0x1daf=function(){return _0x280399;};return _0x1daf();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/shape-thread-comment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Thread comment integration for Univer Shapes.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -41,25 +41,21 @@
|
|
|
41
41
|
"lib"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@univerjs-pro/
|
|
45
|
-
"@univerjs-pro/
|
|
46
|
-
"@univerjs
|
|
47
|
-
"@univerjs
|
|
48
|
-
"@univerjs/core": "1.3.1",
|
|
49
|
-
"@univerjs/docs-drawing": "1.3.1",
|
|
50
|
-
"@univerjs/sheets-drawing": "1.3.1",
|
|
51
|
-
"@univerjs/thread-comment": "1.3.1"
|
|
44
|
+
"@univerjs-pro/engine-shape": "1.4.0",
|
|
45
|
+
"@univerjs-pro/license": "1.4.0",
|
|
46
|
+
"@univerjs/core": "1.4.0",
|
|
47
|
+
"@univerjs/thread-comment": "1.4.0"
|
|
52
48
|
},
|
|
53
49
|
"devDependencies": {
|
|
54
|
-
"@univerjs-infra/shared": "1.
|
|
55
|
-
"
|
|
56
|
-
"vitest": "^5.0.
|
|
50
|
+
"@univerjs-infra/shared": "1.4.0",
|
|
51
|
+
"tsrs": "0.20.1-ts7.1.0-beta",
|
|
52
|
+
"vitest": "^5.0.5"
|
|
57
53
|
},
|
|
58
54
|
"scripts": {
|
|
59
55
|
"test": "vitest run",
|
|
60
|
-
"typecheck": "
|
|
56
|
+
"typecheck": "tsrs --noEmit",
|
|
61
57
|
"build:bundle": "univer-cli build",
|
|
62
|
-
"build:types": "
|
|
58
|
+
"build:types": "tsrs -p tsconfig.node.json",
|
|
63
59
|
"build": "pnpm run build:bundle && pnpm run build:types"
|
|
64
60
|
},
|
|
65
61
|
"module": "./lib/es/index.js"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Injector } from '@univerjs/core';
|
|
2
|
-
import * as ThreadComment from '@univerjs/thread-comment';
|
|
3
|
-
type ThreadCommentService = Pick<ThreadComment.ThreadCommentFacadeService, 'createCommentAsync' | 'getComments' | 'listCommentsAsync'>;
|
|
4
|
-
export declare function getThreadCommentService(injector: Injector): ThreadComment.ThreadCommentFacadeService;
|
|
5
|
-
export type IFloatingElementCommentCreateOptions = Omit<ThreadComment.ICreateThreadCommentOptions, 'unitId' | 'subUnitId' | 'anchor' | 'content'>;
|
|
6
|
-
export interface IFloatingElementCommentTarget {
|
|
7
|
-
unitId: string;
|
|
8
|
-
subUnitId: string;
|
|
9
|
-
elementId: string;
|
|
10
|
-
kind: ThreadComment.IThreadCommentElementAnchor['kind'];
|
|
11
|
-
}
|
|
12
|
-
export declare function createFloatingElementCommentAsync(service: ThreadCommentService, target: IFloatingElementCommentTarget, content: ThreadComment.ThreadCommentContent, options: IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
13
|
-
export declare function getFloatingElementComments(service: ThreadCommentService, target: IFloatingElementCommentTarget): ThreadComment.IFacadeThreadCommentInfo[];
|
|
14
|
-
export declare function listFloatingElementCommentsAsync(service: ThreadCommentService, target: IFloatingElementCommentTarget): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
15
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { FDocumentChart } from '@univerjs-pro/docs-chart/facade';
|
|
2
|
-
import * as ThreadComment from '@univerjs/thread-comment';
|
|
3
|
-
import * as ElementComment from './element-comment';
|
|
4
|
-
export interface IFDocumentChartThreadCommentMixin {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a comment anchored to this document chart.
|
|
7
|
-
* @param content Plain text or a Univer document body for rich comment content.
|
|
8
|
-
* @param options Optional stable IDs, author, attachments, and creation time.
|
|
9
|
-
* @returns `true` when the create command succeeds; otherwise, `false`.
|
|
10
|
-
* @throws {TypeError} If the content is empty.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const chart = univerAPI.getActiveDocument()?.getCharts()[0];
|
|
14
|
-
* await chart?.createCommentAsync('Verify the chart source.');
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns locally loaded comments anchored to this chart's drawing ID.
|
|
20
|
-
* @returns Matching comment threads in the current document.
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const chart = univerAPI.getActiveDocument()?.getCharts()[0];
|
|
24
|
-
* console.log(chart?.getComments().length ?? 0);
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
28
|
-
/**
|
|
29
|
-
* Synchronizes known threads and returns comments anchored to this chart's drawing ID.
|
|
30
|
-
* @returns A promise resolving to matching synchronized comment threads.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const chart = univerAPI.getActiveDocument()?.getCharts()[0];
|
|
34
|
-
* const comments = chart ? await chart.listCommentsAsync() : [];
|
|
35
|
-
* console.log(comments.length);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
39
|
-
}
|
|
40
|
-
export declare class FDocumentChartThreadCommentMixin extends FDocumentChart implements IFDocumentChartThreadCommentMixin {
|
|
41
|
-
/** @inheritdoc */
|
|
42
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
43
|
-
/** @inheritdoc */
|
|
44
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
45
|
-
/** @inheritdoc */
|
|
46
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
47
|
-
private _commentTarget;
|
|
48
|
-
}
|
|
49
|
-
declare module '@univerjs-pro/docs-chart/facade' {
|
|
50
|
-
interface FDocumentChart extends IFDocumentChartThreadCommentMixin {
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { FDocumentImage } from '@univerjs/docs-drawing/facade';
|
|
2
|
-
import * as ThreadComment from '@univerjs/thread-comment';
|
|
3
|
-
import * as ElementComment from './element-comment';
|
|
4
|
-
export interface IFDocumentImageThreadCommentMixin {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a comment anchored to this document image.
|
|
7
|
-
* @param content Plain text or a Univer document body for rich comment content.
|
|
8
|
-
* @param options Optional stable IDs, author, attachments, and creation time.
|
|
9
|
-
* @returns `true` when the create command succeeds; otherwise, `false`.
|
|
10
|
-
* @throws {TypeError} If the content is empty.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const image = univerAPI.getActiveDocument()?.getImages()[0];
|
|
14
|
-
* await image?.createCommentAsync('Add alternative text.');
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns locally loaded comments anchored to this image's drawing ID.
|
|
20
|
-
* @returns Matching comment threads in the current document.
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const image = univerAPI.getActiveDocument()?.getImages()[0];
|
|
24
|
-
* console.log(image?.getComments().length ?? 0);
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
28
|
-
/**
|
|
29
|
-
* Synchronizes known threads and returns comments anchored to this image's drawing ID.
|
|
30
|
-
* @returns A promise resolving to matching synchronized comment threads.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const image = univerAPI.getActiveDocument()?.getImages()[0];
|
|
34
|
-
* const comments = image ? await image.listCommentsAsync() : [];
|
|
35
|
-
* console.log(comments.length);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
39
|
-
}
|
|
40
|
-
export declare class FDocumentImageThreadCommentMixin extends FDocumentImage implements IFDocumentImageThreadCommentMixin {
|
|
41
|
-
/** @inheritdoc */
|
|
42
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
43
|
-
/** @inheritdoc */
|
|
44
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
45
|
-
/** @inheritdoc */
|
|
46
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
47
|
-
private _commentTarget;
|
|
48
|
-
}
|
|
49
|
-
declare module '@univerjs/docs-drawing/facade' {
|
|
50
|
-
interface FDocumentImage extends IFDocumentImageThreadCommentMixin {
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { FSheetChart } from '@univerjs-pro/sheets-chart/facade';
|
|
2
|
-
import * as ThreadComment from '@univerjs/thread-comment';
|
|
3
|
-
import * as ElementComment from './element-comment';
|
|
4
|
-
export interface IFSheetChartThreadCommentMixin {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a comment anchored to this Sheet chart.
|
|
7
|
-
* @param content Plain text or a Univer document body for rich comment content.
|
|
8
|
-
* @param options Optional stable IDs, author, attachments, and creation time.
|
|
9
|
-
* @returns `true` when the create command succeeds; otherwise, `false`.
|
|
10
|
-
* @throws {TypeError} If the content is empty.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const chart = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getCharts()[0];
|
|
14
|
-
* await chart?.createCommentAsync('Verify the source range.');
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns locally loaded comments anchored to this chart's stable ID.
|
|
20
|
-
* @returns Matching comment threads in the current worksheet.
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const chart = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getCharts()[0];
|
|
24
|
-
* console.log(chart?.getComments().length ?? 0);
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
28
|
-
/**
|
|
29
|
-
* Synchronizes known threads and returns comments anchored to this chart's stable ID.
|
|
30
|
-
* @returns A promise resolving to matching synchronized comment threads.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const chart = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getCharts()[0];
|
|
34
|
-
* const comments = chart ? await chart.listCommentsAsync() : [];
|
|
35
|
-
* console.log(comments.length);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
39
|
-
}
|
|
40
|
-
export declare class FSheetChartThreadCommentMixin extends FSheetChart implements IFSheetChartThreadCommentMixin {
|
|
41
|
-
/** @inheritdoc */
|
|
42
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
43
|
-
/** @inheritdoc */
|
|
44
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
45
|
-
/** @inheritdoc */
|
|
46
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
47
|
-
private _commentTarget;
|
|
48
|
-
}
|
|
49
|
-
declare module '@univerjs-pro/sheets-chart/facade' {
|
|
50
|
-
interface FSheetChart extends IFSheetChartThreadCommentMixin {
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { FOverGridImage } from '@univerjs/sheets-drawing/facade';
|
|
2
|
-
import * as ThreadComment from '@univerjs/thread-comment';
|
|
3
|
-
import * as ElementComment from './element-comment';
|
|
4
|
-
export interface IFSheetImageThreadCommentMixin {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a comment anchored to this over-grid image.
|
|
7
|
-
* @param content Plain text or a Univer document body for rich comment content.
|
|
8
|
-
* @param options Optional stable IDs, author, attachments, and creation time.
|
|
9
|
-
* @returns `true` when the create command succeeds; otherwise, `false`.
|
|
10
|
-
* @throws {TypeError} If the content is empty.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const image = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getImages()[0];
|
|
14
|
-
* await image?.createCommentAsync('Replace this image.');
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns locally loaded comments anchored to this image's drawing ID.
|
|
20
|
-
* @returns Matching comment threads in the current worksheet.
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const image = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getImages()[0];
|
|
24
|
-
* console.log(image?.getComments().length ?? 0);
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
28
|
-
/**
|
|
29
|
-
* Synchronizes known threads and returns comments anchored to this image's drawing ID.
|
|
30
|
-
* @returns A promise resolving to matching synchronized comment threads.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const image = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getImages()[0];
|
|
34
|
-
* const comments = image ? await image.listCommentsAsync() : [];
|
|
35
|
-
* console.log(comments.length);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
39
|
-
}
|
|
40
|
-
export declare class FSheetImageThreadCommentMixin extends FOverGridImage implements IFSheetImageThreadCommentMixin {
|
|
41
|
-
/** @inheritdoc */
|
|
42
|
-
createCommentAsync(content: ThreadComment.ThreadCommentContent, options?: ElementComment.IFloatingElementCommentCreateOptions): Promise<boolean>;
|
|
43
|
-
/** @inheritdoc */
|
|
44
|
-
getComments(): ThreadComment.IFacadeThreadCommentInfo[];
|
|
45
|
-
/** @inheritdoc */
|
|
46
|
-
listCommentsAsync(): Promise<ThreadComment.IFacadeThreadCommentInfo[]>;
|
|
47
|
-
private _commentTarget;
|
|
48
|
-
}
|
|
49
|
-
declare module '@univerjs/sheets-drawing/facade' {
|
|
50
|
-
interface FOverGridImage extends IFSheetImageThreadCommentMixin {
|
|
51
|
-
}
|
|
52
|
-
}
|