@univerjs/sheets-hyper-link-ui 0.5.1 → 0.5.2
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/facade.js +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/es/facade.js +12 -1
- package/lib/es/index.js +399 -394
- package/lib/index.css +1 -1
- package/lib/types/facade/index.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +17 -17
package/lib/es/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var B = (t, e, n) =>
|
|
4
|
-
import { Tools as Ie, Inject as R, LocaleService as ct, UniverInstanceType as O, isValidRange as
|
|
5
|
-
import { SheetHyperLinkType as S, ERROR_RANGE as
|
|
6
|
-
import { ScrollToRangeOperation as
|
|
1
|
+
var rr = Object.defineProperty;
|
|
2
|
+
var ir = (t, e, n) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => ir(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Tools as Ie, Inject as R, LocaleService as ct, UniverInstanceType as O, isValidRange as Rn, IUniverInstanceService as K, ICommandService as ie, IConfigService as Ln, RANGE_TYPE as sn, Rectangle as ye, Injector as lt, Disposable as Y, Range as Pn, ObjectMatrix as sr, useDependency as E, IContextService as bn, ThemeService as or, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as cr, FOCUSING_SHEET as It, generateRandomId as lr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ce, DataValidationType as Ct, CommandType as ut, FOCUSING_FX_BAR_EDITOR as ur, IPermissionService as dr, InterceptorEffectEnum as pr, DependentOn as hr, Plugin as gr, merge as mr } from "@univerjs/core";
|
|
5
|
+
import { SheetHyperLinkType as S, ERROR_RANGE as fr, HyperLinkModel as dt, RemoveHyperLinkMutation as Ue, AddHyperLinkMutation as He, SheetsHyperLinkParserService as kt, UpdateRichHyperLinkCommand as vr, UpdateHyperLinkCommand as _r, AddRichHyperLinkCommand as Sr, AddHyperLinkCommand as Ir, CancelRichHyperLinkCommand as Cr, CancelHyperLinkCommand as yr, UniverSheetsHyperLinkPlugin as Er } from "@univerjs/sheets-hyper-link";
|
|
6
|
+
import { ScrollToRangeOperation as wn, COPY_TYPE as Rr, virtualizeDiscreteRanges as Lt, rangeToDiscreteRange as Lr, PREDEFINED_HOOK_NAME as Be, getRepeatRange as Pr, ISheetClipboardService as br, IEditorBridgeService as re, IMarkSelectionService as wr, SheetCanvasPopManagerService as Or, getEditingCustomRangePosition as kr, getCustomRangePosition as Tr, whenSheetEditorFocused as xr, getCurrentRangeDisable$ as Nr, IAutoFillService as Mr, APPLY_TYPE as Oe, getAutoFillRepeatRange as Ur, SheetPermissionInterceptorBaseController as On, HoverManagerService as Hr, HoverRenderController as Dr, SheetSkeletonManagerService as an } from "@univerjs/sheets-ui";
|
|
7
7
|
import { MessageType as xe, FormLayout as ve, Input as cn, Select as yt, Button as ln, Tooltip as Ae } from "@univerjs/design";
|
|
8
|
-
import { deserializeRangeWithSheet as Fe, IDefinedNamesService as
|
|
9
|
-
import { SetSelectionsOperation as
|
|
10
|
-
import { IMessageService as
|
|
11
|
-
import { DocSelectionRenderService as
|
|
8
|
+
import { deserializeRangeWithSheet as Fe, IDefinedNamesService as kn, serializeRangeWithSheet as $r, serializeRangeToRefString as jr, serializeRange as Br } from "@univerjs/engine-formula";
|
|
9
|
+
import { SetSelectionsOperation as Tn, SetWorksheetActiveOperation as xn, SheetsSelectionsService as Tt, getSheetCommandTarget as Nn, WorkbookEditablePermission as xt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as Mn, WorksheetInsertHyperlinkPermission as Mt, RangeProtectionPermissionEditPoint as Ut, WorkbookViewPermission as Ar, WorksheetViewPermission as Vr, RangeProtectionPermissionViewPoint as Fr, WorkbookCopyPermission as Wr, WorksheetCopyPermission as Zr, ClearSelectionContentCommand as Gr, ClearSelectionAllCommand as Kr, ClearSelectionFormatCommand as Yr, SheetInterceptorService as zr, INTERCEPTOR_POINT as qr } from "@univerjs/sheets";
|
|
10
|
+
import { IMessageService as Un, useObservable as Jr, IZenZoneService as pt, useEvent as Xr, KeyCode as Pt, MenuItemType as Hn, MetaKeys as Qr, getMenuHiddenObservable as ht, RibbonStartGroup as ei, ContextMenuPosition as ti, ContextMenuGroup as ni, ComponentManager as ri, IShortcutService as ii, IMenuManagerService as si } from "@univerjs/ui";
|
|
11
|
+
import { DocSelectionRenderService as Dn, DocBackScrollRenderController as oi, DocCanvasPopManagerService as ai, calcDocRangePositions as ci, DocEventManagerService as un, UniverDocsUIPlugin as li } from "@univerjs/docs-ui";
|
|
12
12
|
import { IRenderManagerService as $e } from "@univerjs/engine-render";
|
|
13
|
-
import { Subject as
|
|
13
|
+
import { Subject as ui, BehaviorSubject as di, of as Ne, map as le, filter as dn, switchMap as ue, combineLatest as pi, distinctUntilChanged as hi, debounceTime as We, Observable as gi } from "rxjs";
|
|
14
14
|
import { DocSelectionManagerService as De } from "@univerjs/docs";
|
|
15
|
-
import
|
|
16
|
-
import { RangeSelector as
|
|
15
|
+
import mi, { useState as J, useMemo as pn, useRef as bt, useCallback as fi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
|
|
16
|
+
import { RangeSelector as vi } from "@univerjs/sheets-formula-ui";
|
|
17
17
|
import { SheetDataValidationModel as hn } from "@univerjs/sheets-data-validation";
|
|
18
18
|
function Ke(t) {
|
|
19
19
|
return Ie.isLegalUrl(t);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function _i(t) {
|
|
22
22
|
return /^[a-zA-Z]+:\/\//.test(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Si(t) {
|
|
25
25
|
return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ii(t) {
|
|
28
28
|
if (Ke(t)) {
|
|
29
|
-
const e =
|
|
29
|
+
const e = _i(t) ? t : Si(t) ? `mailto://${t}` : `http://${t}`;
|
|
30
30
|
let n;
|
|
31
31
|
try {
|
|
32
32
|
n = new URL(e);
|
|
@@ -37,24 +37,24 @@ function _i(t) {
|
|
|
37
37
|
}
|
|
38
38
|
return t;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
var
|
|
42
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
43
|
-
(
|
|
44
|
-
return i && r &&
|
|
40
|
+
const $n = "sheets-hyper-link-ui.config", gn = {};
|
|
41
|
+
var Ci = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ei = (t, e, n, i) => {
|
|
42
|
+
for (var r = i > 1 ? void 0 : i ? yi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
43
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
44
|
+
return i && r && Ci(e, n, r), r;
|
|
45
45
|
}, _e = (t, e) => (n, i) => e(n, i, t);
|
|
46
|
-
function
|
|
46
|
+
function Ri(t, e) {
|
|
47
47
|
const n = e.getMergeData(), i = e.getMaxColumns() - 1, r = e.getMaxRows() - 1;
|
|
48
|
-
if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType ===
|
|
48
|
+
if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === sn.COLUMN || sn.ROW)
|
|
49
49
|
return t;
|
|
50
|
-
const
|
|
51
|
-
return n.forEach((
|
|
52
|
-
ye.intersects(t,
|
|
53
|
-
}), ye.realUnion(t, ...
|
|
50
|
+
const o = [];
|
|
51
|
+
return n.forEach((s) => {
|
|
52
|
+
ye.intersects(t, s) && o.push(s);
|
|
53
|
+
}), ye.realUnion(t, ...o);
|
|
54
54
|
}
|
|
55
55
|
let pe = class {
|
|
56
|
-
constructor(t, e, n, i, r,
|
|
57
|
-
this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService =
|
|
56
|
+
constructor(t, e, n, i, r, o) {
|
|
57
|
+
this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService = o;
|
|
58
58
|
}
|
|
59
59
|
navigate(t) {
|
|
60
60
|
switch (t.type) {
|
|
@@ -69,12 +69,12 @@ let pe = class {
|
|
|
69
69
|
const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET);
|
|
70
70
|
if (!r)
|
|
71
71
|
return;
|
|
72
|
-
const
|
|
72
|
+
const o = r.getUnitId();
|
|
73
73
|
if (i) {
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
74
|
+
const s = this._definedNamesService.getValueById(o, i);
|
|
75
|
+
if (!s)
|
|
76
76
|
return;
|
|
77
|
-
const { formulaOrRefString: c } =
|
|
77
|
+
const { formulaOrRefString: c } = s, l = this._definedNamesService.getWorksheetByRef(o, c);
|
|
78
78
|
if (!l) {
|
|
79
79
|
this._messageService.show({
|
|
80
80
|
content: this._localeService.t("hyperLink.message.refError"),
|
|
@@ -89,32 +89,33 @@ let pe = class {
|
|
|
89
89
|
});
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
this.navigateToDefineName(
|
|
92
|
+
this.navigateToDefineName(o, i);
|
|
93
93
|
}
|
|
94
94
|
if (e) {
|
|
95
95
|
if (n) {
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const s = Fe(n);
|
|
97
|
+
Rn(s.range) && n !== fr && this.navigateToRange(o, e, s.range);
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
this.navigateToSheetById(
|
|
100
|
+
this.navigateToSheetById(o, e);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
async navigateToRange(t, e, n, i) {
|
|
104
104
|
const r = await this.navigateToSheetById(t, e);
|
|
105
105
|
if (r) {
|
|
106
|
-
const
|
|
106
|
+
const o = Ri(n, r);
|
|
107
107
|
await this._commandService.executeCommand(
|
|
108
|
-
|
|
108
|
+
Tn.id,
|
|
109
109
|
{
|
|
110
110
|
unitId: t,
|
|
111
111
|
subUnitId: e,
|
|
112
112
|
selections: [{
|
|
113
|
-
range:
|
|
113
|
+
range: o,
|
|
114
|
+
primary: null
|
|
114
115
|
}]
|
|
115
116
|
}
|
|
116
|
-
), await this._commandService.executeCommand(
|
|
117
|
-
range:
|
|
117
|
+
), await this._commandService.executeCommand(wn.id, {
|
|
118
|
+
range: o,
|
|
118
119
|
forceTop: i
|
|
119
120
|
});
|
|
120
121
|
}
|
|
@@ -132,7 +133,7 @@ let pe = class {
|
|
|
132
133
|
return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
|
|
133
134
|
content: this._localeService.t("hyperLink.message.hiddenSheet"),
|
|
134
135
|
type: xe.Error
|
|
135
|
-
}), !1) : await this._commandService.executeCommand(
|
|
136
|
+
}), !1) : await this._commandService.executeCommand(xn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
|
|
136
137
|
content: this._localeService.t("hyperLink.message.noSheet"),
|
|
137
138
|
type: xe.Error
|
|
138
139
|
}), !1);
|
|
@@ -142,25 +143,25 @@ let pe = class {
|
|
|
142
143
|
}
|
|
143
144
|
async navigateToOtherWebsite(t) {
|
|
144
145
|
var n;
|
|
145
|
-
const e = this._configService.getConfig(
|
|
146
|
+
const e = this._configService.getConfig($n);
|
|
146
147
|
if ((n = e == null ? void 0 : e.urlHandler) != null && n.navigateToOtherWebsite)
|
|
147
148
|
return e.urlHandler.navigateToOtherWebsite(t);
|
|
148
149
|
window.open(t, "_blank", "noopener noreferrer");
|
|
149
150
|
}
|
|
150
151
|
};
|
|
151
|
-
pe =
|
|
152
|
+
pe = Ei([
|
|
152
153
|
_e(0, K),
|
|
153
154
|
_e(1, ie),
|
|
154
|
-
_e(2,
|
|
155
|
-
_e(3,
|
|
155
|
+
_e(2, kn),
|
|
156
|
+
_e(3, Un),
|
|
156
157
|
_e(4, R(ct)),
|
|
157
|
-
_e(5,
|
|
158
|
+
_e(5, Ln)
|
|
158
159
|
], pe);
|
|
159
160
|
const Ht = "SHEET_HYPER_LINK_UI_PLUGIN";
|
|
160
|
-
var
|
|
161
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
162
|
-
(
|
|
163
|
-
return i && r &&
|
|
161
|
+
var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, bi = (t, e, n, i) => {
|
|
162
|
+
for (var r = i > 1 ? void 0 : i ? Pi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
163
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
164
|
+
return i && r && Li(e, n, r), r;
|
|
164
165
|
}, Ve = (t, e) => (n, i) => e(n, i, t);
|
|
165
166
|
let Ye = class extends Y {
|
|
166
167
|
constructor(e, n, i, r) {
|
|
@@ -186,27 +187,27 @@ let Ye = class extends Y {
|
|
|
186
187
|
id: Ht,
|
|
187
188
|
onBeforeCopy: (e, n, i) => this._collect(e, n, i),
|
|
188
189
|
onPasteCells: (e, n, i, r) => {
|
|
189
|
-
const { copyType:
|
|
190
|
-
return this._generateMutations(l, { copyType:
|
|
190
|
+
const { copyType: o = Rr.COPY, pasteType: s } = r, { range: c } = e || {}, { range: l, unitId: p, subUnitId: u } = n;
|
|
191
|
+
return this._generateMutations(l, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: u });
|
|
191
192
|
},
|
|
192
193
|
onPastePlainText: (e, n) => {
|
|
193
194
|
const i = this._filterPlainText(n);
|
|
194
195
|
if (Ke(n) && i) {
|
|
195
|
-
const { range: r, unitId:
|
|
196
|
-
return
|
|
197
|
-
const { row: v, col: I } = l(g, d), _ = this._hyperLinkModel.getHyperLinkByLocation(
|
|
196
|
+
const { range: r, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: l } = Lt([r]), p = [], u = [];
|
|
197
|
+
return Pn.foreach(c, (g, d) => {
|
|
198
|
+
const { row: v, col: I } = l(g, d), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, I);
|
|
198
199
|
_ && p.push({
|
|
199
200
|
id: Ue.id,
|
|
200
201
|
params: {
|
|
201
|
-
unitId:
|
|
202
|
-
subUnitId:
|
|
202
|
+
unitId: o,
|
|
203
|
+
subUnitId: s,
|
|
203
204
|
id: _.id
|
|
204
205
|
}
|
|
205
206
|
}), _ && u.push({
|
|
206
207
|
id: He.id,
|
|
207
208
|
params: {
|
|
208
|
-
unitId:
|
|
209
|
-
subUnitId:
|
|
209
|
+
unitId: o,
|
|
210
|
+
subUnitId: s,
|
|
210
211
|
link: _
|
|
211
212
|
}
|
|
212
213
|
});
|
|
@@ -218,17 +219,17 @@ let Ye = class extends Y {
|
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
_collect(e, n, i) {
|
|
221
|
-
const r = new
|
|
222
|
+
const r = new sr();
|
|
222
223
|
this._copyInfo = {
|
|
223
224
|
unitId: e,
|
|
224
225
|
subUnitId: n,
|
|
225
226
|
matrix: r
|
|
226
227
|
};
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
228
|
+
const o = this._injector.invoke((l) => Lr(i, l, e, n));
|
|
229
|
+
if (!o)
|
|
229
230
|
return;
|
|
230
|
-
const { rows:
|
|
231
|
-
|
|
231
|
+
const { rows: s, cols: c } = o;
|
|
232
|
+
s.forEach((l, p) => {
|
|
232
233
|
c.forEach((u, g) => {
|
|
233
234
|
var v;
|
|
234
235
|
const d = this._hyperLinkModel.getHyperLinkByLocation(e, n, l, u);
|
|
@@ -251,8 +252,8 @@ let Ye = class extends Y {
|
|
|
251
252
|
n.pasteType
|
|
252
253
|
))
|
|
253
254
|
return { redos: [], undos: [] };
|
|
254
|
-
const { unitId: i, subUnitId: r } = this._copyInfo,
|
|
255
|
-
return
|
|
255
|
+
const { unitId: i, subUnitId: r } = this._copyInfo, o = [], s = [], { ranges: [c, l], mapFunc: p } = Lt([n.copyRange, e]);
|
|
256
|
+
return Pr(c, l, !0).forEach(({ startRange: g }) => {
|
|
256
257
|
var d;
|
|
257
258
|
(d = this._copyInfo) == null || d.matrix.forValue((v, I, _) => {
|
|
258
259
|
const b = ye.getPositionRange(
|
|
@@ -264,14 +265,14 @@ let Ye = class extends Y {
|
|
|
264
265
|
},
|
|
265
266
|
g
|
|
266
267
|
), a = this._hyperLinkModel.getHyperLink(i, r, _), { row: w, col: M } = p(b.startRow, b.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, w, M), k = Ie.generateRandomId();
|
|
267
|
-
L &&
|
|
268
|
+
L && o.push({
|
|
268
269
|
id: Ue.id,
|
|
269
270
|
params: {
|
|
270
271
|
unitId: n.unitId,
|
|
271
272
|
subUnitId: n.subUnitId,
|
|
272
273
|
id: L.id
|
|
273
274
|
}
|
|
274
|
-
}), a && (
|
|
275
|
+
}), a && (o.push({
|
|
275
276
|
id: He.id,
|
|
276
277
|
params: {
|
|
277
278
|
unitId: n.unitId,
|
|
@@ -283,14 +284,14 @@ let Ye = class extends Y {
|
|
|
283
284
|
column: M
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
|
-
}),
|
|
287
|
+
}), s.push({
|
|
287
288
|
id: Ue.id,
|
|
288
289
|
params: {
|
|
289
290
|
unitId: n.unitId,
|
|
290
291
|
subUnitId: n.subUnitId,
|
|
291
292
|
id: k
|
|
292
293
|
}
|
|
293
|
-
})), L &&
|
|
294
|
+
})), L && s.push({
|
|
294
295
|
id: He.id,
|
|
295
296
|
params: {
|
|
296
297
|
unitId: n.unitId,
|
|
@@ -299,11 +300,11 @@ let Ye = class extends Y {
|
|
|
299
300
|
}
|
|
300
301
|
});
|
|
301
302
|
});
|
|
302
|
-
}), { redos:
|
|
303
|
+
}), { redos: o, undos: s };
|
|
303
304
|
}
|
|
304
305
|
};
|
|
305
|
-
Ye =
|
|
306
|
-
Ve(0,
|
|
306
|
+
Ye = bi([
|
|
307
|
+
Ve(0, br),
|
|
307
308
|
Ve(1, R(dt)),
|
|
308
309
|
Ve(2, R(lt)),
|
|
309
310
|
Ve(3, R(pe))
|
|
@@ -318,26 +319,26 @@ var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t
|
|
|
318
319
|
* This source code is licensed under the MIT license found in the
|
|
319
320
|
* LICENSE file in the root directory of this source tree.
|
|
320
321
|
*/
|
|
321
|
-
var
|
|
322
|
-
function
|
|
323
|
-
if (
|
|
324
|
-
|
|
325
|
-
var t =
|
|
326
|
-
function
|
|
322
|
+
var mn;
|
|
323
|
+
function wi() {
|
|
324
|
+
if (mn) return ke;
|
|
325
|
+
mn = 1;
|
|
326
|
+
var t = mi, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
327
|
+
function s(c, l, p) {
|
|
327
328
|
var u, g = {}, d = null, v = null;
|
|
328
329
|
p !== void 0 && (d = "" + p), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (v = l.ref);
|
|
329
|
-
for (u in l) i.call(l, u) && !
|
|
330
|
+
for (u in l) i.call(l, u) && !o.hasOwnProperty(u) && (g[u] = l[u]);
|
|
330
331
|
if (c && c.defaultProps) for (u in l = c.defaultProps, l) g[u] === void 0 && (g[u] = l[u]);
|
|
331
332
|
return { $$typeof: e, type: c, key: d, ref: v, props: g, _owner: r.current };
|
|
332
333
|
}
|
|
333
|
-
return ke.Fragment = n, ke.jsx =
|
|
334
|
+
return ke.Fragment = n, ke.jsx = s, ke.jsxs = s, ke;
|
|
334
335
|
}
|
|
335
|
-
var
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
var fn;
|
|
337
|
+
function Oi() {
|
|
338
|
+
return fn || (fn = 1, Et.exports = wi()), Et.exports;
|
|
338
339
|
}
|
|
339
|
-
var m =
|
|
340
|
-
class
|
|
340
|
+
var m = Oi();
|
|
341
|
+
class jn extends Y {
|
|
341
342
|
constructor() {
|
|
342
343
|
super(...arguments);
|
|
343
344
|
B(this, "_customHyperLinks", /* @__PURE__ */ new Map());
|
|
@@ -365,17 +366,17 @@ class $n extends Y {
|
|
|
365
366
|
super.dispose(), this._customHyperLinks.clear();
|
|
366
367
|
}
|
|
367
368
|
}
|
|
368
|
-
const
|
|
369
|
-
cellLinkEdit:
|
|
370
|
-
cellLinkEditButtons:
|
|
369
|
+
const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
|
|
370
|
+
cellLinkEdit: ki,
|
|
371
|
+
cellLinkEditButtons: Ti
|
|
371
372
|
}, ze = () => {
|
|
372
373
|
var Ft;
|
|
373
|
-
const [t, e] = J(""), [n, i] = J(!1), [r,
|
|
374
|
+
const [t, e] = J(""), [n, i] = J(!1), [r, o] = J(""), [s, c] = J(!0), [l, p] = J(S.URL), [u, g] = J(""), d = E(ct), v = E(kn), I = E(re), _ = E(K), b = E(G), a = Jr(b.currentEditing$), w = E(kt), M = E(pe), L = E(ie), k = E(jn), X = pn(() => k.getOptions(), [k]), D = E(pt), z = E($e), Ee = E(wr), je = E(De), se = E(bn), Re = E(or), Le = E(De), Pe = bt({}), oe = pn(() => {
|
|
374
375
|
if (!k.isBuiltInLinkType(l))
|
|
375
376
|
return k.getCustomHyperLink(l);
|
|
376
|
-
}, [k, l]), [j,
|
|
377
|
-
|
|
378
|
-
}, [
|
|
377
|
+
}, [k, l]), [j, Jn] = J(!1), [be, gt] = J(!1), H = bt(!1), A = _.getCurrentUnitForType(O.UNIVER_SHEET), Xn = (A == null ? void 0 : A.getActiveSheet().getSheetId()) || "", Q = fi((h) => {
|
|
378
|
+
o(h.replaceAll(on.CUSTOM_RANGE_START, "").replaceAll(on.CUSTOM_RANGE_END, ""));
|
|
379
|
+
}, [o]);
|
|
379
380
|
ne(() => {
|
|
380
381
|
var h, y, C, P, N, V, Wt, Zt, Gt, Kt, Yt, zt, qt, Jt, Xt, Qt, en;
|
|
381
382
|
if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
|
|
@@ -428,7 +429,7 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
428
429
|
break;
|
|
429
430
|
}
|
|
430
431
|
case S.RANGE: {
|
|
431
|
-
const T = ee.searchObj, te = T.gid && (en = (Qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : Qt.getName()) != null ? en : "", U =
|
|
432
|
+
const T = ee.searchObj, te = T.gid && (en = (Qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : Qt.getName()) != null ? en : "", U = $r(te, Fe(T.range).range);
|
|
432
433
|
g(U), U === F.display && (H.current = !0);
|
|
433
434
|
break;
|
|
434
435
|
}
|
|
@@ -450,7 +451,7 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
450
451
|
}, [a, M, k, je, _]), ne(() => {
|
|
451
452
|
let h = null;
|
|
452
453
|
if (a && !a.customRangeId && a.type === f.VIEWING && Ie.isDefine(a.row) && Ie.isDefine(a.col)) {
|
|
453
|
-
const y = _.getUnit(a.unitId, O.UNIVER_SHEET), C = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = C == null ? void 0 : C.getMergedCell(a.row, a.col), N = new
|
|
454
|
+
const y = _.getUnit(a.unitId, O.UNIVER_SHEET), C = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = C == null ? void 0 : C.getMergedCell(a.row, a.col), N = new ar(Re.getCurrentTheme().hyacinth500).toRgb();
|
|
454
455
|
h = Ee.addShape(
|
|
455
456
|
{
|
|
456
457
|
range: P != null ? P : {
|
|
@@ -478,9 +479,9 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
478
479
|
}, [a, Ee, Re, _]), ne(() => {
|
|
479
480
|
gt(l === S.RANGE);
|
|
480
481
|
}, [l]), ne(() => {
|
|
481
|
-
const h = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? z.getRenderById(x) : z.getRenderById(I.getCurrentEditorId()), y = new
|
|
482
|
+
const h = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? z.getRenderById(x) : z.getRenderById(I.getCurrentEditorId()), y = new cr();
|
|
482
483
|
if (h) {
|
|
483
|
-
const C = h.with(
|
|
484
|
+
const C = h.with(Dn);
|
|
484
485
|
C.setReserveRangesStatus(!0), y.add(() => {
|
|
485
486
|
C.setReserveRangesStatus(!1);
|
|
486
487
|
});
|
|
@@ -491,14 +492,14 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
491
492
|
}, [a == null ? void 0 : a.type, I, z]), ne(() => (b.setIsKeepVisible(be), () => {
|
|
492
493
|
b.setIsKeepVisible(!1);
|
|
493
494
|
}), [be, b]), ne(() => () => {
|
|
494
|
-
D.temporaryHidden && (D.show(),
|
|
495
|
-
}, [
|
|
495
|
+
D.temporaryHidden && (D.show(), se.setContextValue(It, !1));
|
|
496
|
+
}, [se, D]), ne(() => {
|
|
496
497
|
if (be)
|
|
497
498
|
return I.enableForceKeepVisible(), () => {
|
|
498
499
|
I.disableForceKeepVisible();
|
|
499
500
|
};
|
|
500
501
|
}, [be, I]);
|
|
501
|
-
const
|
|
502
|
+
const Qn = [
|
|
502
503
|
{
|
|
503
504
|
label: d.t("hyperLink.form.link"),
|
|
504
505
|
value: S.URL
|
|
@@ -519,40 +520,40 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
519
520
|
];
|
|
520
521
|
if (!A)
|
|
521
522
|
return;
|
|
522
|
-
const
|
|
523
|
+
const er = A.getHiddenWorksheets(), mt = A.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => er.indexOf(h.value) === -1), ft = Object.values((Ft = v.getDefinedNameMap(A.getUnitId())) != null ? Ft : {}).map((h) => ({
|
|
523
524
|
label: h.name,
|
|
524
525
|
value: h.id
|
|
525
526
|
})), Vt = (h, y) => {
|
|
526
527
|
if (h === S.URL)
|
|
527
|
-
return
|
|
528
|
+
return Ii(y);
|
|
528
529
|
if (h === S.RANGE) {
|
|
529
530
|
const C = Fe(y), P = A.getSheetBySheetName(C.sheetName);
|
|
530
531
|
if (P)
|
|
531
|
-
return `#gid=${P.getSheetId()}&range=${
|
|
532
|
+
return `#gid=${P.getSheetId()}&range=${Br(C.range)}`;
|
|
532
533
|
}
|
|
533
534
|
return `#${h}=${y}`;
|
|
534
|
-
},
|
|
535
|
+
}, tr = Xr((h) => {
|
|
535
536
|
var N;
|
|
536
537
|
const C = h.split(",").map(Fe)[0];
|
|
537
|
-
if (!C || !
|
|
538
|
+
if (!C || !Rn(C.range))
|
|
538
539
|
return;
|
|
539
540
|
C.sheetName || (C.sheetName = ((N = A.getActiveSheet()) == null ? void 0 : N.getName()) || "");
|
|
540
|
-
const P =
|
|
541
|
+
const P = jr(C);
|
|
541
542
|
g(P), P && (H.current || !r) && (Q(P), H.current = !0);
|
|
542
543
|
}), vt = async () => {
|
|
543
|
-
if (
|
|
544
|
-
|
|
544
|
+
if (s && !r || !u || l === S.URL && !Ke(u)) {
|
|
545
|
+
Jn(!0);
|
|
545
546
|
return;
|
|
546
547
|
}
|
|
547
548
|
if (a)
|
|
548
549
|
if (t) {
|
|
549
|
-
const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ?
|
|
550
|
+
const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? vr.id : _r.id;
|
|
550
551
|
await L.executeCommand(h, {
|
|
551
552
|
id: t,
|
|
552
553
|
unitId: a.unitId,
|
|
553
554
|
subUnitId: a.subUnitId,
|
|
554
555
|
payload: {
|
|
555
|
-
display:
|
|
556
|
+
display: s ? r : "",
|
|
556
557
|
payload: Vt(l, u)
|
|
557
558
|
},
|
|
558
559
|
row: a.row,
|
|
@@ -560,27 +561,27 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
560
561
|
documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
|
|
561
562
|
});
|
|
562
563
|
} else {
|
|
563
|
-
const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ?
|
|
564
|
+
const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? Sr.id : Ir.id;
|
|
564
565
|
await L.executeCommand(h, {
|
|
565
566
|
unitId: a.unitId,
|
|
566
567
|
subUnitId: a.subUnitId,
|
|
567
568
|
link: {
|
|
568
|
-
id:
|
|
569
|
+
id: lr(),
|
|
569
570
|
row: a.row,
|
|
570
571
|
column: a.col,
|
|
571
572
|
payload: Vt(l, u),
|
|
572
|
-
display:
|
|
573
|
+
display: s ? r : ""
|
|
573
574
|
},
|
|
574
575
|
documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
|
|
575
576
|
});
|
|
576
577
|
}
|
|
577
578
|
if ((a == null ? void 0 : a.type) === f.VIEWING) {
|
|
578
|
-
await L.executeCommand(
|
|
579
|
+
await L.executeCommand(xn.id, {
|
|
579
580
|
unitId: a.unitId,
|
|
580
581
|
subUnitId: a.subUnitId
|
|
581
582
|
});
|
|
582
583
|
const h = 1;
|
|
583
|
-
await L.executeCommand(
|
|
584
|
+
await L.executeCommand(wn.id, {
|
|
584
585
|
range: {
|
|
585
586
|
startRow: Math.max(a.row - h, 0),
|
|
586
587
|
endRow: a.row + h,
|
|
@@ -590,15 +591,15 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
590
591
|
});
|
|
591
592
|
}
|
|
592
593
|
L.executeCommand(Je.id);
|
|
593
|
-
},
|
|
594
|
+
}, nr = (h) => {
|
|
594
595
|
var C;
|
|
595
596
|
if (l !== S.RANGE)
|
|
596
597
|
return;
|
|
597
598
|
const y = (C = Pe.current) == null ? void 0 : C.handleOutClick;
|
|
598
599
|
y && y(h, () => gt(!1));
|
|
599
600
|
};
|
|
600
|
-
return a ? /* @__PURE__ */ m.jsxs("div", { className:
|
|
601
|
-
|
|
601
|
+
return a ? /* @__PURE__ */ m.jsxs("div", { className: vn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: nr, children: [
|
|
602
|
+
s ? /* @__PURE__ */ m.jsx(
|
|
602
603
|
ve,
|
|
603
604
|
{
|
|
604
605
|
label: d.t("hyperLink.form.label"),
|
|
@@ -622,7 +623,7 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
622
623
|
/* @__PURE__ */ m.jsx(ve, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ m.jsx(
|
|
623
624
|
yt,
|
|
624
625
|
{
|
|
625
|
-
options:
|
|
626
|
+
options: Qn,
|
|
626
627
|
value: l,
|
|
627
628
|
onChange: (h) => {
|
|
628
629
|
p(h), g("");
|
|
@@ -650,29 +651,29 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
650
651
|
}
|
|
651
652
|
),
|
|
652
653
|
l === S.RANGE && /* @__PURE__ */ m.jsx(ve, { error: j && !u ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m.jsx(
|
|
653
|
-
|
|
654
|
+
vi,
|
|
654
655
|
{
|
|
655
656
|
unitId: A.getUnitId(),
|
|
656
|
-
subUnitId:
|
|
657
|
+
subUnitId: Xn,
|
|
657
658
|
isOnlyOneRange: !0,
|
|
658
659
|
isSupportAcrossSheet: !0,
|
|
659
660
|
initValue: u,
|
|
660
|
-
onChange:
|
|
661
|
+
onChange: tr,
|
|
661
662
|
isFocus: be,
|
|
662
663
|
onFocus: () => gt(!0),
|
|
663
664
|
actions: Pe.current,
|
|
664
665
|
onRangeSelectorDialogVisibleChange: async (h) => {
|
|
665
666
|
var y, C;
|
|
666
667
|
if (h)
|
|
667
|
-
a.type === f.ZEN_EDITOR && (D.hide(),
|
|
668
|
+
a.type === f.ZEN_EDITOR && (D.hide(), se.setContextValue(It, !0)), a.type !== f.VIEWING && I.enableForceKeepVisible(), i(!0);
|
|
668
669
|
else {
|
|
669
670
|
if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === f.ZEN_EDITOR) {
|
|
670
|
-
await L.executeCommand(
|
|
671
|
+
await L.executeCommand(Tn.id, {
|
|
671
672
|
unitId: a.unitId,
|
|
672
673
|
subUnitId: a.subUnitId,
|
|
673
674
|
selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
|
|
674
|
-
}), D.show(),
|
|
675
|
-
const P = (y = z.getRenderById(x)) == null ? void 0 : y.with(
|
|
675
|
+
}), D.show(), se.setContextValue(It, !1);
|
|
676
|
+
const P = (y = z.getRenderById(x)) == null ? void 0 : y.with(oi), N = (C = Le.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : C[0];
|
|
676
677
|
P && N && (P.scrollToRange(N), Le.refreshSelection({ unitId: x, subUnitId: x }));
|
|
677
678
|
}
|
|
678
679
|
I.disableForceKeepVisible(), i(!1);
|
|
@@ -706,8 +707,8 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
706
707
|
}
|
|
707
708
|
}
|
|
708
709
|
) }),
|
|
709
|
-
(
|
|
710
|
-
|
|
710
|
+
(oe == null ? void 0 : oe.Form) && /* @__PURE__ */ m.jsx(
|
|
711
|
+
oe.Form,
|
|
711
712
|
{
|
|
712
713
|
linkId: t,
|
|
713
714
|
payload: u,
|
|
@@ -720,7 +721,7 @@ const Oi = "univer-cell-link-edit", ki = "univer-cell-link-edit-buttons", fn = {
|
|
|
720
721
|
setPayload: g
|
|
721
722
|
}
|
|
722
723
|
),
|
|
723
|
-
/* @__PURE__ */ m.jsxs("div", { className:
|
|
724
|
+
/* @__PURE__ */ m.jsxs("div", { className: vn.cellLinkEditButtons, children: [
|
|
724
725
|
/* @__PURE__ */ m.jsx(
|
|
725
726
|
ln,
|
|
726
727
|
{
|
|
@@ -753,7 +754,7 @@ var $ = function() {
|
|
|
753
754
|
}
|
|
754
755
|
return t;
|
|
755
756
|
}, $.apply(this, arguments);
|
|
756
|
-
},
|
|
757
|
+
}, xi = function(t, e) {
|
|
757
758
|
var n = {};
|
|
758
759
|
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
|
|
759
760
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -761,112 +762,112 @@ var $ = function() {
|
|
|
761
762
|
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
|
|
762
763
|
return n;
|
|
763
764
|
}, me = he(function(t, e) {
|
|
764
|
-
var n = t.icon, i = t.id, r = t.className,
|
|
765
|
-
return
|
|
765
|
+
var n = t.icon, i = t.id, r = t.className, o = t.extend, s = xi(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), l = bt("_".concat(Ui()));
|
|
766
|
+
return Bn(n, "".concat(i), { defIds: n.defIds, idSuffix: l.current }, $({ ref: e, className: c }, s), o);
|
|
766
767
|
});
|
|
767
|
-
function
|
|
768
|
-
return ge(t.tag, $($({ key: e },
|
|
769
|
-
return
|
|
768
|
+
function Bn(t, e, n, i, r) {
|
|
769
|
+
return ge(t.tag, $($({ key: e }, Ni(t, n, r)), i), (Mi(t, n).children || []).map(function(o, s) {
|
|
770
|
+
return Bn(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, r);
|
|
770
771
|
}));
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
+
function Ni(t, e, n) {
|
|
773
774
|
var i = $({}, t.attrs);
|
|
774
775
|
n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
|
|
775
776
|
var r = e.defIds;
|
|
776
|
-
return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(
|
|
777
|
-
var
|
|
778
|
-
typeof c == "string" && (i[
|
|
777
|
+
return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(o) {
|
|
778
|
+
var s = o[0], c = o[1];
|
|
779
|
+
typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
779
780
|
})), i;
|
|
780
781
|
}
|
|
781
|
-
function
|
|
782
|
+
function Mi(t, e) {
|
|
782
783
|
var n, i = e.defIds;
|
|
783
784
|
return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? $($({}, t), { children: t.children.map(function(r) {
|
|
784
785
|
return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? $($({}, r), { attrs: $($({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
785
786
|
}) }) : t;
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
+
function Ui() {
|
|
788
789
|
return Math.random().toString(36).substring(2, 8);
|
|
789
790
|
}
|
|
790
791
|
me.displayName = "UniverIcon";
|
|
791
|
-
var
|
|
792
|
+
var Hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ze = he(function(t, e) {
|
|
792
793
|
return ge(me, Object.assign({}, t, {
|
|
793
794
|
id: "all-border-single",
|
|
794
795
|
ref: e,
|
|
795
|
-
icon:
|
|
796
|
+
icon: Hi
|
|
796
797
|
}));
|
|
797
798
|
});
|
|
798
799
|
Ze.displayName = "AllBorderSingle";
|
|
799
|
-
var
|
|
800
|
+
var Di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.1302 12.4251C4.25802 13.7417 5.36779 14.7708 6.71792 14.7708H11.7179C13.1539 14.7708 14.3179 13.6067 14.3179 12.1708V6.1708C14.3179 4.78586 13.2351 3.65383 11.8698 3.57517C11.742 2.25858 10.6323 1.22949 9.28213 1.22949H4.28213C2.84619 1.22949 1.68213 2.39355 1.68213 3.82949V9.82949C1.68213 11.2144 2.76497 12.3465 4.1302 12.4251ZM10.6583 3.5708H6.71792C5.28198 3.5708 4.11792 4.73486 4.11792 6.1708V11.22C3.4221 11.1387 2.88213 10.5471 2.88213 9.82949V3.82949C2.88213 3.05629 3.50893 2.42949 4.28213 2.42949H9.28213C9.96695 2.42949 10.5369 2.92119 10.6583 3.5708ZM13.1179 6.1708C13.1179 5.3976 12.4911 4.7708 11.7179 4.7708H6.71792C5.94472 4.7708 5.31792 5.3976 5.31792 6.1708V12.1708C5.31792 12.944 5.94472 13.5708 6.71792 13.5708H11.7179C12.4911 13.5708 13.1179 12.944 13.1179 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, An = he(function(t, e) {
|
|
800
801
|
return ge(me, Object.assign({}, t, {
|
|
801
802
|
id: "copy-single",
|
|
802
803
|
ref: e,
|
|
803
|
-
icon:
|
|
804
|
+
icon: Di
|
|
804
805
|
}));
|
|
805
806
|
});
|
|
806
|
-
|
|
807
|
-
var
|
|
807
|
+
An.displayName = "CopySingle";
|
|
808
|
+
var $i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, Dt = he(function(t, e) {
|
|
808
809
|
return ge(me, Object.assign({}, t, {
|
|
809
810
|
id: "link-single",
|
|
810
811
|
ref: e,
|
|
811
|
-
icon:
|
|
812
|
+
icon: $i
|
|
812
813
|
}));
|
|
813
814
|
});
|
|
814
815
|
Dt.displayName = "LinkSingle";
|
|
815
|
-
var
|
|
816
|
+
var ji = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, Vn = he(function(t, e) {
|
|
816
817
|
return ge(me, Object.assign({}, t, {
|
|
817
818
|
id: "unlink-single",
|
|
818
819
|
ref: e,
|
|
819
|
-
icon:
|
|
820
|
+
icon: ji
|
|
820
821
|
}));
|
|
821
822
|
});
|
|
822
|
-
|
|
823
|
-
var
|
|
823
|
+
Vn.displayName = "UnlinkSingle";
|
|
824
|
+
var Bi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, Fn = he(function(t, e) {
|
|
824
825
|
return ge(me, Object.assign({}, t, {
|
|
825
826
|
id: "write-single",
|
|
826
827
|
ref: e,
|
|
827
|
-
icon:
|
|
828
|
+
icon: Bi
|
|
828
829
|
}));
|
|
829
830
|
});
|
|
830
|
-
|
|
831
|
-
var
|
|
831
|
+
Fn.displayName = "WriteSingle";
|
|
832
|
+
var Ai = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.4535 1.12549C2.7002 1.12549 2.08954 1.73615 2.08954 2.48945V13.5104C2.08954 14.2637 2.7002 14.8744 3.4535 14.8744H12.5465C13.2998 14.8744 13.9105 14.2637 13.9105 13.5104V5.0992L10.0091 1.12549H3.4535Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M10.0075 1.12549L13.9104 5.09842H10.6742C10.306 5.09842 10.0075 4.79994 10.0075 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.8088 10.2949L6.3764 12.403C6.26259 12.5705 6.03455 12.614 5.86705 12.5002C5.69955 12.3864 5.65603 12.1584 5.76984 11.9909L7.3655 9.64252L5.94042 7.54519C5.82661 7.37769 5.87013 7.14964 6.03763 7.03583C6.20512 6.92202 6.43317 6.96555 6.54698 7.13304L7.8088 8.9901L9.07062 7.13304C9.18443 6.96555 9.41248 6.92202 9.57997 7.03583C9.74747 7.14964 9.79099 7.37769 9.67718 7.54519L8.2521 9.64252L9.84776 11.9909C9.96157 12.1584 9.91805 12.3864 9.75055 12.5002C9.58305 12.614 9.35501 12.5705 9.2412 12.403L7.8088 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wn = he(function(t, e) {
|
|
832
833
|
return ge(me, Object.assign({}, t, {
|
|
833
834
|
id: "xlsx",
|
|
834
835
|
ref: e,
|
|
835
|
-
icon:
|
|
836
|
+
icon: Ai
|
|
836
837
|
}));
|
|
837
838
|
});
|
|
838
|
-
|
|
839
|
-
function
|
|
839
|
+
Wn.displayName = "Xlsx";
|
|
840
|
+
function Zn(t) {
|
|
840
841
|
var e, n, i = "";
|
|
841
842
|
if (typeof t == "string" || typeof t == "number") i += t;
|
|
842
843
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
843
844
|
var r = t.length;
|
|
844
|
-
for (e = 0; e < r; e++) t[e] && (n =
|
|
845
|
+
for (e = 0; e < r; e++) t[e] && (n = Zn(t[e])) && (i && (i += " "), i += n);
|
|
845
846
|
} else for (n in t) t[n] && (i && (i += " "), i += n);
|
|
846
847
|
return i;
|
|
847
848
|
}
|
|
848
|
-
function
|
|
849
|
-
for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e =
|
|
849
|
+
function _n() {
|
|
850
|
+
for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = Zn(t)) && (i && (i += " "), i += e);
|
|
850
851
|
return i;
|
|
851
852
|
}
|
|
852
|
-
const
|
|
853
|
-
cellLink:
|
|
854
|
-
cellLinkType:
|
|
855
|
-
cellLinkContent:
|
|
856
|
-
cellLinkContentError:
|
|
857
|
-
cellLinkUrl:
|
|
858
|
-
cellLinkOperations:
|
|
859
|
-
cellLinkOperation:
|
|
860
|
-
cellLinkOperationError:
|
|
861
|
-
},
|
|
853
|
+
const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-link-content", Zi = "univer-cell-link-content-error", Gi = "univer-cell-link-url", Ki = "univer-cell-link-operations", Yi = "univer-cell-link-operation", zi = "univer-cell-link-operation-error", W = {
|
|
854
|
+
cellLink: Vi,
|
|
855
|
+
cellLinkType: Fi,
|
|
856
|
+
cellLinkContent: Wi,
|
|
857
|
+
cellLinkContentError: Zi,
|
|
858
|
+
cellLinkUrl: Gi,
|
|
859
|
+
cellLinkOperations: Ki,
|
|
860
|
+
cellLinkOperation: Yi,
|
|
861
|
+
cellLinkOperationError: zi
|
|
862
|
+
}, qi = {
|
|
862
863
|
[S.URL]: /* @__PURE__ */ m.jsx(Dt, {}),
|
|
863
|
-
[S.SHEET]: /* @__PURE__ */ m.jsx(
|
|
864
|
+
[S.SHEET]: /* @__PURE__ */ m.jsx(Wn, {}),
|
|
864
865
|
[S.RANGE]: /* @__PURE__ */ m.jsx(Ze, {}),
|
|
865
866
|
[S.DEFINE_NAME]: /* @__PURE__ */ m.jsx(Ze, {}),
|
|
866
867
|
[S.INVALID]: /* @__PURE__ */ m.jsx(Ze, {})
|
|
867
|
-
},
|
|
868
|
+
}, Sn = (t) => {
|
|
868
869
|
var M, L;
|
|
869
|
-
const e = E(G), n = E(ie), i = E(
|
|
870
|
+
const e = E(G), n = E(ie), i = E(Un), r = E(ct), o = E(pe), s = E(re), c = E(kt), l = E(pt), { customRange: p, row: u, col: g, unitId: d, subUnitId: v, editPermission: I, copyPermission: _, type: b } = t;
|
|
870
871
|
if (!((M = p == null ? void 0 : p.properties) != null && M.url))
|
|
871
872
|
return null;
|
|
872
873
|
const a = c.parseHyperLink((L = p.properties.url) != null ? L : ""), w = a.type === S.INVALID;
|
|
@@ -874,12 +875,12 @@ const Ai = "univer-cell-link", Vi = "univer-cell-link-type", Fi = "univer-cell-l
|
|
|
874
875
|
/* @__PURE__ */ m.jsxs(
|
|
875
876
|
"div",
|
|
876
877
|
{
|
|
877
|
-
className:
|
|
878
|
+
className: _n(W.cellLinkContent, { [W.cellLinkContentError]: w }),
|
|
878
879
|
onClick: () => {
|
|
879
|
-
l.visible || w ||
|
|
880
|
+
l.visible || w || o.navigate(a);
|
|
880
881
|
},
|
|
881
882
|
children: [
|
|
882
|
-
/* @__PURE__ */ m.jsx("div", { className: W.cellLinkType, children:
|
|
883
|
+
/* @__PURE__ */ m.jsx("div", { className: W.cellLinkType, children: qi[a.type] }),
|
|
883
884
|
/* @__PURE__ */ m.jsx(Ae, { showIfEllipsis: !0, title: a.name, children: /* @__PURE__ */ m.jsx("span", { className: W.cellLinkUrl, children: a.name }) })
|
|
884
885
|
]
|
|
885
886
|
}
|
|
@@ -888,7 +889,7 @@ const Ai = "univer-cell-link", Vi = "univer-cell-link-type", Fi = "univer-cell-l
|
|
|
888
889
|
_ && /* @__PURE__ */ m.jsx(
|
|
889
890
|
"div",
|
|
890
891
|
{
|
|
891
|
-
className:
|
|
892
|
+
className: _n(W.cellLinkOperation, { [W.cellLinkOperationError]: w }),
|
|
892
893
|
onClick: () => {
|
|
893
894
|
if (!w) {
|
|
894
895
|
if (a.type !== S.URL) {
|
|
@@ -902,7 +903,7 @@ const Ai = "univer-cell-link", Vi = "univer-cell-link-type", Fi = "univer-cell-l
|
|
|
902
903
|
});
|
|
903
904
|
}
|
|
904
905
|
},
|
|
905
|
-
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m.jsx(
|
|
906
|
+
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m.jsx(An, {}) })
|
|
906
907
|
}
|
|
907
908
|
),
|
|
908
909
|
I && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
@@ -920,7 +921,7 @@ const Ai = "univer-cell-link", Vi = "univer-cell-link-type", Fi = "univer-cell-l
|
|
|
920
921
|
type: b
|
|
921
922
|
});
|
|
922
923
|
},
|
|
923
|
-
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m.jsx(
|
|
924
|
+
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m.jsx(Fn, {}) })
|
|
924
925
|
}
|
|
925
926
|
),
|
|
926
927
|
/* @__PURE__ */ m.jsx(
|
|
@@ -928,62 +929,62 @@ const Ai = "univer-cell-link", Vi = "univer-cell-link-type", Fi = "univer-cell-l
|
|
|
928
929
|
{
|
|
929
930
|
className: W.cellLinkOperation,
|
|
930
931
|
onClick: () => {
|
|
931
|
-
const k = b === f.EDITING || b === f.ZEN_EDITOR ?
|
|
932
|
+
const k = b === f.EDITING || b === f.ZEN_EDITOR ? Cr.id : yr.id;
|
|
932
933
|
n.syncExecuteCommand(k, {
|
|
933
934
|
unitId: d,
|
|
934
935
|
subUnitId: v,
|
|
935
936
|
id: p.rangeId,
|
|
936
937
|
row: u,
|
|
937
938
|
column: g,
|
|
938
|
-
documentId: b === f.ZEN_EDITOR ? x :
|
|
939
|
+
documentId: b === f.ZEN_EDITOR ? x : s.getCurrentEditorId()
|
|
939
940
|
}) && e.hideCurrentPopup(void 0, !0);
|
|
940
941
|
},
|
|
941
|
-
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m.jsx(
|
|
942
|
+
children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m.jsx(Vn, {}) })
|
|
942
943
|
}
|
|
943
944
|
)
|
|
944
945
|
] })
|
|
945
946
|
] })
|
|
946
947
|
] });
|
|
947
948
|
}, qe = () => {
|
|
948
|
-
var r,
|
|
949
|
+
var r, o;
|
|
949
950
|
const t = E(G), [e, n] = J(null), i = E(K);
|
|
950
951
|
if (ne(() => {
|
|
951
952
|
n(t.currentPopup);
|
|
952
|
-
const
|
|
953
|
+
const s = t.currentPopup$.subscribe((c) => {
|
|
953
954
|
n(c);
|
|
954
955
|
});
|
|
955
956
|
return () => {
|
|
956
|
-
|
|
957
|
+
s.unsubscribe();
|
|
957
958
|
};
|
|
958
959
|
}, [t.currentPopup, t.currentPopup$]), !e)
|
|
959
960
|
return null;
|
|
960
961
|
if (e.showAll) {
|
|
961
|
-
const
|
|
962
|
-
return p != null && p.length ? /* @__PURE__ */ m.jsx("div", { children: p.map((u) => /* @__PURE__ */ m.jsx(
|
|
962
|
+
const s = i.getUnit(e.unitId, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), l = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (r = l == null ? void 0 : l.p) == null ? void 0 : r.body) == null ? void 0 : o.customRanges;
|
|
963
|
+
return p != null && p.length ? /* @__PURE__ */ m.jsx("div", { children: p.map((u) => /* @__PURE__ */ m.jsx(Sn, { ...e, customRange: u }, u.rangeId)) }) : null;
|
|
963
964
|
}
|
|
964
|
-
return /* @__PURE__ */ m.jsx(
|
|
965
|
+
return /* @__PURE__ */ m.jsx(Sn, { ...e });
|
|
965
966
|
};
|
|
966
967
|
qe.componentKey = "univer.sheet.cell-link-popup";
|
|
967
|
-
var
|
|
968
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
969
|
-
(
|
|
970
|
-
return i && r &&
|
|
968
|
+
var Ji = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Qi = (t, e, n, i) => {
|
|
969
|
+
for (var r = i > 1 ? void 0 : i ? Xi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
970
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
971
|
+
return i && r && Ji(e, n, r), r;
|
|
971
972
|
}, ce = (t, e) => (n, i) => e(n, i, t);
|
|
972
|
-
const
|
|
973
|
+
const In = (t, e) => {
|
|
973
974
|
var n, i;
|
|
974
975
|
return t.unitId === e.unitId && t.subUnitId === e.subUnitId && t.row === e.row && t.col === e.col && ((n = t.customRange) == null ? void 0 : n.rangeId) === ((i = e.customRange) == null ? void 0 : i.rangeId) && t.type === e.type;
|
|
975
976
|
};
|
|
976
977
|
let G = class extends Y {
|
|
977
|
-
constructor(e, n, i, r,
|
|
978
|
+
constructor(e, n, i, r, o, s, c) {
|
|
978
979
|
super();
|
|
979
980
|
B(this, "_currentPopup", null);
|
|
980
|
-
B(this, "_currentPopup$", new
|
|
981
|
+
B(this, "_currentPopup$", new ui());
|
|
981
982
|
B(this, "currentPopup$", this._currentPopup$.asObservable());
|
|
982
983
|
B(this, "_currentEditingPopup", null);
|
|
983
|
-
B(this, "_currentEditing$", new
|
|
984
|
+
B(this, "_currentEditing$", new di(null));
|
|
984
985
|
B(this, "currentEditing$", this._currentEditing$.asObservable());
|
|
985
986
|
B(this, "_isKeepVisible", !1);
|
|
986
|
-
this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService =
|
|
987
|
+
this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService = o, this._docCanvasPopManagerService = s, this._zenZoneService = c, this.disposeWithMe(() => {
|
|
987
988
|
this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
|
|
988
989
|
});
|
|
989
990
|
}
|
|
@@ -1000,12 +1001,12 @@ let G = class extends Y {
|
|
|
1000
1001
|
return this._isKeepVisible;
|
|
1001
1002
|
}
|
|
1002
1003
|
showPopup(e) {
|
|
1003
|
-
if (this._currentPopup &&
|
|
1004
|
+
if (this._currentPopup && In(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== f.ZEN_EDITOR && this._zenZoneService.visible))
|
|
1004
1005
|
return;
|
|
1005
1006
|
const n = this._currentEditing$.getValue();
|
|
1006
|
-
if (n &&
|
|
1007
|
+
if (n && In(e, n))
|
|
1007
1008
|
return;
|
|
1008
|
-
const { unitId: i, subUnitId: r, row:
|
|
1009
|
+
const { unitId: i, subUnitId: r, row: o, col: s, customRangeRect: c, customRange: l } = e;
|
|
1009
1010
|
let p;
|
|
1010
1011
|
const u = {
|
|
1011
1012
|
componentKey: qe.componentKey,
|
|
@@ -1051,8 +1052,8 @@ let G = class extends Y {
|
|
|
1051
1052
|
unitId: i,
|
|
1052
1053
|
subUnitId: r,
|
|
1053
1054
|
disposable: p,
|
|
1054
|
-
row:
|
|
1055
|
-
col:
|
|
1055
|
+
row: o,
|
|
1056
|
+
col: s,
|
|
1056
1057
|
editPermission: !!e.editPermission,
|
|
1057
1058
|
copyPermission: !!e.copyPermission,
|
|
1058
1059
|
customRange: l,
|
|
@@ -1065,21 +1066,21 @@ let G = class extends Y {
|
|
|
1065
1066
|
this._currentPopup && ((!e || e === this._currentPopup.type) && this._currentPopup.disposable.canDispose() || n) && ((r = (i = this._currentPopup) == null ? void 0 : i.disposable) == null || r.dispose(), this._currentPopup = null, this._currentPopup$.next(null));
|
|
1066
1067
|
}
|
|
1067
1068
|
_getEditingRange() {
|
|
1068
|
-
var i, r,
|
|
1069
|
+
var i, r, o;
|
|
1069
1070
|
const e = this._editorBridgeService.isVisible().visible, n = this._editorBridgeService.getEditCellState();
|
|
1070
1071
|
if (e && n) {
|
|
1071
|
-
const
|
|
1072
|
+
const s = this._textSelectionManagerService.getActiveTextRange(), c = (i = n.documentLayoutObject.documentModel) == null ? void 0 : i.getBody();
|
|
1072
1073
|
if (!c)
|
|
1073
1074
|
return null;
|
|
1074
|
-
if (!
|
|
1075
|
+
if (!s || s.collapsed)
|
|
1075
1076
|
return {
|
|
1076
1077
|
startOffset: 0,
|
|
1077
1078
|
endOffset: c.dataStream.length - 2,
|
|
1078
1079
|
collapsed: c.dataStream.length - 2 === 0,
|
|
1079
1080
|
label: Se.transform.getPlainText(c.dataStream)
|
|
1080
1081
|
};
|
|
1081
|
-
const l = Se.customRange.getCustomRangesInterestsWithSelection(
|
|
1082
|
-
let p =
|
|
1082
|
+
const l = Se.customRange.getCustomRangesInterestsWithSelection(s, (o = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Ge.HYPERLINK)) != null ? o : []);
|
|
1083
|
+
let p = s.startOffset, u = s.endOffset;
|
|
1083
1084
|
return l.forEach((g) => {
|
|
1084
1085
|
p = Math.min(p, g.startIndex), u = Math.max(u, g.endIndex + 1);
|
|
1085
1086
|
}), {
|
|
@@ -1094,7 +1095,7 @@ let G = class extends Y {
|
|
|
1094
1095
|
get _editPopup() {
|
|
1095
1096
|
return {
|
|
1096
1097
|
componentKey: ze.componentKey,
|
|
1097
|
-
direction: "
|
|
1098
|
+
direction: "vertical",
|
|
1098
1099
|
onClickOutside: () => {
|
|
1099
1100
|
this.getIsKeepVisible() || this.endEditing();
|
|
1100
1101
|
},
|
|
@@ -1105,7 +1106,7 @@ let G = class extends Y {
|
|
|
1105
1106
|
};
|
|
1106
1107
|
}
|
|
1107
1108
|
startAddEditing(e) {
|
|
1108
|
-
var
|
|
1109
|
+
var o, s, c, l, p;
|
|
1109
1110
|
const { unitId: n, subUnitId: i, type: r } = e;
|
|
1110
1111
|
if (r === f.ZEN_EDITOR) {
|
|
1111
1112
|
const u = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
|
|
@@ -1119,7 +1120,7 @@ let G = class extends Y {
|
|
|
1119
1120
|
this._editPopup,
|
|
1120
1121
|
x
|
|
1121
1122
|
);
|
|
1122
|
-
const d = (
|
|
1123
|
+
const d = (o = u.getBody()) == null ? void 0 : o.dataStream.slice(g.startOffset, g.endOffset);
|
|
1123
1124
|
this._currentEditing$.next({
|
|
1124
1125
|
...e,
|
|
1125
1126
|
label: d
|
|
@@ -1132,7 +1133,7 @@ let G = class extends Y {
|
|
|
1132
1133
|
const g = this._injector.get($e).getRenderById(Ce);
|
|
1133
1134
|
if (!g)
|
|
1134
1135
|
return;
|
|
1135
|
-
const d =
|
|
1136
|
+
const d = ci(u, g);
|
|
1136
1137
|
if (!(d != null && d.length))
|
|
1137
1138
|
return;
|
|
1138
1139
|
this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
|
|
@@ -1142,7 +1143,7 @@ let G = class extends Y {
|
|
|
1142
1143
|
i
|
|
1143
1144
|
), this._currentEditing$.next({
|
|
1144
1145
|
...e,
|
|
1145
|
-
label: (
|
|
1146
|
+
label: (s = u == null ? void 0 : u.label) != null ? s : ""
|
|
1146
1147
|
});
|
|
1147
1148
|
} else {
|
|
1148
1149
|
this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
|
|
@@ -1161,13 +1162,13 @@ let G = class extends Y {
|
|
|
1161
1162
|
}
|
|
1162
1163
|
// eslint-disable-next-line complexity, max-lines-per-function
|
|
1163
1164
|
startEditing(e) {
|
|
1164
|
-
var
|
|
1165
|
-
(
|
|
1165
|
+
var s, c, l, p, u, g;
|
|
1166
|
+
(s = this._currentEditingPopup) == null || s.dispose(), this.hideCurrentPopup(void 0, !0);
|
|
1166
1167
|
const { unitId: n, subUnitId: i } = e;
|
|
1167
|
-
let r,
|
|
1168
|
+
let r, o;
|
|
1168
1169
|
if (e.type === f.ZEN_EDITOR) {
|
|
1169
1170
|
const d = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
|
|
1170
|
-
if (r = (l = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : l.find((v) => v.rangeId === e.customRangeId),
|
|
1171
|
+
if (r = (l = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : l.find((v) => v.rangeId === e.customRangeId), o = r ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(r.startIndex, r.endIndex + 1) : "", !r || !o)
|
|
1171
1172
|
return;
|
|
1172
1173
|
this._textSelectionManagerService.replaceTextRanges([
|
|
1173
1174
|
{
|
|
@@ -1184,10 +1185,10 @@ let G = class extends Y {
|
|
|
1184
1185
|
x
|
|
1185
1186
|
);
|
|
1186
1187
|
} else if (e.type === f.EDITING) {
|
|
1187
|
-
const d =
|
|
1188
|
+
const d = kr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
|
|
1188
1189
|
if (!d || !((u = d.rects) != null && u.length))
|
|
1189
1190
|
return;
|
|
1190
|
-
r = d.customRange,
|
|
1191
|
+
r = d.customRange, o = d.label, this._textSelectionManagerService.replaceTextRanges([
|
|
1191
1192
|
{
|
|
1192
1193
|
startOffset: r.startIndex,
|
|
1193
1194
|
endOffset: r.endIndex + 1
|
|
@@ -1199,10 +1200,10 @@ let G = class extends Y {
|
|
|
1199
1200
|
i
|
|
1200
1201
|
);
|
|
1201
1202
|
} else {
|
|
1202
|
-
const d = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(i), I = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(I), b = _ == null ? void 0 : _.tr, a =
|
|
1203
|
+
const d = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(i), I = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(I), b = _ == null ? void 0 : _.tr, a = Tr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
|
|
1203
1204
|
if (!a || !((g = a.rects) != null && g.length))
|
|
1204
1205
|
return;
|
|
1205
|
-
r = a.customRange,
|
|
1206
|
+
r = a.customRange, o = a.label, b ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
|
|
1206
1207
|
e.row,
|
|
1207
1208
|
e.col,
|
|
1208
1209
|
this._editPopup,
|
|
@@ -1222,7 +1223,7 @@ let G = class extends Y {
|
|
|
1222
1223
|
this._currentEditing$.next({
|
|
1223
1224
|
...e,
|
|
1224
1225
|
customRange: r,
|
|
1225
|
-
label:
|
|
1226
|
+
label: o
|
|
1226
1227
|
});
|
|
1227
1228
|
}
|
|
1228
1229
|
endEditing(e) {
|
|
@@ -1231,17 +1232,17 @@ let G = class extends Y {
|
|
|
1231
1232
|
n && (!e || e === n.type) && ((i = this._currentEditingPopup) == null || i.dispose(), this._currentEditing$.next(null));
|
|
1232
1233
|
}
|
|
1233
1234
|
};
|
|
1234
|
-
G =
|
|
1235
|
-
ce(0, R(
|
|
1235
|
+
G = Qi([
|
|
1236
|
+
ce(0, R(Or)),
|
|
1236
1237
|
ce(1, R(lt)),
|
|
1237
1238
|
ce(2, K),
|
|
1238
1239
|
ce(3, re),
|
|
1239
1240
|
ce(4, R(De)),
|
|
1240
|
-
ce(5, R(
|
|
1241
|
+
ce(5, R(ai)),
|
|
1241
1242
|
ce(6, pt)
|
|
1242
1243
|
], G);
|
|
1243
1244
|
var Me = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(Me || {});
|
|
1244
|
-
const
|
|
1245
|
+
const es = /* @__PURE__ */ new Set([
|
|
1245
1246
|
Ct.CHECKBOX,
|
|
1246
1247
|
Ct.LIST,
|
|
1247
1248
|
Ct.LIST_MULTIPLE
|
|
@@ -1250,23 +1251,23 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
1250
1251
|
const r = e.getCell(n, i);
|
|
1251
1252
|
if (r != null && r.f || r != null && r.si)
|
|
1252
1253
|
return 1;
|
|
1253
|
-
const
|
|
1254
|
-
return
|
|
1255
|
-
},
|
|
1254
|
+
const o = t.has(hn) ? t.get(hn) : null, s = o == null ? void 0 : o.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
|
|
1255
|
+
return s && es.has(s.type) ? !0 : (l = (c = r == null ? void 0 : r.p) == null ? void 0 : c.drawingsOrder) != null && l.length ? 2 : 0;
|
|
1256
|
+
}, ts = (t) => {
|
|
1256
1257
|
const e = t.get(K).getCurrentUnitForType(O.UNIVER_SHEET);
|
|
1257
1258
|
if (!e)
|
|
1258
1259
|
return !0;
|
|
1259
1260
|
const n = e.getActiveSheet(), i = t.get(Tt).getCurrentSelections();
|
|
1260
1261
|
if (!i.length)
|
|
1261
1262
|
return !0;
|
|
1262
|
-
const r = i[0].range.startRow,
|
|
1263
|
-
return $t(t, n, r,
|
|
1264
|
-
},
|
|
1263
|
+
const r = i[0].range.startRow, o = i[0].range.startColumn;
|
|
1264
|
+
return $t(t, n, r, o) === 1;
|
|
1265
|
+
}, ns = (t) => {
|
|
1265
1266
|
const e = t.get(De), n = t.get(K), i = e.getTextRanges();
|
|
1266
1267
|
if (!(i != null && i.length))
|
|
1267
1268
|
return !0;
|
|
1268
1269
|
const r = n.getCurrentUnitForType(O.UNIVER_DOC);
|
|
1269
|
-
return !!(!r || i.every((
|
|
1270
|
+
return !!(!r || i.every((s) => s.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
|
|
1270
1271
|
}, jt = {
|
|
1271
1272
|
type: ut.OPERATION,
|
|
1272
1273
|
id: "sheet.operation.open-hyper-link-edit-panel",
|
|
@@ -1287,13 +1288,13 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
1287
1288
|
id: "sheet.operation.insert-hyper-link",
|
|
1288
1289
|
handler(t) {
|
|
1289
1290
|
var g;
|
|
1290
|
-
const e = t.get(K), n =
|
|
1291
|
+
const e = t.get(K), n = Nn(e), i = t.get(re);
|
|
1291
1292
|
if (!n)
|
|
1292
1293
|
return !1;
|
|
1293
|
-
const r = t.get(ie),
|
|
1294
|
-
if (!
|
|
1294
|
+
const r = t.get(ie), s = t.get(Tt).getCurrentLastSelection();
|
|
1295
|
+
if (!s)
|
|
1295
1296
|
return !1;
|
|
1296
|
-
const c =
|
|
1297
|
+
const c = s.range.startRow, l = s.range.startColumn, p = i.isVisible(), u = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === x;
|
|
1297
1298
|
return r.executeCommand(jt.id, {
|
|
1298
1299
|
unitId: n.unitId,
|
|
1299
1300
|
subUnitId: n.subUnitId,
|
|
@@ -1306,64 +1307,64 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
1306
1307
|
type: ut.OPERATION,
|
|
1307
1308
|
id: "sheet.operation.insert-hyper-link-toolbar",
|
|
1308
1309
|
handler(t) {
|
|
1309
|
-
if (
|
|
1310
|
+
if (ts(t))
|
|
1310
1311
|
return !1;
|
|
1311
1312
|
const e = t.get(ie);
|
|
1312
1313
|
return t.get(G).currentEditing ? e.executeCommand(Je.id) : e.executeCommand(Bt.id);
|
|
1313
1314
|
}
|
|
1314
1315
|
}, At = (t, e = x) => {
|
|
1315
1316
|
var r;
|
|
1316
|
-
const n = t.get(K), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(
|
|
1317
|
+
const n = t.get(K), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(Dn);
|
|
1317
1318
|
return i ? i.textSelectionInner$.pipe(le(() => {
|
|
1318
|
-
const
|
|
1319
|
-
if (!
|
|
1319
|
+
const s = t.get(re).getEditCellState();
|
|
1320
|
+
if (!s)
|
|
1320
1321
|
return !0;
|
|
1321
|
-
const c =
|
|
1322
|
-
return !(c != null && c.worksheet) || $t(t, c.worksheet,
|
|
1322
|
+
const c = Nn(n, { unitId: s.unitId, subUnitId: s.sheetId });
|
|
1323
|
+
return !(c != null && c.worksheet) || $t(t, c.worksheet, s.row, s.column) === 1 ? !0 : ns(t);
|
|
1323
1324
|
})) : Ne(!0);
|
|
1324
|
-
},
|
|
1325
|
-
const e =
|
|
1326
|
-
dn((
|
|
1327
|
-
le((
|
|
1328
|
-
dn((
|
|
1329
|
-
ue((
|
|
1330
|
-
ue((
|
|
1331
|
-
le((
|
|
1332
|
-
if (!
|
|
1325
|
+
}, Gn = (t) => {
|
|
1326
|
+
const e = Nr(t, { workbookTypes: [xt], worksheetTypes: [Nt, Mn, Mt], rangeTypes: [Ut] }, !0), n = t.get(K), i = t.get(Tt), r = t.has(re) ? t.get(re) : null, o = n.focused$.pipe(
|
|
1327
|
+
dn((s) => !!s),
|
|
1328
|
+
le((s) => n.getUnit(s, O.UNIVER_SHEET)),
|
|
1329
|
+
dn((s) => !!s),
|
|
1330
|
+
ue((s) => s.activeSheet$),
|
|
1331
|
+
ue((s) => i.selectionMoveEnd$.pipe(le((c) => s && { selections: c, sheet: s }))),
|
|
1332
|
+
le((s) => {
|
|
1333
|
+
if (!s)
|
|
1333
1334
|
return Me.DISABLED_BY_CELL;
|
|
1334
|
-
const { selections: c, sheet: l } =
|
|
1335
|
+
const { selections: c, sheet: l } = s;
|
|
1335
1336
|
if (!c.length)
|
|
1336
1337
|
return Me.DISABLED_BY_CELL;
|
|
1337
1338
|
const p = c[0].range.startRow, u = c[0].range.startColumn;
|
|
1338
1339
|
return $t(t, l, p, u);
|
|
1339
1340
|
}),
|
|
1340
|
-
ue((
|
|
1341
|
-
if (
|
|
1341
|
+
ue((s) => {
|
|
1342
|
+
if (s === Me.DISABLED_BY_CELL)
|
|
1342
1343
|
return Ne(!0);
|
|
1343
|
-
const c = (r ? r.visible$ : Ne(null)).pipe(le((p) => p != null && p.visible ? Ce : void 0)), l = t.get(
|
|
1344
|
-
return
|
|
1344
|
+
const c = (r ? r.visible$ : Ne(null)).pipe(le((p) => p != null && p.visible ? Ce : void 0)), l = t.get(bn).subscribeContextValue$(ur);
|
|
1345
|
+
return pi([c, l]).pipe(
|
|
1345
1346
|
ue(
|
|
1346
|
-
([p, u]) => p ? u ? Ne(!0) : At(t, p) : Ne(
|
|
1347
|
+
([p, u]) => p ? u ? Ne(!0) : At(t, p) : Ne(s === Me.ALLOW_ON_EDITING)
|
|
1347
1348
|
)
|
|
1348
1349
|
);
|
|
1349
1350
|
})
|
|
1350
1351
|
);
|
|
1351
1352
|
return e.pipe(
|
|
1352
|
-
|
|
1353
|
-
ue((
|
|
1353
|
+
hi(),
|
|
1354
|
+
ue((s) => o.pipe(le((c) => s || c)))
|
|
1354
1355
|
);
|
|
1355
1356
|
}, Xe = {
|
|
1356
1357
|
commandId: Bt.id,
|
|
1357
|
-
type:
|
|
1358
|
+
type: Hn.BUTTON,
|
|
1358
1359
|
title: "hyperLink.menu.add",
|
|
1359
1360
|
icon: "LinkSingle"
|
|
1360
|
-
}, Qe = (t) => `${t}-zen-editor`,
|
|
1361
|
+
}, Qe = (t) => `${t}-zen-editor`, rs = (t) => ({
|
|
1361
1362
|
...Xe,
|
|
1362
1363
|
id: Xe.commandId,
|
|
1363
1364
|
hidden$: ht(t, O.UNIVER_SHEET),
|
|
1364
|
-
disabled$:
|
|
1365
|
+
disabled$: Gn(t)
|
|
1365
1366
|
// disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
|
|
1366
|
-
}),
|
|
1367
|
+
}), is = (t) => ({
|
|
1367
1368
|
...Xe,
|
|
1368
1369
|
id: Qe(Xe.commandId),
|
|
1369
1370
|
hidden$: ht(t, O.UNIVER_DOC, x),
|
|
@@ -1371,28 +1372,28 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
1371
1372
|
}), et = {
|
|
1372
1373
|
tooltip: "hyperLink.form.addTitle",
|
|
1373
1374
|
commandId: de.id,
|
|
1374
|
-
type:
|
|
1375
|
+
type: Hn.BUTTON,
|
|
1375
1376
|
icon: "LinkSingle"
|
|
1376
|
-
},
|
|
1377
|
+
}, ss = (t) => ({
|
|
1377
1378
|
...et,
|
|
1378
1379
|
id: et.commandId,
|
|
1379
1380
|
hidden$: ht(t, O.UNIVER_SHEET),
|
|
1380
|
-
disabled$:
|
|
1381
|
-
}),
|
|
1381
|
+
disabled$: Gn(t)
|
|
1382
|
+
}), os = (t) => ({
|
|
1382
1383
|
...et,
|
|
1383
1384
|
id: Qe(et.commandId),
|
|
1384
1385
|
hidden$: ht(t, O.UNIVER_DOC, x),
|
|
1385
1386
|
disabled$: At(t)
|
|
1386
|
-
}),
|
|
1387
|
+
}), Kn = {
|
|
1387
1388
|
id: de.id,
|
|
1388
|
-
binding: Pt.K |
|
|
1389
|
-
preconditions:
|
|
1389
|
+
binding: Pt.K | Qr.CTRL_COMMAND,
|
|
1390
|
+
preconditions: xr
|
|
1390
1391
|
};
|
|
1391
|
-
var
|
|
1392
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1393
|
-
(
|
|
1394
|
-
return i && r &&
|
|
1395
|
-
},
|
|
1392
|
+
var as = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, ls = (t, e, n, i) => {
|
|
1393
|
+
for (var r = i > 1 ? void 0 : i ? cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1394
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1395
|
+
return i && r && as(e, n, r), r;
|
|
1396
|
+
}, Cn = (t, e) => (n, i) => e(n, i, t);
|
|
1396
1397
|
let tt = class extends Y {
|
|
1397
1398
|
constructor(t, e) {
|
|
1398
1399
|
super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
|
|
@@ -1400,10 +1401,10 @@ let tt = class extends Y {
|
|
|
1400
1401
|
// eslint-disable-next-line max-lines-per-function
|
|
1401
1402
|
_initAutoFill() {
|
|
1402
1403
|
const t = () => ({ redos: [], undos: [] }), e = (i, r) => {
|
|
1403
|
-
const { source:
|
|
1404
|
+
const { source: o, target: s, unitId: c, subUnitId: l } = i, p = Lt([o, s]), [u, g] = p.ranges, { mapFunc: d } = p, v = {
|
|
1404
1405
|
row: u.startRow,
|
|
1405
1406
|
col: u.startColumn
|
|
1406
|
-
}, I =
|
|
1407
|
+
}, I = Ur(u, g), _ = [], b = [];
|
|
1407
1408
|
return I.forEach((a) => {
|
|
1408
1409
|
const w = a.repeatStartCell, M = a.relativeRange, L = {
|
|
1409
1410
|
startRow: v.row,
|
|
@@ -1416,7 +1417,7 @@ let tt = class extends Y {
|
|
|
1416
1417
|
endColumn: w.col,
|
|
1417
1418
|
endRow: w.row
|
|
1418
1419
|
};
|
|
1419
|
-
|
|
1420
|
+
Pn.foreach(M, (X, D) => {
|
|
1420
1421
|
const z = ye.getPositionRange(
|
|
1421
1422
|
{
|
|
1422
1423
|
startRow: X,
|
|
@@ -1425,7 +1426,7 @@ let tt = class extends Y {
|
|
|
1425
1426
|
endRow: X
|
|
1426
1427
|
},
|
|
1427
1428
|
L
|
|
1428
|
-
), { row: Ee, col: je } = d(z.startRow, z.startColumn),
|
|
1429
|
+
), { row: Ee, col: je } = d(z.startRow, z.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, l, Ee, je), Re = ye.getPositionRange(
|
|
1429
1430
|
{
|
|
1430
1431
|
startRow: X,
|
|
1431
1432
|
startColumn: D,
|
|
@@ -1433,7 +1434,7 @@ let tt = class extends Y {
|
|
|
1433
1434
|
endRow: X
|
|
1434
1435
|
},
|
|
1435
1436
|
k
|
|
1436
|
-
), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn),
|
|
1437
|
+
), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn), oe = Ie.generateRandomId(), j = this._hyperLinkModel.getHyperLinkByLocation(c, l, Le, Pe);
|
|
1437
1438
|
j && _.push({
|
|
1438
1439
|
id: Ue.id,
|
|
1439
1440
|
params: {
|
|
@@ -1441,14 +1442,14 @@ let tt = class extends Y {
|
|
|
1441
1442
|
subUnitId: l,
|
|
1442
1443
|
id: j.id
|
|
1443
1444
|
}
|
|
1444
|
-
}), (Oe.COPY === r || Oe.SERIES === r) &&
|
|
1445
|
+
}), (Oe.COPY === r || Oe.SERIES === r) && se && (_.push({
|
|
1445
1446
|
id: He.id,
|
|
1446
1447
|
params: {
|
|
1447
1448
|
unitId: c,
|
|
1448
1449
|
subUnitId: l,
|
|
1449
1450
|
link: {
|
|
1450
|
-
...
|
|
1451
|
-
id:
|
|
1451
|
+
...se,
|
|
1452
|
+
id: oe,
|
|
1452
1453
|
row: Le,
|
|
1453
1454
|
column: Pe
|
|
1454
1455
|
}
|
|
@@ -1458,7 +1459,7 @@ let tt = class extends Y {
|
|
|
1458
1459
|
params: {
|
|
1459
1460
|
unitId: c,
|
|
1460
1461
|
subUnitId: l,
|
|
1461
|
-
id:
|
|
1462
|
+
id: oe
|
|
1462
1463
|
}
|
|
1463
1464
|
})), j && b.push({
|
|
1464
1465
|
id: He.id,
|
|
@@ -1475,19 +1476,19 @@ let tt = class extends Y {
|
|
|
1475
1476
|
};
|
|
1476
1477
|
}, n = {
|
|
1477
1478
|
id: Ht,
|
|
1478
|
-
onFillData: (i, r,
|
|
1479
|
+
onFillData: (i, r, o) => o === Oe.COPY || o === Oe.ONLY_FORMAT || o === Oe.SERIES ? e(i, o) : t()
|
|
1479
1480
|
};
|
|
1480
1481
|
this.disposeWithMe(this._autoFillService.addHook(n));
|
|
1481
1482
|
}
|
|
1482
1483
|
};
|
|
1483
|
-
tt =
|
|
1484
|
-
|
|
1485
|
-
|
|
1484
|
+
tt = ls([
|
|
1485
|
+
Cn(0, Mr),
|
|
1486
|
+
Cn(1, R(dt))
|
|
1486
1487
|
], tt);
|
|
1487
|
-
var
|
|
1488
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1489
|
-
(
|
|
1490
|
-
return i && r &&
|
|
1488
|
+
var us = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, ps = (t, e, n, i) => {
|
|
1489
|
+
for (var r = i > 1 ? void 0 : i ? ds(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1490
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1491
|
+
return i && r && us(e, n, r), r;
|
|
1491
1492
|
}, Rt = (t, e) => (n, i) => e(n, i, t);
|
|
1492
1493
|
let nt = class extends Y {
|
|
1493
1494
|
constructor(t, e, n) {
|
|
@@ -1496,46 +1497,46 @@ let nt = class extends Y {
|
|
|
1496
1497
|
_commandExecutedListener() {
|
|
1497
1498
|
this.disposeWithMe(
|
|
1498
1499
|
this._commandService.beforeCommandExecuted((t) => {
|
|
1499
|
-
t.id ===
|
|
1500
|
+
t.id === Kn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1500
1501
|
workbookTypes: [xt],
|
|
1501
1502
|
rangeTypes: [Ut],
|
|
1502
|
-
worksheetTypes: [Nt,
|
|
1503
|
+
worksheetTypes: [Nt, Mn, Mt]
|
|
1503
1504
|
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
|
|
1504
1505
|
})
|
|
1505
1506
|
);
|
|
1506
1507
|
}
|
|
1507
1508
|
};
|
|
1508
|
-
nt =
|
|
1509
|
+
nt = ps([
|
|
1509
1510
|
Rt(0, R(ct)),
|
|
1510
1511
|
Rt(1, ie),
|
|
1511
|
-
Rt(2, R(
|
|
1512
|
+
Rt(2, R(On))
|
|
1512
1513
|
], nt);
|
|
1513
|
-
var
|
|
1514
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1515
|
-
(
|
|
1516
|
-
return i && r &&
|
|
1514
|
+
var hs = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, ms = (t, e, n, i) => {
|
|
1515
|
+
for (var r = i > 1 ? void 0 : i ? gs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1516
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1517
|
+
return i && r && hs(e, n, r), r;
|
|
1517
1518
|
}, Z = (t, e) => (n, i) => e(n, i, t);
|
|
1518
1519
|
let rt = class extends Y {
|
|
1519
|
-
constructor(t, e, n, i, r,
|
|
1520
|
-
super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionInterceptorBaseController = r, this._commandService =
|
|
1520
|
+
constructor(t, e, n, i, r, o, s, c, l, p) {
|
|
1521
|
+
super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionInterceptorBaseController = r, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = l, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
|
|
1521
1522
|
}
|
|
1522
1523
|
_getLinkPermission(t) {
|
|
1523
|
-
const { unitId: e, subUnitId: n, row: i, col: r } = t,
|
|
1524
|
-
if (!(
|
|
1524
|
+
const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET);
|
|
1525
|
+
if (!(o == null ? void 0 : o.getSheetBySheetId(n)))
|
|
1525
1526
|
return {
|
|
1526
1527
|
viewPermission: !1,
|
|
1527
1528
|
editPermission: !1,
|
|
1528
1529
|
copyPermission: !1
|
|
1529
1530
|
};
|
|
1530
1531
|
const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1531
|
-
workbookTypes: [
|
|
1532
|
-
worksheetTypes: [
|
|
1533
|
-
rangeTypes: [
|
|
1532
|
+
workbookTypes: [Ar],
|
|
1533
|
+
worksheetTypes: [Vr],
|
|
1534
|
+
rangeTypes: [Fr]
|
|
1534
1535
|
}, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), l = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1535
1536
|
workbookTypes: [xt],
|
|
1536
1537
|
worksheetTypes: [Nt, Mt],
|
|
1537
1538
|
rangeTypes: [Ut]
|
|
1538
|
-
}, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), p = this._permissionService.composePermission([new
|
|
1539
|
+
}, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), p = this._permissionService.composePermission([new Wr(e).id, new Zr(e, n).id]).every((u) => u.value);
|
|
1539
1540
|
return {
|
|
1540
1541
|
viewPermission: c,
|
|
1541
1542
|
editPermission: l,
|
|
@@ -1551,17 +1552,17 @@ let rt = class extends Y {
|
|
|
1551
1552
|
this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
1552
1553
|
return;
|
|
1553
1554
|
}
|
|
1554
|
-
const { unitId: e, subUnitId: n, row: i, col: r } = t,
|
|
1555
|
-
if (!
|
|
1555
|
+
const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._renderManagerService.getRenderById(e);
|
|
1556
|
+
if (!o)
|
|
1556
1557
|
return;
|
|
1557
|
-
const
|
|
1558
|
+
const s = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
|
|
1558
1559
|
if (!c)
|
|
1559
1560
|
return;
|
|
1560
|
-
if (!
|
|
1561
|
+
if (!o.with(Dr).active) {
|
|
1561
1562
|
this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING);
|
|
1562
1563
|
return;
|
|
1563
1564
|
}
|
|
1564
|
-
const p = (L =
|
|
1565
|
+
const p = (L = o == null ? void 0 : o.with(an).getWorksheetSkeleton(n)) == null ? void 0 : L.skeleton, u = r, g = i;
|
|
1565
1566
|
let d = g, v = u;
|
|
1566
1567
|
p && p.overflowCache.forValue((X, D, z) => {
|
|
1567
1568
|
ye.contains(z, { startColumn: u, endColumn: u, startRow: g, endRow: g }) && (d = X, v = D);
|
|
@@ -1571,7 +1572,7 @@ let rt = class extends Y {
|
|
|
1571
1572
|
this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
1572
1573
|
return;
|
|
1573
1574
|
}
|
|
1574
|
-
const a = c.getCellStyleOnly(d, v), w =
|
|
1575
|
+
const a = c.getCellStyleOnly(d, v), w = s.getStyles().getStyleByCell(a), M = (k = w == null ? void 0 : w.tr) == null ? void 0 : k.a;
|
|
1575
1576
|
if (!M && !t.customRange) {
|
|
1576
1577
|
this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
1577
1578
|
return;
|
|
@@ -1601,10 +1602,10 @@ let rt = class extends Y {
|
|
|
1601
1602
|
t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
|
|
1602
1603
|
return;
|
|
1603
1604
|
}
|
|
1604
|
-
const { editorUnitId: i, unitId: r, sheetId:
|
|
1605
|
+
const { editorUnitId: i, unitId: r, sheetId: o, row: s, column: c } = n, l = this._renderManagerService.getRenderById(i);
|
|
1605
1606
|
if (!l)
|
|
1606
1607
|
return;
|
|
1607
|
-
const { editPermission: p, viewPermission: u, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId:
|
|
1608
|
+
const { editPermission: p, viewPermission: u, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: o, row: s, col: c }), d = l.with(un);
|
|
1608
1609
|
u && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(We(200)).subscribe((v) => {
|
|
1609
1610
|
var w, M;
|
|
1610
1611
|
const I = v.find((L) => L.range.rangeType === Ge.HYPERLINK);
|
|
@@ -1613,13 +1614,13 @@ let rt = class extends Y {
|
|
|
1613
1614
|
return;
|
|
1614
1615
|
}
|
|
1615
1616
|
const _ = I.rects[I.rects.length - 1];
|
|
1616
|
-
if (!((M = (w = this._renderManagerService.getRenderById(r)) == null ? void 0 : w.with(an).getWorksheetSkeleton(
|
|
1617
|
+
if (!((M = (w = this._renderManagerService.getRenderById(r)) == null ? void 0 : w.with(an).getWorksheetSkeleton(o)) == null ? void 0 : M.skeleton) || !_)
|
|
1617
1618
|
return;
|
|
1618
1619
|
const a = l.engine.getCanvasElement().getBoundingClientRect();
|
|
1619
1620
|
this._sheetsHyperLinkPopupService.showPopup({
|
|
1620
1621
|
unitId: r,
|
|
1621
|
-
subUnitId:
|
|
1622
|
-
row:
|
|
1622
|
+
subUnitId: o,
|
|
1623
|
+
row: s,
|
|
1623
1624
|
col: c,
|
|
1624
1625
|
customRange: I.range,
|
|
1625
1626
|
customRangeRect: {
|
|
@@ -1647,20 +1648,20 @@ let rt = class extends Y {
|
|
|
1647
1648
|
this._univerInstanceService.focused$.pipe(
|
|
1648
1649
|
ue((t) => {
|
|
1649
1650
|
const e = t === x ? this._renderManagerService.getRenderById(t) : null;
|
|
1650
|
-
return e ? e.with(un).hoverCustomRanges$.pipe(We(200)) : new
|
|
1651
|
+
return e ? e.with(un).hoverCustomRanges$.pipe(We(200)) : new gi((n) => {
|
|
1651
1652
|
n.next(null);
|
|
1652
1653
|
});
|
|
1653
1654
|
})
|
|
1654
1655
|
).subscribe((t) => {
|
|
1655
1656
|
const e = t == null ? void 0 : t.find((i) => i.range.rangeType === Ge.HYPERLINK), n = this._editorBridgeService.getEditCellState();
|
|
1656
1657
|
if (e && n) {
|
|
1657
|
-
const { unitId: i, sheetId: r, row:
|
|
1658
|
+
const { unitId: i, sheetId: r, row: o, column: s } = n, { editPermission: c, viewPermission: l, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: o, col: s });
|
|
1658
1659
|
l && this._sheetsHyperLinkPopupService.showPopup({
|
|
1659
1660
|
type: f.ZEN_EDITOR,
|
|
1660
1661
|
unitId: i,
|
|
1661
1662
|
subUnitId: r,
|
|
1662
|
-
row:
|
|
1663
|
-
col:
|
|
1663
|
+
row: o,
|
|
1664
|
+
col: s,
|
|
1664
1665
|
customRange: e.range,
|
|
1665
1666
|
editPermission: c,
|
|
1666
1667
|
copyPermission: p
|
|
@@ -1678,28 +1679,28 @@ let rt = class extends Y {
|
|
|
1678
1679
|
);
|
|
1679
1680
|
}
|
|
1680
1681
|
_initCommandListener() {
|
|
1681
|
-
const t = [
|
|
1682
|
+
const t = [Gr.id, Kr.id, Yr.id];
|
|
1682
1683
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
1683
1684
|
t.includes(e.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
1684
1685
|
}));
|
|
1685
1686
|
}
|
|
1686
1687
|
};
|
|
1687
|
-
rt =
|
|
1688
|
-
Z(0, R(
|
|
1688
|
+
rt = ms([
|
|
1689
|
+
Z(0, R(Hr)),
|
|
1689
1690
|
Z(1, R(G)),
|
|
1690
1691
|
Z(2, R($e)),
|
|
1691
|
-
Z(3, R(
|
|
1692
|
-
Z(4, R(
|
|
1692
|
+
Z(3, R(dr)),
|
|
1693
|
+
Z(4, R(On)),
|
|
1693
1694
|
Z(5, ie),
|
|
1694
1695
|
Z(6, re),
|
|
1695
1696
|
Z(7, R(De)),
|
|
1696
1697
|
Z(8, K),
|
|
1697
1698
|
Z(9, pt)
|
|
1698
1699
|
], rt);
|
|
1699
|
-
var
|
|
1700
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1701
|
-
(
|
|
1702
|
-
return i && r &&
|
|
1700
|
+
var fs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Yn = (t, e, n, i) => {
|
|
1701
|
+
for (var r = i > 1 ? void 0 : i ? vs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1702
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1703
|
+
return i && r && fs(e, n, r), r;
|
|
1703
1704
|
}, wt = (t, e) => (n, i) => e(n, i, t);
|
|
1704
1705
|
let Ot = class extends Y {
|
|
1705
1706
|
constructor(t, e) {
|
|
@@ -1715,7 +1716,7 @@ let Ot = class extends Y {
|
|
|
1715
1716
|
}));
|
|
1716
1717
|
}
|
|
1717
1718
|
};
|
|
1718
|
-
Ot =
|
|
1719
|
+
Ot = Yn([
|
|
1719
1720
|
wt(1, R(dt))
|
|
1720
1721
|
], Ot);
|
|
1721
1722
|
let it = class extends Y {
|
|
@@ -1725,12 +1726,12 @@ let it = class extends Y {
|
|
|
1725
1726
|
_initViewModelIntercept() {
|
|
1726
1727
|
this.disposeWithMe(
|
|
1727
1728
|
this._sheetInterceptorService.intercept(
|
|
1728
|
-
|
|
1729
|
+
qr.CELL_CONTENT,
|
|
1729
1730
|
{
|
|
1730
|
-
effect:
|
|
1731
|
+
effect: pr.Value,
|
|
1731
1732
|
priority: 100,
|
|
1732
1733
|
handler: (t, e, n) => {
|
|
1733
|
-
const { row: i, col: r, unitId:
|
|
1734
|
+
const { row: i, col: r, unitId: o, subUnitId: s } = e, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, i, r);
|
|
1734
1735
|
return n(c ? {
|
|
1735
1736
|
...t,
|
|
1736
1737
|
linkUrl: c.payload,
|
|
@@ -1742,41 +1743,41 @@ let it = class extends Y {
|
|
|
1742
1743
|
);
|
|
1743
1744
|
}
|
|
1744
1745
|
};
|
|
1745
|
-
it =
|
|
1746
|
-
wt(0, R(
|
|
1746
|
+
it = Yn([
|
|
1747
|
+
wt(0, R(zr)),
|
|
1747
1748
|
wt(1, R(dt))
|
|
1748
1749
|
], it);
|
|
1749
|
-
const
|
|
1750
|
-
[
|
|
1750
|
+
const _s = {
|
|
1751
|
+
[ei.OTHERS]: {
|
|
1751
1752
|
[de.id]: {
|
|
1752
1753
|
order: 2,
|
|
1753
|
-
menuItemFactory:
|
|
1754
|
+
menuItemFactory: ss
|
|
1754
1755
|
},
|
|
1755
1756
|
[Qe(de.id)]: {
|
|
1756
1757
|
order: 2,
|
|
1757
|
-
menuItemFactory:
|
|
1758
|
+
menuItemFactory: os
|
|
1758
1759
|
}
|
|
1759
1760
|
},
|
|
1760
|
-
[
|
|
1761
|
-
[
|
|
1761
|
+
[ti.MAIN_AREA]: {
|
|
1762
|
+
[ni.OTHERS]: {
|
|
1762
1763
|
order: 1,
|
|
1763
1764
|
[de.id]: {
|
|
1764
1765
|
order: 0,
|
|
1765
|
-
menuItemFactory:
|
|
1766
|
+
menuItemFactory: rs
|
|
1766
1767
|
},
|
|
1767
1768
|
[Qe(de.id)]: {
|
|
1768
1769
|
order: 0,
|
|
1769
|
-
menuItemFactory:
|
|
1770
|
+
menuItemFactory: is
|
|
1770
1771
|
}
|
|
1771
1772
|
}
|
|
1772
1773
|
}
|
|
1773
1774
|
};
|
|
1774
|
-
var
|
|
1775
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1776
|
-
(
|
|
1777
|
-
return i && r &&
|
|
1775
|
+
var Ss = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Cs = (t, e, n, i) => {
|
|
1776
|
+
for (var r = i > 1 ? void 0 : i ? Is(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1777
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1778
|
+
return i && r && Ss(e, n, r), r;
|
|
1778
1779
|
}, Te = (t, e) => (n, i) => e(n, i, t);
|
|
1779
|
-
let
|
|
1780
|
+
let st = class extends Y {
|
|
1780
1781
|
constructor(t, e, n, i, r) {
|
|
1781
1782
|
super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = i, this._shortcutService = r, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
|
|
1782
1783
|
}
|
|
@@ -1800,25 +1801,25 @@ let ot = class extends Y {
|
|
|
1800
1801
|
});
|
|
1801
1802
|
}
|
|
1802
1803
|
_initMenus() {
|
|
1803
|
-
this._menuManagerService.mergeMenu(
|
|
1804
|
+
this._menuManagerService.mergeMenu(_s);
|
|
1804
1805
|
}
|
|
1805
1806
|
_initShortCut() {
|
|
1806
|
-
this._shortcutService.registerShortcut(
|
|
1807
|
+
this._shortcutService.registerShortcut(Kn);
|
|
1807
1808
|
}
|
|
1808
1809
|
};
|
|
1809
|
-
|
|
1810
|
-
Te(0, R(
|
|
1810
|
+
st = Cs([
|
|
1811
|
+
Te(0, R(ri)),
|
|
1811
1812
|
Te(1, ie),
|
|
1812
|
-
Te(2,
|
|
1813
|
+
Te(2, si),
|
|
1813
1814
|
Te(3, R(lt)),
|
|
1814
|
-
Te(4, R(
|
|
1815
|
-
],
|
|
1816
|
-
var
|
|
1817
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1818
|
-
(
|
|
1819
|
-
return i && r &&
|
|
1820
|
-
},
|
|
1821
|
-
let
|
|
1815
|
+
Te(4, R(ii))
|
|
1816
|
+
], st);
|
|
1817
|
+
var ys = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Rs = (t, e, n, i) => {
|
|
1818
|
+
for (var r = i > 1 ? void 0 : i ? Es(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1819
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1820
|
+
return i && r && ys(e, n, r), r;
|
|
1821
|
+
}, yn = (t, e) => (n, i) => e(n, i, t);
|
|
1822
|
+
let ot = class extends Y {
|
|
1822
1823
|
constructor(t, e) {
|
|
1823
1824
|
super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
|
|
1824
1825
|
}
|
|
@@ -1830,57 +1831,61 @@ let st = class extends Y {
|
|
|
1830
1831
|
}
|
|
1831
1832
|
}
|
|
1832
1833
|
};
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
],
|
|
1837
|
-
var
|
|
1838
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1839
|
-
(
|
|
1840
|
-
return i && r &&
|
|
1841
|
-
},
|
|
1842
|
-
let at = class extends
|
|
1843
|
-
constructor(t =
|
|
1834
|
+
ot = Rs([
|
|
1835
|
+
yn(0, R(kt)),
|
|
1836
|
+
yn(1, R(pe))
|
|
1837
|
+
], ot);
|
|
1838
|
+
var zn = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ps = (t, e, n) => e in t ? zn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, bs = (t, e, n, i) => {
|
|
1839
|
+
for (var r = i > 1 ? void 0 : i ? Ls(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
1840
|
+
(s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
|
|
1841
|
+
return i && r && zn(e, n, r), r;
|
|
1842
|
+
}, En = (t, e) => (n, i) => e(n, i, t), qn = (t, e, n) => Ps(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1843
|
+
let at = class extends gr {
|
|
1844
|
+
constructor(t = gn, e, n) {
|
|
1844
1845
|
super(), this._config = t, this._injector = e, this._configService = n;
|
|
1845
|
-
const { menu: i, ...r } =
|
|
1846
|
-
|
|
1846
|
+
const { menu: i, ...r } = mr(
|
|
1847
|
+
{},
|
|
1848
|
+
gn,
|
|
1849
|
+
this._config
|
|
1850
|
+
);
|
|
1851
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig($n, r);
|
|
1847
1852
|
}
|
|
1848
1853
|
onStarting() {
|
|
1849
1854
|
[
|
|
1850
1855
|
[pe],
|
|
1851
1856
|
[G],
|
|
1852
|
-
[
|
|
1857
|
+
[jn],
|
|
1853
1858
|
[it],
|
|
1854
1859
|
[rt],
|
|
1855
|
-
[
|
|
1860
|
+
[st],
|
|
1856
1861
|
[tt],
|
|
1857
1862
|
[Ye],
|
|
1858
1863
|
[nt],
|
|
1859
|
-
[
|
|
1864
|
+
[ot]
|
|
1860
1865
|
].forEach((e) => this._injector.add(e)), this._injector.get(it);
|
|
1861
1866
|
}
|
|
1862
1867
|
onReady() {
|
|
1863
|
-
this._injector.get($e).registerRenderModule(O.UNIVER_SHEET, [Ot]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(
|
|
1868
|
+
this._injector.get($e).registerRenderModule(O.UNIVER_SHEET, [Ot]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(st);
|
|
1864
1869
|
}
|
|
1865
1870
|
onRendered() {
|
|
1866
|
-
this._injector.get(nt), this._injector.get(
|
|
1871
|
+
this._injector.get(nt), this._injector.get(ot), this._injector.get(rt);
|
|
1867
1872
|
}
|
|
1868
1873
|
};
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
at =
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1874
|
+
qn(at, "pluginName", Ht);
|
|
1875
|
+
qn(at, "type", O.UNIVER_SHEET);
|
|
1876
|
+
at = bs([
|
|
1877
|
+
hr(Er, li),
|
|
1878
|
+
En(1, R(lt)),
|
|
1879
|
+
En(2, Ln)
|
|
1875
1880
|
], at);
|
|
1876
1881
|
export {
|
|
1877
1882
|
Je as CloseHyperLinkPopupOperation,
|
|
1878
1883
|
Bt as InsertHyperLinkOperation,
|
|
1879
|
-
|
|
1884
|
+
Kn as InsertLinkShortcut,
|
|
1880
1885
|
jt as OpenHyperLinkEditPanelOperation,
|
|
1881
1886
|
Ye as SheetsHyperLinkCopyPasteController,
|
|
1882
1887
|
G as SheetsHyperLinkPopupService,
|
|
1883
1888
|
pe as SheetsHyperLinkResolverService,
|
|
1884
|
-
|
|
1889
|
+
jn as SheetsHyperLinkSidePanelService,
|
|
1885
1890
|
at as UniverSheetsHyperLinkUIPlugin
|
|
1886
1891
|
};
|