xendit-components-web 0.0.20 → 0.0.22
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/CHANGELOG.md +13 -3
- package/README.md +23 -2
- package/package.json +2 -1
- package/sdk/dist/cjs/index.cjs +1 -1
- package/sdk/dist/cjs/index.cjs.map +1 -1
- package/sdk/dist/cjs/test-data.cjs +1 -1
- package/sdk/dist/cjs/test-data.cjs.map +1 -1
- package/sdk/dist/esm-bundled/index.mjs +2 -2
- package/sdk/dist/esm-bundled/index.mjs.map +1 -1
- package/sdk/dist/esm-bundled/test-data.mjs +1 -1
- package/sdk/dist/esm-bundled/test-data.mjs.map +1 -1
- package/sdk/dist/esm-external/index.mjs +1 -1
- package/sdk/dist/esm-external/index.mjs.map +1 -1
- package/sdk/dist/esm-external/test-data.mjs +1 -1
- package/sdk/dist/esm-external/test-data.mjs.map +1 -1
- package/sdk/dist/index.d.ts +26 -11
- package/sdk/dist/index.umd.js +2 -2
- package/sdk/dist/index.umd.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 0.0.22
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Notable
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Added custom branded layouts for some QR channels.
|
|
6
|
+
|
|
7
|
+
### Bug fixes
|
|
8
|
+
|
|
9
|
+
# 0.0.21
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- Fixed missing card brand icons in card input
|
|
14
|
+
|
|
15
|
+
# 0.0.20
|
|
6
16
|
|
|
7
17
|
### Bug Fixes
|
|
8
18
|
|
package/README.md
CHANGED
|
@@ -19,10 +19,10 @@ npm install xendit-components-web --save
|
|
|
19
19
|
Or load it directly from our CDN:
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<script src="https://assets.xendit.co/components/v0.0.
|
|
22
|
+
<script src="https://assets.xendit.co/components/v0.0.22/index.umd.js"></script>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Our npm package includes TypeScript types. You also download the [.d.ts file](https://assets.xendit.co/components/v0.0.
|
|
25
|
+
Our npm package includes TypeScript types. You also download the [.d.ts file](https://assets.xendit.co/components/v0.0.22/index.d.ts) directly.
|
|
26
26
|
|
|
27
27
|
## Sessions
|
|
28
28
|
|
|
@@ -408,3 +408,24 @@ You can customize the appearance of the button using the options parameter of `c
|
|
|
408
408
|
|
|
409
409
|
To use Google Pay, you must adhere to the Google Pay and Wallet API's [Acceptable Use Policy](https://payments.developers.google.com/terms/aup) and accept the terms defined in the [Google Pay API Terms of Service](https://payments.developers.google.com/terms/sellertos). Additionally, please ensure you follow the [Google Pay brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines).
|
|
410
410
|
-->
|
|
411
|
+
|
|
412
|
+
## Troubleshooting
|
|
413
|
+
|
|
414
|
+
### Usage with React Strict Mode
|
|
415
|
+
|
|
416
|
+
Since React 18, Strict Mode will perform mount/unmount checks during development. This means React intentionally unmounts and remounts every component on its initial mount.
|
|
417
|
+
|
|
418
|
+
If you instantiate XenditComponents and add a listener for the `init` event in a side effect, this can cause a race condition where the event fires for the last instance before the first instance finishes mounting. Hence, you should remember to remove the `init` event listener in the effect cleanup function when Strict Mode is on.
|
|
419
|
+
|
|
420
|
+
```typescript
|
|
421
|
+
useEffect(() => {
|
|
422
|
+
// ...
|
|
423
|
+
const handleInit = () => {
|
|
424
|
+
// ...
|
|
425
|
+
};
|
|
426
|
+
components.addEventListener("init", handleInit);
|
|
427
|
+
return () => {
|
|
428
|
+
components.removeEventListener("init", handleInit);
|
|
429
|
+
};
|
|
430
|
+
}, []);
|
|
431
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xendit-components-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "Xendit frontend payment components SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Xendit",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"card-validator": "^10.0.4",
|
|
58
58
|
"classnames": "^2.5.1",
|
|
59
|
+
"jsbarcode": "^3.12.3",
|
|
59
60
|
"libphonenumber-js": "^1.12.41",
|
|
60
61
|
"preact": "^10.29.0",
|
|
61
62
|
"qrcode": "^1.5.4",
|