@univerjs/thread-comment-ui 0.5.0 → 0.5.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/cjs/index.js +4 -4
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/es/index.js +466 -460
- package/lib/es/locale/fr-FR.js +36 -0
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/umd/index.js +4 -4
- package/lib/umd/locale/fr-FR.js +1 -0
- package/package.json +16 -14
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var B = (t, e,
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { UniverThreadCommentPlugin as
|
|
6
|
-
import { ISidebarService as
|
|
7
|
-
import { BehaviorSubject as
|
|
8
|
-
import
|
|
9
|
-
import { Mentions as
|
|
10
|
-
import { DocSelectionManagerService as
|
|
11
|
-
import { DocSelectionRenderService as
|
|
12
|
-
import { IRenderManagerService as
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
(d = t[s]) && (
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
let
|
|
19
|
-
constructor(e,
|
|
1
|
+
var We = Object.defineProperty;
|
|
2
|
+
var ze = (t, e, n) => e in t ? We(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => ze(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Inject as je, Disposable as qe, UniverInstanceType as he, IUniverInstanceService as Ze, CommandType as Ne, DependentOn as Je, Injector as Ge, Plugin as Ke, mergeOverrideWithDependencies as Ye, ICommandService as ie, IConfigService as Qe, CustomRangeType as Xe, useDependency as _, IMentionIOService as et, LocaleService as pe, UserManagerService as ge, generateRandomId as tt } from "@univerjs/core";
|
|
5
|
+
import { UniverThreadCommentPlugin as nt, ThreadCommentModel as Te, getDT as rt, AddCommentCommand as it, UpdateCommentCommand as ot, ResolveCommentCommand as st, DeleteCommentTreeCommand as Ee, DeleteCommentCommand as at } from "@univerjs/thread-comment";
|
|
6
|
+
import { ISidebarService as Oe, useObservable as F } from "@univerjs/ui";
|
|
7
|
+
import { BehaviorSubject as Ie, filter as lt, debounceTime as dt } from "rxjs";
|
|
8
|
+
import mt, { forwardRef as k, useRef as re, createElement as z, useState as A, useImperativeHandle as ct, useMemo as de, useEffect as fe } from "react";
|
|
9
|
+
import { Mentions as ut, Mention as ht, Button as me, Tooltip as vt, Dropdown as Ct, Menu as ft, MenuItem as xe, Select as be } from "@univerjs/design";
|
|
10
|
+
import { DocSelectionManagerService as pt } from "@univerjs/docs";
|
|
11
|
+
import { DocSelectionRenderService as gt } from "@univerjs/docs-ui";
|
|
12
|
+
import { IRenderManagerService as It } from "@univerjs/engine-render";
|
|
13
|
+
var xt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, _t = (t, e, n, r) => {
|
|
14
|
+
for (var i = r > 1 ? void 0 : r ? bt(e, n) : e, s = t.length - 1, d; s >= 0; s--)
|
|
15
|
+
(d = t[s]) && (i = (r ? d(e, n, i) : d(i)) || i);
|
|
16
|
+
return r && i && xt(e, n, i), i;
|
|
17
|
+
}, _e = (t, e) => (n, r) => e(n, r, t);
|
|
18
|
+
let J = class extends qe {
|
|
19
|
+
constructor(e, n) {
|
|
20
20
|
super();
|
|
21
21
|
B(this, "_panelVisible", !1);
|
|
22
|
-
B(this, "_panelVisible$", new
|
|
22
|
+
B(this, "_panelVisible$", new Ie(!1));
|
|
23
23
|
B(this, "_activeCommentId");
|
|
24
|
-
B(this, "_activeCommentId$", new
|
|
24
|
+
B(this, "_activeCommentId$", new Ie(void 0));
|
|
25
25
|
B(this, "panelVisible$", this._panelVisible$.asObservable());
|
|
26
26
|
B(this, "activeCommentId$", this._activeCommentId$.asObservable());
|
|
27
|
-
this._sidebarService = e, this._univerInstanceService =
|
|
27
|
+
this._sidebarService = e, this._univerInstanceService = n, this._init(), this.disposeWithMe(() => {
|
|
28
28
|
this._activeCommentId$.complete(), this._panelVisible$.complete();
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -34,7 +34,7 @@ let q = class extends ze {
|
|
|
34
34
|
e.visible || this.setPanelVisible(!1);
|
|
35
35
|
})
|
|
36
36
|
), this.disposeWithMe(
|
|
37
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(he.UNIVER_SHEET).pipe(
|
|
37
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(he.UNIVER_SHEET).pipe(lt((e) => !e)).subscribe(() => {
|
|
38
38
|
this._sidebarService.close();
|
|
39
39
|
})
|
|
40
40
|
);
|
|
@@ -52,59 +52,59 @@ let q = class extends ze {
|
|
|
52
52
|
this._activeCommentId = e, this._activeCommentId$.next(e);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
],
|
|
59
|
-
const St = "thread-comment-panel",
|
|
55
|
+
J = _t([
|
|
56
|
+
_e(0, je(Oe)),
|
|
57
|
+
_e(1, Ze)
|
|
58
|
+
], J);
|
|
59
|
+
const St = "thread-comment-panel", yt = "UNIVER_THREAD_COMMENT_UI_PLUGIN", jt = {
|
|
60
60
|
id: "thread-comment-ui.operation.toggle-panel",
|
|
61
|
-
type:
|
|
61
|
+
type: Ne.OPERATION,
|
|
62
62
|
handler(t) {
|
|
63
|
-
const e = t.get(
|
|
64
|
-
return
|
|
63
|
+
const e = t.get(Oe), n = t.get(J);
|
|
64
|
+
return n.panelVisible ? (e.close(), n.setPanelVisible(!1)) : (e.open({
|
|
65
65
|
header: { title: "threadCommentUI.panel.title" },
|
|
66
66
|
children: { label: St },
|
|
67
67
|
width: 330
|
|
68
|
-
}),
|
|
68
|
+
}), n.setPanelVisible(!0)), !0;
|
|
69
69
|
}
|
|
70
70
|
}, W = {
|
|
71
71
|
id: "thread-comment-ui.operation.set-active-comment",
|
|
72
|
-
type:
|
|
72
|
+
type: Ne.OPERATION,
|
|
73
73
|
handler(t, e) {
|
|
74
|
-
return t.get(
|
|
74
|
+
return t.get(J).setActiveComment(e), !0;
|
|
75
75
|
}
|
|
76
|
-
},
|
|
77
|
-
var
|
|
78
|
-
for (var
|
|
79
|
-
(d = t[s]) && (
|
|
80
|
-
return
|
|
81
|
-
}, ve = (t, e) => (
|
|
82
|
-
let
|
|
83
|
-
constructor(t =
|
|
84
|
-
super(), this._config = t, this._injector = e, this._commandService =
|
|
85
|
-
const { menu:
|
|
86
|
-
|
|
76
|
+
}, Nt = "thread-comment-ui.config", Tt = {};
|
|
77
|
+
var Ue = Object.defineProperty, Et = Object.getOwnPropertyDescriptor, Ot = (t, e, n) => e in t ? Ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ut = (t, e, n, r) => {
|
|
78
|
+
for (var i = r > 1 ? void 0 : r ? Et(e, n) : e, s = t.length - 1, d; s >= 0; s--)
|
|
79
|
+
(d = t[s]) && (i = (r ? d(e, n, i) : d(i)) || i);
|
|
80
|
+
return r && i && Ue(e, n, i), i;
|
|
81
|
+
}, ve = (t, e) => (n, r) => e(n, r, t), Pe = (t, e, n) => Ot(t, typeof e != "symbol" ? e + "" : e, n);
|
|
82
|
+
let ce = class extends Ke {
|
|
83
|
+
constructor(t = Tt, e, n, r) {
|
|
84
|
+
super(), this._config = t, this._injector = e, this._commandService = n, this._configService = r;
|
|
85
|
+
const { menu: i, ...s } = this._config;
|
|
86
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Nt, s);
|
|
87
87
|
}
|
|
88
88
|
onStarting() {
|
|
89
89
|
var t;
|
|
90
90
|
Ye([
|
|
91
|
-
[
|
|
91
|
+
[J]
|
|
92
92
|
], (t = this._config) == null ? void 0 : t.overrides).forEach((e) => {
|
|
93
93
|
this._injector.add(e);
|
|
94
|
-
}), [
|
|
94
|
+
}), [jt, W].forEach((e) => {
|
|
95
95
|
this._commandService.registerCommand(e);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ve(1,
|
|
104
|
-
ve(2,
|
|
105
|
-
ve(3,
|
|
106
|
-
],
|
|
107
|
-
var
|
|
99
|
+
Pe(ce, "pluginName", yt);
|
|
100
|
+
Pe(ce, "type", he.UNIVER_UNKNOWN);
|
|
101
|
+
ce = Ut([
|
|
102
|
+
Je(nt),
|
|
103
|
+
ve(1, je(Ge)),
|
|
104
|
+
ve(2, ie),
|
|
105
|
+
ve(3, Qe)
|
|
106
|
+
], ce);
|
|
107
|
+
var Ce = { exports: {} }, te = {};
|
|
108
108
|
/**
|
|
109
109
|
* @license React
|
|
110
110
|
* react-jsx-runtime.production.min.js
|
|
@@ -114,190 +114,196 @@ var Ue = { exports: {} }, ue = {};
|
|
|
114
114
|
* This source code is licensed under the MIT license found in the
|
|
115
115
|
* LICENSE file in the root directory of this source tree.
|
|
116
116
|
*/
|
|
117
|
-
var
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
var Se;
|
|
118
|
+
function Pt() {
|
|
119
|
+
if (Se) return te;
|
|
120
|
+
Se = 1;
|
|
121
|
+
var t = mt, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
122
|
+
function d(u, m, y) {
|
|
123
|
+
var h, v = {}, C = null, b = null;
|
|
124
|
+
y !== void 0 && (C = "" + y), m.key !== void 0 && (C = "" + m.key), m.ref !== void 0 && (b = m.ref);
|
|
125
|
+
for (h in m) r.call(m, h) && !s.hasOwnProperty(h) && (v[h] = m[h]);
|
|
126
|
+
if (u && u.defaultProps) for (h in m = u.defaultProps, m) v[h] === void 0 && (v[h] = m[h]);
|
|
127
|
+
return { $$typeof: e, type: u, key: C, ref: b, props: v, _owner: i.current };
|
|
128
|
+
}
|
|
129
|
+
return te.Fragment = n, te.jsx = d, te.jsxs = d, te;
|
|
130
|
+
}
|
|
131
|
+
var ye;
|
|
132
|
+
function Rt() {
|
|
133
|
+
return ye || (ye = 1, Ce.exports = Pt()), Ce.exports;
|
|
124
134
|
}
|
|
125
|
-
|
|
126
|
-
ue.jsx = Ee;
|
|
127
|
-
ue.jsxs = Ee;
|
|
128
|
-
Ue.exports = ue;
|
|
129
|
-
var i = Ue.exports, U = function() {
|
|
135
|
+
var o = Rt(), U = function() {
|
|
130
136
|
return U = Object.assign || function(t) {
|
|
131
|
-
for (var e,
|
|
132
|
-
e = arguments[
|
|
133
|
-
for (var
|
|
137
|
+
for (var e, n = 1, r = arguments.length; n < r; n++) {
|
|
138
|
+
e = arguments[n];
|
|
139
|
+
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
|
|
134
140
|
}
|
|
135
141
|
return t;
|
|
136
142
|
}, U.apply(this, arguments);
|
|
137
|
-
},
|
|
138
|
-
var
|
|
139
|
-
for (var
|
|
143
|
+
}, Mt = function(t, e) {
|
|
144
|
+
var n = {};
|
|
145
|
+
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
140
146
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
141
|
-
for (var
|
|
142
|
-
e.indexOf(
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
var
|
|
146
|
-
return
|
|
147
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
|
|
148
|
+
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
|
|
149
|
+
return n;
|
|
150
|
+
}, q = k(function(t, e) {
|
|
151
|
+
var n = t.icon, r = t.id, i = t.className, s = t.extend, d = Mt(t, ["icon", "id", "className", "extend"]), u = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), m = re("_".concat(Ht()));
|
|
152
|
+
return Re(n, "".concat(r), { defIds: n.defIds, idSuffix: m.current }, U({ ref: e, className: u }, d), s);
|
|
147
153
|
});
|
|
148
|
-
function
|
|
149
|
-
return z(t.tag, U(U({ key: e },
|
|
150
|
-
return
|
|
154
|
+
function Re(t, e, n, r, i) {
|
|
155
|
+
return z(t.tag, U(U({ key: e }, $t(t, n, i)), r), (wt(t, n).children || []).map(function(s, d) {
|
|
156
|
+
return Re(s, "".concat(e, "-").concat(t.tag, "-").concat(d), n, void 0, i);
|
|
151
157
|
}));
|
|
152
158
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
var
|
|
157
|
-
return !
|
|
158
|
-
var d = s[0],
|
|
159
|
-
typeof
|
|
160
|
-
})),
|
|
159
|
+
function $t(t, e, n) {
|
|
160
|
+
var r = U({}, t.attrs);
|
|
161
|
+
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
|
|
162
|
+
var i = e.defIds;
|
|
163
|
+
return !i || i.length === 0 || (t.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(s) {
|
|
164
|
+
var d = s[0], u = s[1];
|
|
165
|
+
typeof u == "string" && (r[d] = u.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
166
|
+
})), r;
|
|
161
167
|
}
|
|
162
|
-
function
|
|
163
|
-
var
|
|
164
|
-
return !
|
|
165
|
-
return typeof
|
|
168
|
+
function wt(t, e) {
|
|
169
|
+
var n, r = e.defIds;
|
|
170
|
+
return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? U(U({}, t), { children: t.children.map(function(i) {
|
|
171
|
+
return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? U(U({}, i), { attrs: U(U({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
|
|
166
172
|
}) }) : t;
|
|
167
173
|
}
|
|
168
|
-
function
|
|
174
|
+
function Ht() {
|
|
169
175
|
return Math.random().toString(36).substring(2, 8);
|
|
170
176
|
}
|
|
171
|
-
|
|
172
|
-
var
|
|
173
|
-
return z(
|
|
177
|
+
q.displayName = "UniverIcon";
|
|
178
|
+
var Dt = { 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" } }] }, Me = k(function(t, e) {
|
|
179
|
+
return z(q, Object.assign({}, t, {
|
|
174
180
|
id: "delete-single",
|
|
175
181
|
ref: e,
|
|
176
|
-
icon:
|
|
182
|
+
icon: Dt
|
|
177
183
|
}));
|
|
178
184
|
});
|
|
179
185
|
Me.displayName = "DeleteSingle";
|
|
180
|
-
var
|
|
181
|
-
return z(
|
|
186
|
+
var At = { 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" } }] }, $e = k(function(t, e) {
|
|
187
|
+
return z(q, Object.assign({}, t, {
|
|
182
188
|
id: "increase-single",
|
|
183
189
|
ref: e,
|
|
184
|
-
icon:
|
|
190
|
+
icon: At
|
|
185
191
|
}));
|
|
186
192
|
});
|
|
187
193
|
$e.displayName = "IncreaseSingle";
|
|
188
|
-
var
|
|
189
|
-
return z(
|
|
194
|
+
var kt = { 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" } }] }, we = k(function(t, e) {
|
|
195
|
+
return z(q, Object.assign({}, t, {
|
|
190
196
|
id: "more-horizontal-single",
|
|
191
197
|
ref: e,
|
|
192
|
-
icon:
|
|
198
|
+
icon: kt
|
|
193
199
|
}));
|
|
194
200
|
});
|
|
195
201
|
we.displayName = "MoreHorizontalSingle";
|
|
196
|
-
var
|
|
197
|
-
return z(
|
|
202
|
+
var Lt = { 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 } }] }, He = k(function(t, e) {
|
|
203
|
+
return z(q, Object.assign({}, t, {
|
|
198
204
|
id: "reply-to-comment-single",
|
|
199
205
|
ref: e,
|
|
200
|
-
icon:
|
|
206
|
+
icon: Lt
|
|
201
207
|
}));
|
|
202
208
|
});
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
return z(
|
|
209
|
+
He.displayName = "ReplyToCommentSingle";
|
|
210
|
+
var Vt = { 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" } }] }, De = k(function(t, e) {
|
|
211
|
+
return z(q, Object.assign({}, t, {
|
|
206
212
|
id: "resolved-single",
|
|
207
213
|
ref: e,
|
|
208
|
-
icon:
|
|
214
|
+
icon: Vt
|
|
209
215
|
}));
|
|
210
216
|
});
|
|
211
|
-
|
|
212
|
-
var
|
|
213
|
-
return z(
|
|
217
|
+
De.displayName = "ResolvedSingle";
|
|
218
|
+
var Bt = { 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 } }] }, Ae = k(function(t, e) {
|
|
219
|
+
return z(q, Object.assign({}, t, {
|
|
214
220
|
id: "solve-single",
|
|
215
221
|
ref: e,
|
|
216
|
-
icon:
|
|
222
|
+
icon: Bt
|
|
217
223
|
}));
|
|
218
224
|
});
|
|
219
|
-
|
|
225
|
+
Ae.displayName = "SolveSingle";
|
|
220
226
|
function ke(t) {
|
|
221
|
-
var e,
|
|
222
|
-
if (typeof t == "string" || typeof t == "number")
|
|
227
|
+
var e, n, r = "";
|
|
228
|
+
if (typeof t == "string" || typeof t == "number") r += t;
|
|
223
229
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
224
|
-
var
|
|
225
|
-
for (e = 0; e <
|
|
226
|
-
} else for (
|
|
227
|
-
return
|
|
230
|
+
var i = t.length;
|
|
231
|
+
for (e = 0; e < i; e++) t[e] && (n = ke(t[e])) && (r && (r += " "), r += n);
|
|
232
|
+
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
233
|
+
return r;
|
|
228
234
|
}
|
|
229
|
-
function
|
|
230
|
-
for (var t, e,
|
|
231
|
-
return
|
|
235
|
+
function Ft() {
|
|
236
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = ke(t)) && (r && (r += " "), r += e);
|
|
237
|
+
return r;
|
|
232
238
|
}
|
|
233
|
-
const
|
|
234
|
-
threadCommentEditorButtons:
|
|
235
|
-
threadCommentEditorSuggestion:
|
|
236
|
-
threadCommentEditorSuggestionActive:
|
|
237
|
-
threadCommentEditorSuggestionIcon:
|
|
239
|
+
const Wt = "univer-thread-comment-editor-buttons", zt = "univer-thread-comment-editor-suggestion", qt = "univer-thread-comment-editor-suggestionActive", Zt = "univer-thread-comment-editor-suggestion-icon", ue = {
|
|
240
|
+
threadCommentEditorButtons: Wt,
|
|
241
|
+
threadCommentEditorSuggestion: zt,
|
|
242
|
+
threadCommentEditorSuggestionActive: qt,
|
|
243
|
+
threadCommentEditorSuggestionIcon: Zt
|
|
238
244
|
}, Jt = (t) => {
|
|
239
245
|
const e = /@\[(.*?)\]\((.*?)\)|(\w+)/g;
|
|
240
|
-
let
|
|
241
|
-
const
|
|
242
|
-
for (; (
|
|
243
|
-
|
|
246
|
+
let n, r = 0;
|
|
247
|
+
const i = [];
|
|
248
|
+
for (; (n = e.exec(t)) !== null; )
|
|
249
|
+
n.index > r && i.push({
|
|
244
250
|
type: "text",
|
|
245
|
-
content: t.substring(
|
|
246
|
-
}),
|
|
251
|
+
content: t.substring(r, n.index)
|
|
252
|
+
}), n[1] && n[2] ? i.push({
|
|
247
253
|
type: "mention",
|
|
248
254
|
content: {
|
|
249
|
-
label:
|
|
250
|
-
id:
|
|
255
|
+
label: n[1],
|
|
256
|
+
id: n[2]
|
|
251
257
|
}
|
|
252
|
-
}) :
|
|
258
|
+
}) : n[3] && i.push({
|
|
253
259
|
type: "text",
|
|
254
|
-
content:
|
|
255
|
-
}),
|
|
256
|
-
return
|
|
260
|
+
content: n[3]
|
|
261
|
+
}), r = e.lastIndex;
|
|
262
|
+
return r < t.length && i.push({
|
|
257
263
|
type: "text",
|
|
258
|
-
content: t.substring(
|
|
259
|
-
}),
|
|
260
|
-
},
|
|
264
|
+
content: t.substring(r)
|
|
265
|
+
}), i;
|
|
266
|
+
}, Gt = (t) => t.map((e) => {
|
|
261
267
|
switch (e.type) {
|
|
262
268
|
case "mention":
|
|
263
269
|
return `@[${e.content.label}](${e.content.id})`;
|
|
264
270
|
default:
|
|
265
271
|
return e.content;
|
|
266
272
|
}
|
|
267
|
-
}).join(""),
|
|
268
|
-
const { dataStream: e, customRanges:
|
|
273
|
+
}).join(""), Le = (t) => {
|
|
274
|
+
const { dataStream: e, customRanges: n } = t, r = e.length - 2, i = [];
|
|
269
275
|
let s = 0;
|
|
270
|
-
return
|
|
271
|
-
s < d.startIndex &&
|
|
276
|
+
return n == null || n.forEach((d) => {
|
|
277
|
+
s < d.startIndex && i.push({
|
|
272
278
|
type: "text",
|
|
273
279
|
content: e.slice(s, d.startIndex)
|
|
274
|
-
}),
|
|
280
|
+
}), i.push({
|
|
275
281
|
type: "mention",
|
|
276
282
|
content: {
|
|
277
283
|
label: e.slice(d.startIndex, d.endIndex).slice(1, -1),
|
|
278
284
|
id: d.rangeId
|
|
279
285
|
}
|
|
280
286
|
}), s = d.endIndex;
|
|
281
|
-
}),
|
|
287
|
+
}), i.push({
|
|
282
288
|
type: "text",
|
|
283
|
-
content: e.slice(s,
|
|
284
|
-
}),
|
|
285
|
-
},
|
|
289
|
+
content: e.slice(s, r)
|
|
290
|
+
}), i;
|
|
291
|
+
}, Ve = (t) => {
|
|
286
292
|
let e = "";
|
|
287
|
-
const
|
|
288
|
-
return t.forEach((
|
|
289
|
-
switch (
|
|
293
|
+
const n = [];
|
|
294
|
+
return t.forEach((r) => {
|
|
295
|
+
switch (r.type) {
|
|
290
296
|
case "text":
|
|
291
|
-
e +=
|
|
297
|
+
e += r.content;
|
|
292
298
|
break;
|
|
293
299
|
case "mention": {
|
|
294
|
-
const
|
|
295
|
-
e += `${
|
|
300
|
+
const i = e.length;
|
|
301
|
+
e += `${r.content.label}`;
|
|
296
302
|
const s = e.length;
|
|
297
|
-
|
|
298
|
-
rangeId:
|
|
299
|
-
rangeType:
|
|
300
|
-
startIndex:
|
|
303
|
+
n.push({
|
|
304
|
+
rangeId: r.content.id,
|
|
305
|
+
rangeType: Xe.MENTION,
|
|
306
|
+
startIndex: i,
|
|
301
307
|
endIndex: s,
|
|
302
308
|
properties: {}
|
|
303
309
|
});
|
|
@@ -319,406 +325,406 @@ const Gt = "univer-thread-comment-editor-buttons", qt = "univer-thread-comment-e
|
|
|
319
325
|
}
|
|
320
326
|
],
|
|
321
327
|
dataStream: e,
|
|
322
|
-
customRanges:
|
|
328
|
+
customRanges: n
|
|
323
329
|
};
|
|
324
|
-
},
|
|
325
|
-
var d,
|
|
330
|
+
}, Kt = (t, e, n, r, i) => {
|
|
331
|
+
var d, u;
|
|
326
332
|
const s = (d = t.raw) == null ? void 0 : d.icon;
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
s ? /* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ o.jsxs("div", { className: ue.threadCommentEditorSuggestion, children: [
|
|
334
|
+
s ? /* @__PURE__ */ o.jsx("img", { className: ue.threadCommentEditorSuggestionIcon, src: s }) : null,
|
|
335
|
+
/* @__PURE__ */ o.jsx("div", { children: (u = t.display) != null ? u : t.id })
|
|
330
336
|
] });
|
|
331
|
-
},
|
|
332
|
-
var
|
|
333
|
-
const { comment:
|
|
334
|
-
|
|
335
|
-
reply(
|
|
336
|
-
var
|
|
337
|
-
|
|
338
|
-
...
|
|
339
|
-
text:
|
|
337
|
+
}, Be = k((t, e) => {
|
|
338
|
+
var w;
|
|
339
|
+
const { comment: n, onSave: r, id: i, onCancel: s, autoFocus: d, unitId: u } = t, m = _(et), y = _(ie), h = _(pe), [v, C] = A({ ...n }), [b, f] = A(!1), I = re(null), P = _(pt), N = (w = _(It).getCurrentTypeOfRenderer(he.UNIVER_DOC)) == null ? void 0 : w.with(gt);
|
|
340
|
+
ct(e, () => ({
|
|
341
|
+
reply(c) {
|
|
342
|
+
var x;
|
|
343
|
+
C({
|
|
344
|
+
...n,
|
|
345
|
+
text: c,
|
|
340
346
|
attachments: []
|
|
341
|
-
}), (
|
|
347
|
+
}), (x = I.current) == null || x.inputElement.focus();
|
|
342
348
|
}
|
|
343
349
|
}));
|
|
344
|
-
const
|
|
345
|
-
var
|
|
346
|
-
|
|
347
|
-
...
|
|
348
|
-
text:
|
|
349
|
-
}),
|
|
350
|
+
const g = () => {
|
|
351
|
+
var c;
|
|
352
|
+
v.text && (r == null || r({
|
|
353
|
+
...v,
|
|
354
|
+
text: v.text
|
|
355
|
+
}), f(!1), C({ text: void 0 }), (c = I.current) == null || c.inputElement.blur());
|
|
350
356
|
};
|
|
351
|
-
return /* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
357
|
+
return /* @__PURE__ */ o.jsxs("div", { className: ue.threadCommentEditor, onClick: (c) => c.preventDefault(), children: [
|
|
358
|
+
/* @__PURE__ */ o.jsx(
|
|
359
|
+
ut,
|
|
354
360
|
{
|
|
355
|
-
ref:
|
|
361
|
+
ref: I,
|
|
356
362
|
autoFocus: d,
|
|
357
363
|
style: { width: "100%" },
|
|
358
|
-
placeholder:
|
|
359
|
-
value:
|
|
360
|
-
onChange: (
|
|
361
|
-
|
|
364
|
+
placeholder: h.t("threadCommentUI.editor.placeholder"),
|
|
365
|
+
value: v != null && v.text ? Gt(Le(v.text)) : "",
|
|
366
|
+
onChange: (c) => {
|
|
367
|
+
c.target.value || C({ ...n, text: void 0 }), C == null || C({ ...n, text: Ve(Jt(c.target.value)) });
|
|
362
368
|
},
|
|
363
369
|
onFocus: () => {
|
|
364
|
-
const
|
|
365
|
-
|
|
370
|
+
const c = P.getActiveTextRange();
|
|
371
|
+
c && c.collapsed && (N == null || N.removeAllRanges()), N == null || N.blur(), f(!0);
|
|
366
372
|
},
|
|
367
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ o.jsx(
|
|
368
374
|
ht,
|
|
369
375
|
{
|
|
370
376
|
trigger: "@",
|
|
371
|
-
data: (
|
|
372
|
-
(
|
|
373
|
-
(
|
|
374
|
-
id:
|
|
375
|
-
display:
|
|
376
|
-
raw:
|
|
377
|
+
data: (c, x) => m.list({ search: c, unitId: u }).then((l) => l.list.map(
|
|
378
|
+
(R) => R.mentions.map(
|
|
379
|
+
(S) => ({
|
|
380
|
+
id: S.objectId,
|
|
381
|
+
display: S.label,
|
|
382
|
+
raw: S
|
|
377
383
|
})
|
|
378
384
|
)
|
|
379
|
-
).flat()).then(
|
|
380
|
-
displayTransform: (
|
|
381
|
-
renderSuggestion:
|
|
385
|
+
).flat()).then(x),
|
|
386
|
+
displayTransform: (c, x) => `@${x} `,
|
|
387
|
+
renderSuggestion: Kt
|
|
382
388
|
},
|
|
383
389
|
"@"
|
|
384
390
|
)
|
|
385
391
|
}
|
|
386
392
|
),
|
|
387
|
-
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
393
|
+
b ? /* @__PURE__ */ o.jsxs("div", { className: ue.threadCommentEditorButtons, children: [
|
|
394
|
+
/* @__PURE__ */ o.jsx(
|
|
395
|
+
me,
|
|
390
396
|
{
|
|
391
397
|
style: { marginRight: 12 },
|
|
392
398
|
onClick: () => {
|
|
393
|
-
s == null || s(),
|
|
399
|
+
s == null || s(), f(!1), C({ text: void 0 }), y.executeCommand(W.id);
|
|
394
400
|
},
|
|
395
|
-
children:
|
|
401
|
+
children: h.t("threadCommentUI.editor.cancel")
|
|
396
402
|
}
|
|
397
403
|
),
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
|
|
404
|
+
/* @__PURE__ */ o.jsx(
|
|
405
|
+
me,
|
|
400
406
|
{
|
|
401
407
|
type: "primary",
|
|
402
|
-
disabled: !
|
|
403
|
-
onClick:
|
|
404
|
-
children:
|
|
408
|
+
disabled: !v.text,
|
|
409
|
+
onClick: g,
|
|
410
|
+
children: h.t(i ? "threadCommentUI.editor.save" : "threadCommentUI.editor.reply")
|
|
405
411
|
}
|
|
406
412
|
)
|
|
407
413
|
] }) : null
|
|
408
414
|
] });
|
|
409
|
-
}),
|
|
410
|
-
threadComment:
|
|
411
|
-
threadCommentActive:
|
|
412
|
-
threadCommentContent:
|
|
413
|
-
threadCommentHighlight:
|
|
414
|
-
threadCommentIconContainer:
|
|
415
|
-
threadCommentIcon:
|
|
416
|
-
threadCommentTitle:
|
|
417
|
-
threadCommentTitlePosition:
|
|
418
|
-
threadCommentTitleHighlight:
|
|
419
|
-
threadCommentTitlePositionText:
|
|
420
|
-
threadCommentUsername:
|
|
421
|
-
threadCommentItem:
|
|
422
|
-
threadCommentItemHead:
|
|
423
|
-
threadCommentItemTitle:
|
|
424
|
-
threadCommentItemTitlePosition:
|
|
425
|
-
threadCommentItemTitleHighlight:
|
|
426
|
-
threadCommentItemTime:
|
|
427
|
-
threadCommentItemContent:
|
|
428
|
-
threadCommentItemAt:
|
|
429
|
-
},
|
|
430
|
-
const { item: e, unitId:
|
|
431
|
-
(
|
|
432
|
-
|
|
415
|
+
}), Yt = "univer-thread-comment", Qt = "univer-thread-comment-active", Xt = "univer-thread-comment-content", en = "univer-thread-comment-highlight", tn = "univer-thread-comment-icon-container", nn = "univer-thread-comment-icon", rn = "univer-thread-comment-title", on = "univer-thread-comment-title-position", sn = "univer-thread-comment-title-highlight", an = "univer-thread-comment-title-position-text", ln = "univer-thread-comment-username", dn = "univer-thread-comment-item", mn = "univer-thread-comment-item-head", cn = "univer-thread-comment-item-title", un = "univer-thread-comment-item-title-position", hn = "univer-thread-comment-item-title-highlight", vn = "univer-thread-comment-item-time", Cn = "univer-thread-comment-item-content", fn = "univer-thread-comment-item-at", p = {
|
|
416
|
+
threadComment: Yt,
|
|
417
|
+
threadCommentActive: Qt,
|
|
418
|
+
threadCommentContent: Xt,
|
|
419
|
+
threadCommentHighlight: en,
|
|
420
|
+
threadCommentIconContainer: tn,
|
|
421
|
+
threadCommentIcon: nn,
|
|
422
|
+
threadCommentTitle: rn,
|
|
423
|
+
threadCommentTitlePosition: on,
|
|
424
|
+
threadCommentTitleHighlight: sn,
|
|
425
|
+
threadCommentTitlePositionText: an,
|
|
426
|
+
threadCommentUsername: ln,
|
|
427
|
+
threadCommentItem: dn,
|
|
428
|
+
threadCommentItemHead: mn,
|
|
429
|
+
threadCommentItemTitle: cn,
|
|
430
|
+
threadCommentItemTitlePosition: un,
|
|
431
|
+
threadCommentItemTitleHighlight: hn,
|
|
432
|
+
threadCommentItemTime: vn,
|
|
433
|
+
threadCommentItemContent: Cn,
|
|
434
|
+
threadCommentItemAt: fn
|
|
435
|
+
}, Fe = "__mock__", pn = (t) => {
|
|
436
|
+
const { item: e, unitId: n, subUnitId: r, editing: i, onEditingChange: s, onReply: d, resolved: u, isRoot: m, onClose: y, onDeleteComment: h } = t, v = _(ie), C = _(pe), b = _(ge), f = b.getUser(e.personId), I = F(b.currentUser$), P = (I == null ? void 0 : I.userID) === e.personId, j = e.id === Fe, [N, g] = A(!1), w = () => {
|
|
437
|
+
(h == null ? void 0 : h(e)) !== !1 && (v.executeCommand(
|
|
438
|
+
m ? Ee.id : at.id,
|
|
433
439
|
{
|
|
434
|
-
unitId:
|
|
435
|
-
subUnitId:
|
|
440
|
+
unitId: n,
|
|
441
|
+
subUnitId: r,
|
|
436
442
|
commentId: e.id
|
|
437
443
|
}
|
|
438
|
-
),
|
|
444
|
+
), m && (y == null || y()));
|
|
439
445
|
};
|
|
440
|
-
return /* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
446
|
-
P && !
|
|
447
|
-
|
|
446
|
+
return /* @__PURE__ */ o.jsxs("div", { className: p.threadCommentItem, onMouseLeave: () => g(!1), onMouseEnter: () => g(!0), children: [
|
|
447
|
+
/* @__PURE__ */ o.jsx("img", { className: p.threadCommentItemHead, src: f == null ? void 0 : f.avatar }),
|
|
448
|
+
/* @__PURE__ */ o.jsxs("div", { className: p.threadCommentItemTitle, children: [
|
|
449
|
+
/* @__PURE__ */ o.jsx("div", { className: p.threadCommentUsername, children: (f == null ? void 0 : f.name) || " " }),
|
|
450
|
+
/* @__PURE__ */ o.jsxs("div", { children: [
|
|
451
|
+
j || u ? null : N ? /* @__PURE__ */ o.jsx("div", { className: p.threadCommentIcon, onClick: () => d(f), children: /* @__PURE__ */ o.jsx(He, {}) }) : null,
|
|
452
|
+
P && !j && !u ? /* @__PURE__ */ o.jsx(
|
|
453
|
+
Ct,
|
|
448
454
|
{
|
|
449
|
-
overlay: /* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
455
|
+
overlay: /* @__PURE__ */ o.jsxs(ft, { children: [
|
|
456
|
+
/* @__PURE__ */ o.jsx(xe, { onClick: () => s == null ? void 0 : s(!0), children: C.t("threadCommentUI.item.edit") }, "edit"),
|
|
457
|
+
/* @__PURE__ */ o.jsx(xe, { onClick: w, children: C.t("threadCommentUI.item.delete") }, "delete")
|
|
452
458
|
] }),
|
|
453
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ o.jsx("div", { className: p.threadCommentIcon, children: /* @__PURE__ */ o.jsx(we, {}) })
|
|
454
460
|
}
|
|
455
461
|
) : null
|
|
456
462
|
] })
|
|
457
463
|
] }),
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
|
|
460
|
-
|
|
464
|
+
/* @__PURE__ */ o.jsx("div", { className: p.threadCommentItemTime, children: e.dT }),
|
|
465
|
+
i ? /* @__PURE__ */ o.jsx(
|
|
466
|
+
Be,
|
|
461
467
|
{
|
|
462
468
|
id: e.id,
|
|
463
469
|
comment: e,
|
|
464
470
|
onCancel: () => s == null ? void 0 : s(!1),
|
|
465
471
|
autoFocus: !0,
|
|
466
|
-
unitId:
|
|
467
|
-
subUnitId:
|
|
468
|
-
onSave: ({ text:
|
|
469
|
-
s == null || s(!1),
|
|
472
|
+
unitId: n,
|
|
473
|
+
subUnitId: r,
|
|
474
|
+
onSave: ({ text: c, attachments: x }) => {
|
|
475
|
+
s == null || s(!1), v.executeCommand(
|
|
470
476
|
ot.id,
|
|
471
477
|
{
|
|
472
|
-
unitId:
|
|
473
|
-
subUnitId:
|
|
478
|
+
unitId: n,
|
|
479
|
+
subUnitId: r,
|
|
474
480
|
payload: {
|
|
475
481
|
commentId: e.id,
|
|
476
|
-
text:
|
|
477
|
-
attachments:
|
|
482
|
+
text: c,
|
|
483
|
+
attachments: x
|
|
478
484
|
}
|
|
479
485
|
}
|
|
480
486
|
);
|
|
481
487
|
}
|
|
482
488
|
}
|
|
483
|
-
) : /* @__PURE__ */
|
|
484
|
-
switch (
|
|
489
|
+
) : /* @__PURE__ */ o.jsx("div", { className: p.threadCommentItemContent, children: Le(e.text).map((c, x) => {
|
|
490
|
+
switch (c.type) {
|
|
485
491
|
case "mention":
|
|
486
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ o.jsxs("a", { className: p.threadCommentItemAt, children: [
|
|
487
493
|
"@",
|
|
488
|
-
|
|
494
|
+
c.content.label,
|
|
489
495
|
" "
|
|
490
|
-
] },
|
|
496
|
+
] }, x);
|
|
491
497
|
default:
|
|
492
|
-
return
|
|
498
|
+
return c.content;
|
|
493
499
|
}
|
|
494
500
|
}) })
|
|
495
501
|
] });
|
|
496
|
-
},
|
|
497
|
-
var
|
|
502
|
+
}, gn = (t) => {
|
|
503
|
+
var se, Q, X;
|
|
498
504
|
const {
|
|
499
505
|
id: e,
|
|
500
|
-
unitId:
|
|
501
|
-
subUnitId:
|
|
502
|
-
refStr:
|
|
506
|
+
unitId: n,
|
|
507
|
+
subUnitId: r,
|
|
508
|
+
refStr: i,
|
|
503
509
|
showEdit: s = !0,
|
|
504
510
|
onClick: d,
|
|
505
|
-
showHighlight:
|
|
506
|
-
onClose:
|
|
507
|
-
getSubUnitName:
|
|
508
|
-
prefix:
|
|
509
|
-
autoFocus:
|
|
510
|
-
onMouseEnter:
|
|
511
|
-
onMouseLeave:
|
|
512
|
-
onAddComment:
|
|
513
|
-
onDeleteComment:
|
|
511
|
+
showHighlight: u,
|
|
512
|
+
onClose: m,
|
|
513
|
+
getSubUnitName: y,
|
|
514
|
+
prefix: h,
|
|
515
|
+
autoFocus: v,
|
|
516
|
+
onMouseEnter: C,
|
|
517
|
+
onMouseLeave: b,
|
|
518
|
+
onAddComment: f,
|
|
519
|
+
onDeleteComment: I,
|
|
514
520
|
onResolve: P
|
|
515
|
-
} = t,
|
|
516
|
-
F(
|
|
517
|
-
const l = e ?
|
|
521
|
+
} = t, j = _(Te), [N, g] = A(!1), [w, c] = A(""), x = de(() => j.commentUpdate$.pipe(dt(16)), [j]);
|
|
522
|
+
F(x);
|
|
523
|
+
const l = e ? j.getCommentWithChildren(n, r, e) : null, R = _(ie), S = _(ge), M = l == null ? void 0 : l.root.resolved, O = F(S.currentUser$), G = re(null), K = [
|
|
518
524
|
...l ? [l.root] : (
|
|
519
525
|
// mock empty comment
|
|
520
526
|
[{
|
|
521
|
-
id:
|
|
527
|
+
id: Fe,
|
|
522
528
|
text: {
|
|
523
529
|
dataStream: `
|
|
524
530
|
\r`
|
|
525
531
|
},
|
|
526
|
-
personId: (
|
|
527
|
-
ref:
|
|
532
|
+
personId: (se = O == null ? void 0 : O.userID) != null ? se : "",
|
|
533
|
+
ref: i != null ? i : "",
|
|
528
534
|
dT: "",
|
|
529
|
-
unitId:
|
|
530
|
-
subUnitId:
|
|
535
|
+
unitId: n,
|
|
536
|
+
subUnitId: r,
|
|
531
537
|
threadId: ""
|
|
532
538
|
}]
|
|
533
539
|
),
|
|
534
540
|
...(Q = l == null ? void 0 : l.children) != null ? Q : []
|
|
535
|
-
], L =
|
|
536
|
-
|
|
537
|
-
unitId:
|
|
538
|
-
subUnitId:
|
|
541
|
+
], L = re(null), H = (T) => {
|
|
542
|
+
T.stopPropagation(), M ? R.executeCommand(W.id, {
|
|
543
|
+
unitId: n,
|
|
544
|
+
subUnitId: r,
|
|
539
545
|
commentId: e
|
|
540
|
-
}) :
|
|
541
|
-
unitId:
|
|
542
|
-
subUnitId:
|
|
546
|
+
}) : R.executeCommand(W.id), R.executeCommand(st.id, {
|
|
547
|
+
unitId: n,
|
|
548
|
+
subUnitId: r,
|
|
543
549
|
commentId: e,
|
|
544
|
-
resolved:
|
|
545
|
-
}), P == null || P(
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
|
|
550
|
+
resolved: !M
|
|
551
|
+
}), P == null || P(!M);
|
|
552
|
+
}, Y = (T) => {
|
|
553
|
+
T.stopPropagation(), R.executeCommand(W.id), !(l != null && l.root && (I == null ? void 0 : I(l.root)) === !1) && (R.executeCommand(
|
|
554
|
+
Ee.id,
|
|
549
555
|
{
|
|
550
|
-
unitId:
|
|
551
|
-
subUnitId:
|
|
556
|
+
unitId: n,
|
|
557
|
+
subUnitId: r,
|
|
552
558
|
commentId: e
|
|
553
559
|
}
|
|
554
|
-
),
|
|
560
|
+
), m == null || m());
|
|
555
561
|
};
|
|
556
|
-
|
|
557
|
-
const D =
|
|
558
|
-
return /* @__PURE__ */
|
|
562
|
+
fe(() => b == null ? void 0 : b(), []);
|
|
563
|
+
const D = y((X = l == null ? void 0 : l.root.subUnitId) != null ? X : r), oe = s && !w && !M, Z = `${i || (l == null ? void 0 : l.root.ref) || ""}${D ? " · " : ""}${D}`;
|
|
564
|
+
return /* @__PURE__ */ o.jsxs(
|
|
559
565
|
"div",
|
|
560
566
|
{
|
|
561
|
-
className:
|
|
562
|
-
[
|
|
567
|
+
className: Ft(p.threadComment, {
|
|
568
|
+
[p.threadCommentActive]: !M && (u || N || h === "cell")
|
|
563
569
|
}),
|
|
564
570
|
onClick: d,
|
|
565
|
-
id: `${
|
|
571
|
+
id: `${h}-${n}-${r}-${e}`,
|
|
566
572
|
onMouseEnter: () => {
|
|
567
|
-
|
|
573
|
+
C == null || C(), g(!0);
|
|
568
574
|
},
|
|
569
575
|
onMouseLeave: () => {
|
|
570
|
-
|
|
576
|
+
b == null || b(), g(!1);
|
|
571
577
|
},
|
|
572
578
|
children: [
|
|
573
|
-
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
579
|
+
!M && u ? /* @__PURE__ */ o.jsx("div", { className: p.threadCommentHighlight }) : null,
|
|
580
|
+
/* @__PURE__ */ o.jsxs("div", { className: p.threadCommentTitle, children: [
|
|
581
|
+
/* @__PURE__ */ o.jsxs("div", { className: p.threadCommentTitlePosition, children: [
|
|
582
|
+
/* @__PURE__ */ o.jsx("div", { className: p.threadCommentTitleHighlight }),
|
|
583
|
+
/* @__PURE__ */ o.jsx(vt, { showIfEllipsis: !0, title: Z, children: /* @__PURE__ */ o.jsx("div", { className: p.threadCommentTitlePositionText, children: Z }) })
|
|
578
584
|
] }),
|
|
579
|
-
l ? /* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
585
|
+
l ? /* @__PURE__ */ o.jsxs("div", { className: p.threadCommentIconContainer, children: [
|
|
586
|
+
/* @__PURE__ */ o.jsx(
|
|
581
587
|
"div",
|
|
582
588
|
{
|
|
583
589
|
onClick: H,
|
|
584
|
-
className:
|
|
585
|
-
style: { color:
|
|
586
|
-
children:
|
|
590
|
+
className: p.threadCommentIcon,
|
|
591
|
+
style: { color: M ? "rgb(var(--green-500))" : "" },
|
|
592
|
+
children: M ? /* @__PURE__ */ o.jsx(De, {}) : /* @__PURE__ */ o.jsx(Ae, {})
|
|
587
593
|
}
|
|
588
594
|
),
|
|
589
|
-
(O == null ? void 0 : O.userID) === l.root.personId ? /* @__PURE__ */
|
|
595
|
+
(O == null ? void 0 : O.userID) === l.root.personId ? /* @__PURE__ */ o.jsx("div", { className: p.threadCommentIcon, onClick: Y, children: /* @__PURE__ */ o.jsx(Me, {}) }) : null
|
|
590
596
|
] }) : null
|
|
591
597
|
] }),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
(
|
|
594
|
-
|
|
598
|
+
/* @__PURE__ */ o.jsx("div", { className: p.threadCommentContent, ref: L, children: K.map(
|
|
599
|
+
(T) => /* @__PURE__ */ o.jsx(
|
|
600
|
+
pn,
|
|
595
601
|
{
|
|
596
|
-
onClose:
|
|
597
|
-
unitId:
|
|
598
|
-
subUnitId:
|
|
599
|
-
item:
|
|
600
|
-
isRoot:
|
|
601
|
-
editing:
|
|
602
|
+
onClose: m,
|
|
603
|
+
unitId: n,
|
|
604
|
+
subUnitId: r,
|
|
605
|
+
item: T,
|
|
606
|
+
isRoot: T.id === (l == null ? void 0 : l.root.id),
|
|
607
|
+
editing: w === T.id,
|
|
602
608
|
resolved: l == null ? void 0 : l.root.resolved,
|
|
603
|
-
onEditingChange: (
|
|
604
|
-
|
|
609
|
+
onEditingChange: ($) => {
|
|
610
|
+
c($ ? T.id : "");
|
|
605
611
|
},
|
|
606
|
-
onReply: (
|
|
607
|
-
|
|
612
|
+
onReply: ($) => {
|
|
613
|
+
$ && requestAnimationFrame(() => {
|
|
608
614
|
var a;
|
|
609
|
-
(a =
|
|
615
|
+
(a = G.current) == null || a.reply(Ve([{
|
|
610
616
|
type: "mention",
|
|
611
617
|
content: {
|
|
612
|
-
id:
|
|
613
|
-
label:
|
|
618
|
+
id: $.userID,
|
|
619
|
+
label: $.name
|
|
614
620
|
}
|
|
615
621
|
}]));
|
|
616
622
|
});
|
|
617
623
|
},
|
|
618
|
-
onAddComment:
|
|
619
|
-
onDeleteComment:
|
|
624
|
+
onAddComment: f,
|
|
625
|
+
onDeleteComment: I
|
|
620
626
|
},
|
|
621
|
-
|
|
627
|
+
T.id
|
|
622
628
|
)
|
|
623
629
|
) }),
|
|
624
|
-
oe ? /* @__PURE__ */
|
|
625
|
-
|
|
630
|
+
oe ? /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(
|
|
631
|
+
Be,
|
|
626
632
|
{
|
|
627
|
-
ref:
|
|
628
|
-
unitId:
|
|
629
|
-
subUnitId:
|
|
630
|
-
onSave: async ({ text:
|
|
633
|
+
ref: G,
|
|
634
|
+
unitId: n,
|
|
635
|
+
subUnitId: r,
|
|
636
|
+
onSave: async ({ text: T, attachments: $ }) => {
|
|
631
637
|
const a = {
|
|
632
|
-
text:
|
|
633
|
-
attachments:
|
|
634
|
-
dT:
|
|
635
|
-
id:
|
|
636
|
-
ref:
|
|
638
|
+
text: T,
|
|
639
|
+
attachments: $,
|
|
640
|
+
dT: rt(),
|
|
641
|
+
id: tt(),
|
|
642
|
+
ref: i,
|
|
637
643
|
personId: O == null ? void 0 : O.userID,
|
|
638
644
|
parentId: l == null ? void 0 : l.root.id,
|
|
639
|
-
unitId:
|
|
640
|
-
subUnitId:
|
|
645
|
+
unitId: n,
|
|
646
|
+
subUnitId: r,
|
|
641
647
|
threadId: l == null ? void 0 : l.root.threadId
|
|
642
648
|
};
|
|
643
|
-
(
|
|
644
|
-
|
|
649
|
+
(f == null ? void 0 : f(a)) !== !1 && (await R.executeCommand(
|
|
650
|
+
it.id,
|
|
645
651
|
{
|
|
646
|
-
unitId:
|
|
647
|
-
subUnitId:
|
|
652
|
+
unitId: n,
|
|
653
|
+
subUnitId: r,
|
|
648
654
|
comment: a
|
|
649
655
|
}
|
|
650
656
|
), L.current && (L.current.scrollTop = L.current.scrollHeight));
|
|
651
657
|
},
|
|
652
|
-
autoFocus:
|
|
658
|
+
autoFocus: v || !l,
|
|
653
659
|
onCancel: () => {
|
|
654
|
-
l ||
|
|
660
|
+
l || m == null || m();
|
|
655
661
|
}
|
|
656
662
|
},
|
|
657
|
-
`${
|
|
663
|
+
`${v}`
|
|
658
664
|
) }) : null
|
|
659
665
|
]
|
|
660
666
|
}
|
|
661
667
|
);
|
|
662
|
-
},
|
|
663
|
-
threadCommentPanel:
|
|
664
|
-
threadComment:
|
|
665
|
-
threadCommentPanelForms:
|
|
666
|
-
select:
|
|
667
|
-
threadCommentPanelEmpty:
|
|
668
|
-
threadCommentPanelAdd:
|
|
669
|
-
threadCommentPanelSolved:
|
|
670
|
-
},
|
|
668
|
+
}, In = "univer-thread-comment-panel", xn = "univer-thread-comment", bn = "univer-thread-comment-panel-forms", _n = "univer-select", Sn = "univer-thread-comment-panel-empty", yn = "univer-thread-comment-panel-add", jn = "univer-thread-comment-panel-solved", ne = {
|
|
669
|
+
threadCommentPanel: In,
|
|
670
|
+
threadComment: xn,
|
|
671
|
+
threadCommentPanelForms: bn,
|
|
672
|
+
select: _n,
|
|
673
|
+
threadCommentPanelEmpty: Sn,
|
|
674
|
+
threadCommentPanelAdd: yn,
|
|
675
|
+
threadCommentPanelSolved: jn
|
|
676
|
+
}, Hn = (t) => {
|
|
671
677
|
const {
|
|
672
678
|
unitId: e,
|
|
673
|
-
subUnitId$:
|
|
674
|
-
type:
|
|
675
|
-
onAdd:
|
|
679
|
+
subUnitId$: n,
|
|
680
|
+
type: r,
|
|
681
|
+
onAdd: i,
|
|
676
682
|
getSubUnitName: s,
|
|
677
683
|
onResolve: d,
|
|
678
|
-
sortComments:
|
|
679
|
-
onItemLeave:
|
|
680
|
-
onItemEnter:
|
|
681
|
-
disableAdd:
|
|
682
|
-
tempComment:
|
|
683
|
-
onAddComment:
|
|
684
|
-
onDeleteComment:
|
|
685
|
-
showComments:
|
|
686
|
-
} = t, [
|
|
687
|
-
var
|
|
688
|
-
const a =
|
|
684
|
+
sortComments: u,
|
|
685
|
+
onItemLeave: m,
|
|
686
|
+
onItemEnter: y,
|
|
687
|
+
disableAdd: h,
|
|
688
|
+
tempComment: v,
|
|
689
|
+
onAddComment: C,
|
|
690
|
+
onDeleteComment: b,
|
|
691
|
+
showComments: f
|
|
692
|
+
} = t, [I, P] = A("all"), [j, N] = A("all"), g = _(pe), w = _(ge), c = _(Te), [x, l] = A(() => c.getUnit(e)), R = _(J), S = F(R.activeCommentId$), M = F(c.commentUpdate$), O = _(ie), G = F(n), K = re(!0), L = "panel", H = F(w.currentUser$), Y = de(() => {
|
|
693
|
+
var le;
|
|
694
|
+
const a = I === "all" ? x : (le = x.filter((E) => E.subUnitId === G)) != null ? le : [], ee = u != null ? u : (E) => E, ae = a.map((E) => {
|
|
689
695
|
var V;
|
|
690
|
-
return { ...
|
|
696
|
+
return { ...E.root, children: (V = E.children) != null ? V : [], users: E.relativeUsers };
|
|
691
697
|
});
|
|
692
|
-
if (
|
|
693
|
-
const
|
|
694
|
-
return
|
|
695
|
-
|
|
696
|
-
}), [...
|
|
698
|
+
if (f) {
|
|
699
|
+
const E = /* @__PURE__ */ new Map();
|
|
700
|
+
return ae.forEach((V) => {
|
|
701
|
+
E.set(V.id, V);
|
|
702
|
+
}), [...f, ""].map((V) => E.get(V)).filter(Boolean);
|
|
697
703
|
} else
|
|
698
|
-
return ee(
|
|
699
|
-
}, [
|
|
700
|
-
...
|
|
701
|
-
...
|
|
702
|
-
], [
|
|
703
|
-
|
|
704
|
+
return ee(ae);
|
|
705
|
+
}, [f, I, x, u, G]), D = de(() => [
|
|
706
|
+
...Y.filter((a) => !a.resolved),
|
|
707
|
+
...Y.filter((a) => a.resolved)
|
|
708
|
+
], [Y]), oe = de(() => j === "resolved" ? D.filter((a) => a.resolved) : j === "unsolved" ? D.filter((a) => !a.resolved) : j === "concern_me" && H != null && H.userID ? D.filter((a) => a == null ? void 0 : a.users.has(H.userID)) : D, [D, H == null ? void 0 : H.userID, j]), Z = v ? [v, ...oe] : oe, se = Z.filter((a) => !a.resolved), Q = Z.filter((a) => a.resolved), X = j !== "all" || I !== "all", T = () => {
|
|
709
|
+
N("all"), P("all");
|
|
704
710
|
};
|
|
705
|
-
|
|
711
|
+
fe(() => {
|
|
706
712
|
e && l(
|
|
707
|
-
|
|
713
|
+
c.getUnit(e)
|
|
708
714
|
);
|
|
709
|
-
}, [e,
|
|
710
|
-
var
|
|
711
|
-
if (!
|
|
715
|
+
}, [e, c, M]), fe(() => {
|
|
716
|
+
var E;
|
|
717
|
+
if (!S)
|
|
712
718
|
return;
|
|
713
|
-
if (!
|
|
714
|
-
|
|
719
|
+
if (!K.current) {
|
|
720
|
+
K.current = !0;
|
|
715
721
|
return;
|
|
716
722
|
}
|
|
717
|
-
const { unitId: a, subUnitId: ee, commentId:
|
|
718
|
-
(
|
|
719
|
-
}, [
|
|
720
|
-
const
|
|
721
|
-
|
|
723
|
+
const { unitId: a, subUnitId: ee, commentId: ae } = S, le = `${L}-${a}-${ee}-${ae}`;
|
|
724
|
+
(E = document.getElementById(le)) == null || E.scrollIntoView({ block: "center" });
|
|
725
|
+
}, [S]);
|
|
726
|
+
const $ = (a) => /* @__PURE__ */ o.jsx(
|
|
727
|
+
gn,
|
|
722
728
|
{
|
|
723
729
|
prefix: L,
|
|
724
730
|
getSubUnitName: s,
|
|
@@ -726,11 +732,11 @@ const Gt = "univer-thread-comment-editor-buttons", qt = "univer-thread-comment-e
|
|
|
726
732
|
unitId: a.unitId,
|
|
727
733
|
subUnitId: a.subUnitId,
|
|
728
734
|
refStr: a.ref,
|
|
729
|
-
type:
|
|
730
|
-
showEdit: (
|
|
731
|
-
showHighlight: (
|
|
735
|
+
type: r,
|
|
736
|
+
showEdit: (S == null ? void 0 : S.commentId) === a.id,
|
|
737
|
+
showHighlight: (S == null ? void 0 : S.commentId) === a.id,
|
|
732
738
|
onClick: () => {
|
|
733
|
-
|
|
739
|
+
K.current = !1, a.resolved ? O.executeCommand(W.id) : O.executeCommand(
|
|
734
740
|
W.id,
|
|
735
741
|
{
|
|
736
742
|
unitId: a.unitId,
|
|
@@ -740,84 +746,84 @@ const Gt = "univer-thread-comment-editor-buttons", qt = "univer-thread-comment-e
|
|
|
740
746
|
}
|
|
741
747
|
);
|
|
742
748
|
},
|
|
743
|
-
onMouseEnter: () =>
|
|
744
|
-
onMouseLeave: () =>
|
|
745
|
-
onAddComment:
|
|
746
|
-
onDeleteComment:
|
|
749
|
+
onMouseEnter: () => y == null ? void 0 : y(a),
|
|
750
|
+
onMouseLeave: () => m == null ? void 0 : m(a),
|
|
751
|
+
onAddComment: C,
|
|
752
|
+
onDeleteComment: b,
|
|
747
753
|
onResolve: (ee) => d == null ? void 0 : d(a.id, ee)
|
|
748
754
|
},
|
|
749
755
|
a.id
|
|
750
756
|
);
|
|
751
|
-
return /* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
|
|
754
|
-
|
|
757
|
+
return /* @__PURE__ */ o.jsxs("div", { className: ne.threadCommentPanel, children: [
|
|
758
|
+
/* @__PURE__ */ o.jsxs("div", { className: ne.threadCommentPanelForms, children: [
|
|
759
|
+
r === he.UNIVER_SHEET ? /* @__PURE__ */ o.jsx(
|
|
760
|
+
be,
|
|
755
761
|
{
|
|
756
762
|
borderless: !0,
|
|
757
|
-
value:
|
|
763
|
+
value: I,
|
|
758
764
|
onChange: (a) => P(a),
|
|
759
765
|
options: [
|
|
760
766
|
{
|
|
761
767
|
value: "current",
|
|
762
|
-
label:
|
|
768
|
+
label: g.t("threadCommentUI.filter.sheet.current")
|
|
763
769
|
},
|
|
764
770
|
{
|
|
765
771
|
value: "all",
|
|
766
|
-
label:
|
|
772
|
+
label: g.t("threadCommentUI.filter.sheet.all")
|
|
767
773
|
}
|
|
768
774
|
]
|
|
769
775
|
}
|
|
770
776
|
) : null,
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
|
|
777
|
+
/* @__PURE__ */ o.jsx(
|
|
778
|
+
be,
|
|
773
779
|
{
|
|
774
780
|
borderless: !0,
|
|
775
|
-
value:
|
|
776
|
-
onChange: (a) =>
|
|
781
|
+
value: j,
|
|
782
|
+
onChange: (a) => N(a),
|
|
777
783
|
options: [
|
|
778
784
|
{
|
|
779
785
|
value: "all",
|
|
780
|
-
label:
|
|
786
|
+
label: g.t("threadCommentUI.filter.status.all")
|
|
781
787
|
},
|
|
782
788
|
{
|
|
783
789
|
value: "resolved",
|
|
784
|
-
label:
|
|
790
|
+
label: g.t("threadCommentUI.filter.status.resolved")
|
|
785
791
|
},
|
|
786
792
|
{
|
|
787
793
|
value: "unsolved",
|
|
788
|
-
label:
|
|
794
|
+
label: g.t("threadCommentUI.filter.status.unsolved")
|
|
789
795
|
},
|
|
790
796
|
{
|
|
791
797
|
value: "concern_me",
|
|
792
|
-
label:
|
|
798
|
+
label: g.t("threadCommentUI.filter.status.concernMe")
|
|
793
799
|
}
|
|
794
800
|
]
|
|
795
801
|
}
|
|
796
802
|
)
|
|
797
803
|
] }),
|
|
798
|
-
|
|
799
|
-
Q.length ? /* @__PURE__ */
|
|
800
|
-
Q.map(
|
|
801
|
-
|
|
802
|
-
X ?
|
|
803
|
-
X ? /* @__PURE__ */
|
|
804
|
-
|
|
804
|
+
se.map($),
|
|
805
|
+
Q.length ? /* @__PURE__ */ o.jsx("div", { className: ne.threadCommentPanelSolved, children: "已解决" }) : null,
|
|
806
|
+
Q.map($),
|
|
807
|
+
Z.length ? null : /* @__PURE__ */ o.jsxs("div", { className: ne.threadCommentPanelEmpty, children: [
|
|
808
|
+
X ? g.t("threadCommentUI.panel.filterEmpty") : g.t("threadCommentUI.panel.empty"),
|
|
809
|
+
X ? /* @__PURE__ */ o.jsx(
|
|
810
|
+
me,
|
|
805
811
|
{
|
|
806
|
-
onClick:
|
|
812
|
+
onClick: T,
|
|
807
813
|
type: "link",
|
|
808
|
-
children:
|
|
814
|
+
children: g.t("threadCommentUI.panel.reset")
|
|
809
815
|
}
|
|
810
|
-
) : /* @__PURE__ */
|
|
811
|
-
|
|
816
|
+
) : /* @__PURE__ */ o.jsxs(
|
|
817
|
+
me,
|
|
812
818
|
{
|
|
813
819
|
id: "thread-comment-add",
|
|
814
|
-
className:
|
|
820
|
+
className: ne.threadCommentPanelAdd,
|
|
815
821
|
type: "primary",
|
|
816
|
-
onClick:
|
|
817
|
-
disabled:
|
|
822
|
+
onClick: i,
|
|
823
|
+
disabled: h,
|
|
818
824
|
children: [
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
|
|
825
|
+
/* @__PURE__ */ o.jsx($e, {}),
|
|
826
|
+
g.t("threadCommentUI.panel.addComment")
|
|
821
827
|
]
|
|
822
828
|
}
|
|
823
829
|
)
|
|
@@ -827,9 +833,9 @@ const Gt = "univer-thread-comment-editor-buttons", qt = "univer-thread-comment-e
|
|
|
827
833
|
export {
|
|
828
834
|
W as SetActiveCommentOperation,
|
|
829
835
|
St as THREAD_COMMENT_PANEL,
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
836
|
+
Hn as ThreadCommentPanel,
|
|
837
|
+
J as ThreadCommentPanelService,
|
|
838
|
+
gn as ThreadCommentTree,
|
|
839
|
+
jt as ToggleSheetCommentPanelOperation,
|
|
840
|
+
ce as UniverThreadCommentUIPlugin
|
|
835
841
|
};
|