@nextlyhq/plugin-form-builder 0.0.2-alpha.60 → 0.0.2-alpha.62
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/dist/admin/index.d.ts +18 -2
- package/dist/admin/index.js +1796 -1306
- package/dist/admin/index.js.map +1 -1
- package/dist/{chunk-XCICDELK.js → chunk-H5X3FKOZ.js} +131 -1
- package/dist/chunk-H5X3FKOZ.js.map +1 -0
- package/dist/index.d.ts +3 -18
- package/dist/index.js +601 -166
- package/dist/index.js.map +1 -1
- package/dist/{types-DuEFdLNU.d.ts → types-hLfLe81K.d.ts} +122 -75
- package/package.json +11 -11
- package/dist/chunk-XCICDELK.js.map +0 -1
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPath } from '@nextlyhq/plugin-sdk/admin';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { q as FormField, s as FormFieldTypeId, A as AnyFormField, b as FormSettings, v as FormNotification } from '../types-
|
|
3
|
+
import { q as FormField, s as FormFieldTypeId, A as AnyFormField, b as FormSettings, v as FormNotification } from '../types-hLfLe81K.js';
|
|
4
4
|
import { FormFieldCatalogType, FieldTypeCatalogEntry } from 'nextly/field-catalog';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'nextly';
|
|
@@ -17,6 +17,7 @@ interface FormBuilderViewProps {
|
|
|
17
17
|
slug?: string;
|
|
18
18
|
description?: string;
|
|
19
19
|
status?: "draft" | "published" | "closed";
|
|
20
|
+
closedMessage?: string;
|
|
20
21
|
fields?: unknown[];
|
|
21
22
|
settings?: Record<string, unknown>;
|
|
22
23
|
notifications?: unknown[];
|
|
@@ -156,6 +157,8 @@ interface FormBuilderState {
|
|
|
156
157
|
slug: string;
|
|
157
158
|
description?: string;
|
|
158
159
|
status: "draft" | "published" | "closed";
|
|
160
|
+
/** What a closed form tells a visitor who reaches it. */
|
|
161
|
+
closedMessage?: string;
|
|
159
162
|
};
|
|
160
163
|
/** Form settings */
|
|
161
164
|
settings: FormSettings;
|
|
@@ -206,6 +209,7 @@ interface FormBuilderProviderProps {
|
|
|
206
209
|
slug?: string;
|
|
207
210
|
description?: string;
|
|
208
211
|
status?: "draft" | "published" | "closed";
|
|
212
|
+
closedMessage?: string;
|
|
209
213
|
fields?: AnyFormField[];
|
|
210
214
|
settings?: Partial<FormSettings>;
|
|
211
215
|
notifications?: FormNotification[];
|
|
@@ -293,8 +297,20 @@ interface SpamDefaults {
|
|
|
293
297
|
interface FormSettingsTabProps {
|
|
294
298
|
/** Plugin-level spam defaults (from builder-config); null while loading. */
|
|
295
299
|
spamDefaults: SpamDefaults | null;
|
|
300
|
+
/**
|
|
301
|
+
* Collections a form may redirect to (from builder-config); null while
|
|
302
|
+
* loading. Empty means the site configured none, and the option is not
|
|
303
|
+
* offered — choosing it could only ever produce a form with no destination.
|
|
304
|
+
*/
|
|
305
|
+
redirectCollections: string[] | null;
|
|
306
|
+
/**
|
|
307
|
+
* The configuration request failed, as distinct from returning nothing. An
|
|
308
|
+
* empty list is a valid answer; a failure is not an answer at all, and
|
|
309
|
+
* saying "no collection is configured" on a 403 states something false.
|
|
310
|
+
*/
|
|
311
|
+
redirectConfigFailed: boolean;
|
|
296
312
|
}
|
|
297
|
-
declare function FormSettingsTab({ spamDefaults }: FormSettingsTabProps): react_jsx_runtime.JSX.Element;
|
|
313
|
+
declare function FormSettingsTab({ spamDefaults, redirectCollections, redirectConfigFailed, }: FormSettingsTabProps): react_jsx_runtime.JSX.Element;
|
|
298
314
|
|
|
299
315
|
/** Host-level notification defaults surfaced by the builder-config route. */
|
|
300
316
|
interface NotificationDefaults {
|