docx-wasm 0.0.277-sdt0 → 0.0.277-sdt1
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/node/pkg/docx_wasm.d.ts +31 -26
- package/dist/node/pkg/docx_wasm.js +45 -32
- package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +24 -23
- package/dist/node/table-cell.d.ts +3 -1
- package/dist/node/table-cell.js +13 -0
- package/dist/node/table-cell.js.map +1 -1
- package/dist/web/pkg/docx_wasm.d.ts +31 -26
- package/dist/web/pkg/docx_wasm_bg.js +45 -32
- package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +24 -23
- package/dist/web/table-cell.d.ts +3 -1
- package/dist/web/table-cell.js +13 -0
- package/dist/web/table-cell.js.map +1 -1
- package/js/table-cell.ts +13 -1
- package/package.json +1 -1
|
@@ -55,34 +55,34 @@ export function createTable(): Table;
|
|
|
55
55
|
export function createAbstractNumbering(id: number): AbstractNumbering;
|
|
56
56
|
/**
|
|
57
57
|
* @param {number} id
|
|
58
|
-
* @param {number} start
|
|
59
|
-
* @param {string} format
|
|
60
|
-
* @param {string} text
|
|
61
|
-
* @param {string} jc
|
|
62
|
-
* @returns {Level}
|
|
63
|
-
*/
|
|
64
|
-
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
65
|
-
/**
|
|
66
|
-
* @param {number} id
|
|
67
58
|
* @param {number} abstract_num_id
|
|
68
59
|
* @returns {Numbering}
|
|
69
60
|
*/
|
|
70
61
|
export function createNumbering(id: number, abstract_num_id: number): Numbering;
|
|
71
62
|
/**
|
|
63
|
+
* @returns {TableCell}
|
|
64
|
+
*/
|
|
65
|
+
export function createTableCell(): TableCell;
|
|
66
|
+
/**
|
|
72
67
|
* @param {number} id
|
|
73
68
|
* @returns {Comment}
|
|
74
69
|
*/
|
|
75
70
|
export function createComment(id: number): Comment;
|
|
76
71
|
/**
|
|
72
|
+
* @param {number} id
|
|
73
|
+
* @param {number} start
|
|
74
|
+
* @param {string} format
|
|
75
|
+
* @param {string} text
|
|
76
|
+
* @param {string} jc
|
|
77
|
+
* @returns {Level}
|
|
78
|
+
*/
|
|
79
|
+
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
80
|
+
/**
|
|
77
81
|
* @param {Uint8Array} buf
|
|
78
82
|
* @returns {Pic}
|
|
79
83
|
*/
|
|
80
84
|
export function createPic(buf: Uint8Array): Pic;
|
|
81
85
|
/**
|
|
82
|
-
* @returns {TableCell}
|
|
83
|
-
*/
|
|
84
|
-
export function createTableCell(): TableCell;
|
|
85
|
-
/**
|
|
86
86
|
* @param {string} v
|
|
87
87
|
* @param {number} t
|
|
88
88
|
* @returns {Hyperlink}
|
|
@@ -196,6 +196,12 @@ export enum HeightRule {
|
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
*/
|
|
199
|
+
export enum HyperlinkType {
|
|
200
|
+
Anchor,
|
|
201
|
+
External,
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
*/
|
|
199
205
|
export enum LevelSuffixType {
|
|
200
206
|
Nothing,
|
|
201
207
|
Space,
|
|
@@ -284,13 +290,6 @@ export enum TabValueType {
|
|
|
284
290
|
}
|
|
285
291
|
/**
|
|
286
292
|
*/
|
|
287
|
-
export enum LineSpacingType {
|
|
288
|
-
Auto,
|
|
289
|
-
AtLeast,
|
|
290
|
-
Exact,
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
*/
|
|
294
293
|
export enum TextDirectionType {
|
|
295
294
|
Lr,
|
|
296
295
|
LrV,
|
|
@@ -313,6 +312,13 @@ export enum BreakType {
|
|
|
313
312
|
}
|
|
314
313
|
/**
|
|
315
314
|
*/
|
|
315
|
+
export enum LineSpacingType {
|
|
316
|
+
Auto,
|
|
317
|
+
AtLeast,
|
|
318
|
+
Exact,
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
*/
|
|
316
322
|
export enum ShdType {
|
|
317
323
|
Nil,
|
|
318
324
|
Clear,
|
|
@@ -384,12 +390,6 @@ export enum AlignmentType {
|
|
|
384
390
|
}
|
|
385
391
|
/**
|
|
386
392
|
*/
|
|
387
|
-
export enum HyperlinkType {
|
|
388
|
-
Anchor,
|
|
389
|
-
External,
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
*/
|
|
393
393
|
export enum TabLeaderType {
|
|
394
394
|
Dot,
|
|
395
395
|
Heavy,
|
|
@@ -1583,6 +1583,11 @@ export class TableCell {
|
|
|
1583
1583
|
*/
|
|
1584
1584
|
add_table(t: Table): TableCell;
|
|
1585
1585
|
/**
|
|
1586
|
+
* @param {TableOfContents} t
|
|
1587
|
+
* @returns {TableCell}
|
|
1588
|
+
*/
|
|
1589
|
+
add_table_of_contents(t: TableOfContents): TableCell;
|
|
1590
|
+
/**
|
|
1586
1591
|
* @param {number} t
|
|
1587
1592
|
* @returns {TableCell}
|
|
1588
1593
|
*/
|
|
@@ -237,6 +237,33 @@ module.exports.createAbstractNumbering = function(id) {
|
|
|
237
237
|
return AbstractNumbering.__wrap(ret);
|
|
238
238
|
};
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* @param {number} id
|
|
242
|
+
* @param {number} abstract_num_id
|
|
243
|
+
* @returns {Numbering}
|
|
244
|
+
*/
|
|
245
|
+
module.exports.createNumbering = function(id, abstract_num_id) {
|
|
246
|
+
var ret = wasm.createNumbering(id, abstract_num_id);
|
|
247
|
+
return Numbering.__wrap(ret);
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @returns {TableCell}
|
|
252
|
+
*/
|
|
253
|
+
module.exports.createTableCell = function() {
|
|
254
|
+
var ret = wasm.createTableCell();
|
|
255
|
+
return TableCell.__wrap(ret);
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @param {number} id
|
|
260
|
+
* @returns {Comment}
|
|
261
|
+
*/
|
|
262
|
+
module.exports.createComment = function(id) {
|
|
263
|
+
var ret = wasm.createComment(id);
|
|
264
|
+
return Comment.__wrap(ret);
|
|
265
|
+
};
|
|
266
|
+
|
|
240
267
|
/**
|
|
241
268
|
* @param {number} id
|
|
242
269
|
* @param {number} start
|
|
@@ -259,24 +286,6 @@ module.exports.createLevel = function(id, start, format, text, jc) {
|
|
|
259
286
|
function isLikeNone(x) {
|
|
260
287
|
return x === undefined || x === null;
|
|
261
288
|
}
|
|
262
|
-
/**
|
|
263
|
-
* @param {number} id
|
|
264
|
-
* @param {number} abstract_num_id
|
|
265
|
-
* @returns {Numbering}
|
|
266
|
-
*/
|
|
267
|
-
module.exports.createNumbering = function(id, abstract_num_id) {
|
|
268
|
-
var ret = wasm.createNumbering(id, abstract_num_id);
|
|
269
|
-
return Numbering.__wrap(ret);
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @param {number} id
|
|
274
|
-
* @returns {Comment}
|
|
275
|
-
*/
|
|
276
|
-
module.exports.createComment = function(id) {
|
|
277
|
-
var ret = wasm.createComment(id);
|
|
278
|
-
return Comment.__wrap(ret);
|
|
279
|
-
};
|
|
280
289
|
|
|
281
290
|
function passArray8ToWasm0(arg, malloc) {
|
|
282
291
|
const ptr = malloc(arg.length * 1);
|
|
@@ -295,14 +304,6 @@ module.exports.createPic = function(buf) {
|
|
|
295
304
|
return Pic.__wrap(ret);
|
|
296
305
|
};
|
|
297
306
|
|
|
298
|
-
/**
|
|
299
|
-
* @returns {TableCell}
|
|
300
|
-
*/
|
|
301
|
-
module.exports.createTableCell = function() {
|
|
302
|
-
var ret = wasm.createTableCell();
|
|
303
|
-
return TableCell.__wrap(ret);
|
|
304
|
-
};
|
|
305
|
-
|
|
306
307
|
/**
|
|
307
308
|
* @param {string} v
|
|
308
309
|
* @param {number} t
|
|
@@ -443,6 +444,9 @@ module.exports.PicAlign = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",
|
|
|
443
444
|
module.exports.HeightRule = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
444
445
|
/**
|
|
445
446
|
*/
|
|
447
|
+
module.exports.HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
448
|
+
/**
|
|
449
|
+
*/
|
|
446
450
|
module.exports.LevelSuffixType = Object.freeze({ Nothing:0,"0":"Nothing",Space:1,"1":"Space",Tab:2,"2":"Tab", });
|
|
447
451
|
/**
|
|
448
452
|
*/
|
|
@@ -502,15 +506,15 @@ module.exports.RelativeFromVType = Object.freeze({ BottomMargin:0,"0":"BottomMar
|
|
|
502
506
|
module.exports.TabValueType = Object.freeze({ Bar:0,"0":"Bar",Center:1,"1":"Center",Clear:2,"2":"Clear",Decimal:3,"3":"Decimal",End:4,"4":"End",Right:5,"5":"Right",Num:6,"6":"Num",Start:7,"7":"Start",Left:8,"8":"Left", });
|
|
503
507
|
/**
|
|
504
508
|
*/
|
|
505
|
-
module.exports.LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
506
|
-
/**
|
|
507
|
-
*/
|
|
508
509
|
module.exports.TextDirectionType = Object.freeze({ Lr:0,"0":"Lr",LrV:1,"1":"LrV",Rl:2,"2":"Rl",RlV:3,"3":"RlV",Tb:4,"4":"Tb",TbV:5,"5":"TbV",TbRlV:6,"6":"TbRlV",TbRl:7,"7":"TbRl",BtLr:8,"8":"BtLr",LrTbV:9,"9":"LrTbV", });
|
|
509
510
|
/**
|
|
510
511
|
*/
|
|
511
512
|
module.exports.BreakType = Object.freeze({ Page:0,"0":"Page",Column:1,"1":"Column",TextWrapping:2,"2":"TextWrapping",Unsupported:3,"3":"Unsupported", });
|
|
512
513
|
/**
|
|
513
514
|
*/
|
|
515
|
+
module.exports.LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
516
|
+
/**
|
|
517
|
+
*/
|
|
514
518
|
module.exports.ShdType = Object.freeze({ Nil:0,"0":"Nil",Clear:1,"1":"Clear",Solid:2,"2":"Solid",HorzStripe:3,"3":"HorzStripe",VertStripe:4,"4":"VertStripe",ReverseDiagStripe:5,"5":"ReverseDiagStripe",DiagStripe:6,"6":"DiagStripe",HorzCross:7,"7":"HorzCross",DiagCross:8,"8":"DiagCross",ThinHorzStripe:9,"9":"ThinHorzStripe",ThinVertStripe:10,"10":"ThinVertStripe",ThinReverseDiagStripe:11,"11":"ThinReverseDiagStripe",ThinDiagStripe:12,"12":"ThinDiagStripe",ThinHorzCross:13,"13":"ThinHorzCross",ThinDiagCross:14,"14":"ThinDiagCross",Pct5:15,"15":"Pct5",Pct10:16,"16":"Pct10",Pct12:17,"17":"Pct12",Pct15:18,"18":"Pct15",Pct20:19,"19":"Pct20",Pct25:20,"20":"Pct25",Pct30:21,"21":"Pct30",Pct35:22,"22":"Pct35",Pct37:23,"23":"Pct37",Pct40:24,"24":"Pct40",Pct45:25,"25":"Pct45",Pct50:26,"26":"Pct50",Pct55:27,"27":"Pct55",Pct60:28,"28":"Pct60",Pct62:29,"29":"Pct62",Pct65:30,"30":"Pct65",Pct70:31,"31":"Pct70",Pct75:32,"32":"Pct75",Pct80:33,"33":"Pct80",Pct85:34,"34":"Pct85",Pct87:35,"35":"Pct87",Pct90:36,"36":"Pct90",Pct95:37,"37":"Pct95", });
|
|
515
519
|
/**
|
|
516
520
|
*/
|
|
@@ -523,9 +527,6 @@ module.exports.VAlignType = Object.freeze({ Top:0,"0":"Top",Center:1,"1":"Center
|
|
|
523
527
|
module.exports.AlignmentType = Object.freeze({ Both:0,"0":"Both",Center:1,"1":"Center",Distribute:2,"2":"Distribute",Start:3,"3":"Start",End:4,"4":"End",Left:5,"5":"Left",Right:6,"6":"Right",Justified:7,"7":"Justified",Unsupported:8,"8":"Unsupported", });
|
|
524
528
|
/**
|
|
525
529
|
*/
|
|
526
|
-
module.exports.HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
527
|
-
/**
|
|
528
|
-
*/
|
|
529
530
|
module.exports.TabLeaderType = Object.freeze({ Dot:0,"0":"Dot",Heavy:1,"1":"Heavy",Hyphen:2,"2":"Hyphen",MiddleDot:3,"3":"MiddleDot",None:4,"4":"None",Underscore:5,"5":"Underscore", });
|
|
530
531
|
/**
|
|
531
532
|
*/
|
|
@@ -3076,6 +3077,18 @@ class TableCell {
|
|
|
3076
3077
|
return TableCell.__wrap(ret);
|
|
3077
3078
|
}
|
|
3078
3079
|
/**
|
|
3080
|
+
* @param {TableOfContents} t
|
|
3081
|
+
* @returns {TableCell}
|
|
3082
|
+
*/
|
|
3083
|
+
add_table_of_contents(t) {
|
|
3084
|
+
const ptr = this.__destroy_into_raw();
|
|
3085
|
+
_assertClass(t, TableOfContents);
|
|
3086
|
+
var ptr0 = t.ptr;
|
|
3087
|
+
t.ptr = 0;
|
|
3088
|
+
var ret = wasm.tablecell_add_table_of_contents(ptr, ptr0);
|
|
3089
|
+
return TableCell.__wrap(ret);
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3079
3092
|
* @param {number} t
|
|
3080
3093
|
* @returns {TableCell}
|
|
3081
3094
|
*/
|
|
Binary file
|
|
@@ -79,6 +79,30 @@ export function table_cell_margin_left(a: number, b: number, c: number): number;
|
|
|
79
79
|
export function __wbg_abstractnumbering_free(a: number): void;
|
|
80
80
|
export function createAbstractNumbering(a: number): number;
|
|
81
81
|
export function abstractnumbering_add_level(a: number, b: number): number;
|
|
82
|
+
export function __wbg_numbering_free(a: number): void;
|
|
83
|
+
export function createNumbering(a: number, b: number): number;
|
|
84
|
+
export function numbering_add_override(a: number, b: number): number;
|
|
85
|
+
export function __wbg_tablecell_free(a: number): void;
|
|
86
|
+
export function createTableCell(): number;
|
|
87
|
+
export function tablecell_add_paragraph(a: number, b: number): number;
|
|
88
|
+
export function tablecell_add_table(a: number, b: number): number;
|
|
89
|
+
export function tablecell_add_table_of_contents(a: number, b: number): number;
|
|
90
|
+
export function tablecell_vertical_merge(a: number, b: number): number;
|
|
91
|
+
export function tablecell_vertical_align(a: number, b: number): number;
|
|
92
|
+
export function tablecell_grid_span(a: number, b: number): number;
|
|
93
|
+
export function tablecell_width(a: number, b: number): number;
|
|
94
|
+
export function tablecell_shading(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
|
95
|
+
export function tablecell_text_direction(a: number, b: number): number;
|
|
96
|
+
export function tablecell_set_border(a: number, b: number): number;
|
|
97
|
+
export function tablecell_clear_border(a: number, b: number): number;
|
|
98
|
+
export function tablecell_clear_all_border(a: number): number;
|
|
99
|
+
export function __wbg_comment_free(a: number): void;
|
|
100
|
+
export function createComment(a: number): number;
|
|
101
|
+
export function comment_author(a: number, b: number, c: number): number;
|
|
102
|
+
export function comment_date(a: number, b: number, c: number): number;
|
|
103
|
+
export function comment_add_paragraph(a: number, b: number): number;
|
|
104
|
+
export function comment_parent_comment_id(a: number, b: number): number;
|
|
105
|
+
export function comment_id(a: number): number;
|
|
82
106
|
export function __wbg_level_free(a: number): void;
|
|
83
107
|
export function createLevel(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
84
108
|
export function level_indent(a: number, b: number, c: number, d: number, e: number): number;
|
|
@@ -92,16 +116,6 @@ export function level_underline(a: number, b: number, c: number): number;
|
|
|
92
116
|
export function level_vanish(a: number): number;
|
|
93
117
|
export function level_fonts(a: number, b: number): number;
|
|
94
118
|
export function level_spacing(a: number, b: number): number;
|
|
95
|
-
export function __wbg_numbering_free(a: number): void;
|
|
96
|
-
export function createNumbering(a: number, b: number): number;
|
|
97
|
-
export function numbering_add_override(a: number, b: number): number;
|
|
98
|
-
export function __wbg_comment_free(a: number): void;
|
|
99
|
-
export function createComment(a: number): number;
|
|
100
|
-
export function comment_author(a: number, b: number, c: number): number;
|
|
101
|
-
export function comment_date(a: number, b: number, c: number): number;
|
|
102
|
-
export function comment_add_paragraph(a: number, b: number): number;
|
|
103
|
-
export function comment_parent_comment_id(a: number, b: number): number;
|
|
104
|
-
export function comment_id(a: number): number;
|
|
105
119
|
export function __wbg_pic_free(a: number): void;
|
|
106
120
|
export function createPic(a: number, b: number): number;
|
|
107
121
|
export function pic_size(a: number, b: number, c: number): number;
|
|
@@ -109,19 +123,6 @@ export function pic_rotate(a: number, b: number): number;
|
|
|
109
123
|
export function pic_floating(a: number): number;
|
|
110
124
|
export function pic_offset_x(a: number, b: number): number;
|
|
111
125
|
export function pic_offset_y(a: number, b: number): number;
|
|
112
|
-
export function __wbg_tablecell_free(a: number): void;
|
|
113
|
-
export function createTableCell(): number;
|
|
114
|
-
export function tablecell_add_paragraph(a: number, b: number): number;
|
|
115
|
-
export function tablecell_add_table(a: number, b: number): number;
|
|
116
|
-
export function tablecell_vertical_merge(a: number, b: number): number;
|
|
117
|
-
export function tablecell_vertical_align(a: number, b: number): number;
|
|
118
|
-
export function tablecell_grid_span(a: number, b: number): number;
|
|
119
|
-
export function tablecell_width(a: number, b: number): number;
|
|
120
|
-
export function tablecell_shading(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
|
121
|
-
export function tablecell_text_direction(a: number, b: number): number;
|
|
122
|
-
export function tablecell_set_border(a: number, b: number): number;
|
|
123
|
-
export function tablecell_clear_border(a: number, b: number): number;
|
|
124
|
-
export function tablecell_clear_all_border(a: number): number;
|
|
125
126
|
export function __wbg_hyperlink_free(a: number): void;
|
|
126
127
|
export function createHyperlink(a: number, b: number, c: number): number;
|
|
127
128
|
export function hyperlink_add_run(a: number, b: number): number;
|
|
@@ -4,6 +4,7 @@ import { Shading } from "./shading";
|
|
|
4
4
|
import { TableCellBorders } from "./table-cell-borders";
|
|
5
5
|
import { TableCellBorderPosition, TableCellBorder } from "./table-cell-border";
|
|
6
6
|
import * as wasm from "./pkg";
|
|
7
|
+
import { TableOfContents } from "./table-of-contents";
|
|
7
8
|
export declare type VMergeType = "restart" | "continue";
|
|
8
9
|
export declare type VAlignType = "top" | "center" | "bottom";
|
|
9
10
|
export declare type TextDirectionType = "lr" | "lrV" | "rl" | "rlV" | "tb" | "tbV" | "tbRlV" | "tbRl" | "btLr" | "lrTbV";
|
|
@@ -18,10 +19,11 @@ export declare type CellProperty = {
|
|
|
18
19
|
shading?: Shading;
|
|
19
20
|
};
|
|
20
21
|
export declare class TableCell {
|
|
21
|
-
children: (Paragraph | Table)[];
|
|
22
|
+
children: (Paragraph | Table | TableOfContents)[];
|
|
22
23
|
hasNumberings: boolean;
|
|
23
24
|
property: CellProperty;
|
|
24
25
|
addParagraph(p: Paragraph): this;
|
|
26
|
+
addTableOfContents(t: TableOfContents): this;
|
|
25
27
|
addTable(t: Table): this;
|
|
26
28
|
verticalMerge(t: VMergeType): this;
|
|
27
29
|
verticalAlign(t: VAlignType): this;
|
package/dist/node/table-cell.js
CHANGED
|
@@ -31,6 +31,7 @@ const table_cell_borders_1 = require("./table-cell-borders");
|
|
|
31
31
|
const table_cell_border_1 = require("./table-cell-border");
|
|
32
32
|
const wasm = __importStar(require("./pkg"));
|
|
33
33
|
const run_1 = require("./run");
|
|
34
|
+
const table_of_contents_1 = require("./table-of-contents");
|
|
34
35
|
const toTextDirectionWasmType = (t) => {
|
|
35
36
|
switch (t) {
|
|
36
37
|
case "lr":
|
|
@@ -73,6 +74,10 @@ class TableCell {
|
|
|
73
74
|
this.children.push(p);
|
|
74
75
|
return this;
|
|
75
76
|
}
|
|
77
|
+
addTableOfContents(t) {
|
|
78
|
+
this.children.push(t);
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
76
81
|
addTable(t) {
|
|
77
82
|
if (t.hasNumberings) {
|
|
78
83
|
this.hasNumberings = true;
|
|
@@ -196,6 +201,14 @@ class TableCell {
|
|
|
196
201
|
const table = c.build();
|
|
197
202
|
cell = cell.add_table(table);
|
|
198
203
|
}
|
|
204
|
+
else if (c instanceof table_of_contents_1.TableOfContents) {
|
|
205
|
+
cell = cell.add_table_of_contents(c.buildWasmObject());
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
// eslint-disable-next-line
|
|
209
|
+
const _ = c;
|
|
210
|
+
console.error(_);
|
|
211
|
+
}
|
|
199
212
|
});
|
|
200
213
|
if (this.property.verticalMerge === "continue") {
|
|
201
214
|
cell = cell.vertical_merge(wasm.VMergeType.Continue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-cell.js","sourceRoot":"","sources":["../../js/table-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mCAAgC;AAChC,uCAAoC;AACpC,6DAAsE;AACtE,2DAA+E;AAC/E,4CAA8B;AAC9B,+BAA0C;
|
|
1
|
+
{"version":3,"file":"table-cell.js","sourceRoot":"","sources":["../../js/table-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mCAAgC;AAChC,uCAAoC;AACpC,6DAAsE;AACtE,2DAA+E;AAC/E,4CAA8B;AAC9B,+BAA0C;AAC1C,2DAAsD;AAkB/C,MAAM,uBAAuB,GAAG,CACrC,CAAoB,EACI,EAAE;IAC1B,QAAQ,CAAC,EAAE;QACT,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACnC,KAAK,KAAK;YACR,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACpC,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACnC,KAAK,KAAK;YACR,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACpC,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACnC,KAAK,KAAK;YACR,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACpC,KAAK,OAAO;YACV,OAAO,IAAI,C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,OAAO,CAAC,MAAM,EAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAC5B,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAvOD,8BAuOC"}
|
|
@@ -55,34 +55,34 @@ export function createTable(): Table;
|
|
|
55
55
|
export function createAbstractNumbering(id: number): AbstractNumbering;
|
|
56
56
|
/**
|
|
57
57
|
* @param {number} id
|
|
58
|
-
* @param {number} start
|
|
59
|
-
* @param {string} format
|
|
60
|
-
* @param {string} text
|
|
61
|
-
* @param {string} jc
|
|
62
|
-
* @returns {Level}
|
|
63
|
-
*/
|
|
64
|
-
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
65
|
-
/**
|
|
66
|
-
* @param {number} id
|
|
67
58
|
* @param {number} abstract_num_id
|
|
68
59
|
* @returns {Numbering}
|
|
69
60
|
*/
|
|
70
61
|
export function createNumbering(id: number, abstract_num_id: number): Numbering;
|
|
71
62
|
/**
|
|
63
|
+
* @returns {TableCell}
|
|
64
|
+
*/
|
|
65
|
+
export function createTableCell(): TableCell;
|
|
66
|
+
/**
|
|
72
67
|
* @param {number} id
|
|
73
68
|
* @returns {Comment}
|
|
74
69
|
*/
|
|
75
70
|
export function createComment(id: number): Comment;
|
|
76
71
|
/**
|
|
72
|
+
* @param {number} id
|
|
73
|
+
* @param {number} start
|
|
74
|
+
* @param {string} format
|
|
75
|
+
* @param {string} text
|
|
76
|
+
* @param {string} jc
|
|
77
|
+
* @returns {Level}
|
|
78
|
+
*/
|
|
79
|
+
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
80
|
+
/**
|
|
77
81
|
* @param {Uint8Array} buf
|
|
78
82
|
* @returns {Pic}
|
|
79
83
|
*/
|
|
80
84
|
export function createPic(buf: Uint8Array): Pic;
|
|
81
85
|
/**
|
|
82
|
-
* @returns {TableCell}
|
|
83
|
-
*/
|
|
84
|
-
export function createTableCell(): TableCell;
|
|
85
|
-
/**
|
|
86
86
|
* @param {string} v
|
|
87
87
|
* @param {number} t
|
|
88
88
|
* @returns {Hyperlink}
|
|
@@ -196,6 +196,12 @@ export enum HeightRule {
|
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
*/
|
|
199
|
+
export enum HyperlinkType {
|
|
200
|
+
Anchor,
|
|
201
|
+
External,
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
*/
|
|
199
205
|
export enum LevelSuffixType {
|
|
200
206
|
Nothing,
|
|
201
207
|
Space,
|
|
@@ -284,13 +290,6 @@ export enum TabValueType {
|
|
|
284
290
|
}
|
|
285
291
|
/**
|
|
286
292
|
*/
|
|
287
|
-
export enum LineSpacingType {
|
|
288
|
-
Auto,
|
|
289
|
-
AtLeast,
|
|
290
|
-
Exact,
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
*/
|
|
294
293
|
export enum TextDirectionType {
|
|
295
294
|
Lr,
|
|
296
295
|
LrV,
|
|
@@ -313,6 +312,13 @@ export enum BreakType {
|
|
|
313
312
|
}
|
|
314
313
|
/**
|
|
315
314
|
*/
|
|
315
|
+
export enum LineSpacingType {
|
|
316
|
+
Auto,
|
|
317
|
+
AtLeast,
|
|
318
|
+
Exact,
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
*/
|
|
316
322
|
export enum ShdType {
|
|
317
323
|
Nil,
|
|
318
324
|
Clear,
|
|
@@ -384,12 +390,6 @@ export enum AlignmentType {
|
|
|
384
390
|
}
|
|
385
391
|
/**
|
|
386
392
|
*/
|
|
387
|
-
export enum HyperlinkType {
|
|
388
|
-
Anchor,
|
|
389
|
-
External,
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
*/
|
|
393
393
|
export enum TabLeaderType {
|
|
394
394
|
Dot,
|
|
395
395
|
Heavy,
|
|
@@ -1583,6 +1583,11 @@ export class TableCell {
|
|
|
1583
1583
|
*/
|
|
1584
1584
|
add_table(t: Table): TableCell;
|
|
1585
1585
|
/**
|
|
1586
|
+
* @param {TableOfContents} t
|
|
1587
|
+
* @returns {TableCell}
|
|
1588
|
+
*/
|
|
1589
|
+
add_table_of_contents(t: TableOfContents): TableCell;
|
|
1590
|
+
/**
|
|
1586
1591
|
* @param {number} t
|
|
1587
1592
|
* @returns {TableCell}
|
|
1588
1593
|
*/
|
|
@@ -238,6 +238,33 @@ export function createAbstractNumbering(id) {
|
|
|
238
238
|
return AbstractNumbering.__wrap(ret);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
/**
|
|
242
|
+
* @param {number} id
|
|
243
|
+
* @param {number} abstract_num_id
|
|
244
|
+
* @returns {Numbering}
|
|
245
|
+
*/
|
|
246
|
+
export function createNumbering(id, abstract_num_id) {
|
|
247
|
+
var ret = wasm.createNumbering(id, abstract_num_id);
|
|
248
|
+
return Numbering.__wrap(ret);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @returns {TableCell}
|
|
253
|
+
*/
|
|
254
|
+
export function createTableCell() {
|
|
255
|
+
var ret = wasm.createTableCell();
|
|
256
|
+
return TableCell.__wrap(ret);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @param {number} id
|
|
261
|
+
* @returns {Comment}
|
|
262
|
+
*/
|
|
263
|
+
export function createComment(id) {
|
|
264
|
+
var ret = wasm.createComment(id);
|
|
265
|
+
return Comment.__wrap(ret);
|
|
266
|
+
}
|
|
267
|
+
|
|
241
268
|
/**
|
|
242
269
|
* @param {number} id
|
|
243
270
|
* @param {number} start
|
|
@@ -260,24 +287,6 @@ export function createLevel(id, start, format, text, jc) {
|
|
|
260
287
|
function isLikeNone(x) {
|
|
261
288
|
return x === undefined || x === null;
|
|
262
289
|
}
|
|
263
|
-
/**
|
|
264
|
-
* @param {number} id
|
|
265
|
-
* @param {number} abstract_num_id
|
|
266
|
-
* @returns {Numbering}
|
|
267
|
-
*/
|
|
268
|
-
export function createNumbering(id, abstract_num_id) {
|
|
269
|
-
var ret = wasm.createNumbering(id, abstract_num_id);
|
|
270
|
-
return Numbering.__wrap(ret);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* @param {number} id
|
|
275
|
-
* @returns {Comment}
|
|
276
|
-
*/
|
|
277
|
-
export function createComment(id) {
|
|
278
|
-
var ret = wasm.createComment(id);
|
|
279
|
-
return Comment.__wrap(ret);
|
|
280
|
-
}
|
|
281
290
|
|
|
282
291
|
function passArray8ToWasm0(arg, malloc) {
|
|
283
292
|
const ptr = malloc(arg.length * 1);
|
|
@@ -296,14 +305,6 @@ export function createPic(buf) {
|
|
|
296
305
|
return Pic.__wrap(ret);
|
|
297
306
|
}
|
|
298
307
|
|
|
299
|
-
/**
|
|
300
|
-
* @returns {TableCell}
|
|
301
|
-
*/
|
|
302
|
-
export function createTableCell() {
|
|
303
|
-
var ret = wasm.createTableCell();
|
|
304
|
-
return TableCell.__wrap(ret);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
308
|
/**
|
|
308
309
|
* @param {string} v
|
|
309
310
|
* @param {number} t
|
|
@@ -444,6 +445,9 @@ export const PicAlign = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",Ce
|
|
|
444
445
|
export const HeightRule = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
445
446
|
/**
|
|
446
447
|
*/
|
|
448
|
+
export const HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
449
|
+
/**
|
|
450
|
+
*/
|
|
447
451
|
export const LevelSuffixType = Object.freeze({ Nothing:0,"0":"Nothing",Space:1,"1":"Space",Tab:2,"2":"Tab", });
|
|
448
452
|
/**
|
|
449
453
|
*/
|
|
@@ -503,15 +507,15 @@ export const RelativeFromVType = Object.freeze({ BottomMargin:0,"0":"BottomMargi
|
|
|
503
507
|
export const TabValueType = Object.freeze({ Bar:0,"0":"Bar",Center:1,"1":"Center",Clear:2,"2":"Clear",Decimal:3,"3":"Decimal",End:4,"4":"End",Right:5,"5":"Right",Num:6,"6":"Num",Start:7,"7":"Start",Left:8,"8":"Left", });
|
|
504
508
|
/**
|
|
505
509
|
*/
|
|
506
|
-
export const LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
507
|
-
/**
|
|
508
|
-
*/
|
|
509
510
|
export const TextDirectionType = Object.freeze({ Lr:0,"0":"Lr",LrV:1,"1":"LrV",Rl:2,"2":"Rl",RlV:3,"3":"RlV",Tb:4,"4":"Tb",TbV:5,"5":"TbV",TbRlV:6,"6":"TbRlV",TbRl:7,"7":"TbRl",BtLr:8,"8":"BtLr",LrTbV:9,"9":"LrTbV", });
|
|
510
511
|
/**
|
|
511
512
|
*/
|
|
512
513
|
export const BreakType = Object.freeze({ Page:0,"0":"Page",Column:1,"1":"Column",TextWrapping:2,"2":"TextWrapping",Unsupported:3,"3":"Unsupported", });
|
|
513
514
|
/**
|
|
514
515
|
*/
|
|
516
|
+
export const LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
517
|
+
/**
|
|
518
|
+
*/
|
|
515
519
|
export const ShdType = Object.freeze({ Nil:0,"0":"Nil",Clear:1,"1":"Clear",Solid:2,"2":"Solid",HorzStripe:3,"3":"HorzStripe",VertStripe:4,"4":"VertStripe",ReverseDiagStripe:5,"5":"ReverseDiagStripe",DiagStripe:6,"6":"DiagStripe",HorzCross:7,"7":"HorzCross",DiagCross:8,"8":"DiagCross",ThinHorzStripe:9,"9":"ThinHorzStripe",ThinVertStripe:10,"10":"ThinVertStripe",ThinReverseDiagStripe:11,"11":"ThinReverseDiagStripe",ThinDiagStripe:12,"12":"ThinDiagStripe",ThinHorzCross:13,"13":"ThinHorzCross",ThinDiagCross:14,"14":"ThinDiagCross",Pct5:15,"15":"Pct5",Pct10:16,"16":"Pct10",Pct12:17,"17":"Pct12",Pct15:18,"18":"Pct15",Pct20:19,"19":"Pct20",Pct25:20,"20":"Pct25",Pct30:21,"21":"Pct30",Pct35:22,"22":"Pct35",Pct37:23,"23":"Pct37",Pct40:24,"24":"Pct40",Pct45:25,"25":"Pct45",Pct50:26,"26":"Pct50",Pct55:27,"27":"Pct55",Pct60:28,"28":"Pct60",Pct62:29,"29":"Pct62",Pct65:30,"30":"Pct65",Pct70:31,"31":"Pct70",Pct75:32,"32":"Pct75",Pct80:33,"33":"Pct80",Pct85:34,"34":"Pct85",Pct87:35,"35":"Pct87",Pct90:36,"36":"Pct90",Pct95:37,"37":"Pct95", });
|
|
516
520
|
/**
|
|
517
521
|
*/
|
|
@@ -524,9 +528,6 @@ export const VAlignType = Object.freeze({ Top:0,"0":"Top",Center:1,"1":"Center",
|
|
|
524
528
|
export const AlignmentType = Object.freeze({ Both:0,"0":"Both",Center:1,"1":"Center",Distribute:2,"2":"Distribute",Start:3,"3":"Start",End:4,"4":"End",Left:5,"5":"Left",Right:6,"6":"Right",Justified:7,"7":"Justified",Unsupported:8,"8":"Unsupported", });
|
|
525
529
|
/**
|
|
526
530
|
*/
|
|
527
|
-
export const HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
528
|
-
/**
|
|
529
|
-
*/
|
|
530
531
|
export const TabLeaderType = Object.freeze({ Dot:0,"0":"Dot",Heavy:1,"1":"Heavy",Hyphen:2,"2":"Hyphen",MiddleDot:3,"3":"MiddleDot",None:4,"4":"None",Underscore:5,"5":"Underscore", });
|
|
531
532
|
/**
|
|
532
533
|
*/
|
|
@@ -3057,6 +3058,18 @@ export class TableCell {
|
|
|
3057
3058
|
return TableCell.__wrap(ret);
|
|
3058
3059
|
}
|
|
3059
3060
|
/**
|
|
3061
|
+
* @param {TableOfContents} t
|
|
3062
|
+
* @returns {TableCell}
|
|
3063
|
+
*/
|
|
3064
|
+
add_table_of_contents(t) {
|
|
3065
|
+
const ptr = this.__destroy_into_raw();
|
|
3066
|
+
_assertClass(t, TableOfContents);
|
|
3067
|
+
var ptr0 = t.ptr;
|
|
3068
|
+
t.ptr = 0;
|
|
3069
|
+
var ret = wasm.tablecell_add_table_of_contents(ptr, ptr0);
|
|
3070
|
+
return TableCell.__wrap(ret);
|
|
3071
|
+
}
|
|
3072
|
+
/**
|
|
3060
3073
|
* @param {number} t
|
|
3061
3074
|
* @returns {TableCell}
|
|
3062
3075
|
*/
|
|
Binary file
|
|
@@ -79,6 +79,30 @@ export function table_cell_margin_left(a: number, b: number, c: number): number;
|
|
|
79
79
|
export function __wbg_abstractnumbering_free(a: number): void;
|
|
80
80
|
export function createAbstractNumbering(a: number): number;
|
|
81
81
|
export function abstractnumbering_add_level(a: number, b: number): number;
|
|
82
|
+
export function __wbg_numbering_free(a: number): void;
|
|
83
|
+
export function createNumbering(a: number, b: number): number;
|
|
84
|
+
export function numbering_add_override(a: number, b: number): number;
|
|
85
|
+
export function __wbg_tablecell_free(a: number): void;
|
|
86
|
+
export function createTableCell(): number;
|
|
87
|
+
export function tablecell_add_paragraph(a: number, b: number): number;
|
|
88
|
+
export function tablecell_add_table(a: number, b: number): number;
|
|
89
|
+
export function tablecell_add_table_of_contents(a: number, b: number): number;
|
|
90
|
+
export function tablecell_vertical_merge(a: number, b: number): number;
|
|
91
|
+
export function tablecell_vertical_align(a: number, b: number): number;
|
|
92
|
+
export function tablecell_grid_span(a: number, b: number): number;
|
|
93
|
+
export function tablecell_width(a: number, b: number): number;
|
|
94
|
+
export function tablecell_shading(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
|
95
|
+
export function tablecell_text_direction(a: number, b: number): number;
|
|
96
|
+
export function tablecell_set_border(a: number, b: number): number;
|
|
97
|
+
export function tablecell_clear_border(a: number, b: number): number;
|
|
98
|
+
export function tablecell_clear_all_border(a: number): number;
|
|
99
|
+
export function __wbg_comment_free(a: number): void;
|
|
100
|
+
export function createComment(a: number): number;
|
|
101
|
+
export function comment_author(a: number, b: number, c: number): number;
|
|
102
|
+
export function comment_date(a: number, b: number, c: number): number;
|
|
103
|
+
export function comment_add_paragraph(a: number, b: number): number;
|
|
104
|
+
export function comment_parent_comment_id(a: number, b: number): number;
|
|
105
|
+
export function comment_id(a: number): number;
|
|
82
106
|
export function __wbg_level_free(a: number): void;
|
|
83
107
|
export function createLevel(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
84
108
|
export function level_indent(a: number, b: number, c: number, d: number, e: number): number;
|
|
@@ -92,16 +116,6 @@ export function level_underline(a: number, b: number, c: number): number;
|
|
|
92
116
|
export function level_vanish(a: number): number;
|
|
93
117
|
export function level_fonts(a: number, b: number): number;
|
|
94
118
|
export function level_spacing(a: number, b: number): number;
|
|
95
|
-
export function __wbg_numbering_free(a: number): void;
|
|
96
|
-
export function createNumbering(a: number, b: number): number;
|
|
97
|
-
export function numbering_add_override(a: number, b: number): number;
|
|
98
|
-
export function __wbg_comment_free(a: number): void;
|
|
99
|
-
export function createComment(a: number): number;
|
|
100
|
-
export function comment_author(a: number, b: number, c: number): number;
|
|
101
|
-
export function comment_date(a: number, b: number, c: number): number;
|
|
102
|
-
export function comment_add_paragraph(a: number, b: number): number;
|
|
103
|
-
export function comment_parent_comment_id(a: number, b: number): number;
|
|
104
|
-
export function comment_id(a: number): number;
|
|
105
119
|
export function __wbg_pic_free(a: number): void;
|
|
106
120
|
export function createPic(a: number, b: number): number;
|
|
107
121
|
export function pic_size(a: number, b: number, c: number): number;
|
|
@@ -109,19 +123,6 @@ export function pic_rotate(a: number, b: number): number;
|
|
|
109
123
|
export function pic_floating(a: number): number;
|
|
110
124
|
export function pic_offset_x(a: number, b: number): number;
|
|
111
125
|
export function pic_offset_y(a: number, b: number): number;
|
|
112
|
-
export function __wbg_tablecell_free(a: number): void;
|
|
113
|
-
export function createTableCell(): number;
|
|
114
|
-
export function tablecell_add_paragraph(a: number, b: number): number;
|
|
115
|
-
export function tablecell_add_table(a: number, b: number): number;
|
|
116
|
-
export function tablecell_vertical_merge(a: number, b: number): number;
|
|
117
|
-
export function tablecell_vertical_align(a: number, b: number): number;
|
|
118
|
-
export function tablecell_grid_span(a: number, b: number): number;
|
|
119
|
-
export function tablecell_width(a: number, b: number): number;
|
|
120
|
-
export function tablecell_shading(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
|
121
|
-
export function tablecell_text_direction(a: number, b: number): number;
|
|
122
|
-
export function tablecell_set_border(a: number, b: number): number;
|
|
123
|
-
export function tablecell_clear_border(a: number, b: number): number;
|
|
124
|
-
export function tablecell_clear_all_border(a: number): number;
|
|
125
126
|
export function __wbg_hyperlink_free(a: number): void;
|
|
126
127
|
export function createHyperlink(a: number, b: number, c: number): number;
|
|
127
128
|
export function hyperlink_add_run(a: number, b: number): number;
|
package/dist/web/table-cell.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Shading } from "./shading";
|
|
|
4
4
|
import { TableCellBorders } from "./table-cell-borders";
|
|
5
5
|
import { TableCellBorderPosition, TableCellBorder } from "./table-cell-border";
|
|
6
6
|
import * as wasm from "./pkg";
|
|
7
|
+
import { TableOfContents } from "./table-of-contents";
|
|
7
8
|
export declare type VMergeType = "restart" | "continue";
|
|
8
9
|
export declare type VAlignType = "top" | "center" | "bottom";
|
|
9
10
|
export declare type TextDirectionType = "lr" | "lrV" | "rl" | "rlV" | "tb" | "tbV" | "tbRlV" | "tbRl" | "btLr" | "lrTbV";
|
|
@@ -18,10 +19,11 @@ export declare type CellProperty = {
|
|
|
18
19
|
shading?: Shading;
|
|
19
20
|
};
|
|
20
21
|
export declare class TableCell {
|
|
21
|
-
children: (Paragraph | Table)[];
|
|
22
|
+
children: (Paragraph | Table | TableOfContents)[];
|
|
22
23
|
hasNumberings: boolean;
|
|
23
24
|
property: CellProperty;
|
|
24
25
|
addParagraph(p: Paragraph): this;
|
|
26
|
+
addTableOfContents(t: TableOfContents): this;
|
|
25
27
|
addTable(t: Table): this;
|
|
26
28
|
verticalMerge(t: VMergeType): this;
|
|
27
29
|
verticalAlign(t: VAlignType): this;
|
package/dist/web/table-cell.js
CHANGED
|
@@ -5,6 +5,7 @@ import { TableCellBorders } from "./table-cell-borders";
|
|
|
5
5
|
import { TableCellBorder } from "./table-cell-border";
|
|
6
6
|
import * as wasm from "./pkg";
|
|
7
7
|
import { convertBorderType } from "./run";
|
|
8
|
+
import { TableOfContents } from "./table-of-contents";
|
|
8
9
|
export const toTextDirectionWasmType = (t) => {
|
|
9
10
|
switch (t) {
|
|
10
11
|
case "lr":
|
|
@@ -46,6 +47,10 @@ export class TableCell {
|
|
|
46
47
|
this.children.push(p);
|
|
47
48
|
return this;
|
|
48
49
|
}
|
|
50
|
+
addTableOfContents(t) {
|
|
51
|
+
this.children.push(t);
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
49
54
|
addTable(t) {
|
|
50
55
|
if (t.hasNumberings) {
|
|
51
56
|
this.hasNumberings = true;
|
|
@@ -169,6 +174,14 @@ export class TableCell {
|
|
|
169
174
|
const table = c.build();
|
|
170
175
|
cell = cell.add_table(table);
|
|
171
176
|
}
|
|
177
|
+
else if (c instanceof TableOfContents) {
|
|
178
|
+
cell = cell.add_table_of_contents(c.buildWasmObject());
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// eslint-disable-next-line
|
|
182
|
+
const _ = c;
|
|
183
|
+
console.error(_);
|
|
184
|
+
}
|
|
172
185
|
});
|
|
173
186
|
if (this.property.verticalMerge === "continue") {
|
|
174
187
|
cell = cell.vertical_merge(wasm.VMergeType.Continue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-cell.js","sourceRoot":"","sources":["../../js/table-cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAgB,MAAM,sBAAsB,CAAC;A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+5,7 @@ import { TableCellBorders, PositionKeys } from "./table-cell-borders";
|
|
|
5
5
|
import { TableCellBorderPosition, TableCellBorder } from "./table-cell-border";
|
|
6
6
|
import * as wasm from "./pkg";
|
|
7
7
|
import { convertBorderType } from "./run";
|
|
8
|
+
import { TableOfContents } from "./table-of-contents";
|
|
8
9
|
|
|
9
10
|
export type VMergeType = "restart" | "continue";
|
|
10
11
|
|
|
@@ -62,7 +63,7 @@ export type CellProperty = {
|
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
export class TableCell {
|
|
65
|
-
children: (Paragraph | Table)[] = [];
|
|
66
|
+
children: (Paragraph | Table | TableOfContents)[] = [];
|
|
66
67
|
hasNumberings = false;
|
|
67
68
|
property: CellProperty = {
|
|
68
69
|
borders: new TableCellBorders(),
|
|
@@ -76,6 +77,11 @@ export class TableCell {
|
|
|
76
77
|
return this;
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
addTableOfContents(t: TableOfContents) {
|
|
81
|
+
this.children.push(t);
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
|
|
79
85
|
addTable(t: Table) {
|
|
80
86
|
if (t.hasNumberings) {
|
|
81
87
|
this.hasNumberings = true;
|
|
@@ -229,6 +235,12 @@ export class TableCell {
|
|
|
229
235
|
} else if (c instanceof Table) {
|
|
230
236
|
const table = c.build();
|
|
231
237
|
cell = cell.add_table(table);
|
|
238
|
+
} else if (c instanceof TableOfContents) {
|
|
239
|
+
cell = cell.add_table_of_contents(c.buildWasmObject());
|
|
240
|
+
} else {
|
|
241
|
+
// eslint-disable-next-line
|
|
242
|
+
const _: never = c;
|
|
243
|
+
console.error(_);
|
|
232
244
|
}
|
|
233
245
|
});
|
|
234
246
|
|