@univerjs/docs-thread-comment-ui 0.10.12-nightly.202510221114 → 0.10.12-nightly.202510251119
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 +311 -261
- package/lib/index.js +311 -261
- package/lib/umd/index.js +2 -2
- package/package.json +9 -9
package/lib/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { addCustomDecorationBySelectionFactory as
|
|
6
|
-
import { IThreadCommentDataSourceService as
|
|
7
|
-
import { SetActiveCommentOperation as
|
|
8
|
-
import { DocSelectionManagerService as
|
|
9
|
-
import { IRenderManagerService as
|
|
10
|
-
import { ISidebarService as
|
|
11
|
-
import { BehaviorSubject as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
const
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var Se = (e, t, r) => t in e ? Ie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var Z = (e, t, r) => Se(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { CommandType as E, ICommandService as M, CustomDecorationType as Y, sequenceExecute as te, Inject as p, Disposable as j, UniverInstanceType as _, SHEET_EDITOR_UNITS as Oe, IUniverInstanceService as A, Injector as ne, isInternalEditorID as re, UserManagerService as Me, BuildTextUtils as De, DependentOn as be, IConfigService as Te, Plugin as xe, merge as Ue } from "@univerjs/core";
|
|
5
|
+
import { addCustomDecorationBySelectionFactory as Re, deleteCustomDecorationFactory as ye, DocSelectionRenderService as Ee, DocBackScrollRenderController as Ae, DocRenderController as $e } from "@univerjs/docs-ui";
|
|
6
|
+
import { IThreadCommentDataSourceService as Pe, AddCommentMutation as we, getDT as Ne, ThreadCommentModel as oe } from "@univerjs/thread-comment";
|
|
7
|
+
import { SetActiveCommentOperation as ie, ThreadCommentPanelService as U, ThreadCommentPanel as Ve, UniverThreadCommentUIPlugin as je } from "@univerjs/thread-comment-ui";
|
|
8
|
+
import { DocSelectionManagerService as B, DocSkeletonManagerService as Be, RichTextEditingMutation as se, SetTextSelectionsOperation as Fe, DocInterceptorService as He, DOC_INTERCEPTOR_POINT as Le } from "@univerjs/docs";
|
|
9
|
+
import { IRenderManagerService as F, withCurrentTypeOfRenderer as We, DocumentEditArea as X } from "@univerjs/engine-render";
|
|
10
|
+
import { ISidebarService as H, getMenuHiddenObservable as de, MenuItemType as ce, useDependency as y, useObservable as K, ContextMenuPosition as Ze, ContextMenuGroup as Ke, RibbonInsertGroup as Ge, IMenuManagerService as Je, ComponentManager as qe } from "@univerjs/ui";
|
|
11
|
+
import { BehaviorSubject as Ye, Observable as ae, debounceTime as me, filter as ze } from "rxjs";
|
|
12
|
+
import { jsx as Qe } from "react/jsx-runtime";
|
|
13
|
+
import { useMemo as G, useState as Xe, useEffect as ke, useRef as et, createElement as le, forwardRef as tt } from "react";
|
|
14
|
+
const nt = "DOC_THREAD_COMMENT_UI_PLUGIN", I = "default_doc", ue = {
|
|
15
15
|
id: "docs.command.add-comment",
|
|
16
|
-
type:
|
|
16
|
+
type: E.COMMAND,
|
|
17
17
|
async handler(e, t) {
|
|
18
18
|
if (!t)
|
|
19
19
|
return !1;
|
|
20
|
-
const { comment: r, unitId: n } = t, i = await e.get(
|
|
20
|
+
const { comment: r, unitId: n } = t, i = await e.get(Pe).addComment(r), s = e.get(M), d = Re(
|
|
21
21
|
e,
|
|
22
22
|
{
|
|
23
23
|
id: i.threadId,
|
|
@@ -25,49 +25,49 @@ const rt = "DOC_THREAD_COMMENT_UI_PLUGIN", S = "default_doc", he = {
|
|
|
25
25
|
unitId: n
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
if (
|
|
28
|
+
if (d) {
|
|
29
29
|
const l = {
|
|
30
|
-
id:
|
|
30
|
+
id: we.id,
|
|
31
31
|
params: {
|
|
32
32
|
unitId: n,
|
|
33
|
-
subUnitId:
|
|
33
|
+
subUnitId: I,
|
|
34
34
|
comment: i
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
id:
|
|
36
|
+
}, C = {
|
|
37
|
+
id: ie.id,
|
|
38
38
|
params: {
|
|
39
39
|
unitId: n,
|
|
40
|
-
subUnitId:
|
|
40
|
+
subUnitId: I,
|
|
41
41
|
commentId: i.id
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return (await
|
|
44
|
+
return (await te([l, d, C], s)).result;
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
47
|
}
|
|
48
48
|
}, Ce = {
|
|
49
49
|
id: "docs.command.delete-comment",
|
|
50
|
-
type:
|
|
50
|
+
type: E.COMMAND,
|
|
51
51
|
async handler(e, t) {
|
|
52
52
|
if (!t)
|
|
53
53
|
return !1;
|
|
54
|
-
const { commentId: r, unitId: n } = t, o = e.get(
|
|
54
|
+
const { commentId: r, unitId: n } = t, o = e.get(M), i = ye(e, {
|
|
55
55
|
id: r,
|
|
56
56
|
unitId: n
|
|
57
57
|
});
|
|
58
|
-
return i ? (await
|
|
58
|
+
return i ? (await te([i], o)).result : !1;
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
var
|
|
62
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
63
|
-
(
|
|
61
|
+
var rt = Object.getOwnPropertyDescriptor, ot = (e, t, r, n) => {
|
|
62
|
+
for (var o = n > 1 ? void 0 : n ? rt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
63
|
+
(s = e[i]) && (o = s(o) || o);
|
|
64
64
|
return o;
|
|
65
|
-
},
|
|
66
|
-
let
|
|
65
|
+
}, k = (e, t) => (r, n) => t(r, n, e);
|
|
66
|
+
let x = class extends j {
|
|
67
67
|
constructor(t, r) {
|
|
68
68
|
super();
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
Z(this, "_addingComment$", new Ye(void 0));
|
|
70
|
+
Z(this, "addingComment$", this._addingComment$.asObservable());
|
|
71
71
|
this._sidebarService = t, this._threadCommentPanelService = r, this.disposeWithMe(() => {
|
|
72
72
|
this._addingComment$.complete();
|
|
73
73
|
});
|
|
@@ -82,34 +82,34 @@ let T = class extends B {
|
|
|
82
82
|
this._addingComment$.next(void 0);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
],
|
|
89
|
-
const
|
|
90
|
-
var
|
|
91
|
-
const t = e.get(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
e.get(
|
|
85
|
+
x = ot([
|
|
86
|
+
k(0, H),
|
|
87
|
+
k(1, p(U))
|
|
88
|
+
], x);
|
|
89
|
+
const he = (e) => {
|
|
90
|
+
var s;
|
|
91
|
+
const t = e.get(F), r = e.get(B), n = (s = We(
|
|
92
|
+
_.UNIVER_DOC,
|
|
93
|
+
Be,
|
|
94
|
+
e.get(A),
|
|
95
95
|
t
|
|
96
|
-
)) == null ? void 0 :
|
|
96
|
+
)) == null ? void 0 : s.getSkeleton(), o = n == null ? void 0 : n.getViewModel().getEditArea();
|
|
97
97
|
if (o === X.FOOTER || o === X.HEADER)
|
|
98
98
|
return !0;
|
|
99
99
|
const i = r.getActiveTextRange();
|
|
100
100
|
return !!(i == null || i.collapsed);
|
|
101
101
|
};
|
|
102
|
-
function
|
|
102
|
+
function it(e) {
|
|
103
103
|
return {
|
|
104
|
-
id:
|
|
105
|
-
type:
|
|
104
|
+
id: L.id,
|
|
105
|
+
type: ce.BUTTON,
|
|
106
106
|
icon: "CommentIcon",
|
|
107
107
|
title: "threadCommentUI.panel.addComment",
|
|
108
108
|
tooltip: "threadCommentUI.panel.addComment",
|
|
109
|
-
hidden$:
|
|
110
|
-
disabled$: new
|
|
111
|
-
const n = e.get(
|
|
112
|
-
t.next(
|
|
109
|
+
hidden$: de(e, _.UNIVER_DOC, void 0, Oe),
|
|
110
|
+
disabled$: new ae(function(t) {
|
|
111
|
+
const n = e.get(B).textSelection$.pipe(me(16)).subscribe(() => {
|
|
112
|
+
t.next(he(e));
|
|
113
113
|
});
|
|
114
114
|
return () => {
|
|
115
115
|
n.unsubscribe();
|
|
@@ -120,73 +120,73 @@ function dt(e) {
|
|
|
120
120
|
function st(e) {
|
|
121
121
|
return {
|
|
122
122
|
id: Q.id,
|
|
123
|
-
type:
|
|
123
|
+
type: ce.BUTTON,
|
|
124
124
|
icon: "CommentIcon",
|
|
125
125
|
title: "threadCommentUI.panel.addComment",
|
|
126
126
|
tooltip: "threadCommentUI.panel.addComment",
|
|
127
|
-
hidden$:
|
|
127
|
+
hidden$: de(e, _.UNIVER_DOC)
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
const e =
|
|
132
|
-
() => i.textSelection$.pipe(
|
|
130
|
+
const O = () => {
|
|
131
|
+
const e = y(A), t = y(ne), r = G(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC).pipe(ze((c) => !!c && !re(c.getUnitId()))), [e]), n = K(r), o = G(() => new ae((c) => c.next(I)), []), i = y(B), s = G(
|
|
132
|
+
() => i.textSelection$.pipe(me(16)),
|
|
133
133
|
[i.textSelection$]
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
135
|
+
K(s);
|
|
136
|
+
const d = y(M), l = y(x), C = K(l.addingComment$), [a, h] = Xe([]);
|
|
137
|
+
if (ke(() => {
|
|
138
138
|
var D;
|
|
139
139
|
const c = /* @__PURE__ */ new Set(), m = n == null ? void 0 : n.getCustomDecorations();
|
|
140
140
|
h((D = m == null ? void 0 : m.map((u) => u.id).filter((u) => {
|
|
141
|
-
const
|
|
142
|
-
return c.add(u), !
|
|
141
|
+
const S = c.has(u);
|
|
142
|
+
return c.add(u), !S;
|
|
143
143
|
})) != null ? D : []);
|
|
144
|
-
const
|
|
145
|
-
var
|
|
144
|
+
const v = d.onCommandExecuted((u) => {
|
|
145
|
+
var S;
|
|
146
146
|
if (u.id === se.id) {
|
|
147
|
-
const R = /* @__PURE__ */ new Set(),
|
|
148
|
-
h((
|
|
149
|
-
const
|
|
150
|
-
return R.add(
|
|
151
|
-
})) != null ?
|
|
147
|
+
const R = /* @__PURE__ */ new Set(), W = n == null ? void 0 : n.getCustomDecorations();
|
|
148
|
+
h((S = W == null ? void 0 : W.map(($) => $.id).filter(($) => {
|
|
149
|
+
const ve = R.has($);
|
|
150
|
+
return R.add($), !ve;
|
|
151
|
+
})) != null ? S : []);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
return () => {
|
|
155
|
-
|
|
155
|
+
v.dispose();
|
|
156
156
|
};
|
|
157
|
-
}, [
|
|
157
|
+
}, [d, n]), !n)
|
|
158
158
|
return null;
|
|
159
|
-
const
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
|
|
159
|
+
const g = he(t), f = n.getUnitId();
|
|
160
|
+
return /* @__PURE__ */ Qe(
|
|
161
|
+
Ve,
|
|
162
162
|
{
|
|
163
|
-
unitId:
|
|
163
|
+
unitId: f,
|
|
164
164
|
subUnitId$: o,
|
|
165
|
-
type:
|
|
165
|
+
type: _.UNIVER_DOC,
|
|
166
166
|
onAdd: () => {
|
|
167
|
-
|
|
167
|
+
d.executeCommand(L.id);
|
|
168
168
|
},
|
|
169
169
|
getSubUnitName: () => "",
|
|
170
|
-
disableAdd:
|
|
171
|
-
tempComment:
|
|
170
|
+
disableAdd: g,
|
|
171
|
+
tempComment: C,
|
|
172
172
|
onAddComment: (c) => {
|
|
173
173
|
if (!c.parentId) {
|
|
174
174
|
const m = {
|
|
175
|
-
unitId:
|
|
176
|
-
range:
|
|
175
|
+
unitId: f,
|
|
176
|
+
range: C,
|
|
177
177
|
comment: c
|
|
178
178
|
};
|
|
179
|
-
return
|
|
179
|
+
return d.executeCommand(ue.id, m), l.endAdd(), !1;
|
|
180
180
|
}
|
|
181
181
|
return !0;
|
|
182
182
|
},
|
|
183
183
|
onDeleteComment: (c) => {
|
|
184
184
|
if (!c.parentId) {
|
|
185
185
|
const m = {
|
|
186
|
-
unitId:
|
|
186
|
+
unitId: f,
|
|
187
187
|
commentId: c.id
|
|
188
188
|
};
|
|
189
|
-
return
|
|
189
|
+
return d.executeCommand(Ce.id, m), !1;
|
|
190
190
|
}
|
|
191
191
|
return !0;
|
|
192
192
|
},
|
|
@@ -194,52 +194,52 @@ const M = () => {
|
|
|
194
194
|
}
|
|
195
195
|
);
|
|
196
196
|
};
|
|
197
|
-
|
|
198
|
-
const
|
|
197
|
+
O.componentKey = "univer.doc.thread-comment-panel";
|
|
198
|
+
const P = {
|
|
199
199
|
id: "docs.operation.show-comment-panel",
|
|
200
|
-
type:
|
|
200
|
+
type: E.OPERATION,
|
|
201
201
|
handler(e, t) {
|
|
202
202
|
var o;
|
|
203
|
-
const r = e.get(U), n = e.get(
|
|
204
|
-
return (!r.panelVisible || ((o = n.options.children) == null ? void 0 : o.label) !==
|
|
203
|
+
const r = e.get(U), n = e.get(H);
|
|
204
|
+
return (!r.panelVisible || ((o = n.options.children) == null ? void 0 : o.label) !== O.componentKey) && (n.open({
|
|
205
205
|
header: { title: "threadCommentUI.panel.title" },
|
|
206
|
-
children: { label:
|
|
206
|
+
children: { label: O.componentKey },
|
|
207
207
|
width: 320,
|
|
208
208
|
onClose: () => r.setPanelVisible(!1)
|
|
209
209
|
}), r.setPanelVisible(!0)), t && r.setActiveComment(t == null ? void 0 : t.activeComment), !0;
|
|
210
210
|
}
|
|
211
211
|
}, Q = {
|
|
212
212
|
id: "docs.operation.toggle-comment-panel",
|
|
213
|
-
type:
|
|
213
|
+
type: E.OPERATION,
|
|
214
214
|
handler(e) {
|
|
215
215
|
var n;
|
|
216
|
-
const t = e.get(U), r = e.get(
|
|
217
|
-
return !t.panelVisible || ((n = r.options.children) == null ? void 0 : n.label) !==
|
|
216
|
+
const t = e.get(U), r = e.get(H);
|
|
217
|
+
return !t.panelVisible || ((n = r.options.children) == null ? void 0 : n.label) !== O.componentKey ? (r.open({
|
|
218
218
|
header: { title: "threadCommentUI.panel.title" },
|
|
219
|
-
children: { label:
|
|
219
|
+
children: { label: O.componentKey },
|
|
220
220
|
width: 320,
|
|
221
221
|
onClose: () => t.setPanelVisible(!1)
|
|
222
222
|
}), t.setPanelVisible(!0)) : (r.close(), t.setPanelVisible(!1), t.setActiveComment(null)), !0;
|
|
223
223
|
}
|
|
224
|
-
},
|
|
224
|
+
}, L = {
|
|
225
225
|
id: "docs.operation.start-add-comment",
|
|
226
|
-
type:
|
|
226
|
+
type: E.OPERATION,
|
|
227
227
|
handler(e) {
|
|
228
|
-
var u,
|
|
229
|
-
const t = e.get(U), n = e.get(
|
|
228
|
+
var u, S, R;
|
|
229
|
+
const t = e.get(U), n = e.get(A).getCurrentUnitForType(_.UNIVER_DOC), o = e.get(B), i = e.get(F), s = e.get(Me), d = e.get(x), l = e.get(M), C = e.get(H), a = o.getActiveTextRange();
|
|
230
230
|
if (!n || !a)
|
|
231
231
|
return !1;
|
|
232
|
-
const h = (u = i.getRenderById(n.getUnitId())) == null ? void 0 : u.with(
|
|
232
|
+
const h = (u = i.getRenderById(n.getUnitId())) == null ? void 0 : u.with(Ee);
|
|
233
233
|
if (h == null || h.setReserveRangesStatus(!0), a.collapsed)
|
|
234
|
-
return t.panelVisible ? (t.setPanelVisible(!1),
|
|
235
|
-
l.executeCommand(
|
|
236
|
-
const
|
|
237
|
-
unitId:
|
|
234
|
+
return t.panelVisible ? (t.setPanelVisible(!1), C.close()) : l.executeCommand(P.id), !0;
|
|
235
|
+
l.executeCommand(P.id);
|
|
236
|
+
const g = n.getUnitId(), f = ((R = (S = n.getBody()) == null ? void 0 : S.dataStream) != null ? R : "").slice(a.startOffset, a.endOffset), c = De.transform.getPlainText(f), m = I, v = "", D = {
|
|
237
|
+
unitId: g,
|
|
238
238
|
subUnitId: m,
|
|
239
|
-
id:
|
|
239
|
+
id: v,
|
|
240
240
|
ref: c,
|
|
241
|
-
dT:
|
|
242
|
-
personId:
|
|
241
|
+
dT: Ne(),
|
|
242
|
+
personId: s.getCurrentUser().userID,
|
|
243
243
|
text: {
|
|
244
244
|
dataStream: `\r
|
|
245
245
|
`
|
|
@@ -247,21 +247,21 @@ const N = {
|
|
|
247
247
|
startOffset: a.startOffset,
|
|
248
248
|
endOffset: a.endOffset,
|
|
249
249
|
collapsed: !0,
|
|
250
|
-
threadId:
|
|
250
|
+
threadId: v
|
|
251
251
|
};
|
|
252
|
-
return h == null || h.blur(),
|
|
253
|
-
unitId:
|
|
252
|
+
return h == null || h.blur(), d.startAdd(D), t.setActiveComment({
|
|
253
|
+
unitId: g,
|
|
254
254
|
subUnitId: m,
|
|
255
|
-
commentId:
|
|
255
|
+
commentId: v
|
|
256
256
|
}), !0;
|
|
257
257
|
}
|
|
258
|
-
},
|
|
259
|
-
var
|
|
260
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
261
|
-
(
|
|
258
|
+
}, dt = "docs-thread-comment-ui.config", ee = {};
|
|
259
|
+
var ct = Object.getOwnPropertyDescriptor, at = (e, t, r, n) => {
|
|
260
|
+
for (var o = n > 1 ? void 0 : n ? ct(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
261
|
+
(s = e[i]) && (o = s(o) || o);
|
|
262
262
|
return o;
|
|
263
|
-
},
|
|
264
|
-
let
|
|
263
|
+
}, b = (e, t) => (r, n) => t(r, n, e);
|
|
264
|
+
let w = class extends j {
|
|
265
265
|
constructor(e, t, r, n, o, i) {
|
|
266
266
|
super(), this._threadCommentPanelService = e, this._univerInstanceService = t, this._commandService = r, this._docThreadCommentService = n, this._renderManagerService = o, this._threadCommentModel = i, this._initSelectionChange(), this._initActiveCommandChange();
|
|
267
267
|
}
|
|
@@ -270,21 +270,21 @@ let V = class extends B {
|
|
|
270
270
|
this.disposeWithMe(
|
|
271
271
|
this._commandService.onCommandExecuted((t) => {
|
|
272
272
|
var r, n, o, i;
|
|
273
|
-
if (t.id ===
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
276
|
-
const
|
|
273
|
+
if (t.id === Fe.id) {
|
|
274
|
+
const s = t.params, { unitId: d, ranges: l } = s;
|
|
275
|
+
if (re(d)) return;
|
|
276
|
+
const C = this._univerInstanceService.getUnit(d, _.UNIVER_DOC), a = l[0];
|
|
277
277
|
if ((e == null ? void 0 : e.startOffset) === (a == null ? void 0 : a.startOffset) && (e == null ? void 0 : e.endOffset) === (a == null ? void 0 : a.endOffset))
|
|
278
278
|
return;
|
|
279
|
-
if (e = a, a &&
|
|
280
|
-
const { startOffset: h, endOffset:
|
|
279
|
+
if (e = a, a && C) {
|
|
280
|
+
const { startOffset: h, endOffset: g, collapsed: f } = a;
|
|
281
281
|
let c;
|
|
282
|
-
if (
|
|
283
|
-
const m = this._threadCommentModel.getComment(
|
|
284
|
-
m && !m.resolved && this._commandService.executeCommand(
|
|
282
|
+
if (f ? c = (n = (r = C.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((m) => m.startIndex <= h && m.endIndex >= g - 1) : c = (i = (o = C.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.find((m) => m.startIndex <= h && m.endIndex >= g - 1), c) {
|
|
283
|
+
const m = this._threadCommentModel.getComment(d, I, c.id);
|
|
284
|
+
m && !m.resolved && this._commandService.executeCommand(P.id, {
|
|
285
285
|
activeComment: {
|
|
286
|
-
unitId:
|
|
287
|
-
subUnitId:
|
|
286
|
+
unitId: d,
|
|
287
|
+
subUnitId: I,
|
|
288
288
|
commentId: c.id
|
|
289
289
|
}
|
|
290
290
|
});
|
|
@@ -293,7 +293,7 @@ let V = class extends B {
|
|
|
293
293
|
}
|
|
294
294
|
if (!this._threadCommentPanelService.activeCommentId)
|
|
295
295
|
return;
|
|
296
|
-
this._commandService.executeCommand(
|
|
296
|
+
this._commandService.executeCommand(ie.id);
|
|
297
297
|
}
|
|
298
298
|
})
|
|
299
299
|
);
|
|
@@ -304,10 +304,10 @@ let V = class extends B {
|
|
|
304
304
|
if (e) {
|
|
305
305
|
const i = this._univerInstanceService.getUnit(e.unitId);
|
|
306
306
|
if (i) {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
startOffset:
|
|
310
|
-
endOffset:
|
|
307
|
+
const s = (t = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : t.with(Ae), d = (n = (r = i.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((l) => l.id === e.commentId);
|
|
308
|
+
d && s && s.scrollToRange({
|
|
309
|
+
startOffset: d.startIndex,
|
|
310
|
+
endOffset: d.endIndex,
|
|
311
311
|
collapsed: !1
|
|
312
312
|
});
|
|
313
313
|
}
|
|
@@ -316,110 +316,160 @@ let V = class extends B {
|
|
|
316
316
|
}));
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
],
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
338
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
339
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
340
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
341
|
-
return r;
|
|
342
|
-
}, ge = ue(function(e, t) {
|
|
343
|
-
var r = e.icon, n = e.id, o = e.className, i = e.extend, d = lt(e, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), l = nt("_".concat(ht()));
|
|
344
|
-
return _e(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, g({ ref: t, className: s }, d), i);
|
|
345
|
-
});
|
|
346
|
-
function _e(e, t, r, n, o) {
|
|
347
|
-
return fe(e.tag, g(g({ key: t }, ut(e, r, o)), n), (ft(e, r).children || []).map(function(i, d) {
|
|
348
|
-
return _e(i, "".concat(t, "-").concat(e.tag, "-").concat(d), r, void 0, o);
|
|
349
|
-
}));
|
|
319
|
+
w = at([
|
|
320
|
+
b(0, p(U)),
|
|
321
|
+
b(1, A),
|
|
322
|
+
b(2, M),
|
|
323
|
+
b(3, p(x)),
|
|
324
|
+
b(4, F),
|
|
325
|
+
b(5, p(oe))
|
|
326
|
+
], w);
|
|
327
|
+
function fe({ ref: e, ...t }) {
|
|
328
|
+
const { icon: r, id: n, className: o, extend: i, ...s } = t, d = `univerjs-icon univerjs-icon-${n} ${o || ""}`.trim(), l = et(`_${ut()}`);
|
|
329
|
+
return ge(r, `${n}`, {
|
|
330
|
+
defIds: r.defIds,
|
|
331
|
+
idSuffix: l.current
|
|
332
|
+
}, {
|
|
333
|
+
ref: e,
|
|
334
|
+
className: d,
|
|
335
|
+
...s
|
|
336
|
+
}, i);
|
|
350
337
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
338
|
+
function ge(e, t, r, n, o) {
|
|
339
|
+
return le(e.tag, {
|
|
340
|
+
key: t,
|
|
341
|
+
...mt(e, r, o),
|
|
342
|
+
...n
|
|
343
|
+
}, (lt(e, r).children || []).map((i, s) => ge(i, `${t}-${e.tag}-${s}`, r, void 0, o)));
|
|
344
|
+
}
|
|
345
|
+
function mt(e, t, r) {
|
|
346
|
+
const n = { ...e.attrs };
|
|
347
|
+
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(([i, s]) => {
|
|
348
|
+
i === "mask" && typeof s == "string" && (n[i] = s.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
356
349
|
});
|
|
357
|
-
|
|
358
|
-
return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(
|
|
359
|
-
|
|
360
|
-
typeof s == "string" && (n[d] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
350
|
+
const { defIds: o } = t;
|
|
351
|
+
return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(([i, s]) => {
|
|
352
|
+
typeof s == "string" && (n[i] = s.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
361
353
|
})), n;
|
|
362
354
|
}
|
|
363
|
-
function
|
|
364
|
-
var
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
355
|
+
function lt(e, t) {
|
|
356
|
+
var n;
|
|
357
|
+
const { defIds: r } = t;
|
|
358
|
+
return !r || r.length === 0 ? e : e.tag === "defs" && ((n = e.children) != null && n.length) ? {
|
|
359
|
+
...e,
|
|
360
|
+
children: e.children.map((o) => typeof o.attrs.id == "string" && r && r.includes(o.attrs.id) ? {
|
|
361
|
+
...o,
|
|
362
|
+
attrs: {
|
|
363
|
+
...o.attrs,
|
|
364
|
+
id: o.attrs.id + t.idSuffix
|
|
365
|
+
}
|
|
366
|
+
} : o)
|
|
367
|
+
} : e;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function ut() {
|
|
370
370
|
return Math.random().toString(36).substring(2, 8);
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
fe.displayName = "UniverIcon";
|
|
373
|
+
const Ct = {
|
|
374
|
+
tag: "svg",
|
|
375
|
+
attrs: {
|
|
376
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
377
|
+
fill: "none",
|
|
378
|
+
viewBox: "0 0 17 17",
|
|
379
|
+
width: "1em",
|
|
380
|
+
height: "1em"
|
|
381
|
+
},
|
|
382
|
+
children: [
|
|
383
|
+
{
|
|
384
|
+
tag: "path",
|
|
385
|
+
attrs: {
|
|
386
|
+
fill: "currentColor",
|
|
387
|
+
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",
|
|
388
|
+
fillRule: "evenodd",
|
|
389
|
+
clipRule: "evenodd"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
tag: "path",
|
|
394
|
+
attrs: {
|
|
395
|
+
fill: "currentColor",
|
|
396
|
+
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.78345Z"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
tag: "path",
|
|
401
|
+
attrs: {
|
|
402
|
+
fill: "currentColor",
|
|
403
|
+
d: "M8.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.78345Z"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
tag: "path",
|
|
408
|
+
attrs: {
|
|
409
|
+
fill: "currentColor",
|
|
410
|
+
d: "M11.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"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
tag: "path",
|
|
415
|
+
attrs: {
|
|
416
|
+
fill: "currentColor",
|
|
417
|
+
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",
|
|
418
|
+
fillRule: "evenodd",
|
|
419
|
+
clipRule: "evenodd"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}, pe = tt(function(t, r) {
|
|
424
|
+
return le(fe, Object.assign({}, t, {
|
|
375
425
|
id: "comment-icon",
|
|
376
|
-
ref:
|
|
426
|
+
ref: r,
|
|
377
427
|
icon: Ct
|
|
378
428
|
}));
|
|
379
429
|
});
|
|
380
430
|
pe.displayName = "CommentIcon";
|
|
381
|
-
const
|
|
382
|
-
[
|
|
431
|
+
const ht = {
|
|
432
|
+
[Ge.MEDIA]: {
|
|
383
433
|
[Q.id]: {
|
|
384
434
|
order: 3,
|
|
385
435
|
menuItemFactory: st
|
|
386
436
|
}
|
|
387
437
|
},
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
[
|
|
438
|
+
[Ze.MAIN_AREA]: {
|
|
439
|
+
[Ke.DATA]: {
|
|
440
|
+
[L.id]: {
|
|
391
441
|
order: 1,
|
|
392
|
-
menuItemFactory:
|
|
442
|
+
menuItemFactory: it
|
|
393
443
|
}
|
|
394
444
|
}
|
|
395
445
|
}
|
|
396
446
|
};
|
|
397
|
-
var
|
|
398
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
399
|
-
(
|
|
447
|
+
var ft = Object.getOwnPropertyDescriptor, gt = (e, t, r, n) => {
|
|
448
|
+
for (var o = n > 1 ? void 0 : n ? ft(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
449
|
+
(s = e[i]) && (o = s(o) || o);
|
|
400
450
|
return o;
|
|
401
451
|
}, J = (e, t) => (r, n) => t(r, n, e);
|
|
402
|
-
let
|
|
452
|
+
let N = class extends j {
|
|
403
453
|
constructor(e, t, r) {
|
|
404
454
|
super(), this._commandService = e, this._menuManagerService = t, this._componentManager = r, this._initCommands(), this._initMenus(), this._initComponents();
|
|
405
455
|
}
|
|
406
456
|
_initCommands() {
|
|
407
457
|
[
|
|
408
|
-
|
|
458
|
+
ue,
|
|
409
459
|
Ce,
|
|
410
|
-
|
|
411
|
-
|
|
460
|
+
P,
|
|
461
|
+
L,
|
|
412
462
|
Q
|
|
413
463
|
].forEach((e) => {
|
|
414
464
|
this.disposeWithMe(this._commandService.registerCommand(e));
|
|
415
465
|
});
|
|
416
466
|
}
|
|
417
467
|
_initMenus() {
|
|
418
|
-
this._menuManagerService.mergeMenu(
|
|
468
|
+
this._menuManagerService.mergeMenu(ht);
|
|
419
469
|
}
|
|
420
470
|
_initComponents() {
|
|
421
471
|
[
|
|
422
|
-
[
|
|
472
|
+
[O.componentKey, O],
|
|
423
473
|
["CommentIcon", pe]
|
|
424
474
|
].forEach(([e, t]) => {
|
|
425
475
|
this.disposeWithMe(
|
|
@@ -428,19 +478,19 @@ let $ = class extends B {
|
|
|
428
478
|
});
|
|
429
479
|
}
|
|
430
480
|
};
|
|
431
|
-
|
|
432
|
-
J(0,
|
|
433
|
-
J(1,
|
|
434
|
-
J(2,
|
|
435
|
-
],
|
|
436
|
-
var pt = Object.getOwnPropertyDescriptor,
|
|
437
|
-
for (var o = n > 1 ? void 0 : n ? pt(t, r) : t, i = e.length - 1,
|
|
438
|
-
(
|
|
481
|
+
N = gt([
|
|
482
|
+
J(0, M),
|
|
483
|
+
J(1, Je),
|
|
484
|
+
J(2, p(qe))
|
|
485
|
+
], N);
|
|
486
|
+
var pt = Object.getOwnPropertyDescriptor, _t = (e, t, r, n) => {
|
|
487
|
+
for (var o = n > 1 ? void 0 : n ? pt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
488
|
+
(s = e[i]) && (o = s(o) || o);
|
|
439
489
|
return o;
|
|
440
|
-
},
|
|
441
|
-
let z = class extends
|
|
442
|
-
constructor(e, t, r, n, o, i,
|
|
443
|
-
super(), this._context = e, this._docInterceptorService = t, this._threadCommentPanelService = r, this._docRenderController = n, this._univerInstanceService = o, this._threadCommentModel = i, this._commandService =
|
|
490
|
+
}, T = (e, t) => (r, n) => t(r, n, e);
|
|
491
|
+
let z = class extends j {
|
|
492
|
+
constructor(e, t, r, n, o, i, s) {
|
|
493
|
+
super(), this._context = e, this._docInterceptorService = t, this._threadCommentPanelService = r, this._docRenderController = n, this._univerInstanceService = o, this._threadCommentModel = i, this._commandService = s, this._interceptorViewModel(), this._initReRender(), this._initSyncComments();
|
|
444
494
|
}
|
|
445
495
|
_initReRender() {
|
|
446
496
|
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe((e) => {
|
|
@@ -449,112 +499,112 @@ let z = class extends B {
|
|
|
449
499
|
this._docRenderController.reRender(e.unitId);
|
|
450
500
|
return;
|
|
451
501
|
}
|
|
452
|
-
const t = (r = this._univerInstanceService.getCurrentUnitForType(
|
|
502
|
+
const t = (r = this._univerInstanceService.getCurrentUnitForType(_.UNIVER_DOC)) == null ? void 0 : r.getUnitId();
|
|
453
503
|
t && this._docRenderController.reRender(t);
|
|
454
504
|
})), this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe((e) => {
|
|
455
505
|
e.type === "resolve" && this._docRenderController.reRender(e.unitId);
|
|
456
506
|
}));
|
|
457
507
|
}
|
|
458
508
|
_interceptorViewModel() {
|
|
459
|
-
this._docInterceptorService.intercept(
|
|
509
|
+
this._docInterceptorService.intercept(Le.CUSTOM_DECORATION, {
|
|
460
510
|
handler: (e, t, r) => {
|
|
461
511
|
if (!e)
|
|
462
512
|
return r(e);
|
|
463
|
-
const { unitId: n, index: o, customDecorations: i } = t,
|
|
513
|
+
const { unitId: n, index: o, customDecorations: i } = t, s = this._threadCommentPanelService.activeCommentId, { commentId: d, unitId: l } = s || {}, C = i.find((f) => f.id === d), a = this._threadCommentModel.getComment(n, I, e.id);
|
|
464
514
|
if (!a)
|
|
465
515
|
return r({
|
|
466
516
|
...e,
|
|
467
517
|
show: !1
|
|
468
518
|
});
|
|
469
|
-
const h =
|
|
519
|
+
const h = C && o >= C.startIndex && o <= C.endIndex, g = l === n && e.id === d;
|
|
470
520
|
return r({
|
|
471
521
|
...e,
|
|
472
|
-
active:
|
|
522
|
+
active: g || h,
|
|
473
523
|
show: !a.resolved
|
|
474
524
|
});
|
|
475
525
|
}
|
|
476
526
|
});
|
|
477
527
|
}
|
|
478
528
|
_initSyncComments() {
|
|
479
|
-
var o, i,
|
|
480
|
-
const e = this._context.unit.getUnitId(), t =
|
|
481
|
-
r.forEach((
|
|
482
|
-
this._threadCommentModel.getComment(e, t,
|
|
483
|
-
}), r.length && this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(),
|
|
529
|
+
var o, i, s;
|
|
530
|
+
const e = this._context.unit.getUnitId(), t = I, r = (s = (i = (o = this._context.unit.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.filter((d) => d.type === Y.COMMENT).map((d) => d.id)) != null ? s : [];
|
|
531
|
+
r.forEach((d) => {
|
|
532
|
+
this._threadCommentModel.getComment(e, t, d) || this._threadCommentModel.addComment(e, t, { id: d, threadId: d, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
|
|
533
|
+
}), r.length && this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(), I, r);
|
|
484
534
|
let n = r.sort();
|
|
485
|
-
this.disposeWithMe(this._commandService.onCommandExecuted((
|
|
486
|
-
var l,
|
|
487
|
-
if (
|
|
488
|
-
if (
|
|
535
|
+
this.disposeWithMe(this._commandService.onCommandExecuted((d) => {
|
|
536
|
+
var l, C, a;
|
|
537
|
+
if (d.id === se.id) {
|
|
538
|
+
if (d.params.unitId !== this._context.unit.getUnitId())
|
|
489
539
|
return;
|
|
490
|
-
const
|
|
491
|
-
if (JSON.stringify(n) !== JSON.stringify(
|
|
492
|
-
const c = new Set(n), m = new Set(
|
|
493
|
-
|
|
494
|
-
c.has(u) ||
|
|
540
|
+
const g = (a = (C = (l = this._context.unit.getBody()) == null ? void 0 : l.customDecorations) == null ? void 0 : C.filter((c) => c.type === Y.COMMENT).map((c) => c.id)) != null ? a : [], f = g.sort();
|
|
541
|
+
if (JSON.stringify(n) !== JSON.stringify(f)) {
|
|
542
|
+
const c = new Set(n), m = new Set(f), v = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Set();
|
|
543
|
+
g.forEach((u) => {
|
|
544
|
+
c.has(u) || v.add(u);
|
|
495
545
|
}), n.forEach((u) => {
|
|
496
546
|
m.has(u) || D.add(u);
|
|
497
|
-
}), n =
|
|
547
|
+
}), n = f, v.forEach((u) => {
|
|
498
548
|
this._threadCommentModel.getComment(e, t, u) || this._threadCommentModel.addComment(e, t, { id: u, threadId: u, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
|
|
499
|
-
}), this._threadCommentModel.syncThreadComments(e, t, [...
|
|
549
|
+
}), this._threadCommentModel.syncThreadComments(e, t, [...v]);
|
|
500
550
|
}
|
|
501
551
|
}
|
|
502
552
|
}));
|
|
503
553
|
}
|
|
504
554
|
};
|
|
505
|
-
z =
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
555
|
+
z = _t([
|
|
556
|
+
T(1, p(He)),
|
|
557
|
+
T(2, p(U)),
|
|
558
|
+
T(3, p($e)),
|
|
559
|
+
T(4, A),
|
|
560
|
+
T(5, p(oe)),
|
|
561
|
+
T(6, M)
|
|
512
562
|
], z);
|
|
513
|
-
var
|
|
514
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
515
|
-
(
|
|
563
|
+
var vt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, St = (e, t, r) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ot = (e, t, r, n) => {
|
|
564
|
+
for (var o = n > 1 ? void 0 : n ? It(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
565
|
+
(s = e[i]) && (o = s(o) || o);
|
|
516
566
|
return o;
|
|
517
|
-
}, q = (e, t) => (r, n) => t(r, n, e),
|
|
518
|
-
let
|
|
519
|
-
constructor(e =
|
|
567
|
+
}, q = (e, t) => (r, n) => t(r, n, e), _e = (e, t, r) => St(e, typeof t != "symbol" ? t + "" : t, r);
|
|
568
|
+
let V = class extends xe {
|
|
569
|
+
constructor(e = ee, t, r, n) {
|
|
520
570
|
super(), this._config = e, this._injector = t, this._renderManagerSrv = r, this._configService = n;
|
|
521
|
-
const { menu: o, ...i } =
|
|
571
|
+
const { menu: o, ...i } = Ue(
|
|
522
572
|
{},
|
|
523
|
-
|
|
573
|
+
ee,
|
|
524
574
|
this._config
|
|
525
575
|
);
|
|
526
|
-
o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(
|
|
576
|
+
o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(dt, i);
|
|
527
577
|
}
|
|
528
578
|
onStarting() {
|
|
529
579
|
[
|
|
530
|
-
[
|
|
531
|
-
[
|
|
532
|
-
[
|
|
580
|
+
[N],
|
|
581
|
+
[w],
|
|
582
|
+
[x]
|
|
533
583
|
].forEach((e) => {
|
|
534
584
|
this._injector.add(e);
|
|
535
585
|
});
|
|
536
586
|
}
|
|
537
587
|
onRendered() {
|
|
538
|
-
this._initRenderModule(), this._injector.get(
|
|
588
|
+
this._initRenderModule(), this._injector.get(w), this._injector.get(N);
|
|
539
589
|
}
|
|
540
590
|
_initRenderModule() {
|
|
541
591
|
[z].forEach((e) => {
|
|
542
|
-
this._renderManagerSrv.registerRenderModule(
|
|
592
|
+
this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, e);
|
|
543
593
|
});
|
|
544
594
|
}
|
|
545
595
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
q(1,
|
|
551
|
-
q(2,
|
|
596
|
+
_e(V, "pluginName", nt);
|
|
597
|
+
_e(V, "type", _.UNIVER_DOC);
|
|
598
|
+
V = Ot([
|
|
599
|
+
be(je),
|
|
600
|
+
q(1, p(ne)),
|
|
601
|
+
q(2, F),
|
|
552
602
|
q(3, Te)
|
|
553
|
-
],
|
|
603
|
+
], V);
|
|
554
604
|
export {
|
|
555
|
-
|
|
605
|
+
ue as AddDocCommentComment,
|
|
556
606
|
Ce as DeleteDocCommentComment,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
607
|
+
P as ShowCommentPanelOperation,
|
|
608
|
+
L as StartAddCommentOperation,
|
|
609
|
+
V as UniverDocsThreadCommentUIPlugin
|
|
560
610
|
};
|