@recras/online-booking-js 2.0.9 → 2.1.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/.github/workflows/npmpublish.yml +2 -2
- package/.jshintrc +1 -1
- package/README.md +11 -11
- package/changelog.md +3 -0
- package/dist/onlinebooking.js +243 -778
- package/dist/onlinebooking.min.js +1 -1
- package/package.json +13 -13
- package/src/booking.js +1 -1
- package/src/contactForm.js +4 -0
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
- uses: actions/checkout@v3
|
|
12
12
|
- uses: actions/setup-node@v3
|
|
13
13
|
with:
|
|
14
|
-
node-version:
|
|
14
|
+
node-version: 24
|
|
15
15
|
- run: npm ci
|
|
16
16
|
- run: npm test
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
- uses: actions/checkout@v3
|
|
23
23
|
- uses: actions/setup-node@v3
|
|
24
24
|
with:
|
|
25
|
-
node-version:
|
|
25
|
+
node-version: 24
|
|
26
26
|
registry-url: https://registry.npmjs.org/
|
|
27
27
|
- run: npm ci
|
|
28
28
|
- run: npm run build
|
package/.jshintrc
CHANGED
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
# Recras Integration Library
|
|
2
|
+
Version: 2.1.0
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
JS library for easy online booking, contact form, and voucher integration
|
|
4
|
+
## To start
|
|
5
|
+
**Note:** This library has been deprecated in favour of integrating book processes. You can still use it, but there not be any feature updates. Other updates are unlikely. Usage of this library may not work for every Recras instance.
|
|
7
6
|
|
|
7
|
+
This JavaScript library allows for easy integration of online booking of packages, contact forms, and selling product vouchers. You **cannot** use this library to integrate book processes or for selling credit vouchers.
|
|
8
8
|
|
|
9
9
|
## Getting started
|
|
10
|
-
### Online booking
|
|
10
|
+
### Online booking of packages
|
|
11
11
|
In your HTML document,
|
|
12
12
|
1. include the `dist/onlinebooking.js` script
|
|
13
13
|
1. add an element where you want the integration to appear
|
|
14
|
-
1. give the element a unique ID, i.e. `<
|
|
14
|
+
1. give the element a unique ID, i.e. `<div id="recras-onlinebooking"></div>`
|
|
15
15
|
1. initialize the script like this:
|
|
16
16
|
```
|
|
17
|
-
|
|
17
|
+
const options = new RecrasOptions({
|
|
18
18
|
recras_hostname: 'demo.recras.nl', // Required
|
|
19
19
|
element: document.getElementById('recras-onlinebooking'), // Required
|
|
20
20
|
});
|
|
@@ -28,7 +28,7 @@ In your HTML document,
|
|
|
28
28
|
1. give the element a unique ID, i.e. `<div id="recras-vouchers"></div>`
|
|
29
29
|
1. initialize the script like this:
|
|
30
30
|
```
|
|
31
|
-
|
|
31
|
+
const options = new RecrasOptions({
|
|
32
32
|
recras_hostname: 'demo.recras.nl', // Required
|
|
33
33
|
element: document.getElementById('recras-vouchers'), // Required
|
|
34
34
|
});
|
|
@@ -43,12 +43,12 @@ In your HTML document,
|
|
|
43
43
|
1. give the element a unique ID, i.e. `<div id="recras-contactform"></div>`
|
|
44
44
|
1. initialize the script like this:
|
|
45
45
|
```
|
|
46
|
-
|
|
46
|
+
const options = new RecrasOptions({
|
|
47
47
|
recras_hostname: 'demo.recras.nl', // Required
|
|
48
48
|
element: document.getElementById('recras-contactform'), // Required
|
|
49
49
|
form_id: 4, // Required
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
const form = new RecrasContactForm(options);
|
|
52
52
|
form.showForm();
|
|
53
53
|
```
|
|
54
54
|
See the section Options below for an overview of all options
|