plantuml-parser
Version:
Parse PlantUML with JavaScript or TypeScript
317 lines (315 loc) • 11.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.File = exports.UML = exports.Stdlib_C4_Rel = exports.Stdlib_C4_Deployment = exports.Stdlib_C4_Dynamic_Rel = exports.Stdlib_C4_Boundary = exports.Stdlib_C4_Container_Component = exports.Stdlib_C4_Context = exports.Relationship = exports.Group = exports.Class = exports.Interface = exports.Enum = exports.MemberVariable = exports.Method = exports.UseCase = exports.Component = exports.Note = exports.Comment = void 0;
var Comment = /** @class */ (function () {
function Comment(comment) {
this.comment = comment;
this.comment = comment || '';
}
return Comment;
}());
exports.Comment = Comment;
var Note = /** @class */ (function () {
function Note(text, of) {
if (of === void 0) { of = ''; }
this.text = text;
this.of = of;
this.text = text || '';
this.of = of || '';
}
return Note;
}());
exports.Note = Note;
var Component = /** @class */ (function () {
function Component(name, title) {
this.name = name;
this.title = title;
}
return Component;
}());
exports.Component = Component;
var UseCase = /** @class */ (function () {
function UseCase(name, title) {
this.name = name;
this.title = title;
}
return UseCase;
}());
exports.UseCase = UseCase;
var Method = /** @class */ (function () {
function Method(name, isStatic, accessor, returnType, _arguments) {
this.name = name;
this.isStatic = isStatic;
this.accessor = accessor;
this.returnType = returnType;
this._arguments = _arguments;
this.isStatic = !!isStatic;
this.accessor = accessor || '+';
this.returnType = returnType || 'void';
this._arguments = _arguments || '';
}
return Method;
}());
exports.Method = Method;
var MemberVariable = /** @class */ (function () {
function MemberVariable(name, isStatic, accessor, type) {
if (type === void 0) { type = ''; }
this.name = name;
this.isStatic = isStatic;
this.accessor = accessor;
this.type = type;
this.isStatic = !!isStatic;
this.accessor = accessor || '+';
this.type = type || '';
}
return MemberVariable;
}());
exports.MemberVariable = MemberVariable;
var Enum = /** @class */ (function () {
function Enum(name, title, members, extends_, implements_, generics, stereotypes) {
if (members === void 0) { members = []; }
if (extends_ === void 0) { extends_ = []; }
if (implements_ === void 0) { implements_ = []; }
if (generics === void 0) { generics = []; }
if (stereotypes === void 0) { stereotypes = []; }
this.name = name;
this.title = title;
this.members = members;
this.extends_ = extends_;
this.implements_ = implements_;
this.generics = generics;
this.stereotypes = stereotypes;
this.members = members || [];
this.extends_ = extends_ || [];
this.implements_ = implements_ || [];
this.generics = generics || [];
this.stereotypes = stereotypes || [];
}
return Enum;
}());
exports.Enum = Enum;
var Interface = /** @class */ (function () {
function Interface(name, title, members, extends_, implements_, generics, stereotypes) {
if (members === void 0) { members = []; }
if (extends_ === void 0) { extends_ = []; }
if (implements_ === void 0) { implements_ = []; }
if (generics === void 0) { generics = []; }
if (stereotypes === void 0) { stereotypes = []; }
this.name = name;
this.title = title;
this.members = members;
this.extends_ = extends_;
this.implements_ = implements_;
this.generics = generics;
this.stereotypes = stereotypes;
this.members = members || [];
this.extends_ = extends_ || [];
this.implements_ = implements_ || [];
this.generics = generics || [];
this.stereotypes = stereotypes || [];
}
return Interface;
}());
exports.Interface = Interface;
var Class = /** @class */ (function () {
function Class(name, title, isAbstract, members, extends_, implements_, generics, stereotypes) {
if (members === void 0) { members = []; }
if (extends_ === void 0) { extends_ = []; }
if (implements_ === void 0) { implements_ = []; }
if (generics === void 0) { generics = []; }
if (stereotypes === void 0) { stereotypes = []; }
this.name = name;
this.title = title;
this.isAbstract = isAbstract;
this.members = members;
this.extends_ = extends_;
this.implements_ = implements_;
this.generics = generics;
this.stereotypes = stereotypes;
this.isAbstract = !!isAbstract;
this.members = members || [];
this.extends_ = extends_ || [];
this.implements_ = implements_ || [];
this.generics = generics || [];
this.stereotypes = stereotypes || [];
}
return Class;
}());
exports.Class = Class;
var Group = /** @class */ (function () {
function Group(name, title, type, elements) {
this.name = name;
this.title = title;
this.type = type;
this.elements = elements;
}
return Group;
}());
exports.Group = Group;
var Relationship = /** @class */ (function () {
function Relationship(left, right, leftType, rightType, leftArrowHead, rightArrowHead, leftArrowBody, rightArrowBody, leftCardinality, rightCardinality, label, hidden) {
this.left = left;
this.right = right;
this.leftType = leftType;
this.rightType = rightType;
this.leftArrowHead = leftArrowHead;
this.rightArrowHead = rightArrowHead;
this.leftArrowBody = leftArrowBody;
this.rightArrowBody = rightArrowBody;
this.leftCardinality = leftCardinality;
this.rightCardinality = rightCardinality;
this.label = label;
this.hidden = hidden;
this.leftType = leftType || '';
this.rightType = rightType || '';
this.leftArrowHead = leftArrowHead || '';
this.rightArrowHead = rightArrowHead || '';
this.leftArrowBody = leftArrowBody || '-';
this.rightArrowBody = rightArrowBody || '-';
this.leftCardinality = leftCardinality || '';
this.rightCardinality = rightCardinality || '';
this.label = label || '';
this.hidden = !!hidden;
}
return Relationship;
}());
exports.Relationship = Relationship;
var Stdlib_C4_Context = /** @class */ (function () {
function Stdlib_C4_Context(type_, alias, label, descr, sprite, tags, link) {
if (descr === void 0) { descr = ''; }
if (sprite === void 0) { sprite = ''; }
if (tags === void 0) { tags = ''; }
if (link === void 0) { link = ''; }
this.type_ = type_;
this.alias = alias;
this.label = label;
this.descr = descr;
this.sprite = sprite;
this.tags = tags;
this.link = link;
this.descr = descr || undefined;
this.sprite = sprite || undefined;
this.tags = tags || undefined;
this.link = link || undefined;
}
return Stdlib_C4_Context;
}());
exports.Stdlib_C4_Context = Stdlib_C4_Context;
var Stdlib_C4_Container_Component = /** @class */ (function () {
function Stdlib_C4_Container_Component(type_, alias, label, techn, descr, sprite, tags, link) {
if (techn === void 0) { techn = ''; }
if (descr === void 0) { descr = ''; }
if (sprite === void 0) { sprite = ''; }
if (tags === void 0) { tags = ''; }
if (link === void 0) { link = ''; }
this.type_ = type_;
this.alias = alias;
this.label = label;
this.techn = techn;
this.descr = descr;
this.sprite = sprite;
this.tags = tags;
this.link = link;
this.techn = techn || undefined;
this.descr = descr || undefined;
this.sprite = sprite || undefined;
this.tags = tags || undefined;
this.link = link || undefined;
}
return Stdlib_C4_Container_Component;
}());
exports.Stdlib_C4_Container_Component = Stdlib_C4_Container_Component;
var Stdlib_C4_Boundary = /** @class */ (function () {
function Stdlib_C4_Boundary(type_, alias, label, tags, link, elements) {
this.type_ = type_;
this.alias = alias;
this.label = label;
this.tags = tags;
this.link = link;
this.elements = elements;
this.tags = tags || undefined;
this.link = link || undefined;
}
return Stdlib_C4_Boundary;
}());
exports.Stdlib_C4_Boundary = Stdlib_C4_Boundary;
var Stdlib_C4_Dynamic_Rel = /** @class */ (function () {
function Stdlib_C4_Dynamic_Rel(type_, from, to, label, techn, descr, sprite, tags, link) {
if (techn === void 0) { techn = ''; }
if (descr === void 0) { descr = ''; }
if (sprite === void 0) { sprite = ''; }
if (tags === void 0) { tags = ''; }
if (link === void 0) { link = ''; }
this.type_ = type_;
this.from = from;
this.to = to;
this.label = label;
this.techn = techn;
this.descr = descr;
this.sprite = sprite;
this.tags = tags;
this.link = link;
this.techn = techn || undefined;
this.descr = descr || undefined;
this.sprite = sprite || undefined;
this.tags = tags || undefined;
this.link = link || undefined;
}
return Stdlib_C4_Dynamic_Rel;
}());
exports.Stdlib_C4_Dynamic_Rel = Stdlib_C4_Dynamic_Rel;
var Stdlib_C4_Deployment = /** @class */ (function () {
function Stdlib_C4_Deployment(type_, alias, label, type, descr, sprite, tags, link) {
if (type === void 0) { type = ''; }
if (descr === void 0) { descr = ''; }
if (sprite === void 0) { sprite = ''; }
if (tags === void 0) { tags = ''; }
if (link === void 0) { link = ''; }
this.type_ = type_;
this.alias = alias;
this.label = label;
this.type = type;
this.descr = descr;
this.sprite = sprite;
this.tags = tags;
this.link = link;
this.type = type || undefined;
this.descr = descr || undefined;
this.sprite = sprite || undefined;
this.tags = tags || undefined;
this.link = link || undefined;
}
return Stdlib_C4_Deployment;
}());
exports.Stdlib_C4_Deployment = Stdlib_C4_Deployment;
var Stdlib_C4_Rel = /** @class */ (function () {
function Stdlib_C4_Rel(type_, alias1, alias2, label, direction, techn) {
if (techn === void 0) { techn = ''; }
this.type_ = type_;
this.alias1 = alias1;
this.alias2 = alias2;
this.label = label;
this.direction = direction;
this.techn = techn;
this.techn = techn || undefined;
}
return Stdlib_C4_Rel;
}());
exports.Stdlib_C4_Rel = Stdlib_C4_Rel;
var UML = /** @class */ (function () {
function UML(elements) {
this.elements = elements;
}
return UML;
}());
exports.UML = UML;
var File = /** @class */ (function () {
function File(name, diagrams) {
this.name = name;
this.diagrams = diagrams;
this.diagrams = diagrams || [];
}
return File;
}());
exports.File = File;
//# sourceMappingURL=types.js.map