isdata-customer-sdk 0.2.15 → 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 +38 -8
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +38 -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
|
@@ -29633,6 +29633,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29633
29633
|
loadi18nTexts: function() { return /* reexport */ loadi18nTexts; },
|
|
29634
29634
|
loginAccount: function() { return /* reexport */ loginAccount; },
|
|
29635
29635
|
logoutAccount: function() { return /* reexport */ logoutAccount; },
|
|
29636
|
+
processElement: function() { return /* reexport */ i18n_processElement; },
|
|
29636
29637
|
queryAndStoreAppVariable: function() { return /* reexport */ queryAndStoreAppVariable; },
|
|
29637
29638
|
queryAppVariable: function() { return /* reexport */ queryAppVariable; },
|
|
29638
29639
|
queryAssetById: function() { return /* reexport */ queryAssetById; },
|
|
@@ -33362,11 +33363,14 @@ const catalog_i18n_check = element => {
|
|
|
33362
33363
|
if (!classes) {
|
|
33363
33364
|
return checkResult;
|
|
33364
33365
|
}
|
|
33366
|
+
let innerHTML = element.innerHTML;
|
|
33367
|
+
let oldValue = element.getAttribute("oldValue");
|
|
33368
|
+
if (!oldValue) {
|
|
33369
|
+
oldValue = innerHTML;
|
|
33370
|
+
}
|
|
33365
33371
|
// 检查目录列表 名称 列
|
|
33366
33372
|
if (classes.contains("catalog_name_content")) {
|
|
33367
|
-
|
|
33368
|
-
let oldValue = innerHTML;
|
|
33369
|
-
console.log("检查smardaten平台目录列表 元素:", innerHTML);
|
|
33373
|
+
// console.log("检查smardaten平台目录列表 元素:",innerHTML);
|
|
33370
33374
|
let scriptFunction = (appID, lang) => {
|
|
33371
33375
|
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33372
33376
|
let scriptNodeItem = element.childNodes[i];
|
|
@@ -33395,6 +33399,32 @@ const catalog_i18n_check = element => {
|
|
|
33395
33399
|
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33396
33400
|
return checkResult;
|
|
33397
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
|
+
}
|
|
33398
33428
|
return checkResult;
|
|
33399
33429
|
};
|
|
33400
33430
|
;// ./src/api/i18n/commom_i18n/common_i18n.js
|
|
@@ -33899,7 +33929,7 @@ function checkPlatformElementContent(element) {
|
|
|
33899
33929
|
}
|
|
33900
33930
|
return checkContentResult;
|
|
33901
33931
|
}
|
|
33902
|
-
function
|
|
33932
|
+
function i18n_processElement(element) {
|
|
33903
33933
|
if (!element) {
|
|
33904
33934
|
return false;
|
|
33905
33935
|
}
|
|
@@ -33922,7 +33952,7 @@ function processElement(element) {
|
|
|
33922
33952
|
unProcessElement(child);
|
|
33923
33953
|
}
|
|
33924
33954
|
}
|
|
33925
|
-
|
|
33955
|
+
i18n_processElement(children[i]);
|
|
33926
33956
|
}
|
|
33927
33957
|
}
|
|
33928
33958
|
|
|
@@ -34086,7 +34116,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34086
34116
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
34087
34117
|
node = node.parentNode;
|
|
34088
34118
|
}
|
|
34089
|
-
|
|
34119
|
+
i18n_processElement(node);
|
|
34090
34120
|
}
|
|
34091
34121
|
}
|
|
34092
34122
|
// 节点移除
|
|
@@ -34112,7 +34142,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34112
34142
|
unProcessElement(parentElement);
|
|
34113
34143
|
}
|
|
34114
34144
|
}
|
|
34115
|
-
|
|
34145
|
+
i18n_processElement(parentElement);
|
|
34116
34146
|
}
|
|
34117
34147
|
});
|
|
34118
34148
|
});
|
|
@@ -34131,7 +34161,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34131
34161
|
};
|
|
34132
34162
|
// 开始观察目标节点
|
|
34133
34163
|
const targetNode = document.body;
|
|
34134
|
-
|
|
34164
|
+
i18n_processElement(targetNode);
|
|
34135
34165
|
observer.observe(targetNode, config);
|
|
34136
34166
|
};
|
|
34137
34167
|
;// ./src/main.js
|