UNPKG

asposewordscloud

Version:
145 lines (144 loc) 6.54 kB
"use strict"; /* * -------------------------------------------------------------------------------- * <copyright company="Aspose" file="border.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.Border = exports.importsMapBorder = void 0; const linkElement_1 = require("./linkElement"); const xmlColor_1 = require("./xmlColor"); exports.importsMapBorder = { LinkElement: linkElement_1.LinkElement, XmlColor: xmlColor_1.XmlColor, }; /** * Represents a border of an object. * Borders can be applied to various document elements including paragraph, run of text inside a paragraph or a table cell. */ class Border extends linkElement_1.LinkElement { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(Border.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } collectFilesContent(_resultFilesContent) { } validate() { var _a; super.validate(); (_a = this.color) === null || _a === void 0 ? void 0 : _a.validate(); } } exports.Border = Border; /** * Attribute type map */ Border.attributeTypeMap = [ { name: "borderType", baseName: "BorderType", type: "Border.BorderTypeEnum", }, { name: "color", baseName: "Color", type: "XmlColor", }, { name: "distanceFromText", baseName: "DistanceFromText", type: "number", }, { name: "lineStyle", baseName: "LineStyle", type: "Border.LineStyleEnum", }, { name: "lineWidth", baseName: "LineWidth", type: "number", }, { name: "shadow", baseName: "Shadow", type: "boolean", } ]; /** * Enums for Border */ // tslint:disable:quotemark // tslint:disable-next-line:no-namespace (function (Border) { let BorderTypeEnum; (function (BorderTypeEnum) { BorderTypeEnum[BorderTypeEnum["Bottom"] = 'Bottom'] = "Bottom"; BorderTypeEnum[BorderTypeEnum["Left"] = 'Left'] = "Left"; BorderTypeEnum[BorderTypeEnum["Right"] = 'Right'] = "Right"; BorderTypeEnum[BorderTypeEnum["Top"] = 'Top'] = "Top"; BorderTypeEnum[BorderTypeEnum["Horizontal"] = 'Horizontal'] = "Horizontal"; BorderTypeEnum[BorderTypeEnum["Vertical"] = 'Vertical'] = "Vertical"; BorderTypeEnum[BorderTypeEnum["DiagonalDown"] = 'DiagonalDown'] = "DiagonalDown"; BorderTypeEnum[BorderTypeEnum["DiagonalUp"] = 'DiagonalUp'] = "DiagonalUp"; BorderTypeEnum[BorderTypeEnum["None"] = 'None'] = "None"; })(BorderTypeEnum = Border.BorderTypeEnum || (Border.BorderTypeEnum = {})); let LineStyleEnum; (function (LineStyleEnum) { LineStyleEnum[LineStyleEnum["None"] = 'None'] = "None"; LineStyleEnum[LineStyleEnum["Single"] = 'Single'] = "Single"; LineStyleEnum[LineStyleEnum["Thick"] = 'Thick'] = "Thick"; LineStyleEnum[LineStyleEnum["Double"] = 'Double'] = "Double"; LineStyleEnum[LineStyleEnum["Hairline"] = 'Hairline'] = "Hairline"; LineStyleEnum[LineStyleEnum["Dot"] = 'Dot'] = "Dot"; LineStyleEnum[LineStyleEnum["DashLargeGap"] = 'DashLargeGap'] = "DashLargeGap"; LineStyleEnum[LineStyleEnum["DotDash"] = 'DotDash'] = "DotDash"; LineStyleEnum[LineStyleEnum["DotDotDash"] = 'DotDotDash'] = "DotDotDash"; LineStyleEnum[LineStyleEnum["Triple"] = 'Triple'] = "Triple"; LineStyleEnum[LineStyleEnum["ThinThickSmallGap"] = 'ThinThickSmallGap'] = "ThinThickSmallGap"; LineStyleEnum[LineStyleEnum["ThickThinSmallGap"] = 'ThickThinSmallGap'] = "ThickThinSmallGap"; LineStyleEnum[LineStyleEnum["ThinThickThinSmallGap"] = 'ThinThickThinSmallGap'] = "ThinThickThinSmallGap"; LineStyleEnum[LineStyleEnum["ThinThickMediumGap"] = 'ThinThickMediumGap'] = "ThinThickMediumGap"; LineStyleEnum[LineStyleEnum["ThickThinMediumGap"] = 'ThickThinMediumGap'] = "ThickThinMediumGap"; LineStyleEnum[LineStyleEnum["ThinThickThinMediumGap"] = 'ThinThickThinMediumGap'] = "ThinThickThinMediumGap"; LineStyleEnum[LineStyleEnum["ThinThickLargeGap"] = 'ThinThickLargeGap'] = "ThinThickLargeGap"; LineStyleEnum[LineStyleEnum["ThickThinLargeGap"] = 'ThickThinLargeGap'] = "ThickThinLargeGap"; LineStyleEnum[LineStyleEnum["ThinThickThinLargeGap"] = 'ThinThickThinLargeGap'] = "ThinThickThinLargeGap"; LineStyleEnum[LineStyleEnum["Wave"] = 'Wave'] = "Wave"; LineStyleEnum[LineStyleEnum["DoubleWave"] = 'DoubleWave'] = "DoubleWave"; LineStyleEnum[LineStyleEnum["DashSmallGap"] = 'DashSmallGap'] = "DashSmallGap"; LineStyleEnum[LineStyleEnum["DashDotStroker"] = 'DashDotStroker'] = "DashDotStroker"; LineStyleEnum[LineStyleEnum["Emboss3D"] = 'Emboss3D'] = "Emboss3D"; LineStyleEnum[LineStyleEnum["Engrave3D"] = 'Engrave3D'] = "Engrave3D"; LineStyleEnum[LineStyleEnum["Outset"] = 'Outset'] = "Outset"; LineStyleEnum[LineStyleEnum["Inset"] = 'Inset'] = "Inset"; })(LineStyleEnum = Border.LineStyleEnum || (Border.LineStyleEnum = {})); })(Border = exports.Border || (exports.Border = {})); // tslint:enable:quotemark