import { DATA_BASE_TYPES } from '@constants/constant'; import { CONSTANT_PLUGIN_TYPES, CONSTANT_PLUGIN_SHOW, CONSTANT_PLUGIN_EDIT } from '@constants/plugin'; import { DatabaseType } from './app.typings'; export function getAllDatabaseTypes():DatabaseType[] { return [ ...DATA_BASE_TYPES, ...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).map(item => { return { ...item, internal: false, commonly: false, }; }), ]; } export function getPluginWidgetShow(plugin: string) { return BI.Constants.getConstant(CONSTANT_PLUGIN_SHOW.replace('${databaseType}', plugin)); } export function getPluginWidgetEdit(plugin: string) { return BI.Constants.getConstant(CONSTANT_PLUGIN_EDIT.replace('${databaseType}', plugin)); }