UNPKG

asposewordscloud

Version:
168 lines (167 loc) 7.92 kB
"use strict"; /* * -------------------------------------------------------------------------------- * <copyright company="Aspose" file="drawingObjectInsert.ts"> * Copyright (c) 2025 Aspose.Words for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> * -------------------------------------------------------------------------------- */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawingObjectInsert = exports.importsMapDrawingObjectInsert = void 0; const position_1 = require("./position"); exports.importsMapDrawingObjectInsert = { Position: position_1.Position, }; /** * Drawing object element for insert. */ class DrawingObjectInsert { /** * Returns attribute type map */ static getAttributeTypeMap() { return DrawingObjectInsert.attributeTypeMap; } constructor(init) { Object.assign(this, init); } collectFilesContent(_resultFilesContent) { } validate() { var _a; if (this.relativeHorizontalPosition === null || this.relativeHorizontalPosition === undefined) { throw new Error('Property RelativeHorizontalPosition in DrawingObjectInsert is required.'); } if (this.left === null || this.left === undefined) { throw new Error('Property Left in DrawingObjectInsert is required.'); } if (this.relativeVerticalPosition === null || this.relativeVerticalPosition === undefined) { throw new Error('Property RelativeVerticalPosition in DrawingObjectInsert is required.'); } if (this.top === null || this.top === undefined) { throw new Error('Property Top in DrawingObjectInsert is required.'); } if (this.width === null || this.width === undefined) { throw new Error('Property Width in DrawingObjectInsert is required.'); } if (this.height === null || this.height === undefined) { throw new Error('Property Height in DrawingObjectInsert is required.'); } if (this.wrapType === null || this.wrapType === undefined) { throw new Error('Property WrapType in DrawingObjectInsert is required.'); } (_a = this.position) === null || _a === void 0 ? void 0 : _a.validate(); } } exports.DrawingObjectInsert = DrawingObjectInsert; /** * Attribute type map */ DrawingObjectInsert.attributeTypeMap = [ { name: "position", baseName: "Position", type: "Position", }, { name: "relativeHorizontalPosition", baseName: "RelativeHorizontalPosition", type: "DrawingObjectInsert.RelativeHorizontalPositionEnum", }, { name: "left", baseName: "Left", type: "number", }, { name: "relativeVerticalPosition", baseName: "RelativeVerticalPosition", type: "DrawingObjectInsert.RelativeVerticalPositionEnum", }, { name: "top", baseName: "Top", type: "number", }, { name: "width", baseName: "Width", type: "number", }, { name: "height", baseName: "Height", type: "number", }, { name: "wrapType", baseName: "WrapType", type: "DrawingObjectInsert.WrapTypeEnum", }, { name: "aspectRatioLocked", baseName: "AspectRatioLocked", type: "boolean", } ]; /** * Enums for DrawingObjectInsert */ // tslint:disable:quotemark // tslint:disable-next-line:no-namespace (function (DrawingObjectInsert) { let RelativeHorizontalPositionEnum; (function (RelativeHorizontalPositionEnum) { RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["Margin"] = 'Margin'] = "Margin"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["Page"] = 'Page'] = "Page"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["Column"] = 'Column'] = "Column"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["Default"] = 'Default'] = "Default"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["Character"] = 'Character'] = "Character"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["LeftMargin"] = 'LeftMargin'] = "LeftMargin"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["RightMargin"] = 'RightMargin'] = "RightMargin"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["InsideMargin"] = 'InsideMargin'] = "InsideMargin"; RelativeHorizontalPositionEnum[RelativeHorizontalPositionEnum["OutsideMargin"] = 'OutsideMargin'] = "OutsideMargin"; })(RelativeHorizontalPositionEnum = DrawingObjectInsert.RelativeHorizontalPositionEnum || (DrawingObjectInsert.RelativeHorizontalPositionEnum = {})); let RelativeVerticalPositionEnum; (function (RelativeVerticalPositionEnum) { RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["Margin"] = 'Margin'] = "Margin"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["TableDefault"] = 'TableDefault'] = "TableDefault"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["Page"] = 'Page'] = "Page"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["Paragraph"] = 'Paragraph'] = "Paragraph"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["TextFrameDefault"] = 'TextFrameDefault'] = "TextFrameDefault"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["Line"] = 'Line'] = "Line"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["TopMargin"] = 'TopMargin'] = "TopMargin"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["BottomMargin"] = 'BottomMargin'] = "BottomMargin"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["InsideMargin"] = 'InsideMargin'] = "InsideMargin"; RelativeVerticalPositionEnum[RelativeVerticalPositionEnum["OutsideMargin"] = 'OutsideMargin'] = "OutsideMargin"; })(RelativeVerticalPositionEnum = DrawingObjectInsert.RelativeVerticalPositionEnum || (DrawingObjectInsert.RelativeVerticalPositionEnum = {})); let WrapTypeEnum; (function (WrapTypeEnum) { WrapTypeEnum[WrapTypeEnum["Inline"] = 'Inline'] = "Inline"; WrapTypeEnum[WrapTypeEnum["TopBottom"] = 'TopBottom'] = "TopBottom"; WrapTypeEnum[WrapTypeEnum["Square"] = 'Square'] = "Square"; WrapTypeEnum[WrapTypeEnum["None"] = 'None'] = "None"; WrapTypeEnum[WrapTypeEnum["Tight"] = 'Tight'] = "Tight"; WrapTypeEnum[WrapTypeEnum["Through"] = 'Through'] = "Through"; })(WrapTypeEnum = DrawingObjectInsert.WrapTypeEnum || (DrawingObjectInsert.WrapTypeEnum = {})); })(DrawingObjectInsert = exports.DrawingObjectInsert || (exports.DrawingObjectInsert = {})); // tslint:enable:quotemark