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.common.js
CHANGED
|
@@ -29615,6 +29615,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29615
29615
|
loadi18nTexts: function() { return /* reexport */ loadi18nTexts; },
|
|
29616
29616
|
loginAccount: function() { return /* reexport */ loginAccount; },
|
|
29617
29617
|
logoutAccount: function() { return /* reexport */ logoutAccount; },
|
|
29618
|
+
processElement: function() { return /* reexport */ i18n_processElement; },
|
|
29618
29619
|
queryAndStoreAppVariable: function() { return /* reexport */ queryAndStoreAppVariable; },
|
|
29619
29620
|
queryAppVariable: function() { return /* reexport */ queryAppVariable; },
|
|
29620
29621
|
queryAssetById: function() { return /* reexport */ queryAssetById; },
|
|
@@ -33344,11 +33345,14 @@ const catalog_i18n_check = element => {
|
|
|
33344
33345
|
if (!classes) {
|
|
33345
33346
|
return checkResult;
|
|
33346
33347
|
}
|
|
33348
|
+
let innerHTML = element.innerHTML;
|
|
33349
|
+
let oldValue = element.getAttribute("oldValue");
|
|
33350
|
+
if (!oldValue) {
|
|
33351
|
+
oldValue = innerHTML;
|
|
33352
|
+
}
|
|
33347
33353
|
// 检查目录列表 名称 列
|
|
33348
33354
|
if (classes.contains("catalog_name_content")) {
|
|
33349
|
-
|
|
33350
|
-
let oldValue = innerHTML;
|
|
33351
|
-
console.log("检查smardaten平台目录列表 元素:", innerHTML);
|
|
33355
|
+
// console.log("检查smardaten平台目录列表 元素:",innerHTML);
|
|
33352
33356
|
let scriptFunction = (appID, lang) => {
|
|
33353
33357
|
for (let i = 0; i < element.childNodes.length; i++) {
|
|
33354
33358
|
let scriptNodeItem = element.childNodes[i];
|
|
@@ -33377,6 +33381,32 @@ const catalog_i18n_check = element => {
|
|
|
33377
33381
|
checkResult.innerHTMLMatch = tempHTMLMatch;
|
|
33378
33382
|
return checkResult;
|
|
33379
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
|
+
}
|
|
33380
33410
|
return checkResult;
|
|
33381
33411
|
};
|
|
33382
33412
|
;// ./src/api/i18n/commom_i18n/common_i18n.js
|
|
@@ -33881,7 +33911,7 @@ function checkPlatformElementContent(element) {
|
|
|
33881
33911
|
}
|
|
33882
33912
|
return checkContentResult;
|
|
33883
33913
|
}
|
|
33884
|
-
function
|
|
33914
|
+
function i18n_processElement(element) {
|
|
33885
33915
|
if (!element) {
|
|
33886
33916
|
return false;
|
|
33887
33917
|
}
|
|
@@ -33904,7 +33934,7 @@ function processElement(element) {
|
|
|
33904
33934
|
unProcessElement(child);
|
|
33905
33935
|
}
|
|
33906
33936
|
}
|
|
33907
|
-
|
|
33937
|
+
i18n_processElement(children[i]);
|
|
33908
33938
|
}
|
|
33909
33939
|
}
|
|
33910
33940
|
|
|
@@ -34068,7 +34098,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34068
34098
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
34069
34099
|
node = node.parentNode;
|
|
34070
34100
|
}
|
|
34071
|
-
|
|
34101
|
+
i18n_processElement(node);
|
|
34072
34102
|
}
|
|
34073
34103
|
}
|
|
34074
34104
|
// 节点移除
|
|
@@ -34094,7 +34124,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34094
34124
|
unProcessElement(parentElement);
|
|
34095
34125
|
}
|
|
34096
34126
|
}
|
|
34097
|
-
|
|
34127
|
+
i18n_processElement(parentElement);
|
|
34098
34128
|
}
|
|
34099
34129
|
});
|
|
34100
34130
|
});
|
|
@@ -34113,7 +34143,7 @@ const initDomNodeI18NObserver = () => {
|
|
|
34113
34143
|
};
|
|
34114
34144
|
// 开始观察目标节点
|
|
34115
34145
|
const targetNode = document.body;
|
|
34116
|
-
|
|
34146
|
+
i18n_processElement(targetNode);
|
|
34117
34147
|
observer.observe(targetNode, config);
|
|
34118
34148
|
};
|
|
34119
34149
|
;// ./src/main.js
|