@univerjs/sheets-thread-comment-ui 0.5.5-nightly.202501211606 → 0.5.5

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