@univerjs/sheets-thread-comment-ui 0.4.2-nightly.202411071606 → 0.4.2-nightly.202411091134
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 +9 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +580 -563
- package/lib/{locale → es/locale}/en-US.js +2 -2
- package/lib/{locale → es/locale}/fa-IR.js +2 -2
- package/lib/{locale → es/locale}/ru-RU.js +2 -2
- package/lib/{locale → es/locale}/vi-VN.js +2 -2
- package/lib/{locale → es/locale}/zh-CN.js +2 -2
- package/lib/{locale → es/locale}/zh-TW.js +2 -2
- package/package.json +27 -21
package/lib/es/index.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
constructor(_canvasPopupManagerService, _zenZoneService) {
|
|
1
|
+
var Be = Object.defineProperty;
|
|
2
|
+
var Le = (o, e, r) => e in o ? Be(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r;
|
|
3
|
+
var E = (o, e, r) => Le(o, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { Inject as v, Disposable as $, DisposableCollection as He, CommandType as Fe, IUniverInstanceService as N, InterceptorEffectEnum as ke, UniverInstanceType as b, useDependency as O, Tools as We, ICommandService as se, Range as Ze, RANGE_TYPE as he, Rectangle as ze, DependentOn as Ge, Injector as Ye, Plugin as qe, IConfigService as Ke } from "@univerjs/core";
|
|
5
|
+
import { SheetsSelectionsService as ve, getSheetCommandTarget as Je, SheetInterceptorService as _e, INTERCEPTOR_POINT as Qe, WorkbookCommentPermission as K, WorksheetViewPermission as J, RangeProtectionPermissionViewPoint as Q, SetWorksheetActiveOperation as Xe, RemoveSheetCommand as et } from "@univerjs/sheets";
|
|
6
|
+
import { SheetsThreadCommentModel as x, UniverSheetsThreadCommentPlugin as tt } from "@univerjs/sheets-thread-comment";
|
|
7
|
+
import { ThreadCommentPanelService as ae, ThreadCommentTree as nt, ThreadCommentPanel as rt, ToggleSheetCommentPanelOperation as fe, THREAD_COMMENT_PANEL as ot, SetActiveCommentOperation as te, UniverThreadCommentUIPlugin as it } from "@univerjs/thread-comment-ui";
|
|
8
|
+
import { IThreadCommentMentionDataService as xn, UniverThreadCommentUIPlugin as Dn } from "@univerjs/thread-comment-ui";
|
|
9
|
+
import { SheetCanvasPopManagerService as st, IMarkSelectionService as Ce, whenSheetEditorFocused as at, getCurrentRangeDisable$ as Se, ISheetClipboardService as ct, COPY_TYPE as mt, HoverManagerService as dt, SheetPermissionInterceptorBaseController as ge, IEditorBridgeService as ht, SheetSkeletonManagerService as ut, ScrollToRangeOperation as lt } from "@univerjs/sheets-ui";
|
|
10
|
+
import { IZenZoneService as pt, useObservable as j, KeyCode as vt, MetaKeys as ue, MenuItemType as Ie, getMenuHiddenObservable as Pe, RibbonStartGroup as _t, ContextMenuPosition as ft, ContextMenuGroup as Ct, ComponentManager as St, IMenuManagerService as gt, IShortcutService as It } from "@univerjs/ui";
|
|
11
|
+
import { BehaviorSubject as Pt, debounceTime as ce, map as Tt } from "rxjs";
|
|
12
|
+
import { IRenderManagerService as Te } from "@univerjs/engine-render";
|
|
13
|
+
import bt, { forwardRef as be, useRef as Me, createElement as we, useMemo as Mt, useCallback as le, useEffect as wt } from "react";
|
|
14
|
+
import { singleReferenceToGrid as A, serializeRange as yt } from "@univerjs/engine-formula";
|
|
15
|
+
import { IThreadCommentDataSourceService as ye, DeleteCommentMutation as F, AddCommentMutation as ie, ThreadCommentModel as Et } from "@univerjs/thread-comment";
|
|
16
|
+
import { AddCommentCommand as An, DeleteCommentCommand as Vn, DeleteCommentTreeCommand as Bn, IThreadCommentDataSourceService as Ln, ResolveCommentCommand as Hn, UpdateCommentCommand as Fn } from "@univerjs/thread-comment";
|
|
17
|
+
const Ee = "univer.sheet.thread-comment-modal", me = "comment-single", Oe = "SHEET_THREAD_COMMENT";
|
|
18
|
+
var Ot = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, Ut = (o, e, r, t) => {
|
|
19
|
+
for (var n = t > 1 ? void 0 : t ? Rt(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
20
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
21
|
+
return t && n && Ot(e, r, n), n;
|
|
22
|
+
}, pe = (o, e) => (r, t) => e(r, t, o);
|
|
23
|
+
let R = class extends $ {
|
|
24
|
+
constructor(e, r) {
|
|
26
25
|
super();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this._canvasPopupManagerService =
|
|
26
|
+
E(this, "_lastPopup", null);
|
|
27
|
+
E(this, "_activePopup");
|
|
28
|
+
E(this, "_activePopup$", new Pt(null));
|
|
29
|
+
E(this, "activePopup$", this._activePopup$.asObservable());
|
|
30
|
+
this._canvasPopupManagerService = e, this._zenZoneService = r, this._initZenVisible(), this.disposeWithMe(() => {
|
|
32
31
|
this._activePopup$.complete();
|
|
33
32
|
});
|
|
34
33
|
}
|
|
@@ -36,28 +35,28 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
36
35
|
return this._activePopup;
|
|
37
36
|
}
|
|
38
37
|
_initZenVisible() {
|
|
39
|
-
this.disposeWithMe(this._zenZoneService.visible$.subscribe((
|
|
40
|
-
|
|
38
|
+
this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
|
|
39
|
+
e && this.hidePopup();
|
|
41
40
|
}));
|
|
42
41
|
}
|
|
43
|
-
showPopup(
|
|
44
|
-
var
|
|
45
|
-
const { row, col, unitId, subUnitId } =
|
|
46
|
-
if (this._activePopup &&
|
|
47
|
-
this._activePopup =
|
|
42
|
+
showPopup(e, r) {
|
|
43
|
+
var m;
|
|
44
|
+
const { row: t, col: n, unitId: i, subUnitId: s } = e;
|
|
45
|
+
if (this._activePopup && t === this._activePopup.row && n === this._activePopup.col && i === this._activePopup.unitId && s === ((m = this.activePopup) == null ? void 0 : m.subUnitId)) {
|
|
46
|
+
this._activePopup = e, this._activePopup$.next(e);
|
|
48
47
|
return;
|
|
49
48
|
}
|
|
50
49
|
if (this._lastPopup && this._lastPopup.dispose(), this._zenZoneService.visible)
|
|
51
50
|
return;
|
|
52
|
-
this._activePopup =
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
this._activePopup = e, this._activePopup$.next(e);
|
|
52
|
+
const a = this._canvasPopupManagerService.attachPopupToCell(
|
|
53
|
+
t,
|
|
54
|
+
n,
|
|
56
55
|
{
|
|
57
|
-
componentKey:
|
|
58
|
-
onClickOutside:
|
|
56
|
+
componentKey: Ee,
|
|
57
|
+
onClickOutside: () => {
|
|
59
58
|
this.hidePopup();
|
|
60
|
-
},
|
|
59
|
+
},
|
|
61
60
|
direction: "horizontal",
|
|
62
61
|
excludeOutside: [
|
|
63
62
|
...Array.from(document.querySelectorAll(".univer-thread-comment")),
|
|
@@ -65,14 +64,14 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
65
64
|
].filter(Boolean)
|
|
66
65
|
}
|
|
67
66
|
);
|
|
68
|
-
if (!
|
|
67
|
+
if (!a)
|
|
69
68
|
throw new Error("[SheetsThreadCommentPopupService]: cannot show popup!");
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
dispose:
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}), this._lastPopup =
|
|
69
|
+
const c = new He();
|
|
70
|
+
c.add(a), c.add({
|
|
71
|
+
dispose: () => {
|
|
72
|
+
r == null || r();
|
|
73
|
+
}
|
|
74
|
+
}), this._lastPopup = c;
|
|
76
75
|
}
|
|
77
76
|
hidePopup() {
|
|
78
77
|
this._activePopup && (this._lastPopup && this._lastPopup.dispose(), this._lastPopup = null, this._activePopup = null, this._activePopup$.next(null));
|
|
@@ -83,202 +82,221 @@ let SheetsThreadCommentPopupService = (_a = class extends Disposable {
|
|
|
83
82
|
temp: !1
|
|
84
83
|
}, this._activePopup$.next(this._activePopup));
|
|
85
84
|
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
],
|
|
91
|
-
const
|
|
92
|
-
type:
|
|
85
|
+
};
|
|
86
|
+
R = Ut([
|
|
87
|
+
pe(0, v(st)),
|
|
88
|
+
pe(1, pt)
|
|
89
|
+
], R);
|
|
90
|
+
const V = {
|
|
91
|
+
type: Fe.OPERATION,
|
|
93
92
|
id: "sheets.operation.show-comment-modal",
|
|
94
|
-
handler(
|
|
95
|
-
var
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
93
|
+
handler(o) {
|
|
94
|
+
var _;
|
|
95
|
+
const e = o.get(ve), r = o.get(N), t = o.get(R), n = o.get(ae), i = (_ = e.getCurrentLastSelection()) == null ? void 0 : _.primary, s = o.get(x);
|
|
96
|
+
if (!i)
|
|
98
97
|
return !1;
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
98
|
+
const a = Je(r);
|
|
99
|
+
if (!a)
|
|
101
100
|
return !1;
|
|
102
|
-
const { workbook, worksheet, unitId, subUnitId } =
|
|
103
|
-
workbook,
|
|
104
|
-
worksheet,
|
|
105
|
-
unitId,
|
|
106
|
-
subUnitId,
|
|
107
|
-
row:
|
|
108
|
-
col:
|
|
101
|
+
const { workbook: c, worksheet: m, unitId: h, subUnitId: d } = a, u = {
|
|
102
|
+
workbook: c,
|
|
103
|
+
worksheet: m,
|
|
104
|
+
unitId: h,
|
|
105
|
+
subUnitId: d,
|
|
106
|
+
row: i.startRow,
|
|
107
|
+
col: i.startColumn
|
|
109
108
|
};
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
unitId,
|
|
114
|
-
subUnitId,
|
|
115
|
-
commentId:
|
|
109
|
+
t.showPopup(u);
|
|
110
|
+
const p = s.getByLocation(h, d, i.startRow, i.startColumn);
|
|
111
|
+
return p && n.setActiveComment({
|
|
112
|
+
unitId: h,
|
|
113
|
+
subUnitId: d,
|
|
114
|
+
commentId: p,
|
|
116
115
|
trigger: "context-menu"
|
|
117
116
|
}), !0;
|
|
118
117
|
}
|
|
119
|
-
},
|
|
120
|
-
var
|
|
121
|
-
for (var
|
|
122
|
-
(
|
|
123
|
-
return
|
|
124
|
-
},
|
|
125
|
-
let
|
|
126
|
-
constructor(
|
|
127
|
-
super(), this._sheetInterceptorService =
|
|
118
|
+
}, $t = "sheets-thread-comment.config", Nt = {};
|
|
119
|
+
var xt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, jt = (o, e, r, t) => {
|
|
120
|
+
for (var n = t > 1 ? void 0 : t ? Dt(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
121
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
122
|
+
return t && n && xt(e, r, n), n;
|
|
123
|
+
}, B = (o, e) => (r, t) => e(r, t, o);
|
|
124
|
+
let k = class extends $ {
|
|
125
|
+
constructor(o, e, r, t) {
|
|
126
|
+
super(), this._sheetInterceptorService = o, this._sheetsThreadCommentModel = e, this._univerInstanceService = r, this._renderManagerService = t, this._initViewModelIntercept(), this._initSkeletonChange();
|
|
128
127
|
}
|
|
129
128
|
_initViewModelIntercept() {
|
|
130
129
|
this.disposeWithMe(
|
|
131
130
|
this._sheetInterceptorService.intercept(
|
|
132
|
-
|
|
131
|
+
Qe.CELL_CONTENT,
|
|
133
132
|
{
|
|
134
|
-
effect:
|
|
135
|
-
handler:
|
|
136
|
-
const { row, col, unitId, subUnitId } =
|
|
137
|
-
return this._sheetsThreadCommentModel.showCommentMarker(
|
|
138
|
-
...
|
|
133
|
+
effect: ke.Style,
|
|
134
|
+
handler: (o, e, r) => {
|
|
135
|
+
const { row: t, col: n, unitId: i, subUnitId: s } = e;
|
|
136
|
+
return this._sheetsThreadCommentModel.showCommentMarker(i, s, t, n) ? r({
|
|
137
|
+
...o,
|
|
139
138
|
markers: {
|
|
140
|
-
...
|
|
139
|
+
...o == null ? void 0 : o.markers,
|
|
141
140
|
tr: {
|
|
142
141
|
color: "#FFBD37",
|
|
143
142
|
size: 6
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
|
-
}) :
|
|
147
|
-
},
|
|
145
|
+
}) : r(o);
|
|
146
|
+
},
|
|
148
147
|
priority: 100
|
|
149
148
|
}
|
|
150
149
|
)
|
|
151
150
|
);
|
|
152
151
|
}
|
|
153
152
|
_initSkeletonChange() {
|
|
154
|
-
const
|
|
155
|
-
var
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
const
|
|
159
|
-
(
|
|
160
|
-
}
|
|
161
|
-
this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.pipe(
|
|
162
|
-
|
|
153
|
+
const o = () => {
|
|
154
|
+
var n;
|
|
155
|
+
const e = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
156
|
+
if (!e) return;
|
|
157
|
+
const r = e.getUnitId(), t = this._renderManagerService.getRenderById(r);
|
|
158
|
+
(n = t == null ? void 0 : t.mainComponent) == null || n.makeForceDirty();
|
|
159
|
+
};
|
|
160
|
+
this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.pipe(ce(16)).subscribe(() => {
|
|
161
|
+
o();
|
|
163
162
|
}));
|
|
164
163
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
],
|
|
172
|
-
var
|
|
173
|
-
return
|
|
174
|
-
for (var
|
|
175
|
-
|
|
176
|
-
for (var
|
|
164
|
+
};
|
|
165
|
+
k = jt([
|
|
166
|
+
B(0, v(_e)),
|
|
167
|
+
B(1, v(x)),
|
|
168
|
+
B(2, N),
|
|
169
|
+
B(3, Te)
|
|
170
|
+
], k);
|
|
171
|
+
var P = function() {
|
|
172
|
+
return P = Object.assign || function(o) {
|
|
173
|
+
for (var e, r = 1, t = arguments.length; r < t; r++) {
|
|
174
|
+
e = arguments[r];
|
|
175
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (o[n] = e[n]);
|
|
177
176
|
}
|
|
178
|
-
return
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
var
|
|
182
|
-
for (var
|
|
183
|
-
if (
|
|
184
|
-
for (var
|
|
185
|
-
e.indexOf(
|
|
186
|
-
return
|
|
187
|
-
},
|
|
188
|
-
var
|
|
189
|
-
return
|
|
177
|
+
return o;
|
|
178
|
+
}, P.apply(this, arguments);
|
|
179
|
+
}, At = function(o, e) {
|
|
180
|
+
var r = {};
|
|
181
|
+
for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && e.indexOf(t) < 0 && (r[t] = o[t]);
|
|
182
|
+
if (o != null && typeof Object.getOwnPropertySymbols == "function")
|
|
183
|
+
for (var n = 0, t = Object.getOwnPropertySymbols(o); n < t.length; n++)
|
|
184
|
+
e.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(o, t[n]) && (r[t[n]] = o[t[n]]);
|
|
185
|
+
return r;
|
|
186
|
+
}, Re = be(function(o, e) {
|
|
187
|
+
var r = o.icon, t = o.id, n = o.className, i = o.extend, s = At(o, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(n || "").trim(), c = Me("_".concat(Lt()));
|
|
188
|
+
return Ue(r, "".concat(t), { defIds: r.defIds, idSuffix: c.current }, P({ ref: e, className: a }, s), i);
|
|
190
189
|
});
|
|
191
|
-
function
|
|
192
|
-
return
|
|
193
|
-
return
|
|
190
|
+
function Ue(o, e, r, t, n) {
|
|
191
|
+
return we(o.tag, P(P({ key: e }, Vt(o, r, n)), t), (Bt(o, r).children || []).map(function(i, s) {
|
|
192
|
+
return Ue(i, "".concat(e, "-").concat(o.tag, "-").concat(s), r, void 0, n);
|
|
194
193
|
}));
|
|
195
194
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
})), attrs;
|
|
195
|
+
function Vt(o, e, r) {
|
|
196
|
+
var t = P({}, o.attrs);
|
|
197
|
+
r != null && r.colorChannel1 && t.fill === "colorChannel1" && (t.fill = r.colorChannel1);
|
|
198
|
+
var n = e.defIds;
|
|
199
|
+
return !n || n.length === 0 || (o.tag === "use" && t["xlink:href"] && (t["xlink:href"] = t["xlink:href"] + e.idSuffix), Object.entries(t).forEach(function(i) {
|
|
200
|
+
var s = i[0], a = i[1];
|
|
201
|
+
typeof a == "string" && (t[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
202
|
+
})), t;
|
|
205
203
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}) }) : node;
|
|
204
|
+
function Bt(o, e) {
|
|
205
|
+
var r, t = e.defIds;
|
|
206
|
+
return !t || t.length === 0 ? o : o.tag === "defs" && (!((r = o.children) === null || r === void 0) && r.length) ? P(P({}, o), { children: o.children.map(function(n) {
|
|
207
|
+
return typeof n.attrs.id == "string" && t && t.indexOf(n.attrs.id) > -1 ? P(P({}, n), { attrs: P(P({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
|
|
208
|
+
}) }) : o;
|
|
212
209
|
}
|
|
213
|
-
|
|
214
|
-
function generateShortUuid() {
|
|
210
|
+
function Lt() {
|
|
215
211
|
return Math.random().toString(36).substring(2, 8);
|
|
216
212
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
213
|
+
Re.displayName = "UniverIcon";
|
|
214
|
+
var Ht = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, $e = be(function(o, e) {
|
|
215
|
+
return we(Re, Object.assign({}, o, {
|
|
221
216
|
id: "comment-single",
|
|
222
|
-
ref,
|
|
223
|
-
icon:
|
|
217
|
+
ref: e,
|
|
218
|
+
icon: Ht
|
|
224
219
|
}));
|
|
225
220
|
});
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
$e.displayName = "CommentSingle";
|
|
222
|
+
var Ne = { exports: {} }, X = {};
|
|
223
|
+
/**
|
|
224
|
+
* @license React
|
|
225
|
+
* react-jsx-runtime.production.min.js
|
|
226
|
+
*
|
|
227
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the MIT license found in the
|
|
230
|
+
* LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/
|
|
232
|
+
var Ft = bt, kt = Symbol.for("react.element"), Wt = Symbol.for("react.fragment"), Zt = Object.prototype.hasOwnProperty, zt = Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Gt = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
233
|
+
function xe(o, e, r) {
|
|
234
|
+
var t, n = {}, i = null, s = null;
|
|
235
|
+
r !== void 0 && (i = "" + r), e.key !== void 0 && (i = "" + e.key), e.ref !== void 0 && (s = e.ref);
|
|
236
|
+
for (t in e) Zt.call(e, t) && !Gt.hasOwnProperty(t) && (n[t] = e[t]);
|
|
237
|
+
if (o && o.defaultProps) for (t in e = o.defaultProps, e) n[t] === void 0 && (n[t] = e[t]);
|
|
238
|
+
return { $$typeof: kt, type: o, key: i, ref: s, props: n, _owner: zt.current };
|
|
239
|
+
}
|
|
240
|
+
X.Fragment = Wt;
|
|
241
|
+
X.jsx = xe;
|
|
242
|
+
X.jsxs = xe;
|
|
243
|
+
Ne.exports = X;
|
|
244
|
+
var De = Ne.exports;
|
|
245
|
+
const Yt = () => {
|
|
246
|
+
const o = O(N), e = O(R), r = j(e.activePopup$), t = O(x);
|
|
247
|
+
if (j(t.commentUpdate$), !r)
|
|
230
248
|
return null;
|
|
231
|
-
const { row, col, unitId, subUnitId, trigger } =
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
var
|
|
235
|
-
return (
|
|
236
|
-
}
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
|
|
249
|
+
const { row: n, col: i, unitId: s, subUnitId: a, trigger: c } = r, m = t.getByLocation(s, a, n, i), h = `${We.chatAtABC(i)}${n + 1}`, d = () => {
|
|
250
|
+
e.hidePopup();
|
|
251
|
+
}, u = (p) => {
|
|
252
|
+
var _, S, U;
|
|
253
|
+
return (U = (S = (_ = o.getCurrentUnitForType(b.UNIVER_SHEET)) == null ? void 0 : _.getSheetBySheetId(p)) == null ? void 0 : S.getName()) != null ? U : "";
|
|
254
|
+
};
|
|
255
|
+
return /* @__PURE__ */ De.jsx(
|
|
256
|
+
nt,
|
|
239
257
|
{
|
|
240
|
-
onClick:
|
|
241
|
-
|
|
242
|
-
},
|
|
258
|
+
onClick: () => {
|
|
259
|
+
e.persistPopup();
|
|
260
|
+
},
|
|
243
261
|
prefix: "cell",
|
|
244
|
-
id:
|
|
245
|
-
unitId,
|
|
246
|
-
subUnitId,
|
|
247
|
-
type:
|
|
248
|
-
refStr:
|
|
249
|
-
onClose,
|
|
250
|
-
getSubUnitName,
|
|
251
|
-
autoFocus:
|
|
262
|
+
id: m,
|
|
263
|
+
unitId: s,
|
|
264
|
+
subUnitId: a,
|
|
265
|
+
type: b.UNIVER_SHEET,
|
|
266
|
+
refStr: h,
|
|
267
|
+
onClose: d,
|
|
268
|
+
getSubUnitName: u,
|
|
269
|
+
autoFocus: c === "context-menu"
|
|
252
270
|
}
|
|
253
271
|
);
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
272
|
+
}, qt = () => {
|
|
273
|
+
var g;
|
|
274
|
+
const o = O(Ce), e = O(N), r = O(R), t = e.getCurrentUnitForType(b.UNIVER_SHEET), n = t.getUnitId(), i = O(se), s = Mt(() => t.activeSheet$.pipe(Tt((l) => l == null ? void 0 : l.getSheetId())), [t.activeSheet$]), a = j(s, (g = t.getActiveSheet()) == null ? void 0 : g.getSheetId()), c = Me(), m = O(ae), h = j(m.activeCommentId$), d = j(m.panelVisible$, m.panelVisible), u = le((l) => {
|
|
275
|
+
const I = t.getSheets(), f = {};
|
|
276
|
+
I.forEach((T, C) => {
|
|
277
|
+
f[T.getSheetId()] = C;
|
|
260
278
|
});
|
|
261
|
-
const
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return { ...
|
|
265
|
-
}).sort((
|
|
279
|
+
const M = (T) => T.map((C) => {
|
|
280
|
+
var de;
|
|
281
|
+
const y = A(C.ref), Ve = [(de = f[C.subUnitId]) != null ? de : 0, y.row, y.column];
|
|
282
|
+
return { ...C, p: Ve };
|
|
283
|
+
}).sort((C, y) => C.p[0] === y.p[0] ? C.p[1] === y.p[1] ? C.p[2] - y.p[2] : C.p[1] - y.p[1] : C.p[0] - y.p[0]);
|
|
266
284
|
return [
|
|
267
|
-
...
|
|
268
|
-
...
|
|
285
|
+
...M(l.filter((T) => !T.resolved)),
|
|
286
|
+
...M(l.filter((T) => T.resolved))
|
|
269
287
|
];
|
|
270
|
-
}, [
|
|
271
|
-
var
|
|
272
|
-
if (
|
|
273
|
-
const { row, column } =
|
|
274
|
-
startColumn:
|
|
275
|
-
endColumn:
|
|
276
|
-
startRow:
|
|
277
|
-
endRow:
|
|
288
|
+
}, [t]), p = le((l) => {
|
|
289
|
+
var I;
|
|
290
|
+
if (l.unitId === n && l.subUnitId === a && !l.resolved) {
|
|
291
|
+
const { row: f, column: M } = A(l.ref), T = t.getSheetBySheetId(l.subUnitId), C = (I = T == null ? void 0 : T.getMergedCell(f, M)) != null ? I : {
|
|
292
|
+
startColumn: M,
|
|
293
|
+
endColumn: M,
|
|
294
|
+
startRow: f,
|
|
295
|
+
endRow: f
|
|
278
296
|
};
|
|
279
|
-
if (!Number.isNaN(
|
|
280
|
-
return
|
|
281
|
-
range:
|
|
297
|
+
if (!Number.isNaN(f) && !Number.isNaN(M))
|
|
298
|
+
return o.addShape({
|
|
299
|
+
range: C,
|
|
282
300
|
style: {
|
|
283
301
|
hasAutoFill: !1,
|
|
284
302
|
fill: "rgb(255, 189, 55, 0.35)",
|
|
@@ -289,204 +307,203 @@ const SheetsThreadCommentCell = /* @__PURE__ */ __name(() => {
|
|
|
289
307
|
primary: null
|
|
290
308
|
});
|
|
291
309
|
}
|
|
292
|
-
}, [
|
|
293
|
-
var
|
|
294
|
-
return (
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
return
|
|
305
|
-
!
|
|
306
|
-
}, [
|
|
307
|
-
|
|
310
|
+
}, [o, a, n]), _ = (l) => {
|
|
311
|
+
var I, f;
|
|
312
|
+
return (f = (I = t.getSheetBySheetId(l)) == null ? void 0 : I.getName()) != null ? f : "";
|
|
313
|
+
}, S = () => {
|
|
314
|
+
i.executeCommand(V.id);
|
|
315
|
+
}, U = (l) => {
|
|
316
|
+
h && h.unitId === l.unitId && h.subUnitId === l.subUnitId && h.commentId === l.id || (c.current && (o.removeShape(c.current), c.current = null), c.current = p(l));
|
|
317
|
+
}, D = () => {
|
|
318
|
+
c.current && (o.removeShape(c.current), c.current = null);
|
|
319
|
+
}, ee = (l, I) => {
|
|
320
|
+
I && r.hidePopup();
|
|
321
|
+
};
|
|
322
|
+
return wt(() => {
|
|
323
|
+
!d && c.current && o.removeShape(c.current);
|
|
324
|
+
}, [o, d]), /* @__PURE__ */ De.jsx(
|
|
325
|
+
rt,
|
|
308
326
|
{
|
|
309
|
-
unitId,
|
|
310
|
-
subUnitId
|
|
311
|
-
type:
|
|
312
|
-
onAdd:
|
|
313
|
-
getSubUnitName,
|
|
314
|
-
onResolve:
|
|
315
|
-
sortComments,
|
|
316
|
-
onItemEnter:
|
|
317
|
-
onItemLeave:
|
|
318
|
-
onDeleteComment:
|
|
327
|
+
unitId: n,
|
|
328
|
+
subUnitId$: s,
|
|
329
|
+
type: b.UNIVER_SHEET,
|
|
330
|
+
onAdd: S,
|
|
331
|
+
getSubUnitName: _,
|
|
332
|
+
onResolve: ee,
|
|
333
|
+
sortComments: u,
|
|
334
|
+
onItemEnter: U,
|
|
335
|
+
onItemLeave: D,
|
|
336
|
+
onDeleteComment: () => (D(), !0)
|
|
319
337
|
}
|
|
320
338
|
);
|
|
321
|
-
},
|
|
322
|
-
id:
|
|
323
|
-
type:
|
|
324
|
-
icon:
|
|
339
|
+
}, Kt = (o) => ({
|
|
340
|
+
id: V.id,
|
|
341
|
+
type: Ie.BUTTON,
|
|
342
|
+
icon: me,
|
|
325
343
|
title: "sheetThreadComment.menu.addComment",
|
|
326
|
-
hidden$:
|
|
327
|
-
disabled$:
|
|
328
|
-
workbookTypes: [
|
|
329
|
-
worksheetTypes: [
|
|
330
|
-
rangeTypes: [
|
|
344
|
+
hidden$: Pe(o, b.UNIVER_SHEET),
|
|
345
|
+
disabled$: Se(o, {
|
|
346
|
+
workbookTypes: [K],
|
|
347
|
+
worksheetTypes: [J],
|
|
348
|
+
rangeTypes: [Q]
|
|
331
349
|
})
|
|
332
|
-
}),
|
|
333
|
-
id:
|
|
334
|
-
type:
|
|
335
|
-
icon:
|
|
350
|
+
}), Jt = (o) => ({
|
|
351
|
+
id: fe.id,
|
|
352
|
+
type: Ie.BUTTON,
|
|
353
|
+
icon: me,
|
|
336
354
|
tooltip: "sheetThreadComment.menu.commentManagement",
|
|
337
|
-
disabled$:
|
|
338
|
-
workbookTypes: [
|
|
339
|
-
worksheetTypes: [
|
|
340
|
-
rangeTypes: [
|
|
355
|
+
disabled$: Se(o, {
|
|
356
|
+
workbookTypes: [K],
|
|
357
|
+
worksheetTypes: [J],
|
|
358
|
+
rangeTypes: [Q]
|
|
341
359
|
}),
|
|
342
|
-
hidden$:
|
|
343
|
-
}),
|
|
344
|
-
id:
|
|
345
|
-
binding:
|
|
346
|
-
preconditions:
|
|
347
|
-
},
|
|
348
|
-
[
|
|
349
|
-
[
|
|
360
|
+
hidden$: Pe(o, b.UNIVER_SHEET)
|
|
361
|
+
}), Qt = {
|
|
362
|
+
id: V.id,
|
|
363
|
+
binding: vt.M | ue.CTRL_COMMAND | ue.ALT,
|
|
364
|
+
preconditions: at
|
|
365
|
+
}, Xt = {
|
|
366
|
+
[_t.OTHERS]: {
|
|
367
|
+
[fe.id]: {
|
|
350
368
|
order: 1,
|
|
351
|
-
menuItemFactory:
|
|
369
|
+
menuItemFactory: Jt
|
|
352
370
|
}
|
|
353
371
|
},
|
|
354
|
-
[
|
|
355
|
-
[
|
|
356
|
-
[
|
|
372
|
+
[ft.MAIN_AREA]: {
|
|
373
|
+
[Ct.OTHERS]: {
|
|
374
|
+
[V.id]: {
|
|
357
375
|
order: 0,
|
|
358
|
-
menuItemFactory:
|
|
376
|
+
menuItemFactory: Kt
|
|
359
377
|
}
|
|
360
378
|
}
|
|
361
379
|
}
|
|
362
380
|
};
|
|
363
|
-
var
|
|
364
|
-
for (var
|
|
365
|
-
(
|
|
366
|
-
return
|
|
367
|
-
},
|
|
368
|
-
let
|
|
369
|
-
constructor(
|
|
370
|
-
super(), this._menuManagerService =
|
|
381
|
+
var en = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, nn = (o, e, r, t) => {
|
|
382
|
+
for (var n = t > 1 ? void 0 : t ? tn(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
383
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
384
|
+
return t && n && en(e, r, n), n;
|
|
385
|
+
}, ne = (o, e) => (r, t) => e(r, t, o);
|
|
386
|
+
let W = class extends $ {
|
|
387
|
+
constructor(o, e, r) {
|
|
388
|
+
super(), this._menuManagerService = o, this._componentManager = e, this._shortcutService = r, this._initMenu(), this._initShortcut(), this._initComponent();
|
|
371
389
|
}
|
|
372
390
|
_initShortcut() {
|
|
373
|
-
this._shortcutService.registerShortcut(
|
|
391
|
+
this._shortcutService.registerShortcut(Qt);
|
|
374
392
|
}
|
|
375
393
|
_initMenu() {
|
|
376
|
-
this._menuManagerService.mergeMenu(
|
|
394
|
+
this._menuManagerService.mergeMenu(Xt);
|
|
377
395
|
}
|
|
378
396
|
_initComponent() {
|
|
379
397
|
[
|
|
380
|
-
[
|
|
381
|
-
[
|
|
382
|
-
[
|
|
383
|
-
].forEach(([
|
|
384
|
-
this._componentManager.register(
|
|
398
|
+
[Ee, Yt],
|
|
399
|
+
[ot, qt],
|
|
400
|
+
[me, $e]
|
|
401
|
+
].forEach(([o, e]) => {
|
|
402
|
+
this._componentManager.register(o, e);
|
|
385
403
|
});
|
|
386
404
|
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
],
|
|
393
|
-
var
|
|
394
|
-
for (var
|
|
395
|
-
(
|
|
396
|
-
return
|
|
397
|
-
},
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
startColumn:
|
|
401
|
-
startRow:
|
|
402
|
-
endColumn:
|
|
403
|
-
endRow:
|
|
405
|
+
};
|
|
406
|
+
W = nn([
|
|
407
|
+
ne(0, gt),
|
|
408
|
+
ne(1, v(St)),
|
|
409
|
+
ne(2, It)
|
|
410
|
+
], W);
|
|
411
|
+
var rn = Object.defineProperty, on = Object.getOwnPropertyDescriptor, sn = (o, e, r, t) => {
|
|
412
|
+
for (var n = t > 1 ? void 0 : t ? on(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
413
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
414
|
+
return t && n && rn(e, r, n), n;
|
|
415
|
+
}, re = (o, e) => (r, t) => e(r, t, o);
|
|
416
|
+
const an = (o, e, r) => {
|
|
417
|
+
const t = A(o), n = r.row - e.row, i = r.column - e.column, s = {
|
|
418
|
+
startColumn: t.column + i,
|
|
419
|
+
startRow: t.row + n,
|
|
420
|
+
endColumn: t.column + i,
|
|
421
|
+
endRow: t.row + n
|
|
404
422
|
};
|
|
405
|
-
return
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
constructor(_sheetClipboardService, _sheetsThreadCommentModel, _threadCommentDataSourceService) {
|
|
423
|
+
return yt(s);
|
|
424
|
+
};
|
|
425
|
+
let Z = class extends $ {
|
|
426
|
+
constructor(e, r, t) {
|
|
410
427
|
super();
|
|
411
|
-
|
|
412
|
-
this._sheetClipboardService =
|
|
428
|
+
E(this, "_copyInfo");
|
|
429
|
+
this._sheetClipboardService = e, this._sheetsThreadCommentModel = r, this._threadCommentDataSourceService = t, this._initClipboardHook();
|
|
413
430
|
}
|
|
414
431
|
// eslint-disable-next-line max-lines-per-function
|
|
415
432
|
_initClipboardHook() {
|
|
416
433
|
this.disposeWithMe(
|
|
417
434
|
this._sheetClipboardService.addClipboardHook({
|
|
418
|
-
id:
|
|
419
|
-
onBeforeCopy:
|
|
435
|
+
id: Oe,
|
|
436
|
+
onBeforeCopy: (e, r, t) => {
|
|
420
437
|
this._copyInfo = {
|
|
421
|
-
unitId,
|
|
422
|
-
subUnitId,
|
|
423
|
-
range
|
|
438
|
+
unitId: e,
|
|
439
|
+
subUnitId: r,
|
|
440
|
+
range: t
|
|
424
441
|
};
|
|
425
|
-
},
|
|
442
|
+
},
|
|
426
443
|
// eslint-disable-next-line max-lines-per-function
|
|
427
|
-
onPasteCells:
|
|
428
|
-
const { unitId:
|
|
429
|
-
row:
|
|
430
|
-
column:
|
|
444
|
+
onPasteCells: (e, r, t, n) => {
|
|
445
|
+
const { unitId: i, subUnitId: s, range: a } = r, c = {
|
|
446
|
+
row: a.rows[0],
|
|
447
|
+
column: a.cols[0]
|
|
431
448
|
};
|
|
432
|
-
if (
|
|
433
|
-
const { range:
|
|
434
|
-
row:
|
|
435
|
-
column:
|
|
449
|
+
if (n.copyType === mt.CUT && this._copyInfo) {
|
|
450
|
+
const { range: m, unitId: h, subUnitId: d } = this._copyInfo, u = {
|
|
451
|
+
row: m.startRow,
|
|
452
|
+
column: m.startColumn
|
|
436
453
|
};
|
|
437
|
-
if (!(
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
this._threadCommentDataSourceService.syncUpdateMutationToColla ?
|
|
442
|
-
|
|
443
|
-
}) :
|
|
444
|
-
|
|
454
|
+
if (!(i === h && s === d)) {
|
|
455
|
+
const p = [];
|
|
456
|
+
Ze.foreach(m, (g, l) => {
|
|
457
|
+
const I = this._sheetsThreadCommentModel.getAllByLocation(h, d, g, l);
|
|
458
|
+
this._threadCommentDataSourceService.syncUpdateMutationToColla ? I.forEach((f) => {
|
|
459
|
+
p.push(f);
|
|
460
|
+
}) : I.forEach(({ children: f, ...M }) => {
|
|
461
|
+
M.parentId || p.push(M);
|
|
445
462
|
});
|
|
446
463
|
});
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
id:
|
|
464
|
+
const _ = [], S = [], U = [], D = [], ee = (g) => {
|
|
465
|
+
_.unshift({
|
|
466
|
+
id: F.id,
|
|
450
467
|
params: {
|
|
451
|
-
unitId:
|
|
452
|
-
subUnitId:
|
|
453
|
-
commentId:
|
|
468
|
+
unitId: h,
|
|
469
|
+
subUnitId: d,
|
|
470
|
+
commentId: g.id
|
|
454
471
|
}
|
|
455
|
-
}),
|
|
456
|
-
id:
|
|
472
|
+
}), U.push({
|
|
473
|
+
id: ie.id,
|
|
457
474
|
params: {
|
|
458
|
-
unitId:
|
|
459
|
-
subUnitId:
|
|
475
|
+
unitId: i,
|
|
476
|
+
subUnitId: s,
|
|
460
477
|
comment: {
|
|
461
|
-
...
|
|
462
|
-
ref:
|
|
463
|
-
unitId:
|
|
464
|
-
subUnitId:
|
|
478
|
+
...g,
|
|
479
|
+
ref: an(g.ref, u, c),
|
|
480
|
+
unitId: i,
|
|
481
|
+
subUnitId: s
|
|
465
482
|
},
|
|
466
483
|
sync: !0
|
|
467
484
|
}
|
|
468
|
-
}),
|
|
469
|
-
id:
|
|
485
|
+
}), S.push({
|
|
486
|
+
id: ie.id,
|
|
470
487
|
params: {
|
|
471
|
-
unitId:
|
|
472
|
-
subUnitId:
|
|
473
|
-
comment:
|
|
488
|
+
unitId: h,
|
|
489
|
+
subUnitId: d,
|
|
490
|
+
comment: g,
|
|
474
491
|
sync: !0
|
|
475
492
|
}
|
|
476
|
-
}),
|
|
477
|
-
id:
|
|
493
|
+
}), D.unshift({
|
|
494
|
+
id: F.id,
|
|
478
495
|
params: {
|
|
479
|
-
unitId:
|
|
480
|
-
subUnitId:
|
|
481
|
-
commentId:
|
|
496
|
+
unitId: i,
|
|
497
|
+
subUnitId: s,
|
|
498
|
+
commentId: g.id
|
|
482
499
|
}
|
|
483
500
|
});
|
|
484
|
-
}
|
|
485
|
-
return
|
|
486
|
-
|
|
501
|
+
};
|
|
502
|
+
return p.forEach((g) => {
|
|
503
|
+
ee(g);
|
|
487
504
|
}), {
|
|
488
|
-
redos: [...
|
|
489
|
-
undos: [...
|
|
505
|
+
redos: [..._, ...U],
|
|
506
|
+
undos: [...D, ...S]
|
|
490
507
|
};
|
|
491
508
|
}
|
|
492
509
|
}
|
|
@@ -494,188 +511,188 @@ let SheetsThreadCommentCopyPasteController = (_a4 = class extends Disposable {
|
|
|
494
511
|
redos: [],
|
|
495
512
|
undos: []
|
|
496
513
|
};
|
|
497
|
-
}
|
|
514
|
+
}
|
|
498
515
|
})
|
|
499
516
|
);
|
|
500
517
|
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
],
|
|
507
|
-
var
|
|
508
|
-
for (var
|
|
509
|
-
(
|
|
510
|
-
return
|
|
511
|
-
},
|
|
512
|
-
let
|
|
513
|
-
constructor(
|
|
514
|
-
super(), this._hoverManagerService =
|
|
518
|
+
};
|
|
519
|
+
Z = sn([
|
|
520
|
+
re(0, v(ct)),
|
|
521
|
+
re(1, v(x)),
|
|
522
|
+
re(2, ye)
|
|
523
|
+
], Z);
|
|
524
|
+
var cn = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, dn = (o, e, r, t) => {
|
|
525
|
+
for (var n = t > 1 ? void 0 : t ? mn(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
526
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
527
|
+
return t && n && cn(e, r, n), n;
|
|
528
|
+
}, L = (o, e) => (r, t) => e(r, t, o);
|
|
529
|
+
let z = class extends $ {
|
|
530
|
+
constructor(o, e, r, t) {
|
|
531
|
+
super(), this._hoverManagerService = o, this._sheetsThreadCommentPopupService = e, this._sheetsThreadCommentModel = r, this._sheetPermissionInterceptorBaseController = t, this._initHoverEvent();
|
|
515
532
|
}
|
|
516
533
|
_initHoverEvent() {
|
|
517
534
|
this.disposeWithMe(
|
|
518
|
-
this._hoverManagerService.currentCell$.pipe(
|
|
519
|
-
const
|
|
520
|
-
if (
|
|
521
|
-
const { location } =
|
|
522
|
-
if (
|
|
535
|
+
this._hoverManagerService.currentCell$.pipe(ce(100)).subscribe((o) => {
|
|
536
|
+
const e = this._sheetsThreadCommentPopupService.activePopup;
|
|
537
|
+
if (o && (e && e.temp || !e)) {
|
|
538
|
+
const { location: r } = o, { unitId: t, subUnitId: n, row: i, col: s } = r, a = this._sheetsThreadCommentModel.getByLocation(t, n, i, s);
|
|
539
|
+
if (a) {
|
|
523
540
|
if (!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
524
|
-
workbookTypes: [
|
|
525
|
-
worksheetTypes: [
|
|
526
|
-
rangeTypes: [
|
|
527
|
-
}, [{ startRow:
|
|
541
|
+
workbookTypes: [K],
|
|
542
|
+
worksheetTypes: [J],
|
|
543
|
+
rangeTypes: [Q]
|
|
544
|
+
}, [{ startRow: i, startColumn: s, endRow: i, endColumn: s }]))
|
|
528
545
|
return;
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
unitId,
|
|
532
|
-
subUnitId,
|
|
533
|
-
row,
|
|
534
|
-
col,
|
|
535
|
-
commentId,
|
|
546
|
+
const m = this._sheetsThreadCommentModel.getComment(t, n, a);
|
|
547
|
+
m && !m.resolved && this._sheetsThreadCommentPopupService.showPopup({
|
|
548
|
+
unitId: t,
|
|
549
|
+
subUnitId: n,
|
|
550
|
+
row: i,
|
|
551
|
+
col: s,
|
|
552
|
+
commentId: a,
|
|
536
553
|
temp: !0
|
|
537
554
|
});
|
|
538
555
|
} else
|
|
539
|
-
|
|
556
|
+
e && this._sheetsThreadCommentPopupService.hidePopup();
|
|
540
557
|
}
|
|
541
558
|
})
|
|
542
559
|
);
|
|
543
560
|
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
],
|
|
551
|
-
var
|
|
552
|
-
for (var
|
|
553
|
-
(
|
|
554
|
-
return
|
|
555
|
-
},
|
|
556
|
-
let
|
|
557
|
-
constructor(
|
|
561
|
+
};
|
|
562
|
+
z = dn([
|
|
563
|
+
L(0, v(dt)),
|
|
564
|
+
L(1, v(R)),
|
|
565
|
+
L(2, v(x)),
|
|
566
|
+
L(3, v(ge))
|
|
567
|
+
], z);
|
|
568
|
+
var hn = Object.defineProperty, un = Object.getOwnPropertyDescriptor, ln = (o, e, r, t) => {
|
|
569
|
+
for (var n = t > 1 ? void 0 : t ? un(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
570
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
571
|
+
return t && n && hn(e, r, n), n;
|
|
572
|
+
}, w = (o, e) => (r, t) => e(r, t, o);
|
|
573
|
+
let G = class extends $ {
|
|
574
|
+
constructor(e, r, t, n, i, s, a, c, m, h) {
|
|
558
575
|
super();
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
this._commandService =
|
|
562
|
-
}
|
|
563
|
-
_handleSelectionChange(
|
|
564
|
-
var
|
|
565
|
-
const
|
|
566
|
-
if (!
|
|
576
|
+
E(this, "_isSwitchToCommenting", !1);
|
|
577
|
+
E(this, "_selectionShapeInfo", null);
|
|
578
|
+
this._commandService = e, this._sheetsThreadCommentPopupService = r, this._sheetsThreadCommentModel = t, this._threadCommentPanelService = n, this._univerInstanceService = i, this._sheetPermissionInterceptorBaseController = s, this._markSelectionService = a, this._sheetSelectionService = c, this._editorBridgeService = m, this._renderManagerService = h, this._initCommandListener(), this._initPanelListener(), this._initMarkSelection(), this._initSelectionUpdateListener(), this._initEditorBridge();
|
|
579
|
+
}
|
|
580
|
+
_handleSelectionChange(e, r, t) {
|
|
581
|
+
var u, p, _;
|
|
582
|
+
const n = (u = e[0]) == null ? void 0 : u.range, i = this._renderManagerService.getRenderById(r), s = (p = i == null ? void 0 : i.with(ut).getWorksheetSkeleton(t)) == null ? void 0 : p.skeleton;
|
|
583
|
+
if (!s || !n)
|
|
567
584
|
return;
|
|
568
|
-
const
|
|
569
|
-
if ((((
|
|
570
|
-
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(
|
|
585
|
+
const a = s.getCellByIndex(n.startRow, n.startColumn);
|
|
586
|
+
if ((((_ = n.rangeType) != null ? _ : he.NORMAL) !== he.NORMAL || n.endColumn - n.startColumn > 0 || n.endRow - n.startRow > 0) && !((a.isMerged || a.isMergedMainCell) && ze.equals(a.mergeInfo, n))) {
|
|
587
|
+
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(te.id);
|
|
571
588
|
return;
|
|
572
589
|
}
|
|
573
|
-
const
|
|
574
|
-
if (!this._sheetsThreadCommentModel.showCommentMarker(
|
|
575
|
-
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(
|
|
590
|
+
const m = a.actualRow, h = a.actualColumn;
|
|
591
|
+
if (!this._sheetsThreadCommentModel.showCommentMarker(r, t, m, h)) {
|
|
592
|
+
this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(te.id);
|
|
576
593
|
return;
|
|
577
594
|
}
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
unitId,
|
|
581
|
-
subUnitId,
|
|
582
|
-
commentId
|
|
595
|
+
const d = this._sheetsThreadCommentModel.getByLocation(r, t, m, h);
|
|
596
|
+
d && this._commandService.executeCommand(te.id, {
|
|
597
|
+
unitId: r,
|
|
598
|
+
subUnitId: t,
|
|
599
|
+
commentId: d
|
|
583
600
|
});
|
|
584
601
|
}
|
|
585
602
|
_initSelectionUpdateListener() {
|
|
586
603
|
this.disposeWithMe(
|
|
587
|
-
this._sheetSelectionService.selectionMoveEnd$.subscribe((
|
|
604
|
+
this._sheetSelectionService.selectionMoveEnd$.subscribe((e) => {
|
|
588
605
|
if (this._isSwitchToCommenting)
|
|
589
606
|
return;
|
|
590
|
-
const
|
|
591
|
-
|
|
607
|
+
const r = this._sheetSelectionService.currentSelectionParam;
|
|
608
|
+
r && this._handleSelectionChange(e, r.unitId, r.sheetId);
|
|
592
609
|
})
|
|
593
610
|
);
|
|
594
611
|
}
|
|
595
612
|
_initEditorBridge() {
|
|
596
613
|
this.disposeWithMe(
|
|
597
|
-
this._editorBridgeService.visible$.subscribe((
|
|
598
|
-
|
|
614
|
+
this._editorBridgeService.visible$.subscribe((e) => {
|
|
615
|
+
e.visible && this._sheetsThreadCommentPopupService.hidePopup();
|
|
599
616
|
})
|
|
600
617
|
);
|
|
601
618
|
}
|
|
602
619
|
_initCommandListener() {
|
|
603
|
-
this._commandService.onCommandExecuted((
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
if (!
|
|
620
|
+
this._commandService.onCommandExecuted((e) => {
|
|
621
|
+
if (e.id === F.id) {
|
|
622
|
+
const r = e.params, t = this._sheetsThreadCommentPopupService.activePopup;
|
|
623
|
+
if (!t)
|
|
607
624
|
return;
|
|
608
|
-
const { unitId, subUnitId, commentId } =
|
|
609
|
-
|
|
625
|
+
const { unitId: n, subUnitId: i, commentId: s } = t;
|
|
626
|
+
r.unitId === n && r.subUnitId === i && r.commentId === s && this._sheetsThreadCommentPopupService.hidePopup();
|
|
610
627
|
}
|
|
611
628
|
});
|
|
612
629
|
}
|
|
613
630
|
_initPanelListener() {
|
|
614
|
-
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async (
|
|
615
|
-
var
|
|
616
|
-
if (
|
|
617
|
-
const { unitId, subUnitId, commentId, trigger } =
|
|
618
|
-
if (!
|
|
631
|
+
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async (e) => {
|
|
632
|
+
var r;
|
|
633
|
+
if (e) {
|
|
634
|
+
const { unitId: t, subUnitId: n, commentId: i, trigger: s } = e, a = this._sheetsThreadCommentModel.getComment(t, n, i);
|
|
635
|
+
if (!a || a.resolved)
|
|
619
636
|
return;
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
637
|
+
const c = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
638
|
+
if (!c || c.getUnitId() !== t)
|
|
622
639
|
return;
|
|
623
|
-
this._isSwitchToCommenting = !0, ((
|
|
624
|
-
unitId,
|
|
625
|
-
subUnitId
|
|
640
|
+
this._isSwitchToCommenting = !0, ((r = c.getActiveSheet()) == null ? void 0 : r.getSheetId()) !== n && await this._commandService.executeCommand(Xe.id, {
|
|
641
|
+
unitId: t,
|
|
642
|
+
subUnitId: n
|
|
626
643
|
}), this._isSwitchToCommenting = !1;
|
|
627
|
-
const
|
|
644
|
+
const d = A(a.ref), { row: u, column: p } = d;
|
|
628
645
|
if (!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
629
|
-
workbookTypes: [
|
|
630
|
-
worksheetTypes: [
|
|
631
|
-
rangeTypes: [
|
|
632
|
-
}, [{ startRow:
|
|
646
|
+
workbookTypes: [K],
|
|
647
|
+
worksheetTypes: [J],
|
|
648
|
+
rangeTypes: [Q]
|
|
649
|
+
}, [{ startRow: u, startColumn: p, endRow: u, endColumn: p }]))
|
|
633
650
|
return;
|
|
634
|
-
const
|
|
635
|
-
if (await this._commandService.executeCommand(
|
|
651
|
+
const S = 1;
|
|
652
|
+
if (await this._commandService.executeCommand(lt.id, {
|
|
636
653
|
range: {
|
|
637
|
-
startRow: Math.max(
|
|
638
|
-
endRow:
|
|
639
|
-
startColumn: Math.max(
|
|
640
|
-
endColumn:
|
|
654
|
+
startRow: Math.max(d.row - S, 0),
|
|
655
|
+
endRow: d.row + S,
|
|
656
|
+
startColumn: Math.max(d.column - S, 0),
|
|
657
|
+
endColumn: d.column + S
|
|
641
658
|
}
|
|
642
659
|
}), this._editorBridgeService.isVisible().visible)
|
|
643
660
|
return;
|
|
644
661
|
this._sheetsThreadCommentPopupService.showPopup({
|
|
645
|
-
unitId,
|
|
646
|
-
subUnitId,
|
|
647
|
-
row:
|
|
648
|
-
col:
|
|
649
|
-
commentId:
|
|
650
|
-
trigger
|
|
662
|
+
unitId: t,
|
|
663
|
+
subUnitId: n,
|
|
664
|
+
row: d.row,
|
|
665
|
+
col: d.column,
|
|
666
|
+
commentId: a.id,
|
|
667
|
+
trigger: s
|
|
651
668
|
});
|
|
652
669
|
} else
|
|
653
670
|
this._sheetsThreadCommentPopupService.hidePopup();
|
|
654
671
|
}));
|
|
655
672
|
}
|
|
656
673
|
_initMarkSelection() {
|
|
657
|
-
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.pipe(
|
|
658
|
-
var
|
|
659
|
-
if (!
|
|
674
|
+
this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.pipe(ce(100)).subscribe((e) => {
|
|
675
|
+
var u, p;
|
|
676
|
+
if (!e) {
|
|
660
677
|
this._selectionShapeInfo && (this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId), this._selectionShapeInfo = null);
|
|
661
678
|
return;
|
|
662
679
|
}
|
|
663
|
-
const { unitId, subUnitId, commentId } =
|
|
680
|
+
const { unitId: r, subUnitId: t, commentId: n } = e;
|
|
664
681
|
this._selectionShapeInfo && (this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId), this._selectionShapeInfo = null);
|
|
665
|
-
const
|
|
666
|
-
if (!
|
|
682
|
+
const i = this._sheetsThreadCommentModel.getComment(r, t, n);
|
|
683
|
+
if (!i)
|
|
667
684
|
return;
|
|
668
|
-
const
|
|
669
|
-
if (Number.isNaN(
|
|
685
|
+
const s = A(i.ref), { row: a, column: c } = s;
|
|
686
|
+
if (Number.isNaN(a) || Number.isNaN(c))
|
|
670
687
|
return null;
|
|
671
|
-
const
|
|
672
|
-
startColumn:
|
|
673
|
-
endColumn:
|
|
674
|
-
startRow:
|
|
675
|
-
endRow:
|
|
676
|
-
},
|
|
688
|
+
const m = (u = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET)) == null ? void 0 : u.getSheetBySheetId(t), h = (p = m == null ? void 0 : m.getMergedCell(a, c)) != null ? p : {
|
|
689
|
+
startColumn: c,
|
|
690
|
+
endColumn: c,
|
|
691
|
+
startRow: a,
|
|
692
|
+
endRow: a
|
|
693
|
+
}, d = this._markSelectionService.addShape(
|
|
677
694
|
{
|
|
678
|
-
range:
|
|
695
|
+
range: h,
|
|
679
696
|
style: {
|
|
680
697
|
hasAutoFill: !1,
|
|
681
698
|
fill: "rgb(255, 189, 55, 0.35)",
|
|
@@ -688,131 +705,131 @@ let SheetsThreadCommentPopupController = (_a6 = class extends Disposable {
|
|
|
688
705
|
[],
|
|
689
706
|
-1
|
|
690
707
|
);
|
|
691
|
-
|
|
692
|
-
...
|
|
693
|
-
shapeId
|
|
708
|
+
d && (this._selectionShapeInfo = {
|
|
709
|
+
...e,
|
|
710
|
+
shapeId: d
|
|
694
711
|
});
|
|
695
712
|
}));
|
|
696
713
|
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
],
|
|
710
|
-
var
|
|
711
|
-
for (var
|
|
712
|
-
(
|
|
713
|
-
return
|
|
714
|
-
},
|
|
715
|
-
let
|
|
716
|
-
constructor(
|
|
717
|
-
super(), this._sheetInterceptorService =
|
|
714
|
+
};
|
|
715
|
+
G = ln([
|
|
716
|
+
w(0, se),
|
|
717
|
+
w(1, v(R)),
|
|
718
|
+
w(2, v(x)),
|
|
719
|
+
w(3, v(ae)),
|
|
720
|
+
w(4, N),
|
|
721
|
+
w(5, v(ge)),
|
|
722
|
+
w(6, Ce),
|
|
723
|
+
w(7, v(ve)),
|
|
724
|
+
w(8, ht),
|
|
725
|
+
w(9, Te)
|
|
726
|
+
], G);
|
|
727
|
+
var pn = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, _n = (o, e, r, t) => {
|
|
728
|
+
for (var n = t > 1 ? void 0 : t ? vn(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
729
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
730
|
+
return t && n && pn(e, r, n), n;
|
|
731
|
+
}, H = (o, e) => (r, t) => e(r, t, o);
|
|
732
|
+
let Y = class extends $ {
|
|
733
|
+
constructor(o, e, r, t) {
|
|
734
|
+
super(), this._sheetInterceptorService = o, this._univerInstanceService = e, this._threadCommentModel = r, this._threadCommentDataSourceService = t, this._initSheetChange();
|
|
718
735
|
}
|
|
719
736
|
_initSheetChange() {
|
|
720
737
|
this.disposeWithMe(
|
|
721
738
|
this._sheetInterceptorService.interceptCommand({
|
|
722
|
-
getMutations:
|
|
723
|
-
var
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
if (!
|
|
739
|
+
getMutations: (o) => {
|
|
740
|
+
var e;
|
|
741
|
+
if (o.id === et.id) {
|
|
742
|
+
const r = o.params, t = r.unitId ? this._univerInstanceService.getUnit(r.unitId) : this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
|
|
743
|
+
if (!t)
|
|
727
744
|
return { redos: [], undos: [] };
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
745
|
+
const n = t.getUnitId(), i = r.subUnitId || ((e = t.getActiveSheet()) == null ? void 0 : e.getSheetId());
|
|
746
|
+
if (!i)
|
|
730
747
|
return { redos: [], undos: [] };
|
|
731
|
-
const
|
|
732
|
-
id:
|
|
748
|
+
const s = this._threadCommentModel.ensureMap(n, i), a = Array.from(s.values()).filter((u) => !u.parentId), c = a.map((u) => u.id), m = this._threadCommentDataSourceService.syncUpdateMutationToColla, h = c.map((u) => ({
|
|
749
|
+
id: F.id,
|
|
733
750
|
params: {
|
|
734
|
-
unitId,
|
|
735
|
-
subUnitId,
|
|
736
|
-
commentId:
|
|
751
|
+
unitId: n,
|
|
752
|
+
subUnitId: i,
|
|
753
|
+
commentId: u
|
|
737
754
|
}
|
|
738
|
-
})),
|
|
739
|
-
id:
|
|
755
|
+
})), d = a.map(({ children: u, ...p }) => ({
|
|
756
|
+
id: ie.id,
|
|
740
757
|
params: {
|
|
741
|
-
unitId,
|
|
742
|
-
subUnitId,
|
|
758
|
+
unitId: n,
|
|
759
|
+
subUnitId: i,
|
|
743
760
|
comment: {
|
|
744
|
-
...
|
|
745
|
-
children:
|
|
761
|
+
...p,
|
|
762
|
+
children: m ? u : void 0
|
|
746
763
|
},
|
|
747
|
-
sync: !
|
|
764
|
+
sync: !m
|
|
748
765
|
}
|
|
749
766
|
}));
|
|
750
|
-
return { redos, undos };
|
|
767
|
+
return { redos: h, undos: d };
|
|
751
768
|
}
|
|
752
769
|
return { redos: [], undos: [] };
|
|
753
|
-
}
|
|
770
|
+
}
|
|
754
771
|
})
|
|
755
772
|
);
|
|
756
773
|
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
],
|
|
764
|
-
var
|
|
765
|
-
for (var
|
|
766
|
-
(
|
|
767
|
-
return
|
|
768
|
-
},
|
|
769
|
-
let
|
|
770
|
-
constructor(
|
|
771
|
-
super(), this._config =
|
|
772
|
-
const { menu, ...
|
|
773
|
-
|
|
774
|
+
};
|
|
775
|
+
Y = _n([
|
|
776
|
+
H(0, v(_e)),
|
|
777
|
+
H(1, N),
|
|
778
|
+
H(2, v(Et)),
|
|
779
|
+
H(3, ye)
|
|
780
|
+
], Y);
|
|
781
|
+
var je = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, Cn = (o, e, r) => e in o ? je(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r, Sn = (o, e, r, t) => {
|
|
782
|
+
for (var n = t > 1 ? void 0 : t ? fn(e, r) : e, i = o.length - 1, s; i >= 0; i--)
|
|
783
|
+
(s = o[i]) && (n = (t ? s(e, r, n) : s(n)) || n);
|
|
784
|
+
return t && n && je(e, r, n), n;
|
|
785
|
+
}, oe = (o, e) => (r, t) => e(r, t, o), Ae = (o, e, r) => Cn(o, typeof e != "symbol" ? e + "" : e, r);
|
|
786
|
+
let q = class extends qe {
|
|
787
|
+
constructor(o = Nt, e, r, t) {
|
|
788
|
+
super(), this._config = o, this._injector = e, this._commandService = r, this._configService = t;
|
|
789
|
+
const { menu: n, ...i } = this._config;
|
|
790
|
+
n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig($t, i);
|
|
774
791
|
}
|
|
775
792
|
onStarting() {
|
|
776
793
|
[
|
|
777
|
-
[
|
|
778
|
-
[
|
|
779
|
-
[
|
|
780
|
-
[
|
|
781
|
-
[
|
|
782
|
-
[
|
|
783
|
-
[
|
|
784
|
-
].forEach((
|
|
785
|
-
this._injector.add(
|
|
786
|
-
}), [
|
|
787
|
-
this._commandService.registerCommand(
|
|
788
|
-
}), this._injector.get(
|
|
794
|
+
[W],
|
|
795
|
+
[k],
|
|
796
|
+
[Z],
|
|
797
|
+
[z],
|
|
798
|
+
[Y],
|
|
799
|
+
[G],
|
|
800
|
+
[R]
|
|
801
|
+
].forEach((o) => {
|
|
802
|
+
this._injector.add(o);
|
|
803
|
+
}), [V].forEach((o) => {
|
|
804
|
+
this._commandService.registerCommand(o);
|
|
805
|
+
}), this._injector.get(W);
|
|
789
806
|
}
|
|
790
807
|
onReady() {
|
|
791
|
-
this._injector.get(
|
|
808
|
+
this._injector.get(k), this._injector.get(Y);
|
|
792
809
|
}
|
|
793
810
|
onRendered() {
|
|
794
|
-
this._injector.get(
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
],
|
|
811
|
+
this._injector.get(Z), this._injector.get(z), this._injector.get(G);
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
Ae(q, "pluginName", Oe);
|
|
815
|
+
Ae(q, "type", b.UNIVER_SHEET);
|
|
816
|
+
q = Sn([
|
|
817
|
+
Ge(it, tt),
|
|
818
|
+
oe(1, v(Ye)),
|
|
819
|
+
oe(2, v(se)),
|
|
820
|
+
oe(3, Ke)
|
|
821
|
+
], q);
|
|
805
822
|
export {
|
|
806
|
-
AddCommentCommand,
|
|
807
|
-
DeleteCommentCommand,
|
|
808
|
-
DeleteCommentTreeCommand,
|
|
809
|
-
|
|
810
|
-
IThreadCommentMentionDataService,
|
|
811
|
-
ResolveCommentCommand,
|
|
812
|
-
SHEETS_THREAD_COMMENT,
|
|
813
|
-
SheetsThreadCommentPopupService,
|
|
814
|
-
ShowAddSheetCommentModalOperation,
|
|
815
|
-
UniverSheetsThreadCommentUIPlugin,
|
|
816
|
-
|
|
817
|
-
UpdateCommentCommand
|
|
823
|
+
An as AddCommentCommand,
|
|
824
|
+
Vn as DeleteCommentCommand,
|
|
825
|
+
Bn as DeleteCommentTreeCommand,
|
|
826
|
+
Ln as IThreadCommentDataSourceService,
|
|
827
|
+
xn as IThreadCommentMentionDataService,
|
|
828
|
+
Hn as ResolveCommentCommand,
|
|
829
|
+
Oe as SHEETS_THREAD_COMMENT,
|
|
830
|
+
R as SheetsThreadCommentPopupService,
|
|
831
|
+
V as ShowAddSheetCommentModalOperation,
|
|
832
|
+
q as UniverSheetsThreadCommentUIPlugin,
|
|
833
|
+
Dn as UniverThreadCommentUIPlugin,
|
|
834
|
+
Fn as UpdateCommentCommand
|
|
818
835
|
};
|