@open-tender/utils 0.3.1 → 0.3.2
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.
|
@@ -5,7 +5,7 @@ interface NotificationCheckbox {
|
|
|
5
5
|
name: NotificationChannel;
|
|
6
6
|
type: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hidePassword?: boolean, optionalFields?: string[], notificationChannels?: NotificationChannel[]) => {
|
|
8
|
+
export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hidePassword?: boolean, optionalFields?: string[], notificationChannels?: NotificationChannel[], passwordRequirements?: string) => {
|
|
9
9
|
submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
10
10
|
data: CustomerCreate;
|
|
11
11
|
comms: NotificationChannel[];
|
|
@@ -27,7 +27,7 @@ const notificationChannelFields = [
|
|
|
27
27
|
type: 'checkbox'
|
|
28
28
|
}
|
|
29
29
|
];
|
|
30
|
-
const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePassword = false, optionalFields, notificationChannels) => {
|
|
30
|
+
const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePassword = false, optionalFields, notificationChannels, passwordRequirements) => {
|
|
31
31
|
const submitRef = (0, react_1.useRef)(null);
|
|
32
32
|
const [data, setData] = (0, react_1.useState)(initState);
|
|
33
33
|
const [comms, setComms] = (0, react_1.useState)([]);
|
|
@@ -67,7 +67,7 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePasswo
|
|
|
67
67
|
autoComplete: 'email'
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
label:
|
|
70
|
+
label: `Password${passwordRequirements || ''}`,
|
|
71
71
|
name: 'password',
|
|
72
72
|
type: 'password',
|
|
73
73
|
required: true,
|
|
@@ -5,7 +5,7 @@ interface NotificationCheckbox {
|
|
|
5
5
|
name: NotificationChannel;
|
|
6
6
|
type: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hidePassword?: boolean, optionalFields?: string[], notificationChannels?: NotificationChannel[]) => {
|
|
8
|
+
export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hidePassword?: boolean, optionalFields?: string[], notificationChannels?: NotificationChannel[], passwordRequirements?: string) => {
|
|
9
9
|
submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
10
10
|
data: CustomerCreate;
|
|
11
11
|
comms: NotificationChannel[];
|
|
@@ -24,7 +24,7 @@ const notificationChannelFields = [
|
|
|
24
24
|
type: 'checkbox'
|
|
25
25
|
}
|
|
26
26
|
];
|
|
27
|
-
export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePassword = false, optionalFields, notificationChannels) => {
|
|
27
|
+
export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePassword = false, optionalFields, notificationChannels, passwordRequirements) => {
|
|
28
28
|
const submitRef = useRef(null);
|
|
29
29
|
const [data, setData] = useState(initState);
|
|
30
30
|
const [comms, setComms] = useState([]);
|
|
@@ -64,7 +64,7 @@ export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hid
|
|
|
64
64
|
autoComplete: 'email'
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
label:
|
|
67
|
+
label: `Password${passwordRequirements || ''}`,
|
|
68
68
|
name: 'password',
|
|
69
69
|
type: 'password',
|
|
70
70
|
required: true,
|
package/package.json
CHANGED