@fragno-dev/forms 0.0.3 → 0.1.0
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 +159 -25
- package/dist/browser/client/react.d.ts +143 -94
- package/dist/browser/client/react.js +1 -1
- package/dist/browser/client/solid.d.ts +143 -94
- package/dist/browser/client/solid.js +1 -1
- package/dist/browser/client/svelte.d.ts +143 -94
- package/dist/browser/client/svelte.d.ts.map +1 -1
- package/dist/browser/client/svelte.js +1 -1
- package/dist/browser/client/vanilla.d.ts +143 -94
- package/dist/browser/client/vanilla.d.ts.map +1 -1
- package/dist/browser/client/vanilla.js +1 -1
- package/dist/browser/client/vue.d.ts +65 -16
- package/dist/browser/client/vue.js +15 -1
- package/dist/browser/client/vue.js.map +1 -1
- package/dist/browser/index.d.ts +332 -243
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{src-DbMX_NY6.js → src-BBaSaf29.js} +193 -18
- package/dist/browser/src-BBaSaf29.js.map +1 -0
- package/dist/node/index.d.ts +163 -74
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +60 -23
- package/dist/node/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +8 -9
- package/dist/browser/src-DbMX_NY6.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,47 +1,181 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h3>Fragno Forms: Form Builder Library</h3>
|
|
3
|
+
<a href="https://fragno.dev/forms">Live Demo</a> •
|
|
4
|
+
<a href="https://fragno.dev/docs/forms">Documentation</a> •
|
|
5
|
+
<a href="https://fragno.dev/docs/forms/shadcn-renderer">Shadcn Renderer</a> •
|
|
6
|
+
<a href="https://fragno.dev/docs/forms/form-builder">Shadcn Form builder</a>
|
|
7
|
+
</div>
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
[JSON Forms](https://jsonforms.io/).
|
|
9
|
+
The Form fragment for Fragno provides form management and response collection using open standards:
|
|
10
|
+
[JSON Schema](https://json-schema.org/) and [JSON Forms](https://jsonforms.io/).
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
- DB Schemas, request handlers and frontend hooks included
|
|
13
|
+
- Store form definitions and responses in your own database
|
|
14
|
+
- Form builder shadcn/ui component with Google Forms like UX
|
|
15
|
+
- Integrates with any TypeScript stack
|
|
16
|
+
- Form validation using Zod/Ajv
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
<img src="../../assets/forms-screenshot.webp"/>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
## Quickstart
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
7
25
|
|
|
8
26
|
```bash
|
|
9
|
-
npm install @fragno-dev/forms
|
|
27
|
+
npm install @fragno-dev/forms @fragno-dev/db
|
|
10
28
|
```
|
|
11
29
|
|
|
12
|
-
|
|
30
|
+
### 1. Initialize the database adapter
|
|
13
31
|
|
|
14
|
-
|
|
32
|
+
See the
|
|
33
|
+
[Fragno DB docs](https://fragno.dev/docs/fragno/for-users/database-fragments/overview#choose-your-workflow)
|
|
34
|
+
for adapter options. Example with Drizzle ORM and Postgres:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { SqlAdapter } from "@fragno-dev/db/adapters/sql";
|
|
38
|
+
import { PostgresDialect } from "@fragno-dev/db/dialects";
|
|
39
|
+
import { NodePostgresDriverConfig } from "@fragno-dev/db/drivers";
|
|
40
|
+
import { Pool } from "pg";
|
|
41
|
+
|
|
42
|
+
const dialect = new PostgresDialect({
|
|
43
|
+
pool: new Pool({ connectionString: process.env.DATABASE_URL }),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const fragmentDbAdapter = new SqlAdapter({
|
|
47
|
+
dialect,
|
|
48
|
+
driverConfig: new NodePostgresDriverConfig(),
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 2. Create server-side instance
|
|
15
53
|
|
|
16
54
|
```typescript
|
|
17
55
|
import { createFormsFragment } from "@fragno-dev/forms";
|
|
56
|
+
import { fragmentDbAdapter } from "./db";
|
|
18
57
|
|
|
19
|
-
const
|
|
58
|
+
export const formsFragment = createFormsFragment(
|
|
20
59
|
{
|
|
21
60
|
onFormCreated: (form) => console.log("Form created:", form.title),
|
|
22
61
|
onResponseSubmitted: (response) => console.log("Response submitted:", response.id),
|
|
23
62
|
},
|
|
63
|
+
{ databaseAdapter: fragmentDbAdapter },
|
|
64
|
+
);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Mount the fragment routes
|
|
68
|
+
|
|
69
|
+
Mount the api routes in your web framework of choice.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { Hono } from "hono";
|
|
73
|
+
import { formsFragment } from "@/lib/forms";
|
|
74
|
+
|
|
75
|
+
const app = new Hono();
|
|
76
|
+
app.all("/api/forms/*", (c) => formsFragment.handler(c.req.raw));
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 4. Generate schemas
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Generate schema file
|
|
83
|
+
npx fragno-cli db generate lib/forms.ts --format drizzle -o db/forms.schema.ts
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 5. Secure admin routes
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { createFormsFragment } from "@fragno-dev/forms";
|
|
90
|
+
|
|
91
|
+
export const formsFragment = createFormsFragment(
|
|
24
92
|
{
|
|
25
|
-
|
|
93
|
+
// ... your config
|
|
26
94
|
},
|
|
27
|
-
|
|
95
|
+
{ databaseAdapter },
|
|
96
|
+
).withMiddleware(async ({ path, headers }, { error }) => {
|
|
97
|
+
const isAdmin = getUser(headers).role === "admin";
|
|
98
|
+
|
|
99
|
+
if (path.startsWith("/admin") && !isAdmin) {
|
|
100
|
+
return error({ message: "Not authorized", code: "NOT_AUTHORIZED" }, 401);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
28
103
|
```
|
|
29
104
|
|
|
30
|
-
|
|
105
|
+
### Client setup
|
|
106
|
+
|
|
107
|
+
Create a client instance to use the fragment in your frontend. See
|
|
108
|
+
[our docs full reference of all hooks](https://fragno.dev/docs/forms/hooks).
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { createFormsClient } from "@fragno-dev/forms/react";
|
|
112
|
+
|
|
113
|
+
export const formsClient = createFormsClient();
|
|
114
|
+
|
|
115
|
+
const { data: form } = formsClient.useForm({ slug: "my-form" });
|
|
116
|
+
const { mutate: submitForm } = formsClient.useSubmitForm({ slug: "my-form" });
|
|
117
|
+
// For admins
|
|
118
|
+
const { data: submissions } = formsClient.useSubmissions({ id });
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Form Builder
|
|
122
|
+
|
|
123
|
+
For shadcn/ui projects, we provide a visual form builder component:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pnpm dlx shadcn@latest add https://fragno.dev/forms/form-builder.json
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Creating a Form
|
|
130
|
+
|
|
131
|
+
Forms can be created dynamically at runtime using the admin hooks, or defined statically in code.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
const { mutate: createForm } = formsClient.useCreateForm();
|
|
135
|
+
|
|
136
|
+
await createForm({
|
|
137
|
+
body: {
|
|
138
|
+
title: "Contact Us",
|
|
139
|
+
slug: "contact",
|
|
140
|
+
status: "open",
|
|
141
|
+
dataSchema: {
|
|
142
|
+
type: "object",
|
|
143
|
+
properties: {
|
|
144
|
+
name: { type: "string", minLength: 1 },
|
|
145
|
+
email: { type: "string", format: "email" },
|
|
146
|
+
message: { type: "string", minLength: 10 },
|
|
147
|
+
},
|
|
148
|
+
required: ["name", "email", "message"],
|
|
149
|
+
},
|
|
150
|
+
uiSchema: {
|
|
151
|
+
type: "VerticalLayout",
|
|
152
|
+
elements: [
|
|
153
|
+
{ type: "Control", scope: "#/properties/name" },
|
|
154
|
+
{ type: "Control", scope: "#/properties/email" },
|
|
155
|
+
{ type: "Control", scope: "#/properties/message", options: { multi: true } },
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Submitting a Form
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
const { data: form } = formsClient.useForm({ pathParams: { slug: "contact" } });
|
|
166
|
+
const { mutate: submit } = formsClient.useSubmitForm();
|
|
167
|
+
|
|
168
|
+
await submit({
|
|
169
|
+
pathParams: { slug: "contact" },
|
|
170
|
+
body: { data: formData },
|
|
171
|
+
});
|
|
172
|
+
```
|
|
31
173
|
|
|
32
|
-
|
|
33
|
-
- Currently we always filter by formId for submissions, as we sort by a different column we need a
|
|
34
|
-
composite index on formId and submittedAt. This needs Multi-cursor pagination which is not yet
|
|
35
|
-
supported.
|
|
174
|
+
### Rendering Forms
|
|
36
175
|
|
|
37
|
-
|
|
176
|
+
The Form fragment stores forms using [JSON Schema](https://json-schema.org/) for data validation and
|
|
177
|
+
[JSONForms UI Schema](https://jsonforms.io/) for layout.
|
|
38
178
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- Aggregated form submission results
|
|
43
|
-
- CSV/Excel/Sheets exports
|
|
44
|
-
- File Uploads (another fragment maybe?)
|
|
45
|
-
- Editable submissions
|
|
46
|
-
- Multiple and single response type forms
|
|
47
|
-
- Tying external entities to form submissions
|
|
179
|
+
[JSONForms](https://jsonforms.io/) renders forms from these schemas and supports multiple renderer
|
|
180
|
+
sets including Material UI, Vanilla, and custom implementations. For shadcn/ui projects, see our
|
|
181
|
+
[ShadCN Renderer](https://fragno.dev/docs/forms/shadcn-renderer).
|
|
@@ -1,132 +1,181 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as zod671 from "zod";
|
|
2
|
+
import * as zod_v4_core41 from "zod/v4/core";
|
|
3
3
|
import * as _fragno_dev_core_react0 from "@fragno-dev/core/react";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as _fragno_dev_core_api10 from "@fragno-dev/core/api";
|
|
5
|
+
import * as _standard_schema_spec33 from "@standard-schema/spec";
|
|
6
6
|
import { FragnoPublicClientConfig } from "@fragno-dev/core/client";
|
|
7
7
|
|
|
8
8
|
//#region src/client/react.d.ts
|
|
9
9
|
declare function createFormsClient(config?: FragnoPublicClientConfig): {
|
|
10
|
-
useForm: _fragno_dev_core_react0.FragnoReactHook<"GET", "/:slug",
|
|
11
|
-
id:
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
14
|
-
slug:
|
|
15
|
-
status:
|
|
10
|
+
useForm: _fragno_dev_core_react0.FragnoReactHook<"GET", "/:slug", zod671.ZodObject<{
|
|
11
|
+
id: zod671.ZodString;
|
|
12
|
+
title: zod671.ZodString;
|
|
13
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
14
|
+
slug: zod671.ZodString;
|
|
15
|
+
status: zod671.ZodEnum<{
|
|
16
16
|
draft: "draft";
|
|
17
17
|
open: "open";
|
|
18
18
|
closed: "closed";
|
|
19
19
|
static: "static";
|
|
20
20
|
}>;
|
|
21
|
-
dataSchema:
|
|
22
|
-
uiSchema:
|
|
23
|
-
version:
|
|
24
|
-
createdAt:
|
|
25
|
-
updatedAt:
|
|
26
|
-
},
|
|
27
|
-
useSubmitForm: _fragno_dev_core_react0.FragnoReactMutator<
|
|
28
|
-
data:
|
|
29
|
-
securityToken:
|
|
30
|
-
},
|
|
31
|
-
useForms: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms",
|
|
32
|
-
id:
|
|
33
|
-
title:
|
|
34
|
-
description:
|
|
35
|
-
slug:
|
|
36
|
-
status:
|
|
21
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
22
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
23
|
+
version: zod671.ZodNumber;
|
|
24
|
+
createdAt: zod671.ZodDate;
|
|
25
|
+
updatedAt: zod671.ZodDate;
|
|
26
|
+
}, zod_v4_core41.$strip>, "NOT_FOUND", string>;
|
|
27
|
+
useSubmitForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/:slug/submit", zod671.ZodObject<{
|
|
28
|
+
data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
29
|
+
securityToken: zod671.ZodOptional<zod671.ZodString>;
|
|
30
|
+
}, zod_v4_core41.$strip> | undefined, zod671.ZodString | undefined, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string>;
|
|
31
|
+
useForms: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms", zod671.ZodArray<zod671.ZodObject<{
|
|
32
|
+
id: zod671.ZodString;
|
|
33
|
+
title: zod671.ZodString;
|
|
34
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
35
|
+
slug: zod671.ZodString;
|
|
36
|
+
status: zod671.ZodEnum<{
|
|
37
37
|
draft: "draft";
|
|
38
38
|
open: "open";
|
|
39
39
|
closed: "closed";
|
|
40
40
|
static: "static";
|
|
41
41
|
}>;
|
|
42
|
-
dataSchema:
|
|
43
|
-
uiSchema:
|
|
44
|
-
version:
|
|
45
|
-
createdAt:
|
|
46
|
-
updatedAt:
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
43
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
44
|
+
version: zod671.ZodNumber;
|
|
45
|
+
createdAt: zod671.ZodDate;
|
|
46
|
+
updatedAt: zod671.ZodDate;
|
|
47
|
+
}, zod_v4_core41.$strip>>, string, string>;
|
|
48
|
+
useFormById: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms/:id", zod671.ZodObject<{
|
|
49
|
+
id: zod671.ZodString;
|
|
50
|
+
title: zod671.ZodString;
|
|
51
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
52
|
+
slug: zod671.ZodString;
|
|
53
|
+
status: zod671.ZodEnum<{
|
|
50
54
|
draft: "draft";
|
|
51
55
|
open: "open";
|
|
52
56
|
closed: "closed";
|
|
53
57
|
static: "static";
|
|
54
58
|
}>;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
description: zod783.ZodNullable<zod783.ZodString>;
|
|
64
|
-
slug: zod783.ZodString;
|
|
65
|
-
status: zod783.ZodEnum<{
|
|
59
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
60
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
61
|
+
version: zod671.ZodNumber;
|
|
62
|
+
createdAt: zod671.ZodDate;
|
|
63
|
+
updatedAt: zod671.ZodDate;
|
|
64
|
+
}, zod_v4_core41.$strip>, "NOT_FOUND", string>;
|
|
65
|
+
useCreateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
66
|
+
status: zod671.ZodEnum<{
|
|
66
67
|
draft: "draft";
|
|
67
68
|
open: "open";
|
|
68
69
|
closed: "closed";
|
|
69
70
|
static: "static";
|
|
70
71
|
}>;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
title: zod671.ZodString;
|
|
73
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
74
|
+
slug: zod671.ZodString;
|
|
75
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
76
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
77
|
+
}, zod_v4_core41.$strip> | undefined, zod671.ZodString | zod671.ZodArray<zod671.ZodObject<{
|
|
78
|
+
id: zod671.ZodString;
|
|
79
|
+
title: zod671.ZodString;
|
|
80
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
81
|
+
slug: zod671.ZodString;
|
|
82
|
+
status: zod671.ZodEnum<{
|
|
83
|
+
draft: "draft";
|
|
84
|
+
open: "open";
|
|
85
|
+
closed: "closed";
|
|
86
|
+
static: "static";
|
|
87
|
+
}>;
|
|
88
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
89
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
90
|
+
version: zod671.ZodNumber;
|
|
91
|
+
createdAt: zod671.ZodDate;
|
|
92
|
+
updatedAt: zod671.ZodDate;
|
|
93
|
+
}, zod_v4_core41.$strip>> | undefined, string, string>;
|
|
94
|
+
useUpdateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
95
|
+
status: zod671.ZodOptional<zod671.ZodEnum<{
|
|
79
96
|
draft: "draft";
|
|
80
97
|
open: "open";
|
|
81
98
|
closed: "closed";
|
|
82
99
|
static: "static";
|
|
83
100
|
}>>;
|
|
84
|
-
title:
|
|
85
|
-
description:
|
|
86
|
-
slug:
|
|
87
|
-
dataSchema:
|
|
88
|
-
uiSchema:
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
101
|
+
title: zod671.ZodOptional<zod671.ZodString>;
|
|
102
|
+
description: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>>;
|
|
103
|
+
slug: zod671.ZodOptional<zod671.ZodString>;
|
|
104
|
+
dataSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
105
|
+
uiSchema: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>>;
|
|
106
|
+
}, zod_v4_core41.$strip> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
107
|
+
id: zod671.ZodString;
|
|
108
|
+
title: zod671.ZodString;
|
|
109
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
110
|
+
slug: zod671.ZodString;
|
|
111
|
+
status: zod671.ZodEnum<{
|
|
112
|
+
draft: "draft";
|
|
113
|
+
open: "open";
|
|
114
|
+
closed: "closed";
|
|
115
|
+
static: "static";
|
|
116
|
+
}>;
|
|
117
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
118
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
119
|
+
version: zod671.ZodNumber;
|
|
120
|
+
createdAt: zod671.ZodDate;
|
|
121
|
+
updatedAt: zod671.ZodDate;
|
|
122
|
+
}, zod_v4_core41.$strip> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
|
|
123
|
+
useDeleteForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
124
|
+
status: zod671.ZodOptional<zod671.ZodEnum<{
|
|
92
125
|
draft: "draft";
|
|
93
126
|
open: "open";
|
|
94
127
|
closed: "closed";
|
|
95
128
|
static: "static";
|
|
96
129
|
}>>;
|
|
97
|
-
title:
|
|
98
|
-
description:
|
|
99
|
-
slug:
|
|
100
|
-
dataSchema:
|
|
101
|
-
uiSchema:
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
title: zod671.ZodOptional<zod671.ZodString>;
|
|
131
|
+
description: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>>;
|
|
132
|
+
slug: zod671.ZodOptional<zod671.ZodString>;
|
|
133
|
+
dataSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
134
|
+
uiSchema: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>>;
|
|
135
|
+
}, zod_v4_core41.$strip> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
136
|
+
id: zod671.ZodString;
|
|
137
|
+
title: zod671.ZodString;
|
|
138
|
+
description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
|
|
139
|
+
slug: zod671.ZodString;
|
|
140
|
+
status: zod671.ZodEnum<{
|
|
141
|
+
draft: "draft";
|
|
142
|
+
open: "open";
|
|
143
|
+
closed: "closed";
|
|
144
|
+
static: "static";
|
|
145
|
+
}>;
|
|
146
|
+
dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
147
|
+
uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
|
|
148
|
+
version: zod671.ZodNumber;
|
|
149
|
+
createdAt: zod671.ZodDate;
|
|
150
|
+
updatedAt: zod671.ZodDate;
|
|
151
|
+
}, zod_v4_core41.$strip> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
|
|
152
|
+
useSubmissions: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms/:id/submissions", zod671.ZodArray<zod671.ZodObject<{
|
|
153
|
+
id: zod671.ZodString;
|
|
154
|
+
formId: zod671.ZodNullable<zod671.ZodString>;
|
|
155
|
+
formVersion: zod671.ZodNumber;
|
|
156
|
+
data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
157
|
+
submittedAt: zod671.ZodDate;
|
|
158
|
+
ip: zod671.ZodNullable<zod671.ZodString>;
|
|
159
|
+
userAgent: zod671.ZodNullable<zod671.ZodString>;
|
|
160
|
+
}, zod_v4_core41.$strip>>, string, "sortOrder">;
|
|
161
|
+
useSubmission: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/submissions/:id", zod671.ZodObject<{
|
|
162
|
+
id: zod671.ZodString;
|
|
163
|
+
formId: zod671.ZodNullable<zod671.ZodString>;
|
|
164
|
+
formVersion: zod671.ZodNumber;
|
|
165
|
+
data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
166
|
+
submittedAt: zod671.ZodDate;
|
|
167
|
+
ip: zod671.ZodNullable<zod671.ZodString>;
|
|
168
|
+
userAgent: zod671.ZodNullable<zod671.ZodString>;
|
|
169
|
+
}, zod_v4_core41.$strip>, "NOT_FOUND", string>;
|
|
170
|
+
useDeleteSubmission: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/submissions/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
|
|
171
|
+
id: zod671.ZodString;
|
|
172
|
+
formId: zod671.ZodNullable<zod671.ZodString>;
|
|
173
|
+
formVersion: zod671.ZodNumber;
|
|
174
|
+
data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
|
|
175
|
+
submittedAt: zod671.ZodDate;
|
|
176
|
+
ip: zod671.ZodNullable<zod671.ZodString>;
|
|
177
|
+
userAgent: zod671.ZodNullable<zod671.ZodString>;
|
|
178
|
+
}, zod_v4_core41.$strip> | undefined, "NOT_FOUND", string>;
|
|
130
179
|
};
|
|
131
180
|
//# sourceMappingURL=react.d.ts.map
|
|
132
181
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createFormsClients, isGetHook, isMutatorHook, isReadableAtom, isStore } from "../src-
|
|
1
|
+
import { createFormsClients, isGetHook, isMutatorHook, isReadableAtom, isStore } from "../src-BBaSaf29.js";
|
|
2
2
|
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/nanostores@1.1.0/node_modules/nanostores/listen-keys/index.js
|