diff --git a/src/ui/src/components/core/content/CoreDataframeLegacy.vue b/src/ui/src/components/core/content/CoreDataframeLegacy.vue new file mode 100644 index 000000000..cddbe3073 --- /dev/null +++ b/src/ui/src/components/core/content/CoreDataframeLegacy.vue @@ -0,0 +1,653 @@ + + + + + + diff --git a/src/ui/src/core/index.ts b/src/ui/src/core/index.ts index e45d3627d..22ed6ebc6 100644 --- a/src/ui/src/core/index.ts +++ b/src/ui/src/core/index.ts @@ -13,6 +13,7 @@ import { getSupportedComponentTypes, getComponentDefinition, registerAbstractComponentTemplate, + registerComponentTemplate, } from "./templateMap"; import * as typeHierarchy from "./typeHierarchy"; import { auditAndFixComponents } from "./auditAndFix"; @@ -97,6 +98,16 @@ export function generateCore() { featureFlags.value = initData.featureFlags; loadAbstractTemplates(initData.abstractTemplates); + // put some components behind feature flag + + if (featureFlags.value.includes("dataframeEditor")) { + const component = await import( + "@/components/core/content/CoreDataframe.vue" + ).then((m) => m.default); + + registerComponentTemplate("dataframe", component); + } + // Only returned for edit (Builder) mode userFunctions.value = initData.userFunctions; diff --git a/src/ui/src/core/templateMap.ts b/src/ui/src/core/templateMap.ts index b05dd014a..f3e94189e 100644 --- a/src/ui/src/core/templateMap.ts +++ b/src/ui/src/core/templateMap.ts @@ -1,6 +1,6 @@ // Maps Writer Framework component types to renderable Vue components // content -import CoreDataframe from "../components/core/content/CoreDataframe.vue"; +import CoreDataframe from "../components/core/content/CoreDataframeLegacy.vue"; import CoreHeading from "../components/core/content/CoreHeading.vue"; import CoreIcon from "../components/core/content/CoreIcon.vue"; import CoreImage from "../components/core/content/CoreImage.vue";