ldx-widgets
Version:
widgets
38 lines (36 loc) • 1.13 kB
JavaScript
(function() {
module.exports = {
viewTriggers: {
'addValidationError': 'addValidationError',
'toggleError': 'toggleError',
'clearValidationError': 'clearValidationError',
'clearAllErrors': 'clearAllErrors',
'forceShowAll': 'forceShowAll',
'resetForceShowAll': 'resetForceShowAll'
},
addValidationError: function(options) {
return this.dispatch('add-error', options);
},
toggleError: function(options) {
return this.dispatch('toggle-error', options);
},
clearValidationError: function(options) {
return this.dispatch('clear-error', options);
},
clearAllErrors: function(isInPopover) {
return this.dispatch('clear-all', isInPopover);
},
forceShowAll: function(autoHideAfter, isInPopover) {
if (isInPopover == null) {
isInPopover = false;
}
return this.dispatch('force-show-all', {
autoHideAfter: autoHideAfter,
isInPopover: isInPopover
});
},
resetForceShowAll: function(isInPopover) {
return this.dispatch('reset-force-show-all');
}
};
}).call(this);