2026-07-23 10:11:24 +00:00
|
|
|
// Module ID: 5414
|
2026-07-27 11:26:19 +00:00
|
|
|
// Function ID: 46432
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: isComponentClass
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [31]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getValidComponent, isComponentClass
|
|
|
|
|
|
2026-07-23 10:11:24 +00:00
|
|
|
// Module 5414 (isComponentClass)
|
|
|
|
|
import result from "result";
|
|
|
|
|
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const isComponentClass = function isComponentClass(renderScrollComponent) {
|
|
|
|
|
let BooleanResult = "function" === typeof renderScrollComponent;
|
|
|
|
|
if (BooleanResult) {
|
|
|
|
|
const prototype = renderScrollComponent.prototype;
|
|
|
|
|
let isReactComponent;
|
|
|
|
|
if (null != prototype) {
|
|
|
|
|
isReactComponent = prototype.isReactComponent;
|
|
|
|
|
}
|
|
|
|
|
BooleanResult = Boolean(isReactComponent);
|
|
|
|
|
}
|
|
|
|
|
return BooleanResult;
|
|
|
|
|
};
|
|
|
|
|
export const getValidComponent = function getValidComponent(ListEmptyComponent) {
|
|
|
|
|
let tmp = ListEmptyComponent;
|
|
|
|
|
if (!React.isValidElement(ListEmptyComponent)) {
|
|
|
|
|
let element = null;
|
|
|
|
|
if (null != ListEmptyComponent) {
|
|
|
|
|
element = React.createElement(ListEmptyComponent);
|
|
|
|
|
}
|
|
|
|
|
tmp = element;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|