2022-09-28 20:04:00 -06:00
|
|
|
import createReactClass from 'create-react-class';
|
2022-12-01 19:29:33 -05:00
|
|
|
import { createElement, useCallback, useEffect, useMemo, useState } from 'react';
|
2022-09-28 20:04:00 -06:00
|
|
|
|
|
|
|
import bootstrap from './bootstrap';
|
|
|
|
import Registry from './lib/registry';
|
|
|
|
|
|
|
|
export * from './backends';
|
|
|
|
export * from './widgets';
|
|
|
|
export * from './media-libraries';
|
2022-12-01 19:29:33 -05:00
|
|
|
export { default as locales } from './locales';
|
2022-09-28 20:04:00 -06:00
|
|
|
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-12-01 19:29:33 -05:00
|
|
|
window.useState = window.useState || useState;
|
|
|
|
window.useMemo = window.useMemo || useMemo;
|
|
|
|
window.useEffect = window.useEffect || useEffect;
|
|
|
|
window.useCallback = window.useCallback || useCallback;
|
|
|
|
window.h = window.h || createElement;
|
2022-09-28 20:04:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export default CMS;
|