isdata-customer-sdk 0.1.50 → 0.1.52

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.js CHANGED
@@ -29582,6 +29582,7 @@ __webpack_require__.d(__webpack_exports__, {
29582
29582
  getPortalUserMappingInfos: function() { return /* reexport */ getPortalUserMappingInfos; },
29583
29583
  getPortalUserSig: function() { return /* reexport */ getPortalUserSig; },
29584
29584
  getRoleIDsByUserAndGroupID: function() { return /* reexport */ getRoleIDsByUserAndGroupID; },
29585
+ getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
29585
29586
  getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
29586
29587
  getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
29587
29588
  hasListener: function() { return /* reexport */ hasListener; },
@@ -29589,6 +29590,7 @@ __webpack_require__.d(__webpack_exports__, {
29589
29590
  initFrameWindowListener: function() { return /* reexport */ initFrameWindowListener; },
29590
29591
  loginAccount: function() { return /* reexport */ loginAccount; },
29591
29592
  logoutAccount: function() { return /* reexport */ logoutAccount; },
29593
+ queryAndStoreAppVariable: function() { return /* reexport */ queryAndStoreAppVariable; },
29592
29594
  queryAppVariable: function() { return /* reexport */ queryAppVariable; },
29593
29595
  queryAssetById: function() { return /* reexport */ queryAssetById; },
29594
29596
  queryGroupIDByOfficeId: function() { return /* reexport */ queryGroupIDByOfficeId; },
@@ -30285,9 +30287,10 @@ const logoutAccount = async endside_type => {
30285
30287
  let response = JSON.parse(resultData.request.response);
30286
30288
  let resultCode = response.code;
30287
30289
  if (resultCode == "10110020") {
30288
- window.sessionStorage.setItem("iportal_login_user_id", "");
30289
- window.sessionStorage.setItem("iportal_group_id", "");
30290
- window.sessionStorage.setItem("iportal_login_user_key", "");
30290
+ // window.sessionStorage.setItem("iportal_login_user_id", "");
30291
+ // window.sessionStorage.setItem("iportal_group_id", "");
30292
+ // window.sessionStorage.setItem("iportal_login_user_key", "");
30293
+ window.sessionStorage.clear();
30291
30294
  return {
30292
30295
  code: resultCode,
30293
30296
  message: response.message
@@ -30473,6 +30476,28 @@ const queryAppVariable = (name, appVariables) => {
30473
30476
  }
30474
30477
  return "";
30475
30478
  };
30479
+ const getThirdAppPathByKey = async (appkey, appSecret, groupID) => {
30480
+ let requestData = {
30481
+ param: {
30482
+ appKey: appkey,
30483
+ appSecret: appSecret,
30484
+ groupID: groupID
30485
+ }
30486
+ };
30487
+ let result = await request.post(`/dataservice/rest/orchestration/getThirdAppPathByKey`, requestData);
30488
+ let path = result.data.path;
30489
+ return path;
30490
+ };
30491
+ const queryAndStoreAppVariable = async (name, appVariables) => {
30492
+ let value = window.sessionStorage.getItem("isdata_app_variable_" + name);
30493
+ if (!value) {
30494
+ value = queryAppVariable(name, appVariables);
30495
+ if (value) {
30496
+ window.sessionStorage.setItem("isdata_app_variable_" + name, value);
30497
+ }
30498
+ }
30499
+ return value;
30500
+ };
30476
30501
 
30477
30502
  /**
30478
30503
  * 添加或更新对象使用次数
@@ -30684,7 +30709,7 @@ const initFrameWindowListener = () => {
30684
30709
  let eventAction = window.sdataEventActions[eventOperateKey];
30685
30710
  //删除缓存方法
30686
30711
  delete window.sdataEventActions[eventOperateKey];
30687
- if (eventAction) await eventAction(event.data.data);
30712
+ if (eventAction) await eventAction(event.data.data, event);
30688
30713
  } else {
30689
30714
  let eventAction = window.sdataEventActions[eventKey];
30690
30715
  let responseData = {
@@ -30693,7 +30718,7 @@ const initFrameWindowListener = () => {
30693
30718
  data: {}
30694
30719
  };
30695
30720
  if (eventAction) {
30696
- let resultData = await eventAction(event.data.data);
30721
+ let resultData = await eventAction(event.data.data, event);
30697
30722
  responseData.data = resultData;
30698
30723
  }
30699
30724
  event.source.postMessage(responseData, eventSourceKey);