tnx-shared 5.1.628 → 5.1.629

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.
@@ -27706,16 +27706,17 @@
27706
27706
  CommonErrorCode.ERROR_NOT_FOUND = 'ERR_NOT_FOUND';
27707
27707
  CommonErrorCode.ERROR_SERVICE_NOT_RUN = 0;
27708
27708
 
27709
- var getMenuData = function (listMenuName, customPath) {
27709
+ var getMenuData = function (listMenuName, customPath, customEndpoint) {
27710
27710
  var e_1, _a;
27711
27711
  if (customPath === void 0) { customPath = ''; }
27712
+ if (customEndpoint === void 0) { customEndpoint = ''; }
27712
27713
  var res = [];
27713
27714
  try {
27714
27715
  for (var listMenuName_1 = __values(listMenuName), listMenuName_1_1 = listMenuName_1.next(); !listMenuName_1_1.done; listMenuName_1_1 = listMenuName_1.next()) {
27715
27716
  var menu = listMenuName_1_1.value;
27716
27717
  res.push({
27717
27718
  fileName: menu,
27718
- dataMenus: getListMenuByName(menu, customPath)
27719
+ dataMenus: getListMenuByName(menu, customPath, customEndpoint)
27719
27720
  });
27720
27721
  }
27721
27722
  }
@@ -27741,12 +27742,16 @@
27741
27742
  }
27742
27743
  return op;
27743
27744
  };
27744
- var getListMenuByName = function (menu, customPath) {
27745
+ var getListMenuByName = function (menu, customPath, customEndpoint) {
27745
27746
  if (customPath === void 0) { customPath = ''; }
27747
+ if (customEndpoint === void 0) { customEndpoint = ''; }
27746
27748
  var appXhr = new XMLHttpRequest();
27747
27749
  if (customPath) {
27748
27750
  appXhr.open('GET', customPath, false);
27749
27751
  }
27752
+ else if (customEndpoint) {
27753
+ appXhr.open('GET', customEndpoint + "/assets/menus/" + menu + ".json", false);
27754
+ }
27750
27755
  else {
27751
27756
  appXhr.open('GET', "assets/menus/" + menu + ".json", false);
27752
27757
  }