isdata-customer-sdk 0.2.14 → 0.2.16
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 +51 -8
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +51 -8
- 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.common.js
CHANGED
|
@@ -29562,6 +29562,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29562
29562
|
destroyEventCenter: function() { return /* reexport */ destroyEventCenter; },
|
|
29563
29563
|
encrypt: function() { return /* reexport */ encrypt; },
|
|
29564
29564
|
extractFilenameFromUrl: function() { return /* reexport */ extractFilenameFromUrl; },
|
|
29565
|
+
extractNewItems: function() { return /* reexport */ extractNewItems; },
|
|
29565
29566
|
fireEvent: function() { return /* reexport */ fireEvent; },
|
|
29566
29567
|
getAIRobotInfos: function() { return /* reexport */ getAIRobotInfos; },
|
|
29567
29568
|
getAPPInfosByID: function() { return /* reexport */ getAPPInfosByID; },
|
|
@@ -29614,6 +29615,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29614
29615
|
loadi18nTexts: function() { return /* reexport */ loadi18nTexts; },
|
|
29615
29616
|
loginAccount: function() { return /* reexport */ loginAccount; },
|
|
29616
29617
|
logoutAccount: function() { return /* reexport */ logoutAccount; },
|
|
29618
|
+
processElement: function() { return /* reexport */ i18n_processElement; },
|
|
29617
29619
|
queryAndStoreAppVariable: function() { return /* reexport */ queryAndStoreAppVariable; },
|
|
29618
29620
|
queryAppVariable: function() { return /* reexport */ queryAppVariable; },
|
|
29619
29621
|
queryAssetById: function() { return /* reexport */ queryAssetById; },
|
|
@@ -32435,6 +32437,8 @@ const getKey = async () => {
|
|
|
32435
32437
|
;// ./src/api/utils.js
|
|
32436
32438
|
|
|
32437
32439
|
|
|
32440
|
+
|
|
32441
|
+
|
|
32438
32442
|
/**
|
|
32439
32443
|
* 查询资产
|
|
32440
32444
|
* @param id 资产ID
|
|
@@ -32511,6 +32515,16 @@ const extractFilenameFromUrl = url => {
|
|
|
32511
32515
|
}
|
|
32512
32516
|
};
|
|
32513
32517
|
|
|
32518
|
+
/**
|
|
32519
|
+
* 提取数组中不在另一个数组中的元素
|
|
32520
|
+
* @param {*} oldItems 基础比较数组
|
|
32521
|
+
* @param {*} newItems 被提取检测的数组
|
|
32522
|
+
* @returns
|
|
32523
|
+
*/
|
|
32524
|
+
const extractNewItems = (oldItems, newItems) => {
|
|
32525
|
+
return oldItems.filter(item => !newItems.includes(item));
|
|
32526
|
+
};
|
|
32527
|
+
|
|
32514
32528
|
/**
|
|
32515
32529
|
* 获取远程文件大小(单位:字节)
|
|
32516
32530
|
* @param {string} url - 文件的URL地址
|
|
@@ -33331,11 +33345,14 @@ const catalog_i18n_check = element => {
|
|
|
33331
33345
|
if (!classes) {
|
|
33332
33346
|
return checkResult;
|
|
33333
33347
|
}
|
|
33348
|
+
let innerHTML = element.innerHTML;
|
|
33349
|
+
let oldValue = element.getAttribute("oldValue");
|
|
33350
|
+
if (!oldValue) {
|
|
33351
|
+
oldValue = innerHTML;
|
|
33352
|
+
}
|
|
33334
33353
|
// 检查目录列表 名称 列
|
|
33335
33354
|
if (classes.contains("catalog_name_content")) {
|
|
33336
|
-
|
|
33337
|
-
let oldValue = innerHTML;
|
|
33338
|
-
console.log("检查smardaten平台目录列表 元素:", innerHTML);
|
|
33355
|
+
// console.log("检查smardaten平台目录列表 元素:",innerHTML);
|
|
33339
33356
|
let scriptFunction = (appID, lang) => {
|
|
33340
33357
|
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33341
33358
|
let scriptNodeItem = element.childNodes[i];
|
|
@@ -33364,6 +33381,32 @@ const catalog_i18n_check = element => {
|
|
|
33364
33381
|
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33365
33382
|
return checkResult;
|
|
33366
33383
|
}
|
|
33384
|
+
if (classes.contains("catalog-tree-search")) {
|
|
33385
|
+
let scriptFunction = (appID, lang) => {
|
|
33386
|
+
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33387
|
+
let scriptNodeItem = element.childNodes[i];
|
|
33388
|
+
if (scriptNodeItem.tagName === 'INPUT') {
|
|
33389
|
+
let oldValue = scriptNodeItem.getAttribute("oldplaceholderValue");
|
|
33390
|
+
if (!oldValue) {
|
|
33391
|
+
let text = scriptNodeItem.getAttribute("placeholder");
|
|
33392
|
+
if (text) {
|
|
33393
|
+
text = `$L{${text}}`;
|
|
33394
|
+
}
|
|
33395
|
+
scriptNodeItem.setAttribute("placeholder", text);
|
|
33396
|
+
processElement(scriptNodeItem, appID, lang);
|
|
33397
|
+
}
|
|
33398
|
+
}
|
|
33399
|
+
}
|
|
33400
|
+
};
|
|
33401
|
+
let tempHTMLMatch = {
|
|
33402
|
+
oldValue: oldValue,
|
|
33403
|
+
isScriptAction: true,
|
|
33404
|
+
scriptFunction: scriptFunction
|
|
33405
|
+
};
|
|
33406
|
+
checkResult.result = true;
|
|
33407
|
+
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33408
|
+
return checkResult;
|
|
33409
|
+
}
|
|
33367
33410
|
return checkResult;
|
|
33368
33411
|
};
|
|
33369
33412
|
;// ./src/api/i18n/commom_i18n/common_i18n.js
|
|
@@ -33868,7 +33911,7 @@ function checkPlatformElementContent(element) {
|
|
|
33868
33911
|
}
|
|
33869
33912
|
return checkContentResult;
|
|
33870
33913
|
}
|
|
33871
|
-
function
|
|
33914
|
+
function i18n_processElement(element) {
|
|
33872
33915
|
if (!element) {
|
|
33873
33916
|
return false;
|
|
33874
33917
|
}
|
|
@@ -33891,7 +33934,7 @@ function processElement(element) {
|
|
|
33891
33934
|
unProcessElement(child);
|
|
33892
33935
|
}
|
|
33893
33936
|
}
|
|
33894
|
-
|
|
33937
|
+
i18n_processElement(children[i]);
|
|
33895
33938
|
}
|
|
33896
33939
|
}
|
|
33897
33940
|
|
|
@@ -34055,7 +34098,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34055
34098
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
34056
34099
|
node = node.parentNode;
|
|
34057
34100
|
}
|
|
34058
|
-
|
|
34101
|
+
i18n_processElement(node);
|
|
34059
34102
|
}
|
|
34060
34103
|
}
|
|
34061
34104
|
// 节点移除
|
|
@@ -34081,7 +34124,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34081
34124
|
unProcessElement(parentElement);
|
|
34082
34125
|
}
|
|
34083
34126
|
}
|
|
34084
|
-
|
|
34127
|
+
i18n_processElement(parentElement);
|
|
34085
34128
|
}
|
|
34086
34129
|
});
|
|
34087
34130
|
});
|
|
@@ -34100,7 +34143,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34100
34143
|
};
|
|
34101
34144
|
// 开始观察目标节点
|
|
34102
34145
|
const targetNode = document.body;
|
|
34103
|
-
|
|
34146
|
+
i18n_processElement(targetNode);
|
|
34104
34147
|
observer.observe(targetNode, config);
|
|
34105
34148
|
};
|
|
34106
34149
|
;// ./src/main.js
|