* This class provides utility methods for interrogating an instance of model uiState object.
*/
-'use strict';
-
import _includes from 'lodash/includes'
import _isArray from 'lodash/isArray'
import guid from './../guid'
isBoolean(property = {}) {
return (typeof(property['data-type']) == 'string') && (property['data-type'].toLowerCase() == 'boolean')
},
+ isLeafEmpty(property = {}) {
+ return (typeof(property['data-type']) == 'string') && (property['data-type'].toLowerCase() == 'empty')
+ },
isLeaf(property = {}) {
return /leaf|choice/.test(property.type);
},
return /string|int/.test(property['data-type']) || Property.isEnumeration(property) || Property.isGuid(property);
},
defaultValue(property = {}) {
- if (property.defaultValue) {
- return property.defaultValue;
+ if (property['default-value']) {
+ return property['default-value'];
}
if (this.isObject(property)) {
return {};
if (property.type === 'leaf') {
return defaultValue(property);
}
+ if (property.type === 'leaf_list' ) {
+ return "";
+ }
if (/list/.test(property.type)) {
property.type = 'container';
}