@open-tender/utils 0.0.60 → 0.0.61
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/dist/cjs/hooks/useAllergenForm.d.ts +1 -2
- package/dist/cjs/hooks/useAllergenForm.js +2 -1
- package/dist/cjs/hooks/useCartGuestForm.d.ts +2 -2
- package/dist/cjs/hooks/useCartGuestForm.js +2 -1
- package/dist/cjs/hooks/useCheckoutLoginForm.d.ts +1 -2
- package/dist/cjs/hooks/useCheckoutLoginForm.js +2 -1
- package/dist/cjs/hooks/useCreditCard.d.ts +1 -2
- package/dist/cjs/hooks/useCreditCard.js +2 -1
- package/dist/cjs/hooks/useCurbside.d.ts +1 -2
- package/dist/cjs/hooks/useCurbside.js +2 -1
- package/dist/cjs/hooks/useDineInForm.d.ts +1 -2
- package/dist/cjs/hooks/useDineInForm.js +2 -1
- package/dist/cjs/hooks/useDonationForm.d.ts +2 -2
- package/dist/cjs/hooks/useDonationForm.js +2 -1
- package/dist/cjs/hooks/useGiftCardAssignForm.d.ts +1 -2
- package/dist/cjs/hooks/useGiftCardAssignForm.js +2 -1
- package/dist/cjs/hooks/useGiftCardAssignOtherForm.d.ts +1 -2
- package/dist/cjs/hooks/useGiftCardAssignOtherForm.js +2 -1
- package/dist/cjs/hooks/useGiftCardForm.d.ts +1 -2
- package/dist/cjs/hooks/useGiftCardForm.js +2 -1
- package/dist/cjs/hooks/useGiftCardsForm.d.ts +2 -2
- package/dist/cjs/hooks/useGiftCardsForm.js +2 -1
- package/dist/cjs/hooks/useGuestForm.d.ts +1 -2
- package/dist/cjs/hooks/useGuestForm.js +2 -1
- package/dist/cjs/hooks/useOrderFulfillmentForm.d.ts +1 -2
- package/dist/cjs/hooks/useOrderFulfillmentForm.js +2 -1
- package/dist/cjs/hooks/useOrderRating.d.ts +1 -2
- package/dist/cjs/hooks/useOrderRating.js +3 -2
- package/dist/cjs/hooks/useOrderRatingForm.d.ts +1 -2
- package/dist/cjs/hooks/useOrderRatingForm.js +2 -1
- package/dist/cjs/hooks/useProfileForm.d.ts +2 -3
- package/dist/cjs/hooks/useProfileForm.js +2 -1
- package/dist/cjs/hooks/useResetPasswordForm.d.ts +2 -3
- package/dist/cjs/hooks/useResetPasswordForm.js +2 -1
- package/dist/cjs/hooks/useSendResetForm.d.ts +1 -2
- package/dist/cjs/hooks/useSendResetForm.js +2 -1
- package/dist/cjs/hooks/useSignUpForm.d.ts +2 -3
- package/dist/cjs/hooks/useSignUpForm.js +2 -1
- package/dist/cjs/hooks/useSignUpGuestForm.d.ts +1 -2
- package/dist/cjs/hooks/useSignUpGuestForm.js +2 -1
- package/dist/cjs/hooks/useSigninForm.d.ts +1 -2
- package/dist/cjs/hooks/useSigninForm.js +2 -1
- package/dist/esm/hooks/useAllergenForm.d.ts +1 -2
- package/dist/esm/hooks/useAllergenForm.js +1 -2
- package/dist/esm/hooks/useCartGuestForm.d.ts +2 -2
- package/dist/esm/hooks/useCartGuestForm.js +1 -2
- package/dist/esm/hooks/useCheckoutLoginForm.d.ts +1 -2
- package/dist/esm/hooks/useCheckoutLoginForm.js +1 -2
- package/dist/esm/hooks/useCreditCard.d.ts +1 -2
- package/dist/esm/hooks/useCreditCard.js +1 -2
- package/dist/esm/hooks/useCurbside.d.ts +1 -2
- package/dist/esm/hooks/useCurbside.js +1 -2
- package/dist/esm/hooks/useDineInForm.d.ts +1 -2
- package/dist/esm/hooks/useDineInForm.js +1 -2
- package/dist/esm/hooks/useDonationForm.d.ts +2 -2
- package/dist/esm/hooks/useDonationForm.js +1 -2
- package/dist/esm/hooks/useGiftCardAssignForm.d.ts +1 -2
- package/dist/esm/hooks/useGiftCardAssignForm.js +1 -2
- package/dist/esm/hooks/useGiftCardAssignOtherForm.d.ts +1 -2
- package/dist/esm/hooks/useGiftCardAssignOtherForm.js +1 -2
- package/dist/esm/hooks/useGiftCardForm.d.ts +1 -2
- package/dist/esm/hooks/useGiftCardForm.js +1 -2
- package/dist/esm/hooks/useGiftCardsForm.d.ts +2 -2
- package/dist/esm/hooks/useGiftCardsForm.js +1 -2
- package/dist/esm/hooks/useGuestForm.d.ts +1 -2
- package/dist/esm/hooks/useGuestForm.js +1 -2
- package/dist/esm/hooks/useOrderFulfillmentForm.d.ts +1 -2
- package/dist/esm/hooks/useOrderFulfillmentForm.js +1 -2
- package/dist/esm/hooks/useOrderRating.d.ts +1 -2
- package/dist/esm/hooks/useOrderRating.js +1 -2
- package/dist/esm/hooks/useOrderRatingForm.d.ts +1 -2
- package/dist/esm/hooks/useOrderRatingForm.js +1 -2
- package/dist/esm/hooks/useProfileForm.d.ts +2 -3
- package/dist/esm/hooks/useProfileForm.js +1 -2
- package/dist/esm/hooks/useResetPasswordForm.d.ts +2 -3
- package/dist/esm/hooks/useResetPasswordForm.js +1 -2
- package/dist/esm/hooks/useSendResetForm.d.ts +1 -2
- package/dist/esm/hooks/useSendResetForm.js +1 -2
- package/dist/esm/hooks/useSignUpForm.d.ts +2 -3
- package/dist/esm/hooks/useSignUpForm.js +1 -2
- package/dist/esm/hooks/useSignUpGuestForm.d.ts +1 -2
- package/dist/esm/hooks/useSignUpGuestForm.js +1 -2
- package/dist/esm/hooks/useSigninForm.d.ts +1 -2
- package/dist/esm/hooks/useSigninForm.js +1 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Allergen, Allergens } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useAllergenForm: <SubmitRef extends Field>(allergens: Allergens, selectedAllergens: Allergens, isLoading: boolean | undefined, error: any, setAllergens: (allergens: Allergens) => void, updateAllergens: (allergen: Partial<Allergen>[]) => void, callback?: () => void) => {
|
|
4
|
+
export declare const useAllergenForm: <SubmitRef extends Field>(allergens: Allergens, selectedAllergens: Allergens, isLoading: boolean | undefined, error: any, setAllergens: (allergens: Allergens) => void, updateAllergens: (allergen: Partial<Allergen>[]) => void, callback?: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
submitting: boolean;
|
|
7
7
|
allergenIds: number[];
|
|
@@ -9,4 +9,3 @@ declare const useAllergenForm: <SubmitRef extends Field>(allergens: Allergens, s
|
|
|
9
9
|
handleChange: (name: string, checked?: boolean) => void;
|
|
10
10
|
handleSubmit: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default useAllergenForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAllergenForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useAllergenForm = (allergens, selectedAllergens, isLoading = false, error = null, setAllergens, updateAllergens, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -45,4 +46,4 @@ const useAllergenForm = (allergens, selectedAllergens, isLoading = false, error
|
|
|
45
46
|
handleSubmit,
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
|
-
exports.
|
|
49
|
+
exports.useAllergenForm = useAllergenForm;
|
|
@@ -7,7 +7,7 @@ interface CartGuestFormField {
|
|
|
7
7
|
type?: string;
|
|
8
8
|
required?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const useCartGuestForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, errMsg: string, cartId: number, joinCart: (data: any, callback?: any) => void) => {
|
|
10
|
+
export declare const useCartGuestForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, errMsg: string, cartId: number, joinCart: (data: any, callback?: any) => void) => {
|
|
11
11
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
12
12
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
13
13
|
fields: CartGuestFormField[];
|
|
@@ -18,4 +18,4 @@ declare const useCartGuestForm: <InputRef extends Field, SubmitRef extends Field
|
|
|
18
18
|
handleChange: (name: string, value: string) => void;
|
|
19
19
|
handleSubmit: () => void;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCartGuestForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useCartGuestForm = (loading, errMsg, cartId, joinCart) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -43,4 +44,4 @@ const useCartGuestForm = (loading, errMsg, cartId, joinCart) => {
|
|
|
43
44
|
handleSubmit,
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
exports.
|
|
47
|
+
exports.useCartGuestForm = useCartGuestForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LoginData, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useLoginForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, login: (email?: string, password?: string) => void, callback?: () => void) => {
|
|
4
|
+
export declare const useLoginForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, login: (email?: string, password?: string) => void, callback?: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
data: Partial<LoginData>;
|
|
@@ -9,4 +9,3 @@ declare const useLoginForm: <InputRef extends Field, SubmitRef extends Field>(lo
|
|
|
9
9
|
handleChange: (name: string, value: string) => void;
|
|
10
10
|
handleSubmit: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default useLoginForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLoginForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useLoginForm = (loading, error, login, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -38,4 +39,4 @@ const useLoginForm = (loading, error, login, callback) => {
|
|
|
38
39
|
handleSubmit,
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
|
-
exports.
|
|
42
|
+
exports.useLoginForm = useLoginForm;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardType, CreditCardData, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useCreditCardForm: <SubmitRef extends Field>(loading: RequestStatus, error: any, data: CreditCardData, cardType: CardType, setErrors: (errors: any) => void, addCard: (data: CreditCardData, callback: () => void) => void, callback: () => void, recaptchaKey: string, revenue_center_id: number | null, windowRef?: Window) => {
|
|
4
|
+
export declare const useCreditCardForm: <SubmitRef extends Field>(loading: RequestStatus, error: any, data: CreditCardData, cardType: CardType, setErrors: (errors: any) => void, addCard: (data: CreditCardData, callback: () => void) => void, callback: () => void, recaptchaKey: string, revenue_center_id: number | null, windowRef?: Window) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
recaptchaRef: import("react").MutableRefObject<any>;
|
|
7
7
|
data: CreditCardData;
|
|
8
8
|
submitting: boolean;
|
|
9
9
|
handleSubmit: () => void;
|
|
10
10
|
};
|
|
11
|
-
export default useCreditCardForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCreditCardForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("@open-tender/utils");
|
|
5
6
|
const useCreditCardForm = (loading, error, data, cardType, setErrors, addCard, callback, recaptchaKey, revenue_center_id, windowRef) => {
|
|
@@ -70,4 +71,4 @@ const useCreditCardForm = (loading, error, data, cardType, setErrors, addCard, c
|
|
|
70
71
|
handleSubmit,
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
|
-
exports.
|
|
74
|
+
exports.useCreditCardForm = useCreditCardForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigFulfillment, OrderFulfillment, RequestStatus } from '@open-tender/types';
|
|
2
|
-
declare const useCurbside: (orderId: number, fulfillment: Partial<OrderFulfillment>, loading: RequestStatus, error: any, update: (orderId: number, data: Partial<OrderFulfillment>) => void, settings?: ConfigFulfillment, showAllFields?: boolean) => {
|
|
2
|
+
export declare const useCurbside: (orderId: number, fulfillment: Partial<OrderFulfillment>, loading: RequestStatus, error: any, update: (orderId: number, data: Partial<OrderFulfillment>) => void, settings?: ConfigFulfillment, showAllFields?: boolean) => {
|
|
3
3
|
fields: import("@open-tender/types").ConfigFulfillmentField[] | undefined;
|
|
4
4
|
data: Partial<OrderFulfillment>;
|
|
5
5
|
errors: any;
|
|
@@ -7,4 +7,3 @@ declare const useCurbside: (orderId: number, fulfillment: Partial<OrderFulfillme
|
|
|
7
7
|
handleChange: (name: keyof OrderFulfillment, value: string) => void;
|
|
8
8
|
handleSubmit: () => void;
|
|
9
9
|
};
|
|
10
|
-
export default useCurbside;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurbside = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
const useCurbside = (orderId, fulfillment, loading, error, update, settings, showAllFields = false) => {
|
|
@@ -34,4 +35,4 @@ const useCurbside = (orderId, fulfillment, loading, error, update, settings, sho
|
|
|
34
35
|
handleSubmit,
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
|
-
exports.
|
|
38
|
+
exports.useCurbside = useCurbside;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GuestData } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useDineInForm: <InputRef extends Field, SubmitRef extends Field>(initialData: Partial<GuestData> | undefined, submitGuest: (data: any) => void) => {
|
|
4
|
+
export declare const useDineInForm: <InputRef extends Field, SubmitRef extends Field>(initialData: Partial<GuestData> | undefined, submitGuest: (data: any) => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
data: Partial<GuestData>;
|
|
@@ -9,4 +9,3 @@ declare const useDineInForm: <InputRef extends Field, SubmitRef extends Field>(i
|
|
|
9
9
|
handleChange: (name: string, value: string) => void;
|
|
10
10
|
handleSubmit: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default useDineInForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDineInForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useDineInForm = (initialData = {}, submitGuest) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -28,4 +29,4 @@ const useDineInForm = (initialData = {}, submitGuest) => {
|
|
|
28
29
|
handleSubmit,
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
|
-
exports.
|
|
32
|
+
exports.useDineInForm = useDineInForm;
|
|
@@ -5,7 +5,7 @@ interface CreditCardOption {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: unknown;
|
|
7
7
|
}
|
|
8
|
-
declare const useDonationsForm: <InputRef extends Field, SubmitRef extends Field>(purchase: (data: PurchaseDonationRequest, callback?: () => void) => void, reset: () => void, setAlert: Dispatch<any>, loading: RequestStatus, error: any, success: boolean, customer?: Partial<Profile>, creditCards?: CreditCards, recaptchaKey?: string, cardData?: CreditCardData, cardType?: CardType, windowref?: Window) => {
|
|
8
|
+
export declare const useDonationsForm: <InputRef extends Field, SubmitRef extends Field>(purchase: (data: PurchaseDonationRequest, callback?: () => void) => void, reset: () => void, setAlert: Dispatch<any>, loading: RequestStatus, error: any, success: boolean, customer?: Partial<Profile>, creditCards?: CreditCards, recaptchaKey?: string, cardData?: CreditCardData, cardType?: CardType, windowref?: Window) => {
|
|
9
9
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
10
10
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
11
11
|
recaptchaRef: import("react").MutableRefObject<any>;
|
|
@@ -25,4 +25,4 @@ declare const useDonationsForm: <InputRef extends Field, SubmitRef extends Field
|
|
|
25
25
|
handleReset: () => void;
|
|
26
26
|
setErrors: Dispatch<any>;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDonationsForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
const useDonationsForm = (purchase, reset, setAlert, loading, error, success, customer, creditCards, recaptchaKey, cardData, cardType, windowref) => {
|
|
@@ -166,4 +167,4 @@ const useDonationsForm = (purchase, reset, setAlert, loading, error, success, cu
|
|
|
166
167
|
setErrors,
|
|
167
168
|
};
|
|
168
169
|
};
|
|
169
|
-
exports.
|
|
170
|
+
exports.useDonationsForm = useDonationsForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useGiftCardAssignForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, assign: (card_number: number, callback: () => void) => void, callback: () => void) => {
|
|
4
|
+
export declare const useGiftCardAssignForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, assign: (card_number: number, callback: () => void) => void, callback: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
cardNumber: string;
|
|
@@ -10,4 +10,3 @@ declare const useGiftCardAssignForm: <InputRef extends Field, SubmitRef extends
|
|
|
10
10
|
handleChange: (value: string) => void;
|
|
11
11
|
handleSubmit: () => void;
|
|
12
12
|
};
|
|
13
|
-
export default useGiftCardAssignForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiftCardAssignForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useGiftCardAssignForm = (loading, error, assign, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -43,4 +44,4 @@ const useGiftCardAssignForm = (loading, error, assign, callback) => {
|
|
|
43
44
|
handleSubmit,
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
exports.
|
|
47
|
+
exports.useGiftCardAssignForm = useGiftCardAssignForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useGiftCardAssignOtherForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, giftCardId: number, assign: (id: number, email: string, callback: () => void) => void, callback: () => void) => {
|
|
4
|
+
export declare const useGiftCardAssignOtherForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, giftCardId: number, assign: (id: number, email: string, callback: () => void) => void, callback: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
email: string;
|
|
@@ -10,4 +10,3 @@ declare const useGiftCardAssignOtherForm: <InputRef extends Field, SubmitRef ext
|
|
|
10
10
|
handleChange: (value: string) => void;
|
|
11
11
|
handleSubmit: () => void;
|
|
12
12
|
};
|
|
13
|
-
export default useGiftCardAssignOtherForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiftCardAssignOtherForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useGiftCardAssignOtherForm = (loading, error, giftCardId, assign, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -36,4 +37,4 @@ const useGiftCardAssignOtherForm = (loading, error, giftCardId, assign, callback
|
|
|
36
37
|
handleSubmit,
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
|
-
exports.
|
|
40
|
+
exports.useGiftCardAssignOtherForm = useGiftCardAssignOtherForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CreditCards, CustomerGiftCard, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useGiftCardForm: <InputRef extends Field, SubmitRef extends Field>(giftCard: CustomerGiftCard, creditCards: CreditCards, loading: RequestStatus, error: any, update: (id: number, data: Partial<CustomerGiftCard>, callback: () => void) => void, add: (data: Partial<CustomerGiftCard>, callback: () => void) => void, callback: () => void) => {
|
|
4
|
+
export declare const useGiftCardForm: <InputRef extends Field, SubmitRef extends Field>(giftCard: CustomerGiftCard, creditCards: CreditCards, loading: RequestStatus, error: any, update: (id: number, data: Partial<CustomerGiftCard>, callback: () => void) => void, add: (data: Partial<CustomerGiftCard>, callback: () => void) => void, callback: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
options: {
|
|
@@ -14,4 +14,3 @@ declare const useGiftCardForm: <InputRef extends Field, SubmitRef extends Field>
|
|
|
14
14
|
handleChange: (name: number, type: string, value: string | null, checked: boolean | null) => void;
|
|
15
15
|
handleSubmit: () => void;
|
|
16
16
|
};
|
|
17
|
-
export default useGiftCardForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiftCardForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useGiftCardForm = (giftCard, creditCards, loading, error, update, add, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -54,4 +55,4 @@ const useGiftCardForm = (giftCard, creditCards, loading, error, update, add, cal
|
|
|
54
55
|
handleSubmit,
|
|
55
56
|
};
|
|
56
57
|
};
|
|
57
|
-
exports.
|
|
58
|
+
exports.useGiftCardForm = useGiftCardForm;
|
|
@@ -13,7 +13,7 @@ interface PurchaseData {
|
|
|
13
13
|
url: string;
|
|
14
14
|
token?: string;
|
|
15
15
|
}
|
|
16
|
-
declare const useGiftCardsForm: <InputRef extends Field, SubmitRef extends Field>(purchase: (data: PurchaseData) => void, reset: () => void, loading: RequestStatus, error: any, success: boolean, setAlert: (data: {
|
|
16
|
+
export declare const useGiftCardsForm: <InputRef extends Field, SubmitRef extends Field>(purchase: (data: PurchaseData) => void, reset: () => void, loading: RequestStatus, error: any, success: boolean, setAlert: (data: {
|
|
17
17
|
type: string;
|
|
18
18
|
args?: any;
|
|
19
19
|
}) => void, customer: Partial<Customer> | undefined, creditCards: CreditCards | undefined, recaptchaKey: string | null | undefined, initState: PurchaseGiftCardData, cardData: CreditCardData, cardType: CardType, windowRef?: Window) => {
|
|
@@ -39,4 +39,4 @@ declare const useGiftCardsForm: <InputRef extends Field, SubmitRef extends Field
|
|
|
39
39
|
errors: {};
|
|
40
40
|
submitting: boolean;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiftCardsForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("@open-tender/utils");
|
|
5
6
|
const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, customer = {}, creditCards = [], recaptchaKey = null, initState, cardData, cardType, windowRef) => {
|
|
@@ -184,4 +185,4 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
184
185
|
submitting,
|
|
185
186
|
};
|
|
186
187
|
};
|
|
187
|
-
exports.
|
|
188
|
+
exports.useGiftCardsForm = useGiftCardsForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GuestData, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useGuestForm: <TnputRef extends Field, SubmitRef extends Field>(email: string, loading: RequestStatus, errors: any, checkGuest: (email?: string) => void) => {
|
|
4
|
+
export declare const useGuestForm: <TnputRef extends Field, SubmitRef extends Field>(email: string, loading: RequestStatus, errors: any, checkGuest: (email?: string) => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<TnputRef | null>;
|
|
7
7
|
data: Partial<GuestData>;
|
|
@@ -10,4 +10,3 @@ declare const useGuestForm: <TnputRef extends Field, SubmitRef extends Field>(em
|
|
|
10
10
|
handleChange: (name: string, value: string) => void;
|
|
11
11
|
handleSubmit: () => void;
|
|
12
12
|
};
|
|
13
|
-
export default useGuestForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGuestForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useGuestForm = (email, loading, errors, checkGuest) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -38,4 +39,4 @@ const useGuestForm = (email, loading, errors, checkGuest) => {
|
|
|
38
39
|
handleSubmit,
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
|
-
exports.
|
|
42
|
+
exports.useGuestForm = useGuestForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConfigFulfillment, OrderFulfillment, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useOrderFulfillmentForm: <SubmitRef extends Field>(orderId: number, fulfillment: Partial<OrderFulfillment>, loading: RequestStatus, error: any, update: (orderId: number, data: Partial<OrderFulfillment>) => void, settings?: ConfigFulfillment, showAllFields?: boolean) => {
|
|
4
|
+
export declare const useOrderFulfillmentForm: <SubmitRef extends Field>(orderId: number, fulfillment: Partial<OrderFulfillment>, loading: RequestStatus, error: any, update: (orderId: number, data: Partial<OrderFulfillment>) => void, settings?: ConfigFulfillment, showAllFields?: boolean) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
fields: import("@open-tender/types").ConfigFulfillmentField[] | undefined;
|
|
7
7
|
data: Partial<OrderFulfillment>;
|
|
@@ -10,4 +10,3 @@ declare const useOrderFulfillmentForm: <SubmitRef extends Field>(orderId: number
|
|
|
10
10
|
handleChange: (name: string, type: string, value: string | null, checked: boolean | null) => void;
|
|
11
11
|
handleSubmit: () => void;
|
|
12
12
|
};
|
|
13
|
-
export default useOrderFulfillmentForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOrderFulfillmentForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useOrderFulfillmentForm = (orderId, fulfillment, loading, error, update, settings, showAllFields = false) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -37,4 +38,4 @@ const useOrderFulfillmentForm = (orderId, fulfillment, loading, error, update, s
|
|
|
37
38
|
handleSubmit,
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
|
-
exports.
|
|
41
|
+
exports.useOrderFulfillmentForm = useOrderFulfillmentForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrderRating } from '@open-tender/types';
|
|
2
|
-
declare const
|
|
2
|
+
export declare const useOrderRating: (orderId: number, orderRating: OrderRating, updateRating: (id: number, data: Partial<OrderRating>) => void) => {
|
|
3
3
|
rating: number;
|
|
4
4
|
handleRating: (star: number) => void;
|
|
5
5
|
comments: string;
|
|
@@ -8,4 +8,3 @@ declare const useOrderRatingForm: (orderId: number, orderRating: OrderRating, up
|
|
|
8
8
|
handleClose: () => void;
|
|
9
9
|
stars: number[];
|
|
10
10
|
};
|
|
11
|
-
export default useOrderRatingForm;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOrderRating = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
|
-
const
|
|
5
|
+
const useOrderRating = (orderId, orderRating, updateRating) => {
|
|
5
6
|
const [rating, setRating] = (0, react_1.useState)((orderRating && orderRating.rating) || 0);
|
|
6
7
|
const [comments, setComments] = (0, react_1.useState)((orderRating && orderRating.comments) || '');
|
|
7
8
|
const stars = [1, 2, 3, 4, 5];
|
|
@@ -29,4 +30,4 @@ const useOrderRatingForm = (orderId, orderRating, updateRating) => {
|
|
|
29
30
|
stars,
|
|
30
31
|
};
|
|
31
32
|
};
|
|
32
|
-
exports.
|
|
33
|
+
exports.useOrderRating = useOrderRating;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OrderRating } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useOrderRatingForm: <SubmitRef extends Field>(orderId: number, orderRating: OrderRating, updateRating: (orderId: number, rating: Partial<OrderRating>) => void, callback?: () => void) => {
|
|
4
|
+
export declare const useOrderRatingForm: <SubmitRef extends Field>(orderId: number, orderRating: OrderRating, updateRating: (orderId: number, rating: Partial<OrderRating>) => void, callback?: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
stars: number[];
|
|
7
7
|
rating: number;
|
|
@@ -10,4 +10,3 @@ declare const useOrderRatingForm: <SubmitRef extends Field>(orderId: number, ord
|
|
|
10
10
|
handleComments: (value: string) => void;
|
|
11
11
|
handleSubmit: () => void;
|
|
12
12
|
};
|
|
13
|
-
export default useOrderRatingForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOrderRatingForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useOrderRatingForm = (orderId, orderRating, updateRating, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -30,4 +31,4 @@ const useOrderRatingForm = (orderId, orderRating, updateRating, callback) => {
|
|
|
30
31
|
handleSubmit,
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
exports.
|
|
34
|
+
exports.useOrderRatingForm = useOrderRatingForm;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConfigBrand, Profile, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
interface ProfileFormField {
|
|
4
|
+
export interface ProfileFormField {
|
|
5
5
|
label: string;
|
|
6
6
|
name: keyof Profile;
|
|
7
7
|
type: string;
|
|
8
8
|
required?: boolean;
|
|
9
9
|
autoComplete?: string;
|
|
10
10
|
}
|
|
11
|
-
declare const useProfileForm: <SubmitRef extends Field>(profile: Partial<Profile>, loading: RequestStatus, error: any, update: (data: Partial<Profile>) => void, optIns?: Partial<ConfigBrand>) => {
|
|
11
|
+
export declare const useProfileForm: <SubmitRef extends Field>(profile: Partial<Profile>, loading: RequestStatus, error: any, update: (data: Partial<Profile>) => void, optIns?: Partial<ConfigBrand>) => {
|
|
12
12
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
13
13
|
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | undefined;
|
|
14
14
|
order_notifications: import("@open-tender/types").ConfigOrderNotifications | undefined;
|
|
@@ -21,4 +21,3 @@ declare const useProfileForm: <SubmitRef extends Field>(profile: Partial<Profile
|
|
|
21
21
|
handleRadio: (name: string, value: string) => void;
|
|
22
22
|
handleSubmit: () => void;
|
|
23
23
|
};
|
|
24
|
-
export default useProfileForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useProfileForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
const useProfileForm = (profile, loading, error, update, optIns = {}) => {
|
|
@@ -71,4 +72,4 @@ const useProfileForm = (profile, loading, error, update, optIns = {}) => {
|
|
|
71
72
|
handleSubmit,
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
|
-
exports.
|
|
75
|
+
exports.useProfileForm = useProfileForm;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RequestStatus, ResetPasswordData } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
interface ResetPasswordFormField {
|
|
4
|
+
export interface ResetPasswordFormField {
|
|
5
5
|
label: string;
|
|
6
6
|
name: string;
|
|
7
7
|
type: string;
|
|
8
8
|
required?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const useResetPasswordForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, reset: (newPassword: string, callback: () => void) => void, resetForm: () => void, resetToken: () => void) => {
|
|
10
|
+
export declare const useResetPasswordForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, reset: (newPassword: string, callback: () => void) => void, resetForm: () => void, resetToken: () => void) => {
|
|
11
11
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
12
12
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
13
13
|
fields: ResetPasswordFormField[];
|
|
@@ -17,4 +17,3 @@ declare const useResetPasswordForm: <InputRef extends Field, SubmitRef extends F
|
|
|
17
17
|
handleChange: (name: string, value: string) => void;
|
|
18
18
|
handleSubmit: () => void;
|
|
19
19
|
};
|
|
20
|
-
export default useResetPasswordForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useResetPasswordForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useResetPasswordForm = (loading, error, reset, resetForm, resetToken) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -63,4 +64,4 @@ const useResetPasswordForm = (loading, error, reset, resetForm, resetToken) => {
|
|
|
63
64
|
handleSubmit,
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
|
-
exports.
|
|
67
|
+
exports.useResetPasswordForm = useResetPasswordForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useSendResetForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, sendReset: (email: string, linkUrl: string) => Promise<void>, callback?: () => void, windowref?: any, linkUrlVal?: string) => {
|
|
4
|
+
export declare const useSendResetForm: <InputRef extends Field, SubmitRef extends Field>(loading: RequestStatus, error: any, sendReset: (email: string, linkUrl: string) => Promise<void>, callback?: () => void, windowref?: any, linkUrlVal?: string) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
data: any;
|
|
@@ -9,4 +9,3 @@ declare const useSendResetForm: <InputRef extends Field, SubmitRef extends Field
|
|
|
9
9
|
handleChange: (name: string, value: string) => void;
|
|
10
10
|
handleSubmit: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default useSendResetForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSendResetForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useSendResetForm = (loading, error, sendReset, callback, windowref, linkUrlVal) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -33,4 +34,4 @@ const useSendResetForm = (loading, error, sendReset, callback, windowref, linkUr
|
|
|
33
34
|
handleSubmit,
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
|
-
exports.
|
|
37
|
+
exports.useSendResetForm = useSendResetForm;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CheckoutConfig, Profile } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
interface SignUpFormField {
|
|
4
|
+
export interface SignUpFormField {
|
|
5
5
|
label?: string;
|
|
6
6
|
name: string;
|
|
7
7
|
type?: string;
|
|
8
8
|
required?: boolean;
|
|
9
9
|
autoComplete?: string;
|
|
10
10
|
}
|
|
11
|
-
declare const useSignUpForm: <SubmitRef extends Field>(loading: RequestInfo, error: any, signUp: (data: any, callback?: () => void) => void, callback?: () => void, checkConfig?: Partial<CheckoutConfig>, hasThanx?: boolean) => {
|
|
11
|
+
export declare const useSignUpForm: <SubmitRef extends Field>(loading: RequestInfo, error: any, signUp: (data: any, callback?: () => void) => void, callback?: () => void, checkConfig?: Partial<CheckoutConfig>, hasThanx?: boolean) => {
|
|
12
12
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
13
13
|
data: Partial<Profile>;
|
|
14
14
|
errors: any;
|
|
@@ -18,4 +18,3 @@ declare const useSignUpForm: <SubmitRef extends Field>(loading: RequestInfo, err
|
|
|
18
18
|
handleChange: (name: string, type: string, value: string | null, checked: boolean | null) => void;
|
|
19
19
|
handleSubmit: () => void;
|
|
20
20
|
};
|
|
21
|
-
export default useSignUpForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSignUpForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("@open-tender/utils");
|
|
5
6
|
const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasThanx = false) => {
|
|
@@ -88,4 +89,4 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasTh
|
|
|
88
89
|
handleSubmit,
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
|
-
exports.
|
|
92
|
+
exports.useSignUpForm = useSignUpForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GuestData, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useSignUpGuestForm: <InputRef extends Field, SubmitRef extends Field>(email: string, guest: Partial<GuestData>, loading: RequestStatus, error: any, signUp: (data: any) => void, submitGuest: (data: Partial<GuestData>) => void, hasThanx?: boolean) => {
|
|
4
|
+
export declare const useSignUpGuestForm: <InputRef extends Field, SubmitRef extends Field>(email: string, guest: Partial<GuestData>, loading: RequestStatus, error: any, signUp: (data: any) => void, submitGuest: (data: Partial<GuestData>) => void, hasThanx?: boolean) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
data: {
|
|
@@ -20,4 +20,3 @@ declare const useSignUpGuestForm: <InputRef extends Field, SubmitRef extends Fie
|
|
|
20
20
|
handleSubmit: () => void;
|
|
21
21
|
handleGuest: () => void;
|
|
22
22
|
};
|
|
23
|
-
export default useSignUpGuestForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSignUpGuestForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("@open-tender/utils");
|
|
5
6
|
const initialData = {
|
|
@@ -71,4 +72,4 @@ const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, h
|
|
|
71
72
|
handleGuest,
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
|
-
exports.
|
|
75
|
+
exports.useSignUpGuestForm = useSignUpGuestForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LoginData, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { Field } from './types';
|
|
4
|
-
declare const useSignInForm: <InputRef extends Field, SubmitRef extends Field>(email: string, loading: RequestStatus, error: any, login: (email?: string, password?: string) => void, callback?: () => void) => {
|
|
4
|
+
export declare const useSignInForm: <InputRef extends Field, SubmitRef extends Field>(email: string, loading: RequestStatus, error: any, login: (email?: string, password?: string) => void, callback?: () => void) => {
|
|
5
5
|
submitRef: import("react").MutableRefObject<SubmitRef | null>;
|
|
6
6
|
inputRef: import("react").MutableRefObject<InputRef | null>;
|
|
7
7
|
data: Partial<LoginData>;
|
|
@@ -9,4 +9,3 @@ declare const useSignInForm: <InputRef extends Field, SubmitRef extends Field>(e
|
|
|
9
9
|
handleChange: (name: string, value: string) => void;
|
|
10
10
|
handleSubmit: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default useSignInForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSignInForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useSignInForm = (email, loading, error, login, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -38,4 +39,4 @@ const useSignInForm = (email, loading, error, login, callback) => {
|
|
|
38
39
|
handleSubmit,
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
|
-
exports.
|
|
42
|
+
exports.useSignInForm = useSignInForm;
|