@duffel/components 3.1.3--prototype.12 → 3.1.3--prototype.13
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/package.json +4 -4
- package/README.md +0 -68
- /package/{react-dist/custom-elements.js → custom-elements.js} +0 -0
- /package/{react-dist/custom-elements.js.map → custom-elements.js.map} +0 -0
- /package/{react-dist/index.d.ts → index.d.ts} +0 -0
- /package/{react-dist/index.js → index.js} +0 -0
- /package/{react-dist/index.js.map → index.js.map} +0 -0
- /package/{react-dist/index.tsbuildinfo → index.tsbuildinfo} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duffel/components",
|
|
3
|
-
"version": "3.1.3--prototype.
|
|
3
|
+
"version": "3.1.3--prototype.13",
|
|
4
4
|
"description": "Component library to build your travel product with Duffel.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Duffel",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"exports": {
|
|
30
|
-
".": "./
|
|
31
|
-
"./custom-elements": "./
|
|
30
|
+
".": "./index.js",
|
|
31
|
+
"./custom-elements": "./custom-elements.js"
|
|
32
32
|
},
|
|
33
|
-
"main": "
|
|
33
|
+
"main": "./index.js",
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build-and-publish": "bash ./scripts/build-and-publish.sh",
|
|
36
36
|
"build-storybook": "storybook build",
|
package/README.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# @duffel/components
|
|
2
|
-
|
|
3
|
-
This package is a component library to help you build your travel product using the [Duffel API](https://duffel.com/docs).
|
|
4
|
-
|
|
5
|
-
## Get started
|
|
6
|
-
|
|
7
|
-
### Installing
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
yarn add @duffel/components
|
|
11
|
-
# -- or --
|
|
12
|
-
npm i @duffel/components
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### (alternative) Load from CDN:
|
|
16
|
-
|
|
17
|
-
```html
|
|
18
|
-
<script src="https://assets.duffel.com/components/VERSION/duffel-ancillaries.js"></script>
|
|
19
|
-
<script src="https://assets.duffel.com/components/VERSION/duffel-payments.js"></script>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## How do I integrate this into my website?
|
|
23
|
-
|
|
24
|
-
1. Please start by reading our integration guide on https://duffel.com/docs/guides/ancillaries-component
|
|
25
|
-
|
|
26
|
-
## Integration examples
|
|
27
|
-
|
|
28
|
-
1. **client-side** | This example loads a local version of the components using a `script` tag. It uses a fixture for the offer and seat maps.
|
|
29
|
-
|
|
30
|
-
- [Find it on src/examples/client-side](src/examples/client-side)
|
|
31
|
-
|
|
32
|
-
2. **full-stack** | This example loads a local version of the components using a `script` tag. It will search and retrieve an offer from the Duffel API and render the ancillaries component custom element with its `offer_id` and `client_key`. As soon as a service modal is closed it will create a test order with the given payload.
|
|
33
|
-
|
|
34
|
-
- [Find it on src/examples/full-stack](src/examples/full-stack)
|
|
35
|
-
|
|
36
|
-
3. **just-typescript** | This example imports a local version of `@duffel/components` and renders the custom element with an offer fixture once the page loads.
|
|
37
|
-
|
|
38
|
-
- [Find it on src/examples/just-typescript](src/examples/just-typescript)
|
|
39
|
-
|
|
40
|
-
4. **react-app** | This example imports a local version of `@duffel/components` and renders the a react element with an offer fixture.
|
|
41
|
-
|
|
42
|
-
- [Find it on src/examples/react-app](src/examples/react-app)
|
|
43
|
-
|
|
44
|
-
5. **payments-custom-element** | This example demonstrates the use of the payments component loaded through a script tag
|
|
45
|
-
|
|
46
|
-
- [Find it on src/examples/payments-custom-element](src/examples/payments-custom-element)
|
|
47
|
-
|
|
48
|
-
6. **payments-just-typescript** | This example imports a local version of `@duffel/components` and renders the payments custom element with a fixture of the payment intent.
|
|
49
|
-
|
|
50
|
-
- [Find it on src/examples/payments-just-typescript](src/examples/payments-just-typescript)
|
|
51
|
-
|
|
52
|
-
7. **next** | This example imports and renders `@duffel/components` into a `next.js` project.
|
|
53
|
-
|
|
54
|
-
- [Find it on src/examples/payments-just-typescript](src/examples/next)
|
|
55
|
-
|
|
56
|
-
## What components are available?
|
|
57
|
-
|
|
58
|
-
### Ancillaries component
|
|
59
|
-
|
|
60
|
-
The ancillaries component allows your customers to add ancillaries to their order. It's simple to add to your website and can be customised to fit your brand. This component is avaiable through npm and our cdn.
|
|
61
|
-
|
|
62
|
-
- [Find live demo on codesandbox.io ↗](https://codesandbox.io/s/duffel-ancillaries-example-1nxuu7)
|
|
63
|
-
|
|
64
|
-
### Payments component
|
|
65
|
-
|
|
66
|
-
The payments component provides a [PCI-compliant](https://help.duffel.com/hc/en-gb/articles/4409049543058) way for you to collect card payments for online bookings from your customers. To learn more about how to work with Duffel payments please visit the [Collecting customer card payments guide](https://duffel.com/docs/guides/collecting-customer-card-payments).
|
|
67
|
-
|
|
68
|
-
#### more coming soon...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|