@univerjs/sheets-thread-comment-ui 0.6.0-nightly.202502111606 → 0.6.0-nightly.202502131606

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