tnx-shared 5.3.391 → 5.3.392
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/bundles/tnx-shared.umd.js +8 -3
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/menu-schema.d.ts +2 -2
- package/classes/menu-schema.d.ts.map +1 -1
- package/esm2015/classes/menu-schema.js +7 -4
- package/fesm2015/tnx-shared.js +6 -3
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
|
@@ -29045,16 +29045,17 @@
|
|
|
29045
29045
|
CommonErrorCode.ERROR_NOT_FOUND = 'ERR_NOT_FOUND';
|
|
29046
29046
|
CommonErrorCode.ERROR_SERVICE_NOT_RUN = 0;
|
|
29047
29047
|
|
|
29048
|
-
var getMenuData = function (listMenuName, customPath) {
|
|
29048
|
+
var getMenuData = function (listMenuName, customPath, customEndpoint) {
|
|
29049
29049
|
var e_1, _a;
|
|
29050
29050
|
if (customPath === void 0) { customPath = ''; }
|
|
29051
|
+
if (customEndpoint === void 0) { customEndpoint = ''; }
|
|
29051
29052
|
var res = [];
|
|
29052
29053
|
try {
|
|
29053
29054
|
for (var listMenuName_1 = __values(listMenuName), listMenuName_1_1 = listMenuName_1.next(); !listMenuName_1_1.done; listMenuName_1_1 = listMenuName_1.next()) {
|
|
29054
29055
|
var menu = listMenuName_1_1.value;
|
|
29055
29056
|
res.push({
|
|
29056
29057
|
fileName: menu,
|
|
29057
|
-
dataMenus: getListMenuByName(menu, customPath)
|
|
29058
|
+
dataMenus: getListMenuByName(menu, customPath, customEndpoint)
|
|
29058
29059
|
});
|
|
29059
29060
|
}
|
|
29060
29061
|
}
|
|
@@ -29080,12 +29081,16 @@
|
|
|
29080
29081
|
}
|
|
29081
29082
|
return op;
|
|
29082
29083
|
};
|
|
29083
|
-
var getListMenuByName = function (menu, customPath) {
|
|
29084
|
+
var getListMenuByName = function (menu, customPath, customEndpoint) {
|
|
29084
29085
|
if (customPath === void 0) { customPath = ''; }
|
|
29086
|
+
if (customEndpoint === void 0) { customEndpoint = ''; }
|
|
29085
29087
|
var appXhr = new XMLHttpRequest();
|
|
29086
29088
|
if (customPath) {
|
|
29087
29089
|
appXhr.open('GET', customPath, false);
|
|
29088
29090
|
}
|
|
29091
|
+
else if (customEndpoint) {
|
|
29092
|
+
appXhr.open('GET', customEndpoint + "/assets/menus/" + menu + ".json", false);
|
|
29093
|
+
}
|
|
29089
29094
|
else {
|
|
29090
29095
|
appXhr.open('GET', "assets/menus/" + menu + ".json", false);
|
|
29091
29096
|
}
|