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