@jasperoosthoek/react-toolbox 0.7.4 → 0.8.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/change-log.md +8 -1
- package/dist/components/forms/FormFields.d.ts +1 -1
- package/dist/components/login/LoginPage.d.ts +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/hooks.d.ts +0 -1
- package/package.json +2 -5
- package/src/components/forms/FormFields.tsx +1 -1
- package/src/components/login/LoginPage.tsx +88 -0
- package/src/index.ts +1 -1
- package/src/utils/hooks.ts +0 -7
- package/src/login/Login.tsx +0 -333
package/change-log.md
CHANGED
|
@@ -299,4 +299,11 @@
|
|
|
299
299
|
- Upgrade to React@19.1.0
|
|
300
300
|
|
|
301
301
|
##### Version 0.7.4
|
|
302
|
-
- Fix type of `FormOnChange` to handle second argument
|
|
302
|
+
- Fix type of `FormOnChange` to handle second argument
|
|
303
|
+
|
|
304
|
+
##### Version 0.7.5
|
|
305
|
+
- Make second input argument of `FormOnChange` optional
|
|
306
|
+
|
|
307
|
+
##### Version 0.8.0
|
|
308
|
+
- Completely remove Redux dependency
|
|
309
|
+
- Replace `Login` hook by simple `LoginPage` component
|
|
@@ -3,7 +3,7 @@ import { BadgeProps, FormControlProps, FormCheckProps } from 'react-bootstrap';
|
|
|
3
3
|
import { Variant } from 'react-bootstrap/types';
|
|
4
4
|
import { Moment } from 'moment';
|
|
5
5
|
export type FormValue = boolean | string | string[] | number | number[];
|
|
6
|
-
export type FormOnChange = (((value: FormValue, formData
|
|
6
|
+
export type FormOnChange = (((value: FormValue, formData?: any) => any));
|
|
7
7
|
export type FormComponentProps = {
|
|
8
8
|
keyName?: string;
|
|
9
9
|
pristine?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type LoginPageProps = {
|
|
3
|
+
onSubmit: (credentials: {
|
|
4
|
+
email: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}, callback?: () => void) => void;
|
|
7
|
+
callback?: () => void;
|
|
8
|
+
isAuthenticated: boolean;
|
|
9
|
+
label?: string | React.ReactElement;
|
|
10
|
+
onResetPassword: string | (() => void);
|
|
11
|
+
};
|
|
12
|
+
export declare const LoginPage: ({ onSubmit, isAuthenticated, label, onResetPassword, callback, }: LoginPageProps) => React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export * from './components/errors/ErrorBoundary';
|
|
|
16
16
|
export * from './utils/hooks';
|
|
17
17
|
export * from './utils/timeAndDate';
|
|
18
18
|
export * from './utils/utils';
|
|
19
|
-
export * from './login/
|
|
19
|
+
export * from './components/login/LoginPage';
|
|
20
20
|
export * from './localization/localization';
|
|
21
21
|
export * from './localization/LocalizationContext';
|