sales-frontend-bridge 0.0.37 → 0.0.39
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/dist/index.cjs +60 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -66
- package/dist/index.d.ts +75 -66
- package/dist/index.js +60 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1944,6 +1944,50 @@ var NativeBridge = class extends CommonBridge {
|
|
|
1944
1944
|
hideWebPopup() {
|
|
1945
1945
|
return this.core.callToTarget("hideWebPopup");
|
|
1946
1946
|
}
|
|
1947
|
+
/**
|
|
1948
|
+
* OnePass 인증
|
|
1949
|
+
* @example
|
|
1950
|
+
* ```tsx
|
|
1951
|
+
* // 사용 예시
|
|
1952
|
+
* Bridge.native.requestAuthentication()
|
|
1953
|
+
* ```
|
|
1954
|
+
*/
|
|
1955
|
+
requestAuthentication() {
|
|
1956
|
+
return this.core.callToTarget("requestAuthentication");
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* 웹뷰 띄우기
|
|
1960
|
+
* @example
|
|
1961
|
+
* ```tsx
|
|
1962
|
+
* // 사용 예시
|
|
1963
|
+
* Bridge.native.openWeb()
|
|
1964
|
+
* ```
|
|
1965
|
+
*/
|
|
1966
|
+
openWeb(options) {
|
|
1967
|
+
return this.core.callToTarget("openWeb", options);
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* 웹뷰 닫기
|
|
1971
|
+
* @example
|
|
1972
|
+
* ```tsx
|
|
1973
|
+
* // 사용 예시
|
|
1974
|
+
* Bridge.native.closeWeb()
|
|
1975
|
+
* ```
|
|
1976
|
+
*/
|
|
1977
|
+
closeWeb() {
|
|
1978
|
+
return this.core.callToTarget("closeWeb");
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
* 앱 종료
|
|
1982
|
+
* @example
|
|
1983
|
+
* ```tsx
|
|
1984
|
+
* // 사용 예시
|
|
1985
|
+
* Bridge.native.closeWeb()
|
|
1986
|
+
* ```
|
|
1987
|
+
*/
|
|
1988
|
+
exitApp() {
|
|
1989
|
+
return this.core.callToTarget("exitApp");
|
|
1990
|
+
}
|
|
1947
1991
|
// TODO: 필요 플러그인들 추가
|
|
1948
1992
|
};
|
|
1949
1993
|
|
|
@@ -2459,7 +2503,10 @@ function PromiseWithResolvers() {
|
|
|
2459
2503
|
return { promise, resolve, reject };
|
|
2460
2504
|
}
|
|
2461
2505
|
function ensureArray(arg) {
|
|
2462
|
-
return Array.isArray(arg) ? arg : [];
|
|
2506
|
+
return Array.isArray(arg) ? DeepCopy(arg) : [];
|
|
2507
|
+
}
|
|
2508
|
+
function DeepCopy(arg) {
|
|
2509
|
+
return JSON.parse(JSON.stringify(arg));
|
|
2463
2510
|
}
|
|
2464
2511
|
|
|
2465
2512
|
// src/oz/utils/bridge-util/oz-wrapper-util.ts
|
|
@@ -2795,11 +2842,18 @@ async function CreateOzParam(documentList, extraData = {}) {
|
|
|
2795
2842
|
if (data.inputJson) {
|
|
2796
2843
|
result.push(`${prefix}connection.inputjson=${JSON.stringify(data.inputJson)}`);
|
|
2797
2844
|
}
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2845
|
+
const args = [
|
|
2846
|
+
// 모든서식에 공통으로 필요한 docCd param 추가
|
|
2847
|
+
`docCd=${docCode}`,
|
|
2848
|
+
...ensureArray(data.args)
|
|
2849
|
+
];
|
|
2850
|
+
args.forEach((arg, idx2) => result.push(`${prefix}connection.args${idx2 + 1}=${arg}`));
|
|
2851
|
+
const extraParam = [
|
|
2852
|
+
// connection.args의 갯수만큼 pcount 보정
|
|
2853
|
+
`connection.pcount=${args.length}`,
|
|
2854
|
+
...ensureArray(data.extraParam)
|
|
2855
|
+
];
|
|
2856
|
+
extraParam.forEach((param) => result.push(`${prefix}${param}`));
|
|
2803
2857
|
return result;
|
|
2804
2858
|
});
|
|
2805
2859
|
const params = [
|