@idkwebsites/components 0.1.23 → 0.1.24
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/index.cjs +1033 -435
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -1
- package/dist/index.d.ts +50 -1
- package/dist/index.js +1078 -438
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -8
- package/dist/styles.css.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -66,7 +66,44 @@ interface Service {
|
|
|
66
66
|
image?: MediaRef | null;
|
|
67
67
|
duration: number;
|
|
68
68
|
price?: number;
|
|
69
|
-
|
|
69
|
+
locationSettings?: {
|
|
70
|
+
defaultLocationType?: 'in_person' | 'phone_call' | 'meeting_link';
|
|
71
|
+
inPersonEnabled?: boolean;
|
|
72
|
+
inPersonDetails?: string;
|
|
73
|
+
phoneCallEnabled?: boolean;
|
|
74
|
+
phoneCallDetails?: string;
|
|
75
|
+
meetingLinkEnabled?: boolean;
|
|
76
|
+
meetingLinkDetails?: string;
|
|
77
|
+
};
|
|
78
|
+
locationOptions?: Array<{
|
|
79
|
+
type: 'in_person' | 'phone_call' | 'meeting_link';
|
|
80
|
+
label: string;
|
|
81
|
+
details?: string;
|
|
82
|
+
isDefault?: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
paymentSettings?: {
|
|
85
|
+
mode?: 'inherit' | 'none' | 'full' | 'deposit';
|
|
86
|
+
depositType?: 'fixed' | 'percentage';
|
|
87
|
+
depositValue?: number;
|
|
88
|
+
paymentTerms?: string;
|
|
89
|
+
};
|
|
90
|
+
effectivePaymentSettings?: {
|
|
91
|
+
mode: 'none' | 'full' | 'deposit';
|
|
92
|
+
depositType?: 'fixed' | 'percentage';
|
|
93
|
+
depositValue?: number;
|
|
94
|
+
paymentTerms?: string;
|
|
95
|
+
currency: 'usd';
|
|
96
|
+
amountDueNow: number;
|
|
97
|
+
fullAmount: number;
|
|
98
|
+
paymentWindowMinutes: number;
|
|
99
|
+
adminCanBypassPayment: boolean;
|
|
100
|
+
cancellationRefundMode: 'none' | 'full';
|
|
101
|
+
reschedulePaymentMode: 'keep' | 'manual_review';
|
|
102
|
+
};
|
|
103
|
+
category?: string | {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
};
|
|
70
107
|
slotInterval?: number;
|
|
71
108
|
minimumBookingNotice?: number;
|
|
72
109
|
beforeEventBuffer?: number;
|
|
@@ -102,8 +139,15 @@ interface BookingCreateInput {
|
|
|
102
139
|
customerEmail: string;
|
|
103
140
|
customerPhone?: string;
|
|
104
141
|
customerNotes?: string;
|
|
142
|
+
locationType?: 'in_person' | 'phone_call' | 'meeting_link';
|
|
105
143
|
responses?: Record<string, unknown>;
|
|
106
144
|
}
|
|
145
|
+
interface BookingPaymentSession {
|
|
146
|
+
bookingId: string;
|
|
147
|
+
paymentIntentId: string;
|
|
148
|
+
clientSecret: string;
|
|
149
|
+
publishableKey: string;
|
|
150
|
+
}
|
|
107
151
|
interface BookingCancelInput {
|
|
108
152
|
uid: string;
|
|
109
153
|
reason?: string;
|
|
@@ -266,6 +310,7 @@ interface UseBookingWidgetReturn {
|
|
|
266
310
|
email: string;
|
|
267
311
|
phone: string;
|
|
268
312
|
notes: string;
|
|
313
|
+
locationType: BookingCreateInput["locationType"] | "";
|
|
269
314
|
};
|
|
270
315
|
servicesList: Service[];
|
|
271
316
|
filteredServices: Service[];
|
|
@@ -296,6 +341,8 @@ interface UseBookingWidgetReturn {
|
|
|
296
341
|
isAvailabilityLoading: boolean;
|
|
297
342
|
isSubmitting: boolean;
|
|
298
343
|
bookingError: string | null;
|
|
344
|
+
paymentSession: BookingPaymentSession | null;
|
|
345
|
+
paymentRequired: boolean;
|
|
299
346
|
requiresStaff: boolean;
|
|
300
347
|
canSkipStaff: boolean;
|
|
301
348
|
serviceSearch: string;
|
|
@@ -320,12 +367,14 @@ interface UseBookingWidgetReturn {
|
|
|
320
367
|
email: string;
|
|
321
368
|
phone: string;
|
|
322
369
|
notes: string;
|
|
370
|
+
locationType: BookingCreateInput["locationType"] | "";
|
|
323
371
|
}>>;
|
|
324
372
|
goToServiceStep: () => void;
|
|
325
373
|
continueFromService: () => void;
|
|
326
374
|
continueFromStaff: () => void;
|
|
327
375
|
continueFromTime: () => void;
|
|
328
376
|
submitBooking: (event?: React.FormEvent) => Promise<void>;
|
|
377
|
+
finalizePayment: (paymentIntentId?: string, bookingId?: string) => Promise<void>;
|
|
329
378
|
goBack: () => void;
|
|
330
379
|
reset: () => void;
|
|
331
380
|
scrollToTop: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,44 @@ interface Service {
|
|
|
66
66
|
image?: MediaRef | null;
|
|
67
67
|
duration: number;
|
|
68
68
|
price?: number;
|
|
69
|
-
|
|
69
|
+
locationSettings?: {
|
|
70
|
+
defaultLocationType?: 'in_person' | 'phone_call' | 'meeting_link';
|
|
71
|
+
inPersonEnabled?: boolean;
|
|
72
|
+
inPersonDetails?: string;
|
|
73
|
+
phoneCallEnabled?: boolean;
|
|
74
|
+
phoneCallDetails?: string;
|
|
75
|
+
meetingLinkEnabled?: boolean;
|
|
76
|
+
meetingLinkDetails?: string;
|
|
77
|
+
};
|
|
78
|
+
locationOptions?: Array<{
|
|
79
|
+
type: 'in_person' | 'phone_call' | 'meeting_link';
|
|
80
|
+
label: string;
|
|
81
|
+
details?: string;
|
|
82
|
+
isDefault?: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
paymentSettings?: {
|
|
85
|
+
mode?: 'inherit' | 'none' | 'full' | 'deposit';
|
|
86
|
+
depositType?: 'fixed' | 'percentage';
|
|
87
|
+
depositValue?: number;
|
|
88
|
+
paymentTerms?: string;
|
|
89
|
+
};
|
|
90
|
+
effectivePaymentSettings?: {
|
|
91
|
+
mode: 'none' | 'full' | 'deposit';
|
|
92
|
+
depositType?: 'fixed' | 'percentage';
|
|
93
|
+
depositValue?: number;
|
|
94
|
+
paymentTerms?: string;
|
|
95
|
+
currency: 'usd';
|
|
96
|
+
amountDueNow: number;
|
|
97
|
+
fullAmount: number;
|
|
98
|
+
paymentWindowMinutes: number;
|
|
99
|
+
adminCanBypassPayment: boolean;
|
|
100
|
+
cancellationRefundMode: 'none' | 'full';
|
|
101
|
+
reschedulePaymentMode: 'keep' | 'manual_review';
|
|
102
|
+
};
|
|
103
|
+
category?: string | {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
};
|
|
70
107
|
slotInterval?: number;
|
|
71
108
|
minimumBookingNotice?: number;
|
|
72
109
|
beforeEventBuffer?: number;
|
|
@@ -102,8 +139,15 @@ interface BookingCreateInput {
|
|
|
102
139
|
customerEmail: string;
|
|
103
140
|
customerPhone?: string;
|
|
104
141
|
customerNotes?: string;
|
|
142
|
+
locationType?: 'in_person' | 'phone_call' | 'meeting_link';
|
|
105
143
|
responses?: Record<string, unknown>;
|
|
106
144
|
}
|
|
145
|
+
interface BookingPaymentSession {
|
|
146
|
+
bookingId: string;
|
|
147
|
+
paymentIntentId: string;
|
|
148
|
+
clientSecret: string;
|
|
149
|
+
publishableKey: string;
|
|
150
|
+
}
|
|
107
151
|
interface BookingCancelInput {
|
|
108
152
|
uid: string;
|
|
109
153
|
reason?: string;
|
|
@@ -266,6 +310,7 @@ interface UseBookingWidgetReturn {
|
|
|
266
310
|
email: string;
|
|
267
311
|
phone: string;
|
|
268
312
|
notes: string;
|
|
313
|
+
locationType: BookingCreateInput["locationType"] | "";
|
|
269
314
|
};
|
|
270
315
|
servicesList: Service[];
|
|
271
316
|
filteredServices: Service[];
|
|
@@ -296,6 +341,8 @@ interface UseBookingWidgetReturn {
|
|
|
296
341
|
isAvailabilityLoading: boolean;
|
|
297
342
|
isSubmitting: boolean;
|
|
298
343
|
bookingError: string | null;
|
|
344
|
+
paymentSession: BookingPaymentSession | null;
|
|
345
|
+
paymentRequired: boolean;
|
|
299
346
|
requiresStaff: boolean;
|
|
300
347
|
canSkipStaff: boolean;
|
|
301
348
|
serviceSearch: string;
|
|
@@ -320,12 +367,14 @@ interface UseBookingWidgetReturn {
|
|
|
320
367
|
email: string;
|
|
321
368
|
phone: string;
|
|
322
369
|
notes: string;
|
|
370
|
+
locationType: BookingCreateInput["locationType"] | "";
|
|
323
371
|
}>>;
|
|
324
372
|
goToServiceStep: () => void;
|
|
325
373
|
continueFromService: () => void;
|
|
326
374
|
continueFromStaff: () => void;
|
|
327
375
|
continueFromTime: () => void;
|
|
328
376
|
submitBooking: (event?: React.FormEvent) => Promise<void>;
|
|
377
|
+
finalizePayment: (paymentIntentId?: string, bookingId?: string) => Promise<void>;
|
|
329
378
|
goBack: () => void;
|
|
330
379
|
reset: () => void;
|
|
331
380
|
scrollToTop: () => void;
|