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

Function components_request_body

frontend/public/swagger-ui-bundle.js:69577–69817  ·  view source on GitHub ↗
({
            userHasEditedBody: s,
            requestBody: o,
            requestBodyValue: i,
            requestBodyInclusionSetting: a,
            requestBodyErrors: u,
            getComponent: _,
            getConfigs: w,
            specSelectors: x,
            fn: C,
            contentType: j,
            isExecute: L,
            specPath: B,
            onChange: $,
            onChangeIncludeEmpty: U,
            activeExamplesKey: V,
            updateActiveExamplesKey: z,
            setRetainRequestBodyValueFlag: Y,
          })

Source from the content-addressed store, hash-verified

69575 C = w ? u.getIn(['examples', i, 'value']) : x
69576 return stringify(a.getSampleSchema(_, o, { includeWriteOnly: !0 }, C))
69577 },
69578 components_request_body = ({
69579 userHasEditedBody: s,
69580 requestBody: o,
69581 requestBodyValue: i,
69582 requestBodyInclusionSetting: a,
69583 requestBodyErrors: u,
69584 getComponent: _,
69585 getConfigs: w,
69586 specSelectors: x,
69587 fn: C,
69588 contentType: j,
69589 isExecute: L,
69590 specPath: B,
69591 onChange: $,
69592 onChangeIncludeEmpty: U,
69593 activeExamplesKey: V,
69594 updateActiveExamplesKey: z,
69595 setRetainRequestBodyValueFlag: Y,
69596 }) => {
69597 const handleFile = (s) => {
69598 $(s.target.files[0])
69599 },
69600 setIsIncludedOptions = (s) => {
69601 let o = { key: s, shouldDispatchInit: !1, defaultValue: !0 }
69602 return ('no value' === a.get(s, 'no value') && (o.shouldDispatchInit = !0), o)
69603 },
69604 Z = _('Markdown', !0),
69605 ee = _('modelExample'),
69606 ie = _('RequestBodyEditor'),
69607 ae = _('HighlightCode', !0),
69608 ce = _('ExamplesSelectValueRetainer'),
69609 le = _('Example'),
69610 pe = _('ParameterIncludeEmpty'),
69611 { showCommonExtensions: de } = w(),
69612 fe = o?.get('description') ?? null,
69613 ye = o?.get('content') ?? new ze.OrderedMap()
69614 j = j || ye.keySeq().first() || ''
69615 const be = ye.get(j) ?? (0, ze.OrderedMap)(),
69616 _e = be.get('schema', (0, ze.OrderedMap)()),
69617 Se = be.get('examples', null),
69618 we = Se?.map((s, i) => {
69619 const a = s?.get('value', null)
69620 return (a && (s = s.set('value', getDefaultRequestBodyValue(o, j, i, C), a)), s)
69621 })
69622 u = ze.List.isList(u) ? u : (0, ze.List)()
69623 if (C.isFileUploadIntended(be?.get('schema'), j)) {
69624 const s = _('Input')
69625 return L
69626 ? Re.createElement(s, { type: 'file', onChange: handleFile })
69627 : Re.createElement(
69628 'i',
69629 null,
69630 'Example values are not available for ',
69631 Re.createElement('code', null, j),
69632 ' media types.'
69633 )
69634 }

Callers

nothing calls this directly

Calls 15

getCommonExtensionsFunction · 0.85
stringifyFunction · 0.85
setIsIncludedOptionsFunction · 0.85
isEmptyValueFunction · 0.85
_Function · 0.70
wFunction · 0.70
$Function · 0.70
UFunction · 0.70
getMethod · 0.65
zFunction · 0.50

Tested by

no test coverage detected