@univerjs/docs-thread-comment-ui 0.10.12 → 0.10.13

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/index.js CHANGED
@@ -1,23 +1,23 @@
1
- var Oe = Object.defineProperty;
2
- var Me = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var K = (e, t, r) => Me(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { CommandType as P, ICommandService as b, CustomDecorationType as Y, sequenceExecute as ne, Inject as _, Disposable as B, UniverInstanceType as p, SHEET_EDITOR_UNITS as be, IUniverInstanceService as w, Injector as re, isInternalEditorID as oe, UserManagerService as De, BuildTextUtils as ye, DependentOn as xe, IConfigService as Te, Plugin as Ue, merge as Re } from "@univerjs/core";
5
- import { addCustomDecorationBySelectionFactory as Ee, deleteCustomDecorationFactory as Pe, DocSelectionRenderService as we, DocBackScrollRenderController as Ae, DocRenderController as Ne } from "@univerjs/docs-ui";
6
- import { IThreadCommentDataSourceService as Ve, AddCommentMutation as $e, getDT as je, ThreadCommentModel as ie } from "@univerjs/thread-comment";
7
- import { SetActiveCommentOperation as de, ThreadCommentPanelService as U, ThreadCommentPanel as Be, UniverThreadCommentUIPlugin as Fe } from "@univerjs/thread-comment-ui";
8
- import { DocSelectionManagerService as F, DocSkeletonManagerService as He, RichTextEditingMutation as se, SetTextSelectionsOperation as Le, DocInterceptorService as We, DOC_INTERCEPTOR_POINT as Ze } from "@univerjs/docs";
9
- import { IRenderManagerService as H, withCurrentTypeOfRenderer as Ke, DocumentEditArea as X } from "@univerjs/engine-render";
10
- import { ISidebarService as L, getMenuHiddenObservable as ce, MenuItemType as ae, useDependency as E, useObservable as G, ContextMenuPosition as Ge, ContextMenuGroup as ke, RibbonInsertGroup as Je, IMenuManagerService as qe, ComponentManager as Ye } from "@univerjs/ui";
11
- import { BehaviorSubject as ze, Observable as me, debounceTime as le, filter as Qe } from "rxjs";
12
- import { jsx as Xe } from "react/jsx-runtime";
13
- import { useMemo as k, useState as et, useEffect as tt, forwardRef as ue, useRef as nt, createElement as fe } from "react";
14
- const rt = "DOC_THREAD_COMMENT_UI_PLUGIN", S = "default_doc", he = {
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: P.COMMAND,
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(Ve).addComment(r), d = e.get(b), s = Ee(
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 (s) {
28
+ if (d) {
29
29
  const l = {
30
- id: $e.id,
30
+ id: we.id,
31
31
  params: {
32
32
  unitId: n,
33
- subUnitId: S,
33
+ subUnitId: I,
34
34
  comment: i
35
35
  }
36
- }, f = {
37
- id: de.id,
36
+ }, C = {
37
+ id: ie.id,
38
38
  params: {
39
39
  unitId: n,
40
- subUnitId: S,
40
+ subUnitId: I,
41
41
  commentId: i.id
42
42
  }
43
43
  };
44
- return (await ne([l, s, f], d)).result;
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: P.COMMAND,
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(b), i = Pe(e, {
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 ne([i], o)).result : !1;
58
+ return i ? (await te([i], o)).result : !1;
59
59
  }
60
60
  };
61
- var ot = Object.getOwnPropertyDescriptor, it = (e, t, r, n) => {
62
- for (var o = n > 1 ? void 0 : n ? ot(t, r) : t, i = e.length - 1, d; i >= 0; i--)
63
- (d = e[i]) && (o = d(o) || o);
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
- }, ee = (e, t) => (r, n) => t(r, n, e);
66
- let T = class extends B {
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
- K(this, "_addingComment$", new ze(void 0));
70
- K(this, "addingComment$", this._addingComment$.asObservable());
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
- T = it([
86
- ee(0, L),
87
- ee(1, _(U))
88
- ], T);
89
- const ve = (e) => {
90
- var d;
91
- const t = e.get(H), r = e.get(F), n = (d = Ke(
92
- p.UNIVER_DOC,
93
- He,
94
- e.get(w),
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 : d.getSkeleton(), o = n == null ? void 0 : n.getViewModel().getEditArea();
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 dt(e) {
102
+ function it(e) {
103
103
  return {
104
- id: W.id,
105
- type: ae.BUTTON,
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$: ce(e, p.UNIVER_DOC, void 0, be),
110
- disabled$: new me(function(t) {
111
- const n = e.get(F).textSelection$.pipe(le(16)).subscribe(() => {
112
- t.next(ve(e));
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: ae.BUTTON,
123
+ type: ce.BUTTON,
124
124
  icon: "CommentIcon",
125
125
  title: "threadCommentUI.panel.addComment",
126
126
  tooltip: "threadCommentUI.panel.addComment",
127
- hidden$: ce(e, p.UNIVER_DOC)
127
+ hidden$: de(e, _.UNIVER_DOC)
128
128
  };
129
129
  }
130
- const M = () => {
131
- const e = E(w), t = E(re), r = k(() => e.getCurrentTypeOfUnit$(p.UNIVER_DOC).pipe(Qe((c) => !!c && !oe(c.getUnitId()))), [e]), n = G(r), o = k(() => new me((c) => c.next(S)), []), i = E(F), d = k(
132
- () => i.textSelection$.pipe(le(16)),
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
- G(d);
136
- const s = E(b), l = E(T), f = G(l.addingComment$), [a, h] = et([]);
137
- if (tt(() => {
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 O = c.has(u);
142
- return c.add(u), !O;
141
+ const S = c.has(u);
142
+ return c.add(u), !S;
143
143
  })) != null ? D : []);
144
- const I = s.onCommandExecuted((u) => {
145
- var O;
144
+ const v = d.onCommandExecuted((u) => {
145
+ var S;
146
146
  if (u.id === se.id) {
147
- const R = /* @__PURE__ */ new Set(), Z = n == null ? void 0 : n.getCustomDecorations();
148
- h((O = Z == null ? void 0 : Z.map((A) => A.id).filter((A) => {
149
- const Se = R.has(A);
150
- return R.add(A), !Se;
151
- })) != null ? O : []);
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
- I.dispose();
155
+ v.dispose();
156
156
  };
157
- }, [s, n]), !n)
157
+ }, [d, n]), !n)
158
158
  return null;
159
- const v = ve(t), C = n.getUnitId();
160
- return /* @__PURE__ */ Xe(
161
- Be,
159
+ const g = he(t), f = n.getUnitId();
160
+ return /* @__PURE__ */ Qe(
161
+ Ve,
162
162
  {
163
- unitId: C,
163
+ unitId: f,
164
164
  subUnitId$: o,
165
- type: p.UNIVER_DOC,
165
+ type: _.UNIVER_DOC,
166
166
  onAdd: () => {
167
- s.executeCommand(W.id);
167
+ d.executeCommand(L.id);
168
168
  },
169
169
  getSubUnitName: () => "",
170
- disableAdd: v,
171
- tempComment: f,
170
+ disableAdd: g,
171
+ tempComment: C,
172
172
  onAddComment: (c) => {
173
173
  if (!c.parentId) {
174
174
  const m = {
175
- unitId: C,
176
- range: f,
175
+ unitId: f,
176
+ range: C,
177
177
  comment: c
178
178
  };
179
- return s.executeCommand(he.id, m), l.endAdd(), !1;
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: C,
186
+ unitId: f,
187
187
  commentId: c.id
188
188
  };
189
- return s.executeCommand(Ce.id, m), !1;
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
- M.componentKey = "univer.doc.thread-comment-panel";
198
- const N = {
197
+ O.componentKey = "univer.doc.thread-comment-panel";
198
+ const P = {
199
199
  id: "docs.operation.show-comment-panel",
200
- type: P.OPERATION,
200
+ type: E.OPERATION,
201
201
  handler(e, t) {
202
202
  var o;
203
- const r = e.get(U), n = e.get(L);
204
- return (!r.panelVisible || ((o = n.options.children) == null ? void 0 : o.label) !== M.componentKey) && (n.open({
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: M.componentKey },
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: P.OPERATION,
213
+ type: E.OPERATION,
214
214
  handler(e) {
215
215
  var n;
216
- const t = e.get(U), r = e.get(L);
217
- return !t.panelVisible || ((n = r.options.children) == null ? void 0 : n.label) !== M.componentKey ? (r.open({
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: M.componentKey },
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
- }, W = {
224
+ }, L = {
225
225
  id: "docs.operation.start-add-comment",
226
- type: P.OPERATION,
226
+ type: E.OPERATION,
227
227
  handler(e) {
228
- var u, O, R;
229
- const t = e.get(U), n = e.get(w).getCurrentUnitForType(p.UNIVER_DOC), o = e.get(F), i = e.get(H), d = e.get(De), s = e.get(T), l = e.get(b), f = e.get(L), a = o.getActiveTextRange();
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(we);
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), f.close()) : l.executeCommand(N.id), !0;
235
- l.executeCommand(N.id);
236
- const v = n.getUnitId(), C = ((R = (O = n.getBody()) == null ? void 0 : O.dataStream) != null ? R : "").slice(a.startOffset, a.endOffset), c = ye.transform.getPlainText(C), m = S, I = "", D = {
237
- unitId: v,
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: I,
239
+ id: v,
240
240
  ref: c,
241
- dT: je(),
242
- personId: d.getCurrentUser().userID,
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: I
250
+ threadId: v
251
251
  };
252
- return h == null || h.blur(), s.startAdd(D), t.setActiveComment({
253
- unitId: v,
252
+ return h == null || h.blur(), d.startAdd(D), t.setActiveComment({
253
+ unitId: g,
254
254
  subUnitId: m,
255
- commentId: I
255
+ commentId: v
256
256
  }), !0;
257
257
  }
258
- }, ct = "docs-thread-comment-ui.config", te = {};
259
- var at = Object.getOwnPropertyDescriptor, mt = (e, t, r, n) => {
260
- for (var o = n > 1 ? void 0 : n ? at(t, r) : t, i = e.length - 1, d; i >= 0; i--)
261
- (d = e[i]) && (o = d(o) || o);
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
- }, y = (e, t) => (r, n) => t(r, n, e);
264
- let V = class extends B {
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 === Le.id) {
274
- const d = t.params, { unitId: s, ranges: l } = d;
275
- if (oe(s)) return;
276
- const f = this._univerInstanceService.getUnit(s, p.UNIVER_DOC), a = l[0];
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 && f) {
280
- const { startOffset: h, endOffset: v, collapsed: C } = a;
279
+ if (e = a, a && C) {
280
+ const { startOffset: h, endOffset: g, collapsed: f } = a;
281
281
  let c;
282
- if (C ? c = (n = (r = f.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((m) => m.startIndex <= h && m.endIndex >= v - 1) : c = (i = (o = f.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.find((m) => m.startIndex <= h && m.endIndex >= v - 1), c) {
283
- const m = this._threadCommentModel.getComment(s, S, c.id);
284
- m && !m.resolved && this._commandService.executeCommand(N.id, {
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: s,
287
- subUnitId: S,
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(de.id);
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 d = (t = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : t.with(Ae), s = (n = (r = i.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((l) => l.id === e.commentId);
308
- s && d && d.scrollToRange({
309
- startOffset: s.startIndex,
310
- endOffset: s.endIndex,
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
- V = mt([
320
- y(0, _(U)),
321
- y(1, w),
322
- y(2, b),
323
- y(3, _(T)),
324
- y(4, H),
325
- y(5, _(ie))
326
- ], V);
327
- var g = function() {
328
- return g = Object.assign || function(e) {
329
- for (var t, r = 1, n = arguments.length; r < n; r++) {
330
- t = arguments[r];
331
- for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
332
- }
333
- return e;
334
- }, g.apply(this, arguments);
335
- }, lt = function(e, t) {
336
- var r = {};
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 ut(e, t, r) {
352
- var n = g({}, e.attrs);
353
- 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(function(i) {
354
- var d = i[0], s = i[1];
355
- d === "mask" && typeof s == "string" && (n[d] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
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
- var o = t.defIds;
358
- return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
359
- var d = i[0], s = i[1];
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 ft(e, t) {
364
- var r, n = t.defIds;
365
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? g(g({}, e), { children: e.children.map(function(o) {
366
- return typeof o.attrs.id == "string" && n && n.includes(o.attrs.id) ? g(g({}, o), { attrs: g(g({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
367
- }) }) : e;
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 ht() {
369
+ function ut() {
370
370
  return Math.random().toString(36).substring(2, 8);
371
371
  }
372
- ge.displayName = "UniverIcon";
373
- var Ct = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345Z" } }, { tag: "path", attrs: { fill: "currentColor", 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" } }, { tag: "path", attrs: { fill: "currentColor", 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" } }, { 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" } }] }, pe = ue(function(e, t) {
374
- return fe(ge, Object.assign({}, e, {
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: t,
426
+ ref: r,
377
427
  icon: Ct
378
428
  }));
379
429
  });
380
430
  pe.displayName = "CommentIcon";
381
- const vt = {
382
- [Je.MEDIA]: {
431
+ const ht = {
432
+ [Ge.MEDIA]: {
383
433
  [Q.id]: {
384
434
  order: 3,
385
435
  menuItemFactory: st
386
436
  }
387
437
  },
388
- [Ge.MAIN_AREA]: {
389
- [ke.DATA]: {
390
- [W.id]: {
438
+ [Ze.MAIN_AREA]: {
439
+ [Ke.DATA]: {
440
+ [L.id]: {
391
441
  order: 1,
392
- menuItemFactory: dt
442
+ menuItemFactory: it
393
443
  }
394
444
  }
395
445
  }
396
446
  };
397
- var gt = Object.getOwnPropertyDescriptor, _t = (e, t, r, n) => {
398
- for (var o = n > 1 ? void 0 : n ? gt(t, r) : t, i = e.length - 1, d; i >= 0; i--)
399
- (d = e[i]) && (o = d(o) || o);
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 $ = class extends B {
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
- he,
458
+ ue,
409
459
  Ce,
410
- N,
411
- W,
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(vt);
468
+ this._menuManagerService.mergeMenu(ht);
419
469
  }
420
470
  _initComponents() {
421
471
  [
422
- [M.componentKey, M],
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
- $ = _t([
432
- J(0, b),
433
- J(1, qe),
434
- J(2, _(Ye))
435
- ], $);
436
- var pt = Object.getOwnPropertyDescriptor, It = (e, t, r, n) => {
437
- for (var o = n > 1 ? void 0 : n ? pt(t, r) : t, i = e.length - 1, d; i >= 0; i--)
438
- (d = e[i]) && (o = d(o) || o);
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
- }, x = (e, t) => (r, n) => t(r, n, e);
441
- let z = class extends B {
442
- constructor(e, t, r, n, o, i, d) {
443
- super(), this._context = e, this._docInterceptorService = t, this._threadCommentPanelService = r, this._docRenderController = n, this._univerInstanceService = o, this._threadCommentModel = i, this._commandService = d, this._interceptorViewModel(), this._initReRender(), this._initSyncComments();
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(p.UNIVER_DOC)) == null ? void 0 : r.getUnitId();
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(Ze.CUSTOM_DECORATION, {
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, d = this._threadCommentPanelService.activeCommentId, { commentId: s, unitId: l } = d || {}, f = i.find((C) => C.id === s), a = this._threadCommentModel.getComment(n, S, e.id);
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 = f && o >= f.startIndex && o <= f.endIndex, v = l === n && e.id === s;
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: v || h,
522
+ active: g || h,
473
523
  show: !a.resolved
474
524
  });
475
525
  }
476
526
  });
477
527
  }
478
528
  _initSyncComments() {
479
- var o, i, d;
480
- const e = this._context.unit.getUnitId(), t = S, r = (d = (i = (o = this._context.unit.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.filter((s) => s.type === Y.COMMENT).map((s) => s.id)) != null ? d : [];
481
- r.forEach((s) => {
482
- this._threadCommentModel.getComment(e, t, s) || this._threadCommentModel.addComment(e, t, { id: s, threadId: s, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
483
- }), r.length && this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(), S, r);
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((s) => {
486
- var l, f, a;
487
- if (s.id === se.id) {
488
- if (s.params.unitId !== this._context.unit.getUnitId())
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 v = (a = (f = (l = this._context.unit.getBody()) == null ? void 0 : l.customDecorations) == null ? void 0 : f.filter((c) => c.type === Y.COMMENT).map((c) => c.id)) != null ? a : [], C = v.sort();
491
- if (JSON.stringify(n) !== JSON.stringify(C)) {
492
- const c = new Set(n), m = new Set(C), I = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Set();
493
- v.forEach((u) => {
494
- c.has(u) || I.add(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 = C, I.forEach((u) => {
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, [...I]);
549
+ }), this._threadCommentModel.syncThreadComments(e, t, [...v]);
500
550
  }
501
551
  }
502
552
  }));
503
553
  }
504
554
  };
505
- z = It([
506
- x(1, _(We)),
507
- x(2, _(U)),
508
- x(3, _(Ne)),
509
- x(4, w),
510
- x(5, _(ie)),
511
- x(6, b)
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 St = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Mt = (e, t, r) => t in e ? St(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bt = (e, t, r, n) => {
514
- for (var o = n > 1 ? void 0 : n ? Ot(t, r) : t, i = e.length - 1, d; i >= 0; i--)
515
- (d = e[i]) && (o = d(o) || o);
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), Ie = (e, t, r) => Mt(e, typeof t != "symbol" ? t + "" : t, r);
518
- let j = class extends Ue {
519
- constructor(e = te, t, r, n) {
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 } = Re(
571
+ const { menu: o, ...i } = Ue(
522
572
  {},
523
- te,
573
+ ee,
524
574
  this._config
525
575
  );
526
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(ct, i);
576
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(dt, i);
527
577
  }
528
578
  onStarting() {
529
579
  [
530
- [$],
531
- [V],
532
- [T]
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(V), 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(p.UNIVER_DOC, e);
592
+ this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, e);
543
593
  });
544
594
  }
545
595
  };
546
- Ie(j, "pluginName", rt);
547
- Ie(j, "type", p.UNIVER_DOC);
548
- j = bt([
549
- xe(Fe),
550
- q(1, _(re)),
551
- q(2, H),
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
- ], j);
603
+ ], V);
554
604
  export {
555
- he as AddDocCommentComment,
605
+ ue as AddDocCommentComment,
556
606
  Ce as DeleteDocCommentComment,
557
- N as ShowCommentPanelOperation,
558
- W as StartAddCommentOperation,
559
- j as UniverDocsThreadCommentUIPlugin
607
+ P as ShowCommentPanelOperation,
608
+ L as StartAddCommentOperation,
609
+ V as UniverDocsThreadCommentUIPlugin
560
610
  };