MCPcopy Index your code
hub / github.com/dataease/SQLBot / render

Method render

frontend/public/swagger-ui-bundle.js:62791–62862  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62789 this.onChange(a, { isXml: i, isEditBox: this.state.isEditBox })
62790 }
62791 toggleIsEditBox = () => this.setState((s) => ({ isEditBox: !s.isEditBox }))
62792 render() {
62793 let {
62794 onChangeConsumes: s,
62795 param: o,
62796 isExecute: i,
62797 specSelectors: a,
62798 pathMethod: u,
62799 getComponent: _,
62800 } = this.props
62801 const w = _('Button'),
62802 x = _('TextArea'),
62803 C = _('HighlightCode', !0),
62804 j = _('contentType')
62805 let L = (a ? a.parameterWithMetaByIdentity(u, o) : o).get('errors', (0, ze.List)()),
62806 B = a.contentTypeValues(u).get('requestContentType'),
62807 $ =
62808 this.props.consumes && this.props.consumes.size
62809 ? this.props.consumes
62810 : ParamBody.defaultProp.consumes,
62811 { value: U, isEditBox: V } = this.state,
62812 z = null
62813 getKnownSyntaxHighlighterLanguage(U) && (z = 'json')
62814 const Y = `${createHtmlReadyId(`${u[1]}${u[0]}_parameters`)}_select`
62815 return Re.createElement(
62816 'div',
62817 {
62818 className: 'body-param',
62819 'data-param-name': o.get('name'),
62820 'data-param-in': o.get('in'),
62821 },
62822 V && i
62823 ? Re.createElement(x, {
62824 className: 'body-param__text' + (L.count() ? ' invalid' : ''),
62825 value: U,
62826 onChange: this.handleOnChange,
62827 })
62828 : U && Re.createElement(C, { className: 'body-param__example', language: z }, U),
62829 Re.createElement(
62830 'div',
62831 { className: 'body-param-options' },
62832 i
62833 ? Re.createElement(
62834 'div',
62835 { className: 'body-param-edit' },
62836 Re.createElement(
62837 w,
62838 {
62839 className: V
62840 ? 'btn cancel body-param__example-edit'
62841 : 'btn edit body-param__example-edit',
62842 onClick: this.toggleIsEditBox,
62843 },
62844 V ? 'Cancel' : 'Edit'
62845 )
62846 )
62847 : null,
62848 Re.createElement(

Callers

nothing calls this directly

Calls 4

createHtmlReadyIdFunction · 0.85
_Function · 0.70
getMethod · 0.65

Tested by

no test coverage detected