@nextlyhq/plugin-form-builder 0.0.2-alpha.7 → 0.0.2-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -16
- package/dist/admin/index.d.ts +251 -454
- package/dist/admin/index.js +4782 -3985
- package/dist/admin/index.js.map +1 -1
- package/dist/field-references-BshlgMcn.js +1048 -0
- package/dist/field-references-BshlgMcn.js.map +1 -0
- package/dist/index.d.ts +341 -615
- package/dist/index.js +3893 -2406
- package/dist/index.js.map +1 -1
- package/dist/types-BHReIA0j.d.ts +986 -0
- package/package.json +40 -39
- package/dist/CheckboxFieldEditor-K4T6QX52.js +0 -121
- package/dist/CheckboxFieldEditor-K4T6QX52.js.map +0 -1
- package/dist/DateFieldEditor-JFJFAVOH.js +0 -187
- package/dist/DateFieldEditor-JFJFAVOH.js.map +0 -1
- package/dist/EmailFieldEditor-MMOXXL7P.js +0 -138
- package/dist/EmailFieldEditor-MMOXXL7P.js.map +0 -1
- package/dist/NumberFieldEditor-UISAYR6Z.js +0 -175
- package/dist/NumberFieldEditor-UISAYR6Z.js.map +0 -1
- package/dist/RadioFieldEditor-6UQFH4WT.js +0 -165
- package/dist/RadioFieldEditor-6UQFH4WT.js.map +0 -1
- package/dist/SelectFieldEditor-PSO4KHV4.js +0 -213
- package/dist/SelectFieldEditor-PSO4KHV4.js.map +0 -1
- package/dist/TextFieldEditor-5EU64EA5.js +0 -187
- package/dist/TextFieldEditor-5EU64EA5.js.map +0 -1
- package/dist/TextareaFieldEditor-773G3LNM.js +0 -190
- package/dist/TextareaFieldEditor-773G3LNM.js.map +0 -1
- package/dist/admin/index.css +0 -934
- package/dist/admin/index.css.map +0 -1
- package/dist/chunk-ABNZFTQK.js +0 -586
- package/dist/chunk-ABNZFTQK.js.map +0 -1
- package/dist/chunk-XTCEPJ7B.js +0 -256
- package/dist/chunk-XTCEPJ7B.js.map +0 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +0 -9
- package/dist/components/index.js.map +0 -1
- package/dist/index-C0kBvYjm.d.ts +0 -1012
- package/dist/styles/form-builder.css +0 -1150
- package/dist/styles/submissions-filter.css +0 -75
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @nextlyhq/plugin-form-builder
|
|
2
2
|
|
|
3
|
-
Drag-and-drop form builder plugin for Nextly. Build forms visually, collect submissions, and filter them by form.
|
|
3
|
+
Drag-and-drop form builder plugin for Nextly. Build forms visually, collect submissions, and filter them by form.
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/@nextlyhq/plugin-form-builder"><img alt="npm" src="https://img.shields.io/npm/v/@nextlyhq/plugin-form-builder?style=flat-square&label=npm&color=cb3837" /></a>
|
|
@@ -8,11 +8,10 @@ Drag-and-drop form builder plugin for Nextly. Build forms visually, collect subm
|
|
|
8
8
|
<a href="https://nextlyhq.com/docs"><img alt="Status" src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
> [!WARNING]
|
|
12
|
-
> **Coming soon in beta. Plugins are not ready for use yet.** Public plugin support, including stable APIs, the official plugin gallery, and documentation guarantees, lands at the Nextly **beta** release. This package is published for early exploration only. Surfaces, names, and behaviour will change without notice. Do not rely on plugins for production or serious development work. Wait for the beta release announcement before integrating plugins into your project.
|
|
13
|
-
|
|
14
11
|
> [!IMPORTANT]
|
|
15
|
-
> Nextly is in alpha. APIs may change before 1.0
|
|
12
|
+
> Nextly is in alpha. APIs may change before 1.0 — pin exact versions in production.
|
|
13
|
+
> See the [plugin stability ladder](https://nextlyhq.com/docs/plugins/stability) for
|
|
14
|
+
> which plugin surfaces are stable and which are experimental.
|
|
16
15
|
|
|
17
16
|
## What it is
|
|
18
17
|
|
|
@@ -46,15 +45,14 @@ export default defineConfig({
|
|
|
46
45
|
|
|
47
46
|
> A `formBuilderPlugin` default-instance shortcut is also exported for cases where no customization is needed. See [the plugin docs](https://nextlyhq.com/docs/plugins/form-builder) for the full options reference.
|
|
48
47
|
|
|
49
|
-
## Admin
|
|
48
|
+
## Admin components
|
|
50
49
|
|
|
51
|
-
The plugin's admin UI
|
|
50
|
+
The plugin's admin UI needs one import in your admin route page (a side effect
|
|
51
|
+
that registers the builder and submissions views):
|
|
52
52
|
|
|
53
53
|
```tsx
|
|
54
54
|
// app/admin/[[...params]]/page.tsx
|
|
55
55
|
import "@nextlyhq/plugin-form-builder/admin";
|
|
56
|
-
import "@nextlyhq/plugin-form-builder/styles/builder.css";
|
|
57
|
-
import "@nextlyhq/plugin-form-builder/styles/submissions-filter.css";
|
|
58
56
|
```
|
|
59
57
|
|
|
60
58
|
## What this plugin adds
|
|
@@ -62,7 +60,15 @@ import "@nextlyhq/plugin-form-builder/styles/submissions-filter.css";
|
|
|
62
60
|
- **Admin routes:** `/admin/collections/forms` and `/admin/collections/form-submissions`
|
|
63
61
|
- **Collections:** `forms`, `form-submissions`
|
|
64
62
|
- **Form lifecycle states:** Draft, Published, Closed
|
|
65
|
-
- **Optional integrations:** email notifications, webhook
|
|
63
|
+
- **Optional integrations:** email notifications, a `form.submission.created` webhook through Nextly's own webhooks, spam protection (honeypot, rate limit, reCAPTCHA v3)
|
|
64
|
+
|
|
65
|
+
### Submission privacy
|
|
66
|
+
|
|
67
|
+
Submissions carry visitor-entered answers plus `ipAddress` and `userAgent`, so the `form-submissions` collection suppresses the default `entry.*` events (which would otherwise deliver that content to any endpoint subscribed to `entry.created` or `*`). In their place it emits a curated **`form.submission.created`** event carrying only safe metadata — which form, when, and the submission status — never the answers, IP, or user agent. Subscribe an endpoint to `form.submission.created` to be notified of new submissions without receiving their content.
|
|
68
|
+
|
|
69
|
+
Do **not** override the submissions collection with `webhooks: true`: that would re-enable the raw `entry.*` events and deliver the PII-bearing submission content. Any collection can adopt the same pattern via the `webhooks` option: `{ record: false }` suppresses the default events, and `{ record: false, emit: { event, fields } }` additionally emits a curated event carrying only the allowlisted `fields`. Recording is on by default for everything else.
|
|
70
|
+
|
|
71
|
+
A collection or single created in the **Schema Builder** can be opted out the same way, without touching code: **Settings → Advanced → Webhook recording**. The choice is stored on the entity's registry row, so it holds across restarts. For code-first entities the `webhooks` option in config remains the source of truth and is republished on every boot.
|
|
66
72
|
|
|
67
73
|
## Field types
|
|
68
74
|
|
|
@@ -94,15 +100,15 @@ See the [Field types reference](https://nextlyhq.com/docs/plugins/form-builder#f
|
|
|
94
100
|
- Server helpers: `submitForm`, `validateSubmission`, `getFormSubmissionStats`, `createFormConfig`, `validateFormConfig`, `assertValidFormConfig`
|
|
95
101
|
- Export utilities: `exportToCSV`, `exportToJSON`, `exportAndDownload`, `downloadFile`, `generateExportFilename`
|
|
96
102
|
- Collections: `formsCollection`, `submissionsCollection`
|
|
97
|
-
- Type exports: `FormDocument`, `SubmissionDocument`, `FormSubmission`, `
|
|
103
|
+
- Type exports: `FormDocument`, `SubmissionDocument`, `FormSubmission`, `FormNotification`, `EmailConfig`, `FormFieldOption`
|
|
98
104
|
|
|
99
105
|
## Compatibility
|
|
100
106
|
|
|
101
|
-
| Tool | Version
|
|
102
|
-
| ----------------- |
|
|
103
|
-
| Node.js |
|
|
104
|
-
| `nextly` | 0.0.x
|
|
105
|
-
| `@nextlyhq/admin` | 0.0.x
|
|
107
|
+
| Tool | Version |
|
|
108
|
+
| ----------------- | ------------- |
|
|
109
|
+
| Node.js | 22.12+ or 24+ |
|
|
110
|
+
| `nextly` | 0.0.x |
|
|
111
|
+
| `@nextlyhq/admin` | 0.0.x |
|
|
106
112
|
|
|
107
113
|
Plugins can break across minor versions during alpha. Pin exact versions of `nextly`, `@nextlyhq/admin`, and this plugin together.
|
|
108
114
|
|