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

Function createElement

frontend/public/swagger-ui-bundle.js:57545–57609  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

57543 function createClassNameString(s) {
57544 return s.join(' ')
57545 }
57546 function createElement(s) {
57547 var o = s.node,
57548 i = s.stylesheet,
57549 a = s.style,
57550 u = void 0 === a ? {} : a,
57551 _ = s.useInlineStyles,
57552 w = s.key,
57553 x = o.properties,
57554 C = o.type,
57555 j = o.tagName,
57556 L = o.value
57557 if ('text' === C) return L
57558 if (j) {
57559 var B,
57560 $ = (function createChildren(s, o) {
57561 var i = 0
57562 return function (a) {
57563 return (
57564 (i += 1),
57565 a.map(function (a, u) {
57566 return createElement({
57567 node: a,
57568 stylesheet: s,
57569 useInlineStyles: o,
57570 key: 'code-segment-'.concat(i, '-').concat(u),
57571 })
57572 })
57573 )
57574 }
57575 })(i, _)
57576 if (_) {
57577 var U = Object.keys(i).reduce(function (s, o) {
57578 return (
57579 o.split('.').forEach(function (o) {
57580 s.includes(o) || s.push(o)
57581 }),
57582 s
57583 )
57584 }, []),
57585 V = x.className && x.className.includes('token') ? ['token'] : [],
57586 z =
57587 x.className &&
57588 V.concat(
57589 x.className.filter(function (s) {
57590 return !U.includes(s)
57591 })
57592 )
57593 B = _objectSpread(
57594 _objectSpread({}, x),
57595 {},
57596 {
57597 className: createClassNameString(z) || void 0,
57598 style: createStyleObject(x.className, Object.assign({}, x.style, u), i),
57599 }
57600 )
57601 } else
57602 B = _objectSpread(

Callers 1

defaultRendererFunction · 0.85

Calls 13

_objectSpreadFunction · 0.85
createClassNameStringFunction · 0.85
createStyleObjectFunction · 0.85
extends_extendsFunction · 0.85
concatMethod · 0.80
$Function · 0.70
mapMethod · 0.45
reduceMethod · 0.45
keysMethod · 0.45
forEachMethod · 0.45
includesMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected