isdata-customer-sdk 0.1.72 → 0.1.73
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.common.js +18 -29
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +18 -29
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +3 -3
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -29588,7 +29588,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29588
29588
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29589
29589
|
getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
|
|
29590
29590
|
getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
|
|
29591
|
-
|
|
29591
|
+
getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
|
|
29592
29592
|
getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
|
|
29593
29593
|
getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
|
|
29594
29594
|
getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
|
|
@@ -29606,7 +29606,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29606
29606
|
getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
|
|
29607
29607
|
getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
|
|
29608
29608
|
getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
|
|
29609
|
-
getUserRoles: function() { return /* reexport */ getUserRoles; },
|
|
29610
29609
|
hasListener: function() { return /* reexport */ hasListener; },
|
|
29611
29610
|
initEventCenter: function() { return /* reexport */ initEventCenter; },
|
|
29612
29611
|
initFrameWindowListener: function() { return /* reexport */ initFrameWindowListener; },
|
|
@@ -29885,16 +29884,20 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
|
|
|
29885
29884
|
}
|
|
29886
29885
|
};
|
|
29887
29886
|
let result = await request.post(`/dataservice/rest/orchestration/getMenuDatasByGroupID`, queryData_groupData);
|
|
29887
|
+
//所有的快捷访问菜单信息
|
|
29888
29888
|
let portalMenuDatas = result.data.resultDatas;
|
|
29889
29889
|
let menuTypes = result.data.menuTypes;
|
|
29890
29890
|
if (role_ids && role_ids.length > 0) {
|
|
29891
|
-
|
|
29891
|
+
//获取当前角色下对应的角色快捷访问菜单的映射信息和快捷访问菜单的信息
|
|
29892
|
+
let result = await getMenuMappingDatasByRoleIDs(role_ids, group_id);
|
|
29893
|
+
//角色-快捷访问菜单映射信息
|
|
29892
29894
|
let quickMenuMappingDatas = result.data.quickMenuMappingDatas || [];
|
|
29893
29895
|
let filterObjectMap = {};
|
|
29894
29896
|
for (const data of quickMenuMappingDatas) {
|
|
29895
29897
|
let id = data.menu_mapping_id;
|
|
29896
29898
|
filterObjectMap[id] = data;
|
|
29897
29899
|
}
|
|
29900
|
+
//快捷菜单映射信息
|
|
29898
29901
|
let menuMappingDatas = result.data.menuMappingDatas || [];
|
|
29899
29902
|
for (const data of menuMappingDatas) {
|
|
29900
29903
|
let id = data.id;
|
|
@@ -29907,11 +29910,11 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
|
|
|
29907
29910
|
};
|
|
29908
29911
|
|
|
29909
29912
|
/**
|
|
29910
|
-
*
|
|
29913
|
+
* 查询对应角色的门户快捷菜单映射信息
|
|
29911
29914
|
* @param id GroupID
|
|
29912
29915
|
*
|
|
29913
29916
|
*/
|
|
29914
|
-
const
|
|
29917
|
+
const getMenuMappingDatasByRoleIDs = async (role_ids, group_id) => {
|
|
29915
29918
|
let queryData_groupData = {
|
|
29916
29919
|
"param": {
|
|
29917
29920
|
"role_ids": role_ids,
|
|
@@ -29963,13 +29966,15 @@ const getRoleIDsByUserAndGroupID = async (user_id, app_id, group_id) => {
|
|
|
29963
29966
|
|
|
29964
29967
|
/**
|
|
29965
29968
|
* 转换门户菜单数据
|
|
29966
|
-
* @param {*} datas
|
|
29967
|
-
* @param {*} menuTypes
|
|
29968
|
-
* @param {*} filterObjectMap
|
|
29969
|
+
* @param {*} datas 所有的快捷菜单访问信息
|
|
29970
|
+
* @param {*} menuTypes 快捷访问菜单类型
|
|
29971
|
+
* @param {*} filterObjectMap 角色快捷菜单访问映射信息
|
|
29969
29972
|
* @returns
|
|
29970
29973
|
*/
|
|
29971
29974
|
const transformPortalData = (datas, menuTypes, filterObjectMap) => {
|
|
29972
|
-
|
|
29975
|
+
console.log(datas);
|
|
29976
|
+
console.log(menuTypes);
|
|
29977
|
+
console.log(filterObjectMap);
|
|
29973
29978
|
let menuMaps = {};
|
|
29974
29979
|
let menuTypeMaps = {};
|
|
29975
29980
|
for (const data of datas) {
|
|
@@ -30580,22 +30585,6 @@ const getIntegrateAppInfoByID = async appID => {
|
|
|
30580
30585
|
let appInfo = result.data.appInfo;
|
|
30581
30586
|
return appInfo;
|
|
30582
30587
|
};
|
|
30583
|
-
|
|
30584
|
-
/**
|
|
30585
|
-
* getUserRoles
|
|
30586
|
-
* @param {信息} userID
|
|
30587
|
-
* @returns
|
|
30588
|
-
*/
|
|
30589
|
-
const getUserRoles = async userID => {
|
|
30590
|
-
let queryData = {
|
|
30591
|
-
"param": {
|
|
30592
|
-
"userID": userID
|
|
30593
|
-
}
|
|
30594
|
-
};
|
|
30595
|
-
let responseData = await request.post(`/dataservice/rest/orchestration/getUserRoles`, queryData);
|
|
30596
|
-
let role_ids = responseData.data.role_ids;
|
|
30597
|
-
return role_ids;
|
|
30598
|
-
};
|
|
30599
30588
|
// EXTERNAL MODULE: ./node_modules/crypto-js/index.js
|
|
30600
30589
|
var crypto_js = __webpack_require__(1396);
|
|
30601
30590
|
var crypto_js_default = /*#__PURE__*/__webpack_require__.n(crypto_js);
|
|
@@ -31361,10 +31350,10 @@ const getDifyFileType = fileType => {
|
|
|
31361
31350
|
return typeOptions[key] || "custom";
|
|
31362
31351
|
};
|
|
31363
31352
|
|
|
31364
|
-
/**
|
|
31365
|
-
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
31366
|
-
* @param {string} url - 文件 URL
|
|
31367
|
-
* @returns {string} - 提取的文件名
|
|
31353
|
+
/**
|
|
31354
|
+
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
31355
|
+
* @param {string} url - 文件 URL
|
|
31356
|
+
* @returns {string} - 提取的文件名
|
|
31368
31357
|
*/
|
|
31369
31358
|
const dify_extractFilenameFromUrl = url => {
|
|
31370
31359
|
try {
|