@nextlyhq/plugin-form-builder 0.0.2-alpha.7 → 0.0.2-alpha.71

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.
Files changed (39) hide show
  1. package/README.md +29 -17
  2. package/dist/admin/index.d.ts +251 -454
  3. package/dist/admin/index.js +4782 -3985
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/field-references-BshlgMcn.js +1048 -0
  6. package/dist/field-references-BshlgMcn.js.map +1 -0
  7. package/dist/index.d.ts +341 -615
  8. package/dist/index.js +3893 -2406
  9. package/dist/index.js.map +1 -1
  10. package/dist/types-BHReIA0j.d.ts +986 -0
  11. package/package.json +40 -39
  12. package/dist/CheckboxFieldEditor-K4T6QX52.js +0 -121
  13. package/dist/CheckboxFieldEditor-K4T6QX52.js.map +0 -1
  14. package/dist/DateFieldEditor-JFJFAVOH.js +0 -187
  15. package/dist/DateFieldEditor-JFJFAVOH.js.map +0 -1
  16. package/dist/EmailFieldEditor-MMOXXL7P.js +0 -138
  17. package/dist/EmailFieldEditor-MMOXXL7P.js.map +0 -1
  18. package/dist/NumberFieldEditor-UISAYR6Z.js +0 -175
  19. package/dist/NumberFieldEditor-UISAYR6Z.js.map +0 -1
  20. package/dist/RadioFieldEditor-6UQFH4WT.js +0 -165
  21. package/dist/RadioFieldEditor-6UQFH4WT.js.map +0 -1
  22. package/dist/SelectFieldEditor-PSO4KHV4.js +0 -213
  23. package/dist/SelectFieldEditor-PSO4KHV4.js.map +0 -1
  24. package/dist/TextFieldEditor-5EU64EA5.js +0 -187
  25. package/dist/TextFieldEditor-5EU64EA5.js.map +0 -1
  26. package/dist/TextareaFieldEditor-773G3LNM.js +0 -190
  27. package/dist/TextareaFieldEditor-773G3LNM.js.map +0 -1
  28. package/dist/admin/index.css +0 -934
  29. package/dist/admin/index.css.map +0 -1
  30. package/dist/chunk-ABNZFTQK.js +0 -586
  31. package/dist/chunk-ABNZFTQK.js.map +0 -1
  32. package/dist/chunk-XTCEPJ7B.js +0 -256
  33. package/dist/chunk-XTCEPJ7B.js.map +0 -1
  34. package/dist/components/index.d.ts +0 -3
  35. package/dist/components/index.js +0 -9
  36. package/dist/components/index.js.map +0 -1
  37. package/dist/index-C0kBvYjm.d.ts +0 -1012
  38. package/dist/styles/form-builder.css +0 -1150
  39. 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. _Coming soon in beta._
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. Pin exact versions in production.
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
 
@@ -40,21 +39,26 @@ const fb = formBuilder({
40
39
 
41
40
  export default defineConfig({
42
41
  plugins: [fb.plugin],
43
- collections: [...fb.collections],
42
+ collections: [
43
+ /* your own collections only */
44
+ ],
44
45
  });
45
46
  ```
46
47
 
48
+ The plugin registers its `forms` and `form-submissions` collections itself. Don't
49
+ also add `fb.collections` to `collections`: the same slug twice stops the app
50
+ from booting with a duplicate `forms` collection.
51
+
47
52
  > 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
53
 
49
- ## Admin styling
54
+ ## Admin components
50
55
 
51
- The plugin's admin UI requires three imports in your admin route page so the builder and submissions filter render correctly:
56
+ The plugin's admin UI needs one import in your admin route page (a side effect
57
+ that registers the builder and submissions views):
52
58
 
53
59
  ```tsx
54
60
  // app/admin/[[...params]]/page.tsx
55
61
  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
62
  ```
59
63
 
60
64
  ## What this plugin adds
@@ -62,7 +66,15 @@ import "@nextlyhq/plugin-form-builder/styles/submissions-filter.css";
62
66
  - **Admin routes:** `/admin/collections/forms` and `/admin/collections/form-submissions`
63
67
  - **Collections:** `forms`, `form-submissions`
64
68
  - **Form lifecycle states:** Draft, Published, Closed
65
- - **Optional integrations:** email notifications, webhook delivery on submission, spam protection (honeypot, rate limit, reCAPTCHA v3)
69
+ - **Optional integrations:** email notifications, a `form.submission.created` webhook through Nextly's own webhooks, spam protection (honeypot, rate limit, reCAPTCHA v3)
70
+
71
+ ### Submission privacy
72
+
73
+ 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.
74
+
75
+ 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.
76
+
77
+ 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
78
 
67
79
  ## Field types
68
80
 
@@ -94,15 +106,15 @@ See the [Field types reference](https://nextlyhq.com/docs/plugins/form-builder#f
94
106
  - Server helpers: `submitForm`, `validateSubmission`, `getFormSubmissionStats`, `createFormConfig`, `validateFormConfig`, `assertValidFormConfig`
95
107
  - Export utilities: `exportToCSV`, `exportToJSON`, `exportAndDownload`, `downloadFile`, `generateExportFilename`
96
108
  - Collections: `formsCollection`, `submissionsCollection`
97
- - Type exports: `FormDocument`, `SubmissionDocument`, `FormSubmission`, `EmailConfig`, `WebhookConfig`, `WebhookEvent`, `FormFieldOption`, `SubmissionListProps`, `SubmissionDetailProps`
109
+ - Type exports: `FormDocument`, `SubmissionDocument`, `FormSubmission`, `FormNotification`, `EmailConfig`, `FormFieldOption`
98
110
 
99
111
  ## Compatibility
100
112
 
101
- | Tool | Version |
102
- | ----------------- | ------- |
103
- | Node.js | 20+ |
104
- | `nextly` | 0.0.x |
105
- | `@nextlyhq/admin` | 0.0.x |
113
+ | Tool | Version |
114
+ | ----------------- | ------------- |
115
+ | Node.js | 22.12+ or 24+ |
116
+ | `nextly` | 0.0.x |
117
+ | `@nextlyhq/admin` | 0.0.x |
106
118
 
107
119
  Plugins can break across minor versions during alpha. Pin exact versions of `nextly`, `@nextlyhq/admin`, and this plugin together.
108
120