@busha/commerce-js 1.0.0 → 1.0.1
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 +3 -2
- package/rollup.config.ts +1 -1
- package/dist/constants/colors.d.ts +0 -1
- package/dist/constants/icons.d.ts +0 -1
- package/dist/constants/variables.d.ts +0 -8
- package/dist/dist/constants/colors.d.ts +0 -1
- package/dist/dist/constants/icons.d.ts +0 -1
- package/dist/dist/constants/variables.d.ts +0 -8
- package/dist/dist/helper.d.ts +0 -21
- package/dist/dist/index.d.ts +0 -2
- package/dist/dist/types.d.ts +0 -18
- package/dist/helper.d.ts +0 -21
package/package.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rollup -c rollup.config.ts --configPlugin typescript",
|
|
14
|
-
"start": "rollup -w -c rollup.config.ts --configPlugin typescript"
|
|
14
|
+
"start": "rollup -w -c rollup.config.ts --configPlugin typescript",
|
|
15
|
+
"dist:cleanup": "rm -rf dist/constants dist/helper.d.ts"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"dotenv": "^16.0.3",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
},
|
|
21
22
|
"name": "@busha/commerce-js",
|
|
22
23
|
"description": "Busha commerce js library",
|
|
23
|
-
"version": "1.0.
|
|
24
|
+
"version": "1.0.1",
|
|
24
25
|
"main": "./dist/index.js",
|
|
25
26
|
"types": "./dist/index.d.ts",
|
|
26
27
|
"directories": {
|
package/rollup.config.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dark = "#000639";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const close = "<svg width=\"40\" height=\"41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 10.5C0 4.977 4.477.5 10 .5h20c5.523 0 10 4.477 10 10v20c0 5.523-4.477 10-10 10H10c-5.523 0-10-4.477-10-10v-20Z\" fill=\"#F1F1F1\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M25.927 15.78a.75.75 0 1 0-1.06-1.06l-4.793 4.793-4.793-4.793a.75.75 0 0 0-1.061 1.06l4.793 4.793-4.793 4.793a.75.75 0 1 0 1.06 1.061l4.794-4.793 4.793 4.793a.75.75 0 0 0 1.06-1.06l-4.793-4.794 4.793-4.793Z\" fill=\"#000639\"/></svg>";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const CONTAINER_ID = "busha-commerce-container";
|
|
2
|
-
export declare const LOADER_ID = "busha-commerce-loader";
|
|
3
|
-
export declare const STYLESHEET_ID = "busha-commerce-styles";
|
|
4
|
-
export declare const CLOSE_BUTTON_ID = "busha-commerce-close-btn";
|
|
5
|
-
export declare const PAY_UI: string | undefined;
|
|
6
|
-
export declare const INITIALIZED_STATUS = "INITIALIZED";
|
|
7
|
-
export declare const CANCELLED_STATUS = "CANCELLED";
|
|
8
|
-
export declare const COMPLETED_STATUS = "COMPLETED";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dark = "#000639";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const close = "<svg width=\"40\" height=\"41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 10.5C0 4.977 4.477.5 10 .5h20c5.523 0 10 4.477 10 10v20c0 5.523-4.477 10-10 10H10c-5.523 0-10-4.477-10-10v-20Z\" fill=\"#F1F1F1\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M25.927 15.78a.75.75 0 1 0-1.06-1.06l-4.793 4.793-4.793-4.793a.75.75 0 0 0-1.061 1.06l4.793 4.793-4.793 4.793a.75.75 0 1 0 1.06 1.061l4.794-4.793 4.793 4.793a.75.75 0 0 0 1.06-1.06l-4.793-4.794 4.793-4.793Z\" fill=\"#000639\"/></svg>";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const CONTAINER_ID = "busha-commerce-container";
|
|
2
|
-
export declare const LOADER_ID = "busha-commerce-loader";
|
|
3
|
-
export declare const STYLESHEET_ID = "busha-commerce-styles";
|
|
4
|
-
export declare const CLOSE_BUTTON_ID = "busha-commerce-close-btn";
|
|
5
|
-
export declare const PAY_UI: string | undefined;
|
|
6
|
-
export declare const INITIALIZED_STATUS = "INITIALIZED";
|
|
7
|
-
export declare const CANCELLED_STATUS = "CANCELLED";
|
|
8
|
-
export declare const COMPLETED_STATUS = "COMPLETED";
|
package/dist/dist/helper.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BushaCommercePayload } from "./types";
|
|
2
|
-
export declare function injectGlobalStyles(): void;
|
|
3
|
-
export declare function validatePayload(p: BushaCommercePayload): {
|
|
4
|
-
callback_url?: string | undefined;
|
|
5
|
-
mode?: string | undefined;
|
|
6
|
-
meta: {
|
|
7
|
-
email: string;
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
local_amount: number;
|
|
11
|
-
local_currency: string;
|
|
12
|
-
business_id: string;
|
|
13
|
-
reference: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function createContainerEl(): HTMLDivElement;
|
|
16
|
-
export declare function createCloseBtnEl(): HTMLButtonElement;
|
|
17
|
-
export declare function createSpinnerEl(): HTMLDivElement;
|
|
18
|
-
export declare function createIframeEl(): HTMLIFrameElement;
|
|
19
|
-
type FormPayload = Omit<BushaCommercePayload, "onClose" | "onSuccess">;
|
|
20
|
-
export declare function createFormEl(payload: FormPayload): HTMLFormElement;
|
|
21
|
-
export {};
|
package/dist/dist/index.d.ts
DELETED
package/dist/dist/types.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type MessageType = {
|
|
2
|
-
status: string;
|
|
3
|
-
data?: any;
|
|
4
|
-
};
|
|
5
|
-
export interface BushaCommercePayload {
|
|
6
|
-
local_amount: number;
|
|
7
|
-
local_currency: string;
|
|
8
|
-
meta?: {
|
|
9
|
-
email?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
};
|
|
12
|
-
business_id: string;
|
|
13
|
-
reference: string;
|
|
14
|
-
callback_url: string;
|
|
15
|
-
mode?: "test" | "live";
|
|
16
|
-
onClose?: (d?: any) => void;
|
|
17
|
-
onSuccess: (d?: any) => void;
|
|
18
|
-
}
|
package/dist/helper.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BushaCommercePayload } from "./types";
|
|
2
|
-
export declare function injectGlobalStyles(): void;
|
|
3
|
-
export declare function validatePayload(p: BushaCommercePayload): {
|
|
4
|
-
callback_url?: string | undefined;
|
|
5
|
-
mode?: string | undefined;
|
|
6
|
-
meta: {
|
|
7
|
-
email: string;
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
local_amount: number;
|
|
11
|
-
local_currency: string;
|
|
12
|
-
business_id: string;
|
|
13
|
-
reference: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function createContainerEl(): HTMLDivElement;
|
|
16
|
-
export declare function createCloseBtnEl(): HTMLButtonElement;
|
|
17
|
-
export declare function createSpinnerEl(): HTMLDivElement;
|
|
18
|
-
export declare function createIframeEl(): HTMLIFrameElement;
|
|
19
|
-
type FormPayload = Omit<BushaCommercePayload, "onClose" | "onSuccess">;
|
|
20
|
-
export declare function createFormEl(payload: FormPayload): HTMLFormElement;
|
|
21
|
-
export {};
|