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

Function models

frontend/public/swagger-ui-bundle.js:70955–71027  ·  view source on GitHub ↗
({
            specActions: s,
            specSelectors: o,
            layoutSelectors: i,
            layoutActions: a,
            getComponent: u,
            getConfigs: _,
            fn: w,
          })

Source from the content-addressed store, hash-verified

70953 }
70954 ),
70955 OI = kI,
70956 models = ({
70957 specActions: s,
70958 specSelectors: o,
70959 layoutSelectors: i,
70960 layoutActions: a,
70961 getComponent: u,
70962 getConfigs: _,
70963 fn: w,
70964 }) => {
70965 const x = o.selectSchemas(),
70966 C = Object.keys(x).length > 0,
70967 j = ['components', 'schemas'],
70968 { docExpansion: L, defaultModelsExpandDepth: B } = _(),
70969 $ = B > 0 && 'none' !== L,
70970 U = i.isShown(j, $),
70971 V = u('Collapse'),
70972 z = u('JSONSchema202012'),
70973 Y = u('ArrowUpIcon'),
70974 Z = u('ArrowDownIcon'),
70975 { getTitle: ee } = w.jsonSchema202012.useFn()
70976 ;(0, Re.useEffect)(() => {
70977 const a = Object.entries(x).some(([s]) => i.isShown([...j, s], !1)),
70978 u = U && (B > 1 || a),
70979 _ = null != o.specResolvedSubtree(j)
70980 u && !_ && s.requestResolvedSubtree(j)
70981 }, [U, B])
70982 const ie = (0, Re.useCallback)(() => {
70983 a.show(j, !U)
70984 }, [U]),
70985 ae = (0, Re.useCallback)((s) => {
70986 null !== s && a.readyToScroll(j, s)
70987 }, []),
70988 handleJSONSchema202012Ref = (s) => (o) => {
70989 null !== o && a.readyToScroll([...j, s], o)
70990 },
70991 handleJSONSchema202012Expand = (i) => (u, _) => {
70992 const w = [...j, i]
70993 if (_) {
70994 ;(null != o.specResolvedSubtree(w) || s.requestResolvedSubtree([...j, i]),
70995 a.show(w, !0))
70996 } else a.show(w, !1)
70997 }
70998 return !C || B < 0
70999 ? null
71000 : Re.createElement(
71001 'section',
71002 { className: Jn()('models', { 'is-open': U }), ref: ae },
71003 Re.createElement(
71004 'h4',
71005 null,
71006 Re.createElement(
71007 'button',
71008 { 'aria-expanded': U, className: 'models-control', onClick: ie },
71009 Re.createElement('span', null, 'Schemas'),
71010 U ? Re.createElement(Y, null) : Re.createElement(Z, null)
71011 )
71012 ),

Callers

nothing calls this directly

Calls 10

showMethod · 0.80
_Function · 0.70
uFunction · 0.70
eeFunction · 0.70
JnFunction · 0.50
keysMethod · 0.45
someMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected