add schema comments and update file/document; unify VerticalAlign type
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
import { convertInchesToTwip } from "convenience-functions";
|
||||
import { FooterWrapper } from "file/footer-wrapper";
|
||||
import { HeaderWrapper } from "file/header-wrapper";
|
||||
import { VerticalAlign, VerticalAlignElement } from "file/vertical-align";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
import { Columns } from "./columns/columns";
|
||||
@ -23,7 +24,6 @@ import { IPageSizeAttributes, PageOrientation } from "./page-size/page-size-attr
|
||||
import { TitlePage } from "./title-page/title-page";
|
||||
import { Type } from "./type/section-type";
|
||||
import { SectionType } from "./type/section-type-attributes";
|
||||
import { SectionVerticalAlign, SectionVerticalAlignValue } from "./vertical-align";
|
||||
|
||||
export interface IHeaderFooterGroup<T> {
|
||||
readonly default?: T;
|
||||
@ -43,7 +43,7 @@ export interface ISectionPropertiesOptions {
|
||||
readonly footerWrapperGroup?: IHeaderFooterGroup<FooterWrapper>;
|
||||
readonly lineNumbers?: ILineNumberAttributes;
|
||||
readonly titlePage?: boolean;
|
||||
readonly verticalAlign?: SectionVerticalAlignValue;
|
||||
readonly verticalAlign?: VerticalAlign;
|
||||
readonly column?: {
|
||||
readonly space?: number;
|
||||
readonly count?: number;
|
||||
@ -51,6 +51,39 @@ export interface ISectionPropertiesOptions {
|
||||
};
|
||||
readonly type?: SectionType;
|
||||
}
|
||||
|
||||
// <xsd:complexType name="CT_SectPr">
|
||||
// <xsd:sequence>
|
||||
// <xsd:group ref="EG_HdrFtrReferences" minOccurs="0" maxOccurs="6"/>
|
||||
// <xsd:group ref="EG_SectPrContents" minOccurs="0"/>
|
||||
// <xsd:element name="sectPrChange" type="CT_SectPrChange" minOccurs="0"/>
|
||||
// </xsd:sequence>
|
||||
// <xsd:attributeGroup ref="AG_SectPrAttributes"/>
|
||||
// </xsd:complexType>
|
||||
|
||||
// <xsd:group name="EG_SectPrContents">
|
||||
// <xsd:sequence>
|
||||
// <xsd:element name="footnotePr" type="CT_FtnProps" minOccurs="0"/>
|
||||
// <xsd:element name="endnotePr" type="CT_EdnProps" minOccurs="0"/>
|
||||
// <xsd:element name="type" type="CT_SectType" minOccurs="0"/>
|
||||
// <xsd:element name="pgSz" type="CT_PageSz" minOccurs="0"/>
|
||||
// <xsd:element name="pgMar" type="CT_PageMar" minOccurs="0"/>
|
||||
// <xsd:element name="paperSrc" type="CT_PaperSource" minOccurs="0"/>
|
||||
// <xsd:element name="pgBorders" type="CT_PageBorders" minOccurs="0"/>
|
||||
// <xsd:element name="lnNumType" type="CT_LineNumber" minOccurs="0"/>
|
||||
// <xsd:element name="pgNumType" type="CT_PageNumber" minOccurs="0"/>
|
||||
// <xsd:element name="cols" type="CT_Columns" minOccurs="0"/>
|
||||
// <xsd:element name="formProt" type="CT_OnOff" minOccurs="0"/>
|
||||
// <xsd:element name="vAlign" type="CT_VerticalJc" minOccurs="0"/>
|
||||
// <xsd:element name="noEndnote" type="CT_OnOff" minOccurs="0"/>
|
||||
// <xsd:element name="titlePg" type="CT_OnOff" minOccurs="0"/>
|
||||
// <xsd:element name="textDirection" type="CT_TextDirection" minOccurs="0"/>
|
||||
// <xsd:element name="bidi" type="CT_OnOff" minOccurs="0"/>
|
||||
// <xsd:element name="rtlGutter" type="CT_OnOff" minOccurs="0"/>
|
||||
// <xsd:element name="docGrid" type="CT_DocGrid" minOccurs="0"/>
|
||||
// <xsd:element name="printerSettings" type="CT_Rel" minOccurs="0"/>
|
||||
// </xsd:sequence>
|
||||
// </xsd:group>
|
||||
export class SectionProperties extends XmlComponent {
|
||||
constructor({
|
||||
page: {
|
||||
@ -101,7 +134,7 @@ export class SectionProperties extends XmlComponent {
|
||||
this.root.push(new Columns(space, count, separate));
|
||||
|
||||
if (verticalAlign) {
|
||||
this.root.push(new SectionVerticalAlign(verticalAlign));
|
||||
this.root.push(new VerticalAlignElement(verticalAlign));
|
||||
}
|
||||
|
||||
if (titlePage) {
|
||||
|
Reference in New Issue
Block a user