@koomipay/react 2.1.0 → 2.1.2

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.
Files changed (29) hide show
  1. package/README.md +300 -115
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/types/components/ApplePayComponent.d.ts +12 -8
  4. package/dist/cjs/types/components/CardComponent.d.ts +24 -5
  5. package/dist/cjs/types/components/GooglePayComponent.d.ts +13 -19
  6. package/dist/cjs/types/components/POSComponent.d.ts +1 -1
  7. package/dist/cjs/types/components/QrPayComponent.d.ts +22 -9
  8. package/dist/cjs/types/components/RedirectPayComponent.d.ts +19 -0
  9. package/dist/cjs/types/components/RedirectShopperInIframe.d.ts +6 -0
  10. package/dist/cjs/types/index.d.ts +8 -2
  11. package/dist/cjs/types/lib/client.d.ts +57 -14
  12. package/dist/cjs/types/utils/format.d.ts +4 -0
  13. package/dist/es/index.js +1 -1
  14. package/dist/es/types/components/ApplePayComponent.d.ts +12 -8
  15. package/dist/es/types/components/CardComponent.d.ts +24 -5
  16. package/dist/es/types/components/GooglePayComponent.d.ts +13 -19
  17. package/dist/es/types/components/POSComponent.d.ts +1 -1
  18. package/dist/es/types/components/QrPayComponent.d.ts +22 -9
  19. package/dist/es/types/components/RedirectPayComponent.d.ts +19 -0
  20. package/dist/es/types/components/RedirectShopperInIframe.d.ts +6 -0
  21. package/dist/es/types/index.d.ts +8 -2
  22. package/dist/es/types/lib/client.d.ts +57 -14
  23. package/dist/es/types/utils/format.d.ts +4 -0
  24. package/dist/koomipay.css +1 -1
  25. package/package.json +12 -9
  26. package/dist/cjs/types/components/CheckoutContainer.d.ts +0 -38
  27. package/dist/cjs/types/components/GrabPayComponent.d.ts +0 -9
  28. package/dist/es/types/components/CheckoutContainer.d.ts +0 -38
  29. package/dist/es/types/components/GrabPayComponent.d.ts +0 -9
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "payments",
10
10
  "components"
11
11
  ],
12
- "version": "2.1.0",
12
+ "version": "2.1.2",
13
13
  "description": "Koomipay react components",
14
14
  "main": "dist/cjs/index.js",
15
15
  "module": "dist/es/index.js",
@@ -48,7 +48,6 @@
48
48
  "@tailwindcss/typography": "^0.5.7",
49
49
  "@tsconfig/recommended": "^1.0.1",
50
50
  "@types/node": "^18.11.10",
51
- "@types/react": "^18.0.25",
52
51
  "autoprefixer": "^10.4.13",
53
52
  "chokidar": "^3.5.3",
54
53
  "concurrently": "^7.6.0",
@@ -60,17 +59,21 @@
60
59
  "tailwindcss": "^3.2.4",
61
60
  "tsconfig-paths": "^4.1.1",
62
61
  "typescript": "^4.9.3",
63
- "uglify-js": "^3.17.4"
64
- },
65
- "dependencies": {
66
- "@adyen/adyen-web": "^6.13.1",
67
- "axios": "^1.2.0",
62
+ "uglify-js": "^3.17.4",
68
63
  "react": "^18.2.0",
64
+ "react-dom": "^18.2.0",
65
+ "@types/react": "^18.2.0",
66
+ "@types/react-dom": "^18.2.0",
67
+ "tslib": "^2.4.1",
69
68
  "rollup-plugin-svg-import": "^1.6.0",
70
- "tslib": "^2.4.1"
69
+ "axios": "^1.2.0"
70
+ },
71
+ "dependencies": {
72
+ "@adyen/adyen-web": "^6.13.1"
71
73
  },
72
74
  "peerDependencies": {
73
75
  "axios": "^1.2.0",
74
- "react": "^18.2.0"
76
+ "react": "^18.2.0",
77
+ "react-dom": "^18.2.0"
75
78
  }
76
79
  }
@@ -1,38 +0,0 @@
1
- import { KoomiPayClient, CheckoutAmount } from "../lib/client";
2
- export type KoomiPaymentMethod = {
3
- type: string;
4
- name: string;
5
- [key: string]: any;
6
- };
7
- export type QrOptions = {
8
- qrCodeSize: "small" | "medium" | "large";
9
- };
10
- export type DefaultPaymentMethodComponentProps = {
11
- client?: KoomiPayClient;
12
- amount?: CheckoutAmount;
13
- onValid?: (isValid: boolean) => void;
14
- onChange?: (args: any) => void;
15
- onComplete?: (success: boolean, error?: any) => void;
16
- onAuthorise?: (state: any) => void;
17
- countryCode?: string;
18
- paymentMethod: KoomiPaymentMethod | null;
19
- };
20
- export type CheckoutContainerProps = DefaultPaymentMethodComponentProps & {
21
- paymentMethod?: KoomiPaymentMethod | null;
22
- qrOptions?: QrOptions | null;
23
- loadingContext?: string;
24
- actionData?: any;
25
- };
26
- export declare function CheckoutContainer({ client, paymentMethod, amount, onValid, onChange, onAuthorise, countryCode, onComplete, qrOptions, loadingContext, actionData, }: CheckoutContainerProps): import("react/jsx-runtime").JSX.Element;
27
- export declare namespace CheckoutContainer {
28
- var defaultProps: {
29
- onValid: () => boolean;
30
- onChange: () => void;
31
- onComplete: () => void;
32
- onAuthorise: () => void;
33
- onsubmit: () => void;
34
- qrOptions: {
35
- size: string;
36
- };
37
- };
38
- }
@@ -1,9 +0,0 @@
1
- import { DefaultPaymentMethodComponentProps } from "./CheckoutContainer";
2
- export type GrabPayMethodPayload = {
3
- type: string;
4
- [key: string]: any;
5
- };
6
- export type GrabPayComponentProps = DefaultPaymentMethodComponentProps & {
7
- onChange: (args: GrabPayMethodPayload) => void;
8
- };
9
- export default function GrabPayComponent({ paymentMethod, onValid, onChange }: GrabPayComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,38 +0,0 @@
1
- import { KoomiPayClient, CheckoutAmount } from "../lib/client";
2
- export type KoomiPaymentMethod = {
3
- type: string;
4
- name: string;
5
- [key: string]: any;
6
- };
7
- export type QrOptions = {
8
- qrCodeSize: "small" | "medium" | "large";
9
- };
10
- export type DefaultPaymentMethodComponentProps = {
11
- client?: KoomiPayClient;
12
- amount?: CheckoutAmount;
13
- onValid?: (isValid: boolean) => void;
14
- onChange?: (args: any) => void;
15
- onComplete?: (success: boolean, error?: any) => void;
16
- onAuthorise?: (state: any) => void;
17
- countryCode?: string;
18
- paymentMethod: KoomiPaymentMethod | null;
19
- };
20
- export type CheckoutContainerProps = DefaultPaymentMethodComponentProps & {
21
- paymentMethod?: KoomiPaymentMethod | null;
22
- qrOptions?: QrOptions | null;
23
- loadingContext?: string;
24
- actionData?: any;
25
- };
26
- export declare function CheckoutContainer({ client, paymentMethod, amount, onValid, onChange, onAuthorise, countryCode, onComplete, qrOptions, loadingContext, actionData, }: CheckoutContainerProps): import("react/jsx-runtime").JSX.Element;
27
- export declare namespace CheckoutContainer {
28
- var defaultProps: {
29
- onValid: () => boolean;
30
- onChange: () => void;
31
- onComplete: () => void;
32
- onAuthorise: () => void;
33
- onsubmit: () => void;
34
- qrOptions: {
35
- size: string;
36
- };
37
- };
38
- }
@@ -1,9 +0,0 @@
1
- import { DefaultPaymentMethodComponentProps } from "./CheckoutContainer";
2
- export type GrabPayMethodPayload = {
3
- type: string;
4
- [key: string]: any;
5
- };
6
- export type GrabPayComponentProps = DefaultPaymentMethodComponentProps & {
7
- onChange: (args: GrabPayMethodPayload) => void;
8
- };
9
- export default function GrabPayComponent({ paymentMethod, onValid, onChange }: GrabPayComponentProps): import("react/jsx-runtime").JSX.Element;