feat: Added TableCellSpacing (#3052)

* feat: Added TableCellSpacingElement

* feat: Added cellSpacing (Table-constructor, TableProperties-constructor and ITableOptions)

* feat: Added cellSpacing (ITablePropertiesOptions and constructor implementation)

* feat: Added cellSpacing (ITableRowPropertiesOptions and constructor implementation)

* feat: Added cellSpacing (Implementation Test)

---------

Co-authored-by: Philip <1760073-philip.asx@users.noreply.gitlab.com>
This commit is contained in:
Philip
2025-04-16 23:38:28 +02:00
committed by GitHub
parent 72abd4b7ac
commit 44d4b93d06
6 changed files with 83 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import { IgnoreIfEmptyXmlComponent, OnOffElement } from "@file/xml-components";
import { PositiveUniversalMeasure } from "@util/values";
import { HeightRule, TableRowHeight } from "./table-row-height";
import { ITableCellSpacingProperties, TableCellSpacingElement } from "../table-cell-spacing";
export type ITableRowPropertiesOptions = {
readonly cantSplit?: boolean;
@ -39,6 +40,7 @@ export type ITableRowPropertiesOptions = {
readonly value: number | PositiveUniversalMeasure;
readonly rule: (typeof HeightRule)[keyof typeof HeightRule];
};
readonly cellSpacing?: ITableCellSpacingProperties;
};
export class TableRowProperties extends IgnoreIfEmptyXmlComponent {
@ -56,5 +58,9 @@ export class TableRowProperties extends IgnoreIfEmptyXmlComponent {
if (options.height) {
this.root.push(new TableRowHeight(options.height.value, options.height.rule));
}
if (options.cellSpacing) {
this.root.push(new TableCellSpacingElement(options.cellSpacing));
}
}
}