remix-validated-form 2.0.0 → 2.1.1
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/.turbo/turbo-build.log +9 -0
- package/.turbo/turbo-dev.log +0 -0
- package/.turbo/turbo-test.log +36 -0
- package/README.md +3 -6
- package/browser/ValidatedForm.d.ts +13 -1
- package/browser/ValidatedForm.js +72 -19
- package/browser/hooks.d.ts +0 -0
- package/browser/hooks.js +0 -0
- package/browser/index.d.ts +0 -0
- package/browser/index.js +0 -0
- package/browser/internal/flatten.d.ts +0 -0
- package/browser/internal/flatten.js +0 -0
- package/browser/internal/formContext.d.ts +0 -0
- package/browser/internal/formContext.js +0 -0
- package/browser/internal/submissionCallbacks.d.ts +1 -0
- package/browser/internal/submissionCallbacks.js +13 -0
- package/browser/internal/util.d.ts +0 -0
- package/browser/internal/util.js +0 -0
- package/browser/server.d.ts +0 -0
- package/browser/server.js +0 -0
- package/browser/test-data/testFormData.d.ts +0 -0
- package/browser/test-data/testFormData.js +0 -0
- package/browser/validation/createValidator.d.ts +0 -0
- package/browser/validation/createValidator.js +12 -1
- package/browser/validation/types.d.ts +3 -0
- package/browser/validation/types.js +0 -0
- package/browser/validation/validation.test.d.ts +0 -0
- package/browser/validation/validation.test.js +5 -0
- package/browser/validation/withYup.d.ts +0 -0
- package/browser/validation/withYup.js +0 -0
- package/browser/validation/withZod.d.ts +0 -0
- package/browser/validation/withZod.js +0 -0
- package/build/ValidatedForm.d.ts +13 -1
- package/build/ValidatedForm.js +71 -18
- package/build/hooks.d.ts +0 -0
- package/build/hooks.js +0 -0
- package/build/index.d.ts +0 -0
- package/build/index.js +0 -0
- package/build/internal/flatten.d.ts +0 -0
- package/build/internal/flatten.js +0 -0
- package/build/internal/formContext.d.ts +0 -0
- package/build/internal/formContext.js +0 -0
- package/build/internal/submissionCallbacks.d.ts +1 -0
- package/build/internal/submissionCallbacks.js +17 -0
- package/build/internal/util.d.ts +0 -0
- package/build/internal/util.js +0 -0
- package/build/server.d.ts +0 -0
- package/build/server.js +0 -0
- package/build/test-data/testFormData.d.ts +0 -0
- package/build/test-data/testFormData.js +0 -0
- package/build/validation/createValidator.d.ts +0 -0
- package/build/validation/createValidator.js +12 -1
- package/build/validation/types.d.ts +3 -0
- package/build/validation/types.js +0 -0
- package/build/validation/validation.test.d.ts +0 -0
- package/build/validation/validation.test.js +5 -0
- package/build/validation/withYup.d.ts +0 -0
- package/build/validation/withYup.js +0 -0
- package/build/validation/withZod.d.ts +0 -0
- package/build/validation/withZod.js +0 -0
- package/jest.config.js +5 -0
- package/package.json +8 -33
- package/src/ValidatedForm.tsx +229 -0
- package/src/hooks.ts +60 -0
- package/src/index.ts +8 -0
- package/src/internal/flatten.ts +48 -0
- package/src/internal/formContext.ts +36 -0
- package/src/internal/submissionCallbacks.ts +15 -0
- package/src/internal/util.ts +23 -0
- package/src/server.ts +10 -0
- package/src/test-data/testFormData.ts +55 -0
- package/src/validation/createValidator.ts +34 -0
- package/src/validation/types.ts +28 -0
- package/src/validation/validation.test.ts +322 -0
- package/src/validation/withYup.ts +43 -0
- package/src/validation/withZod.ts +51 -0
- package/tsconfig.json +5 -0
- package/.eslintcache +0 -1
- package/.eslintignore +0 -1
- package/.prettierignore +0 -10
- package/LICENSE +0 -21
- package/browser/flatten.d.ts +0 -4
- package/browser/flatten.js +0 -35
- package/build/flatten.d.ts +0 -4
- package/build/flatten.js +0 -43
- package/sample-app/.env +0 -7
- package/sample-app/README.md +0 -53
- package/sample-app/app/components/ErrorBox.tsx +0 -34
- package/sample-app/app/components/FormInput.tsx +0 -40
- package/sample-app/app/components/FormSelect.tsx +0 -37
- package/sample-app/app/components/SubjectForm.tsx +0 -150
- package/sample-app/app/entry.client.tsx +0 -4
- package/sample-app/app/entry.server.tsx +0 -21
- package/sample-app/app/root.tsx +0 -92
- package/sample-app/app/routes/index.tsx +0 -5
- package/sample-app/app/routes/subjects/$id.edit.tsx +0 -98
- package/sample-app/app/routes/subjects/index.tsx +0 -112
- package/sample-app/app/routes/subjects/new.tsx +0 -46
- package/sample-app/app/services/db.server.ts +0 -23
- package/sample-app/app/types.ts +0 -6
- package/sample-app/package-lock.json +0 -10890
- package/sample-app/package.json +0 -36
- package/sample-app/prisma/dev.db +0 -0
- package/sample-app/prisma/schema.prisma +0 -34
- package/sample-app/public/favicon.ico +0 -0
- package/sample-app/remix.config.js +0 -10
- package/sample-app/remix.env.d.ts +0 -2
package/sample-app/package.json
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"private": true,
|
3
|
-
"name": "remix-app-template",
|
4
|
-
"description": "",
|
5
|
-
"license": "",
|
6
|
-
"scripts": {
|
7
|
-
"build": "remix build",
|
8
|
-
"dev": "remix dev",
|
9
|
-
"postinstall": "remix setup node",
|
10
|
-
"start": "remix-serve build"
|
11
|
-
},
|
12
|
-
"dependencies": {
|
13
|
-
"@chakra-ui/react": "^1.7.3",
|
14
|
-
"@emotion/react": "^11.7.0",
|
15
|
-
"@emotion/styled": "^11.6.0",
|
16
|
-
"@prisma/client": "^3.6.0",
|
17
|
-
"@remix-run/react": "^1.0.6",
|
18
|
-
"@remix-run/serve": "^1.0.6",
|
19
|
-
"framer-motion": "^4.1.17",
|
20
|
-
"react": "^17.0.2",
|
21
|
-
"react-dom": "^17.0.2",
|
22
|
-
"remix": "^1.0.6",
|
23
|
-
"zod": "^3.11.6"
|
24
|
-
},
|
25
|
-
"devDependencies": {
|
26
|
-
"@remix-run/dev": "^1.0.6",
|
27
|
-
"@types/react": "^17.0.24",
|
28
|
-
"@types/react-dom": "^17.0.9",
|
29
|
-
"prisma": "^3.6.0",
|
30
|
-
"typescript": "^4.1.2"
|
31
|
-
},
|
32
|
-
"engines": {
|
33
|
-
"node": ">=14"
|
34
|
-
},
|
35
|
-
"sideEffects": false
|
36
|
-
}
|
package/sample-app/prisma/dev.db
DELETED
Binary file
|
@@ -1,34 +0,0 @@
|
|
1
|
-
// This is your Prisma schema file,
|
2
|
-
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
3
|
-
|
4
|
-
generator client {
|
5
|
-
provider = "prisma-client-js"
|
6
|
-
}
|
7
|
-
|
8
|
-
datasource db {
|
9
|
-
provider = "sqlite"
|
10
|
-
url = env("DATABASE_URL")
|
11
|
-
}
|
12
|
-
|
13
|
-
model Subject {
|
14
|
-
id Int @id @default(autoincrement())
|
15
|
-
name String
|
16
|
-
description String
|
17
|
-
subjectDays SubjectDays[]
|
18
|
-
teacher Teacher?
|
19
|
-
}
|
20
|
-
|
21
|
-
model Teacher {
|
22
|
-
id Int @id @default(autoincrement())
|
23
|
-
name String
|
24
|
-
email String
|
25
|
-
subject Subject? @relation(fields: [subjectId], references: [id])
|
26
|
-
subjectId Int @unique
|
27
|
-
}
|
28
|
-
|
29
|
-
model SubjectDays {
|
30
|
-
id Int @id @default(autoincrement())
|
31
|
-
subject Subject @relation(fields: [subjectId], references: [id])
|
32
|
-
subjectId Int
|
33
|
-
day String
|
34
|
-
}
|
Binary file
|