blixify-ui-web 0.4.77 → 0.4.79

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFA82NvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAigOvB,CAAC"}
@@ -335,6 +335,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
335
335
  var isEditor = ((_s = props.edit) === null || _s === void 0 ? void 0 : _s.allEditable) ? true : false;
336
336
  var isOffline = (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareOffline;
337
337
  var showId = (_u = props.space) === null || _u === void 0 ? void 0 : _u.showId;
338
+ var remainId = showId || selectedObjectStructureId ? true : false;
338
339
  var idField = (_v = props.space) === null || _v === void 0 ? void 0 : _v.idField;
339
340
  var pipeline = (_w = props === null || props === void 0 ? void 0 : props.space) === null || _w === void 0 ? void 0 : _w.pipeline;
340
341
  if ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListPipeline) {
@@ -516,21 +517,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
516
517
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
517
518
  var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
518
519
  var currentTab, kanbanSettings, kanbanTitle_1, kanbanRefRQ_1, kanbanRefOption_1, kanbanRefLabel_1, kanbanRefQuery;
519
- var _a, _b, _c, _d, _e, _f;
520
- return __generator(this, function (_g) {
521
- switch (_g.label) {
520
+ var _a, _b, _c, _d, _e, _f, _g;
521
+ return __generator(this, function (_h) {
522
+ switch (_h.label) {
522
523
  case 0:
523
524
  currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
524
525
  if (!(props.type === "list")) return [3 /*break*/, 5];
525
526
  setSelectedTab(currentTab);
526
527
  if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "calendar")) return [3 /*break*/, 1];
528
+ if ((_c = currentTab === null || currentTab === void 0 ? void 0 : currentTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultStartDate) {
529
+ setCalendarTabMonth((0, moment_1.default)(currentTab.calendarSettings.defaultStartDate).toDate());
530
+ }
527
531
  setFilterSearch({});
528
532
  setFilterSearchParams({});
529
533
  return [3 /*break*/, 5];
530
534
  case 1:
531
535
  if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "kanban")) return [3 /*break*/, 4];
532
536
  kanbanSettings = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings;
533
- kanbanTitle_1 = (_c = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _c !== void 0 ? _c : "";
537
+ kanbanTitle_1 = (_d = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _d !== void 0 ? _d : "";
534
538
  kanbanRefRQ_1 = null;
535
539
  kanbanRefOption_1 = [];
536
540
  kanbanRefLabel_1 = "";
@@ -555,10 +559,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
555
559
  return [4 /*yield*/, kanbanRefRQ_1.call({
556
560
  type: "list",
557
561
  limit: limit,
558
- query: ((_d = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings) === null || _d === void 0 ? void 0 : _d.query) || undefined,
562
+ query: ((_e = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings) === null || _e === void 0 ? void 0 : _e.query) || undefined,
559
563
  })];
560
564
  case 2:
561
- kanbanRefQuery = _g.sent();
565
+ kanbanRefQuery = _h.sent();
562
566
  if (kanbanRefQuery.data) {
563
567
  kanbanRefQuery.data.map(function (eachData) {
564
568
  kanbanRefOption_1.push({
@@ -568,7 +572,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
568
572
  return null;
569
573
  });
570
574
  }
571
- _g.label = 3;
575
+ _h.label = 3;
572
576
  case 3:
573
577
  setKanbanOptions(kanbanRefOption_1);
574
578
  return [3 /*break*/, 5];
@@ -581,14 +585,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
581
585
  setFilterSearch({});
582
586
  setFilterSearchParams({});
583
587
  if (currentTab.structure)
584
- setStructure((_e = currentTab.structure) !== null && _e !== void 0 ? _e : []);
588
+ setStructure((_f = currentTab.structure) !== null && _f !== void 0 ? _f : []);
585
589
  if (currentTab.additionalQuery)
586
- setAdditionalQuery((_f = currentTab.additionalQuery) !== null && _f !== void 0 ? _f : []);
590
+ setAdditionalQuery((_g = currentTab.additionalQuery) !== null && _g !== void 0 ? _g : []);
587
591
  if (currentTab.groupBy)
588
592
  setGroupId(currentTab.groupBy);
589
593
  setExportPDFTitle(currentTab === null || currentTab === void 0 ? void 0 : currentTab.name);
590
594
  }
591
- _g.label = 5;
595
+ _h.label = 5;
592
596
  case 5: return [2 /*return*/];
593
597
  }
594
598
  });
@@ -700,15 +704,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
700
704
  return sort;
701
705
  };
702
706
  var handleReadQueryHocCond = function () {
703
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
707
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
704
708
  var query = (_a = renderImpSearchFilterConditions()) !== null && _a !== void 0 ? _a : [];
705
709
  var calendarSettings = false;
706
710
  if (selectedTab && selectedTab.viewType === "calendar") {
707
711
  var startDate = (0, moment_1.default)(calendarTabMonth).toDate();
708
712
  var endDate = (0, moment_1.default)(calendarTabMonth).toDate();
709
713
  var customCalendarView = calendarView;
710
- if ((_b = selectedTab.calendarSettings) === null || _b === void 0 ? void 0 : _b.customPlugin)
711
- customCalendarView = "timeGridWeek";
714
+ if ((_b = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _b === void 0 ? void 0 : _b.customPlugin) {
715
+ if ((_c = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultView)
716
+ customCalendarView = selectedTab.calendarSettings.defaultView;
717
+ else
718
+ customCalendarView = "timeGridWeek";
719
+ }
712
720
  if (customCalendarView === "timeGridDay") {
713
721
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("day").toDate();
714
722
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("day").toDate();
@@ -716,23 +724,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
716
724
  else if (customCalendarView === "timeGridWeek") {
717
725
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("isoWeek").toDate();
718
726
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("isoWeek").toDate();
727
+ if ((_d = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _d === void 0 ? void 0 : _d.customView) {
728
+ var _q = (_e = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _e === void 0 ? void 0 : _e.customView, view = _q.view, duration = _q.duration;
729
+ if (view &&
730
+ duration &&
731
+ view === "week" &&
732
+ duration > 0 &&
733
+ duration < 5) {
734
+ startDate = (0, moment_1.default)(calendarTabMonth).startOf("isoWeek").toDate();
735
+ endDate = (0, moment_1.default)(startDate)
736
+ .clone()
737
+ .add(duration, "weeks")
738
+ .subtract(1, "days")
739
+ .endOf("day")
740
+ .toDate();
741
+ }
742
+ }
719
743
  }
720
744
  else {
721
745
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("month").toDate();
722
746
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("month").toDate();
723
747
  }
724
- if ((_c = selectedTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.endDate) {
748
+ if ((_f = selectedTab.calendarSettings) === null || _f === void 0 ? void 0 : _f.endDate) {
725
749
  //INFO 1 : Check my date is in range of calendar
726
750
  query.push({
727
751
  type: ">",
728
- queryId: (_d = selectedTab.calendarSettings) === null || _d === void 0 ? void 0 : _d.startDate,
752
+ queryId: (_g = selectedTab.calendarSettings) === null || _g === void 0 ? void 0 : _g.startDate,
729
753
  value: (0, moment_1.default)(startDate).toISOString(),
730
754
  orQuery: true,
731
755
  orQueryGroupId: "1",
732
756
  });
733
757
  query.push({
734
758
  type: "<",
735
- queryId: (_e = selectedTab.calendarSettings) === null || _e === void 0 ? void 0 : _e.endDate,
759
+ queryId: (_h = selectedTab.calendarSettings) === null || _h === void 0 ? void 0 : _h.endDate,
736
760
  value: (0, moment_1.default)(endDate).toISOString(),
737
761
  orQuery: true,
738
762
  orQueryGroupId: "1",
@@ -740,14 +764,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
740
764
  //INFO 2 : Check start date before and my end date is after the range of calendar
741
765
  query.push({
742
766
  type: "<",
743
- queryId: (_f = selectedTab.calendarSettings) === null || _f === void 0 ? void 0 : _f.startDate,
767
+ queryId: (_j = selectedTab.calendarSettings) === null || _j === void 0 ? void 0 : _j.startDate,
744
768
  value: (0, moment_1.default)(startDate).toISOString(),
745
769
  orQuery: true,
746
770
  orQueryGroupId: "2",
747
771
  });
748
772
  query.push({
749
773
  type: ">",
750
- queryId: (_g = selectedTab.calendarSettings) === null || _g === void 0 ? void 0 : _g.endDate,
774
+ queryId: (_k = selectedTab.calendarSettings) === null || _k === void 0 ? void 0 : _k.endDate,
751
775
  value: (0, moment_1.default)(endDate).toISOString(),
752
776
  orQuery: true,
753
777
  orQueryGroupId: "2",
@@ -755,21 +779,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
755
779
  //INFO 3 : Check whether my start date and my end date is between the range of calendar
756
780
  query.push({
757
781
  type: "<",
758
- queryId: (_h = selectedTab.calendarSettings) === null || _h === void 0 ? void 0 : _h.startDate,
782
+ queryId: (_l = selectedTab.calendarSettings) === null || _l === void 0 ? void 0 : _l.startDate,
759
783
  value: (0, moment_1.default)(endDate).toISOString(),
760
784
  orQuery: true,
761
785
  orQueryGroupId: "3",
762
786
  });
763
787
  query.push({
764
788
  type: ">",
765
- queryId: (_j = selectedTab.calendarSettings) === null || _j === void 0 ? void 0 : _j.endDate,
789
+ queryId: (_m = selectedTab.calendarSettings) === null || _m === void 0 ? void 0 : _m.endDate,
766
790
  value: (0, moment_1.default)(startDate).toISOString(),
767
791
  orQuery: true,
768
792
  orQueryGroupId: "3",
769
793
  });
770
794
  query.push({
771
795
  type: "=",
772
- queryId: (_k = selectedTab.calendarSettings) === null || _k === void 0 ? void 0 : _k.endDate,
796
+ queryId: (_o = selectedTab.calendarSettings) === null || _o === void 0 ? void 0 : _o.endDate,
773
797
  value: null,
774
798
  orQuery: true,
775
799
  orQueryGroupId: "4",
@@ -778,7 +802,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
778
802
  else {
779
803
  query.push({
780
804
  type: "><",
781
- queryId: (_l = selectedTab.calendarSettings) === null || _l === void 0 ? void 0 : _l.startDate,
805
+ queryId: (_p = selectedTab.calendarSettings) === null || _p === void 0 ? void 0 : _p.startDate,
782
806
  value: [
783
807
  (0, moment_1.default)(startDate).toISOString(),
784
808
  (0, moment_1.default)(endDate).toISOString(),
@@ -1398,13 +1422,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1398
1422
  return __generator(this, function (_d) {
1399
1423
  switch (_d.label) {
1400
1424
  case 0:
1401
- _d.trys.push([0, 7, , 8]);
1425
+ _d.trys.push([0, 9, , 10]);
1402
1426
  if (!(typeof selectedField === "string" &&
1403
1427
  eachImage.type !== "signature")) return [3 /*break*/, 1];
1404
1428
  return [2 /*return*/, selectedField];
1405
1429
  case 1:
1406
- if (!(multiple &&
1407
- selectedField["upload"] &&
1430
+ if (!multiple) return [3 /*break*/, 5];
1431
+ if (!(selectedField["upload"] &&
1408
1432
  Array.isArray(selectedField["upload"]))) return [3 /*break*/, 3];
1409
1433
  uploadedData_1 = [];
1410
1434
  return [4 /*yield*/, Promise.all(selectedField["upload"].map(function (eachField) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1419,7 +1443,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1419
1443
  }
1420
1444
  imageParentId = objectId ? objectId : dataId;
1421
1445
  if (listObjectId) {
1422
- imageParentId += "/".concat(listObjectId);
1446
+ imageParentId += "/".concat(listObjectId, "/").concat(eachImage.id);
1447
+ }
1448
+ else if (objectId) {
1449
+ imageParentId += "/".concat(eachImage.id);
1423
1450
  }
1424
1451
  fileName = (0, uuid_1.v4)() + eachImage.imageFileName;
1425
1452
  return [4 /*yield*/, handleUploadAxios(handleUploadEndpoint(eachImage), imageParentId, imageCollectionName, fileName, eachField.fileName, (_b = devSettings.bucketName) !== null && _b !== void 0 ? _b : "")];
@@ -1437,9 +1464,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1437
1464
  case 2:
1438
1465
  _d.sent();
1439
1466
  return [2 /*return*/, selectedField["data"].concat(uploadedData_1)];
1440
- case 3:
1467
+ case 3: return [2 /*return*/, selectedField];
1468
+ case 4: return [3 /*break*/, 8];
1469
+ case 5:
1441
1470
  if (!(selectedField instanceof File ||
1442
- eachImage.type === "signature")) return [3 /*break*/, 6];
1471
+ eachImage.type === "signature")) return [3 /*break*/, 8];
1443
1472
  imageValue = selectedField;
1444
1473
  if (eachImage.type === "signature" &&
1445
1474
  selectedField &&
@@ -1454,44 +1483,61 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1454
1483
  if (listObjectId) {
1455
1484
  imageParentId += "/".concat(listObjectId);
1456
1485
  }
1457
- if (!imageValue) return [3 /*break*/, 5];
1486
+ if (!imageValue) return [3 /*break*/, 7];
1458
1487
  return [4 /*yield*/, handleUploadAxios(handleUploadEndpoint(eachImage), imageParentId, imageCollectionName, (_b = eachImage.imageFileName) !== null && _b !== void 0 ? _b : "", imageValue, (_c = devSettings.bucketName) !== null && _c !== void 0 ? _c : "")];
1459
- case 4:
1488
+ case 6:
1460
1489
  responseData = _d.sent();
1461
1490
  if (responseData.data) {
1462
1491
  return [2 /*return*/, responseData.data.data];
1463
1492
  }
1464
1493
  else
1465
1494
  return [2 /*return*/, ""];
1466
- return [3 /*break*/, 6];
1467
- case 5: return [2 /*return*/, ""];
1468
- case 6: return [3 /*break*/, 8];
1469
- case 7:
1470
- err_5 = _d.sent();
1471
1495
  return [3 /*break*/, 8];
1472
- case 8: return [2 /*return*/];
1496
+ case 7: return [2 /*return*/, ""];
1497
+ case 8: return [3 /*break*/, 10];
1498
+ case 9:
1499
+ err_5 = _d.sent();
1500
+ return [3 /*break*/, 10];
1501
+ case 10: return [2 /*return*/];
1473
1502
  }
1474
1503
  });
1475
1504
  }); };
1476
- removeAsset_1 = function (eachImage, selectedField) { return __awaiter(void 0, void 0, void 0, function () {
1505
+ removeAsset_1 = function (eachImage, selectedField, multiple, listObjectId) { return __awaiter(void 0, void 0, void 0, function () {
1477
1506
  return __generator(this, function (_a) {
1478
1507
  switch (_a.label) {
1479
- case 0: return [4 /*yield*/, Promise.all(selectedField["remove"].map(function (eachField) { return __awaiter(void 0, void 0, void 0, function () {
1480
- var startIndex, endIndex, imageFileName;
1481
- var _a, _b, _c;
1482
- return __generator(this, function (_d) {
1483
- switch (_d.label) {
1484
- case 0:
1485
- startIndex = eachField.fileName.lastIndexOf("%2F") + 3;
1486
- endIndex = eachField.fileName.indexOf("?alt=media&token=");
1487
- imageFileName = eachField.fileName.substring(startIndex, endIndex);
1488
- return [4 /*yield*/, handleRemoveImageAxios(handleUploadEndpoint(eachImage), (_a = props.id) !== null && _a !== void 0 ? _a : "", (_b = eachImage.imageCollectionName) !== null && _b !== void 0 ? _b : "", imageFileName, (_c = devSettings.bucketName) !== null && _c !== void 0 ? _c : "")];
1489
- case 1:
1490
- _d.sent();
1491
- return [2 /*return*/];
1492
- }
1493
- });
1494
- }); }))];
1508
+ case 0:
1509
+ if (!selectedField || !selectedField["remove"])
1510
+ return [2 /*return*/];
1511
+ return [4 /*yield*/, Promise.all(selectedField["remove"].map(function (eachField) { return __awaiter(void 0, void 0, void 0, function () {
1512
+ var startIndex, endIndex, imageFileName, imageCollectionName, imageParentId;
1513
+ var _a, _b;
1514
+ return __generator(this, function (_c) {
1515
+ switch (_c.label) {
1516
+ case 0:
1517
+ startIndex = eachField.fileName.lastIndexOf("%2F") + 3;
1518
+ endIndex = eachField.fileName.indexOf("?alt=media&token=");
1519
+ imageFileName = eachField.fileName.substring(startIndex, endIndex);
1520
+ imageCollectionName = (_a = eachImage.imageCollectionName) !== null && _a !== void 0 ? _a : "";
1521
+ if (objectId) {
1522
+ imageCollectionName += "/".concat(dataId);
1523
+ }
1524
+ imageParentId = objectId ? objectId : dataId;
1525
+ if (listObjectId) {
1526
+ imageParentId += "/".concat(listObjectId);
1527
+ if (multiple)
1528
+ imageParentId += "/".concat(eachImage.id);
1529
+ }
1530
+ else if (objectId) {
1531
+ if (multiple)
1532
+ imageParentId += "/".concat(eachImage.id);
1533
+ }
1534
+ return [4 /*yield*/, handleRemoveImageAxios(handleUploadEndpoint(eachImage), imageParentId, imageCollectionName, imageFileName, (_b = devSettings.bucketName) !== null && _b !== void 0 ? _b : "")];
1535
+ case 1:
1536
+ _c.sent();
1537
+ return [2 /*return*/];
1538
+ }
1539
+ });
1540
+ }); }))];
1495
1541
  case 1:
1496
1542
  _a.sent();
1497
1543
  return [2 /*return*/];
@@ -1559,18 +1605,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1559
1605
  eachAttribute.type === "multipleFile");
1560
1606
  });
1561
1607
  return [4 /*yield*/, Promise.all(multiImageAttribute.map(function (eachImage) { return __awaiter(void 0, void 0, void 0, function () {
1562
- var _a, _b;
1563
- return __generator(this, function (_c) {
1564
- switch (_c.label) {
1565
- case 0: return [4 /*yield*/, removeAsset_1(eachImage, selectedData[eachImage.id])];
1608
+ var _a, _b, _c, _d;
1609
+ return __generator(this, function (_e) {
1610
+ switch (_e.label) {
1611
+ case 0:
1612
+ if (!listObject) return [3 /*break*/, 3];
1613
+ if (!objectId)
1614
+ return [2 /*return*/];
1615
+ if (!Array.isArray(selectedData[objectId])) return [3 /*break*/, 2];
1616
+ return [4 /*yield*/, Promise.all(selectedData[objectId].map(function (eachListItem, index) { return __awaiter(void 0, void 0, void 0, function () {
1617
+ var selectedObjectId, _a, _b;
1618
+ var _c;
1619
+ return __generator(this, function (_d) {
1620
+ switch (_d.label) {
1621
+ case 0:
1622
+ selectedObjectId = (_c = eachListItem.id) !== null && _c !== void 0 ? _c : (0, uuid_1.v4)();
1623
+ return [4 /*yield*/, removeAsset_1(eachImage, selectedData[objectId][index][eachImage.id], true, selectedObjectId)];
1624
+ case 1:
1625
+ _d.sent();
1626
+ _a = selectedData[objectId][index];
1627
+ _b = eachImage.id;
1628
+ return [4 /*yield*/, uploadAsset_1(eachImage, selectedData[objectId][index][eachImage.id], selectedObjectId, true)];
1629
+ case 2:
1630
+ _a[_b] =
1631
+ _d.sent();
1632
+ return [2 /*return*/, null];
1633
+ }
1634
+ });
1635
+ }); }))];
1566
1636
  case 1:
1567
- _c.sent();
1568
- _a = selectedData;
1637
+ _e.sent();
1638
+ _e.label = 2;
1639
+ case 2: return [3 /*break*/, 9];
1640
+ case 3:
1641
+ if (!objectId) return [3 /*break*/, 6];
1642
+ return [4 /*yield*/, removeAsset_1(eachImage, selectedData[objectId][eachImage.id], true)];
1643
+ case 4:
1644
+ _e.sent();
1645
+ _a = selectedData[objectId];
1569
1646
  _b = eachImage.id;
1647
+ return [4 /*yield*/, uploadAsset_1(eachImage, selectedData[objectId][eachImage.id], undefined, true)];
1648
+ case 5:
1649
+ _a[_b] = _e.sent();
1650
+ return [3 /*break*/, 9];
1651
+ case 6: return [4 /*yield*/, removeAsset_1(eachImage, selectedData[eachImage.id])];
1652
+ case 7:
1653
+ _e.sent();
1654
+ _c = selectedData;
1655
+ _d = eachImage.id;
1570
1656
  return [4 /*yield*/, uploadAsset_1(eachImage, selectedData[eachImage.id], "", true)];
1571
- case 2:
1572
- _a[_b] = _c.sent();
1573
- return [2 /*return*/, null];
1657
+ case 8:
1658
+ _c[_d] = _e.sent();
1659
+ _e.label = 9;
1660
+ case 9: return [2 /*return*/, null];
1574
1661
  }
1575
1662
  });
1576
1663
  }); }))];
@@ -2790,14 +2877,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2790
2877
  };
2791
2878
  var handleOnChangeFile = function (e) {
2792
2879
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2793
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2880
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2794
2881
  clonedData[e.target.id] =
2795
2882
  e.target.files.length > 0 ? e.target.files[0] : undefined;
2796
2883
  handleUpdateChangeData(clonedData);
2797
2884
  };
2798
2885
  var handleOnChangeFiles = function (id, value, action) {
2799
2886
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2800
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2887
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2801
2888
  var previousData = clonedData[id] && clonedData[id]["data"] ? clonedData[id]["data"] : [];
2802
2889
  var previousUploadData = clonedData[id] && clonedData[id]["upload"]
2803
2890
  ? clonedData[id]["upload"]
@@ -2845,19 +2932,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2845
2932
  };
2846
2933
  var handleSignatureComplete = function (dataURL, id) {
2847
2934
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2848
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2935
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2849
2936
  clonedData[id] = dataURL;
2850
2937
  handleUpdateChangeData(clonedData);
2851
2938
  };
2852
2939
  var handleOnChangeAddress = function (id, address) {
2853
2940
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2854
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2941
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2855
2942
  clonedData[id] = address;
2856
2943
  handleUpdateChangeData(clonedData);
2857
2944
  };
2858
2945
  var handleOnChangeText = function (e) {
2859
2946
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2860
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2947
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2861
2948
  clonedData[e.target.id] = e.target.value;
2862
2949
  handleUpdateChangeData(clonedData);
2863
2950
  };
@@ -2867,7 +2954,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2867
2954
  switch (_b.label) {
2868
2955
  case 0:
2869
2956
  _a = handleOnChangeData(), data = _a.data, model = _a.model;
2870
- clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
2957
+ clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2871
2958
  refetchReference = false;
2872
2959
  if (!((Array.isArray(value) && value.includes("creation")) ||
2873
2960
  value === "creation")) return [3 /*break*/, 1];
@@ -2940,13 +3027,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2940
3027
  }); };
2941
3028
  var handleOnChangeDate = function (id, value) {
2942
3029
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2943
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
3030
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2944
3031
  clonedData[id] = value;
2945
3032
  handleUpdateChangeData(clonedData);
2946
3033
  };
2947
3034
  var handleOnChangeMarkdown = function (id, value) {
2948
3035
  var _a = handleOnChangeData(), data = _a.data, model = _a.model;
2949
- var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, showId ? true : false);
3036
+ var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
2950
3037
  clonedData[id] = value;
2951
3038
  handleUpdateChangeData(clonedData);
2952
3039
  };
@@ -3603,7 +3690,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3603
3690
  var renderListAddress = function (type) {
3604
3691
  var listElement = [];
3605
3692
  var isListAddress = structure.filter(function (eachAttribute) { return eachAttribute.type === "listAddress"; });
3606
- var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, showId ? true : false);
3693
+ var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, remainId);
3607
3694
  isListAddress.map(function (eachListAdressFields) {
3608
3695
  if (type === "update") {
3609
3696
  var isForm = props.onComplete ? true : false;
@@ -3671,7 +3758,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3671
3758
  var isListObject = structure.filter(function (eachAttribute) { return eachAttribute.type === "listObject"; });
3672
3759
  var list = {};
3673
3760
  var listObjTableData = {};
3674
- var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, showId ? true : false);
3761
+ var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, remainId);
3675
3762
  isListObject.map(function (eachListObject) {
3676
3763
  var _a, _b, _c, _d, _e, _f, _g;
3677
3764
  if (type === "update") {
@@ -3729,6 +3816,35 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3729
3816
  eachNewList[eachKey] = (react_1.default.createElement("img", { src: url, alt: "", className: "object-contain w-10 h-10" }));
3730
3817
  eachNewTable[eachKey] = (react_1.default.createElement("img", { src: url, alt: "", className: "object-contain w-10 h-10" }));
3731
3818
  break;
3819
+ case "multipleImage":
3820
+ var urlList_1 = [];
3821
+ var combinedList = [];
3822
+ if (eachValue)
3823
+ combinedList = Array.isArray(eachValue)
3824
+ ? eachValue
3825
+ : __spreadArray(__spreadArray([], eachValue === null || eachValue === void 0 ? void 0 : eachValue.data, true), eachValue === null || eachValue === void 0 ? void 0 : eachValue.upload, true);
3826
+ combinedList.map(function (eachImage) {
3827
+ var _a, _b;
3828
+ var url;
3829
+ if (typeof eachImage.fileName === "string") {
3830
+ url = (0, blobModule_1.renderImageUrlFromPath)(devSettings.imageEndpoint, model_2.imageCollectionName + "%2F" + props.id, eachListObject.id +
3831
+ "%2F" +
3832
+ eachObject.id +
3833
+ "%2F" +
3834
+ eachKey, (_a = eachImage === null || eachImage === void 0 ? void 0 : eachImage.fileName) !== null && _a !== void 0 ? _a : "", (_b = eachImage === null || eachImage === void 0 ? void 0 : eachImage.token) !== null && _b !== void 0 ? _b : "", devSettings.bucketName);
3835
+ }
3836
+ else if (eachImage.fileName instanceof File) {
3837
+ url = URL.createObjectURL(eachImage.fileName);
3838
+ }
3839
+ if (url)
3840
+ urlList_1.push(url);
3841
+ return null;
3842
+ });
3843
+ if (urlList_1.length) {
3844
+ eachNewList[eachKey] = (react_1.default.createElement("div", { className: "flex gap-x-2" }, urlList_1.map(function (eachUrl, index) { return (react_1.default.createElement("img", { key: index, src: eachUrl, alt: "list-obj-multi-img-".concat(eachUrl), className: "object-contain w-10 h-10" })); })));
3845
+ eachNewTable[eachKey] = (react_1.default.createElement("div", { className: "flex gap-x-2" }, urlList_1.map(function (eachUrl, index) { return (react_1.default.createElement("img", { key: index, src: eachUrl, alt: "list-obj-multi-img-".concat(eachUrl), className: "object-contain w-10 h-10" })); })));
3846
+ }
3847
+ break;
3732
3848
  case "reference":
3733
3849
  if (referencesOptions[eachListObject.id + "." + model_2.id]) {
3734
3850
  var selectedReferences = referencesOptions[eachListObject.id + "." + model_2.id].find(function (eachOption) { return eachOption.key === eachValue; });
@@ -4881,7 +4997,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4881
4997
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
4882
4998
  }, height: "95vh", dayCellMinHeight: 120, lib: { moment: moment_1.default }, customPlugin: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customPlugin, headerToolbar: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.headerToolbar, footerToolbar: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.footerToolbar, customButtons: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customButtons, customHeaderFn: (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customHeader)
4883
4999
  ? function () { return calendarSettings_1.customHeader || ""; }
4884
- : undefined, handleCalendarResize: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.handleCalendarResize }))));
5000
+ : undefined, customView: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customView, handleCalendarResize: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.handleCalendarResize }))));
4885
5001
  }
4886
5002
  else if (selectedTabData.viewType === "feeds") {
4887
5003
  var contentList_1 = [];