@univerjs/sheets-hyper-link-ui 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +319 -321
- package/lib/locale/ru-RU.json +23 -23
- package/lib/types/index.d.ts +1 -2
- package/lib/umd/index.js +2 -2
- package/package.json +22 -24
package/lib/es/index.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Gt = (e, t, n) => t in e ?
|
|
1
|
+
var zt = Object.defineProperty;
|
|
2
|
+
var Gt = (e, t, n) => t in e ? zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var D = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { Disposable as O, UniverInstanceType as w, OnLifecycle as N, LifecycleStages as $, IUniverInstanceService as ue, BooleanNumber as qt, ThemeService as Xt, isValidRange as
|
|
5
|
-
import { RemoveSheetCommand as on, SheetInterceptorService as et, INTERCEPTOR_POINT as sn, SetSelectionsOperation as an, NORMAL_SELECTION_PLUGIN_NAME as cn, SetWorksheetActiveOperation as
|
|
6
|
-
import { Inject as h, Injector as
|
|
4
|
+
import { Disposable as O, UniverInstanceType as w, OnLifecycle as N, LifecycleStages as $, IUniverInstanceService as ue, BooleanNumber as qt, ThemeService as Xt, isValidRange as ze, LocaleService as pe, RANGE_TYPE as lt, Rectangle as ee, ICommandService as W, Tools as te, DEFAULT_EMPTY_DOCUMENT_VALUE as Jt, createInternalEditorID as Qt, CommandType as He, CellValueType as en, ObjectMatrix as _t, Range as Qe, IPermissionService as tn, Plugin as nn, DependentOn as rn } from "@univerjs/core";
|
|
5
|
+
import { RemoveSheetCommand as on, SheetInterceptorService as et, INTERCEPTOR_POINT as sn, SetSelectionsOperation as an, NORMAL_SELECTION_PLUGIN_NAME as cn, SetWorksheetActiveOperation as Oe, getSheetCommandTarget as Ct, SelectionManagerService as yt, SetRangeValuesMutation as fe, SetRangeValuesUndoMutationFactory as dt, SetRangeValuesCommand as ln, ClearSelectionContentCommand as dn, ClearSelectionAllCommand as un, ClearSelectionFormatCommand as pn, WorkbookViewPermission as hn, WorksheetViewPermission as mn, RangeProtectionPermissionViewPoint as gn, WorkbookEditablePermission as Ne, WorksheetEditPermission as $e, WorksheetInsertHyperlinkPermission as Be, RangeProtectionPermissionEditPoint as Ve, WorkbookCopyPermission as fn, WorksheetCopyPermission as vn, WorksheetSetCellValuePermission as tt } from "@univerjs/sheets";
|
|
6
|
+
import { Inject as h, Injector as Ae } from "@wendellhu/redi";
|
|
7
7
|
import { RemoveHyperLinkMutation as M, AddHyperLinkMutation as x, HyperLinkModel as T, ERROR_RANGE as Ge, UpdateHyperLinkCommand as St, AddHyperLinkCommand as Lt, CancelHyperLinkCommand as _n, UniverSheetsHyperLinkPlugin as Cn } from "@univerjs/sheets-hyper-link";
|
|
8
|
-
import { SheetSkeletonManagerService as It, ScrollToRangeOperation as kt, SheetCanvasPopManagerService as yn, HoverManagerService as Sn, SheetPermissionInterceptorBaseController as Pt, whenSheetEditorFocused as Ln, getCurrentRangeDisable$ as bt, APPLY_TYPE as
|
|
8
|
+
import { SheetSkeletonManagerService as It, ScrollToRangeOperation as kt, SheetCanvasPopManagerService as yn, HoverManagerService as Sn, SheetPermissionInterceptorBaseController as Pt, whenSheetEditorFocused as Ln, getCurrentRangeDisable$ as bt, APPLY_TYPE as re, IAutoFillService as In, virtualizeDiscreteRanges as qe, getAutoFillRepeatRange as kn, COPY_TYPE as ut, rangeToDiscreteRange as Pn, PREDEFINED_HOOK_NAME as ve, getRepeatRange as bn, ISheetClipboardService as Rn } from "@univerjs/sheets-ui";
|
|
9
9
|
import { IRenderManagerService as nt } from "@univerjs/engine-render";
|
|
10
10
|
import { Subject as wn, BehaviorSubject as On, debounceTime as En } from "rxjs";
|
|
11
|
-
import Mn, { forwardRef as Z, useRef as Rt, createElement as
|
|
11
|
+
import Mn, { forwardRef as Z, useRef as Rt, createElement as K, useState as ie, useEffect as xn, useMemo as Tn } from "react";
|
|
12
12
|
import { useDependency as k } from "@wendellhu/redi/react-bindings";
|
|
13
13
|
import pt from "clsx";
|
|
14
|
-
import { MessageType as
|
|
15
|
-
import { IMessageService as wt, useObservable as Ot, useEvent as Un, RangeSelector as jn, ISidebarService as Et, KeyCode as Hn, MetaKeys as Nn, MenuItemType as Mt, MenuPosition as xt, getMenuHiddenObservable as Tt, MenuGroup as $n, ComponentManager as
|
|
16
|
-
import { deserializeRangeWithSheet as
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
for (var i = r > 1 ? void 0 : r ? zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
14
|
+
import { MessageType as ce, FormLayout as X, Input as ht, Select as Ze, Button as mt, Tooltip as _e } from "@univerjs/design";
|
|
15
|
+
import { IMessageService as wt, useObservable as Ot, useEvent as Un, RangeSelector as jn, ISidebarService as Et, KeyCode as Hn, MetaKeys as Nn, MenuItemType as Mt, MenuPosition as xt, getMenuHiddenObservable as Tt, MenuGroup as $n, ComponentManager as Bn, IShortcutService as Vn, IMenuService as An } from "@univerjs/ui";
|
|
16
|
+
import { deserializeRangeWithSheet as Ee, serializeRangeWithSheet as Ut, IDefinedNamesService as jt, serializeRangeToRefString as Dn, serializeRange as Fn } from "@univerjs/engine-formula";
|
|
17
|
+
var Wn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Kn = (e, t, n, r) => {
|
|
18
|
+
for (var i = r > 1 ? void 0 : r ? Zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
20
19
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
21
|
-
return r && i &&
|
|
22
|
-
},
|
|
23
|
-
let
|
|
20
|
+
return r && i && Wn(t, n, i), i;
|
|
21
|
+
}, Ke = (e, t) => (n, r) => t(n, r, e);
|
|
22
|
+
let ye = class extends O {
|
|
24
23
|
constructor(e, t, n) {
|
|
25
24
|
super(), this._sheetInterceptorService = e, this._univerInstanceService = t, this._hyperLinkModel = n, this._initSheetChange();
|
|
26
25
|
}
|
|
@@ -59,14 +58,14 @@ let Ce = class extends O {
|
|
|
59
58
|
);
|
|
60
59
|
}
|
|
61
60
|
};
|
|
62
|
-
|
|
63
|
-
N($.Ready,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
var Yn = Object.defineProperty,
|
|
69
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
61
|
+
ye = Kn([
|
|
62
|
+
N($.Ready, ye),
|
|
63
|
+
Ke(0, h(et)),
|
|
64
|
+
Ke(1, ue),
|
|
65
|
+
Ke(2, h(T))
|
|
66
|
+
], ye);
|
|
67
|
+
var Yn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Ht = (e, t, n, r) => {
|
|
68
|
+
for (var i = r > 1 ? void 0 : r ? zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
70
69
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
71
70
|
return r && i && Yn(t, n, i), i;
|
|
72
71
|
}, Q = (e, t) => (n, r) => t(n, r, e);
|
|
@@ -95,7 +94,7 @@ Xe = Ht([
|
|
|
95
94
|
Q(2, h(It)),
|
|
96
95
|
Q(3, nt)
|
|
97
96
|
], Xe);
|
|
98
|
-
let
|
|
97
|
+
let Se = class extends O {
|
|
99
98
|
constructor(e, t, n) {
|
|
100
99
|
super(), this._sheetInterceptorService = e, this._hyperLinkModel = t, this._themeService = n, this._initViewModelIntercept();
|
|
101
100
|
}
|
|
@@ -124,13 +123,13 @@ let ye = class extends O {
|
|
|
124
123
|
);
|
|
125
124
|
}
|
|
126
125
|
};
|
|
127
|
-
|
|
128
|
-
N($.Ready,
|
|
126
|
+
Se = Ht([
|
|
127
|
+
N($.Ready, Se),
|
|
129
128
|
Q(0, h(et)),
|
|
130
129
|
Q(1, h(T)),
|
|
131
130
|
Q(2, h(Xt))
|
|
132
|
-
],
|
|
133
|
-
var Nt = { exports: {} },
|
|
131
|
+
], Se);
|
|
132
|
+
var Nt = { exports: {} }, De = {};
|
|
134
133
|
/**
|
|
135
134
|
* @license React
|
|
136
135
|
* react-jsx-runtime.production.min.js
|
|
@@ -140,18 +139,18 @@ var Nt = { exports: {} }, Ve = {};
|
|
|
140
139
|
* This source code is licensed under the MIT license found in the
|
|
141
140
|
* LICENSE file in the root directory of this source tree.
|
|
142
141
|
*/
|
|
143
|
-
var
|
|
142
|
+
var Gn = Mn, qn = Symbol.for("react.element"), Xn = Symbol.for("react.fragment"), Jn = Object.prototype.hasOwnProperty, Qn = Gn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, er = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
144
143
|
function $t(e, t, n) {
|
|
145
144
|
var r, i = {}, o = null, s = null;
|
|
146
145
|
n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
|
|
147
|
-
for (r in t)
|
|
146
|
+
for (r in t) Jn.call(t, r) && !er.hasOwnProperty(r) && (i[r] = t[r]);
|
|
148
147
|
if (e && e.defaultProps) for (r in t = e.defaultProps, t) i[r] === void 0 && (i[r] = t[r]);
|
|
149
|
-
return { $$typeof:
|
|
148
|
+
return { $$typeof: qn, type: e, key: o, ref: s, props: i, _owner: Qn.current };
|
|
150
149
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Nt.exports =
|
|
150
|
+
De.Fragment = Xn;
|
|
151
|
+
De.jsx = $t;
|
|
152
|
+
De.jsxs = $t;
|
|
153
|
+
Nt.exports = De;
|
|
155
154
|
var d = Nt.exports, b = function() {
|
|
156
155
|
return b = Object.assign || function(e) {
|
|
157
156
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
@@ -160,23 +159,23 @@ var d = Nt.exports, b = function() {
|
|
|
160
159
|
}
|
|
161
160
|
return e;
|
|
162
161
|
}, b.apply(this, arguments);
|
|
163
|
-
},
|
|
162
|
+
}, tr = function(e, t) {
|
|
164
163
|
var n = {};
|
|
165
164
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
166
165
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
167
166
|
for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
|
|
168
167
|
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
169
168
|
return n;
|
|
170
|
-
},
|
|
171
|
-
var n = e.icon, r = e.id, i = e.className, o = e.extend, s =
|
|
172
|
-
return
|
|
169
|
+
}, Y = Z(function(e, t) {
|
|
170
|
+
var n = e.icon, r = e.id, i = e.className, o = e.extend, s = tr(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Rt("_".concat(ir()));
|
|
171
|
+
return Bt(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, b({ ref: t, className: c }, s), o);
|
|
173
172
|
});
|
|
174
|
-
function
|
|
175
|
-
return
|
|
176
|
-
return
|
|
173
|
+
function Bt(e, t, n, r, i) {
|
|
174
|
+
return K(e.tag, b(b({ key: t }, nr(e, n, i)), r), (rr(e, n).children || []).map(function(o, s) {
|
|
175
|
+
return Bt(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, i);
|
|
177
176
|
}));
|
|
178
177
|
}
|
|
179
|
-
function
|
|
178
|
+
function nr(e, t, n) {
|
|
180
179
|
var r = b({}, e.attrs);
|
|
181
180
|
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
|
|
182
181
|
var i = t.defIds;
|
|
@@ -185,70 +184,70 @@ function rr(e, t, n) {
|
|
|
185
184
|
typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
186
185
|
})), r;
|
|
187
186
|
}
|
|
188
|
-
function
|
|
187
|
+
function rr(e, t) {
|
|
189
188
|
var n, r = t.defIds;
|
|
190
189
|
return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? b(b({}, e), { children: e.children.map(function(i) {
|
|
191
190
|
return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? b(b({}, i), { attrs: b(b({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
|
|
192
191
|
}) }) : e;
|
|
193
192
|
}
|
|
194
|
-
function
|
|
193
|
+
function ir() {
|
|
195
194
|
return Math.random().toString(36).substring(2, 8);
|
|
196
195
|
}
|
|
197
|
-
|
|
198
|
-
var
|
|
199
|
-
return
|
|
196
|
+
Y.displayName = "UniverIcon";
|
|
197
|
+
var or = { 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" } }] }, Le = Z(function(e, t) {
|
|
198
|
+
return K(Y, Object.assign({}, e, {
|
|
200
199
|
id: "all-border-single",
|
|
201
200
|
ref: t,
|
|
202
|
-
icon:
|
|
201
|
+
icon: or
|
|
203
202
|
}));
|
|
204
203
|
});
|
|
205
|
-
|
|
206
|
-
var
|
|
207
|
-
return
|
|
204
|
+
Le.displayName = "AllBorderSingle";
|
|
205
|
+
var sr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vt = Z(function(e, t) {
|
|
206
|
+
return K(Y, Object.assign({}, e, {
|
|
208
207
|
id: "copy-single",
|
|
209
208
|
ref: t,
|
|
210
|
-
icon:
|
|
209
|
+
icon: sr
|
|
211
210
|
}));
|
|
212
211
|
});
|
|
213
|
-
|
|
214
|
-
var
|
|
215
|
-
return
|
|
212
|
+
Vt.displayName = "CopySingle";
|
|
213
|
+
var ar = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Me = Z(function(e, t) {
|
|
214
|
+
return K(Y, Object.assign({}, e, {
|
|
216
215
|
id: "link-single",
|
|
217
216
|
ref: t,
|
|
218
|
-
icon:
|
|
217
|
+
icon: ar
|
|
219
218
|
}));
|
|
220
219
|
});
|
|
221
|
-
|
|
222
|
-
var
|
|
223
|
-
return
|
|
220
|
+
Me.displayName = "LinkSingle";
|
|
221
|
+
var cr = { 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" } }] }, At = Z(function(e, t) {
|
|
222
|
+
return K(Y, Object.assign({}, e, {
|
|
224
223
|
id: "unlink-single",
|
|
225
224
|
ref: t,
|
|
226
|
-
icon:
|
|
225
|
+
icon: cr
|
|
227
226
|
}));
|
|
228
227
|
});
|
|
229
|
-
|
|
230
|
-
var
|
|
231
|
-
return
|
|
228
|
+
At.displayName = "UnlinkSingle";
|
|
229
|
+
var lr = { 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" } }] }, Dt = Z(function(e, t) {
|
|
230
|
+
return K(Y, Object.assign({}, e, {
|
|
232
231
|
id: "write-single",
|
|
233
232
|
ref: t,
|
|
234
|
-
icon:
|
|
233
|
+
icon: lr
|
|
235
234
|
}));
|
|
236
235
|
});
|
|
237
236
|
Dt.displayName = "WriteSingle";
|
|
238
|
-
var
|
|
239
|
-
return
|
|
237
|
+
var dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Je = Z(function(e, t) {
|
|
238
|
+
return K(Y, Object.assign({}, e, {
|
|
240
239
|
id: "xlsx",
|
|
241
240
|
ref: t,
|
|
242
|
-
icon:
|
|
241
|
+
icon: dr
|
|
243
242
|
}));
|
|
244
243
|
});
|
|
245
244
|
Je.displayName = "Xlsx";
|
|
246
|
-
var
|
|
247
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
245
|
+
var ur = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, hr = (e, t, n, r) => {
|
|
246
|
+
for (var i = r > 1 ? void 0 : r ? pr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
248
247
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
249
|
-
return r && i &&
|
|
250
|
-
},
|
|
251
|
-
function
|
|
248
|
+
return r && i && ur(t, n, i), i;
|
|
249
|
+
}, oe = (e, t) => (n, r) => t(n, r, e);
|
|
250
|
+
function mr(e, t) {
|
|
252
251
|
const n = t.getMergeData(), r = t.getMaxColumns() - 1, i = t.getMaxRows() - 1;
|
|
253
252
|
if (r < e.endColumn && (e.endColumn = r), i < e.endRow && (e.endRow = i), e.rangeType === lt.COLUMN || lt.ROW)
|
|
254
253
|
return e;
|
|
@@ -257,7 +256,7 @@ function gr(e, t) {
|
|
|
257
256
|
ee.intersects(e, s) && o.push(s);
|
|
258
257
|
}), ee.realUnion(e, ...o);
|
|
259
258
|
}
|
|
260
|
-
let
|
|
259
|
+
let F = class {
|
|
261
260
|
constructor(e, t, n, r, i) {
|
|
262
261
|
this._univerInstanceService = e, this._commandService = t, this._definedNamesService = n, this._messageService = r, this._localeService = i;
|
|
263
262
|
}
|
|
@@ -268,8 +267,8 @@ let W = class {
|
|
|
268
267
|
return null;
|
|
269
268
|
const o = t ? i.getSheetBySheetId(t) : i.getActiveSheet(), s = (c = o == null ? void 0 : o.getName()) != null ? c : "";
|
|
270
269
|
if (n) {
|
|
271
|
-
const a =
|
|
272
|
-
return
|
|
270
|
+
const a = Ee(n).range;
|
|
271
|
+
return ze(a) && n !== Ge ? {
|
|
273
272
|
type: "range",
|
|
274
273
|
name: Ut(s, a)
|
|
275
274
|
} : {
|
|
@@ -306,8 +305,8 @@ let W = class {
|
|
|
306
305
|
const o = i.getUnitId();
|
|
307
306
|
if (r && this.navigateToDefineName(o, r), !!t) {
|
|
308
307
|
if (n) {
|
|
309
|
-
const s =
|
|
310
|
-
|
|
308
|
+
const s = Ee(n);
|
|
309
|
+
ze(s.range) && n !== Ge && this.navigateToRange(o, t, s.range);
|
|
311
310
|
return;
|
|
312
311
|
}
|
|
313
312
|
this.navigateToSheetById(o, t);
|
|
@@ -343,7 +342,7 @@ let W = class {
|
|
|
343
342
|
async navigateToRange(e, t, n) {
|
|
344
343
|
const r = await this.navigateToSheetById(e, t);
|
|
345
344
|
if (r) {
|
|
346
|
-
const i =
|
|
345
|
+
const i = mr(n, r);
|
|
347
346
|
await this._commandService.executeCommand(
|
|
348
347
|
an.id,
|
|
349
348
|
{
|
|
@@ -370,15 +369,15 @@ let W = class {
|
|
|
370
369
|
if (!i) {
|
|
371
370
|
this._messageService.show({
|
|
372
371
|
content: this._localeService.t("hyperLink.message.noSheet"),
|
|
373
|
-
type:
|
|
372
|
+
type: ce.Error
|
|
374
373
|
});
|
|
375
374
|
return;
|
|
376
375
|
}
|
|
377
376
|
const o = i.getSheetId();
|
|
378
377
|
return n.getHiddenWorksheets().indexOf(o) > -1 && this._messageService.show({
|
|
379
378
|
content: this._localeService.t("hyperLink.message.hiddenSheet"),
|
|
380
|
-
type:
|
|
381
|
-
}), await this._commandService.executeCommand(
|
|
379
|
+
type: ce.Error
|
|
380
|
+
}), await this._commandService.executeCommand(Oe.id, { unitId: e, subUnitId: o });
|
|
382
381
|
}
|
|
383
382
|
async navigateToSheetById(e, t) {
|
|
384
383
|
const n = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
|
|
@@ -392,10 +391,10 @@ let W = class {
|
|
|
392
391
|
const i = n.getSheetBySheetId(t);
|
|
393
392
|
return i ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
|
|
394
393
|
content: this._localeService.t("hyperLink.message.hiddenSheet"),
|
|
395
|
-
type:
|
|
396
|
-
}), !1) : await this._commandService.executeCommand(
|
|
394
|
+
type: ce.Error
|
|
395
|
+
}), !1) : await this._commandService.executeCommand(Oe.id, { unitId: e, subUnitId: t }) ? i : !1 : (this._messageService.show({
|
|
397
396
|
content: this._localeService.t("hyperLink.message.noSheet"),
|
|
398
|
-
type:
|
|
397
|
+
type: ce.Error
|
|
399
398
|
}), !1);
|
|
400
399
|
}
|
|
401
400
|
async navigateToDefineName(e, t) {
|
|
@@ -405,31 +404,30 @@ let W = class {
|
|
|
405
404
|
window.open(e, "_blank", "noopener noreferrer");
|
|
406
405
|
}
|
|
407
406
|
};
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
],
|
|
415
|
-
const fr = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, vr = new RegExp(fr);
|
|
407
|
+
F = hr([
|
|
408
|
+
oe(0, ue),
|
|
409
|
+
oe(1, W),
|
|
410
|
+
oe(2, jt),
|
|
411
|
+
oe(3, wt),
|
|
412
|
+
oe(4, h(pe))
|
|
413
|
+
], F);
|
|
416
414
|
function de(e) {
|
|
417
|
-
return
|
|
415
|
+
return te.isLegalUrl(e);
|
|
418
416
|
}
|
|
419
|
-
function
|
|
417
|
+
function gr(e) {
|
|
420
418
|
return /^[a-zA-Z]+:\/\//.test(e);
|
|
421
419
|
}
|
|
422
|
-
function
|
|
420
|
+
function fr(e) {
|
|
423
421
|
return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(e);
|
|
424
422
|
}
|
|
425
423
|
function rt(e) {
|
|
426
424
|
if (de(e)) {
|
|
427
|
-
const t =
|
|
425
|
+
const t = gr(e) ? e : fr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
|
|
428
426
|
return n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search ? n.hash : t;
|
|
429
427
|
}
|
|
430
428
|
return e;
|
|
431
429
|
}
|
|
432
|
-
function
|
|
430
|
+
function vr(e) {
|
|
433
431
|
if (e === null)
|
|
434
432
|
return "";
|
|
435
433
|
if (e != null && e.p) {
|
|
@@ -441,14 +439,14 @@ function yr(e) {
|
|
|
441
439
|
}
|
|
442
440
|
return e == null ? void 0 : e.v;
|
|
443
441
|
}
|
|
444
|
-
const
|
|
445
|
-
cellLinkEditButtons:
|
|
446
|
-
},
|
|
447
|
-
var
|
|
448
|
-
const [e, t] =
|
|
442
|
+
const _r = "univer-cell-link-edit-buttons", Cr = {
|
|
443
|
+
cellLinkEditButtons: _r
|
|
444
|
+
}, xe = () => {
|
|
445
|
+
var ne;
|
|
446
|
+
const [e, t] = ie(""), [n, r] = ie(""), [i, o] = ie(
|
|
449
447
|
"link"
|
|
450
448
|
/* link */
|
|
451
|
-
), [s, c] =
|
|
449
|
+
), [s, c] = ie(""), a = k(pe), p = k(jt), m = k(ue), f = k(H), l = Ot(f.currentEditing$), g = k(T), S = k(F), v = k(W), [I, A] = ie(!1), y = Rt(!1);
|
|
452
450
|
xn(() => {
|
|
453
451
|
var u, C, L;
|
|
454
452
|
if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
|
|
@@ -471,14 +469,14 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
471
469
|
return;
|
|
472
470
|
}
|
|
473
471
|
if (j.range) {
|
|
474
|
-
const
|
|
472
|
+
const Yt = j.gid && (L = (C = (u = m.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(j.gid)) == null ? void 0 : C.getName()) != null ? L : "";
|
|
475
473
|
if (o(
|
|
476
474
|
"range"
|
|
477
475
|
/* range */
|
|
478
476
|
), j.range === Ge)
|
|
479
477
|
c("");
|
|
480
478
|
else {
|
|
481
|
-
const ct = Ut(
|
|
479
|
+
const ct = Ut(Yt, Ee(j.range).range);
|
|
482
480
|
c(ct), ct === _.display && (y.current = !0);
|
|
483
481
|
}
|
|
484
482
|
return;
|
|
@@ -492,7 +490,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
492
490
|
}
|
|
493
491
|
}
|
|
494
492
|
}
|
|
495
|
-
const U = m.getUnit(l.unitId), R = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId),
|
|
493
|
+
const U = m.getUnit(l.unitId), R = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId), Kt = R == null ? void 0 : R.getCellRaw(l.row, l.column), We = vr(Kt);
|
|
496
494
|
o(
|
|
497
495
|
"link"
|
|
498
496
|
/* link */
|
|
@@ -504,7 +502,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
504
502
|
/* link */
|
|
505
503
|
), c(""), r(""), t("");
|
|
506
504
|
}, [l, g, S, m]);
|
|
507
|
-
const
|
|
505
|
+
const z = Tn(() => s, [i]), B = [
|
|
508
506
|
{
|
|
509
507
|
label: a.t("hyperLink.form.link"),
|
|
510
508
|
value: "link"
|
|
@@ -528,22 +526,22 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
528
526
|
], P = m.getCurrentUnitForType(w.UNIVER_SHEET);
|
|
529
527
|
if (!P)
|
|
530
528
|
return;
|
|
531
|
-
const G = P.getHiddenWorksheets(),
|
|
529
|
+
const G = P.getHiddenWorksheets(), V = P.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => G.indexOf(u.value) === -1), q = Object.values((ne = p.getDefinedNameMap(P.getUnitId())) != null ? ne : {}).map((u) => ({
|
|
532
530
|
label: u.name,
|
|
533
531
|
value: u.id
|
|
534
532
|
})), he = (u, C) => {
|
|
535
533
|
if (u === "link")
|
|
536
534
|
return rt(C);
|
|
537
535
|
if (u === "range") {
|
|
538
|
-
const L =
|
|
536
|
+
const L = Ee(C), _ = P.getSheetBySheetName(L.sheetName);
|
|
539
537
|
if (_)
|
|
540
|
-
return `#gid=${_.getSheetId()}&range=${
|
|
538
|
+
return `#gid=${_.getSheetId()}&range=${Fn(L.range)}`;
|
|
541
539
|
}
|
|
542
540
|
return `#${u}=${C}`;
|
|
543
|
-
},
|
|
541
|
+
}, Fe = Un((u) => {
|
|
544
542
|
var _;
|
|
545
543
|
const C = u[0];
|
|
546
|
-
if (!C || !
|
|
544
|
+
if (!C || !ze(C.range))
|
|
547
545
|
return;
|
|
548
546
|
C.sheetName || (C.sheetName = ((_ = P.getActiveSheet()) == null ? void 0 : _.getName()) || "");
|
|
549
547
|
const L = Dn(C);
|
|
@@ -561,18 +559,18 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
561
559
|
unitId: l.unitId,
|
|
562
560
|
subUnitId: l.subUnitId,
|
|
563
561
|
link: {
|
|
564
|
-
id:
|
|
562
|
+
id: te.generateRandomId(),
|
|
565
563
|
row: l.row,
|
|
566
564
|
column: l.column,
|
|
567
565
|
payload: he(i, s),
|
|
568
566
|
display: n
|
|
569
567
|
}
|
|
570
568
|
})), l) {
|
|
571
|
-
await v.executeCommand(
|
|
569
|
+
await v.executeCommand(Oe.id, {
|
|
572
570
|
unitId: l.unitId,
|
|
573
571
|
subUnitId: l.subUnitId
|
|
574
572
|
});
|
|
575
|
-
const u =
|
|
573
|
+
const u = 1;
|
|
576
574
|
await v.executeCommand(kt.id, {
|
|
577
575
|
range: {
|
|
578
576
|
startRow: Math.max(l.row - u, 0),
|
|
@@ -582,7 +580,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
582
580
|
}
|
|
583
581
|
});
|
|
584
582
|
}
|
|
585
|
-
v.executeCommand(
|
|
583
|
+
v.executeCommand(Te.id);
|
|
586
584
|
};
|
|
587
585
|
return /* @__PURE__ */ d.jsxs("div", { children: [
|
|
588
586
|
/* @__PURE__ */ d.jsx(
|
|
@@ -605,7 +603,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
605
603
|
/* @__PURE__ */ d.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
|
|
606
604
|
Ze,
|
|
607
605
|
{
|
|
608
|
-
options:
|
|
606
|
+
options: B,
|
|
609
607
|
value: i,
|
|
610
608
|
onChange: (u) => {
|
|
611
609
|
o(u), c("");
|
|
@@ -634,19 +632,19 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
634
632
|
openForSheetUnitId: P.getUnitId(),
|
|
635
633
|
id: Qt("hyper-link-edit"),
|
|
636
634
|
isSingleChoice: !0,
|
|
637
|
-
value:
|
|
638
|
-
onChange:
|
|
635
|
+
value: z,
|
|
636
|
+
onChange: Fe
|
|
639
637
|
}
|
|
640
638
|
) }),
|
|
641
639
|
i === "gid" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
|
|
642
640
|
Ze,
|
|
643
641
|
{
|
|
644
|
-
options:
|
|
642
|
+
options: V,
|
|
645
643
|
value: s,
|
|
646
644
|
onChange: (u) => {
|
|
647
645
|
var _, U;
|
|
648
646
|
c(u);
|
|
649
|
-
const C = (_ =
|
|
647
|
+
const C = (_ = V.find((R) => R.value === u)) == null ? void 0 : _.label, L = (U = V.find((R) => R.value === s)) == null ? void 0 : U.label;
|
|
650
648
|
C && (y.current || !n || n === L) && (r(C), y.current = !0);
|
|
651
649
|
}
|
|
652
650
|
}
|
|
@@ -664,15 +662,15 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
664
662
|
}
|
|
665
663
|
}
|
|
666
664
|
) }),
|
|
667
|
-
/* @__PURE__ */ d.jsxs("div", { className:
|
|
665
|
+
/* @__PURE__ */ d.jsxs("div", { className: Cr.cellLinkEditButtons, children: [
|
|
668
666
|
/* @__PURE__ */ d.jsx(
|
|
669
667
|
mt,
|
|
670
668
|
{
|
|
671
669
|
onClick: () => {
|
|
672
|
-
l && v.executeCommand(
|
|
670
|
+
l && v.executeCommand(Oe.id, {
|
|
673
671
|
unitId: l.unitId,
|
|
674
672
|
subUnitId: l.subUnitId
|
|
675
|
-
}), v.executeCommand(
|
|
673
|
+
}), v.executeCommand(Te.id);
|
|
676
674
|
},
|
|
677
675
|
children: a.t("hyperLink.form.cancel")
|
|
678
676
|
}
|
|
@@ -684,7 +682,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
684
682
|
style: { marginLeft: 8 },
|
|
685
683
|
onClick: async () => {
|
|
686
684
|
if (!n || !s || i === "link" && !de(s)) {
|
|
687
|
-
|
|
685
|
+
A(!0);
|
|
688
686
|
return;
|
|
689
687
|
}
|
|
690
688
|
me();
|
|
@@ -695,9 +693,9 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
695
693
|
] })
|
|
696
694
|
] });
|
|
697
695
|
};
|
|
698
|
-
|
|
696
|
+
xe.componentKey = "univer.sheet.cell-link-edit";
|
|
699
697
|
const it = {
|
|
700
|
-
type:
|
|
698
|
+
type: He.OPERATION,
|
|
701
699
|
id: "sheet.operation.open-hyper-link-sidebar",
|
|
702
700
|
handler(e, t) {
|
|
703
701
|
if (!t)
|
|
@@ -708,25 +706,25 @@ const it = {
|
|
|
708
706
|
title: p ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
|
|
709
707
|
},
|
|
710
708
|
children: {
|
|
711
|
-
label:
|
|
709
|
+
label: xe.componentKey
|
|
712
710
|
}
|
|
713
711
|
}), !0;
|
|
714
712
|
}
|
|
715
|
-
},
|
|
716
|
-
type:
|
|
713
|
+
}, Te = {
|
|
714
|
+
type: He.OPERATION,
|
|
717
715
|
id: "sheet.operation.close-hyper-link-sidebar",
|
|
718
716
|
handler(e) {
|
|
719
717
|
const t = e.get(Et), n = e.get(H);
|
|
720
718
|
return t.close(), n.endEditing(), !0;
|
|
721
719
|
}
|
|
722
720
|
}, ot = {
|
|
723
|
-
type:
|
|
721
|
+
type: He.OPERATION,
|
|
724
722
|
id: "sheet.operation.insert-hyper-link",
|
|
725
723
|
handler(e) {
|
|
726
724
|
const t = e.get(ue), n = Ct(t);
|
|
727
725
|
if (!n)
|
|
728
726
|
return !1;
|
|
729
|
-
const r = e.get(
|
|
727
|
+
const r = e.get(W), o = e.get(yt).getFirst();
|
|
730
728
|
if (!(o != null && o.primary))
|
|
731
729
|
return !1;
|
|
732
730
|
const s = o.primary.startRow, c = o.primary.startColumn;
|
|
@@ -738,31 +736,31 @@ const it = {
|
|
|
738
736
|
});
|
|
739
737
|
}
|
|
740
738
|
}, st = {
|
|
741
|
-
type:
|
|
739
|
+
type: He.OPERATION,
|
|
742
740
|
id: "sheet.operation.insert-hyper-link-toolbar",
|
|
743
741
|
handler(e) {
|
|
744
|
-
const t = e.get(
|
|
745
|
-
return e.get(H).currentEditing ? t.executeCommand(
|
|
742
|
+
const t = e.get(W);
|
|
743
|
+
return e.get(H).currentEditing ? t.executeCommand(Te.id) : t.executeCommand(ot.id);
|
|
746
744
|
}
|
|
747
|
-
},
|
|
748
|
-
cellLink:
|
|
749
|
-
cellLinkType:
|
|
750
|
-
cellLinkContent:
|
|
751
|
-
cellLinkContentError:
|
|
752
|
-
cellLinkUrl:
|
|
753
|
-
cellLinkOperations:
|
|
754
|
-
cellLinkOperation:
|
|
755
|
-
cellLinkOperationError:
|
|
756
|
-
},
|
|
757
|
-
outer: /* @__PURE__ */ d.jsx(
|
|
758
|
-
link: /* @__PURE__ */ d.jsx(
|
|
745
|
+
}, yr = "univer-cell-link", Sr = "univer-cell-link-type", Lr = "univer-cell-link-content", Ir = "univer-cell-link-content-error", kr = "univer-cell-link-url", Pr = "univer-cell-link-operations", br = "univer-cell-link-operation", Rr = "univer-cell-link-operation-error", E = {
|
|
746
|
+
cellLink: yr,
|
|
747
|
+
cellLinkType: Sr,
|
|
748
|
+
cellLinkContent: Lr,
|
|
749
|
+
cellLinkContentError: Ir,
|
|
750
|
+
cellLinkUrl: kr,
|
|
751
|
+
cellLinkOperations: Pr,
|
|
752
|
+
cellLinkOperation: br,
|
|
753
|
+
cellLinkOperationError: Rr
|
|
754
|
+
}, wr = {
|
|
755
|
+
outer: /* @__PURE__ */ d.jsx(Me, {}),
|
|
756
|
+
link: /* @__PURE__ */ d.jsx(Me, {}),
|
|
759
757
|
sheet: /* @__PURE__ */ d.jsx(Je, {}),
|
|
760
|
-
range: /* @__PURE__ */ d.jsx(
|
|
761
|
-
defineName: /* @__PURE__ */ d.jsx(
|
|
762
|
-
"range-error": /* @__PURE__ */ d.jsx(
|
|
758
|
+
range: /* @__PURE__ */ d.jsx(Le, {}),
|
|
759
|
+
defineName: /* @__PURE__ */ d.jsx(Le, {}),
|
|
760
|
+
"range-error": /* @__PURE__ */ d.jsx(Le, {}),
|
|
763
761
|
"sheet-error": /* @__PURE__ */ d.jsx(Je, {})
|
|
764
|
-
},
|
|
765
|
-
const e = k(H), t = k(T), n = k(
|
|
762
|
+
}, Ue = () => {
|
|
763
|
+
const e = k(H), t = k(T), n = k(W), r = k(wt), i = k(pe), o = Ot(e.currentPopup$, e.currentPopup), s = k(F);
|
|
766
764
|
if (!o)
|
|
767
765
|
return null;
|
|
768
766
|
const { unitId: c, subUnitId: a, id: p } = o, m = t.getHyperLink(c, a, p);
|
|
@@ -771,8 +769,8 @@ const it = {
|
|
|
771
769
|
const f = s.parseHyperLink(m.payload), l = f.type.indexOf("error") > -1;
|
|
772
770
|
return /* @__PURE__ */ d.jsxs("div", { className: E.cellLink, onClick: () => e.hideCurrentPopup(), children: [
|
|
773
771
|
/* @__PURE__ */ d.jsxs("div", { className: pt(E.cellLinkContent, { [E.cellLinkContentError]: l }), onClick: f.handler, children: [
|
|
774
|
-
/* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children:
|
|
775
|
-
/* @__PURE__ */ d.jsx(
|
|
772
|
+
/* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children: wr[f.type] }),
|
|
773
|
+
/* @__PURE__ */ d.jsx(_e, { showIfEllipsis: !0, title: f.name, children: /* @__PURE__ */ d.jsx("span", { className: E.cellLinkUrl, children: f.name }) })
|
|
776
774
|
] }),
|
|
777
775
|
/* @__PURE__ */ d.jsxs("div", { className: E.cellLinkOperations, children: [
|
|
778
776
|
o.copyPermission && /* @__PURE__ */ d.jsx(
|
|
@@ -788,11 +786,11 @@ const it = {
|
|
|
788
786
|
navigator.clipboard.writeText(f.url);
|
|
789
787
|
r.show({
|
|
790
788
|
content: i.t("hyperLink.message.coped"),
|
|
791
|
-
type:
|
|
789
|
+
type: ce.Info
|
|
792
790
|
});
|
|
793
791
|
}
|
|
794
792
|
},
|
|
795
|
-
children: /* @__PURE__ */ d.jsx(
|
|
793
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(Vt, {}) })
|
|
796
794
|
}
|
|
797
795
|
),
|
|
798
796
|
o.editPermission && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
@@ -808,7 +806,7 @@ const it = {
|
|
|
808
806
|
column: m.column
|
|
809
807
|
});
|
|
810
808
|
},
|
|
811
|
-
children: /* @__PURE__ */ d.jsx(
|
|
809
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Dt, {}) })
|
|
812
810
|
}
|
|
813
811
|
),
|
|
814
812
|
/* @__PURE__ */ d.jsx(
|
|
@@ -822,20 +820,20 @@ const it = {
|
|
|
822
820
|
id: m.id
|
|
823
821
|
});
|
|
824
822
|
},
|
|
825
|
-
children: /* @__PURE__ */ d.jsx(
|
|
823
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(At, {}) })
|
|
826
824
|
}
|
|
827
825
|
)
|
|
828
826
|
] })
|
|
829
827
|
] })
|
|
830
828
|
] });
|
|
831
829
|
};
|
|
832
|
-
|
|
833
|
-
var
|
|
834
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
830
|
+
Ue.componentKey = "univer.sheet.cell-link-popup";
|
|
831
|
+
var Or = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, Mr = (e, t, n, r) => {
|
|
832
|
+
for (var i = r > 1 ? void 0 : r ? Er(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
835
833
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
836
|
-
return r && i &&
|
|
834
|
+
return r && i && Or(t, n, i), i;
|
|
837
835
|
}, gt = (e, t) => (n, r) => t(n, r, e);
|
|
838
|
-
const
|
|
836
|
+
const xr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
|
|
839
837
|
let H = class extends O {
|
|
840
838
|
constructor(t, n) {
|
|
841
839
|
super();
|
|
@@ -855,14 +853,14 @@ let H = class extends O {
|
|
|
855
853
|
return this._currentEditing$.getValue();
|
|
856
854
|
}
|
|
857
855
|
showPopup(t) {
|
|
858
|
-
if (this._currentPopup &&
|
|
856
|
+
if (this._currentPopup && xr(t, this._currentPopup))
|
|
859
857
|
return;
|
|
860
858
|
this.hideCurrentPopup();
|
|
861
859
|
const { unitId: n, subUnitId: r, row: i, col: o } = t, s = this._hyperLinkModel.getHyperLinkByLocation(n, r, i, o);
|
|
862
860
|
if (!s)
|
|
863
861
|
return;
|
|
864
862
|
const c = this._sheetCanvasPopManagerService.attachPopupToCell(i, o, {
|
|
865
|
-
componentKey:
|
|
863
|
+
componentKey: Ue.componentKey,
|
|
866
864
|
direction: "bottom",
|
|
867
865
|
closeOnSelfTarget: !0,
|
|
868
866
|
onClickOutside: () => {
|
|
@@ -891,16 +889,16 @@ let H = class extends O {
|
|
|
891
889
|
this._currentEditing$.next(null);
|
|
892
890
|
}
|
|
893
891
|
};
|
|
894
|
-
H =
|
|
892
|
+
H = Mr([
|
|
895
893
|
gt(0, h(T)),
|
|
896
894
|
gt(1, h(yn))
|
|
897
895
|
], H);
|
|
898
|
-
var
|
|
899
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
896
|
+
var Tr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, jr = (e, t, n, r) => {
|
|
897
|
+
for (var i = r > 1 ? void 0 : r ? Ur(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
900
898
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
901
|
-
return r && i &&
|
|
902
|
-
},
|
|
903
|
-
let
|
|
899
|
+
return r && i && Tr(t, n, i), i;
|
|
900
|
+
}, se = (e, t) => (n, r) => t(n, r, e);
|
|
901
|
+
let Ie = class extends O {
|
|
904
902
|
constructor(e, t, n, r, i) {
|
|
905
903
|
super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._initCommandInterceptor();
|
|
906
904
|
}
|
|
@@ -993,7 +991,7 @@ let Le = class extends O {
|
|
|
993
991
|
const p = (S = a == null ? void 0 : a.v) != null ? S : (g = (l = a == null ? void 0 : a.p) == null ? void 0 : l.body) == null ? void 0 : g.dataStream.slice(0, -2), m = (p != null ? p : "").toString(), f = this._hyperLinkModel.getHyperLinkByLocation(n, r, s, c);
|
|
994
992
|
if (!f) {
|
|
995
993
|
if (de(m)) {
|
|
996
|
-
const v =
|
|
994
|
+
const v = te.generateRandomId();
|
|
997
995
|
o.push({
|
|
998
996
|
id: M.id,
|
|
999
997
|
params: {
|
|
@@ -1088,20 +1086,20 @@ let Le = class extends O {
|
|
|
1088
1086
|
return (o = (i = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetId(t)) == null ? void 0 : o.getCell(n, r);
|
|
1089
1087
|
}
|
|
1090
1088
|
};
|
|
1091
|
-
|
|
1092
|
-
N($.Starting,
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
],
|
|
1099
|
-
var
|
|
1100
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1089
|
+
Ie = jr([
|
|
1090
|
+
N($.Starting, Ie),
|
|
1091
|
+
se(0, h(et)),
|
|
1092
|
+
se(1, h(Ae)),
|
|
1093
|
+
se(2, h(T)),
|
|
1094
|
+
se(3, h(yt)),
|
|
1095
|
+
se(4, ue)
|
|
1096
|
+
], Ie);
|
|
1097
|
+
var Hr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $r = (e, t, n, r) => {
|
|
1098
|
+
for (var i = r > 1 ? void 0 : r ? Nr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1101
1099
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1102
|
-
return r && i &&
|
|
1103
|
-
},
|
|
1104
|
-
let
|
|
1100
|
+
return r && i && Hr(t, n, i), i;
|
|
1101
|
+
}, ae = (e, t) => (n, r) => t(n, r, e);
|
|
1102
|
+
let ke = class extends O {
|
|
1105
1103
|
constructor(e, t, n, r, i) {
|
|
1106
1104
|
super(), this._hoverManagerService = e, this._sheetsHyperLinkPopupService = t, this._renderManagerService = n, this._permissionService = r, this._sheetPermissionInterceptorBaseController = i, this._initHoverListener();
|
|
1107
1105
|
}
|
|
@@ -1126,9 +1124,9 @@ let Ie = class extends O {
|
|
|
1126
1124
|
return;
|
|
1127
1125
|
}
|
|
1128
1126
|
const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1129
|
-
workbookTypes: [
|
|
1130
|
-
worksheetTypes: [
|
|
1131
|
-
rangeTypes: [
|
|
1127
|
+
workbookTypes: [Ne],
|
|
1128
|
+
worksheetTypes: [$e, Be],
|
|
1129
|
+
rangeTypes: [Ve]
|
|
1132
1130
|
}, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }]), a = e.location.unitId, p = e.location.subUnitId, m = this._permissionService.composePermission([new fn(a).id, new vn(a, p).id]).every((g) => g.value);
|
|
1133
1131
|
this._sheetsHyperLinkPopupService.showPopup({
|
|
1134
1132
|
...e.location,
|
|
@@ -1141,23 +1139,23 @@ let Ie = class extends O {
|
|
|
1141
1139
|
);
|
|
1142
1140
|
}
|
|
1143
1141
|
};
|
|
1144
|
-
|
|
1145
|
-
N($.Rendered,
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
],
|
|
1152
|
-
const
|
|
1142
|
+
ke = $r([
|
|
1143
|
+
N($.Rendered, ke),
|
|
1144
|
+
ae(0, h(Sn)),
|
|
1145
|
+
ae(1, h(H)),
|
|
1146
|
+
ae(2, h(nt)),
|
|
1147
|
+
ae(3, h(tn)),
|
|
1148
|
+
ae(4, h(Pt))
|
|
1149
|
+
], ke);
|
|
1150
|
+
const Br = (e) => ({
|
|
1153
1151
|
id: ot.id,
|
|
1154
1152
|
type: Mt.BUTTON,
|
|
1155
1153
|
positions: [xt.CONTEXT_MENU],
|
|
1156
1154
|
title: "hyperLink.menu.add",
|
|
1157
1155
|
hidden$: Tt(e, w.UNIVER_SHEET),
|
|
1158
1156
|
icon: "LinkSingle",
|
|
1159
|
-
disabled$: bt(e, { workbookTypes: [
|
|
1160
|
-
}),
|
|
1157
|
+
disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [Ve] })
|
|
1158
|
+
}), Vr = (e) => ({
|
|
1161
1159
|
tooltip: "hyperLink.form.addTitle",
|
|
1162
1160
|
positions: xt.TOOLBAR_START,
|
|
1163
1161
|
group: $n.TOOLBAR_OTHERS,
|
|
@@ -1165,26 +1163,26 @@ const Dr = (e) => ({
|
|
|
1165
1163
|
type: Mt.BUTTON,
|
|
1166
1164
|
icon: "LinkSingle",
|
|
1167
1165
|
hidden$: Tt(e, w.UNIVER_SHEET),
|
|
1168
|
-
disabled$: bt(e, { workbookTypes: [
|
|
1169
|
-
}),
|
|
1166
|
+
disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [Ve] })
|
|
1167
|
+
}), Ft = {
|
|
1170
1168
|
id: st.id,
|
|
1171
1169
|
binding: Hn.K | Nn.CTRL_COMMAND,
|
|
1172
1170
|
preconditions: Ln
|
|
1173
1171
|
};
|
|
1174
|
-
var
|
|
1175
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1172
|
+
var Ar = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Fr = (e, t, n, r) => {
|
|
1173
|
+
for (var i = r > 1 ? void 0 : r ? Dr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1176
1174
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1177
|
-
return r && i &&
|
|
1175
|
+
return r && i && Ar(t, n, i), i;
|
|
1178
1176
|
}, J = (e, t) => (n, r) => t(n, r, e);
|
|
1179
|
-
let
|
|
1177
|
+
let le = class extends O {
|
|
1180
1178
|
constructor(e, t, n, r, i, o, s) {
|
|
1181
1179
|
super(), this._config = e, this._componentManager = t, this._commandService = n, this._localeService = r, this._menuService = i, this._injector = o, this._shortcutService = s, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
|
|
1182
1180
|
}
|
|
1183
1181
|
_initComponents() {
|
|
1184
1182
|
[
|
|
1185
|
-
[
|
|
1186
|
-
[
|
|
1187
|
-
[
|
|
1183
|
+
[Ue, Ue.componentKey],
|
|
1184
|
+
[xe, xe.componentKey],
|
|
1185
|
+
[Me, "LinkSingle"]
|
|
1188
1186
|
].forEach(([e, t]) => {
|
|
1189
1187
|
this._componentManager.register(t, e);
|
|
1190
1188
|
});
|
|
@@ -1192,7 +1190,7 @@ let ce = class extends O {
|
|
|
1192
1190
|
_initCommands() {
|
|
1193
1191
|
[
|
|
1194
1192
|
it,
|
|
1195
|
-
|
|
1193
|
+
Te,
|
|
1196
1194
|
ot,
|
|
1197
1195
|
st
|
|
1198
1196
|
].forEach((e) => {
|
|
@@ -1201,28 +1199,28 @@ let ce = class extends O {
|
|
|
1201
1199
|
}
|
|
1202
1200
|
_initMenus() {
|
|
1203
1201
|
var e, t, n, r;
|
|
1204
|
-
this._menuService.addMenuItem(
|
|
1202
|
+
this._menuService.addMenuItem(Br(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Vr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
|
|
1205
1203
|
}
|
|
1206
1204
|
_initShortCut() {
|
|
1207
|
-
this._shortcutService.registerShortcut(
|
|
1205
|
+
this._shortcutService.registerShortcut(Ft);
|
|
1208
1206
|
}
|
|
1209
1207
|
};
|
|
1210
|
-
|
|
1211
|
-
N($.Ready,
|
|
1212
|
-
J(1, h(
|
|
1213
|
-
J(2,
|
|
1208
|
+
le = Fr([
|
|
1209
|
+
N($.Ready, le),
|
|
1210
|
+
J(1, h(Bn)),
|
|
1211
|
+
J(2, W),
|
|
1214
1212
|
J(3, h(pe)),
|
|
1215
|
-
J(4,
|
|
1216
|
-
J(5, h(
|
|
1217
|
-
J(6, h(
|
|
1218
|
-
],
|
|
1213
|
+
J(4, An),
|
|
1214
|
+
J(5, h(Ae)),
|
|
1215
|
+
J(6, h(Vn))
|
|
1216
|
+
], le);
|
|
1219
1217
|
const at = "SHEET_HYPER_LINK_UI_PLUGIN";
|
|
1220
|
-
var
|
|
1221
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1218
|
+
var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, Kr = (e, t, n, r) => {
|
|
1219
|
+
for (var i = r > 1 ? void 0 : r ? Zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1222
1220
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1223
|
-
return r && i &&
|
|
1221
|
+
return r && i && Wr(t, n, i), i;
|
|
1224
1222
|
}, ft = (e, t) => (n, r) => t(n, r, e);
|
|
1225
|
-
let
|
|
1223
|
+
let Pe = class extends O {
|
|
1226
1224
|
constructor(e, t) {
|
|
1227
1225
|
super(), this._autoFillService = e, this._hyperLinkModel = t, this._initAutoFill();
|
|
1228
1226
|
}
|
|
@@ -1233,8 +1231,8 @@ let ke = class extends O {
|
|
|
1233
1231
|
row: m.startRow,
|
|
1234
1232
|
col: m.startColumn
|
|
1235
1233
|
}, S = kn(m, f), v = [], I = [];
|
|
1236
|
-
return S.forEach((
|
|
1237
|
-
const y =
|
|
1234
|
+
return S.forEach((A) => {
|
|
1235
|
+
const y = A.repeatStartCell, z = A.relativeRange, B = {
|
|
1238
1236
|
startRow: g.row,
|
|
1239
1237
|
startColumn: g.col,
|
|
1240
1238
|
endColumn: g.col,
|
|
@@ -1245,26 +1243,26 @@ let ke = class extends O {
|
|
|
1245
1243
|
endColumn: y.col,
|
|
1246
1244
|
endRow: y.row
|
|
1247
1245
|
};
|
|
1248
|
-
Qe.foreach(
|
|
1246
|
+
Qe.foreach(z, (G, V) => {
|
|
1249
1247
|
const q = ee.getPositionRange(
|
|
1250
1248
|
{
|
|
1251
1249
|
startRow: G,
|
|
1252
|
-
startColumn:
|
|
1253
|
-
endColumn:
|
|
1250
|
+
startColumn: V,
|
|
1251
|
+
endColumn: V,
|
|
1254
1252
|
endRow: G
|
|
1255
1253
|
},
|
|
1256
|
-
|
|
1257
|
-
), { row: he, col:
|
|
1254
|
+
B
|
|
1255
|
+
), { row: he, col: Fe } = l(q.startRow, q.startColumn), me = this._hyperLinkModel.getHyperLinkByLocation(c, a, he, Fe);
|
|
1258
1256
|
if (me) {
|
|
1259
|
-
const
|
|
1257
|
+
const ne = ee.getPositionRange(
|
|
1260
1258
|
{
|
|
1261
1259
|
startRow: G,
|
|
1262
|
-
startColumn:
|
|
1263
|
-
endColumn:
|
|
1260
|
+
startColumn: V,
|
|
1261
|
+
endColumn: V,
|
|
1264
1262
|
endRow: G
|
|
1265
1263
|
},
|
|
1266
1264
|
P
|
|
1267
|
-
), { row: u, col: C } = l(
|
|
1265
|
+
), { row: u, col: C } = l(ne.startRow, ne.startColumn), L = te.generateRandomId(), _ = this._hyperLinkModel.getHyperLinkByLocation(c, a, u, C);
|
|
1268
1266
|
_ && v.push({
|
|
1269
1267
|
id: M.id,
|
|
1270
1268
|
params: {
|
|
@@ -1272,7 +1270,7 @@ let ke = class extends O {
|
|
|
1272
1270
|
subUnitId: a,
|
|
1273
1271
|
id: _.id
|
|
1274
1272
|
}
|
|
1275
|
-
}), (
|
|
1273
|
+
}), (re.COPY === i || re.SERIES === i) && (v.push({
|
|
1276
1274
|
id: x.id,
|
|
1277
1275
|
params: {
|
|
1278
1276
|
unitId: c,
|
|
@@ -1307,22 +1305,22 @@ let ke = class extends O {
|
|
|
1307
1305
|
};
|
|
1308
1306
|
}, n = {
|
|
1309
1307
|
id: at,
|
|
1310
|
-
onFillData: (r, i, o) => o ===
|
|
1308
|
+
onFillData: (r, i, o) => o === re.COPY || o === re.ONLY_FORMAT || o === re.SERIES ? t(r, o) : e()
|
|
1311
1309
|
};
|
|
1312
1310
|
this.disposeWithMe(this._autoFillService.addHook(n));
|
|
1313
1311
|
}
|
|
1314
1312
|
};
|
|
1315
|
-
|
|
1316
|
-
N($.Ready,
|
|
1313
|
+
Pe = Kr([
|
|
1314
|
+
N($.Ready, Pe),
|
|
1317
1315
|
ft(0, In),
|
|
1318
1316
|
ft(1, h(T))
|
|
1319
|
-
],
|
|
1320
|
-
var
|
|
1321
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1317
|
+
], Pe);
|
|
1318
|
+
var Yr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, r) => {
|
|
1319
|
+
for (var i = r > 1 ? void 0 : r ? zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1322
1320
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1323
|
-
return r && i &&
|
|
1324
|
-
},
|
|
1325
|
-
let
|
|
1321
|
+
return r && i && Yr(t, n, i), i;
|
|
1322
|
+
}, Ce = (e, t) => (n, r) => t(n, r, e);
|
|
1323
|
+
let be = class extends O {
|
|
1326
1324
|
constructor(t, n, r, i) {
|
|
1327
1325
|
super();
|
|
1328
1326
|
D(this, "_copyInfo");
|
|
@@ -1349,7 +1347,7 @@ let Pe = class extends O {
|
|
|
1349
1347
|
id: v.id
|
|
1350
1348
|
}
|
|
1351
1349
|
});
|
|
1352
|
-
const I =
|
|
1350
|
+
const I = te.generateRandomId();
|
|
1353
1351
|
p.push({
|
|
1354
1352
|
id: x.id,
|
|
1355
1353
|
params: {
|
|
@@ -1413,10 +1411,10 @@ let Pe = class extends O {
|
|
|
1413
1411
|
if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
|
|
1414
1412
|
return { redos: [], undos: [] };
|
|
1415
1413
|
if ([
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1414
|
+
ve.SPECIAL_PASTE_COL_WIDTH,
|
|
1415
|
+
ve.SPECIAL_PASTE_VALUE,
|
|
1416
|
+
ve.SPECIAL_PASTE_FORMAT,
|
|
1417
|
+
ve.SPECIAL_PASTE_FORMULA
|
|
1420
1418
|
].includes(
|
|
1421
1419
|
n.pasteType
|
|
1422
1420
|
))
|
|
@@ -1433,24 +1431,24 @@ let Pe = class extends O {
|
|
|
1433
1431
|
endColumn: S
|
|
1434
1432
|
},
|
|
1435
1433
|
f
|
|
1436
|
-
),
|
|
1437
|
-
|
|
1434
|
+
), A = this._hyperLinkModel.getHyperLink(r, i, v), { row: y, col: z } = p(I.startRow, I.startColumn), B = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, y, z), P = te.generateRandomId();
|
|
1435
|
+
B && o.push({
|
|
1438
1436
|
id: M.id,
|
|
1439
1437
|
params: {
|
|
1440
1438
|
unitId: n.unitId,
|
|
1441
1439
|
subUnitId: n.subUnitId,
|
|
1442
|
-
id:
|
|
1440
|
+
id: B.id
|
|
1443
1441
|
}
|
|
1444
|
-
}),
|
|
1442
|
+
}), A && (o.push({
|
|
1445
1443
|
id: x.id,
|
|
1446
1444
|
params: {
|
|
1447
1445
|
unitId: n.unitId,
|
|
1448
1446
|
subUnitId: n.subUnitId,
|
|
1449
1447
|
link: {
|
|
1450
|
-
...
|
|
1448
|
+
...A,
|
|
1451
1449
|
id: P,
|
|
1452
1450
|
row: y,
|
|
1453
|
-
column:
|
|
1451
|
+
column: z
|
|
1454
1452
|
}
|
|
1455
1453
|
}
|
|
1456
1454
|
}), s.push({
|
|
@@ -1460,12 +1458,12 @@ let Pe = class extends O {
|
|
|
1460
1458
|
subUnitId: n.subUnitId,
|
|
1461
1459
|
id: P
|
|
1462
1460
|
}
|
|
1463
|
-
})),
|
|
1461
|
+
})), B && s.push({
|
|
1464
1462
|
id: x.id,
|
|
1465
1463
|
params: {
|
|
1466
1464
|
unitId: n.unitId,
|
|
1467
1465
|
subUnitId: n.subUnitId,
|
|
1468
|
-
link:
|
|
1466
|
+
link: B
|
|
1469
1467
|
}
|
|
1470
1468
|
});
|
|
1471
1469
|
});
|
|
@@ -1475,19 +1473,19 @@ let Pe = class extends O {
|
|
|
1475
1473
|
};
|
|
1476
1474
|
}
|
|
1477
1475
|
};
|
|
1478
|
-
|
|
1479
|
-
N($.Ready,
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
],
|
|
1485
|
-
var
|
|
1486
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1476
|
+
be = Gr([
|
|
1477
|
+
N($.Ready, be),
|
|
1478
|
+
Ce(0, Rn),
|
|
1479
|
+
Ce(1, h(T)),
|
|
1480
|
+
Ce(2, h(Ae)),
|
|
1481
|
+
Ce(3, h(F))
|
|
1482
|
+
], be);
|
|
1483
|
+
var qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Jr = (e, t, n, r) => {
|
|
1484
|
+
for (var i = r > 1 ? void 0 : r ? Xr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1487
1485
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1488
|
-
return r && i &&
|
|
1489
|
-
},
|
|
1490
|
-
let
|
|
1486
|
+
return r && i && qr(t, n, i), i;
|
|
1487
|
+
}, Qr = (e, t) => (n, r) => t(n, r, e);
|
|
1488
|
+
let Re = class extends O {
|
|
1491
1489
|
constructor(e) {
|
|
1492
1490
|
super(), this._resolverService = e, this._handleInitUrl();
|
|
1493
1491
|
}
|
|
@@ -1496,89 +1494,89 @@ let be = class extends O {
|
|
|
1496
1494
|
e && this._resolverService.parseHyperLink(e).handler();
|
|
1497
1495
|
}
|
|
1498
1496
|
};
|
|
1499
|
-
|
|
1500
|
-
N($.Rendered,
|
|
1501
|
-
|
|
1502
|
-
],
|
|
1503
|
-
var
|
|
1504
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1497
|
+
Re = Jr([
|
|
1498
|
+
N($.Rendered, Re),
|
|
1499
|
+
Qr(0, h(F))
|
|
1500
|
+
], Re);
|
|
1501
|
+
var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (e, t, n, r) => {
|
|
1502
|
+
for (var i = r > 1 ? void 0 : r ? ti(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1505
1503
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1506
|
-
return r && i &&
|
|
1507
|
-
},
|
|
1508
|
-
let
|
|
1504
|
+
return r && i && ei(t, n, i), i;
|
|
1505
|
+
}, Ye = (e, t) => (n, r) => t(n, r, e);
|
|
1506
|
+
let we = class extends O {
|
|
1509
1507
|
constructor(e, t, n) {
|
|
1510
1508
|
super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
|
|
1511
1509
|
}
|
|
1512
1510
|
_commandExecutedListener() {
|
|
1513
1511
|
this.disposeWithMe(
|
|
1514
1512
|
this._commandService.beforeCommandExecuted((e) => {
|
|
1515
|
-
e.id ===
|
|
1516
|
-
workbookTypes: [
|
|
1517
|
-
rangeTypes: [
|
|
1518
|
-
worksheetTypes: [
|
|
1513
|
+
e.id === Ft.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1514
|
+
workbookTypes: [Ne],
|
|
1515
|
+
rangeTypes: [Ve],
|
|
1516
|
+
worksheetTypes: [$e, tt, Be]
|
|
1519
1517
|
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
|
|
1520
1518
|
})
|
|
1521
1519
|
);
|
|
1522
1520
|
}
|
|
1523
1521
|
};
|
|
1524
|
-
|
|
1525
|
-
N($.Rendered,
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
],
|
|
1530
|
-
var
|
|
1531
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1522
|
+
we = ni([
|
|
1523
|
+
N($.Rendered, we),
|
|
1524
|
+
Ye(0, h(pe)),
|
|
1525
|
+
Ye(1, W),
|
|
1526
|
+
Ye(2, h(Pt))
|
|
1527
|
+
], we);
|
|
1528
|
+
var Wt = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, ii = (e, t, n) => t in e ? Wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, oi = (e, t, n, r) => {
|
|
1529
|
+
for (var i = r > 1 ? void 0 : r ? ri(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1532
1530
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1533
|
-
return r && i &&
|
|
1534
|
-
}, vt = (e, t) => (n, r) => t(n, r, e), Zt = (e, t, n) =>
|
|
1535
|
-
let
|
|
1531
|
+
return r && i && Wt(t, n, i), i;
|
|
1532
|
+
}, vt = (e, t) => (n, r) => t(n, r, e), Zt = (e, t, n) => ii(e, typeof t != "symbol" ? t + "" : t, n);
|
|
1533
|
+
let je = class extends nn {
|
|
1536
1534
|
constructor(e, t, n) {
|
|
1537
1535
|
super(), this._config = e, this._injector = t, this._renderManagerService = n;
|
|
1538
1536
|
}
|
|
1539
1537
|
onStarting(e) {
|
|
1540
1538
|
[
|
|
1541
|
-
[
|
|
1539
|
+
[F],
|
|
1542
1540
|
[H],
|
|
1543
|
-
[Ce],
|
|
1544
1541
|
[ye],
|
|
1545
|
-
[
|
|
1542
|
+
[Se],
|
|
1546
1543
|
[Ie],
|
|
1544
|
+
[ke],
|
|
1547
1545
|
[
|
|
1548
|
-
|
|
1546
|
+
le,
|
|
1549
1547
|
{
|
|
1550
|
-
useFactory: () => this._injector.createInstance(
|
|
1548
|
+
useFactory: () => this._injector.createInstance(le, this._config)
|
|
1551
1549
|
}
|
|
1552
1550
|
],
|
|
1553
|
-
[ke],
|
|
1554
1551
|
[Pe],
|
|
1555
|
-
[
|
|
1556
|
-
[
|
|
1557
|
-
|
|
1552
|
+
[be],
|
|
1553
|
+
[we],
|
|
1554
|
+
[Re]
|
|
1555
|
+
].forEach((n) => e.add(n)), this._renderManagerService.registerRenderModule(w.UNIVER_SHEET, Xe);
|
|
1558
1556
|
}
|
|
1559
1557
|
};
|
|
1560
|
-
Zt(
|
|
1561
|
-
Zt(
|
|
1562
|
-
|
|
1558
|
+
Zt(je, "pluginName", at);
|
|
1559
|
+
Zt(je, "type", w.UNIVER_SHEET);
|
|
1560
|
+
je = oi([
|
|
1563
1561
|
rn(Cn),
|
|
1564
|
-
vt(1, h(
|
|
1562
|
+
vt(1, h(Ae)),
|
|
1565
1563
|
vt(2, nt)
|
|
1566
|
-
],
|
|
1564
|
+
], je);
|
|
1567
1565
|
export {
|
|
1568
|
-
|
|
1566
|
+
Te as CloseHyperLinkSidebarOperation,
|
|
1569
1567
|
ot as InsertHyperLinkOperation,
|
|
1570
|
-
|
|
1568
|
+
Ft as InsertLinkShortcut,
|
|
1571
1569
|
it as OpenHyperLinkSidebarOperation,
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1570
|
+
Ie as SheetHyperLinkSetRangeController,
|
|
1571
|
+
Re as SheetHyperLinkUrlController,
|
|
1572
|
+
Pe as SheetsHyperLinkAutoFillController,
|
|
1573
|
+
be as SheetsHyperLinkCopyPasteController,
|
|
1574
|
+
ke as SheetsHyperLinkPopupController,
|
|
1577
1575
|
H as SheetsHyperLinkPopupService,
|
|
1578
|
-
|
|
1576
|
+
ye as SheetsHyperLinkRemoveSheetController,
|
|
1579
1577
|
Xe as SheetsHyperLinkRenderController,
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1578
|
+
Se as SheetsHyperLinkRenderManagerController,
|
|
1579
|
+
F as SheetsHyperLinkResolverService,
|
|
1580
|
+
le as SheetsHyperLinkUIController,
|
|
1581
|
+
je as UniverSheetsHyperLinkUIPlugin
|
|
1584
1582
|
};
|