@refinedev/core 4.45.1 → 4.46.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/CHANGELOG.md +74 -0
- package/README.md +61 -77
- package/dist/components/authenticated/index.d.ts +34 -0
- package/dist/components/authenticated/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/login/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/register/index.d.ts.map +1 -1
- package/dist/components/pages/welcome/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/data/useMany.d.ts +1 -1
- package/dist/hooks/data/useMany.d.ts.map +1 -1
- package/dist/hooks/data/useOne.d.ts +1 -1
- package/dist/hooks/data/useOne.d.ts.map +1 -1
- package/dist/hooks/form/useForm.d.ts +1 -1
- package/dist/hooks/form/useForm.d.ts.map +1 -1
- package/dist/hooks/show/useShow.d.ts +3 -3
- package/dist/hooks/show/useShow.d.ts.map +1 -1
- package/dist/hooks/useSelect/index.d.ts +3 -3
- package/dist/hooks/useSelect/index.d.ts.map +1 -1
- package/dist/iife/index.js +6 -6
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/interfaces/auth.d.ts +12 -0
- package/dist/interfaces/auth.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/authenticated/index.tsx +118 -139
- package/src/components/pages/auth/components/login/index.tsx +110 -84
- package/src/components/pages/auth/components/register/index.tsx +88 -65
- package/src/components/pages/welcome/index.tsx +125 -124
- package/src/hooks/auth/useLogin/index.ts +4 -4
- package/src/hooks/auth/useLogout/index.ts +4 -4
- package/src/hooks/auth/useRegister/index.ts +5 -4
- package/src/hooks/data/useMany.ts +1 -1
- package/src/hooks/data/useOne.ts +1 -1
- package/src/hooks/form/useForm.ts +1 -1
- package/src/hooks/show/useShow.ts +3 -3
- package/src/hooks/useSelect/index.ts +3 -2
- package/src/interfaces/auth.tsx +12 -0
|
@@ -137,9 +137,10 @@ export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
|
137
137
|
|
|
138
138
|
export type UseSelectReturnType<
|
|
139
139
|
TData extends BaseRecord = BaseRecord,
|
|
140
|
+
TError extends HttpError = HttpError,
|
|
140
141
|
TOption extends BaseOption = BaseOption,
|
|
141
142
|
> = {
|
|
142
|
-
queryResult: QueryObserverResult<GetListResponse<TData
|
|
143
|
+
queryResult: QueryObserverResult<GetListResponse<TData>, TError>;
|
|
143
144
|
defaultValueQueryResult: QueryObserverResult<GetManyResponse<TData>>;
|
|
144
145
|
onSearch: (value: string) => void;
|
|
145
146
|
options: TOption[];
|
|
@@ -166,7 +167,7 @@ export const useSelect = <
|
|
|
166
167
|
TOption extends BaseOption = BaseOption,
|
|
167
168
|
>(
|
|
168
169
|
props: UseSelectProps<TQueryFnData, TError, TData>,
|
|
169
|
-
): UseSelectReturnType<TData, TOption> => {
|
|
170
|
+
): UseSelectReturnType<TData, TError, TOption> => {
|
|
170
171
|
const [search, setSearch] = useState<CrudFilters>([]);
|
|
171
172
|
const [options, setOptions] = useState<TOption[]>([]);
|
|
172
173
|
const [selectedOptions, setSelectedOptions] = useState<TOption[]>([]);
|
package/src/interfaces/auth.tsx
CHANGED
|
@@ -73,6 +73,11 @@ export type AuthPageProps<
|
|
|
73
73
|
* @optional
|
|
74
74
|
*/
|
|
75
75
|
rememberMe?: React.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* @description Can be used to hide the form components
|
|
78
|
+
* @optional
|
|
79
|
+
*/
|
|
80
|
+
hideForm?: boolean;
|
|
76
81
|
}>
|
|
77
82
|
| PropsWithChildren<{
|
|
78
83
|
/**
|
|
@@ -85,6 +90,11 @@ export type AuthPageProps<
|
|
|
85
90
|
* @optional
|
|
86
91
|
*/
|
|
87
92
|
providers?: OAuthProvider[];
|
|
93
|
+
/**
|
|
94
|
+
* @description Can be used to hide the form components
|
|
95
|
+
* @optional
|
|
96
|
+
*/
|
|
97
|
+
hideForm?: boolean;
|
|
88
98
|
}>
|
|
89
99
|
| PropsWithChildren<{
|
|
90
100
|
/**
|
|
@@ -156,6 +166,7 @@ export type LoginPageProps<
|
|
|
156
166
|
contentProps?: TContentProps;
|
|
157
167
|
formProps?: TFormProps;
|
|
158
168
|
title?: React.ReactNode;
|
|
169
|
+
hideForm?: boolean;
|
|
159
170
|
}>;
|
|
160
171
|
|
|
161
172
|
/**
|
|
@@ -176,6 +187,7 @@ export type RegisterPageProps<
|
|
|
176
187
|
contentProps?: TContentProps;
|
|
177
188
|
formProps?: TFormProps;
|
|
178
189
|
title?: React.ReactNode;
|
|
190
|
+
hideForm?: boolean;
|
|
179
191
|
}>;
|
|
180
192
|
|
|
181
193
|
/**
|