2022-09-28 20:04:00 -06:00
|
|
|
import createReactClass from 'create-react-class';
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import bootstrap from './bootstrap';
|
|
|
|
import Registry from './lib/registry';
|
|
|
|
|
|
|
|
export * from './backends';
|
|
|
|
export * from './widgets';
|
|
|
|
export * from './media-libraries';
|
|
|
|
export * from './locales';
|
|
|
|
export * from './lib';
|
|
|
|
|
2022-11-05 15:29:04 -04:00
|
|
|
export * from './interface';
|
|
|
|
|
2022-11-05 00:22:38 -04:00
|
|
|
const CMS = {
|
2022-09-28 20:04:00 -06:00
|
|
|
...Registry,
|
|
|
|
init: bootstrap,
|
|
|
|
};
|
|
|
|
|
|
|
|
if (typeof window !== 'undefined') {
|
|
|
|
window.CMS = CMS;
|
|
|
|
window.createClass = window.createClass || createReactClass;
|
2022-11-04 17:41:12 -04:00
|
|
|
window.useState = window.useState || React.useState;
|
|
|
|
window.useMemo = window.useMemo || React.useMemo;
|
|
|
|
window.useEffect = window.useEffect || React.useEffect;
|
|
|
|
window.useCallback = window.useCallback || React.useCallback;
|
2022-09-28 20:04:00 -06:00
|
|
|
window.h = window.h || React.createElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default CMS;
|