A plugin for using DXP class-based configurations.
| Install | npm i @flatfile/plugin-dxp-configure | 
|---|---|
| Source: | View source | 
| Package: | @flatfile/plugin-dxp-configure 3 installs | 
The @flatfile/plugin-dxp-configure plugin lets you easily attach your implementation of the class-based schema configuration library @flatfile/configure to @flatfile/listener.
If you're upgrading from Portal 3, check out the Upgrade Guide.
workbook - WorkbookThe workbook parameter takes a Flatfile Workbook.
You can simply attach any existing workbook configuration you have to a listener, and it'll automatically apply to your next Space.
npm i @flatfile/plugin-dxp-configure
import { dxpConfigure } from "@flatfile/plugin-dxp-configure";
listener.jsimport { MyWorkbook } from './my-dxp-workbook.js'
import { dxpConfigure } from '@flatfile/plugin-dxp-configure'
export default (listener) => {
  listener.use(dxpConfigure(MyWorkbook))
}
listener.tsimport { MyWorkbook } from "./my-dxp-workbook.js";
import { dxpConfigure } from "@flatfile/plugin-dxp-configure";
import { FlatfileListener } from "@flatfile/listener";
export default (listener: FlatfileListener) => {
  listener.use(dxpConfigure(MyWorkbook));
};
my-dxp-workbook.jsimport { Sheet, TextField, Workbook } from "@flatfile/configure";
export const MyWorkbook = new Workbook({
  name: "My Workbook",
  namespace: "test",
  sheets: {
    mySheet: new Sheet("Test", {
      name: TextField("Full Name"),
      email: TextField({
        label: "Email Address",
        compute: (val) => {
          return val.toLowerCase();
        },
      }),
    }),
  },
});