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