pragma-schema
Advanced tools
Comparing version 1.0.60 to 1.0.61
{ | ||
"name": "pragma-schema", | ||
"version": "1.0.60", | ||
"version": "1.0.61", | ||
"description": "utility for building pragma schema structures", | ||
@@ -5,0 +5,0 @@ "main": "commonjs/src/schema.js", |
@@ -434,7 +434,13 @@ class IdObject { | ||
static element() { | ||
return { | ||
element: "", | ||
elements: [] | ||
} | ||
static element(tagName, title, field, attributes, styles) { | ||
const element = { | ||
element: tagName || "", | ||
title: title, | ||
field: field | ||
}; | ||
SchemaElementFactory.addAttributes(element, attributes); | ||
SchemaElementFactory.addStyles(element, styles); | ||
return element; | ||
} | ||
@@ -494,12 +500,3 @@ | ||
static input(title, field, attributes, styles) { | ||
const result = { | ||
element: "input", | ||
title: title, | ||
field: field | ||
}; | ||
SchemaElementFactory.addAttributes(result, attributes); | ||
SchemaElementFactory.addStyles(result, styles); | ||
return result; | ||
return this.element("input", title, field, attributes, styles); | ||
} | ||
@@ -524,13 +521,12 @@ | ||
static memo(title, field, attributes, styles) { | ||
const result = { | ||
element: "memo", | ||
title: title, | ||
field: field | ||
}; | ||
SchemaElementFactory.addAttributes(result, attributes); | ||
SchemaElementFactory.addStyles(result, styles); | ||
return result; | ||
return this.element("memo", title, field, attributes, styles); | ||
} | ||
static date(title, field, attributes, styles) { | ||
return this.element("date", title, field, attributes, styles); | ||
} | ||
static dateTime(title, field, attributes, styles) { | ||
return this.element("dateTime", title, field, attributes, styles); | ||
} | ||
@@ -537,0 +533,0 @@ static panelBar(title, actions, styles) { |
16525
505