@univerjs/thread-comment-ui 0.7.0 → 0.8.0-beta.1

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/es/index.js CHANGED
@@ -1,29 +1,29 @@
1
- var Le = Object.defineProperty;
2
- var Pe = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var z = (t, e, n) => Pe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { Inject as Se, IUniverInstanceService as Ve, Disposable as Ae, UniverInstanceType as ce, CommandType as _e, DependentOn as Be, Injector as We, ICommandService as ne, IConfigService as Fe, Plugin as ze, merge as Ge, mergeOverrideWithDependencies as Ke, LocaleService as fe, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ze, BuildTextUtils as ve, Tools as Ye, CustomRangeType as qe, getBodySlice as Je, UserManagerService as he, generateRandomId as Qe } from "@univerjs/core";
5
- import { UniverThreadCommentPlugin as Xe, ThreadCommentModel as Ne, getDT as et, AddCommentCommand as tt, ResolveCommentCommand as nt, DeleteCommentTreeCommand as we, UpdateCommentCommand as rt, DeleteCommentCommand as it } from "@univerjs/thread-comment";
6
- import { ISidebarService as Ue, useDependency as N, KeyCode as ge, useObservable as G, useConfigValue as at, UI_PLUGIN_CONFIG_KEY as ot } from "@univerjs/ui";
7
- import { BehaviorSubject as pe, filter as lt, debounceTime as st } from "rxjs";
8
- import { jsxs as b, jsx as l } from "react/jsx-runtime";
9
- import { Button as se, clsx as Ce, Tooltip as dt, borderClassName as ut, Dropdown as ct, Select as Ie } from "@univerjs/design";
10
- import { forwardRef as B, useRef as te, createElement as Z, useState as A, useEffect as de, useMemo as ee, useImperativeHandle as vt } from "react";
11
- import { IEditorService as mt, BreakLineCommand as ft, RichTextEditor as ht } from "@univerjs/docs-ui";
12
- var gt = Object.getOwnPropertyDescriptor, pt = (t, e, n, r) => {
13
- for (var i = r > 1 ? void 0 : r ? gt(e, n) : e, a = t.length - 1, d; a >= 0; a--)
14
- (d = t[a]) && (i = d(i) || i);
1
+ var He = Object.defineProperty;
2
+ var Pe = (t, e, r) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var F = (t, e, r) => Pe(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { Inject as we, IUniverInstanceService as Ve, Disposable as Ae, UniverInstanceType as ue, CommandType as _e, DependentOn as Be, Injector as We, ICommandService as re, IConfigService as Ze, Plugin as Fe, merge as Ge, mergeOverrideWithDependencies as Ke, LocaleService as he, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ze, BuildTextUtils as ve, Tools as Ye, CustomRangeType as qe, getBodySlice as Je, UserManagerService as pe, generateRandomId as Qe } from "@univerjs/core";
5
+ import { UniverThreadCommentPlugin as Xe, ThreadCommentModel as Se, getDT as et, AddCommentCommand as tt, ResolveCommentCommand as rt, DeleteCommentTreeCommand as Ne, UpdateCommentCommand as nt, DeleteCommentCommand as it } from "@univerjs/thread-comment";
6
+ import { ISidebarService as ke, useDependency as S, KeyCode as ge, useObservable as G, useConfigValue as ot, UI_PLUGIN_CONFIG_KEY as at } from "@univerjs/ui";
7
+ import { BehaviorSubject as Ce, filter as st, debounceTime as lt } from "rxjs";
8
+ import { jsxs as x, jsx as s } from "react/jsx-runtime";
9
+ import { Button as le, clsx as me, Tooltip as dt, scrollbarClassName as ct, borderClassName as ut, Dropdown as vt, Select as Ie } from "@univerjs/design";
10
+ import { forwardRef as B, useRef as te, createElement as z, useState as A, useEffect as de, useMemo as ee, useImperativeHandle as mt } from "react";
11
+ import { IEditorService as ft, BreakLineCommand as ht, RichTextEditor as pt } from "@univerjs/docs-ui";
12
+ var gt = Object.getOwnPropertyDescriptor, Ct = (t, e, r, n) => {
13
+ for (var i = n > 1 ? void 0 : n ? gt(e, r) : e, o = t.length - 1, d; o >= 0; o--)
14
+ (d = t[o]) && (i = d(i) || i);
15
15
  return i;
16
- }, be = (t, e) => (n, r) => e(n, r, t);
16
+ }, xe = (t, e) => (r, n) => e(r, n, t);
17
17
  let q = class extends Ae {
18
- constructor(e, n) {
18
+ constructor(e, r) {
19
19
  super();
20
- z(this, "_panelVisible", !1);
21
- z(this, "_panelVisible$", new pe(!1));
22
- z(this, "_activeCommentId");
23
- z(this, "_activeCommentId$", new pe(void 0));
24
- z(this, "panelVisible$", this._panelVisible$.asObservable());
25
- z(this, "activeCommentId$", this._activeCommentId$.asObservable());
26
- this._sidebarService = e, this._univerInstanceService = n, this._init(), this.disposeWithMe(() => {
20
+ F(this, "_panelVisible", !1);
21
+ F(this, "_panelVisible$", new Ce(!1));
22
+ F(this, "_activeCommentId");
23
+ F(this, "_activeCommentId$", new Ce(void 0));
24
+ F(this, "panelVisible$", this._panelVisible$.asObservable());
25
+ F(this, "activeCommentId$", this._activeCommentId$.asObservable());
26
+ this._sidebarService = e, this._univerInstanceService = r, this._init(), this.disposeWithMe(() => {
27
27
  this._activeCommentId$.complete(), this._panelVisible$.complete();
28
28
  });
29
29
  }
@@ -33,7 +33,7 @@ let q = class extends Ae {
33
33
  e.visible || this.setPanelVisible(!1);
34
34
  })
35
35
  ), this.disposeWithMe(
36
- this._univerInstanceService.getCurrentTypeOfUnit$(ce.UNIVER_SHEET).pipe(lt((e) => !e)).subscribe(() => {
36
+ this._univerInstanceService.getCurrentTypeOfUnit$(ue.UNIVER_SHEET).pipe(st((e) => !e)).subscribe(() => {
37
37
  this._sidebarService.close();
38
38
  })
39
39
  );
@@ -51,20 +51,20 @@ let q = class extends Ae {
51
51
  this._activeCommentId = e, this._activeCommentId$.next(e);
52
52
  }
53
53
  };
54
- q = pt([
55
- be(0, Se(Ue)),
56
- be(1, Ve)
54
+ q = Ct([
55
+ xe(0, we(ke)),
56
+ xe(1, Ve)
57
57
  ], q);
58
- const Ct = "thread-comment-panel", It = "UNIVER_THREAD_COMMENT_UI_PLUGIN", bt = {
58
+ const It = "thread-comment-panel", xt = "UNIVER_THREAD_COMMENT_UI_PLUGIN", bt = {
59
59
  id: "thread-comment-ui.operation.toggle-panel",
60
60
  type: _e.OPERATION,
61
61
  handler(t) {
62
- const e = t.get(Ue), n = t.get(q);
63
- return n.panelVisible ? (e.close(), n.setPanelVisible(!1)) : (e.open({
62
+ const e = t.get(ke), r = t.get(q);
63
+ return r.panelVisible ? (e.close(), r.setPanelVisible(!1)) : (e.open({
64
64
  header: { title: "threadCommentUI.panel.title" },
65
- children: { label: Ct },
65
+ children: { label: It },
66
66
  width: 330
67
- }), n.setPanelVisible(!0)), !0;
67
+ }), r.setPanelVisible(!0)), !0;
68
68
  }
69
69
  }, K = {
70
70
  id: "thread-comment-ui.operation.set-active-comment",
@@ -72,21 +72,21 @@ const Ct = "thread-comment-panel", It = "UNIVER_THREAD_COMMENT_UI_PLUGIN", bt =
72
72
  handler(t, e) {
73
73
  return t.get(q).setActiveComment(e), !0;
74
74
  }
75
- }, xt = "thread-comment-ui.config", xe = {};
76
- var yt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, _t = (t, e, n) => e in t ? yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Nt = (t, e, n, r) => {
77
- for (var i = r > 1 ? void 0 : r ? St(e, n) : e, a = t.length - 1, d; a >= 0; a--)
78
- (d = t[a]) && (i = d(i) || i);
75
+ }, yt = "thread-comment-ui.config", be = {};
76
+ var wt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, St = (t, e, r) => e in t ? wt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Nt = (t, e, r, n) => {
77
+ for (var i = n > 1 ? void 0 : n ? _t(e, r) : e, o = t.length - 1, d; o >= 0; o--)
78
+ (d = t[o]) && (i = d(i) || i);
79
79
  return i;
80
- }, me = (t, e) => (n, r) => e(n, r, t), ke = (t, e, n) => _t(t, typeof e != "symbol" ? e + "" : e, n);
81
- let ue = class extends ze {
82
- constructor(t = xe, e, n, r) {
83
- super(), this._config = t, this._injector = e, this._commandService = n, this._configService = r;
84
- const { menu: i, ...a } = Ge(
80
+ }, fe = (t, e) => (r, n) => e(r, n, t), Ue = (t, e, r) => St(t, typeof e != "symbol" ? e + "" : e, r);
81
+ let ce = class extends Fe {
82
+ constructor(t = be, e, r, n) {
83
+ super(), this._config = t, this._injector = e, this._commandService = r, this._configService = n;
84
+ const { menu: i, ...o } = Ge(
85
85
  {},
86
- xe,
86
+ be,
87
87
  this._config
88
88
  );
89
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(xt, a);
89
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(yt, o);
90
90
  }
91
91
  onStarting() {
92
92
  var t;
@@ -99,108 +99,108 @@ let ue = class extends ze {
99
99
  });
100
100
  }
101
101
  };
102
- ke(ue, "pluginName", It);
103
- ke(ue, "type", ce.UNIVER_UNKNOWN);
104
- ue = Nt([
102
+ Ue(ce, "pluginName", xt);
103
+ Ue(ce, "type", ue.UNIVER_UNKNOWN);
104
+ ce = Nt([
105
105
  Be(Xe),
106
- me(1, Se(We)),
107
- me(2, ne),
108
- me(3, Fe)
109
- ], ue);
106
+ fe(1, we(We)),
107
+ fe(2, re),
108
+ fe(3, Ze)
109
+ ], ce);
110
110
  var M = function() {
111
111
  return M = Object.assign || function(t) {
112
- for (var e, n = 1, r = arguments.length; n < r; n++) {
113
- e = arguments[n];
112
+ for (var e, r = 1, n = arguments.length; r < n; r++) {
113
+ e = arguments[r];
114
114
  for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
115
115
  }
116
116
  return t;
117
117
  }, M.apply(this, arguments);
118
- }, wt = function(t, e) {
119
- var n = {};
120
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
118
+ }, kt = function(t, e) {
119
+ var r = {};
120
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
121
121
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
122
- for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
123
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
124
- return n;
122
+ for (var i = 0, n = Object.getOwnPropertySymbols(t); i < n.length; i++)
123
+ e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[i]) && (r[n[i]] = t[n[i]]);
124
+ return r;
125
125
  }, Y = B(function(t, e) {
126
- var n = t.icon, r = t.id, i = t.className, a = t.extend, d = wt(t, ["icon", "id", "className", "extend"]), f = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), h = te("_".concat(Ot()));
127
- return Oe(n, "".concat(r), { defIds: n.defIds, idSuffix: h.current }, M({ ref: e, className: f }, d), a);
126
+ var r = t.icon, n = t.id, i = t.className, o = t.extend, d = kt(t, ["icon", "id", "className", "extend"]), f = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), h = te("_".concat(Ot()));
127
+ return Te(r, "".concat(n), { defIds: r.defIds, idSuffix: h.current }, M({ ref: e, className: f }, d), o);
128
128
  });
129
- function Oe(t, e, n, r, i) {
130
- return Z(t.tag, M(M({ key: e }, Ut(t, n, i)), r), (kt(t, n).children || []).map(function(a, d) {
131
- return Oe(a, "".concat(e, "-").concat(t.tag, "-").concat(d), n, void 0, i);
129
+ function Te(t, e, r, n, i) {
130
+ return z(t.tag, M(M({ key: e }, Ut(t, r, i)), n), (Tt(t, r).children || []).map(function(o, d) {
131
+ return Te(o, "".concat(e, "-").concat(t.tag, "-").concat(d), r, void 0, i);
132
132
  }));
133
133
  }
134
- function Ut(t, e, n) {
135
- var r = M({}, t.attrs);
136
- n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), t.tag === "mask" && r.id && (r.id = r.id + e.idSuffix), Object.entries(r).forEach(function(a) {
137
- var d = a[0], f = a[1];
138
- d === "mask" && typeof f == "string" && (r[d] = f.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
134
+ function Ut(t, e, r) {
135
+ var n = M({}, t.attrs);
136
+ r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), t.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(o) {
137
+ var d = o[0], f = o[1];
138
+ d === "mask" && typeof f == "string" && (n[d] = f.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
139
139
  });
140
140
  var i = e.defIds;
141
- return !i || i.length === 0 || (t.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(a) {
142
- var d = a[0], f = a[1];
143
- typeof f == "string" && (r[d] = f.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
144
- })), r;
141
+ return !i || i.length === 0 || (t.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(o) {
142
+ var d = o[0], f = o[1];
143
+ typeof f == "string" && (n[d] = f.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
144
+ })), n;
145
145
  }
146
- function kt(t, e) {
147
- var n, r = e.defIds;
148
- return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? M(M({}, t), { children: t.children.map(function(i) {
149
- return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? M(M({}, i), { attrs: M(M({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
146
+ function Tt(t, e) {
147
+ var r, n = e.defIds;
148
+ return !n || n.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? M(M({}, t), { children: t.children.map(function(i) {
149
+ return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? M(M({}, i), { attrs: M(M({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
150
150
  }) }) : t;
151
151
  }
152
152
  function Ot() {
153
153
  return Math.random().toString(36).substring(2, 8);
154
154
  }
155
155
  Y.displayName = "UniverIcon";
156
- var Tt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Te = B(function(t, e) {
157
- return Z(Y, Object.assign({}, t, {
158
- id: "delete-single",
159
- ref: e,
160
- icon: Tt
161
- }));
162
- });
163
- Te.displayName = "DeleteSingle";
164
- var Et = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ee = B(function(t, e) {
165
- return Z(Y, Object.assign({}, t, {
166
- id: "increase-single",
156
+ var Et = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oe = B(function(t, e) {
157
+ return z(Y, Object.assign({}, t, {
158
+ id: "delete-icon",
167
159
  ref: e,
168
160
  icon: Et
169
161
  }));
170
162
  });
171
- Ee.displayName = "IncreaseSingle";
172
- var Dt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3 9C3.55228 9 4 8.55228 4 8 4 7.44772 3.55228 7 3 7 2.44772 7 2 7.44772 2 8 2 8.55228 2.44772 9 3 9zM8 9C8.55228 9 9 8.55228 9 8 9 7.44772 8.55228 7 8 7 7.44772 7 7 7.44772 7 8 7 8.55228 7.44772 9 8 9zM13 9C13.5523 9 14 8.55228 14 8 14 7.44772 13.5523 7 13 7 12.4477 7 12 7.44772 12 8 12 8.55228 12.4477 9 13 9z" } }] }, De = B(function(t, e) {
173
- return Z(Y, Object.assign({}, t, {
174
- id: "more-horizontal-single",
163
+ Oe.displayName = "DeleteIcon";
164
+ var Dt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ee = B(function(t, e) {
165
+ return z(Y, Object.assign({}, t, {
166
+ id: "increase-icon",
175
167
  ref: e,
176
168
  icon: Dt
177
169
  }));
178
170
  });
179
- De.displayName = "MoreHorizontalSingle";
180
- var $t = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { stroke: "currentColor", d: "M7.48389 10.3267V12.1905C7.48389 12.7428 7.9316 13.1905 8.48389 13.1905H11.2216L12.2955 14.2644L13.3695 13.1905H14.1593C14.7116 13.1905 15.1593 12.7428 15.1593 12.1905V8.46289C15.1593 7.91061 14.7116 7.46289 14.1593 7.46289H12.2955", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M0.840332 3.73535C0.840332 2.63078 1.73576 1.73535 2.84033 1.73535H10.2955C11.4001 1.73535 12.2955 2.63078 12.2955 3.73535V8.32676C12.2955 9.43132 11.4001 10.3268 10.2955 10.3268H5.6014L4.1695 11.7587L3.05978 10.3268H2.84033C1.73576 10.3268 0.840332 9.43133 0.840332 8.32676V3.73535Z", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M6.41016 6.1311H6.76813M8.91626 6.1311H9.27424M3.90454 6.1311H4.26252", strokeLinecap: "round", strokeWidth: 1.2 } }] }, $e = B(function(t, e) {
181
- return Z(Y, Object.assign({}, t, {
182
- id: "reply-to-comment-single",
171
+ Ee.displayName = "IncreaseIcon";
172
+ var $t = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3 9C3.55228 9 4 8.55228 4 8C4 7.44772 3.55228 7 3 7C2.44772 7 2 7.44772 2 8C2 8.55228 2.44772 9 3 9Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8 9C8.55228 9 9 8.55228 9 8C9 7.44772 8.55228 7 8 7C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M13 9C13.5523 9 14 8.55228 14 8C14 7.44772 13.5523 7 13 7C12.4477 7 12 7.44772 12 8C12 8.55228 12.4477 9 13 9Z" } }] }, De = B(function(t, e) {
173
+ return z(Y, Object.assign({}, t, {
174
+ id: "more-horizontal-icon",
183
175
  ref: e,
184
176
  icon: $t
185
177
  }));
186
178
  });
187
- $e.displayName = "ReplyToCommentSingle";
188
- var Mt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6106 15.4036C12.4766 15.4036 15.6106 12.2696 15.6106 8.40356C15.6106 4.53757 12.4766 1.40356 8.6106 1.40356C4.7446 1.40356 1.6106 4.53757 1.6106 8.40356C1.6106 12.2696 4.7446 15.4036 8.6106 15.4036ZM12.3351 6.82773C12.5694 6.59342 12.5694 6.21352 12.3351 5.9792C12.1007 5.74489 11.7208 5.74489 11.4865 5.9792L7.91079 9.55494L6.33506 7.9792C6.10074 7.74489 5.72084 7.74489 5.48653 7.9792C5.25221 8.21352 5.25221 8.59342 5.48653 8.82773L7.48653 10.8277C7.72084 11.062 8.10074 11.062 8.33506 10.8277L12.3351 6.82773Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Me = B(function(t, e) {
189
- return Z(Y, Object.assign({}, t, {
190
- id: "resolved-single",
179
+ De.displayName = "MoreHorizontalIcon";
180
+ var Mt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { stroke: "currentColor", d: "M7.48389 10.3267V12.1905C7.48389 12.7428 7.9316 13.1905 8.48389 13.1905H11.2216L12.2955 14.2644L13.3695 13.1905H14.1593C14.7116 13.1905 15.1593 12.7428 15.1593 12.1905V8.46289C15.1593 7.91061 14.7116 7.46289 14.1593 7.46289H12.2955", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M0.840332 3.73535C0.840332 2.63078 1.73576 1.73535 2.84033 1.73535H10.2955C11.4001 1.73535 12.2955 2.63078 12.2955 3.73535V8.32676C12.2955 9.43132 11.4001 10.3268 10.2955 10.3268H5.6014L4.1695 11.7587L3.05978 10.3268H2.84033C1.73576 10.3268 0.840332 9.43133 0.840332 8.32676V3.73535Z", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M6.41016 6.1311H6.76813", strokeLinecap: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M8.91626 6.1311H9.27424", strokeLinecap: "round", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M3.90454 6.1311H4.26252", strokeLinecap: "round", strokeWidth: 1.2 } }] }, $e = B(function(t, e) {
181
+ return z(Y, Object.assign({}, t, {
182
+ id: "reply-to-comment-icon",
191
183
  ref: e,
192
184
  icon: Mt
193
185
  }));
194
186
  });
195
- Me.displayName = "ResolvedSingle";
196
- var Rt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "circle", attrs: { cx: 8.73, cy: 8.4, r: 6.4, stroke: "currentColor", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M6.02637 8.40356L8.02637 10.4036L12.0264 6.40356", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }] }, Re = B(function(t, e) {
197
- return Z(Y, Object.assign({}, t, {
198
- id: "solve-single",
187
+ $e.displayName = "ReplyToCommentIcon";
188
+ var Rt = { 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: "M8.6106 15.4036C12.4766 15.4036 15.6106 12.2696 15.6106 8.40356C15.6106 4.53757 12.4766 1.40356 8.6106 1.40356C4.7446 1.40356 1.6106 4.53757 1.6106 8.40356C1.6106 12.2696 4.7446 15.4036 8.6106 15.4036ZM12.3351 6.82773C12.5694 6.59342 12.5694 6.21352 12.3351 5.9792C12.1007 5.74489 11.7208 5.74489 11.4865 5.9792L7.91079 9.55494L6.33506 7.9792C6.10074 7.74489 5.72084 7.74489 5.48653 7.9792C5.25221 8.21352 5.25221 8.59342 5.48653 8.82773L7.48653 10.8277C7.72084 11.062 8.10074 11.062 8.33506 10.8277L12.3351 6.82773Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Me = B(function(t, e) {
189
+ return z(Y, Object.assign({}, t, {
190
+ id: "resolved-icon",
199
191
  ref: e,
200
192
  icon: Rt
201
193
  }));
202
194
  });
203
- Re.displayName = "SolveSingle";
195
+ Me.displayName = "ResolvedIcon";
196
+ var Lt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "circle", attrs: { cx: 8.73, cy: 8.4, r: 6.4, stroke: "currentColor", strokeWidth: 1.2 } }, { tag: "path", attrs: { stroke: "currentColor", d: "M6.02637 8.40356L8.02637 10.4036L12.0264 6.40356", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.2 } }] }, Re = B(function(t, e) {
197
+ return z(Y, Object.assign({}, t, {
198
+ id: "solve-icon",
199
+ ref: e,
200
+ icon: Lt
201
+ }));
202
+ });
203
+ Re.displayName = "SolveIcon";
204
204
  function ye(t) {
205
205
  return {
206
206
  id: "d",
@@ -208,37 +208,37 @@ function ye(t) {
208
208
  documentStyle: {}
209
209
  };
210
210
  }
211
- const je = B((t, e) => {
211
+ const Le = B((t, e) => {
212
212
  var R;
213
- const { comment: n, onSave: r, id: i, onCancel: a, autoFocus: d, unitId: f, type: h } = t, w = N(ne), k = N(fe), [P, O] = A(!1), x = N(mt), c = te(null), v = h === ce.UNIVER_SHEET ? Ze : f, [T, y] = A(() => {
214
- var u, m, g;
215
- return ve.transform.getPlainText((g = (m = (u = c.current) == null ? void 0 : u.getDocumentData().body) == null ? void 0 : m.dataStream) != null ? g : "");
213
+ const { comment: r, onSave: n, id: i, onCancel: o, autoFocus: d, unitId: f, type: h } = t, N = S(re), U = S(he), [P, T] = A(!1), b = S(ft), u = te(null), v = h === ue.UNIVER_SHEET ? ze : f, [O, y] = A(() => {
214
+ var c, m, p;
215
+ return ve.transform.getPlainText((p = (m = (c = u.current) == null ? void 0 : c.getDocumentData().body) == null ? void 0 : m.dataStream) != null ? p : "");
216
216
  });
217
217
  de(() => {
218
- var m, g, S, p;
219
- y(ve.transform.getPlainText((S = (g = (m = c.current) == null ? void 0 : m.getDocumentData().body) == null ? void 0 : g.dataStream) != null ? S : ""));
220
- const u = (p = c.current) == null ? void 0 : p.selectionChange$.subscribe(() => {
221
- var o, _, W;
222
- y(ve.transform.getPlainText((W = (_ = (o = c.current) == null ? void 0 : o.getDocumentData().body) == null ? void 0 : _.dataStream) != null ? W : ""));
218
+ var m, p, w, g;
219
+ y(ve.transform.getPlainText((w = (p = (m = u.current) == null ? void 0 : m.getDocumentData().body) == null ? void 0 : p.dataStream) != null ? w : ""));
220
+ const c = (g = u.current) == null ? void 0 : g.selectionChange$.subscribe(() => {
221
+ var a, _, W;
222
+ y(ve.transform.getPlainText((W = (_ = (a = u.current) == null ? void 0 : a.getDocumentData().body) == null ? void 0 : _.dataStream) != null ? W : ""));
223
223
  });
224
- return () => u == null ? void 0 : u.unsubscribe();
225
- }, [(R = c.current) == null ? void 0 : R.selectionChange$]);
224
+ return () => c == null ? void 0 : c.unsubscribe();
225
+ }, [(R = u.current) == null ? void 0 : R.selectionChange$]);
226
226
  const V = ee(() => ({
227
227
  keyCodes: [{ keyCode: ge.ENTER }],
228
- handler: (u) => {
229
- u === ge.ENTER && w.executeCommand(
230
- ft.id
228
+ handler: (c) => {
229
+ c === ge.ENTER && N.executeCommand(
230
+ ht.id
231
231
  );
232
232
  }
233
- }), [w]);
234
- vt(e, () => ({
235
- reply(u) {
236
- var g, S;
237
- if (!c.current)
233
+ }), [N]);
234
+ mt(e, () => ({
235
+ reply(c) {
236
+ var p, w;
237
+ if (!u.current)
238
238
  return;
239
- x.focus((g = c.current.getEditorId()) != null ? g : "");
240
- const m = ye(u);
241
- (S = c.current) == null || S.setDocumentData(m, [{
239
+ b.focus((p = u.current.getEditorId()) != null ? p : "");
240
+ const m = ye(c);
241
+ (w = u.current) == null || w.setDocumentData(m, [{
242
242
  startOffset: m.body.dataStream.length - 2,
243
243
  endOffset: m.body.dataStream.length - 2,
244
244
  collapsed: !0
@@ -246,103 +246,102 @@ const je = B((t, e) => {
246
246
  }
247
247
  }));
248
248
  const C = () => {
249
- if (c.current) {
250
- const u = Ye.deepClone(c.current.getDocumentData().body);
251
- O(!1), r == null || r({
252
- ...n,
253
- text: u
254
- }), c.current.replaceText(""), setTimeout(() => {
255
- var m, g;
256
- (m = c.current) == null || m.setSelectionRanges([]), (g = c.current) == null || g.blur();
249
+ if (u.current) {
250
+ const c = Ye.deepClone(u.current.getDocumentData().body);
251
+ T(!1), n == null || n({
252
+ ...r,
253
+ text: c
254
+ }), u.current.replaceText(""), setTimeout(() => {
255
+ var m, p;
256
+ (m = u.current) == null || m.setSelectionRanges([]), (p = u.current) == null || p.blur();
257
257
  }, 10);
258
258
  }
259
259
  };
260
- return /* @__PURE__ */ b("div", { onClick: (u) => u.preventDefault(), children: [
261
- /* @__PURE__ */ l(
262
- ht,
260
+ return /* @__PURE__ */ x("div", { onClick: (c) => c.preventDefault(), children: [
261
+ /* @__PURE__ */ s(
262
+ pt,
263
263
  {
264
264
  className: "univer-w-full",
265
- editorRef: c,
265
+ editorRef: u,
266
266
  autoFocus: d,
267
267
  keyboardEventConfig: V,
268
- placeholder: k.t("threadCommentUI.editor.placeholder"),
269
- initialValue: (n == null ? void 0 : n.text) && ye(n.text),
270
- onFocusChange: (u) => u && O(u),
268
+ placeholder: U.t("threadCommentUI.editor.placeholder"),
269
+ initialValue: (r == null ? void 0 : r.text) && ye(r.text),
270
+ onFocusChange: (c) => c && T(c),
271
271
  isSingle: !1,
272
272
  maxHeight: 64,
273
273
  onClickOutside: () => {
274
274
  setTimeout(() => {
275
- x.focus(v);
275
+ b.focus(v);
276
276
  }, 30);
277
277
  }
278
278
  }
279
279
  ),
280
- P ? /* @__PURE__ */ b("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-end", children: [
281
- /* @__PURE__ */ l(
282
- se,
280
+ P ? /* @__PURE__ */ x("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
281
+ /* @__PURE__ */ s(
282
+ le,
283
283
  {
284
- style: { marginRight: 12 },
285
284
  onClick: () => {
286
- var u;
287
- a == null || a(), O(!1), (u = c.current) == null || u.replaceText("", !0), w.executeCommand(K.id);
285
+ var c;
286
+ o == null || o(), T(!1), (c = u.current) == null || c.replaceText("", !0), N.executeCommand(K.id);
288
287
  },
289
- children: k.t("threadCommentUI.editor.cancel")
288
+ children: U.t("threadCommentUI.editor.cancel")
290
289
  }
291
290
  ),
292
- /* @__PURE__ */ l(
293
- se,
291
+ /* @__PURE__ */ s(
292
+ le,
294
293
  {
295
294
  variant: "primary",
296
- disabled: !T,
295
+ disabled: !O,
297
296
  onClick: C,
298
- children: k.t(i ? "threadCommentUI.editor.save" : "threadCommentUI.editor.reply")
297
+ children: U.t(i ? "threadCommentUI.editor.save" : "threadCommentUI.editor.reply")
299
298
  }
300
299
  )
301
300
  ] }) : null
302
301
  ] });
303
302
  }), jt = (t) => {
304
- const { dataStream: e, customRanges: n } = t, r = e.endsWith(`\r
303
+ const { dataStream: e, customRanges: r } = t, n = e.endsWith(`\r
305
304
  `) ? e.length - 2 : e.length, i = [];
306
- let a = 0;
307
- return n == null || n.forEach((d) => {
308
- a < d.startIndex && i.push({
305
+ let o = 0;
306
+ return r == null || r.forEach((d) => {
307
+ o < d.startIndex && i.push({
309
308
  type: "text",
310
- content: e.slice(a, d.startIndex)
309
+ content: e.slice(o, d.startIndex)
311
310
  }), i.push({
312
311
  type: "mention",
313
312
  content: {
314
313
  label: e.slice(d.startIndex, d.endIndex + 1),
315
314
  id: d.rangeId
316
315
  }
317
- }), a = d.endIndex + 1;
316
+ }), o = d.endIndex + 1;
318
317
  }), i.push({
319
318
  type: "text",
320
- content: e.slice(a, r)
319
+ content: e.slice(o, n)
321
320
  }), i;
322
321
  }, Ht = (t) => {
323
322
  const { paragraphs: e = [] } = t;
324
- let n = 0;
325
- return e.map((r) => {
326
- const i = Je(t, n, r.startIndex);
327
- return n = r.startIndex + 1, jt(i);
323
+ let r = 0;
324
+ return e.map((n) => {
325
+ const i = Je(t, r, n.startIndex);
326
+ return r = n.startIndex + 1, jt(i);
328
327
  });
329
- }, Lt = (t) => {
328
+ }, Pt = (t) => {
330
329
  let e = "";
331
- const n = [];
332
- return t.forEach((r) => {
333
- switch (r.type) {
330
+ const r = [];
331
+ return t.forEach((n) => {
332
+ switch (n.type) {
334
333
  case "text":
335
- e += r.content;
334
+ e += n.content;
336
335
  break;
337
336
  case "mention": {
338
337
  const i = e.length;
339
- e += r.content.label;
340
- const a = e.length - 1;
341
- n.push({
342
- rangeId: r.content.id,
338
+ e += n.content.label;
339
+ const o = e.length - 1;
340
+ r.push({
341
+ rangeId: n.content.id,
343
342
  rangeType: qe.MENTION,
344
343
  startIndex: i,
345
- endIndex: a,
344
+ endIndex: o,
346
345
  properties: {},
347
346
  wholeEntity: !0
348
347
  });
@@ -364,21 +363,21 @@ const je = B((t, e) => {
364
363
  }
365
364
  ],
366
365
  dataStream: e,
367
- customRanges: n
366
+ customRanges: r
368
367
  };
369
- }, He = "__mock__", Pt = (t) => {
370
- const { item: e, unitId: n, subUnitId: r, editing: i, onEditingChange: a, onReply: d, resolved: f, isRoot: h, onClose: w, onDeleteComment: k, type: P } = t, O = N(ne), x = N(fe), c = N(he), v = c.getUser(e.personId), T = G(c.currentUser$), y = (T == null ? void 0 : T.userID) === e.personId, V = e.id === He, [C, R] = A(!1), u = at(ot), m = u == null ? void 0 : u.avatarFallback, g = () => {
371
- (k == null ? void 0 : k(e)) !== !1 && (O.executeCommand(
372
- h ? we.id : it.id,
368
+ }, je = "__mock__", Vt = (t) => {
369
+ const { item: e, unitId: r, subUnitId: n, editing: i, onEditingChange: o, onReply: d, resolved: f, isRoot: h, onClose: N, onDeleteComment: U, type: P } = t, T = S(re), b = S(he), u = S(pe), v = u.getUser(e.personId), O = G(u.currentUser$), y = (O == null ? void 0 : O.userID) === e.personId, V = e.id === je, [C, R] = A(!1), c = ot(at), m = c == null ? void 0 : c.avatarFallback, p = () => {
370
+ (U == null ? void 0 : U(e)) !== !1 && (T.executeCommand(
371
+ h ? Ne.id : it.id,
373
372
  {
374
- unitId: n,
375
- subUnitId: r,
373
+ unitId: r,
374
+ subUnitId: n,
376
375
  commentId: e.id
377
376
  }
378
- ), h && (w == null || w()));
377
+ ), h && (N == null || N()));
379
378
  };
380
- return /* @__PURE__ */ b("div", { className: "univer-relative univer-mb-3 univer-pl-[30px]", onMouseLeave: () => R(!1), onMouseEnter: () => R(!0), children: [
381
- /* @__PURE__ */ l(
379
+ return /* @__PURE__ */ x("div", { className: "univer-relative univer-mb-3 univer-pl-[30px]", onMouseLeave: () => R(!1), onMouseEnter: () => R(!0), children: [
380
+ /* @__PURE__ */ s(
382
381
  "div",
383
382
  {
384
383
  className: "univer-absolute univer-left-0 univer-top-0 univer-h-6 univer-w-6 univer-rounded-full univer-bg-cover univer-bg-center univer-bg-no-repeat",
@@ -387,276 +386,261 @@ const je = B((t, e) => {
387
386
  }
388
387
  }
389
388
  ),
390
- v ? /* @__PURE__ */ b("div", { className: "univer-mb-1 univer-flex univer-h-6 univer-items-center univer-justify-between", children: [
391
- /* @__PURE__ */ l("div", { className: "univer-text-sm univer-font-medium univer-leading-5", children: (v == null ? void 0 : v.name) || " " }),
392
- /* @__PURE__ */ b("div", { children: [
393
- V || f ? null : C && v ? /* @__PURE__ */ l(
389
+ v ? /* @__PURE__ */ x("div", { className: "univer-mb-1 univer-flex univer-h-6 univer-items-center univer-justify-between", children: [
390
+ /* @__PURE__ */ s("div", { className: "univer-text-sm univer-font-medium univer-leading-5", children: (v == null ? void 0 : v.name) || " " }),
391
+ /* @__PURE__ */ x("div", { children: [
392
+ V || f ? null : C && v ? /* @__PURE__ */ s(
394
393
  "div",
395
394
  {
396
395
  className: "univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-text-base hover:univer-bg-gray-50",
397
396
  onClick: () => d(v),
398
- children: /* @__PURE__ */ l($e, {})
397
+ children: /* @__PURE__ */ s($e, {})
399
398
  }
400
399
  ) : null,
401
- y && !V && !f ? /* @__PURE__ */ l(
402
- ct,
400
+ y && !V && !f ? /* @__PURE__ */ s(
401
+ vt,
403
402
  {
404
- overlay: /* @__PURE__ */ l("div", { className: "univer-rounded-lg", children: /* @__PURE__ */ b(
403
+ overlay: /* @__PURE__ */ s("div", { className: "univer-rounded-lg", children: /* @__PURE__ */ x(
405
404
  "ul",
406
405
  {
407
406
  className: "univer-m-0 univer-box-border univer-grid univer-list-none univer-p-1.5 univer-text-sm [&_a]:univer-block [&_a]:univer-cursor-pointer [&_a]:univer-rounded [&_a]:univer-px-2 [&_a]:univer-py-1.5 [&_a]:univer-transition-colors",
408
407
  children: [
409
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
408
+ /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
410
409
  "a",
411
410
  {
412
411
  className: "hover:univer-bg-gray-200",
413
- onClick: () => a == null ? void 0 : a(!0),
414
- children: x.t("threadCommentUI.item.edit")
412
+ onClick: () => o == null ? void 0 : o(!0),
413
+ children: b.t("threadCommentUI.item.edit")
415
414
  }
416
415
  ) }),
417
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
416
+ /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
418
417
  "a",
419
418
  {
420
419
  className: "hover:univer-bg-gray-200",
421
- onClick: g,
422
- children: x.t("threadCommentUI.item.delete")
420
+ onClick: p,
421
+ children: b.t("threadCommentUI.item.delete")
423
422
  }
424
423
  ) })
425
424
  ]
426
425
  }
427
426
  ) }),
428
- children: /* @__PURE__ */ l(
427
+ children: /* @__PURE__ */ s(
429
428
  "div",
430
429
  {
431
430
  className: "univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-text-base hover:univer-bg-gray-50",
432
- children: /* @__PURE__ */ l(De, {})
431
+ children: /* @__PURE__ */ s(De, {})
433
432
  }
434
433
  )
435
434
  }
436
435
  ) : null
437
436
  ] })
438
437
  ] }) : null,
439
- /* @__PURE__ */ l(
438
+ /* @__PURE__ */ s(
440
439
  "time",
441
440
  {
442
- className: "univer-mb-1 univer-text-xs/normal univer-text-gray-600 dark:univer-text-gray-200",
441
+ className: "univer-mb-1 univer-text-xs/normal univer-text-gray-600 dark:!univer-text-gray-200",
443
442
  children: e.dT
444
443
  }
445
444
  ),
446
- i ? /* @__PURE__ */ l(
447
- je,
445
+ i ? /* @__PURE__ */ s(
446
+ Le,
448
447
  {
449
448
  type: P,
450
449
  id: e.id,
451
450
  comment: e,
452
- onCancel: () => a == null ? void 0 : a(!1),
451
+ onCancel: () => o == null ? void 0 : o(!1),
453
452
  autoFocus: !0,
454
- unitId: n,
455
- subUnitId: r,
456
- onSave: ({ text: S, attachments: p }) => {
457
- a == null || a(!1), O.executeCommand(
458
- rt.id,
453
+ unitId: r,
454
+ subUnitId: n,
455
+ onSave: ({ text: w, attachments: g }) => {
456
+ o == null || o(!1), T.executeCommand(
457
+ nt.id,
459
458
  {
460
- unitId: n,
461
- subUnitId: r,
459
+ unitId: r,
460
+ subUnitId: n,
462
461
  payload: {
463
462
  commentId: e.id,
464
- text: S,
465
- attachments: p
463
+ text: w,
464
+ attachments: g
466
465
  }
467
466
  }
468
467
  );
469
468
  }
470
469
  }
471
- ) : /* @__PURE__ */ l(
470
+ ) : /* @__PURE__ */ s(
472
471
  "div",
473
472
  {
474
- className: "univer-text-sm univer-text-gray-900 dark:univer-text-white",
475
- children: Ht(e.text).map((S, p) => /* @__PURE__ */ l("div", { className: "univer-break-words", children: S.map((o, _) => {
476
- switch (o.type) {
473
+ className: "univer-text-sm univer-text-gray-900 dark:!univer-text-white",
474
+ children: Ht(e.text).map((w, g) => /* @__PURE__ */ s("div", { className: "univer-break-words", children: w.map((a, _) => {
475
+ switch (a.type) {
477
476
  case "mention":
478
- return /* @__PURE__ */ b("a", { className: "univer-text-primary-600", children: [
479
- o.content.label,
477
+ return /* @__PURE__ */ x("a", { className: "univer-text-primary-600", children: [
478
+ a.content.label,
480
479
  " "
481
480
  ] }, _);
482
481
  default:
483
- return o.content;
482
+ return a.content;
484
483
  }
485
- }) }, p))
484
+ }) }, g))
486
485
  }
487
486
  )
488
487
  ] });
489
- }, Vt = (t) => {
490
- var le, X, s;
488
+ }, At = (t) => {
489
+ var se, X, l;
491
490
  const {
492
491
  id: e,
493
- unitId: n,
494
- subUnitId: r,
492
+ unitId: r,
493
+ subUnitId: n,
495
494
  refStr: i,
496
- showEdit: a = !0,
495
+ showEdit: o = !0,
497
496
  onClick: d,
498
497
  showHighlight: f,
499
498
  onClose: h,
500
- getSubUnitName: w,
501
- prefix: k,
499
+ getSubUnitName: N,
500
+ prefix: U,
502
501
  autoFocus: P,
503
- onMouseEnter: O,
504
- onMouseLeave: x,
505
- onAddComment: c,
502
+ onMouseEnter: T,
503
+ onMouseLeave: b,
504
+ onAddComment: u,
506
505
  onDeleteComment: v,
507
- onResolve: T,
506
+ onResolve: O,
508
507
  type: y,
509
508
  style: V,
510
509
  full: C
511
- } = t, R = N(Ne), [u, m] = A(!1), [g, S] = A(""), p = ee(() => R.commentUpdate$.pipe(st(16)), [R]);
512
- G(p);
513
- const o = e ? R.getCommentWithChildren(n, r, e) : null, _ = N(ne), W = N(he), E = o == null ? void 0 : o.root.resolved, D = G(W.currentUser$), H = te(null), J = [
514
- ...o ? [o.root] : (
510
+ } = t, R = S(Se), [c, m] = A(!1), [p, w] = A(""), g = ee(() => R.commentUpdate$.pipe(lt(16)), [R]);
511
+ G(g);
512
+ const a = e ? R.getCommentWithChildren(r, n, e) : null, _ = S(re), W = S(pe), E = a == null ? void 0 : a.root.resolved, D = G(W.currentUser$), j = te(null), J = [
513
+ ...a ? [a.root] : (
515
514
  // mock empty comment
516
515
  [{
517
- id: He,
516
+ id: je,
518
517
  text: {
519
518
  dataStream: `
520
519
  \r`
521
520
  },
522
- personId: (le = D == null ? void 0 : D.userID) != null ? le : "",
521
+ personId: (se = D == null ? void 0 : D.userID) != null ? se : "",
523
522
  ref: i != null ? i : "",
524
523
  dT: "",
525
- unitId: n,
526
- subUnitId: r,
524
+ unitId: r,
525
+ subUnitId: n,
527
526
  threadId: ""
528
527
  }]
529
528
  ),
530
- ...(X = o == null ? void 0 : o.children) != null ? X : []
531
- ], j = te(null), re = (I) => {
529
+ ...(X = a == null ? void 0 : a.children) != null ? X : []
530
+ ], L = te(null), ne = (I) => {
532
531
  I.stopPropagation(), E ? _.executeCommand(K.id, {
533
- unitId: n,
534
- subUnitId: r,
532
+ unitId: r,
533
+ subUnitId: n,
535
534
  commentId: e
536
- }) : _.executeCommand(K.id), _.executeCommand(nt.id, {
537
- unitId: n,
538
- subUnitId: r,
535
+ }) : _.executeCommand(K.id), _.executeCommand(rt.id, {
536
+ unitId: r,
537
+ subUnitId: n,
539
538
  commentId: e,
540
539
  resolved: !E
541
- }), T == null || T(!E);
540
+ }), O == null || O(!E);
542
541
  }, Q = (I) => {
543
- I.stopPropagation(), _.executeCommand(K.id), !(o != null && o.root && (v == null ? void 0 : v(o.root)) === !1) && (_.executeCommand(
544
- we.id,
542
+ I.stopPropagation(), _.executeCommand(K.id), !(a != null && a.root && (v == null ? void 0 : v(a.root)) === !1) && (_.executeCommand(
543
+ Ne.id,
545
544
  {
546
- unitId: n,
547
- subUnitId: r,
545
+ unitId: r,
546
+ subUnitId: n,
548
547
  commentId: e
549
548
  }
550
549
  ), h == null || h());
551
550
  };
552
- de(() => x == null ? void 0 : x(), []);
553
- const ie = w((s = o == null ? void 0 : o.root.subUnitId) != null ? s : r), ae = a && !g && !E, oe = `${i || (o == null ? void 0 : o.root.ref) || ""}${ie ? " · " : ""}${ie}`;
554
- return /* @__PURE__ */ b(
551
+ de(() => b == null ? void 0 : b(), []);
552
+ const ie = N((l = a == null ? void 0 : a.root.subUnitId) != null ? l : n), oe = o && !p && !E, ae = `${i || (a == null ? void 0 : a.root.ref) || ""}${ie ? " · " : ""}${ie}`;
553
+ return /* @__PURE__ */ x(
555
554
  "div",
556
555
  {
557
- id: `${k}-${n}-${r}-${e}`,
558
- className: Ce(
559
- `
560
- univer-relative univer-box-border univer-rounded-md univer-bg-white univer-p-4
561
- dark:univer-bg-gray-900 dark:univer-text-white
562
- `,
563
- ut,
564
- {
565
- "univer-w-[278px]": !C,
566
- "univer-w-full": C,
567
- "univer-shadow": !E && (f || u || k === "cell")
568
- }
569
- ),
556
+ id: `${U}-${r}-${n}-${e}`,
557
+ className: me("univer-relative univer-box-border univer-rounded-md univer-bg-white univer-p-4 dark:!univer-bg-gray-900 dark:!univer-text-white", ut, {
558
+ "univer-w-[278px]": !C,
559
+ "univer-w-full": C,
560
+ "univer-shadow": !E && (f || c || U === "cell")
561
+ }),
570
562
  style: V,
571
563
  onClick: d,
572
564
  onMouseEnter: () => {
573
- O == null || O(), m(!0);
565
+ T == null || T(), m(!0);
574
566
  },
575
567
  onMouseLeave: () => {
576
- x == null || x(), m(!1);
568
+ b == null || b(), m(!1);
577
569
  },
578
570
  children: [
579
- !E && f ? /* @__PURE__ */ l(
571
+ !E && f && /* @__PURE__ */ s(
580
572
  "div",
581
573
  {
582
574
  className: "univer-absolute univer-left-0 univer-right-0 univer-top-0 univer-h-1.5 univer-rounded-t-md univer-bg-yellow-400"
583
575
  }
584
- ) : null,
585
- /* @__PURE__ */ b(
576
+ ),
577
+ /* @__PURE__ */ x(
586
578
  "div",
587
579
  {
588
580
  className: "univer-mb-4 univer-flex univer-flex-row univer-items-center univer-justify-between univer-text-sm univer-leading-5",
589
581
  children: [
590
- /* @__PURE__ */ b("div", { className: "univer-flex univer-flex-1 univer-flex-row univer-items-center univer-overflow-hidden", children: [
591
- /* @__PURE__ */ l(
582
+ /* @__PURE__ */ x("div", { className: "univer-flex univer-flex-1 univer-flex-row univer-items-center univer-overflow-hidden", children: [
583
+ /* @__PURE__ */ s(
592
584
  "div",
593
585
  {
594
586
  className: "univer-mr-2 univer-h-3.5 univer-w-[3px] univer-flex-shrink-0 univer-flex-grow-0 univer-rounded-sm univer-bg-yellow-500"
595
587
  }
596
588
  ),
597
- /* @__PURE__ */ l(dt, { showIfEllipsis: !0, title: oe, children: /* @__PURE__ */ l(
589
+ /* @__PURE__ */ s(dt, { showIfEllipsis: !0, title: ae, children: /* @__PURE__ */ s(
598
590
  "div",
599
591
  {
600
592
  className: "univer-flex-1 univer-truncate",
601
- children: oe
593
+ children: ae
602
594
  }
603
595
  ) })
604
596
  ] }),
605
- o ? /* @__PURE__ */ b("div", { className: "univer-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-row", children: [
606
- /* @__PURE__ */ l(
597
+ !!a && /* @__PURE__ */ x("div", { className: "univer-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-row", children: [
598
+ /* @__PURE__ */ s(
607
599
  "div",
608
600
  {
609
- className: Ce(
610
- `
611
- univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer
612
- univer-items-center univer-justify-center univer-rounded-[3px] univer-text-base
613
- dark:hover:univer-bg-gray-800
614
- hover:univer-bg-gray-50
615
- `,
616
- {
617
- "univer-text-green-500": E
618
- }
619
- ),
620
- onClick: re,
621
- children: E ? /* @__PURE__ */ l(Me, {}) : /* @__PURE__ */ l(Re, {})
601
+ className: me("univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-text-base dark:hover:!univer-bg-gray-800 hover:univer-bg-gray-50", {
602
+ "univer-text-green-500": E
603
+ }),
604
+ onClick: ne,
605
+ children: E ? /* @__PURE__ */ s(Me, {}) : /* @__PURE__ */ s(Re, {})
622
606
  }
623
607
  ),
624
- (D == null ? void 0 : D.userID) === o.root.personId ? /* @__PURE__ */ l(
608
+ (D == null ? void 0 : D.userID) === a.root.personId ? /* @__PURE__ */ s(
625
609
  "div",
626
610
  {
627
- className: "univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-text-base dark:hover:univer-bg-gray-800 hover:univer-bg-gray-50",
611
+ className: "univer-ml-1 univer-inline-flex univer-h-6 univer-w-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-text-base dark:hover:!univer-bg-gray-800 hover:univer-bg-gray-50",
628
612
  onClick: Q,
629
- children: /* @__PURE__ */ l(Te, {})
613
+ children: /* @__PURE__ */ s(Oe, {})
630
614
  }
631
615
  ) : null
632
- ] }) : null
616
+ ] })
633
617
  ]
634
618
  }
635
619
  ),
636
- /* @__PURE__ */ l(
620
+ /* @__PURE__ */ s(
637
621
  "div",
638
622
  {
639
- ref: j,
640
- className: "univer-max-h-80 univer-overflow-y-auto univer-overflow-x-hidden",
623
+ ref: L,
624
+ className: me("univer-max-h-80 univer-overflow-y-auto univer-overflow-x-hidden", ct),
641
625
  children: J.map(
642
- (I) => /* @__PURE__ */ l(
643
- Pt,
626
+ (I) => /* @__PURE__ */ s(
627
+ Vt,
644
628
  {
645
- onClose: h,
646
- unitId: n,
647
- subUnitId: r,
629
+ unitId: r,
630
+ subUnitId: n,
648
631
  item: I,
649
- isRoot: I.id === (o == null ? void 0 : o.root.id),
650
- editing: g === I.id,
651
- resolved: o == null ? void 0 : o.root.resolved,
632
+ isRoot: I.id === (a == null ? void 0 : a.root.id),
633
+ editing: p === I.id,
634
+ resolved: a == null ? void 0 : a.root.resolved,
652
635
  type: y,
636
+ onClose: h,
653
637
  onEditingChange: ($) => {
654
- S($ ? I.id : "");
638
+ w($ ? I.id : "");
655
639
  },
656
640
  onReply: ($) => {
657
641
  $ && requestAnimationFrame(() => {
658
- var L;
659
- (L = H.current) == null || L.reply(Lt([
642
+ var H;
643
+ (H = j.current) == null || H.reply(Pt([
660
644
  {
661
645
  type: "mention",
662
646
  content: {
@@ -671,7 +655,7 @@ const je = B((t, e) => {
671
655
  ]));
672
656
  });
673
657
  },
674
- onAddComment: c,
658
+ onAddComment: u,
675
659
  onDeleteComment: v
676
660
  },
677
661
  I.id
@@ -679,130 +663,130 @@ const je = B((t, e) => {
679
663
  )
680
664
  }
681
665
  ),
682
- ae ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
683
- je,
666
+ oe && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
667
+ Le,
684
668
  {
685
- ref: H,
669
+ ref: j,
686
670
  type: y,
687
- unitId: n,
688
- subUnitId: r,
671
+ unitId: r,
672
+ subUnitId: n,
689
673
  onSave: async ({ text: I, attachments: $ }) => {
690
- const L = {
674
+ const H = {
691
675
  text: I,
692
676
  attachments: $,
693
677
  dT: et(),
694
678
  id: Qe(),
695
679
  ref: i,
696
680
  personId: D == null ? void 0 : D.userID,
697
- parentId: o == null ? void 0 : o.root.id,
698
- unitId: n,
699
- subUnitId: r,
700
- threadId: o == null ? void 0 : o.root.threadId
681
+ parentId: a == null ? void 0 : a.root.id,
682
+ unitId: r,
683
+ subUnitId: n,
684
+ threadId: a == null ? void 0 : a.root.threadId
701
685
  };
702
- (c == null ? void 0 : c(L)) !== !1 && (await _.executeCommand(
686
+ (u == null ? void 0 : u(H)) !== !1 && (await _.executeCommand(
703
687
  tt.id,
704
688
  {
705
- unitId: n,
706
- subUnitId: r,
707
- comment: L
689
+ unitId: r,
690
+ subUnitId: n,
691
+ comment: H
708
692
  }
709
- ), j.current && (j.current.scrollTop = j.current.scrollHeight));
693
+ ), L.current && (L.current.scrollTop = L.current.scrollHeight));
710
694
  },
711
- autoFocus: P || !o,
695
+ autoFocus: P || !a,
712
696
  onCancel: () => {
713
- o || h == null || h();
697
+ a || h == null || h();
714
698
  }
715
699
  },
716
700
  `${P}`
717
- ) }) : null
701
+ ) })
718
702
  ]
719
703
  }
720
704
  );
721
- }, qt = (t) => {
705
+ }, Jt = (t) => {
722
706
  const {
723
707
  unitId: e,
724
- subUnitId$: n,
725
- type: r,
708
+ subUnitId$: r,
709
+ type: n,
726
710
  onAdd: i,
727
- getSubUnitName: a,
711
+ getSubUnitName: o,
728
712
  onResolve: d,
729
713
  sortComments: f,
730
714
  onItemLeave: h,
731
- onItemEnter: w,
732
- disableAdd: k,
715
+ onItemEnter: N,
716
+ disableAdd: U,
733
717
  tempComment: P,
734
- onAddComment: O,
735
- onDeleteComment: x,
736
- showComments: c
737
- } = t, [v, T] = A("all"), [y, V] = A("all"), C = N(fe), R = N(he), u = N(Ne), [m, g] = A(() => u.getUnit(e)), S = N(q), p = G(S.activeCommentId$), o = G(u.commentUpdate$), _ = N(ne), W = G(n), E = te(!0), D = "panel", H = G(R.currentUser$), J = ee(() => {
738
- var L;
739
- const s = v === "all" ? m : (L = m.filter((U) => U.subUnitId === W)) != null ? L : [], I = f != null ? f : (U) => U, $ = s.map((U) => {
740
- var F;
741
- return { ...U.root, children: (F = U.children) != null ? F : [], users: U.relativeUsers };
718
+ onAddComment: T,
719
+ onDeleteComment: b,
720
+ showComments: u
721
+ } = t, [v, O] = A("all"), [y, V] = A("all"), C = S(he), R = S(pe), c = S(Se), [m, p] = A(() => c.getUnit(e)), w = S(q), g = G(w.activeCommentId$), a = G(c.commentUpdate$), _ = S(re), W = G(r), E = te(!0), D = "panel", j = G(R.currentUser$), J = ee(() => {
722
+ var H;
723
+ const l = v === "all" ? m : (H = m.filter((k) => k.subUnitId === W)) != null ? H : [], I = f != null ? f : (k) => k, $ = l.map((k) => {
724
+ var Z;
725
+ return { ...k.root, children: (Z = k.children) != null ? Z : [], users: k.relativeUsers };
742
726
  });
743
- if (c) {
744
- const U = /* @__PURE__ */ new Map();
745
- return $.forEach((F) => {
746
- U.set(F.id, F);
747
- }), [...c, ""].map((F) => U.get(F)).filter(Boolean);
727
+ if (u) {
728
+ const k = /* @__PURE__ */ new Map();
729
+ return $.forEach((Z) => {
730
+ k.set(Z.id, Z);
731
+ }), [...u, ""].map((Z) => k.get(Z)).filter(Boolean);
748
732
  } else
749
733
  return I($);
750
- }, [c, v, m, f, W]), j = ee(() => [
751
- ...J.filter((s) => !s.resolved),
752
- ...J.filter((s) => s.resolved)
753
- ], [J]), re = ee(() => y === "resolved" ? j.filter((s) => s.resolved) : y === "unsolved" ? j.filter((s) => !s.resolved) : y === "concern_me" && H != null && H.userID ? j.filter((s) => s == null ? void 0 : s.users.has(H.userID)) : j, [j, H == null ? void 0 : H.userID, y]), Q = P ? [P, ...re] : re, ie = Q.filter((s) => !s.resolved), ae = Q.filter((s) => s.resolved), oe = y !== "all" || v !== "all", le = () => {
754
- V("all"), T("all");
734
+ }, [u, v, m, f, W]), L = ee(() => [
735
+ ...J.filter((l) => !l.resolved),
736
+ ...J.filter((l) => l.resolved)
737
+ ], [J]), ne = ee(() => y === "resolved" ? L.filter((l) => l.resolved) : y === "unsolved" ? L.filter((l) => !l.resolved) : y === "concern_me" && j != null && j.userID ? L.filter((l) => l == null ? void 0 : l.users.has(j.userID)) : L, [L, j == null ? void 0 : j.userID, y]), Q = P ? [P, ...ne] : ne, ie = Q.filter((l) => !l.resolved), oe = Q.filter((l) => l.resolved), ae = y !== "all" || v !== "all", se = () => {
738
+ V("all"), O("all");
755
739
  };
756
740
  de(() => {
757
- e && g(
758
- u.getUnit(e)
741
+ e && p(
742
+ c.getUnit(e)
759
743
  );
760
- }, [e, u, o]), de(() => {
761
- var U;
762
- if (!p)
744
+ }, [e, c, a]), de(() => {
745
+ var k;
746
+ if (!g)
763
747
  return;
764
748
  if (!E.current) {
765
749
  E.current = !0;
766
750
  return;
767
751
  }
768
- const { unitId: s, subUnitId: I, commentId: $ } = p, L = `${D}-${s}-${I}-${$}`;
769
- (U = document.getElementById(L)) == null || U.scrollIntoView({ block: "center" });
770
- }, [p]);
771
- const X = (s) => /* @__PURE__ */ l(
772
- Vt,
752
+ const { unitId: l, subUnitId: I, commentId: $ } = g, H = `${D}-${l}-${I}-${$}`;
753
+ (k = document.getElementById(H)) == null || k.scrollIntoView({ block: "center" });
754
+ }, [g]);
755
+ const X = (l) => /* @__PURE__ */ s(
756
+ At,
773
757
  {
774
758
  full: !0,
775
759
  prefix: D,
776
- getSubUnitName: a,
777
- id: s.id,
778
- unitId: s.unitId,
779
- subUnitId: s.subUnitId,
780
- refStr: s.ref,
781
- type: r,
782
- showEdit: (p == null ? void 0 : p.commentId) === s.id,
783
- showHighlight: (p == null ? void 0 : p.commentId) === s.id,
760
+ getSubUnitName: o,
761
+ id: l.id,
762
+ unitId: l.unitId,
763
+ subUnitId: l.subUnitId,
764
+ refStr: l.ref,
765
+ type: n,
766
+ showEdit: (g == null ? void 0 : g.commentId) === l.id,
767
+ showHighlight: (g == null ? void 0 : g.commentId) === l.id,
784
768
  onClick: () => {
785
- E.current = !1, s.resolved ? _.executeCommand(K.id) : _.executeCommand(
769
+ E.current = !1, l.resolved ? _.executeCommand(K.id) : _.executeCommand(
786
770
  K.id,
787
771
  {
788
- unitId: s.unitId,
789
- subUnitId: s.subUnitId,
790
- commentId: s.id,
772
+ unitId: l.unitId,
773
+ subUnitId: l.subUnitId,
774
+ commentId: l.id,
791
775
  temp: !1
792
776
  }
793
777
  );
794
778
  },
795
- onMouseEnter: () => w == null ? void 0 : w(s),
796
- onMouseLeave: () => h == null ? void 0 : h(s),
797
- onAddComment: O,
798
- onDeleteComment: x,
799
- onResolve: (I) => d == null ? void 0 : d(s.id, I)
779
+ onMouseEnter: () => N == null ? void 0 : N(l),
780
+ onMouseLeave: () => h == null ? void 0 : h(l),
781
+ onAddComment: T,
782
+ onDeleteComment: b,
783
+ onResolve: (I) => d == null ? void 0 : d(l.id, I)
800
784
  },
801
- s.id
785
+ l.id
802
786
  );
803
- return /* @__PURE__ */ b("div", { className: "univer-flex univer-min-h-full univer-flex-col univer-pb-3", children: [
804
- /* @__PURE__ */ b("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-between", children: [
805
- r === ce.UNIVER_SHEET ? /* @__PURE__ */ l(
787
+ return /* @__PURE__ */ x("div", { className: "univer-flex univer-min-h-full univer-flex-col univer-pb-3", children: [
788
+ /* @__PURE__ */ x("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-between", children: [
789
+ n === ue.UNIVER_SHEET ? /* @__PURE__ */ s(
806
790
  Ie,
807
791
  {
808
792
  borderless: !0,
@@ -817,10 +801,10 @@ const je = B((t, e) => {
817
801
  label: C.t("threadCommentUI.filter.sheet.all")
818
802
  }
819
803
  ],
820
- onChange: T
804
+ onChange: O
821
805
  }
822
806
  ) : null,
823
- /* @__PURE__ */ l(
807
+ /* @__PURE__ */ s(
824
808
  Ie,
825
809
  {
826
810
  borderless: !0,
@@ -847,31 +831,31 @@ const je = B((t, e) => {
847
831
  }
848
832
  )
849
833
  ] }),
850
- Q.length === 0 ? /* @__PURE__ */ b(
834
+ Q.length === 0 ? /* @__PURE__ */ x(
851
835
  "div",
852
836
  {
853
- className: "univer-flex univer-flex-1 univer-flex-col univer-items-center univer-justify-center univer-text-sm univer-text-gray-600 dark:univer-text-gray-200",
837
+ className: "univer-flex univer-flex-1 univer-flex-col univer-items-center univer-justify-center univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
854
838
  children: [
855
839
  C.t("threadCommentUI.panel.empty"),
856
- oe ? /* @__PURE__ */ l("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ l(se, { onClick: le, children: C.t("threadCommentUI.panel.reset") }) }) : k ? null : /* @__PURE__ */ l("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ b(se, { onClick: i, children: [
857
- /* @__PURE__ */ l(Ee, { className: "univer-mr-1.5" }),
840
+ ae ? /* @__PURE__ */ s("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ s(le, { onClick: se, children: C.t("threadCommentUI.panel.reset") }) }) : U ? null : /* @__PURE__ */ s("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ x(le, { onClick: i, children: [
841
+ /* @__PURE__ */ s(Ee, { className: "univer-mr-1.5" }),
858
842
  C.t("threadCommentUI.panel.add")
859
843
  ] }) })
860
844
  ]
861
845
  }
862
- ) : /* @__PURE__ */ b("div", { className: "univer-mt-3 univer-flex univer-flex-col univer-gap-3", children: [
846
+ ) : /* @__PURE__ */ x("div", { className: "univer-mt-3 univer-flex univer-flex-col univer-gap-3", children: [
863
847
  ie.map(X),
864
- ae.length > 0 && /* @__PURE__ */ l("div", { className: "univer-text-xs", children: C.t("threadCommentUI.panel.solved") }),
865
- ae.map(X)
848
+ oe.length > 0 && /* @__PURE__ */ s("div", { className: "univer-text-xs", children: C.t("threadCommentUI.panel.solved") }),
849
+ oe.map(X)
866
850
  ] })
867
851
  ] });
868
852
  };
869
853
  export {
870
854
  K as SetActiveCommentOperation,
871
- Ct as THREAD_COMMENT_PANEL,
872
- qt as ThreadCommentPanel,
855
+ It as THREAD_COMMENT_PANEL,
856
+ Jt as ThreadCommentPanel,
873
857
  q as ThreadCommentPanelService,
874
- Vt as ThreadCommentTree,
858
+ At as ThreadCommentTree,
875
859
  bt as ToggleSheetCommentPanelOperation,
876
- ue as UniverThreadCommentUIPlugin
860
+ ce as UniverThreadCommentUIPlugin
877
861
  };