Inline single use interfaces
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IGraphicDataAttributes {
|
||||
export class GraphicDataAttributes extends XmlAttributeComponent<{
|
||||
readonly uri?: string;
|
||||
}
|
||||
|
||||
export class GraphicDataAttributes extends XmlAttributeComponent<IGraphicDataAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
uri: "uri",
|
||||
};
|
||||
|
@ -1,12 +1,10 @@
|
||||
import { IMediaData } from "file/media";
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
interface IBlipProperties {
|
||||
class BlipAttributes extends XmlAttributeComponent<{
|
||||
readonly embed: string;
|
||||
readonly cstate: string;
|
||||
}
|
||||
|
||||
class BlipAttributes extends XmlAttributeComponent<IBlipProperties> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
embed: "r:embed",
|
||||
cstate: "cstate",
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IPicLocksAttributes {
|
||||
export class PicLocksAttributes extends XmlAttributeComponent<{
|
||||
readonly noChangeAspect?: number;
|
||||
readonly noChangeArrowheads?: number;
|
||||
}
|
||||
|
||||
export class PicLocksAttributes extends XmlAttributeComponent<IPicLocksAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
noChangeAspect: "noChangeAspect",
|
||||
noChangeArrowheads: "noChangeArrowheads",
|
||||
|
@ -1,12 +1,10 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface INonVisualPropertiesAttributes {
|
||||
export class NonVisualPropertiesAttributes extends XmlAttributeComponent<{
|
||||
readonly id?: number;
|
||||
readonly name?: string;
|
||||
readonly descr?: string;
|
||||
}
|
||||
|
||||
export class NonVisualPropertiesAttributes extends XmlAttributeComponent<INonVisualPropertiesAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
id: "id",
|
||||
name: "name",
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IPicAttributes {
|
||||
export class PicAttributes extends XmlAttributeComponent<{
|
||||
readonly xmlns?: string;
|
||||
}
|
||||
|
||||
export class PicAttributes extends XmlAttributeComponent<IPicAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
xmlns: "xmlns:pic",
|
||||
};
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IExtentsAttributes {
|
||||
export class ExtentsAttributes extends XmlAttributeComponent<{
|
||||
readonly cx?: number;
|
||||
readonly cy?: number;
|
||||
}
|
||||
|
||||
export class ExtentsAttributes extends XmlAttributeComponent<IExtentsAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
cx: "cx",
|
||||
cy: "cy",
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IOffsetAttributes {
|
||||
export class OffsetAttributes extends XmlAttributeComponent<{
|
||||
readonly x?: number;
|
||||
readonly y?: number;
|
||||
}
|
||||
|
||||
export class OffsetAttributes extends XmlAttributeComponent<IOffsetAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
x: "x",
|
||||
y: "y",
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IPresetGeometryAttributes {
|
||||
export class PresetGeometryAttributes extends XmlAttributeComponent<{
|
||||
readonly prst?: string;
|
||||
}
|
||||
|
||||
export class PresetGeometryAttributes extends XmlAttributeComponent<IPresetGeometryAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
prst: "prst",
|
||||
};
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IShapePropertiesAttributes {
|
||||
export class ShapePropertiesAttributes extends XmlAttributeComponent<{
|
||||
readonly bwMode?: string;
|
||||
}
|
||||
|
||||
export class ShapePropertiesAttributes extends XmlAttributeComponent<IShapePropertiesAttributes> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
bwMode: "bwMode",
|
||||
};
|
||||
|
@ -3,11 +3,9 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
import { GraphicData } from "./graphic-data";
|
||||
|
||||
interface IGraphicProperties {
|
||||
class GraphicAttributes extends XmlAttributeComponent<{
|
||||
readonly a: string;
|
||||
}
|
||||
|
||||
class GraphicAttributes extends XmlAttributeComponent<IGraphicProperties> {
|
||||
}> {
|
||||
protected readonly xmlKeys = {
|
||||
a: "xmlns:a",
|
||||
};
|
||||
|
@ -2,14 +2,7 @@ import { XmlAttributeComponent } from "file/xml-components";
|
||||
import { IDistance } from "../drawing";
|
||||
|
||||
// distT, distB etc have no effect on inline images, only floating
|
||||
export interface IInlineAttributes extends IDistance {
|
||||
readonly distT?: number;
|
||||
readonly distB?: number;
|
||||
readonly distL?: number;
|
||||
readonly distR?: number;
|
||||
}
|
||||
|
||||
export class InlineAttributes extends XmlAttributeComponent<IInlineAttributes> {
|
||||
export class InlineAttributes extends XmlAttributeComponent<IDistance> {
|
||||
protected readonly xmlKeys = {
|
||||
distT: "distT",
|
||||
distB: "distB",
|
||||
|
Reference in New Issue
Block a user