blixify-ui-web 0.4.97 → 0.4.99

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.
@@ -78,7 +78,7 @@ var PopUp = /** @class */ (function (_super) {
78
78
  react_1.default.createElement(react_1.default.Fragment, null,
79
79
  react_1.default.createElement("div", { className: "cursor-pointer", onClick: function () {
80
80
  return _this.setState({
81
- open: true,
81
+ open: !_this.state.open,
82
82
  });
83
83
  } }, this.props.ctaComp && this.props.ctaComp),
84
84
  this.state.open && (react_1.default.createElement(Transition, { show: this.state.open, as: react_1.Fragment, enter: "transition ease-out duration-200", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95" },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/advanced/popUp/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAiE;AACjE,8BAA4B;AAiB5B;IAA2B,yBAAgB;IAA3C;;QAEE,WAAK,GAAU;YACb,IAAI,EAAE,KAAK;SACZ,CAAC;QAYF,yBAAmB,GAAG,UAAC,KAAK;YAC1B,KAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC;QAEF,wBAAkB,GAAG,UAAC,KAAK;YACzB,IAAI,KAAI,CAAC,UAAU,IAAI,CAAC,KAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC/D,IAAI,KAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;oBACpB,IAAI,KAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;wBACvB,KAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;oBACvB,CAAC;oBACD,KAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,K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AAU,CAC3C,CACK,CACd,CACA,CACC,CACP,CAAC;IACJ,CAAC;IACH,YAAC;AAAD,CAAC,AA1ED,CAA2B,iBAAS,GA0EnC;AA1EY,sBAAK"}
@@ -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;AAoEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAstOvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAqEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAm7NvB,CAAC"}
@@ -485,7 +485,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
485
485
  }, [selectedData, props.id]);
486
486
  //INFO : Change Data Type & ID Refresh
487
487
  (0, react_1.useEffect)(function () {
488
- var _a;
488
+ var _a, _b, _c;
489
489
  switch (props.type) {
490
490
  case "read":
491
491
  case "update":
@@ -497,12 +497,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
497
497
  setSelectedData({});
498
498
  setSelectedObjectData({});
499
499
  setSelectedIds([]);
500
+ setActiveTab((_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "");
500
501
  if (props.id !== "new" && props.id !== "") {
501
502
  setModalVisible(true);
502
503
  setLoading(true);
503
504
  if ((previousType.current === "read" && props.type === "update") ||
504
505
  (previousType.current === "update" && props.type === "read")) {
505
- (_a = readQueryHocRef.current) === null || _a === void 0 ? void 0 : _a.handleRefresh();
506
+ (_c = readQueryHocRef.current) === null || _c === void 0 ? void 0 : _c.handleRefresh();
506
507
  }
507
508
  }
508
509
  if (props.id === "new") {
@@ -3793,243 +3794,28 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3793
3794
  return listElement;
3794
3795
  };
3795
3796
  var renderListObject = function (type) {
3797
+ var _a;
3796
3798
  var listElement = [];
3799
+ var hasTabAlign = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabAlign;
3797
3800
  var isListObject = structure.filter(function (eachAttribute) {
3798
3801
  var _a;
3799
3802
  var tabId = (_a = eachAttribute.tabId) !== null && _a !== void 0 ? _a : "";
3800
- if (eachAttribute.type === "listObject" && tabId === activeTab)
3801
- return true;
3803
+ if (eachAttribute.type === "listObject") {
3804
+ if (type === "update" &&
3805
+ !eachAttribute.listObjOrder &&
3806
+ ((hasTabAlign && tabId === activeTab) || !hasTabAlign)) {
3807
+ return true;
3808
+ }
3809
+ else if (type === "read") {
3810
+ return true;
3811
+ }
3812
+ }
3802
3813
  return false;
3803
3814
  });
3804
- var list = {};
3805
- var listObjTableData = {};
3806
3815
  var clonedSelectedData = (0, updateModule_1.handleClonedDataAttribute)(selectedData, structure, props.devSettings.server, false, remainId);
3807
3816
  isListObject.map(function (eachListObject) {
3808
- var _a, _b, _c, _d, _e, _f, _g;
3809
- if (type === "update") {
3810
- var isForm = props.onComplete ? true : false;
3811
- var shouldShow = (0, updateModule_1.renderShowCondition)(eachListObject, clonedSelectedData, isForm);
3812
- if (!shouldShow)
3813
- return null;
3814
- }
3815
- if (props.onComplete &&
3816
- eachListObject.hideForm &&
3817
- eachListObject.optional) {
3818
- return null;
3819
- }
3820
- else if (clonedSelectedData[eachListObject.id] &&
3821
- Array.isArray(clonedSelectedData[eachListObject.id])) {
3822
- var checkIdExists_1 = (_a = eachListObject === null || eachListObject === void 0 ? void 0 : eachListObject.objectData) === null || _a === void 0 ? void 0 : _a.some(function (eachAttribute) {
3823
- return eachAttribute.id === "id";
3824
- });
3825
- var eachListObjTableHeaders = (_c = (_b = eachListObject === null || eachListObject === void 0 ? void 0 : eachListObject.objectData) === null || _b === void 0 ? void 0 : _b.map(function (eachObj) { return ({
3826
- key: eachObj.id,
3827
- title: eachObj.name,
3828
- }); })) !== null && _c !== void 0 ? _c : [];
3829
- clonedSelectedData[eachListObject.id].map(function (eachObject) {
3830
- var _a, _b;
3831
- var eachNewList = {
3832
- id: "",
3833
- title: "",
3834
- };
3835
- var eachNewTable = { id: "" };
3836
- var isTitle = true;
3837
- var _loop_3 = function (eachKey, eachValue) {
3838
- if (eachListObject.objectData) {
3839
- var model_2 = eachListObject.objectData.find(function (eachAttribute) {
3840
- return eachAttribute.id === eachKey;
3841
- });
3842
- switch (model_2 === null || model_2 === void 0 ? void 0 : model_2.type) {
3843
- case "string":
3844
- case "contact":
3845
- case "email":
3846
- isTitle
3847
- ? (eachNewList["title"] =
3848
- typeof eachValue === "string" ? eachValue : "")
3849
- : (eachNewList[eachKey] = model_2.name + " : " + eachValue);
3850
- isTitle = false;
3851
- eachNewTable[eachKey] = eachValue;
3852
- break;
3853
- case "image":
3854
- var url = void 0;
3855
- if (typeof eachValue === "string") {
3856
- url = (0, blobModule_1.renderImageUrlFromPath)(devSettings.imageEndpoint, model_2.imageCollectionName + "%2F" + props.id, eachListObject.id + "%2F" + eachObject.id, model_2.imageFileName, eachValue, devSettings.bucketName);
3857
- }
3858
- else if (eachValue instanceof File) {
3859
- url = URL.createObjectURL(eachValue);
3860
- }
3861
- eachNewList[eachKey] = (react_1.default.createElement("img", { src: url, alt: "", className: "object-contain w-10 h-10" }));
3862
- eachNewTable[eachKey] = (react_1.default.createElement("img", { src: url, alt: "", className: "object-contain w-10 h-10" }));
3863
- break;
3864
- case "multipleImage":
3865
- var urlList_1 = [];
3866
- var combinedList = [];
3867
- if (eachValue)
3868
- combinedList = Array.isArray(eachValue)
3869
- ? eachValue
3870
- : __spreadArray(__spreadArray([], eachValue === null || eachValue === void 0 ? void 0 : eachValue.data, true), eachValue === null || eachValue === void 0 ? void 0 : eachValue.upload, true);
3871
- combinedList.map(function (eachImage) {
3872
- var _a, _b;
3873
- var url;
3874
- if (typeof eachImage.fileName === "string") {
3875
- url = (0, blobModule_1.renderImageUrlFromPath)(devSettings.imageEndpoint, model_2.imageCollectionName + "%2F" + props.id, eachListObject.id +
3876
- "%2F" +
3877
- eachObject.id +
3878
- "%2F" +
3879
- 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);
3880
- }
3881
- else if (eachImage.fileName instanceof File) {
3882
- url = URL.createObjectURL(eachImage.fileName);
3883
- }
3884
- if (url)
3885
- urlList_1.push(url);
3886
- return null;
3887
- });
3888
- if (urlList_1.length) {
3889
- 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" })); })));
3890
- 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" })); })));
3891
- }
3892
- break;
3893
- case "file":
3894
- case "multipleFile":
3895
- var fileElement = react_1.default.createElement(react_1.default.Fragment, null);
3896
- if (model_2.type === "file") {
3897
- if (eachValue)
3898
- fileElement = react_1.default.createElement("p", null, "1 file");
3899
- }
3900
- else {
3901
- var fileCount = Array.isArray(eachValue)
3902
- ? eachValue.length
3903
- : 0;
3904
- fileElement = react_1.default.createElement("p", null, "".concat(fileCount, " file(s)"));
3905
- }
3906
- eachNewList[eachKey] = fileElement;
3907
- eachNewTable[eachKey] = fileElement;
3908
- break;
3909
- case "reference":
3910
- if (referencesOptions[eachListObject.id + "." + model_2.id]) {
3911
- var selectedReferences = referencesOptions[eachListObject.id + "." + model_2.id].find(function (eachOption) { return eachOption.key === eachValue; });
3912
- eachNewList[eachKey] =
3913
- (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) === "id"
3914
- ? (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) +
3915
- " : " +
3916
- (eachValue ? (_a = selectedReferences === null || selectedReferences === void 0 ? void 0 : selectedReferences.label) !== null && _a !== void 0 ? _a : " - " : " ")
3917
- : eachValue
3918
- ? (_b = selectedReferences === null || selectedReferences === void 0 ? void 0 : selectedReferences.label) !== null && _b !== void 0 ? _b : " - "
3919
- : " ";
3920
- eachNewTable[eachKey] = selectedReferences === null || selectedReferences === void 0 ? void 0 : selectedReferences.label;
3921
- }
3922
- break;
3923
- case "listReference":
3924
- var refLabelList_1 = [];
3925
- if (referencesOptions[eachListObject.id + "." + model_2.id]) {
3926
- if (eachValue && Array.isArray(eachValue)) {
3927
- eachValue.map(function (eachRefValue) {
3928
- var _a;
3929
- var selectedReferences = referencesOptions[eachListObject.id + "." + model_2.id].find(function (eachOption) { return eachOption.key === eachRefValue; });
3930
- refLabelList_1.push((_a = selectedReferences === null || selectedReferences === void 0 ? void 0 : selectedReferences.label) !== null && _a !== void 0 ? _a : "-");
3931
- return null;
3932
- });
3933
- }
3934
- }
3935
- var refLabels = refLabelList_1.length > 0 ? refLabelList_1.join(",") : "-";
3936
- eachNewList[eachKey] =
3937
- (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) === "id"
3938
- ? (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) + " : " + (eachValue ? refLabels : "")
3939
- : eachValue
3940
- ? refLabels
3941
- : " ";
3942
- break;
3943
- case "date":
3944
- if (eachValue) {
3945
- var timeStamp = isFirebase && (eachValue === null || eachValue === void 0 ? void 0 : eachValue["_seconds"])
3946
- ? (eachValue === null || eachValue === void 0 ? void 0 : eachValue["_seconds"]) * 1000
3947
- : eachValue;
3948
- eachNewList[eachKey] =
3949
- (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) +
3950
- " : " +
3951
- (0, moment_1.default)(timeStamp).format("DD/MM/YYYY h:mm a");
3952
- eachNewTable[eachKey] =
3953
- (0, moment_1.default)(timeStamp).format("DD/MM/YYYY h:mm a");
3954
- }
3955
- else {
3956
- eachNewList[eachKey] = (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) + " : -";
3957
- }
3958
- break;
3959
- case "address":
3960
- case "object":
3961
- break;
3962
- default:
3963
- if (eachKey === "id" && typeof eachValue === "string") {
3964
- eachNewList[eachKey] = eachValue;
3965
- eachNewTable[eachKey] = eachValue;
3966
- }
3967
- else {
3968
- eachNewList[eachKey] = (model_2 === null || model_2 === void 0 ? void 0 : model_2.name) + " : " + eachValue;
3969
- eachNewTable[eachKey] = eachValue;
3970
- }
3971
- break;
3972
- }
3973
- }
3974
- };
3975
- for (var _i = 0, _c = Object.entries(eachObject); _i < _c.length; _i++) {
3976
- var _d = _c[_i], eachKey = _d[0], eachValue = _d[1];
3977
- _loop_3(eachKey, eachValue);
3978
- }
3979
- if (!checkIdExists_1) {
3980
- delete eachNewList["id"];
3981
- delete eachNewList["_id"];
3982
- }
3983
- if (list === null || list === void 0 ? void 0 : list[eachListObject.id])
3984
- list[eachListObject.id].push(eachNewList);
3985
- else
3986
- list[eachListObject.id] = [eachNewList];
3987
- if (listObjTableData === null || listObjTableData === void 0 ? void 0 : listObjTableData[eachListObject.id])
3988
- listObjTableData[eachListObject.id].push(eachNewTable);
3989
- else
3990
- listObjTableData[eachListObject.id] = [eachNewTable];
3991
- return null;
3992
- });
3993
- if (!list[eachListObject.id] && type === "update") {
3994
- if ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.listObjectTableView) {
3995
- listElement.push(react_1.default.createElement(react_1.default.Fragment, null,
3996
- react_1.default.createElement("div", { className: "flex justify-between mt-5" },
3997
- react_1.default.createElement("h3", { className: "font-medium leading-6 text-gray-900 text-md sm:text-lg" }, eachListObject.name),
3998
- type === "update" && (react_1.default.createElement(iconButton_1.IconButton, { className: "sm", icon: react_1.default.createElement(outline_1.PlusCircleIcon, { className: "w-6 h-6 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
3999
- setSelectedObjectStructureId(eachListObject.id);
4000
- handlePopUpModal(true);
4001
- } }))),
4002
- react_1.default.createElement(table_1.Table, { loading: false, data: [], className: "w-full", header: eachListObjTableHeaders })));
4003
- }
4004
- else {
4005
- listElement.push(react_1.default.createElement(react_1.default.Fragment, null,
4006
- react_1.default.createElement("button", { type: "button", className: "relative block w-full p-12 mt-5 text-center border-2 border-gray-300 border-dashed rounded-lg", onClick: function () {
4007
- setSelectedObjectStructureId(eachListObject.id);
4008
- handlePopUpModal(true);
4009
- } },
4010
- react_1.default.createElement("svg", { className: "w-12 h-12 mx-auto text-gray-400", stroke: "currentColor", fill: "none", viewBox: "0 0 48 48", "aria-hidden": "true" },
4011
- react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 14v20c0 4.418 7.163 8 16 8 1.381 0 2.721-.087 4-.252M8 14c0 4.418 7.163 8 16 8s16-3.582 16-8M8 14c0-4.418 7.163-8 16-8s16 3.582 16 8m0 0v14m0-4c0 4.418-7.163 8-16 8S8 28.418 8 24m32 10v6m0 0v6m0-6h6m-6 0h-6" })),
4012
- react_1.default.createElement("span", { className: "block mt-2 text-sm font-medium text-gray-900" },
4013
- "Create a new ", "".concat(eachListObject.name.toLocaleLowerCase())))));
4014
- }
4015
- }
4016
- else {
4017
- if (list[eachListObject.id]) {
4018
- listElement.push(react_1.default.createElement(react_1.default.Fragment, null,
4019
- react_1.default.createElement("div", { className: "flex justify-between mt-5" },
4020
- react_1.default.createElement("h3", { className: "font-medium leading-6 text-gray-900 text-md sm:text-lg" }, eachListObject.name),
4021
- type === "update" && (react_1.default.createElement(iconButton_1.IconButton, { className: "sm", icon: react_1.default.createElement(outline_1.PlusCircleIcon, { className: "w-6 h-6 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
4022
- setSelectedObjectStructureId(eachListObject.id);
4023
- handlePopUpModal(true);
4024
- } }))),
4025
- react_1.default.createElement("div", { className: "flex flex-col space-y-2" }, ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.listObjectTableView) ? (react_1.default.createElement(table_1.Table, { loading: false, data: (_f = listObjTableData[eachListObject.id]) !== null && _f !== void 0 ? _f : [], onClickRow: function (id, index) {
4026
- handleSelectListObjectData(id, eachListObject.id, index);
4027
- }, className: "w-full", header: eachListObjTableHeaders })) : (react_1.default.createElement(list_1.List, { className: "my-5", list: (_g = list[eachListObject.id]) !== null && _g !== void 0 ? _g : [], showId: checkIdExists_1, loading: false, onClickRow: function (id, index) {
4028
- handleSelectListObjectData(id, eachListObject.id, index);
4029
- } })))));
4030
- }
4031
- }
4032
- }
3817
+ var _a, _b;
3818
+ listElement.push((0, updateModule_1.renderEachListObject)(type, eachListObject.id, props.model, clonedSelectedData, (_a = props.id) !== null && _a !== void 0 ? _a : "", remainId, props.onComplete ? true : false, ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.listObjectTableView) ? true : false, props.devSettings, handleSelectListObjectData, referencesOptions, setSelectedObjectStructureId, handlePopUpModal));
4033
3819
  return null;
4034
3820
  });
4035
3821
  return listElement;
@@ -4217,7 +4003,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4217
4003
  authList));
4218
4004
  };
4219
4005
  var renderContent = function () {
4220
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
4006
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
4221
4007
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
4222
4008
  var tabs = renderTabs();
4223
4009
  var pages = [
@@ -4302,10 +4088,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4302
4088
  filterModel_1.push(eachModel);
4303
4089
  return null;
4304
4090
  });
4091
+ var hasTabAlign_1 = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.tabAlign;
4305
4092
  var uniqueTabIds = Array.from(new Set(filterModel_1
4306
4093
  .map(function (item) { return item.tabId; })
4307
4094
  .filter(function (id) { return id !== undefined; })));
4308
- uniqueTabIds.push("");
4095
+ var shouldIncludeOthers = hasTabAlign_1 &&
4096
+ filterModel_1.some(function (eachModel) { return eachModel.id !== "id" && !eachModel.tabId; });
4097
+ if (shouldIncludeOthers) {
4098
+ uniqueTabIds.push("");
4099
+ }
4309
4100
  var tabBars = uniqueTabIds.map(function (tabId) { return ({
4310
4101
  id: tabId,
4311
4102
  name: tabId ? tabId : "Others",
@@ -4316,7 +4107,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4316
4107
  props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
4317
4108
  dbModule: dbModule,
4318
4109
  dbType: devSettings.server,
4319
- dbCollection: (_t = (_s = props === null || props === void 0 ? void 0 : props.space) === null || _s === void 0 ? void 0 : _s.pipelineDefaultSpaceId) !== null && _t !== void 0 ? _t : props.collectionId,
4110
+ dbCollection: (_u = (_t = props === null || props === void 0 ? void 0 : props.space) === null || _t === void 0 ? void 0 : _t.pipelineDefaultSpaceId) !== null && _u !== void 0 ? _u : props.collectionId,
4320
4111
  dbEndpoint: devSettings.dbEndpoint,
4321
4112
  dbAPIToken: devSettings.dbAPIToken,
4322
4113
  dbUserToken: devSettings.dbUserToken,
@@ -4324,22 +4115,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4324
4115
  type: "get",
4325
4116
  id: props.id,
4326
4117
  pipeline: pipeline,
4327
- }, offline: (_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
4118
+ }, offline: (_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
4328
4119
  renderBreadcrumb(pages),
4329
4120
  react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
4330
4121
  react_1.default.createElement("div", { className: "flex flex-col w-full" },
4331
4122
  react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
4332
4123
  react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
4333
4124
  !isBottom && renderActionButtons(props.type)),
4334
- react_1.default.createElement("div", { className: "w-full ".concat(((_v = props.organise) === null || _v === void 0 ? void 0 : _v.tabAlign) === "left"
4125
+ hasTabAlign_1 ? (react_1.default.createElement("div", { className: "w-full ".concat(((_w = props.organise) === null || _w === void 0 ? void 0 : _w.tabAlign) === "left"
4335
4126
  ? "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5"
4336
4127
  : "") },
4337
- react_1.default.createElement("div", { className: "w-full" }, ((_w = props.organise) === null || _w === void 0 ? void 0 : _w.tabAlign) === "left" &&
4128
+ react_1.default.createElement("div", { className: "w-full" }, ((_x = props.organise) === null || _x === void 0 ? void 0 : _x.tabAlign) === "left" &&
4338
4129
  uniqueTabIds.length >= 1 && (react_1.default.createElement(bars_1.Bars, { bars: tabBars, selectedId: activeTab || "others", onClick: function (tabId) { return setActiveTab(tabId); } }))),
4339
- react_1.default.createElement("div", { className: "w-full ".concat(((_x = props.organise) === null || _x === void 0 ? void 0 : _x.tabAlign) === "left"
4130
+ react_1.default.createElement("div", { className: "w-full ".concat(((_y = props.organise) === null || _y === void 0 ? void 0 : _y.tabAlign) === "left"
4340
4131
  ? " md:col-span-2 lg:col-span-3"
4341
4132
  : "") },
4342
- ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.tabAlign) === "top" &&
4133
+ ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.tabAlign) === "top" &&
4343
4134
  uniqueTabIds.length >= 1 && (react_1.default.createElement(bars_1.Bars, { bars: tabBars, selectedId: activeTab || "others", onClick: function (tabId) { return setActiveTab(tabId); }, horizontal: true })),
4344
4135
  react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: modalFormInputRefs, handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: function (refList) {
4345
4136
  var _a, _b, _c;
@@ -4352,18 +4143,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4352
4143
  }
4353
4144
  }
4354
4145
  } },
4355
- uniqueTabIds.map(function (tabId) { return (react_1.default.createElement("div", { key: tabId, className: "w-full grid ".concat(formColumn, " gap-6 ").concat(activeTab === tabId ? "" : "hidden") }, renderDataTemplateFormContent(selectedData, filterModel_1
4356
- .map(function (model, index) { return (__assign(__assign({}, model), { refIndex: index })); })
4357
- .filter(function (model) {
4358
- var _a;
4359
- var modelTabId = (_a = model.tabId) !== null && _a !== void 0 ? _a : "";
4360
- return tabId === modelTabId;
4361
- }), modalFormInputRefs, false, false))); }),
4362
- ((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareUpdateComponent) &&
4363
- ((_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareUpdateComponent(selectedData))),
4146
+ uniqueTabIds.map(function (tabId) {
4147
+ var filterByTab = filterModel_1
4148
+ .map(function (model, index) { return (__assign(__assign({}, model), { refIndex: index })); })
4149
+ .filter(function (model) {
4150
+ var _a;
4151
+ var modelTabId = (_a = model.tabId) !== null && _a !== void 0 ? _a : "";
4152
+ return tabId === modelTabId;
4153
+ });
4154
+ return (react_1.default.createElement("div", { key: tabId, className: "w-full grid ".concat(formColumn, " gap-6 ").concat(hasTabAlign_1
4155
+ ? activeTab === tabId
4156
+ ? ""
4157
+ : "hidden"
4158
+ : "") }, renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false)));
4159
+ }),
4160
+ ((_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareUpdateComponent) &&
4161
+ ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareUpdateComponent(selectedData))),
4364
4162
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
4365
4163
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
4366
- isBottom && renderActionButtons(props.type, true)))));
4164
+ isBottom && renderActionButtons(props.type, true)))) : (react_1.default.createElement("div", null,
4165
+ react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " gap-6 mt-6"), ref: formRef, refList: modalFormInputRefs, handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1 },
4166
+ renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
4167
+ ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareUpdateComponent) &&
4168
+ ((_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareUpdateComponent(selectedData))),
4169
+ react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
4170
+ react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
4171
+ isBottom && renderActionButtons(props.type, true)))));
4367
4172
  case "list":
4368
4173
  var filterComponent_1 = renderSearchContent();
4369
4174
  var dataComponent = renderTabContent(tabs, props.type, viewType);
@@ -4371,14 +4176,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4371
4176
  var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
4372
4177
  dbModule: dbModule,
4373
4178
  dbType: devSettings.server,
4374
- dbCollection: (_2 = (_1 = props === null || props === void 0 ? void 0 : props.space) === null || _1 === void 0 ? void 0 : _1.pipelineDefaultSpaceId) !== null && _2 !== void 0 ? _2 : props.collectionId,
4179
+ dbCollection: (_5 = (_4 = props === null || props === void 0 ? void 0 : props.space) === null || _4 === void 0 ? void 0 : _4.pipelineDefaultSpaceId) !== null && _5 !== void 0 ? _5 : props.collectionId,
4375
4180
  dbEndpoint: devSettings.dbEndpoint,
4376
4181
  dbAPIToken: devSettings.dbAPIToken,
4377
4182
  dbUserToken: devSettings.dbUserToken,
4378
- }, cond: handleReadQueryHocCond(), offline: (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareOffline, onChangeData: function (data) {
4183
+ }, cond: handleReadQueryHocCond(), offline: (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareOffline, onChangeData: function (data) {
4379
4184
  handleGetListData(data, "", "");
4380
4185
  }, onError: handleGetItemError }));
4381
- if ((_4 = props.renderSettings) === null || _4 === void 0 ? void 0 : _4.renderListUI) {
4186
+ if ((_7 = props.renderSettings) === null || _7 === void 0 ? void 0 : _7.renderListUI) {
4382
4187
  return (react_1.default.createElement(react_1.default.Fragment, null,
4383
4188
  listReadQueryHOC,
4384
4189
  props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
@@ -4476,7 +4281,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4476
4281
  renderListFilterElements(),
4477
4282
  renderListActionElements()),
4478
4283
  renderListNewRowFilterElements(),
4479
- schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode })),
4284
+ schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkMode })),
4480
4285
  renderTabContent(tabs, props.type, viewType),
4481
4286
  isBottom && renderActionButtons(props.type, true)));
4482
4287
  default:
@@ -4487,7 +4292,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4487
4292
  //SECTION: Render Utils
4488
4293
  //=====================================================================================
4489
4294
  var renderDataTemplateFormContent = function (state, model, ref, isObject, isObjectList, modalInput, parentData) {
4490
- var _a, _b, _c, _d, _e, _f, _g;
4295
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4491
4296
  return (0, updateModule_1.renderDataTemplateForm)(state, model, ref, {
4492
4297
  handleOnChangeAddress: handleOnChangeAddress,
4493
4298
  handleOnChangeText: handleOnChangeText,
@@ -4507,6 +4312,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4507
4312
  },
4508
4313
  type: props.type,
4509
4314
  showId: showId,
4315
+ remainId: remainId,
4510
4316
  groupIdCollapsible: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.groupIdCollapsible,
4511
4317
  }, {
4512
4318
  dbModule: dbModule,
@@ -4526,11 +4332,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4526
4332
  selectedObjectId: selectedObjectId,
4527
4333
  selectedObjectStructureId: selectedObjectStructureId,
4528
4334
  parentData: parentData,
4335
+ organiseListObjTableView: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.listObjectTableView)
4336
+ ? true
4337
+ : false,
4529
4338
  setSelectedObjectStructureId: setSelectedObjectStructureId,
4530
4339
  setSelectedObjectData: setSelectedObjectData,
4531
4340
  handlePopUpModal: handlePopUpModal,
4341
+ handleSelectListObjectData: handleSelectListObjectData,
4532
4342
  renderObjectTags: renderObjectTags,
4533
- }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareOffline, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareUpdateOneColumn, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareSelectCustomBtns);
4343
+ }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareOffline, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdateOneColumn, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareSelectCustomBtns);
4534
4344
  };
4535
4345
  var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName) {
4536
4346
  var _a, _b;