@gct-paas/word 0.1.16 → 0.1.17
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.
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { CommandBase } from '../base/CommandBase';
|
|
2
2
|
import { Doc } from '../../view/Doc';
|
|
3
|
+
import { WrText } from '../../model/document';
|
|
3
4
|
import { CommandPayloadMap } from '../types';
|
|
4
5
|
export declare class MergeCells extends CommandBase<'mergeCells'> {
|
|
5
6
|
constructor(doc: Doc, payload?: CommandPayloadMap['mergeCells']);
|
|
6
|
-
protected execute(): Promise<
|
|
7
|
+
protected execute(): Promise<{
|
|
8
|
+
wr: WrText | undefined;
|
|
9
|
+
pos: number;
|
|
10
|
+
side: string;
|
|
11
|
+
} | null>;
|
|
7
12
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { CommandBase } from '../base/CommandBase';
|
|
2
2
|
import { Doc } from '../../view/Doc';
|
|
3
|
+
import { WrText } from '../../model/document';
|
|
3
4
|
import { CommandPayloadMap } from '../types';
|
|
4
5
|
export declare class UnmergeCells extends CommandBase<'unmergeCells'> {
|
|
5
6
|
constructor(doc: Doc, payload?: CommandPayloadMap['unmergeCells']);
|
|
6
|
-
protected execute(): Promise<
|
|
7
|
+
protected execute(): Promise<{
|
|
8
|
+
wr: WrText | undefined;
|
|
9
|
+
pos: number;
|
|
10
|
+
side: string;
|
|
11
|
+
} | null | undefined>;
|
|
7
12
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -28646,7 +28646,7 @@ class Enter extends CommandBase {
|
|
|
28646
28646
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
28647
28647
|
let targetModelIndex = 0;
|
|
28648
28648
|
if (!run.isPlaceholderRun) {
|
|
28649
|
-
if (run.isWidgetRun) {
|
|
28649
|
+
if (run.isWidgetRun || run.isPageWidgetRun) {
|
|
28650
28650
|
const hitwr = mapper.getModelNodeByLayoutId(run.id);
|
|
28651
28651
|
let wrIndex = wp.children.findIndex((r) => r.id === hitwr.id);
|
|
28652
28652
|
targetModelIndex = ++wrIndex;
|
|
@@ -37210,7 +37210,15 @@ class MergeCells extends CommandBase {
|
|
|
37210
37210
|
topLeftCell.merge(rowSpan, colSpan, { skipConsistency: true });
|
|
37211
37211
|
}
|
|
37212
37212
|
});
|
|
37213
|
-
|
|
37213
|
+
const mapper = this.doc.layoutMapper;
|
|
37214
|
+
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
37215
|
+
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
37216
|
+
const wr = mapper.getModelNodeById(start.modelRef.id);
|
|
37217
|
+
return {
|
|
37218
|
+
wr,
|
|
37219
|
+
pos: -1,
|
|
37220
|
+
side: "after"
|
|
37221
|
+
};
|
|
37214
37222
|
}
|
|
37215
37223
|
}
|
|
37216
37224
|
const __vite_glob_0_21$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -38036,7 +38044,15 @@ class UnmergeCells extends CommandBase {
|
|
|
38036
38044
|
});
|
|
38037
38045
|
}
|
|
38038
38046
|
});
|
|
38039
|
-
|
|
38047
|
+
const mapper = this.doc.layoutMapper;
|
|
38048
|
+
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
38049
|
+
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
38050
|
+
const wr = mapper.getModelNodeById(start.modelRef.id);
|
|
38051
|
+
return {
|
|
38052
|
+
wr,
|
|
38053
|
+
pos: -1,
|
|
38054
|
+
side: "after"
|
|
38055
|
+
};
|
|
38040
38056
|
}
|
|
38041
38057
|
}
|
|
38042
38058
|
const __vite_glob_0_47 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|