@univerjs/thread-comment-ui 0.10.12 → 0.10.13-nightly.202510290902
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +4 -4
- package/lib/es/index.js +603 -410
- package/lib/index.js +603 -410
- package/lib/umd/index.js +4 -4
- package/package.json +10 -10
- package/LICENSE +0 -176
package/lib/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
var He = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { ISidebarService as
|
|
6
|
-
import { BehaviorSubject as Ce, filter as
|
|
7
|
-
import { UniverThreadCommentPlugin as nt, ThreadCommentModel as
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import { Button as le, clsx as
|
|
10
|
-
import {
|
|
11
|
-
import { IEditorService as
|
|
12
|
-
var
|
|
13
|
-
for (var i =
|
|
14
|
-
(
|
|
2
|
+
var Ve = (n, e, t) => e in n ? He(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var W = (n, e, t) => Ve(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as ye, IUniverInstanceService as je, Disposable as Pe, UniverInstanceType as de, CommandType as we, DependentOn as Ae, Injector as Be, ICommandService as te, IConfigService as We, Plugin as Ze, merge as Fe, mergeOverrideWithDependencies as Ge, LocaleService as he, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ke, BuildTextUtils as ue, Tools as ze, CustomRangeType as Ye, getBodySlice as qe, UserManagerService as fe, generateRandomId as Je } from "@univerjs/core";
|
|
5
|
+
import { ISidebarService as _e, useDependency as S, KeyCode as pe, useObservable as Z, useConfigValue as Qe, UI_PLUGIN_CONFIG_KEY as Xe } from "@univerjs/ui";
|
|
6
|
+
import { BehaviorSubject as Ce, filter as et, debounceTime as tt } from "rxjs";
|
|
7
|
+
import { UniverThreadCommentPlugin as nt, ThreadCommentModel as Se, getDT as rt, AddCommentCommand as it, ResolveCommentCommand as ot, DeleteCommentTreeCommand as Ne, UpdateCommentCommand as st, DeleteCommentCommand as lt } from "@univerjs/thread-comment";
|
|
8
|
+
import { jsxs as I, jsx as l } from "react/jsx-runtime";
|
|
9
|
+
import { Button as le, clsx as ve, Tooltip as at, scrollbarClassName as ct, borderClassName as dt, Dropdown as ut, Select as ge } from "@univerjs/design";
|
|
10
|
+
import { useRef as ee, createElement as G, forwardRef as K, useState as P, useEffect as ae, useMemo as X, useImperativeHandle as vt } from "react";
|
|
11
|
+
import { IEditorService as mt, BreakLineCommand as ht, RichTextEditor as ft } from "@univerjs/docs-ui";
|
|
12
|
+
var pt = Object.getOwnPropertyDescriptor, Ct = (n, e, t, r) => {
|
|
13
|
+
for (var i = r > 1 ? void 0 : r ? pt(e, t) : e, o = n.length - 1, c; o >= 0; o--)
|
|
14
|
+
(c = n[o]) && (i = c(i) || i);
|
|
15
15
|
return i;
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
constructor(e,
|
|
16
|
+
}, Ie = (n, e) => (t, r) => e(t, r, n);
|
|
17
|
+
let Y = class extends Pe {
|
|
18
|
+
constructor(e, t) {
|
|
19
19
|
super();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this._sidebarService = e, this._univerInstanceService =
|
|
20
|
+
W(this, "_panelVisible", !1);
|
|
21
|
+
W(this, "_panelVisible$", new Ce(!1));
|
|
22
|
+
W(this, "_activeCommentId");
|
|
23
|
+
W(this, "_activeCommentId$", new Ce(void 0));
|
|
24
|
+
W(this, "panelVisible$", this._panelVisible$.asObservable());
|
|
25
|
+
W(this, "activeCommentId$", this._activeCommentId$.asObservable());
|
|
26
|
+
this._sidebarService = e, this._univerInstanceService = t, 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$(
|
|
36
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(de.UNIVER_SHEET).pipe(et((e) => !e)).subscribe(() => {
|
|
37
37
|
this._sidebarService.close();
|
|
38
38
|
})
|
|
39
39
|
);
|
|
@@ -51,193 +51,386 @@ let q = class extends Ae {
|
|
|
51
51
|
this._activeCommentId = e, this._activeCommentId$.next(e);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
],
|
|
58
|
-
const
|
|
54
|
+
Y = Ct([
|
|
55
|
+
Ie(0, ye(_e)),
|
|
56
|
+
Ie(1, je)
|
|
57
|
+
], Y);
|
|
58
|
+
const gt = "thread-comment-panel", It = "UNIVER_THREAD_COMMENT_UI_PLUGIN", xt = {
|
|
59
59
|
id: "thread-comment-ui.operation.toggle-panel",
|
|
60
|
-
type:
|
|
61
|
-
handler(
|
|
62
|
-
const e =
|
|
63
|
-
return
|
|
60
|
+
type: we.OPERATION,
|
|
61
|
+
handler(n) {
|
|
62
|
+
const e = n.get(_e), t = n.get(Y);
|
|
63
|
+
return t.panelVisible ? (e.close(), t.setPanelVisible(!1)) : (e.open({
|
|
64
64
|
header: { title: "threadCommentUI.panel.title" },
|
|
65
|
-
children: { label:
|
|
65
|
+
children: { label: gt },
|
|
66
66
|
width: 330
|
|
67
|
-
}),
|
|
67
|
+
}), t.setPanelVisible(!0)), !0;
|
|
68
68
|
}
|
|
69
|
-
},
|
|
69
|
+
}, F = {
|
|
70
70
|
id: "thread-comment-ui.operation.set-active-comment",
|
|
71
|
-
type:
|
|
72
|
-
handler(
|
|
73
|
-
return
|
|
71
|
+
type: we.OPERATION,
|
|
72
|
+
handler(n, e) {
|
|
73
|
+
return n.get(Y).setActiveComment(e), !0;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
76
|
-
var
|
|
77
|
-
for (var i =
|
|
78
|
-
(
|
|
75
|
+
}, bt = "thread-comment-ui.config", xe = {};
|
|
76
|
+
var yt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, _t = (n, e, t) => e in n ? yt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, St = (n, e, t, r) => {
|
|
77
|
+
for (var i = r > 1 ? void 0 : r ? wt(e, t) : e, o = n.length - 1, c; o >= 0; o--)
|
|
78
|
+
(c = n[o]) && (i = c(i) || i);
|
|
79
79
|
return i;
|
|
80
|
-
},
|
|
81
|
-
let ce = class extends
|
|
82
|
-
constructor(
|
|
83
|
-
super(), this._config =
|
|
84
|
-
const { menu: i, ...o } =
|
|
80
|
+
}, me = (n, e) => (t, r) => e(t, r, n), $e = (n, e, t) => _t(n, typeof e != "symbol" ? e + "" : e, t);
|
|
81
|
+
let ce = class extends Ze {
|
|
82
|
+
constructor(n = xe, e, t, r) {
|
|
83
|
+
super(), this._config = n, this._injector = e, this._commandService = t, this._configService = r;
|
|
84
|
+
const { menu: i, ...o } = Fe(
|
|
85
85
|
{},
|
|
86
|
-
|
|
86
|
+
xe,
|
|
87
87
|
this._config
|
|
88
88
|
);
|
|
89
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
89
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(bt, o);
|
|
90
90
|
}
|
|
91
91
|
onStarting() {
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
[
|
|
95
|
-
], (
|
|
92
|
+
var n;
|
|
93
|
+
Ge([
|
|
94
|
+
[Y]
|
|
95
|
+
], (n = this._config) == null ? void 0 : n.overrides).forEach((e) => {
|
|
96
96
|
this._injector.add(e);
|
|
97
|
-
}), [
|
|
97
|
+
}), [xt, F].forEach((e) => {
|
|
98
98
|
this._commandService.registerCommand(e);
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
ce =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
$e(ce, "pluginName", It);
|
|
103
|
+
$e(ce, "type", de.UNIVER_UNKNOWN);
|
|
104
|
+
ce = St([
|
|
105
|
+
Ae(nt),
|
|
106
|
+
me(1, ye(Be)),
|
|
107
|
+
me(2, te),
|
|
108
|
+
me(3, We)
|
|
109
109
|
], ce);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return Te(r, "".concat(n), { defIds: r.defIds, idSuffix: h.current }, M({ ref: e, className: f }, d), o);
|
|
128
|
-
});
|
|
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
|
-
}));
|
|
110
|
+
function z({ ref: n, ...e }) {
|
|
111
|
+
const { icon: t, id: r, className: i, extend: o, ...c } = e, x = `univerjs-icon univerjs-icon-${r} ${i || ""}`.trim(), h = ee(`_${kt()}`);
|
|
112
|
+
return ke(t, `${r}`, {
|
|
113
|
+
defIds: t.defIds,
|
|
114
|
+
idSuffix: h.current
|
|
115
|
+
}, {
|
|
116
|
+
ref: n,
|
|
117
|
+
className: x,
|
|
118
|
+
...c
|
|
119
|
+
}, o);
|
|
120
|
+
}
|
|
121
|
+
function ke(n, e, t, r, i) {
|
|
122
|
+
return G(n.tag, {
|
|
123
|
+
key: e,
|
|
124
|
+
...Nt(n, t, i),
|
|
125
|
+
...r
|
|
126
|
+
}, ($t(n, t).children || []).map((o, c) => ke(o, `${e}-${n.tag}-${c}`, t, void 0, i)));
|
|
133
127
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
d === "mask" && typeof f == "string" && (n[d] = f.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
128
|
+
function Nt(n, e, t) {
|
|
129
|
+
const r = { ...n.attrs };
|
|
130
|
+
t != null && t.colorChannel1 && r.fill === "colorChannel1" && (r.fill = t.colorChannel1), n.tag === "mask" && r.id && (r.id = r.id + e.idSuffix), Object.entries(r).forEach(([o, c]) => {
|
|
131
|
+
o === "mask" && typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
139
132
|
});
|
|
140
|
-
|
|
141
|
-
return !i || i.length === 0 || (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})), n;
|
|
133
|
+
const { defIds: i } = e;
|
|
134
|
+
return !i || i.length === 0 || (n.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(([o, c]) => {
|
|
135
|
+
typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
136
|
+
})), r;
|
|
145
137
|
}
|
|
146
|
-
function
|
|
147
|
-
var r
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
138
|
+
function $t(n, e) {
|
|
139
|
+
var r;
|
|
140
|
+
const { defIds: t } = e;
|
|
141
|
+
return !t || t.length === 0 ? n : n.tag === "defs" && ((r = n.children) != null && r.length) ? {
|
|
142
|
+
...n,
|
|
143
|
+
children: n.children.map((i) => typeof i.attrs.id == "string" && t && t.includes(i.attrs.id) ? {
|
|
144
|
+
...i,
|
|
145
|
+
attrs: {
|
|
146
|
+
...i.attrs,
|
|
147
|
+
id: i.attrs.id + e.idSuffix
|
|
148
|
+
}
|
|
149
|
+
} : i)
|
|
150
|
+
} : n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function kt() {
|
|
153
153
|
return Math.random().toString(36).substring(2, 8);
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
z.displayName = "UniverIcon";
|
|
156
|
+
const Ut = {
|
|
157
|
+
tag: "svg",
|
|
158
|
+
attrs: {
|
|
159
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
160
|
+
fill: "none",
|
|
161
|
+
viewBox: "0 0 16 16",
|
|
162
|
+
width: "1em",
|
|
163
|
+
height: "1em"
|
|
164
|
+
},
|
|
165
|
+
children: [
|
|
166
|
+
{
|
|
167
|
+
tag: "path",
|
|
168
|
+
attrs: {
|
|
169
|
+
fill: "currentColor",
|
|
170
|
+
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"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
tag: "path",
|
|
175
|
+
attrs: {
|
|
176
|
+
fill: "currentColor",
|
|
177
|
+
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"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
tag: "path",
|
|
182
|
+
attrs: {
|
|
183
|
+
fill: "currentColor",
|
|
184
|
+
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"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
tag: "path",
|
|
189
|
+
attrs: {
|
|
190
|
+
fill: "currentColor",
|
|
191
|
+
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",
|
|
192
|
+
fillRule: "evenodd",
|
|
193
|
+
clipRule: "evenodd"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}, Ue = K(function(e, t) {
|
|
198
|
+
return G(z, Object.assign({}, e, {
|
|
158
199
|
id: "delete-icon",
|
|
159
|
-
ref:
|
|
160
|
-
icon:
|
|
200
|
+
ref: t,
|
|
201
|
+
icon: Ut
|
|
161
202
|
}));
|
|
162
203
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
204
|
+
Ue.displayName = "DeleteIcon";
|
|
205
|
+
const Tt = {
|
|
206
|
+
tag: "svg",
|
|
207
|
+
attrs: {
|
|
208
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
209
|
+
fill: "none",
|
|
210
|
+
viewBox: "0 0 16 16",
|
|
211
|
+
width: "1em",
|
|
212
|
+
height: "1em"
|
|
213
|
+
},
|
|
214
|
+
children: [{
|
|
215
|
+
tag: "path",
|
|
216
|
+
attrs: {
|
|
217
|
+
fill: "currentColor",
|
|
218
|
+
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"
|
|
219
|
+
}
|
|
220
|
+
}]
|
|
221
|
+
}, Te = K(function(e, t) {
|
|
222
|
+
return G(z, Object.assign({}, e, {
|
|
166
223
|
id: "increase-icon",
|
|
167
|
-
ref:
|
|
168
|
-
icon:
|
|
224
|
+
ref: t,
|
|
225
|
+
icon: Tt
|
|
169
226
|
}));
|
|
170
227
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
228
|
+
Te.displayName = "IncreaseIcon";
|
|
229
|
+
const Dt = {
|
|
230
|
+
tag: "svg",
|
|
231
|
+
attrs: {
|
|
232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
233
|
+
fill: "none",
|
|
234
|
+
viewBox: "0 0 16 16",
|
|
235
|
+
width: "1em",
|
|
236
|
+
height: "1em"
|
|
237
|
+
},
|
|
238
|
+
children: [
|
|
239
|
+
{
|
|
240
|
+
tag: "path",
|
|
241
|
+
attrs: {
|
|
242
|
+
fill: "currentColor",
|
|
243
|
+
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"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
tag: "path",
|
|
248
|
+
attrs: {
|
|
249
|
+
fill: "currentColor",
|
|
250
|
+
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"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
tag: "path",
|
|
255
|
+
attrs: {
|
|
256
|
+
fill: "currentColor",
|
|
257
|
+
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"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}, De = K(function(e, t) {
|
|
262
|
+
return G(z, Object.assign({}, e, {
|
|
174
263
|
id: "more-horizontal-icon",
|
|
175
|
-
ref:
|
|
176
|
-
icon:
|
|
264
|
+
ref: t,
|
|
265
|
+
icon: Dt
|
|
177
266
|
}));
|
|
178
267
|
});
|
|
179
268
|
De.displayName = "MoreHorizontalIcon";
|
|
180
|
-
|
|
181
|
-
|
|
269
|
+
const Et = {
|
|
270
|
+
tag: "svg",
|
|
271
|
+
attrs: {
|
|
272
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
273
|
+
fill: "none",
|
|
274
|
+
viewBox: "0 0 16 16",
|
|
275
|
+
width: "1em",
|
|
276
|
+
height: "1em"
|
|
277
|
+
},
|
|
278
|
+
children: [
|
|
279
|
+
{
|
|
280
|
+
tag: "path",
|
|
281
|
+
attrs: {
|
|
282
|
+
stroke: "currentColor",
|
|
283
|
+
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",
|
|
284
|
+
strokeLinecap: "round",
|
|
285
|
+
strokeLinejoin: "round",
|
|
286
|
+
strokeWidth: 1.2
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
tag: "path",
|
|
291
|
+
attrs: {
|
|
292
|
+
stroke: "currentColor",
|
|
293
|
+
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",
|
|
294
|
+
strokeLinecap: "round",
|
|
295
|
+
strokeLinejoin: "round",
|
|
296
|
+
strokeWidth: 1.2
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
tag: "path",
|
|
301
|
+
attrs: {
|
|
302
|
+
stroke: "currentColor",
|
|
303
|
+
d: "M6.41016 6.1311H6.76813",
|
|
304
|
+
strokeLinecap: "round",
|
|
305
|
+
strokeWidth: 1.2
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
tag: "path",
|
|
310
|
+
attrs: {
|
|
311
|
+
stroke: "currentColor",
|
|
312
|
+
d: "M8.91626 6.1311H9.27424",
|
|
313
|
+
strokeLinecap: "round",
|
|
314
|
+
strokeWidth: 1.2
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
tag: "path",
|
|
319
|
+
attrs: {
|
|
320
|
+
stroke: "currentColor",
|
|
321
|
+
d: "M3.90454 6.1311H4.26252",
|
|
322
|
+
strokeLinecap: "round",
|
|
323
|
+
strokeWidth: 1.2
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}, Ee = K(function(e, t) {
|
|
328
|
+
return G(z, Object.assign({}, e, {
|
|
182
329
|
id: "reply-to-comment-icon",
|
|
183
|
-
ref:
|
|
184
|
-
icon:
|
|
330
|
+
ref: t,
|
|
331
|
+
icon: Et
|
|
185
332
|
}));
|
|
186
333
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
334
|
+
Ee.displayName = "ReplyToCommentIcon";
|
|
335
|
+
const Mt = {
|
|
336
|
+
tag: "svg",
|
|
337
|
+
attrs: {
|
|
338
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
339
|
+
fill: "none",
|
|
340
|
+
viewBox: "0 0 17 17",
|
|
341
|
+
width: "1em",
|
|
342
|
+
height: "1em"
|
|
343
|
+
},
|
|
344
|
+
children: [{
|
|
345
|
+
tag: "path",
|
|
346
|
+
attrs: {
|
|
347
|
+
fill: "currentColor",
|
|
348
|
+
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",
|
|
349
|
+
fillRule: "evenodd",
|
|
350
|
+
clipRule: "evenodd"
|
|
351
|
+
}
|
|
352
|
+
}]
|
|
353
|
+
}, Me = K(function(e, t) {
|
|
354
|
+
return G(z, Object.assign({}, e, {
|
|
190
355
|
id: "resolved-icon",
|
|
191
|
-
ref:
|
|
192
|
-
icon:
|
|
356
|
+
ref: t,
|
|
357
|
+
icon: Mt
|
|
193
358
|
}));
|
|
194
359
|
});
|
|
195
360
|
Me.displayName = "ResolvedIcon";
|
|
196
|
-
|
|
197
|
-
|
|
361
|
+
const Rt = {
|
|
362
|
+
tag: "svg",
|
|
363
|
+
attrs: {
|
|
364
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
365
|
+
fill: "none",
|
|
366
|
+
viewBox: "0 0 17 17",
|
|
367
|
+
width: "1em",
|
|
368
|
+
height: "1em"
|
|
369
|
+
},
|
|
370
|
+
children: [{
|
|
371
|
+
tag: "circle",
|
|
372
|
+
attrs: {
|
|
373
|
+
cx: 8.73,
|
|
374
|
+
cy: 8.4,
|
|
375
|
+
r: 6.4,
|
|
376
|
+
stroke: "currentColor",
|
|
377
|
+
strokeWidth: 1.2
|
|
378
|
+
}
|
|
379
|
+
}, {
|
|
380
|
+
tag: "path",
|
|
381
|
+
attrs: {
|
|
382
|
+
stroke: "currentColor",
|
|
383
|
+
d: "M6.02637 8.40356L8.02637 10.4036L12.0264 6.40356",
|
|
384
|
+
strokeLinecap: "round",
|
|
385
|
+
strokeLinejoin: "round",
|
|
386
|
+
strokeWidth: 1.2
|
|
387
|
+
}
|
|
388
|
+
}]
|
|
389
|
+
}, Re = K(function(e, t) {
|
|
390
|
+
return G(z, Object.assign({}, e, {
|
|
198
391
|
id: "solve-icon",
|
|
199
|
-
ref:
|
|
200
|
-
icon:
|
|
392
|
+
ref: t,
|
|
393
|
+
icon: Rt
|
|
201
394
|
}));
|
|
202
395
|
});
|
|
203
396
|
Re.displayName = "SolveIcon";
|
|
204
|
-
function
|
|
397
|
+
function be(n) {
|
|
205
398
|
return {
|
|
206
399
|
id: "d",
|
|
207
|
-
body:
|
|
400
|
+
body: n,
|
|
208
401
|
documentStyle: {}
|
|
209
402
|
};
|
|
210
403
|
}
|
|
211
|
-
const
|
|
404
|
+
const Oe = K((n, e) => {
|
|
212
405
|
var R;
|
|
213
|
-
const { comment:
|
|
214
|
-
var
|
|
215
|
-
return
|
|
406
|
+
const { comment: t, onSave: r, id: i, onCancel: o, autoFocus: c, unitId: x, type: h } = n, N = S(te), k = S(he), [V, U] = P(!1), b = S(mt), u = ee(null), v = h === de.UNIVER_DOC ? Ke : x, [T, y] = P(() => {
|
|
407
|
+
var d, m, f;
|
|
408
|
+
return ue.transform.getPlainText((f = (m = (d = u.current) == null ? void 0 : d.getDocumentData().body) == null ? void 0 : m.dataStream) != null ? f : "");
|
|
216
409
|
});
|
|
217
|
-
|
|
218
|
-
var m,
|
|
219
|
-
y(
|
|
220
|
-
const
|
|
221
|
-
var
|
|
222
|
-
y(
|
|
410
|
+
ae(() => {
|
|
411
|
+
var m, f, w, p;
|
|
412
|
+
y(ue.transform.getPlainText((w = (f = (m = u.current) == null ? void 0 : m.getDocumentData().body) == null ? void 0 : f.dataStream) != null ? w : ""));
|
|
413
|
+
const d = (p = u.current) == null ? void 0 : p.selectionChange$.subscribe(() => {
|
|
414
|
+
var s, _, A;
|
|
415
|
+
y(ue.transform.getPlainText((A = (_ = (s = u.current) == null ? void 0 : s.getDocumentData().body) == null ? void 0 : _.dataStream) != null ? A : ""));
|
|
223
416
|
});
|
|
224
|
-
return () =>
|
|
417
|
+
return () => d == null ? void 0 : d.unsubscribe();
|
|
225
418
|
}, [(R = u.current) == null ? void 0 : R.selectionChange$]);
|
|
226
|
-
const
|
|
227
|
-
keyCodes: [{ keyCode:
|
|
228
|
-
handler: (
|
|
229
|
-
|
|
419
|
+
const j = X(() => ({
|
|
420
|
+
keyCodes: [{ keyCode: pe.ENTER }],
|
|
421
|
+
handler: (d) => {
|
|
422
|
+
d === pe.ENTER && N.executeCommand(
|
|
230
423
|
ht.id
|
|
231
424
|
);
|
|
232
425
|
}
|
|
233
426
|
}), [N]);
|
|
234
|
-
|
|
235
|
-
reply(
|
|
236
|
-
var
|
|
427
|
+
vt(e, () => ({
|
|
428
|
+
reply(d) {
|
|
429
|
+
var f, w;
|
|
237
430
|
if (!u.current)
|
|
238
431
|
return;
|
|
239
|
-
b.focus((
|
|
240
|
-
const m =
|
|
432
|
+
b.focus((f = u.current.getEditorId()) != null ? f : "");
|
|
433
|
+
const m = be(d);
|
|
241
434
|
(w = u.current) == null || w.setDocumentData(m, [{
|
|
242
435
|
startOffset: m.body.dataStream.length - 2,
|
|
243
436
|
endOffset: m.body.dataStream.length - 2,
|
|
@@ -247,27 +440,27 @@ const Le = B((t, e) => {
|
|
|
247
440
|
}));
|
|
248
441
|
const C = () => {
|
|
249
442
|
if (u.current) {
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
...
|
|
253
|
-
text:
|
|
443
|
+
const d = ze.deepClone(u.current.getDocumentData().body);
|
|
444
|
+
U(!1), r == null || r({
|
|
445
|
+
...t,
|
|
446
|
+
text: d
|
|
254
447
|
}), u.current.replaceText(""), setTimeout(() => {
|
|
255
|
-
var m,
|
|
256
|
-
(m = u.current) == null || m.setSelectionRanges([]), (
|
|
448
|
+
var m, f;
|
|
449
|
+
(m = u.current) == null || m.setSelectionRanges([]), (f = u.current) == null || f.blur();
|
|
257
450
|
}, 10);
|
|
258
451
|
}
|
|
259
452
|
};
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
453
|
+
return /* @__PURE__ */ I("div", { onClick: (d) => d.preventDefault(), children: [
|
|
454
|
+
/* @__PURE__ */ l(
|
|
455
|
+
ft,
|
|
263
456
|
{
|
|
264
457
|
className: "univer-w-full",
|
|
265
458
|
editorRef: u,
|
|
266
|
-
autoFocus:
|
|
267
|
-
keyboardEventConfig:
|
|
268
|
-
placeholder:
|
|
269
|
-
initialValue: (
|
|
270
|
-
onFocusChange: (
|
|
459
|
+
autoFocus: c,
|
|
460
|
+
keyboardEventConfig: j,
|
|
461
|
+
placeholder: k.t("threadCommentUI.editor.placeholder"),
|
|
462
|
+
initialValue: (t == null ? void 0 : t.text) && be(t.text),
|
|
463
|
+
onFocusChange: (d) => d && U(d),
|
|
271
464
|
isSingle: !1,
|
|
272
465
|
maxHeight: 64,
|
|
273
466
|
onClickOutside: () => {
|
|
@@ -277,69 +470,69 @@ const Le = B((t, e) => {
|
|
|
277
470
|
}
|
|
278
471
|
}
|
|
279
472
|
),
|
|
280
|
-
|
|
281
|
-
/* @__PURE__ */
|
|
473
|
+
V ? /* @__PURE__ */ I("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
|
|
474
|
+
/* @__PURE__ */ l(
|
|
282
475
|
le,
|
|
283
476
|
{
|
|
284
477
|
onClick: () => {
|
|
285
|
-
var
|
|
286
|
-
o == null || o(),
|
|
478
|
+
var d;
|
|
479
|
+
o == null || o(), U(!1), (d = u.current) == null || d.replaceText("", !0), N.executeCommand(F.id);
|
|
287
480
|
},
|
|
288
|
-
children:
|
|
481
|
+
children: k.t("threadCommentUI.editor.cancel")
|
|
289
482
|
}
|
|
290
483
|
),
|
|
291
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ l(
|
|
292
485
|
le,
|
|
293
486
|
{
|
|
294
487
|
variant: "primary",
|
|
295
|
-
disabled: !
|
|
488
|
+
disabled: !T,
|
|
296
489
|
onClick: C,
|
|
297
|
-
children:
|
|
490
|
+
children: k.t(i ? "threadCommentUI.editor.save" : "threadCommentUI.editor.reply")
|
|
298
491
|
}
|
|
299
492
|
)
|
|
300
493
|
] }) : null
|
|
301
494
|
] });
|
|
302
|
-
}),
|
|
303
|
-
const { dataStream: e, customRanges:
|
|
495
|
+
}), Ot = (n) => {
|
|
496
|
+
const { dataStream: e, customRanges: t } = n, r = e.endsWith(`\r
|
|
304
497
|
`) ? e.length - 2 : e.length, i = [];
|
|
305
498
|
let o = 0;
|
|
306
|
-
return
|
|
307
|
-
o <
|
|
499
|
+
return t == null || t.forEach((c) => {
|
|
500
|
+
o < c.startIndex && i.push({
|
|
308
501
|
type: "text",
|
|
309
|
-
content: e.slice(o,
|
|
502
|
+
content: e.slice(o, c.startIndex)
|
|
310
503
|
}), i.push({
|
|
311
504
|
type: "mention",
|
|
312
505
|
content: {
|
|
313
|
-
label: e.slice(
|
|
314
|
-
id:
|
|
506
|
+
label: e.slice(c.startIndex, c.endIndex + 1),
|
|
507
|
+
id: c.rangeId
|
|
315
508
|
}
|
|
316
|
-
}), o =
|
|
509
|
+
}), o = c.endIndex + 1;
|
|
317
510
|
}), i.push({
|
|
318
511
|
type: "text",
|
|
319
|
-
content: e.slice(o,
|
|
512
|
+
content: e.slice(o, r)
|
|
320
513
|
}), i;
|
|
321
|
-
},
|
|
322
|
-
const { paragraphs: e = [] } =
|
|
323
|
-
let
|
|
324
|
-
return e.map((
|
|
325
|
-
const i =
|
|
326
|
-
return
|
|
514
|
+
}, Lt = (n) => {
|
|
515
|
+
const { paragraphs: e = [] } = n;
|
|
516
|
+
let t = 0;
|
|
517
|
+
return e.map((r) => {
|
|
518
|
+
const i = qe(n, t, r.startIndex);
|
|
519
|
+
return t = r.startIndex + 1, Ot(i);
|
|
327
520
|
});
|
|
328
|
-
},
|
|
521
|
+
}, Ht = (n) => {
|
|
329
522
|
let e = "";
|
|
330
|
-
const
|
|
331
|
-
return
|
|
332
|
-
switch (
|
|
523
|
+
const t = [];
|
|
524
|
+
return n.forEach((r) => {
|
|
525
|
+
switch (r.type) {
|
|
333
526
|
case "text":
|
|
334
|
-
e +=
|
|
527
|
+
e += r.content;
|
|
335
528
|
break;
|
|
336
529
|
case "mention": {
|
|
337
530
|
const i = e.length;
|
|
338
|
-
e +=
|
|
531
|
+
e += r.content.label;
|
|
339
532
|
const o = e.length - 1;
|
|
340
|
-
|
|
341
|
-
rangeId:
|
|
342
|
-
rangeType:
|
|
533
|
+
t.push({
|
|
534
|
+
rangeId: r.content.id,
|
|
535
|
+
rangeType: Ye.MENTION,
|
|
343
536
|
startIndex: i,
|
|
344
537
|
endIndex: o,
|
|
345
538
|
properties: {},
|
|
@@ -363,21 +556,21 @@ const Le = B((t, e) => {
|
|
|
363
556
|
}
|
|
364
557
|
],
|
|
365
558
|
dataStream: e,
|
|
366
|
-
customRanges:
|
|
559
|
+
customRanges: t
|
|
367
560
|
};
|
|
368
|
-
},
|
|
369
|
-
const { item: e, unitId:
|
|
370
|
-
(
|
|
371
|
-
h ?
|
|
561
|
+
}, Le = "__mock__", Vt = (n) => {
|
|
562
|
+
const { item: e, unitId: t, subUnitId: r, editing: i, onEditingChange: o, onReply: c, resolved: x, isRoot: h, onClose: N, onDeleteComment: k, type: V } = n, U = S(te), b = S(he), u = S(fe), v = u.getUser(e.personId), T = Z(u.currentUser$), y = (T == null ? void 0 : T.userID) === e.personId, j = e.id === Le, [C, R] = P(!1), d = Qe(Xe), m = d == null ? void 0 : d.avatarFallback, f = () => {
|
|
563
|
+
(k == null ? void 0 : k(e)) !== !1 && (U.executeCommand(
|
|
564
|
+
h ? Ne.id : lt.id,
|
|
372
565
|
{
|
|
373
|
-
unitId:
|
|
374
|
-
subUnitId:
|
|
566
|
+
unitId: t,
|
|
567
|
+
subUnitId: r,
|
|
375
568
|
commentId: e.id
|
|
376
569
|
}
|
|
377
570
|
), h && (N == null || N()));
|
|
378
571
|
};
|
|
379
|
-
return /* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
572
|
+
return /* @__PURE__ */ I("div", { className: "univer-relative univer-mb-3 univer-pl-[30px]", onMouseLeave: () => R(!1), onMouseEnter: () => R(!0), children: [
|
|
573
|
+
/* @__PURE__ */ l(
|
|
381
574
|
"div",
|
|
382
575
|
{
|
|
383
576
|
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",
|
|
@@ -386,26 +579,26 @@ const Le = B((t, e) => {
|
|
|
386
579
|
}
|
|
387
580
|
}
|
|
388
581
|
),
|
|
389
|
-
v ? /* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
|
|
582
|
+
v ? /* @__PURE__ */ I("div", { className: "univer-mb-1 univer-flex univer-h-6 univer-items-center univer-justify-between", children: [
|
|
583
|
+
/* @__PURE__ */ l("div", { className: "univer-text-sm univer-font-medium univer-leading-5", children: (v == null ? void 0 : v.name) || " " }),
|
|
584
|
+
/* @__PURE__ */ I("div", { children: [
|
|
585
|
+
j || x ? null : C && v ? /* @__PURE__ */ l(
|
|
393
586
|
"div",
|
|
394
587
|
{
|
|
395
588
|
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",
|
|
396
|
-
onClick: () =>
|
|
397
|
-
children: /* @__PURE__ */
|
|
589
|
+
onClick: () => c(v),
|
|
590
|
+
children: /* @__PURE__ */ l(Ee, {})
|
|
398
591
|
}
|
|
399
592
|
) : null,
|
|
400
|
-
y && !
|
|
401
|
-
|
|
593
|
+
y && !j && !x ? /* @__PURE__ */ l(
|
|
594
|
+
ut,
|
|
402
595
|
{
|
|
403
|
-
overlay: /* @__PURE__ */
|
|
596
|
+
overlay: /* @__PURE__ */ l("div", { className: "univer-rounded-lg", children: /* @__PURE__ */ I(
|
|
404
597
|
"ul",
|
|
405
598
|
{
|
|
406
599
|
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",
|
|
407
600
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
409
602
|
"a",
|
|
410
603
|
{
|
|
411
604
|
className: "hover:univer-bg-gray-200",
|
|
@@ -413,239 +606,239 @@ const Le = B((t, e) => {
|
|
|
413
606
|
children: b.t("threadCommentUI.item.edit")
|
|
414
607
|
}
|
|
415
608
|
) }),
|
|
416
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
417
610
|
"a",
|
|
418
611
|
{
|
|
419
612
|
className: "hover:univer-bg-gray-200",
|
|
420
|
-
onClick:
|
|
613
|
+
onClick: f,
|
|
421
614
|
children: b.t("threadCommentUI.item.delete")
|
|
422
615
|
}
|
|
423
616
|
) })
|
|
424
617
|
]
|
|
425
618
|
}
|
|
426
619
|
) }),
|
|
427
|
-
children: /* @__PURE__ */
|
|
620
|
+
children: /* @__PURE__ */ l(
|
|
428
621
|
"div",
|
|
429
622
|
{
|
|
430
623
|
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",
|
|
431
|
-
children: /* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ l(De, {})
|
|
432
625
|
}
|
|
433
626
|
)
|
|
434
627
|
}
|
|
435
628
|
) : null
|
|
436
629
|
] })
|
|
437
630
|
] }) : null,
|
|
438
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ l(
|
|
439
632
|
"time",
|
|
440
633
|
{
|
|
441
634
|
className: "univer-mb-1 univer-text-xs/normal univer-text-gray-600 dark:!univer-text-gray-200",
|
|
442
635
|
children: e.dT
|
|
443
636
|
}
|
|
444
637
|
),
|
|
445
|
-
i ? /* @__PURE__ */
|
|
446
|
-
|
|
638
|
+
i ? /* @__PURE__ */ l(
|
|
639
|
+
Oe,
|
|
447
640
|
{
|
|
448
|
-
type:
|
|
641
|
+
type: V,
|
|
449
642
|
id: e.id,
|
|
450
643
|
comment: e,
|
|
451
644
|
onCancel: () => o == null ? void 0 : o(!1),
|
|
452
645
|
autoFocus: !0,
|
|
453
|
-
unitId:
|
|
454
|
-
subUnitId:
|
|
455
|
-
onSave: ({ text: w, attachments:
|
|
456
|
-
o == null || o(!1),
|
|
646
|
+
unitId: t,
|
|
647
|
+
subUnitId: r,
|
|
648
|
+
onSave: ({ text: w, attachments: p }) => {
|
|
649
|
+
o == null || o(!1), U.executeCommand(
|
|
457
650
|
st.id,
|
|
458
651
|
{
|
|
459
|
-
unitId:
|
|
460
|
-
subUnitId:
|
|
652
|
+
unitId: t,
|
|
653
|
+
subUnitId: r,
|
|
461
654
|
payload: {
|
|
462
655
|
commentId: e.id,
|
|
463
656
|
text: w,
|
|
464
|
-
attachments:
|
|
657
|
+
attachments: p
|
|
465
658
|
}
|
|
466
659
|
}
|
|
467
660
|
);
|
|
468
661
|
}
|
|
469
662
|
}
|
|
470
|
-
) : /* @__PURE__ */
|
|
663
|
+
) : /* @__PURE__ */ l(
|
|
471
664
|
"div",
|
|
472
665
|
{
|
|
473
666
|
className: "univer-text-sm univer-text-gray-900 dark:!univer-text-white",
|
|
474
|
-
children:
|
|
475
|
-
switch (
|
|
667
|
+
children: Lt(e.text).map((w, p) => /* @__PURE__ */ l("div", { className: "univer-break-words", children: w.map((s, _) => {
|
|
668
|
+
switch (s.type) {
|
|
476
669
|
case "mention":
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
670
|
+
return /* @__PURE__ */ I("a", { className: "univer-text-primary-600", children: [
|
|
671
|
+
s.content.label,
|
|
479
672
|
" "
|
|
480
673
|
] }, _);
|
|
481
674
|
default:
|
|
482
|
-
return
|
|
675
|
+
return s.content;
|
|
483
676
|
}
|
|
484
|
-
}) },
|
|
677
|
+
}) }, p))
|
|
485
678
|
}
|
|
486
679
|
)
|
|
487
680
|
] });
|
|
488
|
-
},
|
|
489
|
-
var se,
|
|
681
|
+
}, jt = (n) => {
|
|
682
|
+
var se, Q, a;
|
|
490
683
|
const {
|
|
491
684
|
id: e,
|
|
492
|
-
unitId:
|
|
493
|
-
subUnitId:
|
|
685
|
+
unitId: t,
|
|
686
|
+
subUnitId: r,
|
|
494
687
|
refStr: i,
|
|
495
688
|
showEdit: o = !0,
|
|
496
|
-
onClick:
|
|
497
|
-
showHighlight:
|
|
689
|
+
onClick: c,
|
|
690
|
+
showHighlight: x,
|
|
498
691
|
onClose: h,
|
|
499
692
|
getSubUnitName: N,
|
|
500
|
-
prefix:
|
|
501
|
-
autoFocus:
|
|
502
|
-
onMouseEnter:
|
|
693
|
+
prefix: k,
|
|
694
|
+
autoFocus: V,
|
|
695
|
+
onMouseEnter: U,
|
|
503
696
|
onMouseLeave: b,
|
|
504
697
|
onAddComment: u,
|
|
505
698
|
onDeleteComment: v,
|
|
506
|
-
onResolve:
|
|
699
|
+
onResolve: T,
|
|
507
700
|
type: y,
|
|
508
|
-
style:
|
|
701
|
+
style: j,
|
|
509
702
|
full: C
|
|
510
|
-
} =
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
...
|
|
703
|
+
} = n, R = S(Se), [d, m] = P(!1), [f, w] = P(""), p = X(() => R.commentUpdate$.pipe(tt(16)), [R]);
|
|
704
|
+
Z(p);
|
|
705
|
+
const s = e ? R.getCommentWithChildren(t, r, e) : null, _ = S(te), A = S(fe), D = s == null ? void 0 : s.root.resolved, E = Z(A.currentUser$), L = ee(null), q = [
|
|
706
|
+
...s ? [s.root] : (
|
|
514
707
|
// mock empty comment
|
|
515
708
|
[{
|
|
516
|
-
id:
|
|
709
|
+
id: Le,
|
|
517
710
|
text: {
|
|
518
711
|
dataStream: `
|
|
519
712
|
\r`
|
|
520
713
|
},
|
|
521
|
-
personId: (se =
|
|
714
|
+
personId: (se = E == null ? void 0 : E.userID) != null ? se : "",
|
|
522
715
|
ref: i != null ? i : "",
|
|
523
716
|
dT: "",
|
|
524
|
-
unitId:
|
|
525
|
-
subUnitId:
|
|
717
|
+
unitId: t,
|
|
718
|
+
subUnitId: r,
|
|
526
719
|
threadId: ""
|
|
527
720
|
}]
|
|
528
721
|
),
|
|
529
|
-
...(
|
|
530
|
-
],
|
|
531
|
-
|
|
532
|
-
unitId:
|
|
533
|
-
subUnitId:
|
|
722
|
+
...(Q = s == null ? void 0 : s.children) != null ? Q : []
|
|
723
|
+
], O = ee(null), ne = (g) => {
|
|
724
|
+
g.stopPropagation(), D ? _.executeCommand(F.id, {
|
|
725
|
+
unitId: t,
|
|
726
|
+
subUnitId: r,
|
|
534
727
|
commentId: e
|
|
535
|
-
}) : _.executeCommand(
|
|
536
|
-
unitId:
|
|
537
|
-
subUnitId:
|
|
728
|
+
}) : _.executeCommand(F.id), _.executeCommand(ot.id, {
|
|
729
|
+
unitId: t,
|
|
730
|
+
subUnitId: r,
|
|
538
731
|
commentId: e,
|
|
539
|
-
resolved: !
|
|
540
|
-
}),
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
|
|
732
|
+
resolved: !D
|
|
733
|
+
}), T == null || T(!D);
|
|
734
|
+
}, J = (g) => {
|
|
735
|
+
g.stopPropagation(), _.executeCommand(F.id), !(s != null && s.root && (v == null ? void 0 : v(s.root)) === !1) && (_.executeCommand(
|
|
736
|
+
Ne.id,
|
|
544
737
|
{
|
|
545
|
-
unitId:
|
|
546
|
-
subUnitId:
|
|
738
|
+
unitId: t,
|
|
739
|
+
subUnitId: r,
|
|
547
740
|
commentId: e
|
|
548
741
|
}
|
|
549
742
|
), h == null || h());
|
|
550
743
|
};
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
return /* @__PURE__ */
|
|
744
|
+
ae(() => b == null ? void 0 : b(), []);
|
|
745
|
+
const re = N((a = s == null ? void 0 : s.root.subUnitId) != null ? a : r), ie = o && !f && !D, oe = `${i || (s == null ? void 0 : s.root.ref) || ""}${re ? " · " : ""}${re}`;
|
|
746
|
+
return /* @__PURE__ */ I(
|
|
554
747
|
"div",
|
|
555
748
|
{
|
|
556
|
-
id: `${
|
|
557
|
-
className:
|
|
749
|
+
id: `${k}-${t}-${r}-${e}`,
|
|
750
|
+
className: ve("univer-relative univer-box-border univer-rounded-md univer-bg-white univer-p-4 dark:!univer-bg-gray-900 dark:!univer-text-white", dt, {
|
|
558
751
|
"univer-w-[278px]": !C,
|
|
559
752
|
"univer-w-full": C,
|
|
560
|
-
"univer-shadow": !
|
|
753
|
+
"univer-shadow": !D && (x || d || k === "cell")
|
|
561
754
|
}),
|
|
562
|
-
style:
|
|
563
|
-
onClick:
|
|
755
|
+
style: j,
|
|
756
|
+
onClick: c,
|
|
564
757
|
onMouseEnter: () => {
|
|
565
|
-
|
|
758
|
+
U == null || U(), m(!0);
|
|
566
759
|
},
|
|
567
760
|
onMouseLeave: () => {
|
|
568
761
|
b == null || b(), m(!1);
|
|
569
762
|
},
|
|
570
763
|
children: [
|
|
571
|
-
!
|
|
764
|
+
!D && x && /* @__PURE__ */ l(
|
|
572
765
|
"div",
|
|
573
766
|
{
|
|
574
767
|
className: "univer-absolute univer-left-0 univer-right-0 univer-top-0 univer-h-1.5 univer-rounded-t-md univer-bg-yellow-400"
|
|
575
768
|
}
|
|
576
769
|
),
|
|
577
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ I(
|
|
578
771
|
"div",
|
|
579
772
|
{
|
|
580
773
|
className: "univer-mb-4 univer-flex univer-flex-row univer-items-center univer-justify-between univer-text-sm univer-leading-5",
|
|
581
774
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ I("div", { className: "univer-flex univer-flex-1 univer-flex-row univer-items-center univer-overflow-hidden", children: [
|
|
776
|
+
/* @__PURE__ */ l(
|
|
584
777
|
"div",
|
|
585
778
|
{
|
|
586
779
|
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"
|
|
587
780
|
}
|
|
588
781
|
),
|
|
589
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ l(at, { showIfEllipsis: !0, title: oe, children: /* @__PURE__ */ l(
|
|
590
783
|
"div",
|
|
591
784
|
{
|
|
592
785
|
className: "univer-flex-1 univer-truncate",
|
|
593
|
-
children:
|
|
786
|
+
children: oe
|
|
594
787
|
}
|
|
595
788
|
) })
|
|
596
789
|
] }),
|
|
597
|
-
!!
|
|
598
|
-
/* @__PURE__ */
|
|
790
|
+
!!s && /* @__PURE__ */ I("div", { className: "univer-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-row", children: [
|
|
791
|
+
/* @__PURE__ */ l(
|
|
599
792
|
"div",
|
|
600
793
|
{
|
|
601
|
-
className:
|
|
602
|
-
"univer-text-green-500":
|
|
794
|
+
className: ve("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 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800", {
|
|
795
|
+
"univer-text-green-500": D
|
|
603
796
|
}),
|
|
604
797
|
onClick: ne,
|
|
605
|
-
children:
|
|
798
|
+
children: D ? /* @__PURE__ */ l(Me, {}) : /* @__PURE__ */ l(Re, {})
|
|
606
799
|
}
|
|
607
800
|
),
|
|
608
|
-
(
|
|
801
|
+
(E == null ? void 0 : E.userID) === s.root.personId ? /* @__PURE__ */ l(
|
|
609
802
|
"div",
|
|
610
803
|
{
|
|
611
804
|
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 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800",
|
|
612
|
-
onClick:
|
|
613
|
-
children: /* @__PURE__ */
|
|
805
|
+
onClick: J,
|
|
806
|
+
children: /* @__PURE__ */ l(Ue, {})
|
|
614
807
|
}
|
|
615
808
|
) : null
|
|
616
809
|
] })
|
|
617
810
|
]
|
|
618
811
|
}
|
|
619
812
|
),
|
|
620
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ l(
|
|
621
814
|
"div",
|
|
622
815
|
{
|
|
623
|
-
ref:
|
|
624
|
-
className:
|
|
625
|
-
children:
|
|
626
|
-
(
|
|
816
|
+
ref: O,
|
|
817
|
+
className: ve("univer-max-h-80 univer-overflow-y-auto univer-overflow-x-hidden", ct),
|
|
818
|
+
children: q.map(
|
|
819
|
+
(g) => /* @__PURE__ */ l(
|
|
627
820
|
Vt,
|
|
628
821
|
{
|
|
629
|
-
unitId:
|
|
630
|
-
subUnitId:
|
|
631
|
-
item:
|
|
632
|
-
isRoot:
|
|
633
|
-
editing:
|
|
634
|
-
resolved:
|
|
822
|
+
unitId: t,
|
|
823
|
+
subUnitId: r,
|
|
824
|
+
item: g,
|
|
825
|
+
isRoot: g.id === (s == null ? void 0 : s.root.id),
|
|
826
|
+
editing: f === g.id,
|
|
827
|
+
resolved: s == null ? void 0 : s.root.resolved,
|
|
635
828
|
type: y,
|
|
636
829
|
onClose: h,
|
|
637
|
-
onEditingChange: (
|
|
638
|
-
w(
|
|
830
|
+
onEditingChange: (M) => {
|
|
831
|
+
w(M ? g.id : "");
|
|
639
832
|
},
|
|
640
|
-
onReply: (
|
|
641
|
-
|
|
833
|
+
onReply: (M) => {
|
|
834
|
+
M && requestAnimationFrame(() => {
|
|
642
835
|
var H;
|
|
643
|
-
(H =
|
|
836
|
+
(H = L.current) == null || H.reply(Ht([
|
|
644
837
|
{
|
|
645
838
|
type: "mention",
|
|
646
839
|
content: {
|
|
647
|
-
id:
|
|
648
|
-
label: `@${
|
|
840
|
+
id: M.userID,
|
|
841
|
+
label: `@${M.name}`
|
|
649
842
|
}
|
|
650
843
|
},
|
|
651
844
|
{
|
|
@@ -658,136 +851,136 @@ const Le = B((t, e) => {
|
|
|
658
851
|
onAddComment: u,
|
|
659
852
|
onDeleteComment: v
|
|
660
853
|
},
|
|
661
|
-
|
|
854
|
+
g.id
|
|
662
855
|
)
|
|
663
856
|
)
|
|
664
857
|
}
|
|
665
858
|
),
|
|
666
|
-
|
|
667
|
-
|
|
859
|
+
ie && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
860
|
+
Oe,
|
|
668
861
|
{
|
|
669
|
-
ref:
|
|
862
|
+
ref: L,
|
|
670
863
|
type: y,
|
|
671
|
-
unitId:
|
|
672
|
-
subUnitId:
|
|
673
|
-
onSave: async ({ text:
|
|
864
|
+
unitId: t,
|
|
865
|
+
subUnitId: r,
|
|
866
|
+
onSave: async ({ text: g, attachments: M }) => {
|
|
674
867
|
const H = {
|
|
675
|
-
text:
|
|
676
|
-
attachments:
|
|
677
|
-
dT:
|
|
678
|
-
id:
|
|
868
|
+
text: g,
|
|
869
|
+
attachments: M,
|
|
870
|
+
dT: rt(),
|
|
871
|
+
id: Je(),
|
|
679
872
|
ref: i,
|
|
680
|
-
personId:
|
|
681
|
-
parentId:
|
|
682
|
-
unitId:
|
|
683
|
-
subUnitId:
|
|
684
|
-
threadId:
|
|
873
|
+
personId: E == null ? void 0 : E.userID,
|
|
874
|
+
parentId: s == null ? void 0 : s.root.id,
|
|
875
|
+
unitId: t,
|
|
876
|
+
subUnitId: r,
|
|
877
|
+
threadId: s == null ? void 0 : s.root.threadId
|
|
685
878
|
};
|
|
686
879
|
(u == null ? void 0 : u(H)) !== !1 && (await _.executeCommand(
|
|
687
|
-
|
|
880
|
+
it.id,
|
|
688
881
|
{
|
|
689
|
-
unitId:
|
|
690
|
-
subUnitId:
|
|
882
|
+
unitId: t,
|
|
883
|
+
subUnitId: r,
|
|
691
884
|
comment: H
|
|
692
885
|
}
|
|
693
|
-
),
|
|
886
|
+
), O.current && (O.current.scrollTop = O.current.scrollHeight));
|
|
694
887
|
},
|
|
695
|
-
autoFocus:
|
|
888
|
+
autoFocus: V || !s,
|
|
696
889
|
onCancel: () => {
|
|
697
|
-
|
|
890
|
+
s || h == null || h();
|
|
698
891
|
}
|
|
699
892
|
},
|
|
700
|
-
`${
|
|
893
|
+
`${V}`
|
|
701
894
|
) })
|
|
702
895
|
]
|
|
703
896
|
}
|
|
704
897
|
);
|
|
705
|
-
},
|
|
898
|
+
}, Yt = (n) => {
|
|
706
899
|
const {
|
|
707
900
|
unitId: e,
|
|
708
|
-
subUnitId$:
|
|
709
|
-
type:
|
|
901
|
+
subUnitId$: t,
|
|
902
|
+
type: r,
|
|
710
903
|
onAdd: i,
|
|
711
904
|
getSubUnitName: o,
|
|
712
|
-
onResolve:
|
|
713
|
-
sortComments:
|
|
905
|
+
onResolve: c,
|
|
906
|
+
sortComments: x,
|
|
714
907
|
onItemLeave: h,
|
|
715
908
|
onItemEnter: N,
|
|
716
|
-
disableAdd:
|
|
717
|
-
tempComment:
|
|
718
|
-
onAddComment:
|
|
909
|
+
disableAdd: k,
|
|
910
|
+
tempComment: V,
|
|
911
|
+
onAddComment: U,
|
|
719
912
|
onDeleteComment: b,
|
|
720
913
|
showComments: u
|
|
721
|
-
} =
|
|
914
|
+
} = n, [v, T] = P("all"), [y, j] = P("all"), C = S(he), R = S(fe), d = S(Se), [m, f] = P(() => d.getUnit(e)), w = S(Y), p = Z(w.activeCommentId$), s = Z(d.commentUpdate$), _ = S(te), A = Z(t), D = ee(!0), E = "panel", L = Z(R.currentUser$), q = X(() => {
|
|
722
915
|
var H;
|
|
723
|
-
const
|
|
724
|
-
var
|
|
725
|
-
return {
|
|
916
|
+
const a = v === "all" ? m : (H = m.filter(($) => $.subUnitId === A)) != null ? H : [], g = x != null ? x : (($) => $), M = a.map(($) => {
|
|
917
|
+
var B;
|
|
918
|
+
return { ...$.root, children: (B = $.children) != null ? B : [], users: $.relativeUsers };
|
|
726
919
|
});
|
|
727
920
|
if (u) {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
}), [...u, ""].map((
|
|
921
|
+
const $ = /* @__PURE__ */ new Map();
|
|
922
|
+
return M.forEach((B) => {
|
|
923
|
+
$.set(B.id, B);
|
|
924
|
+
}), [...u, ""].map((B) => $.get(B)).filter(Boolean);
|
|
732
925
|
} else
|
|
733
|
-
return
|
|
734
|
-
}, [u, v, m,
|
|
735
|
-
...
|
|
736
|
-
...
|
|
737
|
-
], [
|
|
738
|
-
|
|
926
|
+
return g(M);
|
|
927
|
+
}, [u, v, m, x, A]), O = X(() => [
|
|
928
|
+
...q.filter((a) => !a.resolved),
|
|
929
|
+
...q.filter((a) => a.resolved)
|
|
930
|
+
], [q]), ne = X(() => y === "resolved" ? O.filter((a) => a.resolved) : y === "unsolved" ? O.filter((a) => !a.resolved) : y === "concern_me" && L != null && L.userID ? O.filter((a) => a == null ? void 0 : a.users.has(L.userID)) : O, [O, L == null ? void 0 : L.userID, y]), J = V ? [V, ...ne] : ne, re = J.filter((a) => !a.resolved), ie = J.filter((a) => a.resolved), oe = y !== "all" || v !== "all", se = () => {
|
|
931
|
+
j("all"), T("all");
|
|
739
932
|
};
|
|
740
|
-
|
|
741
|
-
e &&
|
|
742
|
-
|
|
933
|
+
ae(() => {
|
|
934
|
+
e && f(
|
|
935
|
+
d.getUnit(e)
|
|
743
936
|
);
|
|
744
|
-
}, [e,
|
|
745
|
-
var
|
|
746
|
-
if (!
|
|
937
|
+
}, [e, d, s]), ae(() => {
|
|
938
|
+
var $;
|
|
939
|
+
if (!p)
|
|
747
940
|
return;
|
|
748
|
-
if (!
|
|
749
|
-
|
|
941
|
+
if (!D.current) {
|
|
942
|
+
D.current = !0;
|
|
750
943
|
return;
|
|
751
944
|
}
|
|
752
|
-
const { unitId:
|
|
753
|
-
(
|
|
754
|
-
}, [
|
|
755
|
-
const
|
|
756
|
-
|
|
945
|
+
const { unitId: a, subUnitId: g, commentId: M } = p, H = `${E}-${a}-${g}-${M}`;
|
|
946
|
+
($ = document.getElementById(H)) == null || $.scrollIntoView({ block: "center" });
|
|
947
|
+
}, [p]);
|
|
948
|
+
const Q = (a) => /* @__PURE__ */ l(
|
|
949
|
+
jt,
|
|
757
950
|
{
|
|
758
951
|
full: !0,
|
|
759
|
-
prefix:
|
|
952
|
+
prefix: E,
|
|
760
953
|
getSubUnitName: o,
|
|
761
|
-
id:
|
|
762
|
-
unitId:
|
|
763
|
-
subUnitId:
|
|
764
|
-
refStr:
|
|
765
|
-
type:
|
|
766
|
-
showEdit: (
|
|
767
|
-
showHighlight: (
|
|
954
|
+
id: a.id,
|
|
955
|
+
unitId: a.unitId,
|
|
956
|
+
subUnitId: a.subUnitId,
|
|
957
|
+
refStr: a.ref,
|
|
958
|
+
type: r,
|
|
959
|
+
showEdit: (p == null ? void 0 : p.commentId) === a.id,
|
|
960
|
+
showHighlight: (p == null ? void 0 : p.commentId) === a.id,
|
|
768
961
|
onClick: () => {
|
|
769
|
-
|
|
770
|
-
|
|
962
|
+
D.current = !1, a.resolved ? _.executeCommand(F.id) : _.executeCommand(
|
|
963
|
+
F.id,
|
|
771
964
|
{
|
|
772
|
-
unitId:
|
|
773
|
-
subUnitId:
|
|
774
|
-
commentId:
|
|
965
|
+
unitId: a.unitId,
|
|
966
|
+
subUnitId: a.subUnitId,
|
|
967
|
+
commentId: a.id,
|
|
775
968
|
temp: !1
|
|
776
969
|
}
|
|
777
970
|
);
|
|
778
971
|
},
|
|
779
|
-
onMouseEnter: () => N == null ? void 0 : N(
|
|
780
|
-
onMouseLeave: () => h == null ? void 0 : h(
|
|
781
|
-
onAddComment:
|
|
972
|
+
onMouseEnter: () => N == null ? void 0 : N(a),
|
|
973
|
+
onMouseLeave: () => h == null ? void 0 : h(a),
|
|
974
|
+
onAddComment: U,
|
|
782
975
|
onDeleteComment: b,
|
|
783
|
-
onResolve: (
|
|
976
|
+
onResolve: (g) => c == null ? void 0 : c(a.id, g)
|
|
784
977
|
},
|
|
785
|
-
|
|
978
|
+
a.id
|
|
786
979
|
);
|
|
787
|
-
return /* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
|
|
790
|
-
|
|
980
|
+
return /* @__PURE__ */ I("div", { className: "univer-flex univer-min-h-full univer-flex-col univer-pb-3", children: [
|
|
981
|
+
/* @__PURE__ */ I("div", { className: "univer-mt-3 univer-flex univer-flex-row univer-justify-between", children: [
|
|
982
|
+
r === de.UNIVER_SHEET ? /* @__PURE__ */ l(
|
|
983
|
+
ge,
|
|
791
984
|
{
|
|
792
985
|
borderless: !0,
|
|
793
986
|
value: v,
|
|
@@ -801,11 +994,11 @@ const Le = B((t, e) => {
|
|
|
801
994
|
label: C.t("threadCommentUI.filter.sheet.all")
|
|
802
995
|
}
|
|
803
996
|
],
|
|
804
|
-
onChange:
|
|
997
|
+
onChange: T
|
|
805
998
|
}
|
|
806
999
|
) : null,
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
|
|
1000
|
+
/* @__PURE__ */ l(
|
|
1001
|
+
ge,
|
|
809
1002
|
{
|
|
810
1003
|
borderless: !0,
|
|
811
1004
|
value: y,
|
|
@@ -827,35 +1020,35 @@ const Le = B((t, e) => {
|
|
|
827
1020
|
label: C.t("threadCommentUI.filter.status.concernMe")
|
|
828
1021
|
}
|
|
829
1022
|
],
|
|
830
|
-
onChange:
|
|
1023
|
+
onChange: j
|
|
831
1024
|
}
|
|
832
1025
|
)
|
|
833
1026
|
] }),
|
|
834
|
-
|
|
1027
|
+
J.length === 0 ? /* @__PURE__ */ I(
|
|
835
1028
|
"div",
|
|
836
1029
|
{
|
|
837
1030
|
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",
|
|
838
1031
|
children: [
|
|
839
1032
|
C.t("threadCommentUI.panel.empty"),
|
|
840
|
-
|
|
841
|
-
/* @__PURE__ */
|
|
1033
|
+
oe ? /* @__PURE__ */ l("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ l(le, { onClick: se, children: C.t("threadCommentUI.panel.reset") }) }) : k ? null : /* @__PURE__ */ l("div", { className: "univer-mt-2 univer-flex univer-flex-row", children: /* @__PURE__ */ I(le, { onClick: i, children: [
|
|
1034
|
+
/* @__PURE__ */ l(Te, { className: "univer-mr-1.5" }),
|
|
842
1035
|
C.t("threadCommentUI.panel.addComment")
|
|
843
1036
|
] }) })
|
|
844
1037
|
]
|
|
845
1038
|
}
|
|
846
|
-
) : /* @__PURE__ */
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1039
|
+
) : /* @__PURE__ */ I("div", { className: "univer-mt-3 univer-flex univer-flex-col univer-gap-3", children: [
|
|
1040
|
+
re.map(Q),
|
|
1041
|
+
ie.length > 0 && /* @__PURE__ */ l("div", { className: "univer-text-xs", children: C.t("threadCommentUI.panel.solved") }),
|
|
1042
|
+
ie.map(Q)
|
|
850
1043
|
] })
|
|
851
1044
|
] });
|
|
852
1045
|
};
|
|
853
1046
|
export {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1047
|
+
F as SetActiveCommentOperation,
|
|
1048
|
+
gt as THREAD_COMMENT_PANEL,
|
|
1049
|
+
Yt as ThreadCommentPanel,
|
|
1050
|
+
Y as ThreadCommentPanelService,
|
|
1051
|
+
jt as ThreadCommentTree,
|
|
1052
|
+
xt as ToggleSheetCommentPanelOperation,
|
|
860
1053
|
ce as UniverThreadCommentUIPlugin
|
|
861
1054
|
};
|