Files
docx-js/ts/styles/style/components.ts

74 lines
1.5 KiB
TypeScript
Raw Normal View History

2017-03-09 10:54:40 +01:00
import { XmlAttributeComponent, XmlComponent } from "../../docx/xml-components";
interface IComponentAttributes {
val: string;
}
class ComponentAttributes extends XmlAttributeComponent<IComponentAttributes> {
protected xmlKeys = {val: "w:val"};
2017-03-09 10:54:40 +01:00
}
2016-04-09 04:53:42 +01:00
2016-04-09 20:16:35 +01:00
export class Name extends XmlComponent {
2016-05-03 04:31:08 +01:00
constructor(value: string) {
2016-04-09 20:16:35 +01:00
super("w:name");
2017-03-09 10:54:40 +01:00
this.root.push(new ComponentAttributes({val: value}));
2016-04-09 04:53:42 +01:00
}
}
2016-05-03 04:31:08 +01:00
export class BasedOn extends XmlComponent {
constructor(value: string) {
super("w:basedOn");
2017-03-09 10:54:40 +01:00
this.root.push(new ComponentAttributes({val: value}));
2016-05-03 04:31:08 +01:00
}
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class Next extends XmlComponent {
constructor(value: string) {
super("w:next");
2017-03-09 10:54:40 +01:00
this.root.push(new ComponentAttributes({val: value}));
2016-05-03 04:31:08 +01:00
}
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class Link extends XmlComponent {
constructor(value: string) {
super("w:link");
2017-03-09 10:54:40 +01:00
this.root.push(new ComponentAttributes({val: value}));
2016-05-03 04:31:08 +01:00
}
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class UiPriority extends XmlComponent {
constructor(value: string) {
super("w:uiPriority");
2017-03-09 10:54:40 +01:00
// TODO: this value should be a ST_DecimalNumber
this.root.push(new ComponentAttributes({val: value}));
2016-05-03 04:31:08 +01:00
}
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class UnhideWhenUsed extends XmlComponent {
2016-04-09 04:53:42 +01:00
}
2016-05-08 17:01:20 +01:00
export class QuickFormat extends XmlComponent {
2016-05-26 15:08:34 +01:00
2016-05-08 17:01:20 +01:00
constructor() {
super("w:qFormat");
}
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class TableProperties extends XmlComponent {
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class RsId extends XmlComponent {
2016-04-09 04:53:42 +01:00
}
2016-05-03 04:31:08 +01:00
export class SemiHidden extends XmlComponent {
2017-03-09 09:45:01 +01:00
}