1 | "use strict";
|
2 |
|
3 |
|
4 | Object.defineProperty(exports, "__esModule", { value: true });
|
5 | exports.DocTableRow = void 0;
|
6 | const tsdoc_1 = require("@microsoft/tsdoc");
|
7 | const DocTableCell_1 = require("./DocTableCell");
|
8 |
|
9 |
|
10 |
|
11 | class DocTableRow extends tsdoc_1.DocNode {
|
12 | constructor(parameters, cells) {
|
13 | super(parameters);
|
14 | this._cells = [];
|
15 | if (cells) {
|
16 | for (const cell of cells) {
|
17 | this.addCell(cell);
|
18 | }
|
19 | }
|
20 | }
|
21 |
|
22 | get kind() {
|
23 | return "TableRow" ;
|
24 | }
|
25 | get cells() {
|
26 | return this._cells;
|
27 | }
|
28 | addCell(cell) {
|
29 | this._cells.push(cell);
|
30 | }
|
31 | createAndAddCell() {
|
32 | const newCell = new DocTableCell_1.DocTableCell({ configuration: this.configuration });
|
33 | this.addCell(newCell);
|
34 | return newCell;
|
35 | }
|
36 | addPlainTextCell(cellContent) {
|
37 | const cell = this.createAndAddCell();
|
38 | cell.content.appendNodeInParagraph(new tsdoc_1.DocPlainText({
|
39 | configuration: this.configuration,
|
40 | text: cellContent
|
41 | }));
|
42 | return cell;
|
43 | }
|
44 |
|
45 | onGetChildNodes() {
|
46 | return this._cells;
|
47 | }
|
48 | }
|
49 | exports.DocTableRow = DocTableRow;
|
50 |
|
\ | No newline at end of file |