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