@gct-paas/word 0.1.18 → 0.1.19
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/dist/base/calendar/src/calendar.vue.d.ts +6 -4
- package/dist/base/calendar/src/time.vue.d.ts +1 -0
- package/dist/core/command/commands/Backspace.d.ts +2 -0
- package/dist/core/command/commands/MergeCells.d.ts +7 -1
- package/dist/core/command/commands/UnmergeCells.d.ts +7 -1
- package/dist/core/interaction/InteractionController.d.ts +1 -0
- package/dist/core/interaction/types.d.ts +1 -0
- package/dist/core/interaction/useInteraction.d.ts +1 -0
- package/dist/core/layout/handlers/fields/BaseHandler.d.ts +1 -1
- package/dist/core/model/base/ModelGroup.d.ts +6 -0
- package/dist/core/model/document/Wtr.d.ts +2 -2
- package/dist/core/model/document/WtrPr.d.ts +13 -1
- package/dist/core/view/TableRow.d.ts +3 -0
- package/dist/index.es.js +1132 -752
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +1 -0
- package/dist/sdk/types/index.d.ts +2 -0
- package/dist/utils/func/form.d.ts +5 -0
- package/dist/word.css +310 -266
- package/package.json +1 -1
|
@@ -8,15 +8,17 @@ type __VLS_Props = {
|
|
|
8
8
|
minDate?: string | number | Date;
|
|
9
9
|
maxDate?: string | number | Date;
|
|
10
10
|
timeFormat?: 'HH:mm:ss' | 'HH:mm' | 'HH';
|
|
11
|
+
showClearBtn?: boolean;
|
|
11
12
|
};
|
|
12
13
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
-
change: (value: Date) => any;
|
|
14
|
-
"update:modelValue": (value: Date) => any;
|
|
14
|
+
change: (value: Date | null) => any;
|
|
15
|
+
"update:modelValue": (value: Date | null) => any;
|
|
15
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onChange?: ((value: Date) => any) | undefined;
|
|
17
|
-
"onUpdate:modelValue"?: ((value: Date) => any) | undefined;
|
|
17
|
+
onChange?: ((value: Date | null) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: Date | null) => any) | undefined;
|
|
18
19
|
}>, {
|
|
19
20
|
mode: "datetime" | "date";
|
|
21
|
+
showClearBtn: boolean;
|
|
20
22
|
weekStart: number;
|
|
21
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
24
|
export default _default;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { CommandBase } from '../base/CommandBase';
|
|
2
2
|
import { Doc } from '../../view/Doc';
|
|
3
|
-
import { WrText } from '../../model/document';
|
|
3
|
+
import { Wp, WrText } from '../../model/document';
|
|
4
4
|
import { CommandPayloadMap } from '../types';
|
|
5
5
|
export declare class MergeCells extends CommandBase<'mergeCells'> {
|
|
6
6
|
constructor(doc: Doc, payload?: CommandPayloadMap['mergeCells']);
|
|
7
7
|
protected execute(): Promise<{
|
|
8
|
+
wp: Wp;
|
|
9
|
+
pos: number;
|
|
10
|
+
side: string;
|
|
11
|
+
wr?: undefined;
|
|
12
|
+
} | {
|
|
8
13
|
wr: WrText | undefined;
|
|
9
14
|
pos: number;
|
|
10
15
|
side: string;
|
|
16
|
+
wp?: undefined;
|
|
11
17
|
} | null>;
|
|
12
18
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { CommandBase } from '../base/CommandBase';
|
|
2
2
|
import { Doc } from '../../view/Doc';
|
|
3
|
-
import { WrText } from '../../model/document';
|
|
3
|
+
import { Wp, WrText } from '../../model/document';
|
|
4
4
|
import { CommandPayloadMap } from '../types';
|
|
5
5
|
export declare class UnmergeCells extends CommandBase<'unmergeCells'> {
|
|
6
6
|
constructor(doc: Doc, payload?: CommandPayloadMap['unmergeCells']);
|
|
7
7
|
protected execute(): Promise<{
|
|
8
|
+
wp: Wp;
|
|
9
|
+
pos: number;
|
|
10
|
+
side: string;
|
|
11
|
+
wr?: undefined;
|
|
12
|
+
} | {
|
|
8
13
|
wr: WrText | undefined;
|
|
9
14
|
pos: number;
|
|
10
15
|
side: string;
|
|
16
|
+
wp?: undefined;
|
|
11
17
|
} | null | undefined>;
|
|
12
18
|
}
|
|
@@ -5,6 +5,7 @@ export declare function useInteraction(docRef: Ref<Doc | null>): {
|
|
|
5
5
|
readonly tableId: string;
|
|
6
6
|
readonly axis: "row" | "col" | "all";
|
|
7
7
|
readonly index: number;
|
|
8
|
+
readonly realRowIndex?: number | undefined;
|
|
8
9
|
} | null | undefined;
|
|
9
10
|
readonly activeTableId?: string | undefined;
|
|
10
11
|
readonly dragHoverId?: string | undefined;
|
|
@@ -20,7 +20,7 @@ export declare class BaseHandler {
|
|
|
20
20
|
label: string;
|
|
21
21
|
type: 'placeholder' | 'fieldName' | 'noneLabel' | 'default';
|
|
22
22
|
};
|
|
23
|
-
static
|
|
23
|
+
static formatFieldValue(ctx: HandlerContext, valuePath: string): any;
|
|
24
24
|
/**
|
|
25
25
|
* 渲染组件值 label -> value
|
|
26
26
|
* @param ctx
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ModelNode, ModelNodeOptions } from './ModelNode';
|
|
2
2
|
import { RawElement } from '../types/raw';
|
|
3
|
+
import { Wp } from '../document/Wp';
|
|
3
4
|
export interface ModelGroupOptions<T = ModelNode | RawElement> extends ModelNodeOptions {
|
|
4
5
|
children?: T[];
|
|
5
6
|
}
|
|
@@ -52,6 +53,11 @@ export declare abstract class ModelGroup<T = ModelNode | RawElement> extends Mod
|
|
|
52
53
|
* @returns 第一个子节点,如果没有子节点则返回 undefined
|
|
53
54
|
*/
|
|
54
55
|
getFirstChild(): T | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* 深度优先查找第一个段落节点(w:p)
|
|
58
|
+
* @returns 第一个 Wp,如果未找到则返回 undefined
|
|
59
|
+
*/
|
|
60
|
+
getFirstWp(): Wp | undefined;
|
|
55
61
|
/**
|
|
56
62
|
* 获取最后一个子节点
|
|
57
63
|
* @returns 最后一个子节点,如果没有子节点则返回 undefined
|
|
@@ -2,8 +2,8 @@ import { RawElement } from '../types/raw';
|
|
|
2
2
|
import { Wtbl } from './Wtbl';
|
|
3
3
|
import { Wtc } from './Wtc';
|
|
4
4
|
import { ModelGroup, ModelGroupOptions } from '../base';
|
|
5
|
-
import { WtrPr } from './WtrPr';
|
|
6
|
-
type RowHeightRule =
|
|
5
|
+
import { WtrPr, WtrHeightRule } from './WtrPr';
|
|
6
|
+
type RowHeightRule = WtrHeightRule;
|
|
7
7
|
/**
|
|
8
8
|
* w:tr 表格行
|
|
9
9
|
*/
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { RawElement } from '../types/raw';
|
|
2
2
|
import { ModelNode, ModelNodeOptions } from '../base';
|
|
3
|
+
export type WtrHeightRule = 'auto' | 'atLeast' | 'exact';
|
|
4
|
+
type ToXmlJsonOptions = {
|
|
5
|
+
rowHeight?: number;
|
|
6
|
+
rowHeightRule?: WtrHeightRule;
|
|
7
|
+
syncRowHeight?: boolean;
|
|
8
|
+
};
|
|
3
9
|
export declare class WtrPr extends ModelNode {
|
|
4
10
|
/** 节点名称 */
|
|
5
11
|
name: 'w:trPr';
|
|
@@ -21,7 +27,7 @@ export declare class WtrPr extends ModelNode {
|
|
|
21
27
|
*
|
|
22
28
|
* @returns RawElement 格式的 XML JSON
|
|
23
29
|
*/
|
|
24
|
-
toXmlJson(): RawElement;
|
|
30
|
+
toXmlJson(options?: ToXmlJsonOptions): RawElement;
|
|
25
31
|
/**
|
|
26
32
|
* 获取指定名称的子元素
|
|
27
33
|
*
|
|
@@ -51,5 +57,11 @@ export declare class WtrPr extends ModelNode {
|
|
|
51
57
|
* wpPr.removeElement('w:keepNext');
|
|
52
58
|
*/
|
|
53
59
|
removeElement(name: string): boolean;
|
|
60
|
+
getRowHeight(): {
|
|
61
|
+
rowHeight?: number;
|
|
62
|
+
rowHeightRule?: WtrHeightRule;
|
|
63
|
+
};
|
|
64
|
+
setRowHeight(rowHeight?: number, rowHeightRule?: WtrHeightRule): void;
|
|
54
65
|
static fromTemplate(): WtrPr;
|
|
55
66
|
}
|
|
67
|
+
export {};
|
|
@@ -4,11 +4,14 @@ import { TableCell } from './TableCell';
|
|
|
4
4
|
import { Wtr } from '../model/document';
|
|
5
5
|
export interface TableRowOptions extends LayoutGroupOptions {
|
|
6
6
|
allowRowSplit?: boolean;
|
|
7
|
+
/** 记录该行在原始模型表格中的真实行索引(全局索引) */
|
|
8
|
+
realRowIndex?: number;
|
|
7
9
|
}
|
|
8
10
|
export declare class TableRow extends LayoutGroup<TableCell> {
|
|
9
11
|
component: "tableRow";
|
|
10
12
|
parent: Table;
|
|
11
13
|
allowRowSplit: boolean;
|
|
14
|
+
realRowIndex: number;
|
|
12
15
|
constructor(options: TableRowOptions);
|
|
13
16
|
get width(): number;
|
|
14
17
|
get height(): number;
|