@univerjs/docs-hyper-link 0.3.0-alpha.0 → 0.3.0-nightly.202410101606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -118
- package/lib/types/plugin.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
- package/LICENSE +0 -176
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';var _0x348b01=_0x15d9;(function(_0x31a84c,_0x44dba7){var _0x21977f=_0x15d9,_0x284dd6=_0x31a84c();while(!![]){try{var _0x55f154=parseInt(_0x21977f(0x1c8))/0x1*(-parseInt(_0x21977f(0x1d9))/0x2)+-parseInt(_0x21977f(0x1d0))/0x3*(parseInt(_0x21977f(0x1a5))/0x4)+-parseInt(_0x21977f(0x1b4))/0x5+-parseInt(_0x21977f(0x1cb))/0x6*(parseInt(_0x21977f(0x1aa))/0x7)+parseInt(_0x21977f(0x1c4))/0x8*(parseInt(_0x21977f(0x1be))/0x9)+parseInt(_0x21977f(0x1db))/0xa+-parseInt(_0x21977f(0x1d2))/0xb*(-parseInt(_0x21977f(0x1e6))/0xc);if(_0x55f154===_0x44dba7)break;else _0x284dd6['push'](_0x284dd6['shift']());}catch(_0x39ce22){_0x284dd6['push'](_0x284dd6['shift']());}}}(_0x37d6,0x7e8e4));function _0x15d9(_0x339bd2,_0x9e4ced){var _0x37d699=_0x37d6();return _0x15d9=function(_0x15d95f,_0x2f3f64){_0x15d95f=_0x15d95f-0x1a5;var _0x116d2f=_0x37d699[_0x15d95f];return _0x116d2f;},_0x15d9(_0x339bd2,_0x9e4ced);}var __defProp=Object['defineProperty'],__defNormalProp=(_0x264df6,_0x4d744f,_0x5e6dde)=>_0x4d744f in _0x264df6?__defProp(_0x264df6,_0x4d744f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6dde}):_0x264df6[_0x4d744f]=_0x5e6dde,__name=(_0x5f2321,_0x59bf86)=>__defProp(_0x5f2321,'name',{'value':_0x59bf86,'configurable':!0x0}),__publicField=(_0x4fbe03,_0x653d21,_0x58bec6)=>__defNormalProp(_0x4fbe03,typeof _0x653d21!='symbol'?_0x653d21+'':_0x653d21,_0x58bec6);Object[_0x348b01(0x1e7)](exports,Symbol['toStringTag'],{'value':_0x348b01(0x1af)});function _0x37d6(){var _0x358427=['@univerjs/core','469284zDdWxS','Inject','push','headerModelMap','CommandType','3eYtRxQ','forEach','913lnjWhq','registerCommand','_resourceManagerService','handleDoc','type','stringify','ICommandService','508772LDIZmk','getBody','806580OUyZNV','length','links','onLoad','CustomRangeType','UNIVER_DOC','parse','docs-hyper-link.config','footerModelMap','docs.mutation.delete-hyper-link','customRanges','465084lexNHz','defineProperty','UniverInstanceType','getOwnPropertyDescriptor','3187124kkGieB','registerPluginResource','get','_commandService','IConfigService','84iZBsTB','_config','Disposable','properties','DOC_HYPER_LINK_PLUGIN','Module','payload','pluginName','onUnLoad','_injector','3570605wqagfq','__decorateClass$1','rangeType','UniverDocsHyperLinkPlugin','_univerInstanceService','IResourceManagerService','__decorateParam','HYPERLINK','_configService','DocHyperLinkResourceController','225qaTYVp','docs.mutation.update-hyper-link','getUnit','set','IUniverInstanceService','MUTATION','57320ZBssmW','toJson','handler','__decorateParam$1','2FdpFaq','_init'];_0x37d6=function(){return _0x358427;};return _0x37d6();}const core=require(_0x348b01(0x1ca)),AddHyperLinkMuatation={'id':'docs.mutation.add-hyper-link','type':core[_0x348b01(0x1cf)][_0x348b01(0x1c3)],'handler':__name(()=>!0x0,_0x348b01(0x1c6))},UpdateHyperLinkMuatation={'id':_0x348b01(0x1bf),'type':core['CommandType'][_0x348b01(0x1c3)],'handler':__name(()=>!0x0,'handler')},DeleteHyperLinkMuatation={'id':_0x348b01(0x1e4),'type':core[_0x348b01(0x1cf)][_0x348b01(0x1c3)],'handler':__name(()=>!0x0,'handler')},PLUGIN_CONFIG_KEY=_0x348b01(0x1e2),defaultPluginConfig={};var __defProp$1=Object[_0x348b01(0x1e7)],__getOwnPropDesc$1=Object[_0x348b01(0x1e9)],__decorateClass$1=__name((_0x2728a8,_0x16f6a3,_0x503f06,_0x99c66a)=>{var _0x100200=_0x348b01;for(var _0x73ab2f=_0x99c66a>0x1?void 0x0:_0x99c66a?__getOwnPropDesc$1(_0x16f6a3,_0x503f06):_0x16f6a3,_0x4b9f5b=_0x2728a8[_0x100200(0x1dc)]-0x1,_0x1dbce5;_0x4b9f5b>=0x0;_0x4b9f5b--)(_0x1dbce5=_0x2728a8[_0x4b9f5b])&&(_0x73ab2f=(_0x99c66a?_0x1dbce5(_0x16f6a3,_0x503f06,_0x73ab2f):_0x1dbce5(_0x73ab2f))||_0x73ab2f);return _0x99c66a&&_0x73ab2f&&__defProp$1(_0x16f6a3,_0x503f06,_0x73ab2f),_0x73ab2f;},_0x348b01(0x1b5)),__decorateParam$1=__name((_0x166ba7,_0x1798cf)=>(_0x183d0f,_0x2386b6)=>_0x1798cf(_0x183d0f,_0x2386b6,_0x166ba7),_0x348b01(0x1c7));const DOC_HYPER_LINK_PLUGIN=_0x348b01(0x1ae);var _a;let DocHyperLinkResourceController=(_a=class extends core[_0x348b01(0x1ac)]{constructor(_0x585a47,_0x44242f){var _0x36ddbc=_0x348b01;super(),this['_resourceManagerService']=_0x585a47,this[_0x36ddbc(0x1b8)]=_0x44242f,this['_init']();}[_0x348b01(0x1c9)](){var _0x3e1025=_0x348b01;this[_0x3e1025(0x1d4)][_0x3e1025(0x1a6)]({'pluginName':DOC_HYPER_LINK_PLUGIN,'businesses':[core[_0x3e1025(0x1e8)][_0x3e1025(0x1e0)]],'onLoad':__name((_0x3b0ce0,_0x573fc8)=>{var _0x640699=_0x3e1025;const _0x123498=this[_0x640699(0x1b8)][_0x640699(0x1c0)](_0x3b0ce0,core[_0x640699(0x1e8)][_0x640699(0x1e0)]);if(!_0x123498)return;const _0xfc8469=new Map(),_0x43603f=__name(_0x415551=>{var _0x3fbad8=_0x640699,_0x51d040,_0xfe53c4;return(_0xfe53c4=(_0x51d040=_0x415551[_0x3fbad8(0x1da)]())==null?void 0x0:_0x51d040['customRanges'])==null||_0xfe53c4[_0x3fbad8(0x1d1)](_0x4e8194=>{var _0x2d3c31=_0x3fbad8;_0x4e8194[_0x2d3c31(0x1b6)]===core[_0x2d3c31(0x1df)]['HYPERLINK']&&_0xfc8469[_0x2d3c31(0x1c1)](_0x4e8194['rangeId'],_0x4e8194);}),_0xfc8469;},_0x640699(0x1d5));_0x123498[_0x640699(0x1ce)][_0x640699(0x1d1)](_0x2f2c9e=>{_0x43603f(_0x2f2c9e);}),_0x123498[_0x640699(0x1e3)][_0x640699(0x1d1)](_0x457629=>{_0x43603f(_0x457629);}),_0x43603f(_0x123498),_0x573fc8[_0x640699(0x1dd)][_0x640699(0x1d1)](_0x274764=>{var _0x2e1479=_0x640699;const _0x592c61=_0xfc8469[_0x2e1479(0x1a7)](_0x274764['id']);_0x592c61&&(_0x592c61['properties']={..._0x592c61[_0x2e1479(0x1ad)],'url':_0x274764[_0x2e1479(0x1b0)]});});},_0x3e1025(0x1de)),'onUnLoad':__name(_0x493242=>{},_0x3e1025(0x1b2)),'toJson':__name(_0x48ca28=>{var _0x3a9516=_0x3e1025;const _0x5931f1=this['_univerInstanceService']['getUnit'](_0x48ca28,core[_0x3a9516(0x1e8)]['UNIVER_DOC']),_0x5c06a4=[];if(_0x5931f1){const _0x2def64=__name(_0x292550=>{var _0x33cbee=_0x3a9516,_0x564495,_0x344724;(_0x344724=(_0x564495=_0x292550[_0x33cbee(0x1da)]())==null?void 0x0:_0x564495[_0x33cbee(0x1e5)])==null||_0x344724[_0x33cbee(0x1d1)](_0x567803=>{var _0x2a9c93=_0x33cbee,_0x207de5;_0x567803[_0x2a9c93(0x1b6)]===core['CustomRangeType'][_0x2a9c93(0x1bb)]&&_0x5c06a4[_0x2a9c93(0x1cd)]({'id':_0x567803['rangeId'],'payload':((_0x207de5=_0x567803[_0x2a9c93(0x1ad)])==null?void 0x0:_0x207de5['url'])||''});});},_0x3a9516(0x1d5));_0x5931f1[_0x3a9516(0x1ce)][_0x3a9516(0x1d1)](_0x1cd042=>{_0x2def64(_0x1cd042);}),_0x5931f1['footerModelMap'][_0x3a9516(0x1d1)](_0xfcf3e0=>{_0x2def64(_0xfcf3e0);}),_0x2def64(_0x5931f1);}return JSON[_0x3a9516(0x1d7)]({'links':_0x5c06a4});},_0x3e1025(0x1c5)),'parseJson'(_0x5ce136){var _0x24240e=_0x3e1025;return JSON[_0x24240e(0x1e1)](_0x5ce136);}});}},__name(_a,_0x348b01(0x1bd)),_a);DocHyperLinkResourceController=__decorateClass$1([__decorateParam$1(0x0,core[_0x348b01(0x1cc)](core[_0x348b01(0x1b9)])),__decorateParam$1(0x1,core[_0x348b01(0x1c2)])],DocHyperLinkResourceController);var __defProp2=Object[_0x348b01(0x1e7)],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__decorateClass=__name((_0x759432,_0x3facaa,_0x1127ec,_0x1fcc59)=>{for(var _0x3b27aa=_0x1fcc59>0x1?void 0x0:_0x1fcc59?__getOwnPropDesc(_0x3facaa,_0x1127ec):_0x3facaa,_0x4b1258=_0x759432['length']-0x1,_0x3bfe18;_0x4b1258>=0x0;_0x4b1258--)(_0x3bfe18=_0x759432[_0x4b1258])&&(_0x3b27aa=(_0x1fcc59?_0x3bfe18(_0x3facaa,_0x1127ec,_0x3b27aa):_0x3bfe18(_0x3b27aa))||_0x3b27aa);return _0x1fcc59&&_0x3b27aa&&__defProp2(_0x3facaa,_0x1127ec,_0x3b27aa),_0x3b27aa;},'__decorateClass'),__decorateParam=__name((_0x102750,_0x3c6a07)=>(_0x3252c1,_0x4dc8e6)=>_0x3c6a07(_0x3252c1,_0x4dc8e6,_0x102750),_0x348b01(0x1ba)),_a2;exports[_0x348b01(0x1b7)]=(_a2=class extends core['Plugin']{constructor(_0xf897b3=defaultPluginConfig,_0xca9020,_0x33fc41,_0x36d0bd){var _0x213895=_0x348b01;super(),this[_0x213895(0x1ab)]=_0xf897b3,this[_0x213895(0x1b3)]=_0xca9020,this['_configService']=_0x33fc41,this[_0x213895(0x1a8)]=_0x36d0bd;const {..._0x568246}=this[_0x213895(0x1ab)];this[_0x213895(0x1bc)]['setConfig'](PLUGIN_CONFIG_KEY,_0x568246);}['onStarting'](){var _0x467c3c=_0x348b01;[[DocHyperLinkResourceController]][_0x467c3c(0x1d1)](_0x4d582f=>this[_0x467c3c(0x1b3)]['add'](_0x4d582f)),[AddHyperLinkMuatation,DeleteHyperLinkMuatation,UpdateHyperLinkMuatation]['forEach'](_0x472c8d=>{var _0x27d31f=_0x467c3c;this['disposeWithMe'](this[_0x27d31f(0x1a8)][_0x27d31f(0x1d3)](_0x472c8d));}),this[_0x467c3c(0x1b3)][_0x467c3c(0x1a7)](DocHyperLinkResourceController);}},__name(_a2,_0x348b01(0x1b7)),__publicField(_a2,_0x348b01(0x1b1),DOC_HYPER_LINK_PLUGIN),__publicField(_a2,_0x348b01(0x1d6),core[_0x348b01(0x1e8)][_0x348b01(0x1e0)]),_a2),exports[_0x348b01(0x1b7)]=__decorateClass([__decorateParam(0x1,core[_0x348b01(0x1cc)](core['Injector'])),__decorateParam(0x2,core[_0x348b01(0x1a9)]),__decorateParam(0x3,core[_0x348b01(0x1d8)])],exports[_0x348b01(0x1b7)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1,118 +1 @@
|
|
|
1
|
-
var __defProp =
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
-
import { CommandType, OnLifecycle, LifecycleStages, Inject, IResourceManagerService, Disposable, UniverInstanceType, IUniverInstanceService, CustomRangeType, Plugin, Injector, IConfigService, ICommandService } from "@univerjs/core";
|
|
6
|
-
const AddHyperLinkMuatation = {
|
|
7
|
-
id: "docs.mutation.add-hyper-link",
|
|
8
|
-
type: CommandType.MUTATION,
|
|
9
|
-
handler: /* @__PURE__ */ __name(() => !0, "handler")
|
|
10
|
-
}, UpdateHyperLinkMuatation = {
|
|
11
|
-
id: "docs.mutation.update-hyper-link",
|
|
12
|
-
type: CommandType.MUTATION,
|
|
13
|
-
handler: /* @__PURE__ */ __name(() => !0, "handler")
|
|
14
|
-
}, DeleteHyperLinkMuatation = {
|
|
15
|
-
id: "docs.mutation.delete-hyper-link",
|
|
16
|
-
type: CommandType.MUTATION,
|
|
17
|
-
handler: /* @__PURE__ */ __name(() => !0, "handler")
|
|
18
|
-
}, PLUGIN_CONFIG_KEY = "docs-hyper-link.config", defaultPluginConfig = {};
|
|
19
|
-
var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
20
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
21
|
-
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
22
|
-
return kind && result && __defProp$1(target, key, result), result;
|
|
23
|
-
}, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$1");
|
|
24
|
-
const DOC_HYPER_LINK_PLUGIN = "DOC_HYPER_LINK_PLUGIN";
|
|
25
|
-
var _a;
|
|
26
|
-
let DocHyperLinkResourceController = (_a = class extends Disposable {
|
|
27
|
-
constructor(_resourceManagerService, _univerInstanceService) {
|
|
28
|
-
super(), this._resourceManagerService = _resourceManagerService, this._univerInstanceService = _univerInstanceService, this._init();
|
|
29
|
-
}
|
|
30
|
-
_init() {
|
|
31
|
-
this._resourceManagerService.registerPluginResource({
|
|
32
|
-
pluginName: DOC_HYPER_LINK_PLUGIN,
|
|
33
|
-
businesses: [UniverInstanceType.UNIVER_DOC],
|
|
34
|
-
onLoad: /* @__PURE__ */ __name((unitID, resource) => {
|
|
35
|
-
const doc = this._univerInstanceService.getUnit(unitID, UniverInstanceType.UNIVER_DOC);
|
|
36
|
-
if (!doc)
|
|
37
|
-
return;
|
|
38
|
-
const customRangeMap = /* @__PURE__ */ new Map(), handleDoc = /* @__PURE__ */ __name((model) => {
|
|
39
|
-
var _a3, _b;
|
|
40
|
-
return (_b = (_a3 = model.getBody()) == null ? void 0 : _a3.customRanges) == null || _b.forEach((customRange) => {
|
|
41
|
-
customRange.rangeType === CustomRangeType.HYPERLINK && customRangeMap.set(customRange.rangeId, customRange);
|
|
42
|
-
}), customRangeMap;
|
|
43
|
-
}, "handleDoc");
|
|
44
|
-
doc.headerModelMap.forEach((headerModel) => {
|
|
45
|
-
handleDoc(headerModel);
|
|
46
|
-
}), doc.footerModelMap.forEach((footerModel) => {
|
|
47
|
-
handleDoc(footerModel);
|
|
48
|
-
}), handleDoc(doc), resource.links.forEach((link) => {
|
|
49
|
-
const customRange = customRangeMap.get(link.id);
|
|
50
|
-
customRange && (customRange.properties = {
|
|
51
|
-
...customRange.properties,
|
|
52
|
-
url: link.payload
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}, "onLoad"),
|
|
56
|
-
onUnLoad: /* @__PURE__ */ __name((unitID) => {
|
|
57
|
-
}, "onUnLoad"),
|
|
58
|
-
toJson: /* @__PURE__ */ __name((unitID) => {
|
|
59
|
-
const doc = this._univerInstanceService.getUnit(unitID, UniverInstanceType.UNIVER_DOC), links = [];
|
|
60
|
-
if (doc) {
|
|
61
|
-
const handleDoc = /* @__PURE__ */ __name((model) => {
|
|
62
|
-
var _a3, _b;
|
|
63
|
-
(_b = (_a3 = model.getBody()) == null ? void 0 : _a3.customRanges) == null || _b.forEach((customRange) => {
|
|
64
|
-
var _a4;
|
|
65
|
-
customRange.rangeType === CustomRangeType.HYPERLINK && links.push({
|
|
66
|
-
id: customRange.rangeId,
|
|
67
|
-
payload: ((_a4 = customRange.properties) == null ? void 0 : _a4.url) || ""
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}, "handleDoc");
|
|
71
|
-
doc.headerModelMap.forEach((headerModel) => {
|
|
72
|
-
handleDoc(headerModel);
|
|
73
|
-
}), doc.footerModelMap.forEach((footerModel) => {
|
|
74
|
-
handleDoc(footerModel);
|
|
75
|
-
}), handleDoc(doc);
|
|
76
|
-
}
|
|
77
|
-
return JSON.stringify({ links });
|
|
78
|
-
}, "toJson"),
|
|
79
|
-
parseJson(bytes) {
|
|
80
|
-
return JSON.parse(bytes);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}, __name(_a, "DocHyperLinkResourceController"), _a);
|
|
85
|
-
DocHyperLinkResourceController = __decorateClass$1([
|
|
86
|
-
OnLifecycle(LifecycleStages.Starting, DocHyperLinkResourceController),
|
|
87
|
-
__decorateParam$1(0, Inject(IResourceManagerService)),
|
|
88
|
-
__decorateParam$1(1, IUniverInstanceService)
|
|
89
|
-
], DocHyperLinkResourceController);
|
|
90
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __decorateClass = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
91
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
92
|
-
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
93
|
-
return kind && result && __defProp2(target, key, result), result;
|
|
94
|
-
}, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam"), _a2;
|
|
95
|
-
let UniverDocsHyperLinkPlugin = (_a2 = class extends Plugin {
|
|
96
|
-
constructor(_config = defaultPluginConfig, _injector, _configService, _commandService) {
|
|
97
|
-
super(), this._config = _config, this._injector = _injector, this._configService = _configService, this._commandService = _commandService;
|
|
98
|
-
const { ...rest } = this._config;
|
|
99
|
-
this._configService.setConfig(PLUGIN_CONFIG_KEY, rest);
|
|
100
|
-
}
|
|
101
|
-
onStarting() {
|
|
102
|
-
[
|
|
103
|
-
[DocHyperLinkResourceController]
|
|
104
|
-
].forEach((dep) => {
|
|
105
|
-
this._injector.add(dep);
|
|
106
|
-
}), [AddHyperLinkMuatation, DeleteHyperLinkMuatation, UpdateHyperLinkMuatation].forEach((mutation) => {
|
|
107
|
-
this.disposeWithMe(this._commandService.registerCommand(mutation));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}, __name(_a2, "UniverDocsHyperLinkPlugin"), __publicField(_a2, "pluginName", DOC_HYPER_LINK_PLUGIN), __publicField(_a2, "type", UniverInstanceType.UNIVER_DOC), _a2);
|
|
111
|
-
UniverDocsHyperLinkPlugin = __decorateClass([
|
|
112
|
-
__decorateParam(1, Inject(Injector)),
|
|
113
|
-
__decorateParam(2, IConfigService),
|
|
114
|
-
__decorateParam(3, ICommandService)
|
|
115
|
-
], UniverDocsHyperLinkPlugin);
|
|
116
|
-
export {
|
|
117
|
-
UniverDocsHyperLinkPlugin
|
|
118
|
-
};
|
|
1
|
+
var _0x605044=_0x55b2;(function(_0x463b7f,_0x4d3b3e){var _0x3c4cea=_0x55b2,_0x39e1ed=_0x463b7f();while(!![]){try{var _0x4631ba=-parseInt(_0x3c4cea(0xa1))/0x1+-parseInt(_0x3c4cea(0xa8))/0x2+parseInt(_0x3c4cea(0xbc))/0x3+-parseInt(_0x3c4cea(0x9e))/0x4+parseInt(_0x3c4cea(0x98))/0x5*(-parseInt(_0x3c4cea(0x8c))/0x6)+parseInt(_0x3c4cea(0x94))/0x7+parseInt(_0x3c4cea(0xba))/0x8*(parseInt(_0x3c4cea(0x88))/0x9);if(_0x4631ba===_0x4d3b3e)break;else _0x39e1ed['push'](_0x39e1ed['shift']());}catch(_0x454800){_0x39e1ed['push'](_0x39e1ed['shift']());}}}(_0x3938,0xa05cd));var __defProp=Object[_0x605044(0xb4)],__defNormalProp=(_0x4b19c0,_0x1da28d,_0xb27506)=>_0x1da28d in _0x4b19c0?__defProp(_0x4b19c0,_0x1da28d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb27506}):_0x4b19c0[_0x1da28d]=_0xb27506,__name=(_0x485f2c,_0x45af01)=>__defProp(_0x485f2c,'name',{'value':_0x45af01,'configurable':!0x0}),__publicField=(_0x18fc8c,_0x37df3f,_0x3c8704)=>__defNormalProp(_0x18fc8c,typeof _0x37df3f!='symbol'?_0x37df3f+'':_0x37df3f,_0x3c8704);function _0x55b2(_0x288fa7,_0x34f678){var _0x393827=_0x3938();return _0x55b2=function(_0x55b208,_0x3aeb7b){_0x55b208=_0x55b208-0x84;var _0x27e6ca=_0x393827[_0x55b208];return _0x27e6ca;},_0x55b2(_0x288fa7,_0x34f678);}function _0x3938(){var _0x767357=['onLoad','205YKgnRd','get','DocHyperLinkResourceController','UniverDocsHyperLinkPlugin','url','payload','2569992skzFAO','headerModelMap','handleDoc','784150TzBUgP','_commandService','_univerInstanceService','footerModelMap','length','_injector','getBody','1342108tyoXWQ','docs.mutation.add-hyper-link','properties','handler','UNIVER_DOC','HYPERLINK','customRanges','pluginName','links','push','DOC_HYPER_LINK_PLUGIN','onUnLoad','defineProperty','add','getOwnPropertyDescriptor','stringify','set','_configService','12630488ryyQkA','type','3129408mDUVtJ','getUnit','__decorateParam','_resourceManagerService','parse','forEach','9VXPvgL','registerCommand','__decorateParam$1','onStarting','135918KvPMdn','_init','_config','docs-hyper-link.config','docs.mutation.update-hyper-link','rangeId','setConfig','MUTATION','7429611QPqINI','rangeType','registerPluginResource'];_0x3938=function(){return _0x767357;};return _0x3938();}import{CommandType,Inject,IResourceManagerService,Disposable,UniverInstanceType,IUniverInstanceService,CustomRangeType,Plugin,Injector,IConfigService,ICommandService}from'@univerjs/core';const AddHyperLinkMuatation={'id':_0x605044(0xa9),'type':CommandType[_0x605044(0x93)],'handler':__name(()=>!0x0,_0x605044(0xab))},UpdateHyperLinkMuatation={'id':_0x605044(0x90),'type':CommandType[_0x605044(0x93)],'handler':__name(()=>!0x0,_0x605044(0xab))},DeleteHyperLinkMuatation={'id':'docs.mutation.delete-hyper-link','type':CommandType[_0x605044(0x93)],'handler':__name(()=>!0x0,_0x605044(0xab))},PLUGIN_CONFIG_KEY=_0x605044(0x8f),defaultPluginConfig={};var __defProp$1=Object[_0x605044(0xb4)],__getOwnPropDesc$1=Object[_0x605044(0xb6)],__decorateClass$1=__name((_0x51bfdb,_0x5522ad,_0x5a15b5,_0x63d9fd)=>{var _0x5046d9=_0x605044;for(var _0x366582=_0x63d9fd>0x1?void 0x0:_0x63d9fd?__getOwnPropDesc$1(_0x5522ad,_0x5a15b5):_0x5522ad,_0x36a486=_0x51bfdb[_0x5046d9(0xa5)]-0x1,_0x5d3cf2;_0x36a486>=0x0;_0x36a486--)(_0x5d3cf2=_0x51bfdb[_0x36a486])&&(_0x366582=(_0x63d9fd?_0x5d3cf2(_0x5522ad,_0x5a15b5,_0x366582):_0x5d3cf2(_0x366582))||_0x366582);return _0x63d9fd&&_0x366582&&__defProp$1(_0x5522ad,_0x5a15b5,_0x366582),_0x366582;},'__decorateClass$1'),__decorateParam$1=__name((_0x54e8a4,_0x3860e0)=>(_0x4680ce,_0x1d1161)=>_0x3860e0(_0x4680ce,_0x1d1161,_0x54e8a4),_0x605044(0x8a));const DOC_HYPER_LINK_PLUGIN=_0x605044(0xb2);var _a;let DocHyperLinkResourceController=(_a=class extends Disposable{constructor(_0x332e62,_0x226364){var _0x51b907=_0x605044;super(),this[_0x51b907(0x85)]=_0x332e62,this[_0x51b907(0xa3)]=_0x226364,this['_init']();}[_0x605044(0x8d)](){var _0x46ec21=_0x605044;this[_0x46ec21(0x85)][_0x46ec21(0x96)]({'pluginName':DOC_HYPER_LINK_PLUGIN,'businesses':[UniverInstanceType['UNIVER_DOC']],'onLoad':__name((_0x1e853d,_0x413ad0)=>{var _0x2a418b=_0x46ec21;const _0x32c316=this[_0x2a418b(0xa3)]['getUnit'](_0x1e853d,UniverInstanceType[_0x2a418b(0xac)]);if(!_0x32c316)return;const _0x274088=new Map(),_0x5c304c=__name(_0x472d71=>{var _0x5b357c=_0x2a418b,_0x5ca3a8,_0x4be998;return(_0x4be998=(_0x5ca3a8=_0x472d71[_0x5b357c(0xa7)]())==null?void 0x0:_0x5ca3a8[_0x5b357c(0xae)])==null||_0x4be998['forEach'](_0x484918=>{var _0x59b80d=_0x5b357c;_0x484918[_0x59b80d(0x95)]===CustomRangeType[_0x59b80d(0xad)]&&_0x274088[_0x59b80d(0xb8)](_0x484918[_0x59b80d(0x91)],_0x484918);}),_0x274088;},_0x2a418b(0xa0));_0x32c316[_0x2a418b(0x9f)][_0x2a418b(0x87)](_0x14a557=>{_0x5c304c(_0x14a557);}),_0x32c316[_0x2a418b(0xa4)][_0x2a418b(0x87)](_0x1cab25=>{_0x5c304c(_0x1cab25);}),_0x5c304c(_0x32c316),_0x413ad0[_0x2a418b(0xb0)][_0x2a418b(0x87)](_0x302844=>{var _0x4d1d6d=_0x2a418b;const _0x494baa=_0x274088[_0x4d1d6d(0x99)](_0x302844['id']);_0x494baa&&(_0x494baa['properties']={..._0x494baa['properties'],'url':_0x302844[_0x4d1d6d(0x9d)]});});},_0x46ec21(0x97)),'onUnLoad':__name(_0xad9dce=>{},_0x46ec21(0xb3)),'toJson':__name(_0x546088=>{var _0x2aa76e=_0x46ec21;const _0x3c5bf1=this['_univerInstanceService'][_0x2aa76e(0xbd)](_0x546088,UniverInstanceType[_0x2aa76e(0xac)]),_0x30732d=[];if(_0x3c5bf1){const _0x55cf27=__name(_0x5b249e=>{var _0x4a8d43=_0x2aa76e,_0x4e43e3,_0x55592a;(_0x55592a=(_0x4e43e3=_0x5b249e[_0x4a8d43(0xa7)]())==null?void 0x0:_0x4e43e3[_0x4a8d43(0xae)])==null||_0x55592a[_0x4a8d43(0x87)](_0x20f950=>{var _0x151476=_0x4a8d43,_0x1eb563;_0x20f950[_0x151476(0x95)]===CustomRangeType[_0x151476(0xad)]&&_0x30732d[_0x151476(0xb1)]({'id':_0x20f950[_0x151476(0x91)],'payload':((_0x1eb563=_0x20f950[_0x151476(0xaa)])==null?void 0x0:_0x1eb563[_0x151476(0x9c)])||''});});},'handleDoc');_0x3c5bf1[_0x2aa76e(0x9f)][_0x2aa76e(0x87)](_0x446322=>{_0x55cf27(_0x446322);}),_0x3c5bf1[_0x2aa76e(0xa4)][_0x2aa76e(0x87)](_0x4c4672=>{_0x55cf27(_0x4c4672);}),_0x55cf27(_0x3c5bf1);}return JSON[_0x2aa76e(0xb7)]({'links':_0x30732d});},'toJson'),'parseJson'(_0x3512d2){var _0x3fb457=_0x46ec21;return JSON[_0x3fb457(0x86)](_0x3512d2);}});}},__name(_a,_0x605044(0x9a)),_a);DocHyperLinkResourceController=__decorateClass$1([__decorateParam$1(0x0,Inject(IResourceManagerService)),__decorateParam$1(0x1,IUniverInstanceService)],DocHyperLinkResourceController);var __defProp2=Object[_0x605044(0xb4)],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__decorateClass=__name((_0x871ed8,_0xd853dd,_0x1e5d37,_0x1654ae)=>{var _0x413249=_0x605044;for(var _0x35894a=_0x1654ae>0x1?void 0x0:_0x1654ae?__getOwnPropDesc(_0xd853dd,_0x1e5d37):_0xd853dd,_0x45c2fd=_0x871ed8[_0x413249(0xa5)]-0x1,_0x59c9cc;_0x45c2fd>=0x0;_0x45c2fd--)(_0x59c9cc=_0x871ed8[_0x45c2fd])&&(_0x35894a=(_0x1654ae?_0x59c9cc(_0xd853dd,_0x1e5d37,_0x35894a):_0x59c9cc(_0x35894a))||_0x35894a);return _0x1654ae&&_0x35894a&&__defProp2(_0xd853dd,_0x1e5d37,_0x35894a),_0x35894a;},'__decorateClass'),__decorateParam=__name((_0x4363a8,_0x217c5c)=>(_0x489e77,_0x58ffe9)=>_0x217c5c(_0x489e77,_0x58ffe9,_0x4363a8),_0x605044(0x84)),_a2;let UniverDocsHyperLinkPlugin=(_a2=class extends Plugin{constructor(_0x877d6a=defaultPluginConfig,_0x1e6e74,_0x28127a,_0x4dfcf4){var _0x27a63e=_0x605044;super(),this[_0x27a63e(0x8e)]=_0x877d6a,this['_injector']=_0x1e6e74,this[_0x27a63e(0xb9)]=_0x28127a,this['_commandService']=_0x4dfcf4;const {..._0x4b9596}=this['_config'];this[_0x27a63e(0xb9)][_0x27a63e(0x92)](PLUGIN_CONFIG_KEY,_0x4b9596);}[_0x605044(0x8b)](){var _0xb4eeb9=_0x605044;[[DocHyperLinkResourceController]][_0xb4eeb9(0x87)](_0x33d2db=>this[_0xb4eeb9(0xa6)][_0xb4eeb9(0xb5)](_0x33d2db)),[AddHyperLinkMuatation,DeleteHyperLinkMuatation,UpdateHyperLinkMuatation][_0xb4eeb9(0x87)](_0x33738d=>{var _0x554551=_0xb4eeb9;this['disposeWithMe'](this[_0x554551(0xa2)][_0x554551(0x89)](_0x33738d));}),this[_0xb4eeb9(0xa6)][_0xb4eeb9(0x99)](DocHyperLinkResourceController);}},__name(_a2,_0x605044(0x9b)),__publicField(_a2,_0x605044(0xaf),DOC_HYPER_LINK_PLUGIN),__publicField(_a2,_0x605044(0xbb),UniverInstanceType['UNIVER_DOC']),_a2);UniverDocsHyperLinkPlugin=__decorateClass([__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ICommandService)],UniverDocsHyperLinkPlugin);export{UniverDocsHyperLinkPlugin};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
1
|
import { IUniverDocsHyperLinkConfig } from './controllers/config.schema';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
export declare class UniverDocsHyperLinkPlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
protected _injector: Injector;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5cf3(_0x44d24f,_0x4cd6f7){var _0x19c36e=_0x19c3();return _0x5cf3=function(_0x5cf3a1,_0x178361){_0x5cf3a1=_0x5cf3a1-0x1da;var _0xd89b9e=_0x19c36e[_0x5cf3a1];return _0xd89b9e;},_0x5cf3(_0x44d24f,_0x4cd6f7);}(function(_0x2c8ba7,_0x5209b1){var _0x1bb04a=_0x5cf3,_0x3eef87=_0x2c8ba7();while(!![]){try{var _0x469283=-parseInt(_0x1bb04a(0x1e0))/0x1+-parseInt(_0x1bb04a(0x1dd))/0x2+-parseInt(_0x1bb04a(0x1df))/0x3*(-parseInt(_0x1bb04a(0x1da))/0x4)+-parseInt(_0x1bb04a(0x1f5))/0x5*(-parseInt(_0x1bb04a(0x209))/0x6)+-parseInt(_0x1bb04a(0x20c))/0x7+-parseInt(_0x1bb04a(0x204))/0x8+parseInt(_0x1bb04a(0x214))/0x9*(parseInt(_0x1bb04a(0x1e1))/0xa);if(_0x469283===_0x5209b1)break;else _0x3eef87['push'](_0x3eef87['shift']());}catch(_0xfb596b){_0x3eef87['push'](_0x3eef87['shift']());}}}(_0x19c3,0xe1e14),function(_0x12babd,_0x3faeca){var _0x3b0f5e=_0x5cf3;typeof exports==_0x3b0f5e(0x1f4)&&typeof module<'u'?_0x3faeca(exports,require('@univerjs/core')):typeof define==_0x3b0f5e(0x1f1)&&define['amd']?define([_0x3b0f5e(0x213),_0x3b0f5e(0x207)],_0x3faeca):(_0x12babd=typeof globalThis<'u'?globalThis:_0x12babd||self,_0x3faeca(_0x12babd[_0x3b0f5e(0x212)]={},_0x12babd[_0x3b0f5e(0x201)]));}(this,function(_0x5c668c,_0x15bafa){'use strict';var _0x171a8a=_0x5cf3;var _0xc62bf8=Object['defineProperty'],_0x223912=(_0x31fabe,_0x4e14c1,_0xc6159e)=>_0x4e14c1 in _0x31fabe?_0xc62bf8(_0x31fabe,_0x4e14c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc6159e}):_0x31fabe[_0x4e14c1]=_0xc6159e,_0x4c39d0=(_0xc68f51,_0x283d26)=>_0xc62bf8(_0xc68f51,_0x171a8a(0x215),{'value':_0x283d26,'configurable':!0x0}),_0x58f84d=(_0x48ef11,_0x2363f0,_0xa6e071)=>_0x223912(_0x48ef11,typeof _0x2363f0!=_0x171a8a(0x202)?_0x2363f0+'':_0x2363f0,_0xa6e071),_0x5992a9,_0x31226f;const _0x3e40b3={'id':_0x171a8a(0x20d),'type':_0x15bafa['CommandType']['MUTATION'],'handler':_0x4c39d0(()=>!0x0,_0x171a8a(0x206))},_0xcba8c={'id':_0x171a8a(0x21a),'type':_0x15bafa['CommandType']['MUTATION'],'handler':_0x4c39d0(()=>!0x0,_0x171a8a(0x206))},_0x216f8b={'id':'docs.mutation.delete-hyper-link','type':_0x15bafa['CommandType'][_0x171a8a(0x1ed)],'handler':_0x4c39d0(()=>!0x0,_0x171a8a(0x206))},_0x365e7d=_0x171a8a(0x216),_0x43c8b6={};var _0x3fa525=Object[_0x171a8a(0x1ea)],_0x122ed7=Object[_0x171a8a(0x217)],_0x5655b2=_0x4c39d0((_0x2dcef1,_0x3e3264,_0x281a81,_0x8f0dcb)=>{var _0xf1f354=_0x171a8a;for(var _0x13c6b2=_0x8f0dcb>0x1?void 0x0:_0x8f0dcb?_0x122ed7(_0x3e3264,_0x281a81):_0x3e3264,_0x5a258a=_0x2dcef1[_0xf1f354(0x1f9)]-0x1,_0x472711;_0x5a258a>=0x0;_0x5a258a--)(_0x472711=_0x2dcef1[_0x5a258a])&&(_0x13c6b2=(_0x8f0dcb?_0x472711(_0x3e3264,_0x281a81,_0x13c6b2):_0x472711(_0x13c6b2))||_0x13c6b2);return _0x8f0dcb&&_0x13c6b2&&_0x3fa525(_0x3e3264,_0x281a81,_0x13c6b2),_0x13c6b2;},'__decorateClass$1'),_0x2088e7=_0x4c39d0((_0x48436d,_0x47ae01)=>(_0x3faff7,_0x2c7d4d)=>_0x47ae01(_0x3faff7,_0x2c7d4d,_0x48436d),'__decorateParam$1');const _0x5ca9f4=_0x171a8a(0x1f2);let _0x46b230=(_0x5992a9=class extends _0x15bafa[_0x171a8a(0x20b)]{constructor(_0x1fc7a1,_0x14f198){var _0xb65403=_0x171a8a;super(),this['_resourceManagerService']=_0x1fc7a1,this[_0xb65403(0x1ef)]=_0x14f198,this['_init']();}[_0x171a8a(0x219)](){var _0x21857f=_0x171a8a;this['_resourceManagerService']['registerPluginResource']({'pluginName':_0x5ca9f4,'businesses':[_0x15bafa[_0x21857f(0x210)][_0x21857f(0x208)]],'onLoad':_0x4c39d0((_0x1b5aaf,_0x3a9430)=>{var _0x359a8f=_0x21857f;const _0x40a9bb=this[_0x359a8f(0x1ef)][_0x359a8f(0x1e8)](_0x1b5aaf,_0x15bafa[_0x359a8f(0x210)][_0x359a8f(0x208)]);if(!_0x40a9bb)return;const _0x17a25a=new Map(),_0x13a165=_0x4c39d0(_0x1fa0ff=>{var _0x39e39b=_0x359a8f,_0x16ec32,_0x16007e;return(_0x16007e=(_0x16ec32=_0x1fa0ff[_0x39e39b(0x1ec)]())==null?void 0x0:_0x16ec32[_0x39e39b(0x1e5)])==null||_0x16007e[_0x39e39b(0x21e)](_0x23f4fb=>{var _0x10c58e=_0x39e39b;_0x23f4fb['rangeType']===_0x15bafa[_0x10c58e(0x1e3)][_0x10c58e(0x205)]&&_0x17a25a['set'](_0x23f4fb[_0x10c58e(0x1eb)],_0x23f4fb);}),_0x17a25a;},_0x359a8f(0x20f));_0x40a9bb[_0x359a8f(0x1ee)]['forEach'](_0x17e3fa=>{_0x13a165(_0x17e3fa);}),_0x40a9bb[_0x359a8f(0x21f)][_0x359a8f(0x21e)](_0x521bbc=>{_0x13a165(_0x521bbc);}),_0x13a165(_0x40a9bb),_0x3a9430['links']['forEach'](_0x1423ee=>{var _0x205c29=_0x359a8f;const _0x4cc00a=_0x17a25a[_0x205c29(0x1ff)](_0x1423ee['id']);_0x4cc00a&&(_0x4cc00a['properties']={..._0x4cc00a['properties'],'url':_0x1423ee[_0x205c29(0x21d)]});});},_0x21857f(0x1e4)),'onUnLoad':_0x4c39d0(_0xbe8354=>{},'onUnLoad'),'toJson':_0x4c39d0(_0x2e7c07=>{var _0x24559a=_0x21857f;const _0x1b9294=this[_0x24559a(0x1ef)][_0x24559a(0x1e8)](_0x2e7c07,_0x15bafa[_0x24559a(0x210)][_0x24559a(0x208)]),_0x2a1915=[];if(_0x1b9294){const _0x5599e6=_0x4c39d0(_0x229ceb=>{var _0x520c40=_0x24559a,_0x51e05b,_0x8859d9;(_0x8859d9=(_0x51e05b=_0x229ceb['getBody']())==null?void 0x0:_0x51e05b[_0x520c40(0x1e5)])==null||_0x8859d9[_0x520c40(0x21e)](_0x2d280b=>{var _0x72991e=_0x520c40,_0x341021;_0x2d280b[_0x72991e(0x1fd)]===_0x15bafa[_0x72991e(0x1e3)][_0x72991e(0x205)]&&_0x2a1915[_0x72991e(0x1dc)]({'id':_0x2d280b['rangeId'],'payload':((_0x341021=_0x2d280b[_0x72991e(0x200)])==null?void 0x0:_0x341021[_0x72991e(0x20a)])||''});});},'handleDoc');_0x1b9294[_0x24559a(0x1ee)][_0x24559a(0x21e)](_0x511b73=>{_0x5599e6(_0x511b73);}),_0x1b9294[_0x24559a(0x21f)][_0x24559a(0x21e)](_0x3df701=>{_0x5599e6(_0x3df701);}),_0x5599e6(_0x1b9294);}return JSON[_0x24559a(0x218)]({'links':_0x2a1915});},_0x21857f(0x1fb)),'parseJson'(_0x252c93){var _0x8545a7=_0x21857f;return JSON[_0x8545a7(0x211)](_0x252c93);}});}},_0x4c39d0(_0x5992a9,_0x171a8a(0x1e2)),_0x5992a9);_0x46b230=_0x5655b2([_0x2088e7(0x0,_0x15bafa[_0x171a8a(0x1f8)](_0x15bafa['IResourceManagerService'])),_0x2088e7(0x1,_0x15bafa['IUniverInstanceService'])],_0x46b230);var _0xb343ab=Object[_0x171a8a(0x1ea)],_0x1f566c=Object[_0x171a8a(0x217)],_0x2f086f=_0x4c39d0((_0x388ae7,_0x72252d,_0x4c63db,_0x3f6b5d)=>{for(var _0x2883d4=_0x3f6b5d>0x1?void 0x0:_0x3f6b5d?_0x1f566c(_0x72252d,_0x4c63db):_0x72252d,_0x8146e4=_0x388ae7['length']-0x1,_0x8ede80;_0x8146e4>=0x0;_0x8146e4--)(_0x8ede80=_0x388ae7[_0x8146e4])&&(_0x2883d4=(_0x3f6b5d?_0x8ede80(_0x72252d,_0x4c63db,_0x2883d4):_0x8ede80(_0x2883d4))||_0x2883d4);return _0x3f6b5d&&_0x2883d4&&_0xb343ab(_0x72252d,_0x4c63db,_0x2883d4),_0x2883d4;},_0x171a8a(0x21c)),_0x500c5d=_0x4c39d0((_0x4392dc,_0x47e56c)=>(_0x10a79d,_0x169d0d)=>_0x47e56c(_0x10a79d,_0x169d0d,_0x4392dc),'__decorateParam');_0x5c668c[_0x171a8a(0x1e6)]=(_0x31226f=class extends _0x15bafa[_0x171a8a(0x20e)]{constructor(_0x35a472=_0x43c8b6,_0x3dd3c3,_0x33e3a7,_0x4e5534){var _0x4910d8=_0x171a8a;super(),this[_0x4910d8(0x1db)]=_0x35a472,this[_0x4910d8(0x1e7)]=_0x3dd3c3,this[_0x4910d8(0x1f3)]=_0x33e3a7,this[_0x4910d8(0x220)]=_0x4e5534;const {..._0x54f686}=this[_0x4910d8(0x1db)];this[_0x4910d8(0x1f3)][_0x4910d8(0x203)](_0x365e7d,_0x54f686);}['onStarting'](){var _0x5f136d=_0x171a8a;[[_0x46b230]]['forEach'](_0x3f0970=>this[_0x5f136d(0x1e7)][_0x5f136d(0x1fc)](_0x3f0970)),[_0x3e40b3,_0x216f8b,_0xcba8c][_0x5f136d(0x21e)](_0x111508=>{var _0x349559=_0x5f136d;this[_0x349559(0x1e9)](this['_commandService'][_0x349559(0x1fe)](_0x111508));}),this['_injector'][_0x5f136d(0x1ff)](_0x46b230);}},_0x4c39d0(_0x31226f,_0x171a8a(0x1e6)),_0x58f84d(_0x31226f,_0x171a8a(0x1f6),_0x5ca9f4),_0x58f84d(_0x31226f,_0x171a8a(0x1fa),_0x15bafa[_0x171a8a(0x210)][_0x171a8a(0x208)]),_0x31226f),_0x5c668c['UniverDocsHyperLinkPlugin']=_0x2f086f([_0x500c5d(0x1,_0x15bafa['Inject'](_0x15bafa['Injector'])),_0x500c5d(0x2,_0x15bafa[_0x171a8a(0x1de)]),_0x500c5d(0x3,_0x15bafa[_0x171a8a(0x1f7)])],_0x5c668c[_0x171a8a(0x1e6)]),Object[_0x171a8a(0x1ea)](_0x5c668c,Symbol[_0x171a8a(0x1f0)],{'value':_0x171a8a(0x21b)});}));function _0x19c3(){var _0x37474c=['disposeWithMe','defineProperty','rangeId','getBody','MUTATION','headerModelMap','_univerInstanceService','toStringTag','function','DOC_HYPER_LINK_PLUGIN','_configService','object','35CWMQas','pluginName','ICommandService','Inject','length','type','toJson','add','rangeType','registerCommand','get','properties','UniverCore','symbol','setConfig','6176632kUQOlm','HYPERLINK','handler','@univerjs/core','UNIVER_DOC','1082826wNEUGK','url','Disposable','9670213cTKTlu','docs.mutation.add-hyper-link','Plugin','handleDoc','UniverInstanceType','parse','UniverDocsHyperLink','exports','899901zlrsdu','name','docs-hyper-link.config','getOwnPropertyDescriptor','stringify','_init','docs.mutation.update-hyper-link','Module','__decorateClass','payload','forEach','footerModelMap','_commandService','34764McSGif','_config','push','2344934qFsYTJ','IConfigService','399ddcCGc','467738oiWkGc','230DBHoXN','DocHyperLinkResourceController','CustomRangeType','onLoad','customRanges','UniverDocsHyperLinkPlugin','_injector','getUnit'];_0x19c3=function(){return _0x37474c;};return _0x19c3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/docs-hyper-link",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-nightly.202410101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Univer thread comment plugin",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"lib"
|
|
45
45
|
],
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@univerjs/core": "0.3.0-
|
|
47
|
+
"@univerjs/core": "0.3.0-nightly.202410101606"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@univerjs/icons": "^0.1.78",
|
|
51
|
-
"@univerjs/core": "0.3.0-
|
|
51
|
+
"@univerjs/core": "0.3.0-nightly.202410101606"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"rxjs": "^7.8.1",
|
|
55
55
|
"typescript": "^5.6.2",
|
|
56
56
|
"vite": "^5.4.8",
|
|
57
57
|
"vitest": "^2.1.1",
|
|
58
|
-
"@univerjs-infra/shared": "0.3.0
|
|
58
|
+
"@univerjs-infra/shared": "0.3.0"
|
|
59
59
|
},
|
|
60
60
|
"univerSpace": {
|
|
61
61
|
".": {
|
package/LICENSE
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|