@bootpay/client-js 5.0.0-beta.3 → 5.0.0-beta.30
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 +14 -1
- package/dist/index.es.js +7073 -0
- package/dist/index.umd.js +2 -0
- package/dist/package.json.d.ts +55 -0
- package/dist/src/bootpay-es5.d.ts +2 -0
- package/{bootpay-widget.d.ts → dist/src/bootpay-widget.d.ts} +7 -3
- package/{bootpay.d.ts → dist/src/bootpay.d.ts} +1 -2
- package/dist/src/index.d.ts +77 -0
- package/{lib → dist/src/lib}/bootpay-widget.d.ts +14 -1
- package/{lib → dist/src/lib}/bootpay.d.ts +1 -1
- package/{lib → dist/src/lib}/event/payment.d.ts +1 -2
- package/dist/src/lib/template/modal.d.ts +16 -0
- package/{lib → dist/src/lib}/template/payment.d.ts +3 -4
- package/{lib → dist/src/lib}/template/widget.d.ts +6 -1
- package/{models → dist/src/models}/bootpay-interface.d.ts +10 -0
- package/{models → dist/src/models}/bootpay-widget-interface.d.ts +15 -2
- package/{support → dist/src/support}/alfred-progress/index.d.ts +0 -1
- package/{support → dist/src/support}/environment.d.ts +1 -0
- package/{support/logger.d.ts → dist/src/support/event-logger.d.ts} +2 -23
- package/dist/src/support/logger.d.ts +21 -0
- package/{support → dist/src/support}/storage.d.ts +1 -0
- package/{support → dist/src/support}/widget-store.d.ts +7 -1
- package/dist/vite.config.d.ts +2 -0
- package/package.json +10 -5
- package/tsconfig.json +37 -0
- package/tsconfig.json.esnext +42 -0
- package/vite.config.ts +27 -0
- package/bootpay-environment.js +0 -1
- package/bootpay-sdk.js +0 -2
- package/bootpay-sdk.js.LICENSE.txt +0 -1
- package/bootpay-widget.js +0 -2
- package/bootpay-widget.js.LICENSE.txt +0 -1
- package/bootpay.js +0 -2
- package/bootpay.js.LICENSE.txt +0 -1
- package/dist/bootpay.d.ts +0 -2
- package/index.d.ts +0 -6
- package/index.js +0 -8
- /package/{bootpay-environment.d.ts → dist/src/bootpay-environment.d.ts} +0 -0
- /package/{bootpay-sdk.d.ts → dist/src/bootpay-sdk.d.ts} +0 -0
- /package/{lib → dist/src/lib}/analytics.d.ts +0 -0
- /package/{lib → dist/src/lib}/event/polling.d.ts +0 -0
- /package/{lib → dist/src/lib}/event/user-token.d.ts +0 -0
- /package/{lib → dist/src/lib}/event/widget.d.ts +0 -0
- /package/{lib → dist/src/lib}/locale/message.d.ts +0 -0
- /package/{lib → dist/src/lib}/template/oopay.d.ts +0 -0
- /package/{lib → dist/src/lib}/template/user-token.d.ts +0 -0
- /package/{models → dist/src/models}/bootpay-sdk-interface.d.ts +0 -0
- /package/{models → dist/src/models}/const.d.ts +0 -0
- /package/{support → dist/src/support}/bootpay-manager.d.ts +0 -0
- /package/{support → dist/src/support}/event.d.ts +0 -0
- /package/{support → dist/src/support}/resource.d.ts +0 -0
- /package/{support → dist/src/support}/template-manager.d.ts +0 -0
- /package/{support → dist/src/support}/util.d.ts +0 -0
- /package/{test → dist/src/test}/index.d.ts +0 -0
- /package/{test → dist/src/test}/moduleRequire.d.ts +0 -0
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { Resource } from
|
|
2
|
-
import { SessionStorageManager } from
|
|
3
|
-
export declare const LOG_LEVEL: {
|
|
4
|
-
debug: number;
|
|
5
|
-
info: number;
|
|
6
|
-
warning: number;
|
|
7
|
-
error: number;
|
|
8
|
-
};
|
|
1
|
+
import { Resource } from './resource';
|
|
2
|
+
import { SessionStorageManager } from './storage';
|
|
9
3
|
interface EventDataModel {
|
|
10
4
|
application_id?: string;
|
|
11
5
|
step: string;
|
|
@@ -17,21 +11,6 @@ interface EventDataModel {
|
|
|
17
11
|
response?: any;
|
|
18
12
|
version?: string;
|
|
19
13
|
}
|
|
20
|
-
export declare const Logger: {
|
|
21
|
-
level: number;
|
|
22
|
-
/**
|
|
23
|
-
* 로그 레벨을 설정한다
|
|
24
|
-
* Comment by John
|
|
25
|
-
* @date: 2021-02-18
|
|
26
|
-
* @param logLevel: number
|
|
27
|
-
*/
|
|
28
|
-
setLogLevel(logLevel: number): void;
|
|
29
|
-
messageStringify(key: string, message: any): string | undefined;
|
|
30
|
-
debug(key: string, message: any): void;
|
|
31
|
-
info(key: string, message: any): void;
|
|
32
|
-
warn(key: string, message: any): void;
|
|
33
|
-
error(key: string, message: any): void;
|
|
34
|
-
};
|
|
35
14
|
export declare class EventLoggerManager extends Resource {
|
|
36
15
|
$session: SessionStorageManager;
|
|
37
16
|
$tk?: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const LOG_LEVEL: {
|
|
2
|
+
debug: number;
|
|
3
|
+
info: number;
|
|
4
|
+
warning: number;
|
|
5
|
+
error: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const Logger: {
|
|
8
|
+
level: number;
|
|
9
|
+
/**
|
|
10
|
+
* 로그 레벨을 설정한다
|
|
11
|
+
* Comment by John
|
|
12
|
+
* @date: 2021-02-18
|
|
13
|
+
* @param logLevel: number
|
|
14
|
+
*/
|
|
15
|
+
setLogLevel(logLevel: number): void;
|
|
16
|
+
messageStringify(key: string, message: any): string | undefined;
|
|
17
|
+
debug(key: string, message: any): void;
|
|
18
|
+
info(key: string, message: any): void;
|
|
19
|
+
warn(key: string, message: any): void;
|
|
20
|
+
error(key: string, message: any): void;
|
|
21
|
+
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { ResponseBootpayWidgetTermsModel } from '../models/bootpay-widget-interface';
|
|
1
|
+
import { ExternalBootpayWidgetTermsModel, ResponseBootpayWidgetTermsModel } from '../models/bootpay-widget-interface';
|
|
2
2
|
import { ExtraModel, WidgetExtraModel } from '../models/bootpay-interface';
|
|
3
3
|
export interface WidgetStoreModel {
|
|
4
4
|
el: string | undefined;
|
|
5
5
|
applicationId: string | undefined;
|
|
6
6
|
price: number;
|
|
7
7
|
taxFree: number | undefined;
|
|
8
|
+
depositPrice: number | undefined;
|
|
8
9
|
currency: string | undefined;
|
|
9
10
|
userToken: string | undefined;
|
|
10
11
|
pg: string | undefined;
|
|
11
12
|
method: string | undefined;
|
|
12
13
|
walletId?: string;
|
|
13
14
|
useOnlyOOpay: boolean;
|
|
15
|
+
widgetKey?: string | undefined;
|
|
14
16
|
termsPassed: boolean;
|
|
15
17
|
sandbox: boolean;
|
|
16
18
|
useTerms: boolean;
|
|
19
|
+
externalTerms?: ExternalBootpayWidgetTermsModel[];
|
|
17
20
|
extra: ExtraModel;
|
|
18
21
|
widgetExtra: WidgetExtraModel | undefined;
|
|
19
22
|
selectTerms: ResponseBootpayWidgetTermsModel[];
|
|
@@ -26,6 +29,7 @@ export interface WidgetStoreData {
|
|
|
26
29
|
application_id?: string;
|
|
27
30
|
price?: number;
|
|
28
31
|
tax_free?: number;
|
|
32
|
+
deposit_price?: number;
|
|
29
33
|
currency?: string;
|
|
30
34
|
user_token?: string;
|
|
31
35
|
pg?: string;
|
|
@@ -34,6 +38,8 @@ export interface WidgetStoreData {
|
|
|
34
38
|
use_only_oopay?: boolean;
|
|
35
39
|
use_terms?: boolean;
|
|
36
40
|
sandbox?: boolean;
|
|
41
|
+
widget_key?: string;
|
|
42
|
+
external_terms?: ExternalBootpayWidgetTermsModel[];
|
|
37
43
|
widget_extra?: WidgetExtraModel;
|
|
38
44
|
}
|
|
39
45
|
export declare const WidgetStore: WidgetStoreModel;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootpay/client-js",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
4
|
-
"main": "index.js",
|
|
5
|
-
"types": "index.d.ts",
|
|
3
|
+
"version": "5.0.0-beta.30",
|
|
4
|
+
"main": "dist/index.es.js",
|
|
5
|
+
"types": "dist/src/index.d.ts",
|
|
6
|
+
"styles": "dist/index.css",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"build": "rm -rf ./dist &&
|
|
9
|
+
"build": "rm -rf ./dist && vite build",
|
|
9
10
|
"deploy": "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
@@ -35,7 +36,11 @@
|
|
|
35
36
|
"css-loader": "^6.8.1",
|
|
36
37
|
"sass": "^1.63.4",
|
|
37
38
|
"sass-loader": "^13.3.2",
|
|
38
|
-
"style-loader": "^3.3.3"
|
|
39
|
+
"style-loader": "^3.3.3",
|
|
40
|
+
"vite": "^5.0.10",
|
|
41
|
+
"vite-plugin-dts": "^3.6.4",
|
|
42
|
+
"vite-plugin-tsconfig": "^1.0.4",
|
|
43
|
+
"vite-plugin-css-injected-by-js": "^3.3.0"
|
|
39
44
|
},
|
|
40
45
|
"resolutions": {
|
|
41
46
|
"@webpack-cli/serve": "^1.3.1"
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"sourceMap": false,
|
|
5
|
+
"lib": [
|
|
6
|
+
"esnext",
|
|
7
|
+
"dom"
|
|
8
|
+
],
|
|
9
|
+
"module": "commonjs",
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"declarationMap": false,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"emitDeclarationOnly": true,
|
|
18
|
+
"outDir": "./dist",
|
|
19
|
+
"strict": true,
|
|
20
|
+
"rootDir": "./",
|
|
21
|
+
"baseUrl": "./src/",
|
|
22
|
+
"paths": {
|
|
23
|
+
"*": [
|
|
24
|
+
"../node_modules/*",
|
|
25
|
+
"./*"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"exclude": [
|
|
30
|
+
"**/*.spec.ts",
|
|
31
|
+
"node_modules",
|
|
32
|
+
"dist",
|
|
33
|
+
"public",
|
|
34
|
+
"webpack.config.js"
|
|
35
|
+
],
|
|
36
|
+
"compileOnSave": false
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "node16",
|
|
5
|
+
"declarationMap": false,
|
|
6
|
+
"sourceMap": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"lib": [
|
|
11
|
+
"esnext",
|
|
12
|
+
"DOM"
|
|
13
|
+
],
|
|
14
|
+
"moduleResolution": "node16",
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"allowJs": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./",
|
|
21
|
+
"baseUrl": "./src/",
|
|
22
|
+
"paths": {
|
|
23
|
+
"*": [
|
|
24
|
+
"../node_modules/*",
|
|
25
|
+
"./*"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"include": [
|
|
30
|
+
"src/**/*"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"**/*.spec.ts",
|
|
34
|
+
"./node_modules",
|
|
35
|
+
"./dist",
|
|
36
|
+
"./public",
|
|
37
|
+
"./webpack.config.js",
|
|
38
|
+
"./tsconfig.json",
|
|
39
|
+
"./test/**/*.html"
|
|
40
|
+
],
|
|
41
|
+
"compileOnSave": false
|
|
42
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import dts from 'vite-plugin-dts'
|
|
3
|
+
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
|
|
4
|
+
|
|
5
|
+
const path = require('path')
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
build: {
|
|
9
|
+
target: 'es6',
|
|
10
|
+
minify: 'terser',
|
|
11
|
+
lib: {
|
|
12
|
+
entry: path.resolve(__dirname, 'src/index.ts'),
|
|
13
|
+
name: 'Bootpay',
|
|
14
|
+
fileName: (format) => `index.${ format }.js`
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
base: './',
|
|
18
|
+
root: './',
|
|
19
|
+
plugins: [
|
|
20
|
+
dts(),
|
|
21
|
+
cssInjectedByJsPlugin()
|
|
22
|
+
],
|
|
23
|
+
publicDir: '_public',
|
|
24
|
+
resolve: {
|
|
25
|
+
extensions: ['.css', '.sass', '.scss', '.ts', '.js']
|
|
26
|
+
}
|
|
27
|
+
})
|
package/bootpay-environment.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var e=o();for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(self,(function(){return function(){"use strict";var t={d:function(o,e){for(var i in e)t.o(e,i)&&!t.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:e[i]})},o:function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};t.r(o),t.d(o,{default:function(){return e}});var e={mode:"production",locale:"ko",applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set:function(t){this.mode=t},setApplicationId:function(t){return this.applicationId=t,this.currentApplicationId(void 0)},setLocale:function(t){this.locale=t},currentApplicationId:function(t){return void 0===t&&(t=void 0),void 0===t?this.applicationId:t},setDevelopmentHost:function(t){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,t)},setVersion:function(t,o){this.sdkName=void 0===this.sdkNames[o]?0:this.sdkNames[o],this.sdkVersion=t},toApi:function(t){return[this.API_URL[this.mode],t].join("/")},toDoor:function(t){return[this.DOOR_URL[this.mode],t].join("/")},toWidget:function(t){return[this.WIDGET_URL[this.mode],t].join("/")},isMobile:function(){var t=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(t)},isMobileSafari:function(){var t=window.navigator.userAgent;return(t.match(/iPad/i)||t.match(/iPhone/i))&&!t.match(/CriOS/i)},toAnalytics:function(t){return[this.ANALYTICS_URL[this.mode],t].join("/")}};return o}()}));
|