@univerjs/sheets-thread-comment-ui 0.4.2-nightly.202411071606 → 0.4.2-nightly.202411081606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +558 -563
- package/lib/{locale → es/locale}/en-US.js +2 -2
- package/lib/{locale → es/locale}/fa-IR.js +2 -2
- package/lib/{locale → es/locale}/ru-RU.js +2 -2
- package/lib/{locale → es/locale}/vi-VN.js +2 -2
- package/lib/{locale → es/locale}/zh-CN.js +2 -2
- package/lib/{locale → es/locale}/zh-TW.js +2 -2
- package/lib/umd/index.js +1 -9
- package/package.json +27 -21
package/lib/es/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import { IThreadCommentDataSourceService, DeleteCommentMutation, AddCommentMutation, ThreadCommentModel } from "@univerjs/thread-comment";
|
|
17
|
-
import { AddCommentCommand, DeleteCommentCommand, DeleteCommentTreeCommand, IThreadCommentDataSourceService as
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
for (var
|
|
21
|
-
(
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
let
|
|
25
|
-
constructor(
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var je = (o, e, n) => e in o ? Ae(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
|
|
3
|
+
var E = (o, e, n) => je(o, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Inject as v, Disposable as $, DisposableCollection as Ve, CommandType as Be, IUniverInstanceService as N, InterceptorEffectEnum as He, UniverInstanceType as b, useDependency as O, Tools as Le, ICommandService as ie, Range as Fe, RANGE_TYPE as me, Rectangle as ke, DependentOn as We, Injector as Ze, Plugin as ze, IConfigService as Ge } from "@univerjs/core";
|
|
5
|
+
import { SheetsSelectionsService as pe, getSheetCommandTarget as Ke, SheetInterceptorService as ve, INTERCEPTOR_POINT as Ye, WorkbookCommentPermission as q, WorksheetViewPermission as J, RangeProtectionPermissionViewPoint as Q, SetWorksheetActiveOperation as qe, RemoveSheetCommand as Je } from "@univerjs/sheets";
|
|
6
|
+
import { SheetsThreadCommentModel as D, UniverSheetsThreadCommentPlugin as Qe } from "@univerjs/sheets-thread-comment";
|
|
7
|
+
import { ThreadCommentPanelService as se, ThreadCommentTree as Xe, ThreadCommentPanel as et, ToggleSheetCommentPanelOperation as _e, THREAD_COMMENT_PANEL as tt, SetActiveCommentOperation as ee, UniverThreadCommentUIPlugin as nt } from "@univerjs/thread-comment-ui";
|
|
8
|
+
import { IThreadCommentMentionDataService as Mn, UniverThreadCommentUIPlugin as wn } from "@univerjs/thread-comment-ui";
|
|
9
|
+
import { SheetCanvasPopManagerService as rt, IMarkSelectionService as fe, whenSheetEditorFocused as ot, getCurrentRangeDisable$ as Ce, ISheetClipboardService as it, COPY_TYPE as st, HoverManagerService as at, SheetPermissionInterceptorBaseController as Se, IEditorBridgeService as ct, SheetSkeletonManagerService as ht, ScrollToRangeOperation as mt } from "@univerjs/sheets-ui";
|
|
10
|
+
import { IZenZoneService as dt, useObservable as A, KeyCode as ut, MetaKeys as de, MenuItemType as ge, getMenuHiddenObservable as Ie, RibbonStartGroup as lt, ContextMenuPosition as pt, ContextMenuGroup as vt, ComponentManager as _t, IMenuManagerService as ft, IShortcutService as Ct } from "@univerjs/ui";
|
|
11
|
+
import { BehaviorSubject as St, debounceTime as ae, map as gt } from "rxjs";
|
|
12
|
+
import { IRenderManagerService as Pe } from "@univerjs/engine-render";
|
|
13
|
+
import { jsx as Te } from "react/jsx-runtime";
|
|
14
|
+
import { singleReferenceToGrid as j, serializeRange as It } from "@univerjs/engine-formula";
|
|
15
|
+
import { forwardRef as be, useRef as Me, createElement as we, useMemo as Pt, useCallback as ue, useEffect as Tt } from "react";
|
|
16
|
+
import { IThreadCommentDataSourceService as ye, DeleteCommentMutation as F, AddCommentMutation as oe, ThreadCommentModel as bt } from "@univerjs/thread-comment";
|
|
17
|
+
import { AddCommentCommand as En, DeleteCommentCommand as On, DeleteCommentTreeCommand as Un, IThreadCommentDataSourceService as Rn, ResolveCommentCommand as $n, UpdateCommentCommand as Nn } from "@univerjs/thread-comment";
|
|
18
|
+
const Ee = "univer.sheet.thread-comment-modal", ce = "comment-single", Oe = "SHEET_THREAD_COMMENT";
|
|
19
|
+
var Mt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, yt = (o, e, n, t) => {
|
|
20
|
+
for (var r = t > 1 ? void 0 : t ? wt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
21
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
22
|
+
return t && r && Mt(e, n, r), r;
|
|
23
|
+
}, le = (o, e) => (n, t) => e(n, t, o);
|
|
24
|
+
let U = class extends $ {
|
|
25
|
+
constructor(e, n) {
|
|
26
26
|
super();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this._canvasPopupManagerService =
|
|
27
|
+
E(this, "_lastPopup", null);
|
|
28
|
+
E(this, "_activePopup");
|
|
29
|
+
E(this, "_activePopup$", new St(null));
|
|
30
|
+
E(this, "activePopup$", this._activePopup$.asObservable());
|
|
31
|
+
this._canvasPopupManagerService = e, this._zenZoneService = n, this._initZenVisible(), this.disposeWithMe(() => {
|
|
32
32
|
this._activePopup$.complete();
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -36,28 +36,28 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
36
36
|
return this._activePopup;
|
|
37
37
|
}
|
|
38
38
|
_initZenVisible() {
|
|
39
|
-
this.disposeWithMe(this._zenZoneService.visible$.subscribe((
|
|
40
|
-
|
|
39
|
+
this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
|
|
40
|
+
e && this.hidePopup();
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
|
-
showPopup(
|
|
44
|
-
var
|
|
45
|
-
const { row, col, unitId, subUnitId } =
|
|
46
|
-
if (this._activePopup &&
|
|
47
|
-
this._activePopup =
|
|
43
|
+
showPopup(e, n) {
|
|
44
|
+
var h;
|
|
45
|
+
const { row: t, col: r, unitId: i, subUnitId: s } = e;
|
|
46
|
+
if (this._activePopup && t === this._activePopup.row && r === this._activePopup.col && i === this._activePopup.unitId && s === ((h = this.activePopup) == null ? void 0 : h.subUnitId)) {
|
|
47
|
+
this._activePopup = e, this._activePopup$.next(e);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
if (this._lastPopup && this._lastPopup.dispose(), this._zenZoneService.visible)
|
|
51
51
|
return;
|
|
52
|
-
this._activePopup =
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
this._activePopup = e, this._activePopup$.next(e);
|
|
53
|
+
const a = this._canvasPopupManagerService.attachPopupToCell(
|
|
54
|
+
t,
|
|
55
|
+
r,
|
|
56
56
|
{
|
|
57
|
-
componentKey:
|
|
58
|
-
onClickOutside:
|
|
57
|
+
componentKey: Ee,
|
|
58
|
+
onClickOutside: () => {
|
|
59
59
|
this.hidePopup();
|
|
60
|
-
},
|
|
60
|
+
},
|
|
61
61
|
direction: "horizontal",
|
|
62
62
|
excludeOutside: [
|
|
63
63
|
...Array.from(document.querySelectorAll(".univer-thread-comment")),
|
|
@@ -65,14 +65,14 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
65
65
|
].filter(Boolean)
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
if (!
|
|
68
|
+
if (!a)
|
|
69
69
|
throw new Error("[SheetsThreadCommentPopupService]: cannot show popup!");
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
dispose:
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}), this._lastPopup =
|
|
70
|
+
const c = new Ve();
|
|
71
|
+
c.add(a), c.add({
|
|
72
|
+
dispose: () => {
|
|
73
|
+
n == null || n();
|
|
74
|
+
}
|
|
75
|
+
}), this._lastPopup = c;
|
|
76
76
|
}
|
|
77
77
|
hidePopup() {
|
|
78
78
|
this._activePopup && (this._lastPopup && this._lastPopup.dispose(), this._lastPopup = null, this._activePopup = null, this._activePopup$.next(null));
|
|
@@ -83,202 +83,198 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
83
83
|
temp: !1
|
|
84
84
|
}, this._activePopup$.next(this._activePopup));
|
|
85
85
|
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
],
|
|
91
|
-
const
|
|
92
|
-
type:
|
|
86
|
+
};
|
|
87
|
+
U = yt([
|
|
88
|
+
le(0, v(rt)),
|
|
89
|
+
le(1, dt)
|
|
90
|
+
], U);
|
|
91
|
+
const V = {
|
|
92
|
+
type: Be.OPERATION,
|
|
93
93
|
id: "sheets.operation.show-comment-modal",
|
|
94
|
-
handler(
|
|
95
|
-
var
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
94
|
+
handler(o) {
|
|
95
|
+
var _;
|
|
96
|
+
const e = o.get(pe), n = o.get(N), t = o.get(U), r = o.get(se), i = (_ = e.getCurrentLastSelection()) == null ? void 0 : _.primary, s = o.get(D);
|
|
97
|
+
if (!i)
|
|
98
98
|
return !1;
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
99
|
+
const a = Ke(n);
|
|
100
|
+
if (!a)
|
|
101
101
|
return !1;
|
|
102
|
-
const { workbook, worksheet, unitId, subUnitId } =
|
|
103
|
-
workbook,
|
|
104
|
-
worksheet,
|
|
105
|
-
unitId,
|
|
106
|
-
subUnitId,
|
|
107
|
-
row:
|
|
108
|
-
col:
|
|
102
|
+
const { workbook: c, worksheet: h, unitId: d, subUnitId: m } = a, u = {
|
|
103
|
+
workbook: c,
|
|
104
|
+
worksheet: h,
|
|
105
|
+
unitId: d,
|
|
106
|
+
subUnitId: m,
|
|
107
|
+
row: i.startRow,
|
|
108
|
+
col: i.startColumn
|
|
109
109
|
};
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
unitId,
|
|
114
|
-
subUnitId,
|
|
115
|
-
commentId:
|
|
110
|
+
t.showPopup(u);
|
|
111
|
+
const p = s.getByLocation(d, m, i.startRow, i.startColumn);
|
|
112
|
+
return p && r.setActiveComment({
|
|
113
|
+
unitId: d,
|
|
114
|
+
subUnitId: m,
|
|
115
|
+
commentId: p,
|
|
116
116
|
trigger: "context-menu"
|
|
117
117
|
}), !0;
|
|
118
118
|
}
|
|
119
|
-
},
|
|
120
|
-
var
|
|
121
|
-
for (var
|
|
122
|
-
(
|
|
123
|
-
return
|
|
124
|
-
},
|
|
125
|
-
let
|
|
126
|
-
constructor(
|
|
127
|
-
super(), this._sheetInterceptorService =
|
|
119
|
+
}, Et = "sheets-thread-comment.config", Ot = {};
|
|
120
|
+
var Ut = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, $t = (o, e, n, t) => {
|
|
121
|
+
for (var r = t > 1 ? void 0 : t ? Rt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
122
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
123
|
+
return t && r && Ut(e, n, r), r;
|
|
124
|
+
}, B = (o, e) => (n, t) => e(n, t, o);
|
|
125
|
+
let k = class extends $ {
|
|
126
|
+
constructor(o, e, n, t) {
|
|
127
|
+
super(), this._sheetInterceptorService = o, this._sheetsThreadCommentModel = e, this._univerInstanceService = n, this._renderManagerService = t, this._initViewModelIntercept(), this._initSkeletonChange();
|
|
128
128
|
}
|
|
129
129
|
_initViewModelIntercept() {
|
|
130
130
|
this.disposeWithMe(
|
|
131
131
|
this._sheetInterceptorService.intercept(
|
|
132
|
-
|
|
132
|
+
Ye.CELL_CONTENT,
|
|
133
133
|
{
|
|
134
|
-
effect:
|
|
135
|
-
handler:
|
|
136
|
-
const { row, col, unitId, subUnitId } =
|
|
137
|
-
return this._sheetsThreadCommentModel.showCommentMarker(
|
|
138
|
-
...
|
|
134
|
+
effect: He.Style,
|
|
135
|
+
handler: (o, e, n) => {
|
|
136
|
+
const { row: t, col: r, unitId: i, subUnitId: s } = e;
|
|
137
|
+
return this._sheetsThreadCommentModel.showCommentMarker(i, s, t, r) ? n({
|
|
138
|
+
...o,
|
|
139
139
|
markers: {
|
|
140
|
-
...
|
|
140
|
+
...o == null ? void 0 : o.markers,
|
|
141
141
|
tr: {
|
|
142
142
|
color: "#FFBD37",
|
|
143
143
|
size: 6
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
}) :
|
|
147
|
-
},
|
|
146
|
+
}) : n(o);
|
|
147
|
+
},
|
|
148
148
|
priority: 100
|
|
149
149
|
}
|
|
150
150
|
)
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
_initSkeletonChange() {
|
|
154
|
-
const
|
|
155
|
-
var
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
const
|
|
159
|
-
(
|
|
160
|
-
}
|
|
161
|
-
this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.pipe(
|
|
162
|
-
|
|
154
|
+
const o = () => {
|
|
155
|
+
var r;
|
|
156
|
+
const e = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
157
|
+
if (!e) return;
|
|
158
|
+
const n = e.getUnitId(), t = this._renderManagerService.getRenderById(n);
|
|
159
|
+
(r = t == null ? void 0 : t.mainComponent) == null || r.makeForceDirty();
|
|
160
|
+
};
|
|
161
|
+
this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.pipe(ae(16)).subscribe(() => {
|
|
162
|
+
o();
|
|
163
163
|
}));
|
|
164
164
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
],
|
|
172
|
-
var
|
|
173
|
-
return
|
|
174
|
-
for (var
|
|
175
|
-
|
|
176
|
-
for (var
|
|
165
|
+
};
|
|
166
|
+
k = $t([
|
|
167
|
+
B(0, v(ve)),
|
|
168
|
+
B(1, v(D)),
|
|
169
|
+
B(2, N),
|
|
170
|
+
B(3, Pe)
|
|
171
|
+
], k);
|
|
172
|
+
var P = function() {
|
|
173
|
+
return P = Object.assign || function(o) {
|
|
174
|
+
for (var e, n = 1, t = arguments.length; n < t; n++) {
|
|
175
|
+
e = arguments[n];
|
|
176
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (o[r] = e[r]);
|
|
177
177
|
}
|
|
178
|
-
return
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
var
|
|
182
|
-
for (var
|
|
183
|
-
if (
|
|
184
|
-
for (var
|
|
185
|
-
e.indexOf(
|
|
186
|
-
return
|
|
187
|
-
},
|
|
188
|
-
var
|
|
189
|
-
return
|
|
178
|
+
return o;
|
|
179
|
+
}, P.apply(this, arguments);
|
|
180
|
+
}, Nt = function(o, e) {
|
|
181
|
+
var n = {};
|
|
182
|
+
for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && e.indexOf(t) < 0 && (n[t] = o[t]);
|
|
183
|
+
if (o != null && typeof Object.getOwnPropertySymbols == "function")
|
|
184
|
+
for (var r = 0, t = Object.getOwnPropertySymbols(o); r < t.length; r++)
|
|
185
|
+
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(o, t[r]) && (n[t[r]] = o[t[r]]);
|
|
186
|
+
return n;
|
|
187
|
+
}, Ue = be(function(o, e) {
|
|
188
|
+
var n = o.icon, t = o.id, r = o.className, i = o.extend, s = Nt(o, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), c = Me("_".concat(At()));
|
|
189
|
+
return Re(n, "".concat(t), { defIds: n.defIds, idSuffix: c.current }, P({ ref: e, className: a }, s), i);
|
|
190
190
|
});
|
|
191
|
-
function
|
|
192
|
-
return
|
|
193
|
-
return
|
|
191
|
+
function Re(o, e, n, t, r) {
|
|
192
|
+
return we(o.tag, P(P({ key: e }, Dt(o, n, r)), t), (xt(o, n).children || []).map(function(i, s) {
|
|
193
|
+
return Re(i, "".concat(e, "-").concat(o.tag, "-").concat(s), n, void 0, r);
|
|
194
194
|
}));
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
})), attrs;
|
|
196
|
+
function Dt(o, e, n) {
|
|
197
|
+
var t = P({}, o.attrs);
|
|
198
|
+
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
|
|
199
|
+
var r = e.defIds;
|
|
200
|
+
return !r || r.length === 0 || (o.tag === "use" && t["xlink:href"] && (t["xlink:href"] = t["xlink:href"] + e.idSuffix), Object.entries(t).forEach(function(i) {
|
|
201
|
+
var s = i[0], a = i[1];
|
|
202
|
+
typeof a == "string" && (t[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
203
|
+
})), t;
|
|
205
204
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}) }) : node;
|
|
205
|
+
function xt(o, e) {
|
|
206
|
+
var n, t = e.defIds;
|
|
207
|
+
return !t || t.length === 0 ? o : o.tag === "defs" && (!((n = o.children) === null || n === void 0) && n.length) ? P(P({}, o), { children: o.children.map(function(r) {
|
|
208
|
+
return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? P(P({}, r), { attrs: P(P({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
209
|
+
}) }) : o;
|
|
212
210
|
}
|
|
213
|
-
|
|
214
|
-
function generateShortUuid() {
|
|
211
|
+
function At() {
|
|
215
212
|
return Math.random().toString(36).substring(2, 8);
|
|
216
213
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
214
|
+
Ue.displayName = "UniverIcon";
|
|
215
|
+
var jt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, $e = be(function(o, e) {
|
|
216
|
+
return we(Ue, Object.assign({}, o, {
|
|
221
217
|
id: "comment-single",
|
|
222
|
-
ref,
|
|
223
|
-
icon:
|
|
218
|
+
ref: e,
|
|
219
|
+
icon: jt
|
|
224
220
|
}));
|
|
225
221
|
});
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
222
|
+
$e.displayName = "CommentSingle";
|
|
223
|
+
const Vt = () => {
|
|
224
|
+
const o = O(N), e = O(U), n = A(e.activePopup$), t = O(D);
|
|
225
|
+
if (A(t.commentUpdate$), !n)
|
|
230
226
|
return null;
|
|
231
|
-
const { row, col, unitId, subUnitId, trigger } =
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
var
|
|
235
|
-
return (
|
|
236
|
-
}
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
|
|
227
|
+
const { row: r, col: i, unitId: s, subUnitId: a, trigger: c } = n, h = t.getByLocation(s, a, r, i), d = `${Le.chatAtABC(i)}${r + 1}`, m = () => {
|
|
228
|
+
e.hidePopup();
|
|
229
|
+
}, u = (p) => {
|
|
230
|
+
var _, S, R;
|
|
231
|
+
return (R = (S = (_ = o.getCurrentUnitForType(b.UNIVER_SHEET)) == null ? void 0 : _.getSheetBySheetId(p)) == null ? void 0 : S.getName()) != null ? R : "";
|
|
232
|
+
};
|
|
233
|
+
return /* @__PURE__ */ Te(
|
|
234
|
+
Xe,
|
|
239
235
|
{
|
|
240
|
-
onClick:
|
|
241
|
-
|
|
242
|
-
},
|
|
236
|
+
onClick: () => {
|
|
237
|
+
e.persistPopup();
|
|
238
|
+
},
|
|
243
239
|
prefix: "cell",
|
|
244
|
-
id:
|
|
245
|
-
unitId,
|
|
246
|
-
subUnitId,
|
|
247
|
-
type:
|
|
248
|
-
refStr:
|
|
249
|
-
onClose,
|
|
250
|
-
getSubUnitName,
|
|
251
|
-
autoFocus:
|
|
240
|
+
id: h,
|
|
241
|
+
unitId: s,
|
|
242
|
+
subUnitId: a,
|
|
243
|
+
type: b.UNIVER_SHEET,
|
|
244
|
+
refStr: d,
|
|
245
|
+
onClose: m,
|
|
246
|
+
getSubUnitName: u,
|
|
247
|
+
autoFocus: c === "context-menu"
|
|
252
248
|
}
|
|
253
249
|
);
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
250
|
+
}, Bt = () => {
|
|
251
|
+
var g;
|
|
252
|
+
const o = O(fe), e = O(N), n = O(U), t = e.getCurrentUnitForType(b.UNIVER_SHEET), r = t.getUnitId(), i = O(ie), s = Pt(() => t.activeSheet$.pipe(gt((l) => l == null ? void 0 : l.getSheetId())), [t.activeSheet$]), a = A(s, (g = t.getActiveSheet()) == null ? void 0 : g.getSheetId()), c = Me(), h = O(se), d = A(h.activeCommentId$), m = A(h.panelVisible$, h.panelVisible), u = ue((l) => {
|
|
253
|
+
const I = t.getSheets(), f = {};
|
|
254
|
+
I.forEach((T, C) => {
|
|
255
|
+
f[T.getSheetId()] = C;
|
|
260
256
|
});
|
|
261
|
-
const
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return { ...
|
|
265
|
-
}).sort((
|
|
257
|
+
const M = (T) => T.map((C) => {
|
|
258
|
+
var he;
|
|
259
|
+
const y = j(C.ref), xe = [(he = f[C.subUnitId]) != null ? he : 0, y.row, y.column];
|
|
260
|
+
return { ...C, p: xe };
|
|
261
|
+
}).sort((C, y) => C.p[0] === y.p[0] ? C.p[1] === y.p[1] ? C.p[2] - y.p[2] : C.p[1] - y.p[1] : C.p[0] - y.p[0]);
|
|
266
262
|
return [
|
|
267
|
-
...
|
|
268
|
-
...
|
|
263
|
+
...M(l.filter((T) => !T.resolved)),
|
|
264
|
+
...M(l.filter((T) => T.resolved))
|
|
269
265
|
];
|
|
270
|
-
}, [
|
|
271
|
-
var
|
|
272
|
-
if (
|
|
273
|
-
const { row, column } =
|
|
274
|
-
startColumn:
|
|
275
|
-
endColumn:
|
|
276
|
-
startRow:
|
|
277
|
-
endRow:
|
|
266
|
+
}, [t]), p = ue((l) => {
|
|
267
|
+
var I;
|
|
268
|
+
if (l.unitId === r && l.subUnitId === a && !l.resolved) {
|
|
269
|
+
const { row: f, column: M } = j(l.ref), T = t.getSheetBySheetId(l.subUnitId), C = (I = T == null ? void 0 : T.getMergedCell(f, M)) != null ? I : {
|
|
270
|
+
startColumn: M,
|
|
271
|
+
endColumn: M,
|
|
272
|
+
startRow: f,
|
|
273
|
+
endRow: f
|
|
278
274
|
};
|
|
279
|
-
if (!Number.isNaN(
|
|
280
|
-
return
|
|
281
|
-
range:
|
|
275
|
+
if (!Number.isNaN(f) && !Number.isNaN(M))
|
|
276
|
+
return o.addShape({
|
|
277
|
+
range: C,
|
|
282
278
|
style: {
|
|
283
279
|
hasAutoFill: !1,
|
|
284
280
|
fill: "rgb(255, 189, 55, 0.35)",
|
|
@@ -289,204 +285,203 @@ const SheetsThreadCommentCell = /* @__PURE__ */ __name(() => {
|
|
|
289
285
|
primary: null
|
|
290
286
|
});
|
|
291
287
|
}
|
|
292
|
-
}, [
|
|
293
|
-
var
|
|
294
|
-
return (
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
return
|
|
305
|
-
!
|
|
306
|
-
}, [
|
|
307
|
-
|
|
288
|
+
}, [o, a, r]), _ = (l) => {
|
|
289
|
+
var I, f;
|
|
290
|
+
return (f = (I = t.getSheetBySheetId(l)) == null ? void 0 : I.getName()) != null ? f : "";
|
|
291
|
+
}, S = () => {
|
|
292
|
+
i.executeCommand(V.id);
|
|
293
|
+
}, R = (l) => {
|
|
294
|
+
d && d.unitId === l.unitId && d.subUnitId === l.subUnitId && d.commentId === l.id || (c.current && (o.removeShape(c.current), c.current = null), c.current = p(l));
|
|
295
|
+
}, x = () => {
|
|
296
|
+
c.current && (o.removeShape(c.current), c.current = null);
|
|
297
|
+
}, X = (l, I) => {
|
|
298
|
+
I && n.hidePopup();
|
|
299
|
+
};
|
|
300
|
+
return Tt(() => {
|
|
301
|
+
!m && c.current && o.removeShape(c.current);
|
|
302
|
+
}, [o, m]), /* @__PURE__ */ Te(
|
|
303
|
+
et,
|
|
308
304
|
{
|
|
309
|
-
unitId,
|
|
310
|
-
subUnitId
|
|
311
|
-
type:
|
|
312
|
-
onAdd:
|
|
313
|
-
getSubUnitName,
|
|
314
|
-
onResolve:
|
|
315
|
-
sortComments,
|
|
316
|
-
onItemEnter:
|
|
317
|
-
onItemLeave:
|
|
318
|
-
onDeleteComment:
|
|
305
|
+
unitId: r,
|
|
306
|
+
subUnitId$: s,
|
|
307
|
+
type: b.UNIVER_SHEET,
|
|
308
|
+
onAdd: S,
|
|
309
|
+
getSubUnitName: _,
|
|
310
|
+
onResolve: X,
|
|
311
|
+
sortComments: u,
|
|
312
|
+
onItemEnter: R,
|
|
313
|
+
onItemLeave: x,
|
|
314
|
+
onDeleteComment: () => (x(), !0)
|
|
319
315
|
}
|
|
320
316
|
);
|
|
321
|
-
},
|
|
322
|
-
id:
|
|
323
|
-
type:
|
|
324
|
-
icon:
|
|
317
|
+
}, Ht = (o) => ({
|
|
318
|
+
id: V.id,
|
|
319
|
+
type: ge.BUTTON,
|
|
320
|
+
icon: ce,
|
|
325
321
|
title: "sheetThreadComment.menu.addComment",
|
|
326
|
-
hidden$:
|
|
327
|
-
disabled$:
|
|
328
|
-
workbookTypes: [
|
|
329
|
-
worksheetTypes: [
|
|
330
|
-
rangeTypes: [
|
|
322
|
+
hidden$: Ie(o, b.UNIVER_SHEET),
|
|
323
|
+
disabled$: Ce(o, {
|
|
324
|
+
workbookTypes: [q],
|
|
325
|
+
worksheetTypes: [J],
|
|
326
|
+
rangeTypes: [Q]
|
|
331
327
|
})
|
|
332
|
-
}),
|
|
333
|
-
id:
|
|
334
|
-
type:
|
|
335
|
-
icon:
|
|
328
|
+
}), Lt = (o) => ({
|
|
329
|
+
id: _e.id,
|
|
330
|
+
type: ge.BUTTON,
|
|
331
|
+
icon: ce,
|
|
336
332
|
tooltip: "sheetThreadComment.menu.commentManagement",
|
|
337
|
-
disabled$:
|
|
338
|
-
workbookTypes: [
|
|
339
|
-
worksheetTypes: [
|
|
340
|
-
rangeTypes: [
|
|
333
|
+
disabled$: Ce(o, {
|
|
334
|
+
workbookTypes: [q],
|
|
335
|
+
worksheetTypes: [J],
|
|
336
|
+
rangeTypes: [Q]
|
|
341
337
|
}),
|
|
342
|
-
hidden$:
|
|
343
|
-
}),
|
|
344
|
-
id:
|
|
345
|
-
binding:
|
|
346
|
-
preconditions:
|
|
347
|
-
},
|
|
348
|
-
[
|
|
349
|
-
[
|
|
338
|
+
hidden$: Ie(o, b.UNIVER_SHEET)
|
|
339
|
+
}), Ft = {
|
|
340
|
+
id: V.id,
|
|
341
|
+
binding: ut.M | de.CTRL_COMMAND | de.ALT,
|
|
342
|
+
preconditions: ot
|
|
343
|
+
}, kt = {
|
|
344
|
+
[lt.OTHERS]: {
|
|
345
|
+
[_e.id]: {
|
|
350
346
|
order: 1,
|
|
351
|
-
menuItemFactory:
|
|
347
|
+
menuItemFactory: Lt
|
|
352
348
|
}
|
|
353
349
|
},
|
|
354
|
-
[
|
|
355
|
-
[
|
|
356
|
-
[
|
|
350
|
+
[pt.MAIN_AREA]: {
|
|
351
|
+
[vt.OTHERS]: {
|
|
352
|
+
[V.id]: {
|
|
357
353
|
order: 0,
|
|
358
|
-
menuItemFactory:
|
|
354
|
+
menuItemFactory: Ht
|
|
359
355
|
}
|
|
360
356
|
}
|
|
361
357
|
}
|
|
362
358
|
};
|
|
363
|
-
var
|
|
364
|
-
for (var
|
|
365
|
-
(
|
|
366
|
-
return
|
|
367
|
-
},
|
|
368
|
-
let
|
|
369
|
-
constructor(
|
|
370
|
-
super(), this._menuManagerService =
|
|
359
|
+
var Wt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, zt = (o, e, n, t) => {
|
|
360
|
+
for (var r = t > 1 ? void 0 : t ? Zt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
361
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
362
|
+
return t && r && Wt(e, n, r), r;
|
|
363
|
+
}, te = (o, e) => (n, t) => e(n, t, o);
|
|
364
|
+
let W = class extends $ {
|
|
365
|
+
constructor(o, e, n) {
|
|
366
|
+
super(), this._menuManagerService = o, this._componentManager = e, this._shortcutService = n, this._initMenu(), this._initShortcut(), this._initComponent();
|
|
371
367
|
}
|
|
372
368
|
_initShortcut() {
|
|
373
|
-
this._shortcutService.registerShortcut(
|
|
369
|
+
this._shortcutService.registerShortcut(Ft);
|
|
374
370
|
}
|
|
375
371
|
_initMenu() {
|
|
376
|
-
this._menuManagerService.mergeMenu(
|
|
372
|
+
this._menuManagerService.mergeMenu(kt);
|
|
377
373
|
}
|
|
378
374
|
_initComponent() {
|
|
379
375
|
[
|
|
380
|
-
[
|
|
381
|
-
[
|
|
382
|
-
[
|
|
383
|
-
].forEach(([
|
|
384
|
-
this._componentManager.register(
|
|
376
|
+
[Ee, Vt],
|
|
377
|
+
[tt, Bt],
|
|
378
|
+
[ce, $e]
|
|
379
|
+
].forEach(([o, e]) => {
|
|
380
|
+
this._componentManager.register(o, e);
|
|
385
381
|
});
|
|
386
382
|
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
],
|
|
393
|
-
var
|
|
394
|
-
for (var
|
|
395
|
-
(
|
|
396
|
-
return
|
|
397
|
-
},
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
startColumn:
|
|
401
|
-
startRow:
|
|
402
|
-
endColumn:
|
|
403
|
-
endRow:
|
|
383
|
+
};
|
|
384
|
+
W = zt([
|
|
385
|
+
te(0, ft),
|
|
386
|
+
te(1, v(_t)),
|
|
387
|
+
te(2, Ct)
|
|
388
|
+
], W);
|
|
389
|
+
var Gt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, Yt = (o, e, n, t) => {
|
|
390
|
+
for (var r = t > 1 ? void 0 : t ? Kt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
391
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
392
|
+
return t && r && Gt(e, n, r), r;
|
|
393
|
+
}, ne = (o, e) => (n, t) => e(n, t, o);
|
|
394
|
+
const qt = (o, e, n) => {
|
|
395
|
+
const t = j(o), r = n.row - e.row, i = n.column - e.column, s = {
|
|
396
|
+
startColumn: t.column + i,
|
|
397
|
+
startRow: t.row + r,
|
|
398
|
+
endColumn: t.column + i,
|
|
399
|
+
endRow: t.row + r
|
|
404
400
|
};
|
|
405
|
-
return
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
constructor(_sheetClipboardService, _sheetsThreadCommentModel, _threadCommentDataSourceService) {
|
|
401
|
+
return It(s);
|
|
402
|
+
};
|
|
403
|
+
let Z = class extends $ {
|
|
404
|
+
constructor(e, n, t) {
|
|
410
405
|
super();
|
|
411
|
-
|
|
412
|
-
this._sheetClipboardService =
|
|
406
|
+
E(this, "_copyInfo");
|
|
407
|
+
this._sheetClipboardService = e, this._sheetsThreadCommentModel = n, this._threadCommentDataSourceService = t, this._initClipboardHook();
|
|
413
408
|
}
|
|
414
409
|
// eslint-disable-next-line max-lines-per-function
|
|
415
410
|
_initClipboardHook() {
|
|
416
411
|
this.disposeWithMe(
|
|
417
412
|
this._sheetClipboardService.addClipboardHook({
|
|
418
|
-
id:
|
|
419
|
-
onBeforeCopy:
|
|
413
|
+
id: Oe,
|
|
414
|
+
onBeforeCopy: (e, n, t) => {
|
|
420
415
|
this._copyInfo = {
|
|
421
|
-
unitId,
|
|
422
|
-
subUnitId,
|
|
423
|
-
range
|
|
416
|
+
unitId: e,
|
|
417
|
+
subUnitId: n,
|
|
418
|
+
range: t
|
|
424
419
|
};
|
|
425
|
-
},
|
|
420
|
+
},
|
|
426
421
|
// eslint-disable-next-line max-lines-per-function
|
|
427
|
-
onPasteCells:
|
|
428
|
-
const { unitId:
|
|
429
|
-
row:
|
|
430
|
-
column:
|
|
422
|
+
onPasteCells: (e, n, t, r) => {
|
|
423
|
+
const { unitId: i, subUnitId: s, range: a } = n, c = {
|
|
424
|
+
row: a.rows[0],
|
|
425
|
+
column: a.cols[0]
|
|
431
426
|
};
|
|
432
|
-
if (
|
|
433
|
-
const { range:
|
|
434
|
-
row:
|
|
435
|
-
column:
|
|
427
|
+
if (r.copyType === st.CUT && this._copyInfo) {
|
|
428
|
+
const { range: h, unitId: d, subUnitId: m } = this._copyInfo, u = {
|
|
429
|
+
row: h.startRow,
|
|
430
|
+
column: h.startColumn
|
|
436
431
|
};
|
|
437
|
-
if (!(
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
this._threadCommentDataSourceService.syncUpdateMutationToColla ?
|
|
442
|
-
|
|
443
|
-
}) :
|
|
444
|
-
|
|
432
|
+
if (!(i === d && s === m)) {
|
|
433
|
+
const p = [];
|
|
434
|
+
Fe.foreach(h, (g, l) => {
|
|
435
|
+
const I = this._sheetsThreadCommentModel.getAllByLocation(d, m, g, l);
|
|
436
|
+
this._threadCommentDataSourceService.syncUpdateMutationToColla ? I.forEach((f) => {
|
|
437
|
+
p.push(f);
|
|
438
|
+
}) : I.forEach(({ children: f, ...M }) => {
|
|
439
|
+
M.parentId || p.push(M);
|
|
445
440
|
});
|
|
446
441
|
});
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
id:
|
|
442
|
+
const _ = [], S = [], R = [], x = [], X = (g) => {
|
|
443
|
+
_.unshift({
|
|
444
|
+
id: F.id,
|
|
450
445
|
params: {
|
|
451
|
-
unitId:
|
|
452
|
-
subUnitId:
|
|
453
|
-
commentId:
|
|
446
|
+
unitId: d,
|
|
447
|
+
subUnitId: m,
|
|
448
|
+
commentId: g.id
|
|
454
449
|
}
|
|
455
|
-
}),
|
|
456
|
-
id:
|
|
450
|
+
}), R.push({
|
|
451
|
+
id: oe.id,
|
|
457
452
|
params: {
|
|
458
|
-
unitId:
|
|
459
|
-
subUnitId:
|
|
453
|
+
unitId: i,
|
|
454
|
+
subUnitId: s,
|
|
460
455
|
comment: {
|
|
461
|
-
...
|
|
462
|
-
ref:
|
|
463
|
-
unitId:
|
|
464
|
-
subUnitId:
|
|
456
|
+
...g,
|
|
457
|
+
ref: qt(g.ref, u, c),
|
|
458
|
+
unitId: i,
|
|
459
|
+
subUnitId: s
|
|
465
460
|
},
|
|
466
461
|
sync: !0
|
|
467
462
|
}
|
|
468
|
-
}),
|
|
469
|
-
id:
|
|
463
|
+
}), S.push({
|
|
464
|
+
id: oe.id,
|
|
470
465
|
params: {
|
|
471
|
-
unitId:
|
|
472
|
-
subUnitId:
|
|
473
|
-
comment:
|
|
466
|
+
unitId: d,
|
|
467
|
+
subUnitId: m,
|
|
468
|
+
comment: g,
|
|
474
469
|
sync: !0
|
|
475
470
|
}
|
|
476
|
-
}),
|
|
477
|
-
id:
|
|
471
|
+
}), x.unshift({
|
|
472
|
+
id: F.id,
|
|
478
473
|
params: {
|
|
479
|
-
unitId:
|
|
480
|
-
subUnitId:
|
|
481
|
-
commentId:
|
|
474
|
+
unitId: i,
|
|
475
|
+
subUnitId: s,
|
|
476
|
+
commentId: g.id
|
|
482
477
|
}
|
|
483
478
|
});
|
|
484
|
-
}
|
|
485
|
-
return
|
|
486
|
-
|
|
479
|
+
};
|
|
480
|
+
return p.forEach((g) => {
|
|
481
|
+
X(g);
|
|
487
482
|
}), {
|
|
488
|
-
redos: [...
|
|
489
|
-
undos: [...
|
|
483
|
+
redos: [..._, ...R],
|
|
484
|
+
undos: [...x, ...S]
|
|
490
485
|
};
|
|
491
486
|
}
|
|
492
487
|
}
|
|
@@ -494,188 +489,188 @@ let SheetsThreadCommentCopyPasteController = (_a4 = class extends Disposable {
|
|
|
494
489
|
redos: [],
|
|
495
490
|
undos: []
|
|
496
491
|
};
|
|
497
|
-
}
|
|
492
|
+
}
|
|
498
493
|
})
|
|
499
494
|
);
|
|
500
495
|
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
],
|
|
507
|
-
var
|
|
508
|
-
for (var
|
|
509
|
-
(
|
|
510
|
-
return
|
|
511
|
-
},
|
|
512
|
-
let
|
|
513
|
-
constructor(
|
|
514
|
-
super(), this._hoverManagerService =
|
|
496
|
+
};
|
|
497
|
+
Z = Yt([
|
|
498
|
+
ne(0, v(it)),
|
|
499
|
+
ne(1, v(D)),
|
|
500
|
+
ne(2, ye)
|
|
501
|
+
], Z);
|
|
502
|
+
var Jt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Xt = (o, e, n, t) => {
|
|
503
|
+
for (var r = t > 1 ? void 0 : t ? Qt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
504
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
505
|
+
return t && r && Jt(e, n, r), r;
|
|
506
|
+
}, H = (o, e) => (n, t) => e(n, t, o);
|
|
507
|
+
let z = class extends $ {
|
|
508
|
+
constructor(o, e, n, t) {
|
|
509
|
+
super(), this._hoverManagerService = o, this._sheetsThreadCommentPopupService = e, this._sheetsThreadCommentModel = n, this._sheetPermissionInterceptorBaseController = t, this._initHoverEvent();
|
|
515
510
|
}
|
|
516
511
|
_initHoverEvent() {
|
|
517
512
|
this.disposeWithMe(
|
|
518
|
-
this._hoverManagerService.currentCell$.pipe(
|
|
519
|
-
const
|
|
520
|
-
if (
|
|
521
|
-
const { location } =
|
|
522
|
-
if (
|
|
513
|
+
this._hoverManagerService.currentCell$.pipe(ae(100)).subscribe((o) => {
|
|
514
|
+
const e = this._sheetsThreadCommentPopupService.activePopup;
|
|
515
|
+
if (o && (e && e.temp || !e)) {
|
|
516
|
+
const { location: n } = o, { unitId: t, subUnitId: r, row: i, col: s } = n, a = this._sheetsThreadCommentModel.getByLocation(t, r, i, s);
|
|
517
|
+
if (a) {
|
|
523
518
|
if (!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
524
|
-
workbookTypes: [
|
|
525
|
-
worksheetTypes: [
|
|
526
|
-
rangeTypes: [
|
|
527
|
-
}, [{ startRow:
|
|
519
|
+
workbookTypes: [q],
|
|
520
|
+
worksheetTypes: [J],
|
|
521
|
+
rangeTypes: [Q]
|
|
522
|
+
}, [{ startRow: i, startColumn: s, endRow: i, endColumn: s }]))
|
|
528
523
|
return;
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
unitId,
|
|
532
|
-
subUnitId,
|
|
533
|
-
row,
|
|
534
|
-
col,
|
|
535
|
-
commentId,
|
|
524
|
+
const h = this._sheetsThreadCommentModel.getComment(t, r, a);
|
|
525
|
+
h && !h.resolved && this._sheetsThreadCommentPopupService.showPopup({
|
|
526
|
+
unitId: t,
|
|
527
|
+
subUnitId: r,
|
|
528
|
+
row: i,
|
|
529
|
+
col: s,
|
|
530
|
+
commentId: a,
|
|
536
531
|
temp: !0
|
|
537
532
|
});
|
|
538
533
|
} else
|
|
539
|
-
|
|
534
|
+
e && this._sheetsThreadCommentPopupService.hidePopup();
|
|
540
535
|
}
|
|
541
536
|
})
|
|
542
537
|
);
|
|
543
538
|
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
],
|
|
551
|
-
var
|
|
552
|
-
for (var
|
|
553
|
-
(
|
|
554
|
-
return
|
|
555
|
-
},
|
|
556
|
-
let
|
|
557
|
-
constructor(
|
|
539
|
+
};
|
|
540
|
+
z = Xt([
|
|
541
|
+
H(0, v(at)),
|
|
542
|
+
H(1, v(U)),
|
|
543
|
+
H(2, v(D)),
|
|
544
|
+
H(3, v(Se))
|
|
545
|
+
], z);
|
|
546
|
+
var en = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, nn = (o, e, n, t) => {
|
|
547
|
+
for (var r = t > 1 ? void 0 : t ? tn(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
548
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
549
|
+
return t && r && en(e, n, r), r;
|
|
550
|
+
}, w = (o, e) => (n, t) => e(n, t, o);
|
|
551
|
+
let G = class extends $ {
|
|
552
|
+
constructor(e, n, t, r, i, s, a, c, h, d) {
|
|
558
553
|
super();
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
this._commandService =
|
|
562
|
-
}
|
|
563
|
-
_handleSelectionChange(
|
|
564
|
-
var
|
|
565
|
-
const
|
|
566
|
-
if (!
|
|
554
|
+
E(this, "_isSwitchToCommenting", !1);
|
|
555
|
+
E(this, "_selectionShapeInfo", null);
|
|
556
|
+
this._commandService = e, this._sheetsThreadCommentPopupService = n, this._sheetsThreadCommentModel = t, this._threadCommentPanelService = r, this._univerInstanceService = i, this._sheetPermissionInterceptorBaseController = s, this._markSelectionService = a, this._sheetSelectionService = c, this._editorBridgeService = h, this._renderManagerService = d, this._initCommandListener(), this._initPanelListener(), this._initMarkSelection(), this._initSelectionUpdateListener(), this._initEditorBridge();
|
|
557
|
+
}
|
|
558
|
+
_handleSelectionChange(e, n, t) {
|
|
559
|
+
var u, p, _;
|
|
560
|
+
const r = (u = e[0]) == null ? void 0 : u.range, i = this._renderManagerService.getRenderById(n), s = (p = i == null ? void 0 : i.with(ht).getWorksheetSkeleton(t)) == null ? void 0 : p.skeleton;
|
|
561
|
+
if (!s || !r)
|
|
567
562
|
return;
|
|
568
|
-
const
|
|
569
|
-
if ((((
|
|
570
|
-
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(
|
|
563
|
+
const a = s.getCellByIndex(r.startRow, r.startColumn);
|
|
564
|
+
if ((((_ = r.rangeType) != null ? _ : me.NORMAL) !== me.NORMAL || r.endColumn - r.startColumn > 0 || r.endRow - r.startRow > 0) && !((a.isMerged || a.isMergedMainCell) && ke.equals(a.mergeInfo, r))) {
|
|
565
|
+
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(ee.id);
|
|
571
566
|
return;
|
|
572
567
|
}
|
|
573
|
-
const
|
|
574
|
-
if (!this._sheetsThreadCommentModel.showCommentMarker(
|
|
575
|
-
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(
|
|
568
|
+
const h = a.actualRow, d = a.actualColumn;
|
|
569
|
+
if (!this._sheetsThreadCommentModel.showCommentMarker(n, t, h, d)) {
|
|
570
|
+
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(ee.id);
|
|
576
571
|
return;
|
|
577
572
|
}
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
unitId,
|
|
581
|
-
subUnitId,
|
|
582
|
-
commentId
|
|
573
|
+
const m = this._sheetsThreadCommentModel.getByLocation(n, t, h, d);
|
|
574
|
+
m && this._commandService.executeCommand(ee.id, {
|
|
575
|
+
unitId: n,
|
|
576
|
+
subUnitId: t,
|
|
577
|
+
commentId: m
|
|
583
578
|
});
|
|
584
579
|
}
|
|
585
580
|
_initSelectionUpdateListener() {
|
|
586
581
|
this.disposeWithMe(
|
|
587
|
-
this._sheetSelectionService.selectionMoveEnd$.subscribe((
|
|
582
|
+
this._sheetSelectionService.selectionMoveEnd$.subscribe((e) => {
|
|
588
583
|
if (this._isSwitchToCommenting)
|
|
589
584
|
return;
|
|
590
|
-
const
|
|
591
|
-
|
|
585
|
+
const n = this._sheetSelectionService.currentSelectionParam;
|
|
586
|
+
n && this._handleSelectionChange(e, n.unitId, n.sheetId);
|
|
592
587
|
})
|
|
593
588
|
);
|
|
594
589
|
}
|
|
595
590
|
_initEditorBridge() {
|
|
596
591
|
this.disposeWithMe(
|
|
597
|
-
this._editorBridgeService.visible$.subscribe((
|
|
598
|
-
|
|
592
|
+
this._editorBridgeService.visible$.subscribe((e) => {
|
|
593
|
+
e.visible && this._sheetsThreadCommentPopupService.hidePopup();
|
|
599
594
|
})
|
|
600
595
|
);
|
|
601
596
|
}
|
|
602
597
|
_initCommandListener() {
|
|
603
|
-
this._commandService.onCommandExecuted((
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
if (!
|
|
598
|
+
this._commandService.onCommandExecuted((e) => {
|
|
599
|
+
if (e.id === F.id) {
|
|
600
|
+
const n = e.params, t = this._sheetsThreadCommentPopupService.activePopup;
|
|
601
|
+
if (!t)
|
|
607
602
|
return;
|
|
608
|
-
const { unitId, subUnitId, commentId } =
|
|
609
|
-
|
|
603
|
+
const { unitId: r, subUnitId: i, commentId: s } = t;
|
|
604
|
+
n.unitId === r && n.subUnitId === i && n.commentId === s && this._sheetsThreadCommentPopupService.hidePopup();
|
|
610
605
|
}
|
|
611
606
|
});
|
|
612
607
|
}
|
|
613
608
|
_initPanelListener() {
|
|
614
|
-
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async (
|
|
615
|
-
var
|
|
616
|
-
if (
|
|
617
|
-
const { unitId, subUnitId, commentId, trigger } =
|
|
618
|
-
if (!
|
|
609
|
+
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async (e) => {
|
|
610
|
+
var n;
|
|
611
|
+
if (e) {
|
|
612
|
+
const { unitId: t, subUnitId: r, commentId: i, trigger: s } = e, a = this._sheetsThreadCommentModel.getComment(t, r, i);
|
|
613
|
+
if (!a || a.resolved)
|
|
619
614
|
return;
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
615
|
+
const c = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
616
|
+
if (!c || c.getUnitId() !== t)
|
|
622
617
|
return;
|
|
623
|
-
this._isSwitchToCommenting = !0, ((
|
|
624
|
-
unitId,
|
|
625
|
-
subUnitId
|
|
618
|
+
this._isSwitchToCommenting = !0, ((n = c.getActiveSheet()) == null ? void 0 : n.getSheetId()) !== r && await this._commandService.executeCommand(qe.id, {
|
|
619
|
+
unitId: t,
|
|
620
|
+
subUnitId: r
|
|
626
621
|
}), this._isSwitchToCommenting = !1;
|
|
627
|
-
const
|
|
622
|
+
const m = j(a.ref), { row: u, column: p } = m;
|
|
628
623
|
if (!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
629
|
-
workbookTypes: [
|
|
630
|
-
worksheetTypes: [
|
|
631
|
-
rangeTypes: [
|
|
632
|
-
}, [{ startRow:
|
|
624
|
+
workbookTypes: [q],
|
|
625
|
+
worksheetTypes: [J],
|
|
626
|
+
rangeTypes: [Q]
|
|
627
|
+
}, [{ startRow: u, startColumn: p, endRow: u, endColumn: p }]))
|
|
633
628
|
return;
|
|
634
|
-
const
|
|
635
|
-
if (await this._commandService.executeCommand(
|
|
629
|
+
const S = 1;
|
|
630
|
+
if (await this._commandService.executeCommand(mt.id, {
|
|
636
631
|
range: {
|
|
637
|
-
startRow: Math.max(
|
|
638
|
-
endRow:
|
|
639
|
-
startColumn: Math.max(
|
|
640
|
-
endColumn:
|
|
632
|
+
startRow: Math.max(m.row - S, 0),
|
|
633
|
+
endRow: m.row + S,
|
|
634
|
+
startColumn: Math.max(m.column - S, 0),
|
|
635
|
+
endColumn: m.column + S
|
|
641
636
|
}
|
|
642
637
|
}), this._editorBridgeService.isVisible().visible)
|
|
643
638
|
return;
|
|
644
639
|
this._sheetsThreadCommentPopupService.showPopup({
|
|
645
|
-
unitId,
|
|
646
|
-
subUnitId,
|
|
647
|
-
row:
|
|
648
|
-
col:
|
|
649
|
-
commentId:
|
|
650
|
-
trigger
|
|
640
|
+
unitId: t,
|
|
641
|
+
subUnitId: r,
|
|
642
|
+
row: m.row,
|
|
643
|
+
col: m.column,
|
|
644
|
+
commentId: a.id,
|
|
645
|
+
trigger: s
|
|
651
646
|
});
|
|
652
647
|
} else
|
|
653
648
|
this._sheetsThreadCommentPopupService.hidePopup();
|
|
654
649
|
}));
|
|
655
650
|
}
|
|
656
651
|
_initMarkSelection() {
|
|
657
|
-
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.pipe(
|
|
658
|
-
var
|
|
659
|
-
if (!
|
|
652
|
+
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.pipe(ae(100)).subscribe((e) => {
|
|
653
|
+
var u, p;
|
|
654
|
+
if (!e) {
|
|
660
655
|
this._selectionShapeInfo && (this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId), this._selectionShapeInfo = null);
|
|
661
656
|
return;
|
|
662
657
|
}
|
|
663
|
-
const { unitId, subUnitId, commentId } =
|
|
658
|
+
const { unitId: n, subUnitId: t, commentId: r } = e;
|
|
664
659
|
this._selectionShapeInfo && (this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId), this._selectionShapeInfo = null);
|
|
665
|
-
const
|
|
666
|
-
if (!
|
|
660
|
+
const i = this._sheetsThreadCommentModel.getComment(n, t, r);
|
|
661
|
+
if (!i)
|
|
667
662
|
return;
|
|
668
|
-
const
|
|
669
|
-
if (Number.isNaN(
|
|
663
|
+
const s = j(i.ref), { row: a, column: c } = s;
|
|
664
|
+
if (Number.isNaN(a) || Number.isNaN(c))
|
|
670
665
|
return null;
|
|
671
|
-
const
|
|
672
|
-
startColumn:
|
|
673
|
-
endColumn:
|
|
674
|
-
startRow:
|
|
675
|
-
endRow:
|
|
676
|
-
},
|
|
666
|
+
const h = (u = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET)) == null ? void 0 : u.getSheetBySheetId(t), d = (p = h == null ? void 0 : h.getMergedCell(a, c)) != null ? p : {
|
|
667
|
+
startColumn: c,
|
|
668
|
+
endColumn: c,
|
|
669
|
+
startRow: a,
|
|
670
|
+
endRow: a
|
|
671
|
+
}, m = this._markSelectionService.addShape(
|
|
677
672
|
{
|
|
678
|
-
range:
|
|
673
|
+
range: d,
|
|
679
674
|
style: {
|
|
680
675
|
hasAutoFill: !1,
|
|
681
676
|
fill: "rgb(255, 189, 55, 0.35)",
|
|
@@ -688,131 +683,131 @@ let SheetsThreadCommentPopupController = (_a6 = class extends Disposable {
|
|
|
688
683
|
[],
|
|
689
684
|
-1
|
|
690
685
|
);
|
|
691
|
-
|
|
692
|
-
...
|
|
693
|
-
shapeId
|
|
686
|
+
m && (this._selectionShapeInfo = {
|
|
687
|
+
...e,
|
|
688
|
+
shapeId: m
|
|
694
689
|
});
|
|
695
690
|
}));
|
|
696
691
|
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
],
|
|
710
|
-
var
|
|
711
|
-
for (var
|
|
712
|
-
(
|
|
713
|
-
return
|
|
714
|
-
},
|
|
715
|
-
let
|
|
716
|
-
constructor(
|
|
717
|
-
super(), this._sheetInterceptorService =
|
|
692
|
+
};
|
|
693
|
+
G = nn([
|
|
694
|
+
w(0, ie),
|
|
695
|
+
w(1, v(U)),
|
|
696
|
+
w(2, v(D)),
|
|
697
|
+
w(3, v(se)),
|
|
698
|
+
w(4, N),
|
|
699
|
+
w(5, v(Se)),
|
|
700
|
+
w(6, fe),
|
|
701
|
+
w(7, v(pe)),
|
|
702
|
+
w(8, ct),
|
|
703
|
+
w(9, Pe)
|
|
704
|
+
], G);
|
|
705
|
+
var rn = Object.defineProperty, on = Object.getOwnPropertyDescriptor, sn = (o, e, n, t) => {
|
|
706
|
+
for (var r = t > 1 ? void 0 : t ? on(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
707
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
708
|
+
return t && r && rn(e, n, r), r;
|
|
709
|
+
}, L = (o, e) => (n, t) => e(n, t, o);
|
|
710
|
+
let K = class extends $ {
|
|
711
|
+
constructor(o, e, n, t) {
|
|
712
|
+
super(), this._sheetInterceptorService = o, this._univerInstanceService = e, this._threadCommentModel = n, this._threadCommentDataSourceService = t, this._initSheetChange();
|
|
718
713
|
}
|
|
719
714
|
_initSheetChange() {
|
|
720
715
|
this.disposeWithMe(
|
|
721
716
|
this._sheetInterceptorService.interceptCommand({
|
|
722
|
-
getMutations:
|
|
723
|
-
var
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
if (!
|
|
717
|
+
getMutations: (o) => {
|
|
718
|
+
var e;
|
|
719
|
+
if (o.id === Je.id) {
|
|
720
|
+
const n = o.params, t = n.unitId ? this._univerInstanceService.getUnit(n.unitId) : this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
721
|
+
if (!t)
|
|
727
722
|
return { redos: [], undos: [] };
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
723
|
+
const r = t.getUnitId(), i = n.subUnitId || ((e = t.getActiveSheet()) == null ? void 0 : e.getSheetId());
|
|
724
|
+
if (!i)
|
|
730
725
|
return { redos: [], undos: [] };
|
|
731
|
-
const
|
|
732
|
-
id:
|
|
726
|
+
const s = this._threadCommentModel.ensureMap(r, i), a = Array.from(s.values()).filter((u) => !u.parentId), c = a.map((u) => u.id), h = this._threadCommentDataSourceService.syncUpdateMutationToColla, d = c.map((u) => ({
|
|
727
|
+
id: F.id,
|
|
733
728
|
params: {
|
|
734
|
-
unitId,
|
|
735
|
-
subUnitId,
|
|
736
|
-
commentId:
|
|
729
|
+
unitId: r,
|
|
730
|
+
subUnitId: i,
|
|
731
|
+
commentId: u
|
|
737
732
|
}
|
|
738
|
-
})),
|
|
739
|
-
id:
|
|
733
|
+
})), m = a.map(({ children: u, ...p }) => ({
|
|
734
|
+
id: oe.id,
|
|
740
735
|
params: {
|
|
741
|
-
unitId,
|
|
742
|
-
subUnitId,
|
|
736
|
+
unitId: r,
|
|
737
|
+
subUnitId: i,
|
|
743
738
|
comment: {
|
|
744
|
-
...
|
|
745
|
-
children:
|
|
739
|
+
...p,
|
|
740
|
+
children: h ? u : void 0
|
|
746
741
|
},
|
|
747
|
-
sync: !
|
|
742
|
+
sync: !h
|
|
748
743
|
}
|
|
749
744
|
}));
|
|
750
|
-
return { redos, undos };
|
|
745
|
+
return { redos: d, undos: m };
|
|
751
746
|
}
|
|
752
747
|
return { redos: [], undos: [] };
|
|
753
|
-
}
|
|
748
|
+
}
|
|
754
749
|
})
|
|
755
750
|
);
|
|
756
751
|
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
],
|
|
764
|
-
var
|
|
765
|
-
for (var
|
|
766
|
-
(
|
|
767
|
-
return
|
|
768
|
-
},
|
|
769
|
-
let
|
|
770
|
-
constructor(
|
|
771
|
-
super(), this._config =
|
|
772
|
-
const { menu, ...
|
|
773
|
-
|
|
752
|
+
};
|
|
753
|
+
K = sn([
|
|
754
|
+
L(0, v(ve)),
|
|
755
|
+
L(1, N),
|
|
756
|
+
L(2, v(bt)),
|
|
757
|
+
L(3, ye)
|
|
758
|
+
], K);
|
|
759
|
+
var Ne = Object.defineProperty, an = Object.getOwnPropertyDescriptor, cn = (o, e, n) => e in o ? Ne(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n, hn = (o, e, n, t) => {
|
|
760
|
+
for (var r = t > 1 ? void 0 : t ? an(e, n) : e, i = o.length - 1, s; i >= 0; i--)
|
|
761
|
+
(s = o[i]) && (r = (t ? s(e, n, r) : s(r)) || r);
|
|
762
|
+
return t && r && Ne(e, n, r), r;
|
|
763
|
+
}, re = (o, e) => (n, t) => e(n, t, o), De = (o, e, n) => cn(o, typeof e != "symbol" ? e + "" : e, n);
|
|
764
|
+
let Y = class extends ze {
|
|
765
|
+
constructor(o = Ot, e, n, t) {
|
|
766
|
+
super(), this._config = o, this._injector = e, this._commandService = n, this._configService = t;
|
|
767
|
+
const { menu: r, ...i } = this._config;
|
|
768
|
+
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Et, i);
|
|
774
769
|
}
|
|
775
770
|
onStarting() {
|
|
776
771
|
[
|
|
777
|
-
[
|
|
778
|
-
[
|
|
779
|
-
[
|
|
780
|
-
[
|
|
781
|
-
[
|
|
782
|
-
[
|
|
783
|
-
[
|
|
784
|
-
].forEach((
|
|
785
|
-
this._injector.add(
|
|
786
|
-
}), [
|
|
787
|
-
this._commandService.registerCommand(
|
|
788
|
-
}), this._injector.get(
|
|
772
|
+
[W],
|
|
773
|
+
[k],
|
|
774
|
+
[Z],
|
|
775
|
+
[z],
|
|
776
|
+
[K],
|
|
777
|
+
[G],
|
|
778
|
+
[U]
|
|
779
|
+
].forEach((o) => {
|
|
780
|
+
this._injector.add(o);
|
|
781
|
+
}), [V].forEach((o) => {
|
|
782
|
+
this._commandService.registerCommand(o);
|
|
783
|
+
}), this._injector.get(W);
|
|
789
784
|
}
|
|
790
785
|
onReady() {
|
|
791
|
-
this._injector.get(
|
|
786
|
+
this._injector.get(k), this._injector.get(K);
|
|
792
787
|
}
|
|
793
788
|
onRendered() {
|
|
794
|
-
this._injector.get(
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
],
|
|
789
|
+
this._injector.get(Z), this._injector.get(z), this._injector.get(G);
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
De(Y, "pluginName", Oe);
|
|
793
|
+
De(Y, "type", b.UNIVER_SHEET);
|
|
794
|
+
Y = hn([
|
|
795
|
+
We(nt, Qe),
|
|
796
|
+
re(1, v(Ze)),
|
|
797
|
+
re(2, v(ie)),
|
|
798
|
+
re(3, Ge)
|
|
799
|
+
], Y);
|
|
805
800
|
export {
|
|
806
|
-
AddCommentCommand,
|
|
807
|
-
DeleteCommentCommand,
|
|
808
|
-
DeleteCommentTreeCommand,
|
|
809
|
-
|
|
810
|
-
IThreadCommentMentionDataService,
|
|
811
|
-
ResolveCommentCommand,
|
|
812
|
-
SHEETS_THREAD_COMMENT,
|
|
813
|
-
SheetsThreadCommentPopupService,
|
|
814
|
-
ShowAddSheetCommentModalOperation,
|
|
815
|
-
UniverSheetsThreadCommentUIPlugin,
|
|
816
|
-
|
|
817
|
-
UpdateCommentCommand
|
|
801
|
+
En as AddCommentCommand,
|
|
802
|
+
On as DeleteCommentCommand,
|
|
803
|
+
Un as DeleteCommentTreeCommand,
|
|
804
|
+
Rn as IThreadCommentDataSourceService,
|
|
805
|
+
Mn as IThreadCommentMentionDataService,
|
|
806
|
+
$n as ResolveCommentCommand,
|
|
807
|
+
Oe as SHEETS_THREAD_COMMENT,
|
|
808
|
+
U as SheetsThreadCommentPopupService,
|
|
809
|
+
V as ShowAddSheetCommentModalOperation,
|
|
810
|
+
Y as UniverSheetsThreadCommentUIPlugin,
|
|
811
|
+
wn as UniverThreadCommentUIPlugin,
|
|
812
|
+
Nn as UpdateCommentCommand
|
|
818
813
|
};
|