import { shortcut } from '../../../../core/core'; import { MultiSelectItemXtype } from 'ui'; import { input } from './input.service'; @shortcut() @input('boolean') export class InputBoolean extends BI.Widget { static xtype = 'plugin.report.json.components.parameter_input.boolean' props = { value: '', } input: any; render() { const { value } = this.options; return { type: MultiSelectItemXtype, width: 80, selected: !!value, text: 'true', ref: (_ref: any) => { this.input = _ref; }, listeners: [{ eventName: BI.TextEditor.EVENT_CHANGE, action: () => { const value = this.input.getValue(); this.fireEvent('EVENT_CHANGE', value); }, }, { eventName: BI.TextEditor.EVENT_FOCUS, action: () => { this.fireEvent('EVENT_FOCUS'); }, }], }; } }