2017-03-09 09:45:01 +01:00
|
|
|
import { Color, Italics, Size } from "../docx/run/formatting";
|
|
|
|
|
|
|
|
import { Styles } from "./";
|
|
|
|
import { DocumentDefaults } from "./defaults";
|
|
|
|
import {
|
|
|
|
Heading1Style, Heading2Style, Heading3Style, Heading4Style, Heading5Style, Heading6Style,
|
|
|
|
ListParagraph, TitleStyle,
|
|
|
|
} from "./style";
|
2016-05-09 03:44:16 +01:00
|
|
|
|
|
|
|
export class DefaultStylesFactory {
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
public newInstance(): Styles {
|
|
|
|
const styles = new Styles();
|
2017-09-16 08:24:15 -06:00
|
|
|
styles.createDocumentDefaults();
|
2016-05-09 03:44:16 +01:00
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const titleStyle = new TitleStyle();
|
2016-05-10 00:32:00 +01:00
|
|
|
titleStyle.addRunProperty(new Size(56));
|
|
|
|
styles.push(titleStyle);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading1Style = new Heading1Style();
|
2016-05-10 00:32:00 +01:00
|
|
|
heading1Style.addRunProperty(new Color("2E74B5"));
|
|
|
|
heading1Style.addRunProperty(new Size(32));
|
2016-05-09 03:44:16 +01:00
|
|
|
styles.push(heading1Style);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading2Style = new Heading2Style();
|
2016-05-10 00:32:00 +01:00
|
|
|
heading2Style.addRunProperty(new Color("2E74B5"));
|
|
|
|
heading2Style.addRunProperty(new Size(26));
|
|
|
|
styles.push(heading2Style);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading3Style = new Heading3Style();
|
2016-05-10 00:41:36 +01:00
|
|
|
heading3Style.addRunProperty(new Color("1F4D78"));
|
|
|
|
heading3Style.addRunProperty(new Size(24));
|
|
|
|
styles.push(heading3Style);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading4Style = new Heading4Style();
|
2016-05-10 00:41:36 +01:00
|
|
|
heading4Style.addRunProperty(new Color("2E74B5"));
|
|
|
|
heading4Style.addRunProperty(new Italics());
|
|
|
|
styles.push(heading4Style);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading5Style = new Heading5Style();
|
2016-05-10 00:41:36 +01:00
|
|
|
heading5Style.addRunProperty(new Color("2E74B5"));
|
|
|
|
styles.push(heading5Style);
|
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const heading6Style = new Heading6Style();
|
2016-05-10 00:41:36 +01:00
|
|
|
heading6Style.addRunProperty(new Color("1F4D78"));
|
|
|
|
styles.push(heading6Style);
|
2016-05-26 15:08:34 +01:00
|
|
|
|
2017-03-09 09:45:01 +01:00
|
|
|
const listParagraph = new ListParagraph();
|
2016-05-26 15:08:34 +01:00
|
|
|
// listParagraph.addParagraphProperty();
|
2016-05-19 09:54:36 +01:00
|
|
|
styles.push(listParagraph);
|
2016-05-10 00:41:36 +01:00
|
|
|
|
2016-05-09 03:44:16 +01:00
|
|
|
return styles;
|
|
|
|
}
|
2017-03-10 08:52:47 +01:00
|
|
|
}
|