1.3.0 • Published 8 months ago

@flatfile/plugin-dxp-configure v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

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.

Parameters

workbook - Workbook

The workbook parameter takes a Flatfile Workbook.

Usage

You can simply attach any existing workbook configuration you have to a listener, and it'll automatically apply to your next Space.

Install

npm i @flatfile/plugin-dxp-configure

Import

import { dxpConfigure } from "@flatfile/plugin-dxp-configure";

listener.js

import { MyWorkbook } from './my-dxp-workbook.js'
import { dxpConfigure } from '@flatfile/plugin-dxp-configure'

export default (listener) => {
  listener.use(dxpConfigure(MyWorkbook))
}

listener.ts

import { 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.js

import { 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();
        },
      }),
    }),
  },
});
1.3.0

8 months ago

1.2.1

9 months ago

1.2.0

10 months ago

1.1.3

10 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago