@verdaccio/ui-components 5.0.0-next-9.18 → 5.0.0-next-9.19
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.
|
@@ -1,86 +1,9 @@
|
|
|
1
|
+
import { type UseFormReturn } from 'react-hook-form';
|
|
1
2
|
import type { LoginFormValues } from '../../utils/schemas';
|
|
2
3
|
type Options = {
|
|
3
4
|
onSuccess?: () => void;
|
|
4
5
|
};
|
|
5
|
-
export declare function useLoginForm({ onSuccess }?: Options): {
|
|
6
|
-
watch: import("react-hook-form").UseFormWatch<{
|
|
7
|
-
password: string;
|
|
8
|
-
username: string;
|
|
9
|
-
}>;
|
|
10
|
-
getValues: import("react-hook-form").UseFormGetValues<{
|
|
11
|
-
password: string;
|
|
12
|
-
username: string;
|
|
13
|
-
}>;
|
|
14
|
-
getFieldState: import("react-hook-form").UseFormGetFieldState<{
|
|
15
|
-
password: string;
|
|
16
|
-
username: string;
|
|
17
|
-
}>;
|
|
18
|
-
setError: import("react-hook-form").UseFormSetError<{
|
|
19
|
-
password: string;
|
|
20
|
-
username: string;
|
|
21
|
-
}>;
|
|
22
|
-
clearErrors: import("react-hook-form").UseFormClearErrors<{
|
|
23
|
-
password: string;
|
|
24
|
-
username: string;
|
|
25
|
-
}>;
|
|
26
|
-
setValue: import("react-hook-form").UseFormSetValue<{
|
|
27
|
-
password: string;
|
|
28
|
-
username: string;
|
|
29
|
-
}>;
|
|
30
|
-
setValues: import("react-hook-form").UseFormSetValues<{
|
|
31
|
-
password: string;
|
|
32
|
-
username: string;
|
|
33
|
-
}>;
|
|
34
|
-
trigger: import("react-hook-form").UseFormTrigger<{
|
|
35
|
-
password: string;
|
|
36
|
-
username: string;
|
|
37
|
-
}>;
|
|
38
|
-
formState: import("react-hook-form").FormState<{
|
|
39
|
-
password: string;
|
|
40
|
-
username: string;
|
|
41
|
-
}>;
|
|
42
|
-
resetField: import("react-hook-form").UseFormResetField<{
|
|
43
|
-
password: string;
|
|
44
|
-
username: string;
|
|
45
|
-
}>;
|
|
46
|
-
reset: import("react-hook-form").UseFormReset<{
|
|
47
|
-
password: string;
|
|
48
|
-
username: string;
|
|
49
|
-
}>;
|
|
50
|
-
resetDefaultValues: import("react-hook-form").UseFormResetDefaultValues<{
|
|
51
|
-
password: string;
|
|
52
|
-
username: string;
|
|
53
|
-
}>;
|
|
54
|
-
handleSubmit: import("react-hook-form").UseFormHandleSubmit<{
|
|
55
|
-
password: string;
|
|
56
|
-
username: string;
|
|
57
|
-
}, {
|
|
58
|
-
password: string;
|
|
59
|
-
username: string;
|
|
60
|
-
}>;
|
|
61
|
-
unregister: import("react-hook-form").UseFormUnregister<{
|
|
62
|
-
password: string;
|
|
63
|
-
username: string;
|
|
64
|
-
}>;
|
|
65
|
-
control: import("react-hook-form").Control<{
|
|
66
|
-
password: string;
|
|
67
|
-
username: string;
|
|
68
|
-
}, any, {
|
|
69
|
-
password: string;
|
|
70
|
-
username: string;
|
|
71
|
-
}>;
|
|
72
|
-
register: import("react-hook-form").UseFormRegister<{
|
|
73
|
-
password: string;
|
|
74
|
-
username: string;
|
|
75
|
-
}>;
|
|
76
|
-
setFocus: import("react-hook-form").UseFormSetFocus<{
|
|
77
|
-
password: string;
|
|
78
|
-
username: string;
|
|
79
|
-
}>;
|
|
80
|
-
subscribe: import("react-hook-form").UseFormSubscribe<{
|
|
81
|
-
password: string;
|
|
82
|
-
username: string;
|
|
83
|
-
}>;
|
|
6
|
+
export declare function useLoginForm({ onSuccess }?: Options): UseFormReturn<LoginFormValues> & {
|
|
84
7
|
onSubmit: (data: LoginFormValues) => Promise<void>;
|
|
85
8
|
};
|
|
86
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoginForm.js","names":[],"sources":["../../../src/components/LoginForm/useLoginForm.ts"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { useCallback } from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport { useAuth } from '../../providers/AuthProvider';\nimport type { LoginFormValues } from '../../utils/schemas';\nimport { loginSchema } from '../../utils/schemas';\n\ntype Options = {\n onSuccess?: () => void;\n};\n\nexport function useLoginForm({ onSuccess }: Options = {}) {\n const { handleLogin } = useAuth();\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const { setError } = form;\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess?.();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n return {\n ...form,\n onSubmit,\n };\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,aAAa,EAAE,cAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"useLoginForm.js","names":[],"sources":["../../../src/components/LoginForm/useLoginForm.ts"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { useCallback } from 'react';\nimport { type UseFormReturn, useForm } from 'react-hook-form';\n\nimport { useAuth } from '../../providers/AuthProvider';\nimport type { LoginFormValues } from '../../utils/schemas';\nimport { loginSchema } from '../../utils/schemas';\n\ntype Options = {\n onSuccess?: () => void;\n};\n\nexport function useLoginForm({ onSuccess }: Options = {}): UseFormReturn<LoginFormValues> & {\n onSubmit: (data: LoginFormValues) => Promise<void>;\n} {\n const { handleLogin } = useAuth();\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const { setError } = form;\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess?.();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n return {\n ...form,\n onSubmit,\n };\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,aAAa,EAAE,cAAuB,CAAC,GAErD;CACA,MAAM,EAAE,gBAAgB,qBAAA,QAAQ;CAEhC,MAAM,QAAA,GAAO,gBAAA,QAAA,CAAyB;EACpC,MAAM;EACN,WAAA,GAAU,wBAAA,YAAA,CAAY,gBAAA,WAAW;CACnC,CAAC;CAED,MAAM,EAAE,aAAa;CAErB,MAAM,YAAA,GAAW,MAAA,YAAA,CACf,OAAO,SAA0B;EAC/B,IAAI;GACF,MAAM,cAAc,IAAI;GACxB,YAAY;EACd,QAAQ;GACN,SAAS,QAAQ;IACf,MAAM;IAEN,SAAS;GACX,CAAC;EACH;CACF,GACA;EAAC;EAAa;EAAU;CAAS,CACnC;CAEA,OAAO;EACL,GAAG;EACH;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoginForm.mjs","names":[],"sources":["../../../src/components/LoginForm/useLoginForm.ts"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { useCallback } from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport { useAuth } from '../../providers/AuthProvider';\nimport type { LoginFormValues } from '../../utils/schemas';\nimport { loginSchema } from '../../utils/schemas';\n\ntype Options = {\n onSuccess?: () => void;\n};\n\nexport function useLoginForm({ onSuccess }: Options = {}) {\n const { handleLogin } = useAuth();\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const { setError } = form;\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess?.();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n return {\n ...form,\n onSubmit,\n };\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,aAAa,EAAE,cAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"useLoginForm.mjs","names":[],"sources":["../../../src/components/LoginForm/useLoginForm.ts"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { useCallback } from 'react';\nimport { type UseFormReturn, useForm } from 'react-hook-form';\n\nimport { useAuth } from '../../providers/AuthProvider';\nimport type { LoginFormValues } from '../../utils/schemas';\nimport { loginSchema } from '../../utils/schemas';\n\ntype Options = {\n onSuccess?: () => void;\n};\n\nexport function useLoginForm({ onSuccess }: Options = {}): UseFormReturn<LoginFormValues> & {\n onSubmit: (data: LoginFormValues) => Promise<void>;\n} {\n const { handleLogin } = useAuth();\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const { setError } = form;\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess?.();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n return {\n ...form,\n onSubmit,\n };\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,aAAa,EAAE,cAAuB,CAAC,GAErD;CACA,MAAM,EAAE,gBAAgB,QAAQ;CAEhC,MAAM,OAAO,QAAyB;EACpC,MAAM;EACN,UAAU,YAAY,WAAW;CACnC,CAAC;CAED,MAAM,EAAE,aAAa;CAErB,MAAM,WAAW,YACf,OAAO,SAA0B;EAC/B,IAAI;GACF,MAAM,cAAc,IAAI;GACxB,YAAY;EACd,QAAQ;GACN,SAAS,QAAQ;IACf,MAAM;IAEN,SAAS;GACX,CAAC;EACH;CACF,GACA;EAAC;EAAa;EAAU;CAAS,CACnC;CAEA,OAAO;EACL,GAAG;EACH;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/ui-components",
|
|
3
|
-
"version": "5.0.0-next-9.
|
|
3
|
+
"version": "5.0.0-next-9.19",
|
|
4
4
|
"description": "Verdaccio UI Components",
|
|
5
5
|
"author": "Juan Picado <juanpicado19@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,33 +36,33 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@emotion/react": "11.14.0",
|
|
38
38
|
"@emotion/styled": "11.14.1",
|
|
39
|
-
"@hookform/resolvers": "5.
|
|
40
|
-
"@microlink/react-json-view": "1.31.
|
|
39
|
+
"@hookform/resolvers": "5.9.1",
|
|
40
|
+
"@microlink/react-json-view": "1.31.28",
|
|
41
41
|
"@mui/icons-material": "7.3.11",
|
|
42
42
|
"@mui/material": "7.3.11",
|
|
43
43
|
"@mui/system": "7.3.11",
|
|
44
44
|
"@verdaccio/ui-i18n": "10.0.0-next-9.4",
|
|
45
45
|
"country-flag-icons": "1.6.20",
|
|
46
|
-
"dayjs": "1.11.
|
|
46
|
+
"dayjs": "1.11.23",
|
|
47
47
|
"debug": "4.4.3",
|
|
48
|
-
"dompurify": "3.4.
|
|
49
|
-
"highlight.js": "11.
|
|
48
|
+
"dompurify": "3.4.14",
|
|
49
|
+
"highlight.js": "11.12.0",
|
|
50
50
|
"i18next": "25.10.10",
|
|
51
|
-
"js-base64": "3.
|
|
51
|
+
"js-base64": "3.9.3",
|
|
52
52
|
"localstorage-memory": "1.0.3",
|
|
53
53
|
"lodash-es": "4.18.1",
|
|
54
54
|
"marked": "17.0.6",
|
|
55
55
|
"marked-highlight": "2.2.4",
|
|
56
56
|
"normalize.css": "8.0.1",
|
|
57
|
-
"react": "19.2.
|
|
58
|
-
"react-dom": "19.2.
|
|
59
|
-
"react-hook-form": "7.
|
|
57
|
+
"react": "19.2.8",
|
|
58
|
+
"react-dom": "19.2.8",
|
|
59
|
+
"react-hook-form": "7.85.0",
|
|
60
60
|
"react-i18next": "16.6.6",
|
|
61
61
|
"react-markdown": "10.1.0",
|
|
62
62
|
"react-router": "8.3.0",
|
|
63
63
|
"react-virtualized": "9.22.6",
|
|
64
64
|
"semver": "7.8.5",
|
|
65
|
-
"swr": "2.
|
|
65
|
+
"swr": "2.5.1",
|
|
66
66
|
"validator": "13.15.35",
|
|
67
67
|
"yup": "1.7.1"
|
|
68
68
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/lodash-es": "4.17.12",
|
|
77
77
|
"@types/node": "24.13.2",
|
|
78
78
|
"@verdaccio/types": "14.0.0-next-9.12",
|
|
79
|
-
"@vitejs/plugin-react": "6.0.
|
|
79
|
+
"@vitejs/plugin-react": "6.0.5",
|
|
80
80
|
"cross-env": "10.1.0",
|
|
81
81
|
"generate-github-markdown-css": "6.6.0",
|
|
82
82
|
"jsdom": "29.1.1",
|