@nextlyhq/plugin-form-builder 0.0.2-alpha.75 → 0.0.2-alpha.76
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 +38 -24
- package/dist/admin/index.js +9155 -6116
- package/dist/admin/index.js.map +1 -1
- package/dist/index.d.ts +35 -5
- package/dist/index.js +2790 -263
- package/dist/index.js.map +1 -1
- package/dist/{field-references-oCuFEwkr.js → submission-title-CVixn15Z.js} +715 -66
- package/dist/submission-title-CVixn15Z.js.map +1 -0
- package/dist/{new-submissions-DGiIhdBF.d.ts → types-XdBrUfi1.d.ts} +108 -41
- package/package.json +10 -10
- package/dist/field-references-oCuFEwkr.js.map +0 -1
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as FormSettings, Z as NewSubmissionsData, t as AnyFormField, w as FormNotification, x as FormFieldTypeId } from "../types-XdBrUfi1.js";
|
|
2
2
|
import { ComponentPath, DocumentLockGates, FieldPickerChoice } from "@nextlyhq/plugin-sdk/admin";
|
|
3
3
|
import React, { JSX, ReactNode } from "react";
|
|
4
4
|
import { FormFieldCatalogType } from "nextly/field-catalog";
|
|
@@ -54,6 +54,12 @@ interface FormBuilderViewProps {
|
|
|
54
54
|
view?: string;
|
|
55
55
|
}
|
|
56
56
|
export declare function FormBuilderView({ id, entryId, collection, collectionSlug, isCreating, initialData, onSave, onSuccess, onDelete, documentLock, view }: FormBuilderViewProps): JSX.Element;
|
|
57
|
+
/**
|
|
58
|
+
* A submission as the entries API answers it, and the readings of it the
|
|
59
|
+
* list and a submission's page share, so the two cannot read it differently.
|
|
60
|
+
*
|
|
61
|
+
* @module admin/components/submissions/submission-row
|
|
62
|
+
*/
|
|
57
63
|
interface SubmissionRow {
|
|
58
64
|
id: string;
|
|
59
65
|
form: string | {
|
|
@@ -62,21 +68,23 @@ interface SubmissionRow {
|
|
|
62
68
|
};
|
|
63
69
|
data: Record<string, unknown>;
|
|
64
70
|
status: string;
|
|
71
|
+
/** Who sent it, as the write seam named it (`utils/submission-title`). */
|
|
72
|
+
title?: string | null;
|
|
65
73
|
spamReason?: string | null;
|
|
66
74
|
notes?: string | null;
|
|
67
75
|
ipAddress?: string | null;
|
|
68
76
|
userAgent?: string | null;
|
|
77
|
+
/** The page it was sent from: origin and path. */
|
|
78
|
+
page?: string | null;
|
|
69
79
|
submittedAt?: string | null;
|
|
80
|
+
createdAt?: string | null;
|
|
70
81
|
editedAt?: string | null;
|
|
71
82
|
editedBy?: string | null;
|
|
72
|
-
/**
|
|
83
|
+
/** What it was asked, as the write seam stored it. */
|
|
84
|
+
asked?: unknown;
|
|
85
|
+
/** Its version as read, sent back with a change. */
|
|
73
86
|
_rev?: string;
|
|
74
87
|
}
|
|
75
|
-
interface FormOption {
|
|
76
|
-
id: string;
|
|
77
|
-
name: string;
|
|
78
|
-
fields: FormField[];
|
|
79
|
-
}
|
|
80
88
|
interface SubmissionsViewProps {
|
|
81
89
|
collectionSlug?: string;
|
|
82
90
|
/**
|
|
@@ -86,16 +94,26 @@ interface SubmissionsViewProps {
|
|
|
86
94
|
formId?: string;
|
|
87
95
|
}
|
|
88
96
|
export declare function SubmissionsView({ collectionSlug, formId }: SubmissionsViewProps): JSX.Element;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
/** A submission as the entries API answers it. */
|
|
98
|
+
type SubmissionDocument = SubmissionRow;
|
|
99
|
+
interface SubmissionPageProps {
|
|
100
|
+
entryId?: string;
|
|
101
|
+
collectionSlug?: string;
|
|
102
|
+
initialData?: Partial<SubmissionDocument>;
|
|
103
|
+
/**
|
|
104
|
+
* What a colleague's claim on this submission withholds, as the entry page
|
|
105
|
+
* hands it over. While either is set the page offers no change and sends
|
|
106
|
+
* none, the automatic Read among them.
|
|
107
|
+
*/
|
|
108
|
+
documentLock?: DocumentLockGates;
|
|
109
|
+
/**
|
|
110
|
+
* Tells the entry page the submission was deleted: it stands its leave
|
|
111
|
+
* guard down and returns to the list. Used when unsaved work is on the
|
|
112
|
+
* page; otherwise the page moves to the next submission itself.
|
|
113
|
+
*/
|
|
114
|
+
onDelete?: () => void;
|
|
97
115
|
}
|
|
98
|
-
export declare function
|
|
116
|
+
export declare function SubmissionPage({ entryId, collectionSlug, initialData, documentLock, onDelete }: SubmissionPageProps): JSX.Element;
|
|
99
117
|
/** The card's rows: its reader's "Number of entries", the rows its `load` read. */
|
|
100
118
|
export declare function NewSubmissionsCard({ data, settings }: {
|
|
101
119
|
data: NewSubmissionsData;
|
|
@@ -249,7 +267,7 @@ interface FormBuilderProviderProps {
|
|
|
249
267
|
/** Default form settings (the canonical defaults from the settings reader) */
|
|
250
268
|
export declare const DEFAULT_SETTINGS: FormSettings;
|
|
251
269
|
/** Create a new notification rule with default values */
|
|
252
|
-
export declare function createNotification(): FormNotification;
|
|
270
|
+
export declare function createNotification(kind?: "team" | "visitor", fields?: readonly AnyFormField[]): FormNotification;
|
|
253
271
|
/**
|
|
254
272
|
* Generate a human-readable label from field type, using the shared catalog
|
|
255
273
|
* so a new field's default label matches what the picker called the type. A
|
|
@@ -356,16 +374,12 @@ interface FormNotificationsTabProps {
|
|
|
356
374
|
/** `null` while the builder-config request is still settling. */
|
|
357
375
|
defaults: NotificationDefaults | null;
|
|
358
376
|
}
|
|
359
|
-
/**
|
|
360
|
-
* FormNotificationsTab - the form's notification rules.
|
|
361
|
-
*
|
|
362
|
-
* Each rule references an existing email provider and template rather than
|
|
363
|
-
* duplicating provider credentials or embedding a second template editor.
|
|
364
|
-
*/
|
|
365
377
|
export declare function FormNotificationsTab({ defaults }: FormNotificationsTabProps): JSX.Element;
|
|
366
378
|
/** Component path for FormBuilderView */
|
|
367
379
|
export declare const FORM_BUILDER_VIEW_PATH: ComponentPath;
|
|
368
380
|
/** Component path for SubmissionsView */
|
|
369
381
|
export declare const SUBMISSIONS_VIEW_PATH: ComponentPath;
|
|
370
|
-
|
|
382
|
+
/** Component path for SubmissionPage, a submission's own page */
|
|
383
|
+
export declare const SUBMISSION_PAGE_PATH: ComponentPath;
|
|
384
|
+
export type { FieldCardsProps, FormBuilderActions, FormBuilderContextValue, FormBuilderProviderProps, FormBuilderState, FormBuilderViewProps, FormNotification, FormPreviewProps, FormSettings, SubmissionPageProps };
|
|
371
385
|
//# sourceMappingURL=index.d.ts.map
|