@univerjs/sheets-hyper-link-ui 0.2.4-alpha.0 → 0.2.4
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 +106 -104
- package/lib/types/controllers/copy-paste.controller.d.ts +2 -1
- package/lib/types/controllers/menu.d.ts +1 -1
- package/lib/types/controllers/set-range.controller.d.ts +2 -1
- package/lib/types/controllers/ui.controller.d.ts +2 -1
- package/lib/types/plugin.d.ts +2 -1
- package/lib/types/services/popup.service.d.ts +2 -1
- package/lib/umd/index.js +2 -2
- package/package.json +24 -22
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var W = (e, t, n) =>
|
|
4
|
-
import { Disposable as O, UniverInstanceType as E, OnLifecycle as B, LifecycleStages as D,
|
|
5
|
-
import { RemoveSheetCommand as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
var Gt = Object.defineProperty;
|
|
2
|
+
var qt = (e, t, n) => t in e ? Gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var W = (e, t, n) => qt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { Disposable as O, UniverInstanceType as E, OnLifecycle as B, LifecycleStages as D, IUniverInstanceService as ue, BooleanNumber as Xt, ThemeService as Jt, isValidRange as ze, LocaleService as pe, RANGE_TYPE as lt, Rectangle as ne, ICommandService as K, Tools as re, DEFAULT_EMPTY_DOCUMENT_VALUE as Qt, createInternalEditorID as en, CommandType as je, CellValueType as dt, ObjectMatrix as _t, Range as Qe, CustomRangeType as tn, IPermissionService as nn, Plugin as rn, DependentOn as on } from "@univerjs/core";
|
|
5
|
+
import { RemoveSheetCommand as sn, SheetInterceptorService as et, INTERCEPTOR_POINT as an, SetSelectionsOperation as cn, SetWorksheetActiveOperation as Ee, getSheetCommandTarget as Ct, SheetsSelectionsService as yt, SetRangeValuesMutation as fe, SetRangeValuesUndoMutationFactory as ut, 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 De, WorkbookCopyPermission as fn, WorksheetCopyPermission as vn, WorksheetSetCellValuePermission as tt } from "@univerjs/sheets";
|
|
6
|
+
import { Inject as h, Injector as Ve } from "@wendellhu/redi";
|
|
7
|
+
import { RemoveHyperLinkMutation as T, AddHyperLinkMutation as U, HyperLinkModel as H, 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, IEditorBridgeService as Sn, HoverManagerService as Ln, SheetPermissionInterceptorBaseController as Pt, whenSheetEditorFocused as In, getCurrentRangeDisable$ as bt, APPLY_TYPE as oe, IAutoFillService as kn, virtualizeDiscreteRanges as qe, getAutoFillRepeatRange as Pn, COPY_TYPE as bn, rangeToDiscreteRange as Rn, PREDEFINED_HOOK_NAME as ve, getRepeatRange as wn, ISheetClipboardService as En } from "@univerjs/sheets-ui";
|
|
8
9
|
import { IRenderManagerService as nt } from "@univerjs/engine-render";
|
|
9
|
-
import {
|
|
10
|
-
import xn, { forwardRef as Y, useRef as
|
|
10
|
+
import { debounceTime as Rt, Subject as On, BehaviorSubject as Mn } from "rxjs";
|
|
11
|
+
import xn, { forwardRef as Y, useRef as wt, createElement as Z, useState as ee, useEffect as Et, useMemo as Tn } from "react";
|
|
12
|
+
import { useDependency as k } from "@wendellhu/redi/react-bindings";
|
|
11
13
|
import pt from "clsx";
|
|
12
14
|
import { MessageType as ce, FormLayout as X, Input as ht, Select as Ke, Button as mt, Tooltip as _e } from "@univerjs/design";
|
|
13
|
-
import { IMessageService as
|
|
14
|
-
import { deserializeRangeWithSheet as Oe, serializeRangeWithSheet as
|
|
15
|
+
import { IMessageService as Ot, useObservable as Un, useEvent as Hn, RangeSelector as jn, ISidebarService as Mt, KeyCode as Nn, MetaKeys as $n, MenuItemType as xt, MenuPosition as Tt, getMenuHiddenObservable as Ut, MenuGroup as Bn, ComponentManager as Dn, IShortcutService as Vn, IMenuService as An } from "@univerjs/ui";
|
|
16
|
+
import { deserializeRangeWithSheet as Oe, serializeRangeWithSheet as Ht, IDefinedNamesService as jt, serializeRangeToRefString as Wn, serializeRange as Fn } from "@univerjs/engine-formula";
|
|
15
17
|
import { DOC_HYPER_LINK_PLUGIN as Kn } from "@univerjs/docs-hyper-link";
|
|
16
18
|
import { getPlainTextFormDocument as Yn } from "@univerjs/docs";
|
|
17
19
|
var Zn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Gn = (e, t, n, r) => {
|
|
@@ -28,7 +30,7 @@ let ye = class extends O {
|
|
|
28
30
|
this._sheetInterceptorService.interceptCommand({
|
|
29
31
|
getMutations: (e) => {
|
|
30
32
|
var t;
|
|
31
|
-
if (e.id ===
|
|
33
|
+
if (e.id === sn.id) {
|
|
32
34
|
const n = e.params, r = n.unitId ? this._univerInstanceService.getUnit(n.unitId) : this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
|
|
33
35
|
if (!r)
|
|
34
36
|
return { redos: [], undos: [] };
|
|
@@ -64,7 +66,7 @@ ye = Gn([
|
|
|
64
66
|
Ye(1, ue),
|
|
65
67
|
Ye(2, h(H))
|
|
66
68
|
], ye);
|
|
67
|
-
var qn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor,
|
|
69
|
+
var qn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, Nt = (e, t, n, r) => {
|
|
68
70
|
for (var i = r > 1 ? void 0 : r ? Xn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
69
71
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
70
72
|
return r && i && qn(t, n, i), i;
|
|
@@ -84,12 +86,12 @@ let Xe = class extends O {
|
|
|
84
86
|
const i = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: r }), o = this._renderManagerService.getRenderById(n);
|
|
85
87
|
i == null || i.makeDirty(!0), i == null || i.calculate(), o && o.mainComponent.makeForceDirty();
|
|
86
88
|
};
|
|
87
|
-
this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
|
|
89
|
+
this.disposeWithMe(this._hyperLinkModel.linkUpdate$.pipe(Rt(16)).subscribe(() => {
|
|
88
90
|
e();
|
|
89
91
|
}));
|
|
90
92
|
}
|
|
91
93
|
};
|
|
92
|
-
Xe =
|
|
94
|
+
Xe = Nt([
|
|
93
95
|
te(1, h(H)),
|
|
94
96
|
te(2, h(It)),
|
|
95
97
|
te(3, nt)
|
|
@@ -101,7 +103,7 @@ let Se = class extends O {
|
|
|
101
103
|
_initViewModelIntercept() {
|
|
102
104
|
this.disposeWithMe(
|
|
103
105
|
this._sheetInterceptorService.intercept(
|
|
104
|
-
|
|
106
|
+
an.CELL_CONTENT,
|
|
105
107
|
{
|
|
106
108
|
handler: (e, t, n) => {
|
|
107
109
|
const { row: r, col: i, unitId: o, subUnitId: s } = t, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, r, i), a = this._themeService.getCurrentTheme();
|
|
@@ -109,7 +111,7 @@ let Se = class extends O {
|
|
|
109
111
|
...e,
|
|
110
112
|
interceptorStyle: {
|
|
111
113
|
ul: {
|
|
112
|
-
s:
|
|
114
|
+
s: Xt.TRUE
|
|
113
115
|
},
|
|
114
116
|
cl: {
|
|
115
117
|
rgb: a.blue500
|
|
@@ -123,13 +125,13 @@ let Se = class extends O {
|
|
|
123
125
|
);
|
|
124
126
|
}
|
|
125
127
|
};
|
|
126
|
-
Se =
|
|
128
|
+
Se = Nt([
|
|
127
129
|
B(D.Ready, Se),
|
|
128
130
|
te(0, h(et)),
|
|
129
131
|
te(1, h(H)),
|
|
130
|
-
te(2, h(
|
|
132
|
+
te(2, h(Jt))
|
|
131
133
|
], Se);
|
|
132
|
-
var
|
|
134
|
+
var $t = { exports: {} }, Ae = {};
|
|
133
135
|
/**
|
|
134
136
|
* @license React
|
|
135
137
|
* react-jsx-runtime.production.min.js
|
|
@@ -140,7 +142,7 @@ var Nt = { exports: {} }, Ae = {};
|
|
|
140
142
|
* LICENSE file in the root directory of this source tree.
|
|
141
143
|
*/
|
|
142
144
|
var Jn = xn, Qn = Symbol.for("react.element"), er = Symbol.for("react.fragment"), tr = Object.prototype.hasOwnProperty, nr = Jn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, rr = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
143
|
-
function
|
|
145
|
+
function Bt(e, t, n) {
|
|
144
146
|
var r, i = {}, o = null, s = null;
|
|
145
147
|
n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
|
|
146
148
|
for (r in t) tr.call(t, r) && !rr.hasOwnProperty(r) && (i[r] = t[r]);
|
|
@@ -148,10 +150,10 @@ function $t(e, t, n) {
|
|
|
148
150
|
return { $$typeof: Qn, type: e, key: o, ref: s, props: i, _owner: nr.current };
|
|
149
151
|
}
|
|
150
152
|
Ae.Fragment = er;
|
|
151
|
-
Ae.jsx =
|
|
152
|
-
Ae.jsxs =
|
|
153
|
-
|
|
154
|
-
var d =
|
|
153
|
+
Ae.jsx = Bt;
|
|
154
|
+
Ae.jsxs = Bt;
|
|
155
|
+
$t.exports = Ae;
|
|
156
|
+
var d = $t.exports, b = function() {
|
|
155
157
|
return b = Object.assign || function(e) {
|
|
156
158
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
157
159
|
t = arguments[n];
|
|
@@ -167,12 +169,12 @@ var d = Nt.exports, b = function() {
|
|
|
167
169
|
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
168
170
|
return n;
|
|
169
171
|
}, z = Y(function(e, t) {
|
|
170
|
-
var n = e.icon, r = e.id, i = e.className, o = e.extend, s = ir(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a =
|
|
171
|
-
return
|
|
172
|
+
var n = e.icon, r = e.id, i = e.className, o = e.extend, s = ir(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = wt("_".concat(ar()));
|
|
173
|
+
return Dt(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, b({ ref: t, className: c }, s), o);
|
|
172
174
|
});
|
|
173
|
-
function
|
|
175
|
+
function Dt(e, t, n, r, i) {
|
|
174
176
|
return Z(e.tag, b(b({ key: t }, or(e, n, i)), r), (sr(e, n).children || []).map(function(o, s) {
|
|
175
|
-
return
|
|
177
|
+
return Dt(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, i);
|
|
176
178
|
}));
|
|
177
179
|
}
|
|
178
180
|
function or(e, t, n) {
|
|
@@ -202,14 +204,14 @@ var cr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
|
|
|
202
204
|
}));
|
|
203
205
|
});
|
|
204
206
|
Le.displayName = "AllBorderSingle";
|
|
205
|
-
var lr = { 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" } }] },
|
|
207
|
+
var lr = { 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 = Y(function(e, t) {
|
|
206
208
|
return Z(z, Object.assign({}, e, {
|
|
207
209
|
id: "copy-single",
|
|
208
210
|
ref: t,
|
|
209
211
|
icon: lr
|
|
210
212
|
}));
|
|
211
213
|
});
|
|
212
|
-
|
|
214
|
+
Vt.displayName = "CopySingle";
|
|
213
215
|
var dr = { 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 = Y(function(e, t) {
|
|
214
216
|
return Z(z, Object.assign({}, e, {
|
|
215
217
|
id: "link-single",
|
|
@@ -218,22 +220,22 @@ var dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
|
|
|
218
220
|
}));
|
|
219
221
|
});
|
|
220
222
|
Me.displayName = "LinkSingle";
|
|
221
|
-
var ur = { 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" } }] },
|
|
223
|
+
var ur = { 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 = Y(function(e, t) {
|
|
222
224
|
return Z(z, Object.assign({}, e, {
|
|
223
225
|
id: "unlink-single",
|
|
224
226
|
ref: t,
|
|
225
227
|
icon: ur
|
|
226
228
|
}));
|
|
227
229
|
});
|
|
228
|
-
|
|
229
|
-
var pr = { 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" } }] },
|
|
230
|
+
At.displayName = "UnlinkSingle";
|
|
231
|
+
var pr = { 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" } }] }, Wt = Y(function(e, t) {
|
|
230
232
|
return Z(z, Object.assign({}, e, {
|
|
231
233
|
id: "write-single",
|
|
232
234
|
ref: t,
|
|
233
235
|
icon: pr
|
|
234
236
|
}));
|
|
235
237
|
});
|
|
236
|
-
|
|
238
|
+
Wt.displayName = "WriteSingle";
|
|
237
239
|
var hr = { 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 = Y(function(e, t) {
|
|
238
240
|
return Z(z, Object.assign({}, e, {
|
|
239
241
|
id: "xlsx",
|
|
@@ -270,7 +272,7 @@ let F = class {
|
|
|
270
272
|
const a = Oe(n).range;
|
|
271
273
|
return ze(a) && n !== Ge ? {
|
|
272
274
|
type: "range",
|
|
273
|
-
name:
|
|
275
|
+
name: Ht(s, a)
|
|
274
276
|
} : {
|
|
275
277
|
type: "range-error",
|
|
276
278
|
name: this._localeService.t("hyperLink.message.refError")
|
|
@@ -344,7 +346,7 @@ let F = class {
|
|
|
344
346
|
if (r) {
|
|
345
347
|
const i = vr(n, r);
|
|
346
348
|
await this._commandService.executeCommand(
|
|
347
|
-
|
|
349
|
+
cn.id,
|
|
348
350
|
{
|
|
349
351
|
unitId: e,
|
|
350
352
|
subUnitId: t,
|
|
@@ -406,8 +408,8 @@ let F = class {
|
|
|
406
408
|
F = fr([
|
|
407
409
|
se(0, ue),
|
|
408
410
|
se(1, K),
|
|
409
|
-
se(2,
|
|
410
|
-
se(3,
|
|
411
|
+
se(2, jt),
|
|
412
|
+
se(3, Ot),
|
|
411
413
|
se(4, h(pe))
|
|
412
414
|
], F);
|
|
413
415
|
function de(e) {
|
|
@@ -434,7 +436,7 @@ function yr(e) {
|
|
|
434
436
|
if (t == null)
|
|
435
437
|
return "";
|
|
436
438
|
const n = t.dataStream;
|
|
437
|
-
return n.substring(n.length - 2, n.length) ===
|
|
439
|
+
return n.substring(n.length - 2, n.length) === Qt ? n.substring(0, n.length - 2) : n;
|
|
438
440
|
}
|
|
439
441
|
return e == null ? void 0 : e.v;
|
|
440
442
|
}
|
|
@@ -445,8 +447,8 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
445
447
|
const [e, t] = ee(""), [n, r] = ee(""), [i, o] = ee(
|
|
446
448
|
"link"
|
|
447
449
|
/* link */
|
|
448
|
-
), [s, c] = ee(""), a = k(pe), u = k(
|
|
449
|
-
|
|
450
|
+
), [s, c] = ee(""), a = k(pe), u = k(jt), g = k(ue), f = k($), l = Un(f.currentEditing$), m = k(H), _ = k(F), v = k(K), [L, M] = ee(!1), y = wt(!1);
|
|
451
|
+
Et(() => {
|
|
450
452
|
var p, S, I;
|
|
451
453
|
if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
|
|
452
454
|
const C = m.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
|
|
@@ -468,14 +470,14 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
468
470
|
return;
|
|
469
471
|
}
|
|
470
472
|
if (N.range) {
|
|
471
|
-
const
|
|
473
|
+
const zt = N.gid && (I = (S = (p = g.getUnit(l.unitId)) == null ? void 0 : p.getSheetBySheetId(N.gid)) == null ? void 0 : S.getName()) != null ? I : "";
|
|
472
474
|
if (o(
|
|
473
475
|
"range"
|
|
474
476
|
/* range */
|
|
475
477
|
), N.range === Ge)
|
|
476
478
|
c("");
|
|
477
479
|
else {
|
|
478
|
-
const ct =
|
|
480
|
+
const ct = Ht(zt, Oe(N.range).range);
|
|
479
481
|
c(ct), ct === C.display && (y.current = !0);
|
|
480
482
|
}
|
|
481
483
|
return;
|
|
@@ -489,7 +491,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
489
491
|
}
|
|
490
492
|
}
|
|
491
493
|
}
|
|
492
|
-
const j = g.getUnit(l.unitId), w = j == null ? void 0 : j.getSheetBySheetId(l.subUnitId),
|
|
494
|
+
const j = g.getUnit(l.unitId), w = j == null ? void 0 : j.getSheetBySheetId(l.subUnitId), Zt = w == null ? void 0 : w.getCellRaw(l.row, l.column), Fe = yr(Zt);
|
|
493
495
|
o(
|
|
494
496
|
"link"
|
|
495
497
|
/* link */
|
|
@@ -629,7 +631,7 @@ const Sr = "univer-cell-link-edit-buttons", Lr = {
|
|
|
629
631
|
jn,
|
|
630
632
|
{
|
|
631
633
|
openForSheetUnitId: P.getUnitId(),
|
|
632
|
-
id:
|
|
634
|
+
id: en("hyper-link-edit"),
|
|
633
635
|
isSingleChoice: !0,
|
|
634
636
|
value: V,
|
|
635
637
|
onChange: We
|
|
@@ -699,7 +701,7 @@ const it = {
|
|
|
699
701
|
handler(e, t) {
|
|
700
702
|
if (!t)
|
|
701
703
|
return !1;
|
|
702
|
-
const { unitId: n, subUnitId: r, row: i, column: o } = t, s = e.get(H), c = e.get(
|
|
704
|
+
const { unitId: n, subUnitId: r, row: i, column: o } = t, s = e.get(H), c = e.get(Mt), a = e.get($), u = s.getHyperLinkByLocation(n, r, i, o);
|
|
703
705
|
return a.startEditing(t), c.open({
|
|
704
706
|
header: {
|
|
705
707
|
title: u ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
|
|
@@ -713,7 +715,7 @@ const it = {
|
|
|
713
715
|
type: je.OPERATION,
|
|
714
716
|
id: "sheet.operation.close-hyper-link-sidebar",
|
|
715
717
|
handler(e) {
|
|
716
|
-
const t = e.get(
|
|
718
|
+
const t = e.get(Mt), n = e.get($);
|
|
717
719
|
return t.close(), n.endEditing(), !0;
|
|
718
720
|
}
|
|
719
721
|
}, ot = {
|
|
@@ -759,8 +761,8 @@ const it = {
|
|
|
759
761
|
"range-error": /* @__PURE__ */ d.jsx(Le, {}),
|
|
760
762
|
"sheet-error": /* @__PURE__ */ d.jsx(Je, {})
|
|
761
763
|
}, Ue = () => {
|
|
762
|
-
const e = k($), t = k(H), n = k(K), r = k(
|
|
763
|
-
if (
|
|
764
|
+
const e = k($), t = k(H), n = k(K), r = k(Ot), i = k(pe), [o, s] = ee(null), c = k(F);
|
|
765
|
+
if (Et(() => {
|
|
764
766
|
s(e.currentPopup);
|
|
765
767
|
const _ = e.currentPopup$.subscribe((v) => {
|
|
766
768
|
s(v);
|
|
@@ -797,7 +799,7 @@ const it = {
|
|
|
797
799
|
});
|
|
798
800
|
}
|
|
799
801
|
},
|
|
800
|
-
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(
|
|
802
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(Vt, {}) })
|
|
801
803
|
}
|
|
802
804
|
),
|
|
803
805
|
o.editPermission && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
@@ -813,7 +815,7 @@ const it = {
|
|
|
813
815
|
column: f.column
|
|
814
816
|
});
|
|
815
817
|
},
|
|
816
|
-
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(
|
|
818
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Wt, {}) })
|
|
817
819
|
}
|
|
818
820
|
),
|
|
819
821
|
/* @__PURE__ */ d.jsx(
|
|
@@ -821,13 +823,13 @@ const it = {
|
|
|
821
823
|
{
|
|
822
824
|
className: x.cellLinkOperation,
|
|
823
825
|
onClick: () => {
|
|
824
|
-
n.executeCommand(
|
|
826
|
+
n.executeCommand(_n.id, {
|
|
825
827
|
unitId: a,
|
|
826
828
|
subUnitId: u,
|
|
827
829
|
id: f.id
|
|
828
830
|
});
|
|
829
831
|
},
|
|
830
|
-
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(
|
|
832
|
+
children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(At, {}) })
|
|
831
833
|
}
|
|
832
834
|
)
|
|
833
835
|
] })
|
|
@@ -845,9 +847,9 @@ let $ = class extends O {
|
|
|
845
847
|
constructor(t, n) {
|
|
846
848
|
super();
|
|
847
849
|
W(this, "_currentPopup", null);
|
|
848
|
-
W(this, "_currentPopup$", new
|
|
850
|
+
W(this, "_currentPopup$", new On());
|
|
849
851
|
W(this, "currentPopup$", this._currentPopup$.asObservable());
|
|
850
|
-
W(this, "_currentEditing$", new
|
|
852
|
+
W(this, "_currentEditing$", new Mn(null));
|
|
851
853
|
W(this, "currentEditing$", this._currentEditing$.asObservable());
|
|
852
854
|
this._hyperLinkModel = t, this._sheetCanvasPopManagerService = n, this.disposeWithMe(() => {
|
|
853
855
|
this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
|
|
@@ -898,7 +900,7 @@ let $ = class extends O {
|
|
|
898
900
|
};
|
|
899
901
|
$ = Ur([
|
|
900
902
|
gt(0, h(H)),
|
|
901
|
-
gt(1, h(
|
|
903
|
+
gt(1, h(yn))
|
|
902
904
|
], $);
|
|
903
905
|
var jr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $r = (e, t, n, r) => {
|
|
904
906
|
for (var i = r > 1 ? void 0 : r ? Nr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
@@ -995,7 +997,7 @@ let Ie = class extends O {
|
|
|
995
997
|
_initSetRangeValuesCommandInterceptor() {
|
|
996
998
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
997
999
|
getMutations: (e) => {
|
|
998
|
-
if (e.id ===
|
|
1000
|
+
if (e.id === ln.id) {
|
|
999
1001
|
const t = e.params, { unitId: n, subUnitId: r } = t, i = [], o = [];
|
|
1000
1002
|
return t.cellValue && new _t(t.cellValue).forValue((s, c, a) => {
|
|
1001
1003
|
var l, m, _, v, L, M, y;
|
|
@@ -1057,7 +1059,7 @@ let Ie = class extends O {
|
|
|
1057
1059
|
_initClearSelectionCommandInterceptor() {
|
|
1058
1060
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
1059
1061
|
getMutations: (e) => {
|
|
1060
|
-
if (e.id ===
|
|
1062
|
+
if (e.id === dn.id || e.id === un.id || e.id === pn.id) {
|
|
1061
1063
|
const t = [], n = [], r = this._selectionManagerService.getCurrentLastSelection(), i = Ct(this._univerInstanceService);
|
|
1062
1064
|
if (r && i) {
|
|
1063
1065
|
const { unitId: o, subUnitId: s } = i;
|
|
@@ -1100,7 +1102,7 @@ let Ie = class extends O {
|
|
|
1100
1102
|
handler: (e, t, n) => {
|
|
1101
1103
|
var r, i, o, s, c, a;
|
|
1102
1104
|
if (e != null && e.p) {
|
|
1103
|
-
const u = (i = (r = e.p.body) == null ? void 0 : r.customRanges) == null ? void 0 : i.find((f) => f.rangeType ===
|
|
1105
|
+
const u = (i = (r = e.p.body) == null ? void 0 : r.customRanges) == null ? void 0 : i.find((f) => f.rangeType === tn.HYPERLINK), g = (o = e.p.resources) == null ? void 0 : o.find((f) => f.name === Kn);
|
|
1104
1106
|
if (u && g) {
|
|
1105
1107
|
const f = u.rangeId, l = (a = (c = (s = JSON.parse(g.data)) == null ? void 0 : s.links) == null ? void 0 : c.find((m) => m.id === f)) == null ? void 0 : a.payload;
|
|
1106
1108
|
return n({
|
|
@@ -1124,11 +1126,11 @@ let Ie = class extends O {
|
|
|
1124
1126
|
Ie = $r([
|
|
1125
1127
|
B(D.Starting, Ie),
|
|
1126
1128
|
J(0, h(et)),
|
|
1127
|
-
J(1, h(
|
|
1129
|
+
J(1, h(Ve)),
|
|
1128
1130
|
J(2, h(H)),
|
|
1129
1131
|
J(3, h(yt)),
|
|
1130
1132
|
J(4, ue),
|
|
1131
|
-
J(5,
|
|
1133
|
+
J(5, Sn)
|
|
1132
1134
|
], Ie);
|
|
1133
1135
|
var Br = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Vr = (e, t, n, r) => {
|
|
1134
1136
|
for (var i = r > 1 ? void 0 : r ? Dr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
@@ -1141,7 +1143,7 @@ let ke = class extends O {
|
|
|
1141
1143
|
}
|
|
1142
1144
|
_initHoverListener() {
|
|
1143
1145
|
this.disposeWithMe(
|
|
1144
|
-
this._hoverManagerService.currentCell$.pipe(
|
|
1146
|
+
this._hoverManagerService.currentCell$.pipe(Rt(100)).subscribe((e) => {
|
|
1145
1147
|
var f, l;
|
|
1146
1148
|
if (!e) {
|
|
1147
1149
|
this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
@@ -1152,18 +1154,18 @@ let ke = class extends O {
|
|
|
1152
1154
|
if (t && t.overflowCache.forValue((m, _, v) => {
|
|
1153
1155
|
ne.contains(v, { startColumn: n, endColumn: n, startRow: r, endRow: r }) && (i = m, o = _);
|
|
1154
1156
|
}), !this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1155
|
-
workbookTypes: [
|
|
1156
|
-
worksheetTypes: [
|
|
1157
|
-
rangeTypes: [
|
|
1157
|
+
workbookTypes: [hn],
|
|
1158
|
+
worksheetTypes: [mn],
|
|
1159
|
+
rangeTypes: [gn]
|
|
1158
1160
|
}, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }])) {
|
|
1159
1161
|
this._sheetsHyperLinkPopupService.hideCurrentPopup();
|
|
1160
1162
|
return;
|
|
1161
1163
|
}
|
|
1162
1164
|
const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1163
|
-
workbookTypes: [
|
|
1164
|
-
worksheetTypes: [
|
|
1165
|
-
rangeTypes: [
|
|
1166
|
-
}, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }]), a = e.location.unitId, u = e.location.subUnitId, g = this._permissionService.composePermission([new
|
|
1165
|
+
workbookTypes: [Ne],
|
|
1166
|
+
worksheetTypes: [$e, Be],
|
|
1167
|
+
rangeTypes: [De]
|
|
1168
|
+
}, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }]), a = e.location.unitId, u = e.location.subUnitId, g = this._permissionService.composePermission([new fn(a).id, new vn(a, u).id]).every((m) => m.value);
|
|
1167
1169
|
this._sheetsHyperLinkPopupService.showPopup({
|
|
1168
1170
|
...e.location,
|
|
1169
1171
|
row: i,
|
|
@@ -1177,33 +1179,33 @@ let ke = class extends O {
|
|
|
1177
1179
|
};
|
|
1178
1180
|
ke = Vr([
|
|
1179
1181
|
B(D.Rendered, ke),
|
|
1180
|
-
ae(0, h(
|
|
1182
|
+
ae(0, h(Ln)),
|
|
1181
1183
|
ae(1, h($)),
|
|
1182
1184
|
ae(2, h(nt)),
|
|
1183
|
-
ae(3, h(
|
|
1185
|
+
ae(3, h(nn)),
|
|
1184
1186
|
ae(4, h(Pt))
|
|
1185
1187
|
], ke);
|
|
1186
1188
|
const Ar = (e) => ({
|
|
1187
1189
|
id: ot.id,
|
|
1188
|
-
type:
|
|
1189
|
-
positions: [
|
|
1190
|
+
type: xt.BUTTON,
|
|
1191
|
+
positions: [Tt.CONTEXT_MENU],
|
|
1190
1192
|
title: "hyperLink.menu.add",
|
|
1191
|
-
hidden$:
|
|
1193
|
+
hidden$: Ut(e, E.UNIVER_SHEET),
|
|
1192
1194
|
icon: "LinkSingle",
|
|
1193
|
-
disabled$: bt(e, { workbookTypes: [
|
|
1195
|
+
disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [De] })
|
|
1194
1196
|
}), Wr = (e) => ({
|
|
1195
1197
|
tooltip: "hyperLink.form.addTitle",
|
|
1196
|
-
positions:
|
|
1198
|
+
positions: Tt.TOOLBAR_START,
|
|
1197
1199
|
group: Bn.TOOLBAR_OTHERS,
|
|
1198
1200
|
id: st.id,
|
|
1199
|
-
type:
|
|
1201
|
+
type: xt.BUTTON,
|
|
1200
1202
|
icon: "LinkSingle",
|
|
1201
|
-
hidden$:
|
|
1202
|
-
disabled$: bt(e, { workbookTypes: [
|
|
1203
|
-
}),
|
|
1203
|
+
hidden$: Ut(e, E.UNIVER_SHEET),
|
|
1204
|
+
disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [De] })
|
|
1205
|
+
}), Ft = {
|
|
1204
1206
|
id: st.id,
|
|
1205
1207
|
binding: Nn.K | $n.CTRL_COMMAND,
|
|
1206
|
-
preconditions:
|
|
1208
|
+
preconditions: In
|
|
1207
1209
|
};
|
|
1208
1210
|
var Fr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Yr = (e, t, n, r) => {
|
|
1209
1211
|
for (var i = r > 1 ? void 0 : r ? Kr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
@@ -1238,7 +1240,7 @@ let le = class extends O {
|
|
|
1238
1240
|
this._menuService.addMenuItem(Ar(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Wr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
|
|
1239
1241
|
}
|
|
1240
1242
|
_initShortCut() {
|
|
1241
|
-
this._shortcutService.registerShortcut(
|
|
1243
|
+
this._shortcutService.registerShortcut(Ft);
|
|
1242
1244
|
}
|
|
1243
1245
|
};
|
|
1244
1246
|
le = Yr([
|
|
@@ -1247,7 +1249,7 @@ le = Yr([
|
|
|
1247
1249
|
Q(2, K),
|
|
1248
1250
|
Q(3, h(pe)),
|
|
1249
1251
|
Q(4, An),
|
|
1250
|
-
Q(5, h(
|
|
1252
|
+
Q(5, h(Ve)),
|
|
1251
1253
|
Q(6, h(Vn))
|
|
1252
1254
|
], le);
|
|
1253
1255
|
const at = "SHEET_HYPER_LINK_UI_PLUGIN";
|
|
@@ -1266,7 +1268,7 @@ let Pe = class extends O {
|
|
|
1266
1268
|
const { source: o, target: s, unitId: c, subUnitId: a } = r, u = qe([o, s]), [g, f] = u.ranges, { mapFunc: l } = u, m = {
|
|
1267
1269
|
row: g.startRow,
|
|
1268
1270
|
col: g.startColumn
|
|
1269
|
-
}, _ =
|
|
1271
|
+
}, _ = Pn(g, f), v = [], L = [];
|
|
1270
1272
|
return _.forEach((M) => {
|
|
1271
1273
|
const y = M.repeatStartCell, V = M.relativeRange, R = {
|
|
1272
1274
|
startRow: m.row,
|
|
@@ -1348,7 +1350,7 @@ let Pe = class extends O {
|
|
|
1348
1350
|
};
|
|
1349
1351
|
Pe = Gr([
|
|
1350
1352
|
B(D.Ready, Pe),
|
|
1351
|
-
ft(0,
|
|
1353
|
+
ft(0, kn),
|
|
1352
1354
|
ft(1, h(H))
|
|
1353
1355
|
], Pe);
|
|
1354
1356
|
var qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Jr = (e, t, n, r) => {
|
|
@@ -1367,7 +1369,7 @@ let be = class extends O {
|
|
|
1367
1369
|
id: at,
|
|
1368
1370
|
onBeforeCopy: (t, n, r) => this._collect(t, n, r),
|
|
1369
1371
|
onPasteCells: (t, n, r, i) => {
|
|
1370
|
-
const { copyType: o =
|
|
1372
|
+
const { copyType: o = bn.COPY, pasteType: s } = i, { range: c } = t || {}, { range: a, unitId: u, subUnitId: g } = n;
|
|
1371
1373
|
return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: u, subUnitId: g });
|
|
1372
1374
|
},
|
|
1373
1375
|
onPastePlainText: (t, n) => {
|
|
@@ -1426,7 +1428,7 @@ let be = class extends O {
|
|
|
1426
1428
|
};
|
|
1427
1429
|
const o = {
|
|
1428
1430
|
get: this._injector.get.bind(this._injector)
|
|
1429
|
-
}, s =
|
|
1431
|
+
}, s = Rn(r, o, t, n);
|
|
1430
1432
|
if (!s)
|
|
1431
1433
|
return;
|
|
1432
1434
|
const { rows: c, cols: a } = s;
|
|
@@ -1454,7 +1456,7 @@ let be = class extends O {
|
|
|
1454
1456
|
))
|
|
1455
1457
|
return { redos: [], undos: [] };
|
|
1456
1458
|
const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: u } = qe([n.copyRange, t]);
|
|
1457
|
-
return
|
|
1459
|
+
return wn(c, a, !0).forEach(({ startRange: f }) => {
|
|
1458
1460
|
var l;
|
|
1459
1461
|
(l = this._copyInfo) == null || l.matrix.forValue((m, _, v) => {
|
|
1460
1462
|
const L = ne.getPositionRange(
|
|
@@ -1506,9 +1508,9 @@ let be = class extends O {
|
|
|
1506
1508
|
};
|
|
1507
1509
|
be = Jr([
|
|
1508
1510
|
B(D.Ready, be),
|
|
1509
|
-
Ce(0,
|
|
1511
|
+
Ce(0, En),
|
|
1510
1512
|
Ce(1, h(H)),
|
|
1511
|
-
Ce(2, h(
|
|
1513
|
+
Ce(2, h(Ve)),
|
|
1512
1514
|
Ce(3, h(F))
|
|
1513
1515
|
], be);
|
|
1514
1516
|
var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (e, t, n, r) => {
|
|
@@ -1541,10 +1543,10 @@ let we = class extends O {
|
|
|
1541
1543
|
_commandExecutedListener() {
|
|
1542
1544
|
this.disposeWithMe(
|
|
1543
1545
|
this._commandService.beforeCommandExecuted((e) => {
|
|
1544
|
-
e.id ===
|
|
1545
|
-
workbookTypes: [
|
|
1546
|
-
rangeTypes: [
|
|
1547
|
-
worksheetTypes: [
|
|
1546
|
+
e.id === Ft.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
1547
|
+
workbookTypes: [Ne],
|
|
1548
|
+
rangeTypes: [De],
|
|
1549
|
+
worksheetTypes: [$e, tt, Be]
|
|
1548
1550
|
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
|
|
1549
1551
|
})
|
|
1550
1552
|
);
|
|
@@ -1556,12 +1558,12 @@ we = oi([
|
|
|
1556
1558
|
Ze(1, K),
|
|
1557
1559
|
Ze(2, h(Pt))
|
|
1558
1560
|
], we);
|
|
1559
|
-
var
|
|
1561
|
+
var Kt = Object.defineProperty, si = Object.getOwnPropertyDescriptor, ai = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ci = (e, t, n, r) => {
|
|
1560
1562
|
for (var i = r > 1 ? void 0 : r ? si(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1561
1563
|
(s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
|
|
1562
|
-
return r && i &&
|
|
1563
|
-
}, vt = (e, t) => (n, r) => t(n, r, e),
|
|
1564
|
-
let He = class extends
|
|
1564
|
+
return r && i && Kt(t, n, i), i;
|
|
1565
|
+
}, vt = (e, t) => (n, r) => t(n, r, e), Yt = (e, t, n) => ai(e, typeof t != "symbol" ? t + "" : t, n);
|
|
1566
|
+
let He = class extends rn {
|
|
1565
1567
|
constructor(e, t, n) {
|
|
1566
1568
|
super(), this._config = e, this._injector = t, this._renderManagerService = n;
|
|
1567
1569
|
}
|
|
@@ -1591,17 +1593,17 @@ let He = class extends nn {
|
|
|
1591
1593
|
].forEach((t) => this._renderManagerService.registerRenderModule(E.UNIVER_SHEET, t));
|
|
1592
1594
|
}
|
|
1593
1595
|
};
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
+
Yt(He, "pluginName", at);
|
|
1597
|
+
Yt(He, "type", E.UNIVER_SHEET);
|
|
1596
1598
|
He = ci([
|
|
1597
|
-
|
|
1598
|
-
vt(1, h(
|
|
1599
|
+
on(Cn),
|
|
1600
|
+
vt(1, h(Ve)),
|
|
1599
1601
|
vt(2, nt)
|
|
1600
1602
|
], He);
|
|
1601
1603
|
export {
|
|
1602
1604
|
Te as CloseHyperLinkSidebarOperation,
|
|
1603
1605
|
ot as InsertHyperLinkOperation,
|
|
1604
|
-
|
|
1606
|
+
Ft as InsertLinkShortcut,
|
|
1605
1607
|
it as OpenHyperLinkSidebarOperation,
|
|
1606
1608
|
Ie as SheetHyperLinkSetRangeController,
|
|
1607
1609
|
Re as SheetHyperLinkUrlController,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
2
|
import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
|
|
3
3
|
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
4
|
+
import { Injector } from '@wendellhu/redi';
|
|
4
5
|
import { SheetsHyperLinkResolverService } from '../services/resolver.service';
|
|
5
6
|
|
|
6
7
|
export declare class SheetsHyperLinkCopyPasteController extends Disposable {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMenuItem, IShortcutItem, MenuGroup, MenuItemType, MenuPosition } from '@univerjs/ui';
|
|
2
|
-
import { IAccessor } from '@
|
|
2
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
3
3
|
|
|
4
4
|
export declare const insertLinkMenuFactory: (accessor: IAccessor) => IMenuItem;
|
|
5
5
|
export declare const insertLinkMenuToolbarFactory: (accessor: IAccessor) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable,
|
|
1
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
3
|
import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
3
4
|
import { HyperLinkModel } from '@univerjs/sheets-hyper-link';
|
|
4
5
|
import { IEditorBridgeService } from '@univerjs/sheets-ui';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Disposable, ICommandService,
|
|
1
|
+
import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
|
|
2
2
|
import { MenuConfig, ComponentManager, IMenuService, IShortcutService } from '@univerjs/ui';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
4
|
|
|
4
5
|
export interface IUniverSheetsHyperLinkUIConfig {
|
|
5
6
|
menu?: MenuConfig;
|