@vacayou/tripfusion-js-sdk 1.3.0 → 1.4.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/README.md +3 -4
- package/dist/index.html +2 -17
- package/dist/main.js +2 -1359
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -19,11 +19,10 @@ The booking widget can be controlled both via JavaScript function calls and via
|
|
|
19
19
|
To display the widget, you need to add the `book` function as an event handler, for example:
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<button onClick="book({config
|
|
22
|
+
<button onClick="book({...config})">Book Now</button>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
The widget configuration is done using the optional parameters
|
|
26
|
-
|
|
25
|
+
The widget configuration is done using the optional [parameters](#configuration-options).
|
|
27
26
|
To hide the widget, you need to call the `closeWidget()` function.
|
|
28
27
|
|
|
29
28
|
**Using the widget with HTML links**
|
|
@@ -33,7 +32,7 @@ To trigger the booking widget, simply add the following parameters to any HTML l
|
|
|
33
32
|
https://<link>/?tripfusion=true[&options=...]
|
|
34
33
|
```
|
|
35
34
|
|
|
36
|
-
The widget configuration is done by passing additional parameters in the link (parameter names are the same as those used when calling the JS `book()` function,
|
|
35
|
+
The widget configuration is done by passing additional [parameters](#configuration-options) in the link (parameter names are the same as those used when calling the JS `book()` function, all parameters should be separated by `&` symbol), for example:
|
|
37
36
|
|
|
38
37
|
- Standard booking:
|
|
39
38
|
|
package/dist/index.html
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<script id="tripfusion-sdk" src="main.js?client=yo1&propertyId=105"></script>
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<script>
|
|
9
|
-
window.addEventListener("load", function () {
|
|
1
|
+
<!doctype html><html><head><script id="tripfusion-sdk" src="main.js?client=yo1&propertyId=105"></script><meta name="viewport" content="width=device-width,initial-scale=1"></head><body><script>window.addEventListener("load", function () {
|
|
10
2
|
var demoLink = document.createElement("a");
|
|
11
3
|
demoLink.href =
|
|
12
4
|
"?tripfusion=true&offerId=76";
|
|
@@ -39,11 +31,4 @@
|
|
|
39
31
|
demoLink.innerHTML = "Append items to existing booking";
|
|
40
32
|
document.body.appendChild(demoLink);
|
|
41
33
|
document.body.appendChild(document.createElement("br"));
|
|
42
|
-
})
|
|
43
|
-
</script>
|
|
44
|
-
<h1>Tripfusion JS SDK Demo</h1>
|
|
45
|
-
<h3>JS handler</h3>
|
|
46
|
-
<button onClick="book()">Book Now</button><br />
|
|
47
|
-
<h3>Link handlers with different options</h3>
|
|
48
|
-
</body>
|
|
49
|
-
</html>
|
|
34
|
+
});</script><h1>Tripfusion JS SDK Demo</h1><h3>JS handler</h3><button onclick="book()">Book Now</button><br/><h3>Link handlers with different options</h3></body></html>
|