sales-frontend-bridge 0.0.46 → 0.0.47

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 CHANGED
@@ -1493,6 +1493,7 @@ var IframeBridgeCore = class extends CommonBridgeCore {
1493
1493
  * @param event
1494
1494
  */
1495
1495
  handleMessageEventResponse(event) {
1496
+ console.log("[IframeBridgeCore] \uBD80\uBAA8 \uC751\uB2F5:: ", event);
1496
1497
  const { promiseId, isSuccess, data } = event.data;
1497
1498
  if (this.responseHandler) {
1498
1499
  this.responseHandler({ promiseId, isSuccess, data });
@@ -1504,22 +1505,24 @@ var IframeBridgeCore = class extends CommonBridgeCore {
1504
1505
  /**
1505
1506
  * Iframe 통신
1506
1507
  * @param eventName
1507
- * @param option
1508
+ * @param data
1508
1509
  * @returns
1509
1510
  */
1510
- async callToTarget(eventName, option) {
1511
+ async callToTarget(eventName, data) {
1511
1512
  return new Promise((resolve, reject) => {
1512
1513
  const promiseId = `${eventName}_${this.generatePromiseId()}`;
1513
1514
  this.pendingPromises.set(promiseId, { resolve, reject });
1514
1515
  try {
1515
1516
  const command = {
1517
+ service: "native",
1516
1518
  eventName,
1517
1519
  promiseId,
1518
- option
1520
+ data
1519
1521
  };
1520
1522
  console.log("[IframeBridgeCore callToIframe] command::", command);
1521
1523
  const platform = salesFrontendUtils.getDspExecutionEnvironment();
1522
1524
  if (platform === "iframe") {
1525
+ console.log("[IframeBridgeCore callToIframe] \uBD80\uBAA8 \uD638\uCD9C \uC9C1\uC804");
1523
1526
  window.parent.postMessage(command, "*");
1524
1527
  const promise = this.pendingPromises.get(promiseId);
1525
1528
  if (promise) {
@@ -1569,11 +1572,34 @@ var IframeBridge = class extends CommonBridge {
1569
1572
  }
1570
1573
  /**
1571
1574
  * 영업포탈 tab open
1572
- * @param options
1575
+ * @param option
1576
+ * @returns
1577
+ */
1578
+ async openMdi(option) {
1579
+ return this.core.callToTarget("openMdi", option);
1580
+ }
1581
+ /**
1582
+ * 영업포털 부모의 세션연장, 오픈되어 있는 타 시스템 세션타임 연장
1583
+ * @returns
1584
+ */
1585
+ async dspKeepCallerSession() {
1586
+ return this.core.callToTarget("dspKeepCallerSession");
1587
+ }
1588
+ /**
1589
+ * 영업포털 메뉴정보에 있는 메뉴 오픈(새탭 생성)
1590
+ * @param option
1591
+ * @returns
1592
+ */
1593
+ async dspMenuWindowOpen(option) {
1594
+ return this.core.callToTarget("dspMenuWindowOpen", option);
1595
+ }
1596
+ /**
1597
+ * 영업포털 메뉴정보에 없는 메뉴를 오픈(새탭 생성 & 약속된 타켓 메뉴정보를 해당 시스템에 전달)
1598
+ * @param option
1573
1599
  * @returns
1574
1600
  */
1575
- async openMdi(options) {
1576
- return this.core.callToTarget("openMdi", options);
1601
+ async dspSimpleWindowOpen(option) {
1602
+ return this.core.callToTarget("dspSimpleWindowOpen", option);
1577
1603
  }
1578
1604
  // TODO: 필요 플러그인들 추가
1579
1605
  };
@@ -1998,7 +2024,7 @@ var NativeBridge = class extends CommonBridge {
1998
2024
  * @example
1999
2025
  * ```tsx
2000
2026
  * // 사용 예시
2001
- * Bridge.native.closeWeb()
2027
+ * Bridge.native.exitApp()
2002
2028
  * ```
2003
2029
  */
2004
2030
  exitApp() {
@@ -2009,7 +2035,7 @@ var NativeBridge = class extends CommonBridge {
2009
2035
  * @example
2010
2036
  * ```tsx
2011
2037
  * // 사용 예시
2012
- * Bridge.native.closeWeb()
2038
+ * Bridge.native.getAppInfo()
2013
2039
  * ```
2014
2040
  */
2015
2041
  getAppInfo() {