BaseComputedField.js
55 lines
| 1 | function BaseComputedField() { |
| 2 | /** |
| 3 | * @type {BaseAction} |
| 4 | */ |
| 5 | this.action = null; |
| 6 | this.hasInList = false; |
| 7 | } |
| 8 | |
| 9 | /** |
| 10 | * @param action {BaseAction} |
| 11 | */ |
| 12 | BaseComputedField.prototype.isSupported = function ( action ) { |
| 13 | return this.getSupportedActions().includes( action.type ); |
| 14 | }; |
| 15 | |
| 16 | BaseComputedField.prototype.isSupportedGlobal = function () { |
| 17 | return false; |
| 18 | }; |
| 19 | |
| 20 | /** |
| 21 | * @return {String[]} |
| 22 | */ |
| 23 | BaseComputedField.prototype.getSupportedActions = function () { |
| 24 | return []; |
| 25 | }; |
| 26 | |
| 27 | /** |
| 28 | * @param action {BaseAction} |
| 29 | */ |
| 30 | BaseComputedField.prototype.setAction = function ( action ) { |
| 31 | this.action = action; |
| 32 | }; |
| 33 | |
| 34 | /** |
| 35 | * @return {string} |
| 36 | */ |
| 37 | BaseComputedField.prototype.getName = function () { |
| 38 | return ''; |
| 39 | }; |
| 40 | |
| 41 | /** |
| 42 | * @return {string} |
| 43 | */ |
| 44 | BaseComputedField.prototype.getLabel = function () { |
| 45 | return ''; |
| 46 | }; |
| 47 | |
| 48 | /** |
| 49 | * @return {string|Function} |
| 50 | */ |
| 51 | BaseComputedField.prototype.getHelp = function () { |
| 52 | return ''; |
| 53 | }; |
| 54 | |
| 55 | export default BaseComputedField; |