blixify-ui-web 0.4.28 → 0.4.30

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.
@@ -758,18 +758,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
758
758
  };
759
759
  var handleGetListData = function (responseData, type, rowId) { return __awaiter(void 0, void 0, void 0, function () {
760
760
  var dataList, prettierDataList, clonedTableData, clonedSpaceTableData, dummyPrettierDataList_1, selectedIndex_1, isGridScroll, newTableData, newPrettierTableData, isExists, cursorResp, lastDataId;
761
- var _a, _b, _c, _d, _e, _f, _g, _h;
762
- return __generator(this, function (_j) {
763
- switch (_j.label) {
761
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
762
+ return __generator(this, function (_m) {
763
+ switch (_m.label) {
764
764
  case 0:
765
765
  dataList = [];
766
766
  prettierDataList = [];
767
767
  clonedTableData = JSON.parse(JSON.stringify(tableData));
768
768
  clonedSpaceTableData = JSON.parse(JSON.stringify(spaceTableData));
769
- if (!responseData) return [3 /*break*/, 4];
769
+ if (!(responseData === null || responseData === void 0 ? void 0 : responseData.data)) return [3 /*break*/, 4];
770
770
  if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareOffline)) return [3 /*break*/, 1];
771
771
  dummyPrettierDataList_1 = [];
772
- responseData.data.map(function (eachData) {
772
+ (_b = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _b === void 0 ? void 0 : _b.map(function (eachData) {
773
773
  var _a, _b;
774
774
  var tempData = eachData;
775
775
  (0, listModule_1.handleDataEditButton)(tempData, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate, (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListActionBtns);
@@ -778,12 +778,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
778
778
  });
779
779
  prettierDataList = dummyPrettierDataList_1;
780
780
  return [3 /*break*/, 3];
781
- case 1: return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(responseData.data, props.devSettings, (_b = props.lib) === null || _b === void 0 ? void 0 : _b.axios, props.model, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.handleNavigate, ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.viewId) === "general", setActivityModal, setActivityId, isActivityLog ? (_e = props.edit) === null || _e === void 0 ? void 0 : _e.activityLog : undefined, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListActionBtns)];
781
+ case 1: return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(responseData === null || responseData === void 0 ? void 0 : responseData.data, props.devSettings, (_c = props.lib) === null || _c === void 0 ? void 0 : _c.axios, props.model, (_d = props.organise) === null || _d === void 0 ? void 0 : _d.handleNavigate, ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) === "general", setActivityModal, setActivityId, isActivityLog ? (_f = props.edit) === null || _f === void 0 ? void 0 : _f.activityLog : undefined, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListActionBtns)];
782
782
  case 2:
783
- prettierDataList = _j.sent();
784
- _j.label = 3;
783
+ prettierDataList = _m.sent();
784
+ _m.label = 3;
785
785
  case 3:
786
- responseData.data.map(function (eachData) {
786
+ (_h = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _h === void 0 ? void 0 : _h.map(function (eachData) {
787
787
  if (eachData["_id"]) {
788
788
  eachData["id"] = eachData["_id"];
789
789
  delete eachData["_id"];
@@ -791,7 +791,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
791
791
  return null;
792
792
  });
793
793
  dataList = responseData.data;
794
- _j.label = 4;
794
+ _m.label = 4;
795
795
  case 4:
796
796
  if (type === "update" || type === "create") {
797
797
  try {
@@ -803,13 +803,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
803
803
  return null;
804
804
  });
805
805
  if (selectedIndex_1 > -1) {
806
- clonedTableData[selectedIndex_1] = (_g = responseData.data) === null || _g === void 0 ? void 0 : _g[0];
806
+ clonedTableData[selectedIndex_1] = (_j = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _j === void 0 ? void 0 : _j[0];
807
807
  clonedSpaceTableData[selectedIndex_1] = prettierDataList === null || prettierDataList === void 0 ? void 0 : prettierDataList[0];
808
808
  }
809
809
  }
810
810
  else {
811
- clonedTableData.push(responseData.data[0]);
812
- clonedSpaceTableData.push(prettierDataList[0]);
811
+ clonedTableData.push((_k = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _k === void 0 ? void 0 : _k[0]);
812
+ clonedSpaceTableData.push(prettierDataList === null || prettierDataList === void 0 ? void 0 : prettierDataList[0]);
813
813
  }
814
814
  handleSetListData(clonedTableData, clonedSpaceTableData);
815
815
  }
@@ -819,7 +819,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
819
819
  isGridScroll = renderCheckGridScroll();
820
820
  if (!isGridScroll && !isFirebase) {
821
821
  handleSetListData(dataList, prettierDataList);
822
- setSize((_h = responseData.count) !== null && _h !== void 0 ? _h : 0);
822
+ setSize((_l = responseData.count) !== null && _l !== void 0 ? _l : 0);
823
823
  }
824
824
  else {
825
825
  newTableData = [];