@aaravpos/appointment-barber-booking 1.0.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/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/components/AppointmentBookingPlugin.d.ts +3 -0
- package/dist/components/BookingPluginContainer.d.ts +3 -0
- package/dist/components/common/Breadcrumb.d.ts +1 -0
- package/dist/components/common/CalendarOverlay.d.ts +7 -0
- package/dist/components/common/ChooseYourOutlet.d.ts +7 -0
- package/dist/components/common/MainLayout.d.ts +2 -0
- package/dist/components/common/ProfessionalSkeletonCard.d.ts +2 -0
- package/dist/components/common/ServiceSkeleton.d.ts +2 -0
- package/dist/components/common/Spinner.d.ts +2 -0
- package/dist/components/modals/ConsentModal.d.ts +3 -0
- package/dist/components/modals/PaymentModal.d.ts +17 -0
- package/dist/components/sidebar/Sidebar.d.ts +22 -0
- package/dist/components/steps/ConfirmPage.d.ts +2 -0
- package/dist/components/steps/DetailsPage.d.ts +2 -0
- package/dist/components/steps/ProfessionalServicePage.d.ts +1 -0
- package/dist/components/steps/ServiceProfessionalPage.d.ts +1 -0
- package/dist/components/steps/SuccessPage.d.ts +2 -0
- package/dist/components/steps/TimePage.d.ts +2 -0
- package/dist/components/steps/index.d.ts +2 -0
- package/dist/index.cjs +39 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19232 -0
- package/dist/styles.css +3850 -0
- package/package.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 nareshgargorionik
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# @aaravpos/appointment-barber-booking
|
|
2
|
+
|
|
3
|
+
React plugin for embedding the Aarav POS appointment booking system into your application.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Installation
|
|
8
|
+
|
|
9
|
+
Using npm:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @aaravpos/appointment-barber-booking
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Using yarn:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @aaravpos/appointment-barber-booking
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Usage
|
|
24
|
+
|
|
25
|
+
Import the plugin into your React application.
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
import { AppointmentBookingPlugin } from "@aaravpos/appointment-barber-booking";
|
|
29
|
+
|
|
30
|
+
function App() {
|
|
31
|
+
return (
|
|
32
|
+
<AppointmentBookingPlugin bookingCode={"QK9E2A"} />
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default App;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Props
|
|
42
|
+
|
|
43
|
+
| Prop Name | Type | Required | Description |
|
|
44
|
+
| ------------ | ------ | -------- | ------------------------------------ |
|
|
45
|
+
| bookingCode | string | Yes | Unique booking code for appointment booking |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# Example
|
|
50
|
+
|
|
51
|
+
```jsx
|
|
52
|
+
import React from "react";
|
|
53
|
+
import { AppointmentBookingPlugin } from "@aaravpos/appointment-booking-plugin";
|
|
54
|
+
|
|
55
|
+
const App = () => {
|
|
56
|
+
return (
|
|
57
|
+
<div>
|
|
58
|
+
<AppointmentBookingPlugin bookingCode={"QK9E2A"} />
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default App;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
# Requirements
|
|
69
|
+
|
|
70
|
+
- React 18+
|
|
71
|
+
- Node.js 16+
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# Features
|
|
76
|
+
|
|
77
|
+
- Easy integration
|
|
78
|
+
- Lightweight plugin
|
|
79
|
+
- Responsive booking UI
|
|
80
|
+
- Secure booking flow
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
# Publish Package
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm publish --access public
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
# License
|
|
93
|
+
|
|
94
|
+
MIT License
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
# Support
|
|
99
|
+
|
|
100
|
+
For support and issues, contact the Aarav POS team.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Breadcrumb(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Outlet } from '../../types';
|
|
2
|
+
interface OutletProps {
|
|
3
|
+
outlets: Outlet[];
|
|
4
|
+
onSelectOutlet: (outlet: Outlet) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function ChooseYourOutlet({ outlets, onSelectOutlet, }: OutletProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type PaymentFormValues = {
|
|
2
|
+
name: string;
|
|
3
|
+
number: string;
|
|
4
|
+
expiry: string;
|
|
5
|
+
cvv: string;
|
|
6
|
+
};
|
|
7
|
+
type PaymentPayload = PaymentFormValues;
|
|
8
|
+
type PaymentModalProps = {
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onPay: (payload: PaymentPayload) => Promise<boolean>;
|
|
11
|
+
amount?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const formatCardNumber: (value: string) => string;
|
|
14
|
+
export declare const formatExpiry: (value: string) => string;
|
|
15
|
+
export declare const formatCVV: (value: string) => string;
|
|
16
|
+
export default function PaymentModal({ onClose, onPay, amount, }: PaymentModalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { Step } from '../../types';
|
|
3
|
+
interface SidebarProps {
|
|
4
|
+
goToStep?: (step: Step) => void;
|
|
5
|
+
buttonText?: string;
|
|
6
|
+
onButtonClick?: () => void;
|
|
7
|
+
showTaxesOnlyIfTime?: boolean;
|
|
8
|
+
showTip?: boolean;
|
|
9
|
+
tipPct?: number;
|
|
10
|
+
onTipChange?: (tip: number) => void;
|
|
11
|
+
consentRequired?: boolean;
|
|
12
|
+
consentCompleted?: number;
|
|
13
|
+
totalConsents?: number;
|
|
14
|
+
checkingConsent?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
isBookingDisabled?: boolean;
|
|
17
|
+
handleSidebarOpen?: () => void;
|
|
18
|
+
showFooterButton?: boolean;
|
|
19
|
+
showBookingSection?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export default function Sidebar({ goToStep, buttonText, onButtonClick, showTaxesOnlyIfTime, showTip, tipPct, onTipChange, consentRequired, consentCompleted, totalConsents, checkingConsent, loading, isBookingDisabled, handleSidebarOpen, showFooterButton, showBookingSection, }: SidebarProps): JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ProfessionalServicePage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ServiceProfessionalPage(): import("react/jsx-runtime").JSX.Element;
|