tachybase_todo/packages/plugins/@tachybase/plugin-snapshot-field/src/client/index.tsx
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

20 lines
700 B
TypeScript

import { Plugin } from '@tachybase/client';
import { SnapshotFieldInterface } from './interface';
import {
snapshotBlockInitializers,
snapshotBlockInitializers_deprecated,
} from './SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers';
import { SnapshotFieldProvider } from './SnapshotFieldProvider';
export class SnapshotFieldPlugin extends Plugin {
async load() {
this.app.use(SnapshotFieldProvider);
this.app.schemaInitializerManager.add(snapshotBlockInitializers_deprecated);
this.app.schemaInitializerManager.add(snapshotBlockInitializers);
this.app.dataSourceManager.addFieldInterfaces([SnapshotFieldInterface]);
}
}
export default SnapshotFieldPlugin;