@univerjs/sheets-ui 0.6.0-nightly.202502121606 → 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/cjs/facade.js +1 -1
- package/lib/cjs/index.js +35 -35
- package/lib/es/facade.js +59 -65
- package/lib/es/index.js +4886 -4917
- package/lib/types/facade/f-event.d.ts +3 -2
- package/lib/types/facade/f-univer.d.ts +3 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +29 -29
- package/package.json +15 -15
package/lib/es/facade.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICommandService as P, CanceledError as j, IUniverInstanceService as A, RichTextValue as O, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as W, LifecycleService as L, DisposableCollection as y, LifecycleStages as F, UniverInstanceType as ce, ILogService as T, toDisposable as b, awaitTime as de, InterceptorEffectEnum as he, generateRandomId as le } from "@univerjs/core";
|
|
2
|
+
import { FUniver as te, FEventName as re } from "@univerjs/core/facade";
|
|
2
3
|
import { RichTextEditingMutation as ge } from "@univerjs/docs";
|
|
3
4
|
import { IRenderManagerService as m, DeviceInputEventType as N, SHEET_VIEWPORT_KEY as ue, sheetContentViewportKeys as ve } from "@univerjs/engine-render";
|
|
4
|
-
import { SheetsSelectionsService as
|
|
5
|
-
import { SetCellEditVisibleOperation as k, IEditorBridgeService as H, SetZoomRatioCommand as z, HoverManagerService as w, DragManagerService as U, SheetScrollManagerService as
|
|
5
|
+
import { SheetsSelectionsService as Ce, COMMAND_LISTENER_SKELETON_CHANGE as Se, getSkeletonChangedEffectedRange as me, InterceptCellContentPriority as be, SheetInterceptorService as Ee, INTERCEPTOR_POINT as pe } from "@univerjs/sheets";
|
|
6
|
+
import { SetCellEditVisibleOperation as k, IEditorBridgeService as H, SetZoomRatioCommand as z, HoverManagerService as w, DragManagerService as U, SheetScrollManagerService as D, SheetPasteShortKeyCommand as V, ISheetClipboardService as ne, SheetSkeletonManagerService as R, SHEET_VIEW_KEY as f, ISheetSelectionRenderService as x, ChangeZoomRatioCommand as we, SheetsScrollRenderController as fe, SetWorksheetColAutoWidthCommand as ke, SetColumnHeaderHeightCommand as Ie, SetRowHeaderWidthCommand as _e, SheetCanvasPopManagerService as Z, CellAlertManagerService as Pe, IMarkSelectionService as Re } from "@univerjs/sheets-ui";
|
|
6
7
|
import { FSheetHooks as $, FWorkbook as ie, FWorksheet as oe, FPermission as se, FRange as ae } from "@univerjs/sheets/facade";
|
|
7
8
|
import { KeyCode as B, CutCommand as K, CopyCommand as Y, PasteCommand as X, IClipboardInterfaceService as He, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as J, HTML_CLIPBOARD_MIME_TYPE as G, supportClipboardAPI as q, ISidebarService as Me, IDialogService as ye, ComponentManager as Q } from "@univerjs/ui";
|
|
8
|
-
import { filter as
|
|
9
|
+
import { filter as C, combineLatest as Ue } from "rxjs";
|
|
9
10
|
class xe extends te {
|
|
10
11
|
// eslint-disable-next-line max-lines-per-function
|
|
11
12
|
_initSheetUIEvent(e) {
|
|
@@ -16,12 +17,12 @@ class xe extends te {
|
|
|
16
17
|
if (t.id !== k.id) return;
|
|
17
18
|
const n = this.getActiveSheet();
|
|
18
19
|
if (!n) return;
|
|
19
|
-
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType:
|
|
20
|
+
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
|
|
20
21
|
if (u) {
|
|
21
22
|
const h = {
|
|
22
23
|
row: v.row,
|
|
23
24
|
column: v.column,
|
|
24
|
-
eventType:
|
|
25
|
+
eventType: S,
|
|
25
26
|
keycode: l,
|
|
26
27
|
workbook: o,
|
|
27
28
|
worksheet: s,
|
|
@@ -37,18 +38,18 @@ class xe extends te {
|
|
|
37
38
|
if (t.id !== k.id) return;
|
|
38
39
|
const n = this.getActiveSheet();
|
|
39
40
|
if (!n) return;
|
|
40
|
-
const { workbook: o, worksheet: s } = n, c = e.get(H), g = e.get(A), u = t.params, { visible: l, keycode:
|
|
41
|
+
const { workbook: o, worksheet: s } = n, c = e.get(H), g = e.get(A), u = t.params, { visible: l, keycode: S, eventType: v } = u, h = c.getEditLocation();
|
|
41
42
|
if (!l) {
|
|
42
43
|
const I = {
|
|
43
44
|
row: h.row,
|
|
44
45
|
column: h.column,
|
|
45
46
|
eventType: v,
|
|
46
|
-
keycode:
|
|
47
|
+
keycode: S,
|
|
47
48
|
workbook: o,
|
|
48
49
|
worksheet: s,
|
|
49
50
|
isZenEditor: !1,
|
|
50
51
|
value: O.create(g.getUnit(W).getSnapshot()),
|
|
51
|
-
isConfirm:
|
|
52
|
+
isConfirm: S !== B.ESC
|
|
52
53
|
};
|
|
53
54
|
if (this.fireEvent(this.Event.BeforeSheetEditEnd, I), I.cancel)
|
|
54
55
|
throw new j();
|
|
@@ -60,12 +61,12 @@ class xe extends te {
|
|
|
60
61
|
if (t.id !== k.id) return;
|
|
61
62
|
const n = this.getCommandSheetTarget(t);
|
|
62
63
|
if (!n) return;
|
|
63
|
-
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType:
|
|
64
|
+
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
|
|
64
65
|
if (u) {
|
|
65
66
|
const h = {
|
|
66
67
|
row: v.row,
|
|
67
68
|
column: v.column,
|
|
68
|
-
eventType:
|
|
69
|
+
eventType: S,
|
|
69
70
|
keycode: l,
|
|
70
71
|
workbook: o,
|
|
71
72
|
worksheet: s,
|
|
@@ -80,12 +81,12 @@ class xe extends te {
|
|
|
80
81
|
if (t.id !== k.id) return;
|
|
81
82
|
const n = this.getCommandSheetTarget(t);
|
|
82
83
|
if (!n) return;
|
|
83
|
-
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType:
|
|
84
|
+
const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
|
|
84
85
|
if (!u) {
|
|
85
86
|
const h = {
|
|
86
87
|
row: v.row,
|
|
87
88
|
column: v.column,
|
|
88
|
-
eventType:
|
|
89
|
+
eventType: S,
|
|
89
90
|
keycode: l,
|
|
90
91
|
workbook: o,
|
|
91
92
|
worksheet: s,
|
|
@@ -105,10 +106,10 @@ class xe extends te {
|
|
|
105
106
|
if (!c.isVisible().visible) return;
|
|
106
107
|
const { unitId: l } = u;
|
|
107
108
|
if (l === W) {
|
|
108
|
-
const { row:
|
|
109
|
+
const { row: S, column: v } = c.getEditLocation(), h = {
|
|
109
110
|
workbook: o,
|
|
110
111
|
worksheet: s,
|
|
111
|
-
row:
|
|
112
|
+
row: S,
|
|
112
113
|
column: v,
|
|
113
114
|
value: O.create(g.getUnit(W).getSnapshot()),
|
|
114
115
|
isZenEditor: !1
|
|
@@ -148,16 +149,16 @@ class xe extends te {
|
|
|
148
149
|
_initObserverListener(e) {
|
|
149
150
|
const t = e.get(A).getFocusedUnit(), n = t == null ? void 0 : t.getUnitId(), o = e.get(m);
|
|
150
151
|
if (n) {
|
|
151
|
-
const l = e.get(L),
|
|
152
|
+
const l = e.get(L), S = new y();
|
|
152
153
|
this.disposeWithMe(l.lifecycle$.subscribe((v) => {
|
|
153
154
|
if (v < F.Rendered) return;
|
|
154
|
-
|
|
155
|
+
S.dispose();
|
|
155
156
|
const h = e.get(w), I = e.get(U);
|
|
156
157
|
h && (this.registerEventHandler(
|
|
157
158
|
this.Event.CellClicked,
|
|
158
159
|
() => {
|
|
159
160
|
var d;
|
|
160
|
-
return (d = h.currentClickedCell$) == null ? void 0 : d.pipe(
|
|
161
|
+
return (d = h.currentClickedCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
161
162
|
const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
|
|
162
163
|
a && this.fireEvent(this.Event.CellClicked, {
|
|
163
164
|
...a,
|
|
@@ -171,7 +172,7 @@ class xe extends te {
|
|
|
171
172
|
this.Event.CellHover,
|
|
172
173
|
() => {
|
|
173
174
|
var d;
|
|
174
|
-
return (d = h.currentRichText$) == null ? void 0 : d.pipe(
|
|
175
|
+
return (d = h.currentRichText$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
175
176
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
176
177
|
a && this.fireEvent(this.Event.CellHover, {
|
|
177
178
|
...a,
|
|
@@ -185,7 +186,7 @@ class xe extends te {
|
|
|
185
186
|
this.Event.CellPointerDown,
|
|
186
187
|
() => {
|
|
187
188
|
var d;
|
|
188
|
-
return (d = h.currentPointerDownCell$) == null ? void 0 : d.pipe(
|
|
189
|
+
return (d = h.currentPointerDownCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
189
190
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
190
191
|
a && this.fireEvent(this.Event.CellPointerDown, {
|
|
191
192
|
...a,
|
|
@@ -199,7 +200,7 @@ class xe extends te {
|
|
|
199
200
|
this.Event.CellPointerUp,
|
|
200
201
|
() => {
|
|
201
202
|
var d;
|
|
202
|
-
return (d = h.currentPointerUpCell$) == null ? void 0 : d.pipe(
|
|
203
|
+
return (d = h.currentPointerUpCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
203
204
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
204
205
|
a && this.fireEvent(this.Event.CellPointerUp, {
|
|
205
206
|
...a,
|
|
@@ -213,7 +214,7 @@ class xe extends te {
|
|
|
213
214
|
this.Event.CellPointerMove,
|
|
214
215
|
() => {
|
|
215
216
|
var d;
|
|
216
|
-
return (d = h.currentCellPosWithEvent$) == null ? void 0 : d.pipe(
|
|
217
|
+
return (d = h.currentCellPosWithEvent$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
217
218
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
218
219
|
a && this.fireEvent(this.Event.CellPointerMove, {
|
|
219
220
|
...a,
|
|
@@ -227,7 +228,7 @@ class xe extends te {
|
|
|
227
228
|
this.Event.DragOver,
|
|
228
229
|
() => {
|
|
229
230
|
var d;
|
|
230
|
-
return (d = I.currentCell$) == null ? void 0 : d.pipe(
|
|
231
|
+
return (d = I.currentCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
231
232
|
const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
|
|
232
233
|
a && this.fireEvent(this.Event.DragOver, {
|
|
233
234
|
...a,
|
|
@@ -241,7 +242,7 @@ class xe extends te {
|
|
|
241
242
|
this.Event.Drop,
|
|
242
243
|
() => {
|
|
243
244
|
var d;
|
|
244
|
-
return (d = I.endCell$) == null ? void 0 : d.pipe(
|
|
245
|
+
return (d = I.endCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
245
246
|
const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
|
|
246
247
|
a && this.fireEvent(this.Event.Drop, {
|
|
247
248
|
...a,
|
|
@@ -255,7 +256,7 @@ class xe extends te {
|
|
|
255
256
|
this.Event.RowHeaderClick,
|
|
256
257
|
() => {
|
|
257
258
|
var d;
|
|
258
|
-
return (d = h.currentRowHeaderClick$) == null ? void 0 : d.pipe(
|
|
259
|
+
return (d = h.currentRowHeaderClick$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
259
260
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
260
261
|
a && this.fireEvent(this.Event.RowHeaderClick, {
|
|
261
262
|
...a,
|
|
@@ -267,7 +268,7 @@ class xe extends te {
|
|
|
267
268
|
this.Event.RowHeaderPointerDown,
|
|
268
269
|
() => {
|
|
269
270
|
var d;
|
|
270
|
-
return (d = h.currentRowHeaderPointerDown$) == null ? void 0 : d.pipe(
|
|
271
|
+
return (d = h.currentRowHeaderPointerDown$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
271
272
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
272
273
|
a && this.fireEvent(this.Event.RowHeaderPointerDown, {
|
|
273
274
|
...a,
|
|
@@ -279,7 +280,7 @@ class xe extends te {
|
|
|
279
280
|
this.Event.RowHeaderPointerUp,
|
|
280
281
|
() => {
|
|
281
282
|
var d;
|
|
282
|
-
return (d = h.currentRowHeaderPointerUp$) == null ? void 0 : d.pipe(
|
|
283
|
+
return (d = h.currentRowHeaderPointerUp$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
283
284
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
284
285
|
a && this.fireEvent(this.Event.RowHeaderPointerUp, {
|
|
285
286
|
...a,
|
|
@@ -291,7 +292,7 @@ class xe extends te {
|
|
|
291
292
|
this.Event.RowHeaderHover,
|
|
292
293
|
() => {
|
|
293
294
|
var d;
|
|
294
|
-
return (d = h.currentHoveredRowHeader$) == null ? void 0 : d.pipe(
|
|
295
|
+
return (d = h.currentHoveredRowHeader$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
295
296
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
296
297
|
a && this.fireEvent(this.Event.RowHeaderHover, {
|
|
297
298
|
...a,
|
|
@@ -303,7 +304,7 @@ class xe extends te {
|
|
|
303
304
|
this.Event.ColumnHeaderClick,
|
|
304
305
|
() => {
|
|
305
306
|
var d;
|
|
306
|
-
return (d = h.currentColHeaderClick$) == null ? void 0 : d.pipe(
|
|
307
|
+
return (d = h.currentColHeaderClick$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
307
308
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
308
309
|
a && this.fireEvent(this.Event.ColumnHeaderClick, {
|
|
309
310
|
...a,
|
|
@@ -315,7 +316,7 @@ class xe extends te {
|
|
|
315
316
|
this.Event.ColumnHeaderPointerDown,
|
|
316
317
|
() => {
|
|
317
318
|
var d;
|
|
318
|
-
return (d = h.currentColHeaderPointerDown$) == null ? void 0 : d.pipe(
|
|
319
|
+
return (d = h.currentColHeaderPointerDown$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
319
320
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
320
321
|
a && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
|
|
321
322
|
...a,
|
|
@@ -327,7 +328,7 @@ class xe extends te {
|
|
|
327
328
|
this.Event.ColumnHeaderPointerUp,
|
|
328
329
|
() => {
|
|
329
330
|
var d;
|
|
330
|
-
return (d = h.currentColHeaderPointerUp$) == null ? void 0 : d.pipe(
|
|
331
|
+
return (d = h.currentColHeaderPointerUp$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
331
332
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
332
333
|
a && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
|
|
333
334
|
...a,
|
|
@@ -339,7 +340,7 @@ class xe extends te {
|
|
|
339
340
|
this.Event.ColumnHeaderHover,
|
|
340
341
|
() => {
|
|
341
342
|
var d;
|
|
342
|
-
return (d = h.currentHoveredColHeader$) == null ? void 0 : d.pipe(
|
|
343
|
+
return (d = h.currentHoveredColHeader$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
|
|
343
344
|
const a = this.getSheetTarget(i.unitId, i.subUnitId);
|
|
344
345
|
a && this.fireEvent(this.Event.ColumnHeaderHover, {
|
|
345
346
|
...a,
|
|
@@ -348,7 +349,7 @@ class xe extends te {
|
|
|
348
349
|
});
|
|
349
350
|
}
|
|
350
351
|
));
|
|
351
|
-
})), this.disposeWithMe(
|
|
352
|
+
})), this.disposeWithMe(S);
|
|
352
353
|
}
|
|
353
354
|
const s = /* @__PURE__ */ new Map();
|
|
354
355
|
let c;
|
|
@@ -356,15 +357,15 @@ class xe extends te {
|
|
|
356
357
|
o.created$,
|
|
357
358
|
g.lifecycle$
|
|
358
359
|
]);
|
|
359
|
-
this.disposeWithMe(u.subscribe(([l,
|
|
360
|
+
this.disposeWithMe(u.subscribe(([l, S]) => {
|
|
360
361
|
var i;
|
|
361
|
-
if (l.type === ce.UNIVER_SHEET && (c = l),
|
|
362
|
+
if (l.type === ce.UNIVER_SHEET && (c = l), S <= F.Rendered) return;
|
|
362
363
|
const v = new y();
|
|
363
364
|
if (!c) return;
|
|
364
365
|
const h = this.getWorkbook(c.unitId);
|
|
365
366
|
if (!h) return;
|
|
366
367
|
s.get(c.unitId) && ((i = s.get(c.unitId)) == null || i.dispose()), s.set(c.unitId, v);
|
|
367
|
-
const I = c.with(
|
|
368
|
+
const I = c.with(D), d = c.with(Ce);
|
|
368
369
|
v.add(this.registerEventHandler(
|
|
369
370
|
this.Event.Scroll,
|
|
370
371
|
() => I.validViewportScrollInfo$.subscribe((a) => {
|
|
@@ -416,8 +417,8 @@ class xe extends te {
|
|
|
416
417
|
})
|
|
417
418
|
)), c = null, this.disposeWithMe(v);
|
|
418
419
|
})), this.disposeWithMe(o.disposed$.subscribe((l) => {
|
|
419
|
-
var
|
|
420
|
-
(
|
|
420
|
+
var S;
|
|
421
|
+
(S = s.get(l)) == null || S.dispose(), s.delete(l);
|
|
421
422
|
})), this.disposeWithMe(() => {
|
|
422
423
|
s.forEach((l) => {
|
|
423
424
|
l.dispose();
|
|
@@ -467,7 +468,7 @@ class xe extends te {
|
|
|
467
468
|
), t;
|
|
468
469
|
}
|
|
469
470
|
), this.disposeWithMe(r.onCommandExecuted((t) => {
|
|
470
|
-
if (
|
|
471
|
+
if (Se.indexOf(t.id) > -1) {
|
|
471
472
|
const n = this.getActiveSheet();
|
|
472
473
|
if (!n) return;
|
|
473
474
|
const o = me(t, n.worksheet.getMaxColumns()).map((s) => {
|
|
@@ -574,7 +575,7 @@ class xe extends te {
|
|
|
574
575
|
}
|
|
575
576
|
async _beforeClipboardPasteAsync() {
|
|
576
577
|
if (!q()) {
|
|
577
|
-
this._injector.get(
|
|
578
|
+
this._injector.get(T).warn("[Facade]: The navigator object only supports the browser environment");
|
|
578
579
|
return;
|
|
579
580
|
}
|
|
580
581
|
const e = await this._generateClipboardPasteParamAsync();
|
|
@@ -583,7 +584,7 @@ class xe extends te {
|
|
|
583
584
|
}
|
|
584
585
|
async _clipboardPasteAsync() {
|
|
585
586
|
if (!q()) {
|
|
586
|
-
this._injector.get(
|
|
587
|
+
this._injector.get(T).warn("[Facade]: The navigator object only supports the browser environment");
|
|
587
588
|
return;
|
|
588
589
|
}
|
|
589
590
|
const e = await this._generateClipboardPasteParamAsync();
|
|
@@ -652,7 +653,7 @@ class xe extends te {
|
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
655
|
te.extend(xe);
|
|
655
|
-
class
|
|
656
|
+
class Te extends ie {
|
|
656
657
|
openSiderbar(e) {
|
|
657
658
|
return this._logDeprecation("openSiderbar"), this._injector.get(Me).open(e);
|
|
658
659
|
}
|
|
@@ -667,7 +668,7 @@ class De extends ie {
|
|
|
667
668
|
return t;
|
|
668
669
|
}
|
|
669
670
|
_logDeprecation(e) {
|
|
670
|
-
this._injector.get(
|
|
671
|
+
this._injector.get(T).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
|
|
671
672
|
}
|
|
672
673
|
generateCellParams(e) {
|
|
673
674
|
const r = this.getActiveSheet();
|
|
@@ -681,7 +682,7 @@ class De extends ie {
|
|
|
681
682
|
onCellClick(e) {
|
|
682
683
|
const r = this._injector.get(w);
|
|
683
684
|
return b(
|
|
684
|
-
r.currentClickedCell$.pipe(
|
|
685
|
+
r.currentClickedCell$.pipe(C((t) => !!t)).subscribe((t) => {
|
|
685
686
|
e(t);
|
|
686
687
|
})
|
|
687
688
|
);
|
|
@@ -689,7 +690,7 @@ class De extends ie {
|
|
|
689
690
|
onCellHover(e) {
|
|
690
691
|
const r = this._injector.get(w);
|
|
691
692
|
return b(
|
|
692
|
-
r.currentRichText$.pipe(
|
|
693
|
+
r.currentRichText$.pipe(C((t) => !!t)).subscribe(e)
|
|
693
694
|
);
|
|
694
695
|
}
|
|
695
696
|
onCellPointerDown(e) {
|
|
@@ -707,7 +708,7 @@ class De extends ie {
|
|
|
707
708
|
onCellPointerMove(e) {
|
|
708
709
|
const r = this._injector.get(w);
|
|
709
710
|
return b(
|
|
710
|
-
r.currentCellPosWithEvent$.pipe(
|
|
711
|
+
r.currentCellPosWithEvent$.pipe(C((t) => !!t)).subscribe((t) => {
|
|
711
712
|
e(t, t.event);
|
|
712
713
|
})
|
|
713
714
|
);
|
|
@@ -715,7 +716,7 @@ class De extends ie {
|
|
|
715
716
|
onDragOver(e) {
|
|
716
717
|
const r = this._injector.get(U);
|
|
717
718
|
return b(
|
|
718
|
-
r.currentCell$.pipe(
|
|
719
|
+
r.currentCell$.pipe(C((t) => !!t)).subscribe((t) => {
|
|
719
720
|
e(t);
|
|
720
721
|
})
|
|
721
722
|
);
|
|
@@ -723,7 +724,7 @@ class De extends ie {
|
|
|
723
724
|
onDrop(e) {
|
|
724
725
|
const r = this._injector.get(U);
|
|
725
726
|
return b(
|
|
726
|
-
r.endCell$.pipe(
|
|
727
|
+
r.endCell$.pipe(C((t) => !!t)).subscribe((t) => {
|
|
727
728
|
e(t);
|
|
728
729
|
})
|
|
729
730
|
);
|
|
@@ -757,7 +758,7 @@ class De extends ie {
|
|
|
757
758
|
*/
|
|
758
759
|
getScrollStateBySheetId(e) {
|
|
759
760
|
const r = this._workbook.getUnitId(), n = this._injector.get(m).getRenderById(r);
|
|
760
|
-
return n ? n.with(
|
|
761
|
+
return n ? n.with(D).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
|
|
761
762
|
}
|
|
762
763
|
disableSelection() {
|
|
763
764
|
const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
|
|
@@ -776,8 +777,8 @@ class De extends ie {
|
|
|
776
777
|
return t && t.with(x).showSelection(), this;
|
|
777
778
|
}
|
|
778
779
|
}
|
|
779
|
-
ie.extend(
|
|
780
|
-
class
|
|
780
|
+
ie.extend(Te);
|
|
781
|
+
class De extends oe {
|
|
781
782
|
refreshCanvas() {
|
|
782
783
|
const e = this._injector.get(m), r = this._fWorkbook.id, t = e.getRenderById(r);
|
|
783
784
|
if (!t)
|
|
@@ -827,11 +828,11 @@ class Te extends oe {
|
|
|
827
828
|
sheetViewStartColumn: 0,
|
|
828
829
|
sheetViewStartRow: 0
|
|
829
830
|
}, r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(m).getRenderById(r);
|
|
830
|
-
return o && o.with(
|
|
831
|
+
return o && o.with(D).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
|
|
831
832
|
}
|
|
832
833
|
onScroll(e) {
|
|
833
834
|
var o;
|
|
834
|
-
const r = this._workbook.getUnitId(), n = (o = this._injector.get(m).getRenderById(r)) == null ? void 0 : o.with(
|
|
835
|
+
const r = this._workbook.getUnitId(), n = (o = this._injector.get(m).getRenderById(r)) == null ? void 0 : o.with(D);
|
|
835
836
|
if (n) {
|
|
836
837
|
const s = n.validViewportScrollInfo$.subscribe((c) => {
|
|
837
838
|
e(c);
|
|
@@ -907,7 +908,7 @@ class Te extends oe {
|
|
|
907
908
|
return s;
|
|
908
909
|
}
|
|
909
910
|
}
|
|
910
|
-
oe.extend(
|
|
911
|
+
oe.extend(De);
|
|
911
912
|
class Be extends se {
|
|
912
913
|
setPermissionDialogVisible(e) {
|
|
913
914
|
this._permissionService.setShowComponents(e);
|
|
@@ -927,8 +928,8 @@ class Ae extends $ {
|
|
|
927
928
|
onCellDrop(e) {
|
|
928
929
|
return b(this._injector.get(U).endCell$.subscribe(e));
|
|
929
930
|
}
|
|
930
|
-
onCellRender(e, r = he.Style, t =
|
|
931
|
-
return this._injector.get(
|
|
931
|
+
onCellRender(e, r = he.Style, t = be.DATA_VALIDATION) {
|
|
932
|
+
return this._injector.get(Ee).intercept(pe.CELL_CONTENT, {
|
|
932
933
|
effect: r,
|
|
933
934
|
handler: (n, o, s) => s({
|
|
934
935
|
...n,
|
|
@@ -959,14 +960,7 @@ const M = {
|
|
|
959
960
|
CellPointerDown: "CellPointerDown",
|
|
960
961
|
CellPointerUp: "CellPointerUp",
|
|
961
962
|
CellPointerMove: "CellPointerMove",
|
|
962
|
-
CellHover: "CellHover"
|
|
963
|
-
DragOver: "DragOver",
|
|
964
|
-
Drop: "Drop",
|
|
965
|
-
Scroll: "Scroll",
|
|
966
|
-
SelectionMoveStart: "SelectionMoveStart",
|
|
967
|
-
SelectionMoving: "SelectionMoving",
|
|
968
|
-
SelectionMoveEnd: "SelectionMoveEnd",
|
|
969
|
-
SelectionChanged: "SelectionChanged"
|
|
963
|
+
CellHover: "CellHover"
|
|
970
964
|
};
|
|
971
965
|
class We extends re {
|
|
972
966
|
get BeforeClipboardChange() {
|
|
@@ -1064,7 +1058,7 @@ re.extend(We);
|
|
|
1064
1058
|
class $e extends ae {
|
|
1065
1059
|
getCell() {
|
|
1066
1060
|
var c;
|
|
1067
|
-
const e = this._injector.get(m), r = this._injector.get(
|
|
1061
|
+
const e = this._injector.get(m), r = this._injector.get(T), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), o = e.getRenderById(t), s = (c = o == null ? void 0 : o.with(R).getSkeletonParam(n)) == null ? void 0 : c.skeleton;
|
|
1068
1062
|
if (!s)
|
|
1069
1063
|
throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"), new Error("`FRange.getCell` can only be called in current worksheet");
|
|
1070
1064
|
return s.getCellWithCoordByIndex(this._range.startRow, this._range.startColumn);
|