MCPcopy Create free account
hub / github.com/baidu/amis / controlToNormalRenderer

Function controlToNormalRenderer

packages/amis/src/compat.ts:625–644  ·  view source on GitHub ↗
(item: any)

Source from the content-addressed store, hash-verified

623 return schema;
624
625 function controlToNormalRenderer(item: any) {
626 if (item?.$ref && props.resolveDefinitions) {
627 item = {
628 ...props.resolveDefinitions(item.$ref),
629 ...item
630 };
631 delete item.$ref;
632 }
633
634 return item && controlMapping[item.type]
635 ? {
636 ...item,
637 type: controlMapping[item.type]
638 }
639 : ~maybeFormItem.indexOf(item?.type)
640 ? wrapControl(item)
641 : ~maybeStatic.indexOf(item?.type)
642 ? wrapStatic(item)
643 : item;
644 }
645});

Callers 1

compat.tsFile · 0.85

Calls 3

wrapStaticFunction · 0.85
wrapControlFunction · 0.70
resolveDefinitionsMethod · 0.45

Tested by

no test coverage detected