UNPKG

@wbg-mde/model

Version:

Metadata Editor Model Definitions

72 lines (71 loc) 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class TemplateMetadata { constructor(template) { this._id = template._id; this.type = template.type; this.systemDefined = template.systemDefined; this.path = template.path; this.name = template.name; this.fileName = template.fileName; this.author = template.author; this.created = template.created; this.modified = template.modified; this.description = template.description; this.organization = template.organization; this.version = template.version; this.language = template.language; } } exports.TemplateMetadata = TemplateMetadata; class Template { constructor(info) { this.templateType = info.templateType; this.schema = info.schema; this.form = info.form; } } exports.Template = Template; class DefinedItem { constructor(item) { this.id = item.id; this.key = item.key; this.type = item.type; this.title = item.title; this.description = item.description; this.items = item.items; this.expandable = item.expandable; this.expanded = item.expanded; } } exports.DefinedItem = DefinedItem; class VirtualItem { constructor(item) { this.id = item.id; this.key = item.key; this.type = item.type; this.title = item.title; this.isVirtual = item.isVirtual; this.expandable = item.expandable; this.expanded = item.expanded; this.items = item.items; } } exports.VirtualItem = VirtualItem; class PropertyItem { constructor(item) { this.id = item.id; this.key = item.key; this.title = item.title; this.type = item.type; this.originalTitle = item.originalTitle; this.description = item.description; this.originalDescription = item.originalDescription; this.items = item.items; this.enum = item.enum; this.required = item.required; this.readonly = item.readonly; this.default = item.default; } } exports.PropertyItem = PropertyItem;