@open-tender/utils 0.1.80 → 0.1.81

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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutConfig, CustomerCreate, RequestError, RequestStatus } from '@open-tender/types';
3
- export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: () => void) => void, callback?: () => void, checkConfig?: Partial<CheckoutConfig>, hasThanx?: boolean) => {
2
+ import { CheckoutConfig, Customer, CustomerCreate, RequestError, RequestStatus } from '@open-tender/types';
3
+ export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hasThanx?: boolean) => {
4
4
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
5
5
  data: CustomerCreate;
6
6
  errors: Record<string, string>;
@@ -10,7 +10,7 @@ const initState = {
10
10
  email: '',
11
11
  phone: ''
12
12
  };
13
- const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasThanx = false) => {
13
+ const useSignUpForm = (loading, error, signUp, callback, checkConfig, hasThanx = false) => {
14
14
  const submitRef = (0, react_1.useRef)(null);
15
15
  const [data, setData] = (0, react_1.useState)(initState);
16
16
  const [errors, setErrors] = (0, react_1.useState)({});
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutConfig, CustomerCreate, RequestError, RequestStatus } from '@open-tender/types';
3
- export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: () => void) => void, callback?: () => void, checkConfig?: Partial<CheckoutConfig>, hasThanx?: boolean) => {
2
+ import { CheckoutConfig, Customer, CustomerCreate, RequestError, RequestStatus } from '@open-tender/types';
3
+ export declare const useSignUpForm: (loading: RequestStatus, error: RequestError, signUp: (data: CustomerCreate, callback?: ((data: Customer) => void) | undefined) => void, callback?: ((data: Customer) => void) | undefined, checkConfig?: CheckoutConfig, hasThanx?: boolean) => {
4
4
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
5
5
  data: CustomerCreate;
6
6
  errors: Record<string, string>;
@@ -7,7 +7,7 @@ const initState = {
7
7
  email: '',
8
8
  phone: ''
9
9
  };
10
- export const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasThanx = false) => {
10
+ export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hasThanx = false) => {
11
11
  const submitRef = useRef(null);
12
12
  const [data, setData] = useState(initState);
13
13
  const [errors, setErrors] = useState({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",