@univerjs/sheets-hyper-link 0.6.3 → 0.6.4-nightly.202503101606
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 +221 -221
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (r, e, t) =>
|
|
4
|
-
import { Disposable as
|
|
5
|
-
import { Subject as
|
|
6
|
-
import { getSheetCommandTarget as j, RefRangeService as
|
|
7
|
-
import { deserializeRangeWithSheet as Ce, serializeRange as B, IDefinedNamesService as
|
|
8
|
-
import { addCustomRangeBySelectionFactory as
|
|
9
|
-
var
|
|
10
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var We = (r, e, t) => e in r ? Ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var w = (r, e, t) => We(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Disposable as T, ObjectMatrix as Z, UniverInstanceType as I, IUniverInstanceService as k, CommandType as E, CustomRangeType as U, Inject as M, ICommandService as b, sequenceExecuteAsync as Be, isValidRange as Se, toDisposable as je, DisposableCollection as Fe, Rectangle as Ke, Range as Ye, Tools as de, BuildTextUtils as Q, generateRandomId as ce, TextX as le, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ge, IResourceManagerService as ze, IUndoRedoService as ve, CellValueType as Ie, sequenceExecute as Y, getBodySlice as Pe, LocaleService as Je, DependentOn as Xe, Injector as qe, IConfigService as Ze, Plugin as Qe, merge as et, registerDependencies as tt, touchDependencies as nt } from "@univerjs/core";
|
|
5
|
+
import { Subject as rt } from "rxjs";
|
|
6
|
+
import { getSheetCommandTarget as j, RefRangeService as De, SheetsSelectionsService as Oe, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests as st, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests as it, SheetInterceptorService as ue, RemoveSheetCommand as at, handleDefaultRangeChangeWithEffectRefCommands as ot, SetRangeValuesMutation as x, SetRangeValuesCommand as dt, ClearSelectionContentCommand as ct, ClearSelectionAllCommand as lt, ClearSelectionFormatCommand as ut, AFTER_CELL_EDIT as pt, SetRangeValuesUndoMutationFactory as Me, UniverSheetsPlugin as ht } from "@univerjs/sheets";
|
|
7
|
+
import { deserializeRangeWithSheet as Ce, serializeRange as B, IDefinedNamesService as gt, serializeRangeWithSheet as ft } from "@univerjs/engine-formula";
|
|
8
|
+
import { addCustomRangeBySelectionFactory as _t, deleteCustomRangeFactory as mt, replaceSelectionFactory as He } from "@univerjs/docs";
|
|
9
|
+
var yt = Object.getOwnPropertyDescriptor, Rt = (r, e, t, n) => {
|
|
10
|
+
for (var s = n > 1 ? void 0 : n ? yt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
11
11
|
(a = r[i]) && (s = a(s) || s);
|
|
12
12
|
return s;
|
|
13
|
-
},
|
|
14
|
-
let v = class extends
|
|
13
|
+
}, St = (r, e) => (t, n) => e(t, n, r);
|
|
14
|
+
let v = class extends T {
|
|
15
15
|
constructor(e) {
|
|
16
16
|
super();
|
|
17
|
-
w(this, "_linkUpdate$", new
|
|
17
|
+
w(this, "_linkUpdate$", new rt());
|
|
18
18
|
w(this, "linkUpdate$", this._linkUpdate$.asObservable());
|
|
19
19
|
w(this, "_linkMap", /* @__PURE__ */ new Map());
|
|
20
20
|
w(this, "_linkPositionMap", /* @__PURE__ */ new Map());
|
|
@@ -28,7 +28,7 @@ let v = class extends V {
|
|
|
28
28
|
let n = this._linkMap.get(e);
|
|
29
29
|
n || (n = /* @__PURE__ */ new Map(), this._linkMap.set(e, n));
|
|
30
30
|
let s = n.get(t);
|
|
31
|
-
s || (s = new
|
|
31
|
+
s || (s = new Z(), n.set(t, s));
|
|
32
32
|
let i = this._linkPositionMap.get(e);
|
|
33
33
|
i || (i = /* @__PURE__ */ new Map(), this._linkPositionMap.set(e, i));
|
|
34
34
|
let a = i.get(t);
|
|
@@ -137,11 +137,11 @@ let v = class extends V {
|
|
|
137
137
|
return Array.from(this._linkMap.keys()).map((t) => this.getUnit(t));
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
v =
|
|
141
|
-
|
|
140
|
+
v = Rt([
|
|
141
|
+
St(0, k)
|
|
142
142
|
], v);
|
|
143
143
|
var L = /* @__PURE__ */ ((r) => (r.SHEET = "gid", r.RANGE = "range", r.DEFINE_NAME = "rangeid", r.INVALID = "invalid", r.URL = "url", r))(L || {});
|
|
144
|
-
const
|
|
144
|
+
const vt = "sheets-hyper-link.config", Ue = {}, P = {
|
|
145
145
|
type: E.MUTATION,
|
|
146
146
|
id: "sheets.mutation.add-hyper-link",
|
|
147
147
|
handler(r, e) {
|
|
@@ -159,7 +159,7 @@ const St = "sheets-hyper-link.config", Le = {}, P = {
|
|
|
159
159
|
const t = r.get(v), { unitId: n, subUnitId: s, id: i } = e;
|
|
160
160
|
return t.removeHyperLink(n, s, i);
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, me = {
|
|
163
163
|
type: E.MUTATION,
|
|
164
164
|
id: "sheets.mutation.update-hyper-link",
|
|
165
165
|
handler(r, e) {
|
|
@@ -168,7 +168,7 @@ const St = "sheets-hyper-link.config", Le = {}, P = {
|
|
|
168
168
|
const t = r.get(v), { unitId: n, subUnitId: s, payload: i, id: a } = e;
|
|
169
169
|
return t.updateHyperLink(n, s, a, i, !1);
|
|
170
170
|
}
|
|
171
|
-
},
|
|
171
|
+
}, ye = {
|
|
172
172
|
type: E.MUTATION,
|
|
173
173
|
id: "sheets.mutation.update-hyper-link-ref",
|
|
174
174
|
handler(r, e) {
|
|
@@ -177,7 +177,7 @@ const St = "sheets-hyper-link.config", Le = {}, P = {
|
|
|
177
177
|
const t = r.get(v), { unitId: n, subUnitId: s, id: i, row: a, column: o, silent: c } = e;
|
|
178
178
|
return t.updateHyperLinkRef(n, s, i, { row: a, column: o }, c);
|
|
179
179
|
}
|
|
180
|
-
},
|
|
180
|
+
}, q = {
|
|
181
181
|
type: E.MUTATION,
|
|
182
182
|
id: "sheets.mutation.update-rich-hyper-link",
|
|
183
183
|
handler(r, e) {
|
|
@@ -190,13 +190,13 @@ const St = "sheets-hyper-link.config", Le = {}, P = {
|
|
|
190
190
|
const { worksheet: l } = d, u = l.getCellRaw(s, i), h = (f = (p = (g = u == null ? void 0 : u.p) == null ? void 0 : g.body) == null ? void 0 : p.customRanges) == null ? void 0 : f.find((_) => _.rangeType === U.HYPERLINK && _.rangeId === a);
|
|
191
191
|
return h && (h.properties.url = o), !0;
|
|
192
192
|
}
|
|
193
|
-
},
|
|
194
|
-
var
|
|
195
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
193
|
+
}, Ve = "SHEET_HYPER_LINK_PLUGIN", ee = "err";
|
|
194
|
+
var It = Object.getOwnPropertyDescriptor, Mt = (r, e, t, n) => {
|
|
195
|
+
for (var s = n > 1 ? void 0 : n ? It(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
196
196
|
(a = r[i]) && (s = a(s) || s);
|
|
197
197
|
return s;
|
|
198
|
-
},
|
|
199
|
-
let
|
|
198
|
+
}, J = (r, e) => (t, n) => e(t, n, r);
|
|
199
|
+
let te = class extends T {
|
|
200
200
|
constructor(e, t, n, s) {
|
|
201
201
|
super();
|
|
202
202
|
w(this, "_disposableMap", /* @__PURE__ */ new Map());
|
|
@@ -212,7 +212,7 @@ let ee = class extends V {
|
|
|
212
212
|
};
|
|
213
213
|
return s ? {
|
|
214
214
|
redos: [{
|
|
215
|
-
id:
|
|
215
|
+
id: ye.id,
|
|
216
216
|
params: {
|
|
217
217
|
unitId: e,
|
|
218
218
|
subUnitId: t,
|
|
@@ -223,7 +223,7 @@ let ee = class extends V {
|
|
|
223
223
|
}
|
|
224
224
|
}],
|
|
225
225
|
undos: [{
|
|
226
|
-
id:
|
|
226
|
+
id: ye.id,
|
|
227
227
|
params: {
|
|
228
228
|
unitId: e,
|
|
229
229
|
subUnitId: t,
|
|
@@ -261,7 +261,7 @@ let ee = class extends V {
|
|
|
261
261
|
startRow: n.row,
|
|
262
262
|
endRow: n.row
|
|
263
263
|
}, a = (o) => {
|
|
264
|
-
const c =
|
|
264
|
+
const c = st(i, o, { selectionManagerService: this._selectionManagerService }), d = Array.isArray(c) ? c[0] : c;
|
|
265
265
|
return d && d.startColumn === i.startColumn && d.startRow === i.startRow ? {
|
|
266
266
|
undos: [],
|
|
267
267
|
redos: []
|
|
@@ -278,7 +278,7 @@ let ee = class extends V {
|
|
|
278
278
|
};
|
|
279
279
|
this._watchDisposableMap.set(s, this._refRangeService.watchRange(e, t, i, (a, o) => {
|
|
280
280
|
const { redos: c } = this._handlePositionChange(e, t, n, o, !0);
|
|
281
|
-
|
|
281
|
+
Be(c, this._commandService, { onlyLocal: !0 });
|
|
282
282
|
}, !0));
|
|
283
283
|
}
|
|
284
284
|
_unregisterPosition(e) {
|
|
@@ -299,15 +299,15 @@ let ee = class extends V {
|
|
|
299
299
|
};
|
|
300
300
|
if (d.range && d.gid) {
|
|
301
301
|
const l = d.gid, u = Ce(d.range).range;
|
|
302
|
-
if (Se(u) && d.range !==
|
|
302
|
+
if (Se(u) && d.range !== ee) {
|
|
303
303
|
const h = (g) => {
|
|
304
|
-
const p =
|
|
304
|
+
const p = it(u, g, { selectionManagerService: this._selectionManagerService });
|
|
305
305
|
return p && B(p) === B(u) ? {
|
|
306
306
|
redos: [],
|
|
307
307
|
undos: []
|
|
308
308
|
} : {
|
|
309
309
|
redos: [{
|
|
310
|
-
id:
|
|
310
|
+
id: me.id,
|
|
311
311
|
params: {
|
|
312
312
|
unitId: e,
|
|
313
313
|
subUnitId: l,
|
|
@@ -318,7 +318,7 @@ let ee = class extends V {
|
|
|
318
318
|
}
|
|
319
319
|
}],
|
|
320
320
|
undos: [{
|
|
321
|
-
id:
|
|
321
|
+
id: me.id,
|
|
322
322
|
params: {
|
|
323
323
|
unitId: e,
|
|
324
324
|
subUnitId: l,
|
|
@@ -392,25 +392,25 @@ let ee = class extends V {
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
})
|
|
395
|
-
), this.disposeWithMe(
|
|
395
|
+
), this.disposeWithMe(je(() => {
|
|
396
396
|
this._disposableMap.forEach((e) => {
|
|
397
397
|
e.dispose();
|
|
398
398
|
}), this._disposableMap.clear();
|
|
399
399
|
}));
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
],
|
|
408
|
-
var
|
|
409
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
402
|
+
te = Mt([
|
|
403
|
+
J(0, M(De)),
|
|
404
|
+
J(1, M(v)),
|
|
405
|
+
J(2, M(Oe)),
|
|
406
|
+
J(3, b)
|
|
407
|
+
], te);
|
|
408
|
+
var Ct = Object.getOwnPropertyDescriptor, wt = (r, e, t, n) => {
|
|
409
|
+
for (var s = n > 1 ? void 0 : n ? Ct(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
410
410
|
(a = r[i]) && (s = a(s) || s);
|
|
411
411
|
return s;
|
|
412
|
-
},
|
|
413
|
-
let
|
|
412
|
+
}, ge = (r, e) => (t, n) => e(t, n, r);
|
|
413
|
+
let ne = class extends T {
|
|
414
414
|
constructor(r, e, t) {
|
|
415
415
|
super(), this._sheetInterceptorService = r, this._univerInstanceService = e, this._hyperLinkModel = t, this._initSheetChange();
|
|
416
416
|
}
|
|
@@ -419,7 +419,7 @@ let te = class extends V {
|
|
|
419
419
|
this._sheetInterceptorService.interceptCommand({
|
|
420
420
|
getMutations: (r) => {
|
|
421
421
|
var e;
|
|
422
|
-
if (r.id ===
|
|
422
|
+
if (r.id === at.id) {
|
|
423
423
|
const t = r.params, n = t.unitId ? this._univerInstanceService.getUnit(t.unitId) : this._univerInstanceService.getCurrentUnitForType(I.UNIVER_SHEET);
|
|
424
424
|
if (!n)
|
|
425
425
|
return { redos: [], undos: [] };
|
|
@@ -449,17 +449,17 @@ let te = class extends V {
|
|
|
449
449
|
);
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
],
|
|
457
|
-
var
|
|
458
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
452
|
+
ne = wt([
|
|
453
|
+
ge(0, M(ue)),
|
|
454
|
+
ge(1, k),
|
|
455
|
+
ge(2, M(v))
|
|
456
|
+
], ne);
|
|
457
|
+
var kt = Object.getOwnPropertyDescriptor, Et = (r, e, t, n) => {
|
|
458
|
+
for (var s = n > 1 ? void 0 : n ? kt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
459
459
|
(a = r[i]) && (s = a(s) || s);
|
|
460
460
|
return s;
|
|
461
|
-
},
|
|
462
|
-
let
|
|
461
|
+
}, fe = (r, e) => (t, n) => e(t, n, r);
|
|
462
|
+
let re = class extends T {
|
|
463
463
|
constructor(e, t, n) {
|
|
464
464
|
super();
|
|
465
465
|
w(this, "_refRangeMap", /* @__PURE__ */ new Map());
|
|
@@ -469,7 +469,7 @@ let ne = class extends V {
|
|
|
469
469
|
let n = this._refRangeMap.get(e);
|
|
470
470
|
n || (n = /* @__PURE__ */ new Map(), this._refRangeMap.set(e, n));
|
|
471
471
|
let s = n.get(t);
|
|
472
|
-
return s || (s = new
|
|
472
|
+
return s || (s = new Z(), n.set(t, s)), s;
|
|
473
473
|
}
|
|
474
474
|
_isLegalRangeUrl(e, t) {
|
|
475
475
|
var s, i, a;
|
|
@@ -487,7 +487,7 @@ let ne = class extends V {
|
|
|
487
487
|
if (!l)
|
|
488
488
|
return null;
|
|
489
489
|
const u = Ce(c.range).range;
|
|
490
|
-
if (Se(u, l) && c.range !==
|
|
490
|
+
if (Se(u, l) && c.range !== ee)
|
|
491
491
|
return {
|
|
492
492
|
range: u,
|
|
493
493
|
worksheet: l
|
|
@@ -503,7 +503,7 @@ let ne = class extends V {
|
|
|
503
503
|
var h;
|
|
504
504
|
return u.rangeType === U.HYPERLINK && this._isLegalRangeUrl(e, (h = u.properties) == null ? void 0 : h.url);
|
|
505
505
|
})) {
|
|
506
|
-
const u = new
|
|
506
|
+
const u = new Fe();
|
|
507
507
|
let h = !1;
|
|
508
508
|
(l = (d = i.body) == null ? void 0 : d.customRanges) == null || l.forEach((g) => {
|
|
509
509
|
var p;
|
|
@@ -515,26 +515,26 @@ let ne = class extends V {
|
|
|
515
515
|
this._refRangeService.registerRefRange(
|
|
516
516
|
m,
|
|
517
517
|
(y) => {
|
|
518
|
-
const R =
|
|
519
|
-
return R &&
|
|
518
|
+
const R = ot(m, y);
|
|
519
|
+
return R && Ke.equals(R, m) ? {
|
|
520
520
|
preRedos: [],
|
|
521
521
|
preUndos: [],
|
|
522
522
|
redos: [],
|
|
523
523
|
undos: []
|
|
524
524
|
} : {
|
|
525
525
|
preRedos: [{
|
|
526
|
-
id:
|
|
526
|
+
id: q.id,
|
|
527
527
|
params: {
|
|
528
528
|
unitId: e,
|
|
529
529
|
subUnitId: t,
|
|
530
530
|
row: n,
|
|
531
531
|
col: s,
|
|
532
532
|
id: g.rangeId,
|
|
533
|
-
url: `#gid=${t}&range=${R ? B(R) :
|
|
533
|
+
url: `#gid=${t}&range=${R ? B(R) : ee}`
|
|
534
534
|
}
|
|
535
535
|
}],
|
|
536
536
|
undos: [{
|
|
537
|
-
id:
|
|
537
|
+
id: q.id,
|
|
538
538
|
params: {
|
|
539
539
|
unitId: e,
|
|
540
540
|
subUnitId: t,
|
|
@@ -591,9 +591,9 @@ let ne = class extends V {
|
|
|
591
591
|
_initSetRangesListener() {
|
|
592
592
|
this.disposeWithMe(
|
|
593
593
|
this._commandService.onCommandExecuted((e) => {
|
|
594
|
-
if (e.id ===
|
|
594
|
+
if (e.id === x.id) {
|
|
595
595
|
const t = e.params, { unitId: n, subUnitId: s, cellValue: i } = t, a = this._enusreMap(n, s);
|
|
596
|
-
i && new
|
|
596
|
+
i && new Z(i).forValue((o, c, d) => {
|
|
597
597
|
const l = a.getValue(o, c);
|
|
598
598
|
l && l.dispose(), d && d.p && this._registerRange(n, s, o, c, d.p);
|
|
599
599
|
});
|
|
@@ -601,7 +601,7 @@ let ne = class extends V {
|
|
|
601
601
|
})
|
|
602
602
|
), this.disposeWithMe(
|
|
603
603
|
this._commandService.onCommandExecuted((e) => {
|
|
604
|
-
if (e.id ===
|
|
604
|
+
if (e.id === q.id) {
|
|
605
605
|
const t = e.params, { unitId: n, subUnitId: s, row: i, col: a } = t, o = j(this._univerInstanceService, { unitId: n, subUnitId: s }), d = this._enusreMap(n, s).getValue(i, a);
|
|
606
606
|
if (d && d.dispose(), o) {
|
|
607
607
|
const { worksheet: l } = o, u = l.getCellRaw(i, a);
|
|
@@ -612,17 +612,17 @@ let ne = class extends V {
|
|
|
612
612
|
);
|
|
613
613
|
}
|
|
614
614
|
};
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
],
|
|
620
|
-
var
|
|
621
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
615
|
+
re = Et([
|
|
616
|
+
fe(0, b),
|
|
617
|
+
fe(1, k),
|
|
618
|
+
fe(2, M(De))
|
|
619
|
+
], re);
|
|
620
|
+
var Lt = Object.getOwnPropertyDescriptor, Ut = (r, e, t, n) => {
|
|
621
|
+
for (var s = n > 1 ? void 0 : n ? Lt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
622
622
|
(a = r[i]) && (s = a(s) || s);
|
|
623
623
|
return s;
|
|
624
|
-
},
|
|
625
|
-
let
|
|
624
|
+
}, X = (r, e) => (t, n) => e(t, n, r);
|
|
625
|
+
let se = class extends T {
|
|
626
626
|
constructor(r, e, t, n) {
|
|
627
627
|
super(), this._sheetInterceptorService = r, this._hyperLinkModel = e, this._selectionManagerService = t, this._univerInstanceService = n, this._initCommandInterceptor(), this._initAfterEditor();
|
|
628
628
|
}
|
|
@@ -632,9 +632,9 @@ let re = class extends V {
|
|
|
632
632
|
_initSetRangeValuesCommandInterceptor() {
|
|
633
633
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
634
634
|
getMutations: (r) => {
|
|
635
|
-
if (r.id ===
|
|
635
|
+
if (r.id === dt.id) {
|
|
636
636
|
const e = r.params, { unitId: t, subUnitId: n } = e, s = [], i = [];
|
|
637
|
-
return e.cellValue && new
|
|
637
|
+
return e.cellValue && new Z(e.cellValue).forValue((a, o) => {
|
|
638
638
|
const c = this._hyperLinkModel.getHyperLinkByLocation(t, n, a, o);
|
|
639
639
|
c && (s.push({
|
|
640
640
|
id: D.id,
|
|
@@ -666,11 +666,11 @@ let re = class extends V {
|
|
|
666
666
|
_initClearSelectionCommandInterceptor() {
|
|
667
667
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
668
668
|
getMutations: (r) => {
|
|
669
|
-
if (r.id ===
|
|
669
|
+
if (r.id === ct.id || r.id === lt.id || r.id === ut.id) {
|
|
670
670
|
const e = [], t = [], n = this._selectionManagerService.getCurrentLastSelection(), s = j(this._univerInstanceService);
|
|
671
671
|
if (n && s) {
|
|
672
672
|
const { unitId: i, subUnitId: a } = s;
|
|
673
|
-
|
|
673
|
+
Ye.foreach(n.range, (o, c) => {
|
|
674
674
|
const d = this._hyperLinkModel.getHyperLinkByLocation(i, a, o, c);
|
|
675
675
|
d && (e.push({
|
|
676
676
|
id: D.id,
|
|
@@ -702,18 +702,18 @@ let re = class extends V {
|
|
|
702
702
|
}));
|
|
703
703
|
}
|
|
704
704
|
_initAfterEditor() {
|
|
705
|
-
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
705
|
+
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(pt, {
|
|
706
706
|
handler: (r, e, t) => {
|
|
707
707
|
if (!r || r.p)
|
|
708
708
|
return t(r);
|
|
709
|
-
if (typeof r.v == "string" &&
|
|
709
|
+
if (typeof r.v == "string" && de.isLegalUrl(r.v) && r.v[r.v.length - 1] !== " ") {
|
|
710
710
|
const { unitId: n, subUnitId: s } = e, i = this._univerInstanceService.getUnit(n, I.UNIVER_SHEET), a = i == null ? void 0 : i.getSheetBySheetId(s);
|
|
711
711
|
if (!a)
|
|
712
712
|
return t(r);
|
|
713
713
|
const o = a.getBlankCellDocumentModel(r);
|
|
714
714
|
if (!o.documentModel)
|
|
715
715
|
return t(r);
|
|
716
|
-
const c =
|
|
716
|
+
const c = Q.selection.replace({
|
|
717
717
|
selection: {
|
|
718
718
|
startOffset: 0,
|
|
719
719
|
endOffset: r.v.length,
|
|
@@ -724,7 +724,7 @@ let re = class extends V {
|
|
|
724
724
|
customRanges: [{
|
|
725
725
|
startIndex: 0,
|
|
726
726
|
endIndex: r.v.length - 1,
|
|
727
|
-
rangeId:
|
|
727
|
+
rangeId: ce(),
|
|
728
728
|
rangeType: U.HYPERLINK,
|
|
729
729
|
properties: {
|
|
730
730
|
url: r.v
|
|
@@ -736,10 +736,10 @@ let re = class extends V {
|
|
|
736
736
|
if (!c)
|
|
737
737
|
return t(r);
|
|
738
738
|
const d = o.documentModel.getBody();
|
|
739
|
-
return
|
|
739
|
+
return le.apply(d, c.serialize()), t({
|
|
740
740
|
...r,
|
|
741
741
|
p: {
|
|
742
|
-
id:
|
|
742
|
+
id: Ge,
|
|
743
743
|
body: d,
|
|
744
744
|
documentStyle: {
|
|
745
745
|
pageSize: {
|
|
@@ -755,18 +755,18 @@ let re = class extends V {
|
|
|
755
755
|
}));
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
],
|
|
764
|
-
var
|
|
765
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
758
|
+
se = Ut([
|
|
759
|
+
X(0, M(ue)),
|
|
760
|
+
X(1, M(v)),
|
|
761
|
+
X(2, M(Oe)),
|
|
762
|
+
X(3, k)
|
|
763
|
+
], se);
|
|
764
|
+
var xe = /* @__PURE__ */ ((r) => (r[r.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", r[r.UNIVER_DOC = 1] = "UNIVER_DOC", r[r.UNIVER_SHEET = 2] = "UNIVER_SHEET", r[r.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", r[r.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(xe || {}), bt = Object.getOwnPropertyDescriptor, Nt = (r, e, t, n) => {
|
|
765
|
+
for (var s = n > 1 ? void 0 : n ? bt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
766
766
|
(a = r[i]) && (s = a(s) || s);
|
|
767
767
|
return s;
|
|
768
|
-
},
|
|
769
|
-
let
|
|
768
|
+
}, be = (r, e) => (t, n) => e(t, n, r);
|
|
769
|
+
let ie = class extends T {
|
|
770
770
|
constructor(r, e) {
|
|
771
771
|
super(), this._resourceManagerService = r, this._hyperLinkModel = e, this._initSnapshot();
|
|
772
772
|
}
|
|
@@ -787,8 +787,8 @@ let se = class extends V {
|
|
|
787
787
|
};
|
|
788
788
|
this.disposeWithMe(
|
|
789
789
|
this._resourceManagerService.registerPluginResource({
|
|
790
|
-
pluginName:
|
|
791
|
-
businesses: [
|
|
790
|
+
pluginName: Ve,
|
|
791
|
+
businesses: [xe.UNIVER_SHEET],
|
|
792
792
|
toJson: (t) => r(t),
|
|
793
793
|
parseJson: (t) => e(t),
|
|
794
794
|
onUnLoad: (t) => {
|
|
@@ -805,22 +805,22 @@ let se = class extends V {
|
|
|
805
805
|
);
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
],
|
|
812
|
-
const
|
|
808
|
+
ie = Nt([
|
|
809
|
+
be(0, ze),
|
|
810
|
+
be(1, M(v))
|
|
811
|
+
], ie);
|
|
812
|
+
const Pt = {
|
|
813
813
|
type: E.COMMAND,
|
|
814
814
|
id: "sheets.command.add-hyper-link",
|
|
815
815
|
// eslint-disable-next-line max-lines-per-function
|
|
816
816
|
async handler(r, e) {
|
|
817
817
|
if (!e) return !1;
|
|
818
|
-
const t = r.get(b), n = r.get(ve), s = r.get(k), i = r.get(v), a = r.get(
|
|
818
|
+
const t = r.get(b), n = r.get(ve), s = r.get(k), i = r.get(v), a = r.get(ue), o = j(s, e);
|
|
819
819
|
if (!o) return !1;
|
|
820
|
-
const { unitId: c, subUnitId: d, workbook: l, worksheet: u } = o, { link: h } = e, { payload: g, display: p, row: f, column: _, id: m } = h, C = u.getCell(f, _), y = u.getBlankCellDocumentModel(C), R = y.documentModel.getSnapshot(), S =
|
|
820
|
+
const { unitId: c, subUnitId: d, workbook: l, worksheet: u } = o, { link: h } = e, { payload: g, display: p, row: f, column: _, id: m } = h, C = u.getCell(f, _), y = u.getBlankCellDocumentModel(C), R = y.documentModel.getSnapshot(), S = de.deepClone(R.body);
|
|
821
821
|
if (!S) return !1;
|
|
822
822
|
let N;
|
|
823
|
-
if (p ? N =
|
|
823
|
+
if (p ? N = Q.selection.replace({
|
|
824
824
|
selection: {
|
|
825
825
|
startOffset: 0,
|
|
826
826
|
endOffset: S.dataStream.length - 2,
|
|
@@ -840,7 +840,7 @@ const Nt = {
|
|
|
840
840
|
}]
|
|
841
841
|
},
|
|
842
842
|
doc: y.documentModel
|
|
843
|
-
}) : N =
|
|
843
|
+
}) : N = Q.customRange.add({
|
|
844
844
|
body: S,
|
|
845
845
|
ranges: [{ startOffset: 0, endOffset: S.dataStream.length - 2, collapsed: !1 }],
|
|
846
846
|
rangeId: m,
|
|
@@ -850,54 +850,54 @@ const Nt = {
|
|
|
850
850
|
refId: m
|
|
851
851
|
}
|
|
852
852
|
}), !N) return !1;
|
|
853
|
-
const F =
|
|
853
|
+
const F = le.apply(S, N.serialize()), O = {
|
|
854
854
|
p: {
|
|
855
855
|
...R,
|
|
856
856
|
body: F
|
|
857
857
|
},
|
|
858
858
|
t: Ie.STRING
|
|
859
|
-
},
|
|
859
|
+
}, A = a.onWriteCell(l, u, f, _, O), W = {
|
|
860
860
|
unitId: c,
|
|
861
861
|
subUnitId: d,
|
|
862
862
|
cellValue: {
|
|
863
863
|
[h.row]: {
|
|
864
|
-
[h.column]:
|
|
864
|
+
[h.column]: A
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
},
|
|
868
|
-
id:
|
|
869
|
-
params:
|
|
870
|
-
},
|
|
871
|
-
id:
|
|
872
|
-
params:
|
|
873
|
-
}, K = [
|
|
874
|
-
return
|
|
867
|
+
}, pe = {
|
|
868
|
+
id: x.id,
|
|
869
|
+
params: W
|
|
870
|
+
}, G = Me(r, W), he = {
|
|
871
|
+
id: x.id,
|
|
872
|
+
params: G
|
|
873
|
+
}, K = [pe], H = [he], V = i.getHyperLinkByLocation(c, d, f, _);
|
|
874
|
+
return V && (K.push({
|
|
875
875
|
id: D.id,
|
|
876
876
|
params: {
|
|
877
877
|
unitId: c,
|
|
878
878
|
subUnitId: d,
|
|
879
|
-
id:
|
|
879
|
+
id: V.id
|
|
880
880
|
}
|
|
881
|
-
}),
|
|
881
|
+
}), H.push({
|
|
882
882
|
id: P.id,
|
|
883
883
|
params: {
|
|
884
884
|
unitId: c,
|
|
885
885
|
subUnitId: d,
|
|
886
|
-
link:
|
|
886
|
+
link: V
|
|
887
887
|
}
|
|
888
|
-
})), await
|
|
888
|
+
})), await Y(K, t) ? await a.onValidateCell(l, u, f, _) === !1 ? (Y(H, t), !1) : (n.pushUndoRedo({
|
|
889
889
|
redoMutations: K,
|
|
890
|
-
undoMutations:
|
|
890
|
+
undoMutations: H,
|
|
891
891
|
unitID: c
|
|
892
892
|
}), !0) : !1;
|
|
893
893
|
}
|
|
894
|
-
},
|
|
894
|
+
}, Dt = {
|
|
895
895
|
id: "sheets.command.add-rich-hyper-link",
|
|
896
896
|
type: E.COMMAND,
|
|
897
897
|
handler: async (r, e) => {
|
|
898
898
|
if (!e)
|
|
899
899
|
return !1;
|
|
900
|
-
const { documentId: t, link: n } = e, s = r.get(b), i =
|
|
900
|
+
const { documentId: t, link: n } = e, s = r.get(b), i = ce(), { payload: a } = n, o = _t(r, {
|
|
901
901
|
unitId: t,
|
|
902
902
|
rangeId: i,
|
|
903
903
|
rangeType: U.HYPERLINK,
|
|
@@ -908,12 +908,12 @@ const Nt = {
|
|
|
908
908
|
});
|
|
909
909
|
return o ? s.syncExecuteCommand(o.id, o.params) : !1;
|
|
910
910
|
}
|
|
911
|
-
},
|
|
911
|
+
}, Ot = {
|
|
912
912
|
type: E.COMMAND,
|
|
913
913
|
id: "sheets.command.cancel-hyper-link",
|
|
914
914
|
// eslint-disable-next-line max-lines-per-function
|
|
915
915
|
handler(r, e) {
|
|
916
|
-
var O,
|
|
916
|
+
var O, A;
|
|
917
917
|
if (!e) return !1;
|
|
918
918
|
const t = r.get(b), n = r.get(ve), s = r.get(k), i = r.get(v), a = j(s, e);
|
|
919
919
|
if (!a) return !1;
|
|
@@ -921,11 +921,11 @@ const Nt = {
|
|
|
921
921
|
if (!g) return !1;
|
|
922
922
|
const p = h.getCellDocumentModelWithFormula(g);
|
|
923
923
|
if (!(p != null && p.documentModel)) return !1;
|
|
924
|
-
const f =
|
|
924
|
+
const f = de.deepClone(p.documentModel.getSnapshot()), _ = (A = (O = f.body) == null ? void 0 : O.customRanges) == null ? void 0 : A.find((W) => `${W.rangeId}` === d);
|
|
925
925
|
if (!_) return !1;
|
|
926
|
-
const m =
|
|
926
|
+
const m = Q.customRange.delete({ documentDataModel: p.documentModel, rangeId: _.rangeId });
|
|
927
927
|
if (!m) return !1;
|
|
928
|
-
const C =
|
|
928
|
+
const C = le.apply(f.body, m.serialize()), y = [], R = [], S = {
|
|
929
929
|
unitId: l,
|
|
930
930
|
subUnitId: u,
|
|
931
931
|
cellValue: {
|
|
@@ -941,12 +941,12 @@ const Nt = {
|
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
943
|
y.push({
|
|
944
|
-
id:
|
|
944
|
+
id: x.id,
|
|
945
945
|
params: S
|
|
946
946
|
});
|
|
947
947
|
const N = Me(r, S);
|
|
948
948
|
R.push({
|
|
949
|
-
id:
|
|
949
|
+
id: x.id,
|
|
950
950
|
params: N
|
|
951
951
|
});
|
|
952
952
|
const F = i.getHyperLinkByLocation(l, u, o, c);
|
|
@@ -966,13 +966,13 @@ const Nt = {
|
|
|
966
966
|
...F
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
})),
|
|
969
|
+
})), Y(y, t).result ? (n.pushUndoRedo({
|
|
970
970
|
redoMutations: y,
|
|
971
971
|
undoMutations: R,
|
|
972
972
|
unitID: l
|
|
973
973
|
}), !0) : !1;
|
|
974
974
|
}
|
|
975
|
-
},
|
|
975
|
+
}, Ht = {
|
|
976
976
|
type: E.COMMAND,
|
|
977
977
|
id: "sheets.command.cancel-rich-hyper-link",
|
|
978
978
|
handler(r, e) {
|
|
@@ -984,17 +984,17 @@ const Nt = {
|
|
|
984
984
|
o && o.endIndex === a.getBody().dataStream.length - 3 && (c = {
|
|
985
985
|
dataStream: " "
|
|
986
986
|
});
|
|
987
|
-
const d =
|
|
987
|
+
const d = mt(r, { unitId: n, rangeId: t, insert: c });
|
|
988
988
|
return d ? s.syncExecuteCommand(d.id, d.params) : !1;
|
|
989
989
|
}
|
|
990
|
-
},
|
|
990
|
+
}, Vt = {
|
|
991
991
|
type: E.COMMAND,
|
|
992
992
|
id: "sheets.command.update-hyper-link",
|
|
993
993
|
// eslint-disable-next-line max-lines-per-function
|
|
994
994
|
async handler(r, e) {
|
|
995
995
|
var we, ke, Ee;
|
|
996
996
|
if (!e) return !1;
|
|
997
|
-
const t = r.get(b), n = r.get(ve), s = r.get(k), i = r.get(v), a = r.get(
|
|
997
|
+
const t = r.get(b), n = r.get(ve), s = r.get(k), i = r.get(v), a = r.get(ue), o = j(s, {
|
|
998
998
|
unitId: e.unitId,
|
|
999
999
|
subUnitId: e.subUnitId
|
|
1000
1000
|
});
|
|
@@ -1003,11 +1003,11 @@ const Nt = {
|
|
|
1003
1003
|
if (!C) return !1;
|
|
1004
1004
|
const y = g.getCellDocumentModelWithFormula(C);
|
|
1005
1005
|
if (!(y != null && y.documentModel)) return !1;
|
|
1006
|
-
const R = y.documentModel.getSnapshot(), S = (ke = (we = R.body) == null ? void 0 : we.customRanges) == null ? void 0 : ke.find((
|
|
1006
|
+
const R = y.documentModel.getSnapshot(), S = (ke = (we = R.body) == null ? void 0 : we.customRanges) == null ? void 0 : ke.find((Le) => `${Le.rangeId}` === u);
|
|
1007
1007
|
if (!S) return !1;
|
|
1008
|
-
const N =
|
|
1009
|
-
|
|
1010
|
-
const O =
|
|
1008
|
+
const N = ce(), $ = (Ee = Pe(y.documentModel.getBody(), S.startIndex, S.endIndex + 1).textRuns) == null ? void 0 : Ee[0];
|
|
1009
|
+
$ && ($.ed = m.length + 1);
|
|
1010
|
+
const O = He(r, {
|
|
1011
1011
|
unitId: p,
|
|
1012
1012
|
body: {
|
|
1013
1013
|
dataStream: `${m}`,
|
|
@@ -1020,7 +1020,7 @@ const Nt = {
|
|
|
1020
1020
|
url: _
|
|
1021
1021
|
}
|
|
1022
1022
|
}],
|
|
1023
|
-
textRuns:
|
|
1023
|
+
textRuns: $ ? [$] : void 0
|
|
1024
1024
|
},
|
|
1025
1025
|
selection: {
|
|
1026
1026
|
startOffset: S.startIndex,
|
|
@@ -1031,48 +1031,48 @@ const Nt = {
|
|
|
1031
1031
|
});
|
|
1032
1032
|
if (!O)
|
|
1033
1033
|
return !1;
|
|
1034
|
-
const
|
|
1034
|
+
const A = le.apply(de.deepClone(R.body), O.textX.serialize()), W = {
|
|
1035
1035
|
p: {
|
|
1036
1036
|
...R,
|
|
1037
|
-
body:
|
|
1037
|
+
body: A
|
|
1038
1038
|
},
|
|
1039
1039
|
t: Ie.STRING
|
|
1040
|
-
},
|
|
1041
|
-
id:
|
|
1040
|
+
}, pe = a.onWriteCell(h, g, d, l, W), G = {
|
|
1041
|
+
id: x.id,
|
|
1042
1042
|
params: {
|
|
1043
1043
|
unitId: p,
|
|
1044
1044
|
subUnitId: f,
|
|
1045
1045
|
cellValue: {
|
|
1046
1046
|
[d]: {
|
|
1047
|
-
[l]:
|
|
1047
|
+
[l]: pe
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
},
|
|
1052
|
-
id:
|
|
1053
|
-
params:
|
|
1054
|
-
},
|
|
1055
|
-
return
|
|
1051
|
+
}, he = Me(r, G.params), K = {
|
|
1052
|
+
id: x.id,
|
|
1053
|
+
params: he
|
|
1054
|
+
}, H = [G], V = [K], z = i.getHyperLinkByLocation(p, f, d, l);
|
|
1055
|
+
return z && (H.push({
|
|
1056
1056
|
id: D.id,
|
|
1057
1057
|
params: {
|
|
1058
1058
|
unitId: p,
|
|
1059
1059
|
subUnitId: f,
|
|
1060
|
-
id:
|
|
1060
|
+
id: z.id
|
|
1061
1061
|
}
|
|
1062
|
-
}),
|
|
1062
|
+
}), V.push({
|
|
1063
1063
|
id: P.id,
|
|
1064
1064
|
params: {
|
|
1065
1065
|
unitId: p,
|
|
1066
1066
|
subUnitId: f,
|
|
1067
|
-
link:
|
|
1067
|
+
link: z
|
|
1068
1068
|
}
|
|
1069
|
-
})), await
|
|
1070
|
-
redoMutations:
|
|
1071
|
-
undoMutations:
|
|
1069
|
+
})), Y(H, t) ? await a.onValidateCell(h, g, d, l) === !1 ? (Y(V, t), !1) : (n.pushUndoRedo({
|
|
1070
|
+
redoMutations: H,
|
|
1071
|
+
undoMutations: V,
|
|
1072
1072
|
unitID: p
|
|
1073
1073
|
}), !0) : !1;
|
|
1074
1074
|
}
|
|
1075
|
-
},
|
|
1075
|
+
}, xt = {
|
|
1076
1076
|
type: E.COMMAND,
|
|
1077
1077
|
id: "sheets.command.update-rich-hyper-link",
|
|
1078
1078
|
handler: (r, e) => {
|
|
@@ -1085,9 +1085,9 @@ const Nt = {
|
|
|
1085
1085
|
const c = (f = (p = o.getBody()) == null ? void 0 : p.customRanges) == null ? void 0 : f.find((C) => C.rangeId === s);
|
|
1086
1086
|
if (!c)
|
|
1087
1087
|
return !1;
|
|
1088
|
-
const d = (_ = e.payload.display) != null ? _ : "", l =
|
|
1088
|
+
const d = (_ = e.payload.display) != null ? _ : "", l = ce(), h = (m = Pe(o.getBody(), c.startIndex, c.endIndex + 1).textRuns) == null ? void 0 : m[0];
|
|
1089
1089
|
h && (h.ed = d.length + 1);
|
|
1090
|
-
const g =
|
|
1090
|
+
const g = He(r, {
|
|
1091
1091
|
unitId: t,
|
|
1092
1092
|
body: {
|
|
1093
1093
|
dataStream: `${d}`,
|
|
@@ -1112,42 +1112,42 @@ const Nt = {
|
|
|
1112
1112
|
return g ? a.syncExecuteCommand(g.id, g.params) : !1;
|
|
1113
1113
|
}
|
|
1114
1114
|
};
|
|
1115
|
-
var
|
|
1116
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1115
|
+
var Tt = Object.getOwnPropertyDescriptor, $t = (r, e, t, n) => {
|
|
1116
|
+
for (var s = n > 1 ? void 0 : n ? Tt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
1117
1117
|
(a = r[i]) && (s = a(s) || s);
|
|
1118
1118
|
return s;
|
|
1119
|
-
},
|
|
1120
|
-
let
|
|
1119
|
+
}, At = (r, e) => (t, n) => e(t, n, r);
|
|
1120
|
+
let ae = class extends T {
|
|
1121
1121
|
constructor(r) {
|
|
1122
1122
|
super(), this._commandService = r, this._registerCommands();
|
|
1123
1123
|
}
|
|
1124
1124
|
_registerCommands() {
|
|
1125
1125
|
[
|
|
1126
|
-
|
|
1127
|
-
Ht,
|
|
1128
|
-
Dt,
|
|
1126
|
+
Pt,
|
|
1129
1127
|
Vt,
|
|
1130
1128
|
Ot,
|
|
1131
|
-
|
|
1129
|
+
xt,
|
|
1130
|
+
Ht,
|
|
1131
|
+
Dt,
|
|
1132
1132
|
P,
|
|
1133
|
-
_e,
|
|
1134
|
-
D,
|
|
1135
1133
|
me,
|
|
1136
|
-
|
|
1134
|
+
D,
|
|
1135
|
+
ye,
|
|
1136
|
+
q
|
|
1137
1137
|
].forEach((r) => {
|
|
1138
1138
|
this._commandService.registerCommand(r);
|
|
1139
1139
|
});
|
|
1140
1140
|
}
|
|
1141
1141
|
};
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
],
|
|
1145
|
-
var
|
|
1146
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1142
|
+
ae = $t([
|
|
1143
|
+
At(0, b)
|
|
1144
|
+
], ae);
|
|
1145
|
+
var Wt = Object.getOwnPropertyDescriptor, Bt = (r, e, t, n) => {
|
|
1146
|
+
for (var s = n > 1 ? void 0 : n ? Wt(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
1147
1147
|
(a = r[i]) && (s = a(s) || s);
|
|
1148
1148
|
return s;
|
|
1149
|
-
},
|
|
1150
|
-
let
|
|
1149
|
+
}, _e = (r, e) => (t, n) => e(t, n, r);
|
|
1150
|
+
let Re = class {
|
|
1151
1151
|
constructor(r, e, t) {
|
|
1152
1152
|
this._univerInstanceService = r, this._localeService = e, this._definedNamesService = t;
|
|
1153
1153
|
}
|
|
@@ -1189,9 +1189,9 @@ let ye = class {
|
|
|
1189
1189
|
if (t) {
|
|
1190
1190
|
if (!o) return a;
|
|
1191
1191
|
const l = Ce(t).range;
|
|
1192
|
-
return Se(l, o) && t !==
|
|
1192
|
+
return Se(l, o) && t !== ee ? {
|
|
1193
1193
|
type: L.RANGE,
|
|
1194
|
-
name:
|
|
1194
|
+
name: ft(c, l)
|
|
1195
1195
|
} : a;
|
|
1196
1196
|
}
|
|
1197
1197
|
if (n) {
|
|
@@ -1211,67 +1211,67 @@ let ye = class {
|
|
|
1211
1211
|
return a;
|
|
1212
1212
|
}
|
|
1213
1213
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
],
|
|
1219
|
-
var
|
|
1220
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1214
|
+
Re = Bt([
|
|
1215
|
+
_e(0, k),
|
|
1216
|
+
_e(1, M(Je)),
|
|
1217
|
+
_e(2, gt)
|
|
1218
|
+
], Re);
|
|
1219
|
+
var jt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, Kt = (r, e, t) => e in r ? jt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Yt = (r, e, t, n) => {
|
|
1220
|
+
for (var s = n > 1 ? void 0 : n ? Ft(e, t) : e, i = r.length - 1, a; i >= 0; i--)
|
|
1221
1221
|
(a = r[i]) && (s = a(s) || s);
|
|
1222
1222
|
return s;
|
|
1223
|
-
},
|
|
1224
|
-
let
|
|
1225
|
-
constructor(r =
|
|
1223
|
+
}, Ne = (r, e) => (t, n) => e(t, n, r), Te = (r, e, t) => Kt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
1224
|
+
let oe = class extends Qe {
|
|
1225
|
+
constructor(r = Ue, e, t) {
|
|
1226
1226
|
super(), this._config = r, this._injector = e, this._configService = t;
|
|
1227
|
-
const { ...n } =
|
|
1227
|
+
const { ...n } = et(
|
|
1228
1228
|
{},
|
|
1229
|
-
|
|
1229
|
+
Ue,
|
|
1230
1230
|
this._config
|
|
1231
1231
|
);
|
|
1232
|
-
this._configService.setConfig(
|
|
1232
|
+
this._configService.setConfig(vt, n);
|
|
1233
1233
|
}
|
|
1234
1234
|
onStarting() {
|
|
1235
|
-
|
|
1235
|
+
tt(this._injector, [
|
|
1236
1236
|
[v],
|
|
1237
|
-
[
|
|
1238
|
-
[se],
|
|
1237
|
+
[Re],
|
|
1239
1238
|
[ie],
|
|
1240
|
-
[
|
|
1241
|
-
[re],
|
|
1239
|
+
[ae],
|
|
1242
1240
|
[te],
|
|
1243
|
-
[ne]
|
|
1244
|
-
]), tt(this._injector, [
|
|
1245
|
-
[ee],
|
|
1246
1241
|
[se],
|
|
1247
|
-
[
|
|
1248
|
-
[re]
|
|
1242
|
+
[ne],
|
|
1243
|
+
[re]
|
|
1244
|
+
]), nt(this._injector, [
|
|
1249
1245
|
[te],
|
|
1250
|
-
[
|
|
1246
|
+
[ie],
|
|
1247
|
+
[ae],
|
|
1248
|
+
[se],
|
|
1249
|
+
[ne],
|
|
1250
|
+
[re]
|
|
1251
1251
|
]);
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
],
|
|
1254
|
+
Te(oe, "pluginName", Ve);
|
|
1255
|
+
Te(oe, "type", I.UNIVER_SHEET);
|
|
1256
|
+
oe = Yt([
|
|
1257
|
+
Xe(ht),
|
|
1258
|
+
Ne(1, M(qe)),
|
|
1259
|
+
Ne(2, Ze)
|
|
1260
|
+
], oe);
|
|
1261
1261
|
export {
|
|
1262
|
-
|
|
1262
|
+
Pt as AddHyperLinkCommand,
|
|
1263
1263
|
P as AddHyperLinkMutation,
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1264
|
+
Dt as AddRichHyperLinkCommand,
|
|
1265
|
+
Ot as CancelHyperLinkCommand,
|
|
1266
|
+
Ht as CancelRichHyperLinkCommand,
|
|
1267
|
+
ee as ERROR_RANGE,
|
|
1268
1268
|
v as HyperLinkModel,
|
|
1269
1269
|
D as RemoveHyperLinkMutation,
|
|
1270
1270
|
L as SheetHyperLinkType,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1271
|
+
Re as SheetsHyperLinkParserService,
|
|
1272
|
+
oe as UniverSheetsHyperLinkPlugin,
|
|
1273
|
+
Vt as UpdateHyperLinkCommand,
|
|
1274
|
+
me as UpdateHyperLinkMutation,
|
|
1275
|
+
ye as UpdateHyperLinkRefMutation,
|
|
1276
|
+
xt as UpdateRichHyperLinkCommand
|
|
1277
1277
|
};
|