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.umd.js
CHANGED
|
@@ -29580,6 +29580,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29580
29580
|
destroyEventCenter: function() { return /* reexport */ destroyEventCenter; },
|
|
29581
29581
|
encrypt: function() { return /* reexport */ encrypt; },
|
|
29582
29582
|
extractFilenameFromUrl: function() { return /* reexport */ extractFilenameFromUrl; },
|
|
29583
|
+
extractNewItems: function() { return /* reexport */ extractNewItems; },
|
|
29583
29584
|
fireEvent: function() { return /* reexport */ fireEvent; },
|
|
29584
29585
|
getAIRobotInfos: function() { return /* reexport */ getAIRobotInfos; },
|
|
29585
29586
|
getAPPInfosByID: function() { return /* reexport */ getAPPInfosByID; },
|
|
@@ -29632,6 +29633,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29632
29633
|
loadi18nTexts: function() { return /* reexport */ loadi18nTexts; },
|
|
29633
29634
|
loginAccount: function() { return /* reexport */ loginAccount; },
|
|
29634
29635
|
logoutAccount: function() { return /* reexport */ logoutAccount; },
|
|
29636
|
+
processElement: function() { return /* reexport */ i18n_processElement; },
|
|
29635
29637
|
queryAndStoreAppVariable: function() { return /* reexport */ queryAndStoreAppVariable; },
|
|
29636
29638
|
queryAppVariable: function() { return /* reexport */ queryAppVariable; },
|
|
29637
29639
|
queryAssetById: function() { return /* reexport */ queryAssetById; },
|
|
@@ -32453,6 +32455,8 @@ const getKey = async () => {
|
|
|
32453
32455
|
;// ./src/api/utils.js
|
|
32454
32456
|
|
|
32455
32457
|
|
|
32458
|
+
|
|
32459
|
+
|
|
32456
32460
|
/**
|
|
32457
32461
|
* 查询资产
|
|
32458
32462
|
* @param id 资产ID
|
|
@@ -32529,6 +32533,16 @@ const extractFilenameFromUrl = url => {
|
|
|
32529
32533
|
}
|
|
32530
32534
|
};
|
|
32531
32535
|
|
|
32536
|
+
/**
|
|
32537
|
+
* 提取数组中不在另一个数组中的元素
|
|
32538
|
+
* @param {*} oldItems 基础比较数组
|
|
32539
|
+
* @param {*} newItems 被提取检测的数组
|
|
32540
|
+
* @returns
|
|
32541
|
+
*/
|
|
32542
|
+
const extractNewItems = (oldItems, newItems) => {
|
|
32543
|
+
return oldItems.filter(item => !newItems.includes(item));
|
|
32544
|
+
};
|
|
32545
|
+
|
|
32532
32546
|
/**
|
|
32533
32547
|
* 获取远程文件大小(单位:字节)
|
|
32534
32548
|
* @param {string} url - 文件的URL地址
|
|
@@ -33349,11 +33363,14 @@ const catalog_i18n_check = element => {
|
|
|
33349
33363
|
if (!classes) {
|
|
33350
33364
|
return checkResult;
|
|
33351
33365
|
}
|
|
33366
|
+
let innerHTML = element.innerHTML;
|
|
33367
|
+
let oldValue = element.getAttribute("oldValue");
|
|
33368
|
+
if (!oldValue) {
|
|
33369
|
+
oldValue = innerHTML;
|
|
33370
|
+
}
|
|
33352
33371
|
// 检查目录列表 名称 列
|
|
33353
33372
|
if (classes.contains("catalog_name_content")) {
|
|
33354
|
-
|
|
33355
|
-
let oldValue = innerHTML;
|
|
33356
|
-
console.log("检查smardaten平台目录列表 元素:", innerHTML);
|
|
33373
|
+
// console.log("检查smardaten平台目录列表 元素:",innerHTML);
|
|
33357
33374
|
let scriptFunction = (appID, lang) => {
|
|
33358
33375
|
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33359
33376
|
let scriptNodeItem = element.childNodes[i];
|
|
@@ -33382,6 +33399,32 @@ const catalog_i18n_check = element => {
|
|
|
33382
33399
|
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33383
33400
|
return checkResult;
|
|
33384
33401
|
}
|
|
33402
|
+
if (classes.contains("catalog-tree-search")) {
|
|
33403
|
+
let scriptFunction = (appID, lang) => {
|
|
33404
|
+
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33405
|
+
let scriptNodeItem = element.childNodes[i];
|
|
33406
|
+
if (scriptNodeItem.tagName === 'INPUT') {
|
|
33407
|
+
let oldValue = scriptNodeItem.getAttribute("oldplaceholderValue");
|
|
33408
|
+
if (!oldValue) {
|
|
33409
|
+
let text = scriptNodeItem.getAttribute("placeholder");
|
|
33410
|
+
if (text) {
|
|
33411
|
+
text = `$L{${text}}`;
|
|
33412
|
+
}
|
|
33413
|
+
scriptNodeItem.setAttribute("placeholder", text);
|
|
33414
|
+
processElement(scriptNodeItem, appID, lang);
|
|
33415
|
+
}
|
|
33416
|
+
}
|
|
33417
|
+
}
|
|
33418
|
+
};
|
|
33419
|
+
let tempHTMLMatch = {
|
|
33420
|
+
oldValue: oldValue,
|
|
33421
|
+
isScriptAction: true,
|
|
33422
|
+
scriptFunction: scriptFunction
|
|
33423
|
+
};
|
|
33424
|
+
checkResult.result = true;
|
|
33425
|
+
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33426
|
+
return checkResult;
|
|
33427
|
+
}
|
|
33385
33428
|
return checkResult;
|
|
33386
33429
|
};
|
|
33387
33430
|
;// ./src/api/i18n/commom_i18n/common_i18n.js
|
|
@@ -33886,7 +33929,7 @@ function checkPlatformElementContent(element) {
|
|
|
33886
33929
|
}
|
|
33887
33930
|
return checkContentResult;
|
|
33888
33931
|
}
|
|
33889
|
-
function
|
|
33932
|
+
function i18n_processElement(element) {
|
|
33890
33933
|
if (!element) {
|
|
33891
33934
|
return false;
|
|
33892
33935
|
}
|
|
@@ -33909,7 +33952,7 @@ function processElement(element) {
|
|
|
33909
33952
|
unProcessElement(child);
|
|
33910
33953
|
}
|
|
33911
33954
|
}
|
|
33912
|
-
|
|
33955
|
+
i18n_processElement(children[i]);
|
|
33913
33956
|
}
|
|
33914
33957
|
}
|
|
33915
33958
|
|
|
@@ -34073,7 +34116,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34073
34116
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
34074
34117
|
node = node.parentNode;
|
|
34075
34118
|
}
|
|
34076
|
-
|
|
34119
|
+
i18n_processElement(node);
|
|
34077
34120
|
}
|
|
34078
34121
|
}
|
|
34079
34122
|
// 节点移除
|
|
@@ -34099,7 +34142,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34099
34142
|
unProcessElement(parentElement);
|
|
34100
34143
|
}
|
|
34101
34144
|
}
|
|
34102
|
-
|
|
34145
|
+
i18n_processElement(parentElement);
|
|
34103
34146
|
}
|
|
34104
34147
|
});
|
|
34105
34148
|
});
|
|
@@ -34118,7 +34161,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34118
34161
|
};
|
|
34119
34162
|
// 开始观察目标节点
|
|
34120
34163
|
const targetNode = document.body;
|
|
34121
|
-
|
|
34164
|
+
i18n_processElement(targetNode);
|
|
34122
34165
|
observer.observe(targetNode, config);
|
|
34123
34166
|
};
|
|
34124
34167
|
;// ./src/main.js
|