Improve import alias

@file/ and @export/ instead of file/ and export/ etc
This commit is contained in:
Dolan Miu
2022-06-26 23:26:42 +01:00
parent c19bc6b4b3
commit 982d923553
380 changed files with 758 additions and 521 deletions

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Body } from "./body";
import { sectionMarginDefaults } from "./section-properties";

View File

@ -1,6 +1,6 @@
import { IContext, IXmlableObject, XmlComponent } from "file/xml-components";
import { Paragraph, ParagraphProperties } from "@file/paragraph";
import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components";
import { Paragraph, ParagraphProperties } from "../..";
import { ISectionPropertiesOptions, SectionProperties } from "./section-properties/section-properties";
export class Body extends XmlComponent {

View File

@ -1,5 +1,5 @@
import { twipsMeasureValue } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { twipsMeasureValue } from "@util/values";
export interface IColumnAttributes {
readonly width: number | string;

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Column, Columns } from ".";

View File

@ -1,5 +1,6 @@
import { decimalNumber, twipsMeasureValue } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { decimalNumber, twipsMeasureValue } from "@util/values";
import { Column } from "./column";
// <xsd:complexType name="CT_Columns">

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { DocumentGrid, DocumentGridType } from ".";

View File

@ -1,5 +1,5 @@
import { decimalNumber } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { decimalNumber } from "@util/values";
// not implemented
// <xsd:simpleType name="ST_DocGrid">

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { HeaderFooterReference, HeaderFooterReferenceType, HeaderFooterType } from "./header-footer-reference";
describe("HeaderFooterReference", () => {

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
// <xsd:simpleType name="ST_HdrFtr">
// <xsd:restriction base="xsd:string">

View File

@ -1,6 +1,6 @@
// http://officeopenxml.com/WPsectionLineNumbering.php
import { decimalNumber, twipsMeasureValue } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { decimalNumber, twipsMeasureValue } from "@util/values";
// <xsd:simpleType name="ST_LineNumberRestart">
// <xsd:restriction base="xsd:string">

View File

@ -1,7 +1,7 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { BorderStyle } from "file/border";
import { Formatter } from "@export/formatter";
import { BorderStyle } from "@file/border";
import { PageBorderDisplay, PageBorders, PageBorderZOrder } from "./page-borders";

View File

@ -1,6 +1,6 @@
// http://officeopenxml.com/WPsectionBorders.php
import { BorderElement, IBorderOptions } from "file/border";
import { IgnoreIfEmptyXmlComponent, XmlAttributeComponent } from "file/xml-components";
import { BorderElement, IBorderOptions } from "@file/border";
import { IgnoreIfEmptyXmlComponent, XmlAttributeComponent } from "@file/xml-components";
// <xsd:simpleType name="ST_PageBorderDisplay">
// <xsd:restriction base="xsd:string">

View File

@ -1,5 +1,5 @@
import { signedTwipsMeasureValue, twipsMeasureValue } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { signedTwipsMeasureValue, twipsMeasureValue } from "@util/values";
// <xsd:complexType name="CT_PageMar">
// <xsd:attribute name="top" type="ST_SignedTwipsMeasure" use="required"/>

View File

@ -1,7 +1,7 @@
// http://officeopenxml.com/WPSectionPgNumType.php
import { NumberFormat } from "file/shared/number-format";
import { decimalNumber } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { NumberFormat } from "@file/shared/number-format";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { decimalNumber } from "@util/values";
// <xsd:simpleType name="ST_ChapterSep">
// <xsd:restriction base="xsd:string">

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { PageOrientation, PageSize } from "./page-size";

View File

@ -1,5 +1,5 @@
import { twipsMeasureValue } from "file/values";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { twipsMeasureValue } from "@util/values";
// <xsd:simpleType name="ST_PageOrientation">
// <xsd:restriction base="xsd:string">

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { PageTextDirection, PageTextDirectionType } from "./page-text-direction";
describe("PageTextDirection", () => {

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
export enum PageTextDirectionType {
LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb",

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { SectionType, Type } from "./section-type";
describe("Type", () => {

View File

@ -1,5 +1,5 @@
// http://officeopenxml.com/WPsection.php
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
// <xsd:simpleType name="ST_SectionMark">
// <xsd:restriction base="xsd:string">

View File

@ -1,12 +1,12 @@
import { expect } from "chai";
import { convertInchesToTwip } from "convenience-functions";
import { Formatter } from "export/formatter";
import { FooterWrapper } from "file/footer-wrapper";
import { HeaderWrapper } from "file/header-wrapper";
import { Media } from "file/media";
import { NumberFormat } from "file/shared/number-format";
import { VerticalAlign } from "file/vertical-align";
import { Formatter } from "@export/formatter";
import { FooterWrapper } from "@file/footer-wrapper";
import { HeaderWrapper } from "@file/header-wrapper";
import { Media } from "@file/media";
import { NumberFormat } from "@file/shared/number-format";
import { VerticalAlign } from "@file/vertical-align";
import { convertInchesToTwip } from "@util/convenience-functions";
import { PageOrientation } from "./properties";
import { DocumentGridType } from "./properties/doc-grid";

View File

@ -1,10 +1,10 @@
// http://officeopenxml.com/WPsection.php
// tslint:disable: no-unnecessary-initializer
import { FooterWrapper } from "file/footer-wrapper";
import { HeaderWrapper } from "file/header-wrapper";
import { VerticalAlign, VerticalAlignElement } from "file/vertical-align";
import { OnOffElement, XmlComponent } from "file/xml-components";
import { FooterWrapper } from "@file/footer-wrapper";
import { HeaderWrapper } from "@file/header-wrapper";
import { VerticalAlign, VerticalAlignElement } from "@file/vertical-align";
import { OnOffElement, XmlComponent } from "@file/xml-components";
import { HeaderFooterReference, HeaderFooterReferenceType, HeaderFooterType } from "./properties/header-footer-reference";