blixify-ui-web 0.4.0 → 0.4.2

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.
@@ -139,7 +139,7 @@ var pagination_1 = require("./pagination");
139
139
  var referenceModal_1 = require("./referenceModal");
140
140
  var settingsModal_1 = require("./settingsModal");
141
141
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
142
- 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;
142
+ 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;
143
143
  var formRef = (0, react_1.createRef)();
144
144
  var objectFormRef = (0, react_1.createRef)();
145
145
  var listAddressFromRef = (0, react_1.createRef)();
@@ -154,131 +154,150 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
154
154
  var typingTimeout = (0, react_1.useRef)();
155
155
  // const oldCollectionId: any = useRef();
156
156
  var mapViewRef = (0, react_1.useRef)();
157
- var _8 = (0, react_1.useState)(false), loading = _8[0], setLoading = _8[1];
158
- var _9 = (0, react_1.useState)(), notification = _9[0], setNotification = _9[1];
157
+ var _9 = (0, react_1.useState)(false), loading = _9[0], setLoading = _9[1];
158
+ var _10 = (0, react_1.useState)(), notification = _10[0], setNotification = _10[1];
159
159
  //INFO : Used by List
160
- var _10 = (0, react_1.useState)({}), filterSearch = _10[0], setFilterSearch = _10[1];
161
- var _11 = (0, react_1.useState)({}), filterSearchParams = _11[0], setFilterSearchParams = _11[1];
162
- var _12 = (0, react_1.useState)({}), filterSelection = _12[0], setFilterSelection = _12[1];
163
- var _13 = (0, react_1.useState)({}), filterReference = _13[0], setFilterReference = _13[1];
164
- var _14 = (0, react_1.useState)({}), filterReferenceSearch = _14[0], setFilterReferenceSearch = _14[1];
165
- var _15 = (0, react_1.useState)({}), filterReferenceList = _15[0], setFilterReferenceList = _15[1];
166
- var _16 = (0, react_1.useState)({
160
+ var _11 = (0, react_1.useState)({}), filterSearch = _11[0], setFilterSearch = _11[1];
161
+ var _12 = (0, react_1.useState)({}), filterSearchParams = _12[0], setFilterSearchParams = _12[1];
162
+ var _13 = (0, react_1.useState)({}), filterSelection = _13[0], setFilterSelection = _13[1];
163
+ var _14 = (0, react_1.useState)({}), filterReference = _14[0], setFilterReference = _14[1];
164
+ var _15 = (0, react_1.useState)({}), filterReferenceSearch = _15[0], setFilterReferenceSearch = _15[1];
165
+ var _16 = (0, react_1.useState)({}), filterReferenceList = _16[0], setFilterReferenceList = _16[1];
166
+ var _17 = (0, react_1.useState)({
167
167
  startDate: undefined,
168
168
  endDate: undefined,
169
- }), filterReferenceDate = _16[0], setFilterReferenceDate = _16[1];
170
- var _17 = (0, react_1.useState)(true), tableLoading = _17[0], setTableLoading = _17[1];
171
- var _18 = (0, react_1.useState)(""), cursor = _18[0], setCursor = _18[1];
172
- var _19 = (0, react_1.useState)(""), lastCursor = _19[0], setLastCursor = _19[1];
173
- var _20 = (0, react_1.useState)([]), tableData = _20[0], setTableData = _20[1];
174
- var _21 = (0, react_1.useState)([]), spaceTableData = _21[0], setSpaceTableData = _21[1];
175
- var _22 = (0, react_1.useState)(0), size = _22[0], setSize = _22[1];
176
- var _23 = (0, react_1.useState)((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0), pageIndex = _23[0], setPageIndex = _23[1];
177
- var _24 = (0, react_1.useState)([]), selectedIds = _24[0], setSelectedIds = _24[1];
178
- var _25 = (0, react_1.useState)(false), selectAll = _25[0], setSelectAll = _25[1];
179
- var _26 = (0, react_1.useState)(""), deletePasscode = _26[0], setDeletePasscode = _26[1];
180
- var _27 = (0, react_1.useState)(""), deletePasscodeInput = _27[0], setDeletePasscodeInput = _27[1];
181
- var _28 = (0, react_1.useState)(""), deleteFeedId = _28[0], setDeleteFeedId = _28[1];
169
+ }), filterReferenceDate = _17[0], setFilterReferenceDate = _17[1];
170
+ var _18 = (0, react_1.useState)({
171
+ default: true,
172
+ }), tableLoading = _18[0], setTableLoading = _18[1];
173
+ var _19 = (0, react_1.useState)({
174
+ default: "",
175
+ }), cursor = _19[0], setCursor = _19[1];
176
+ var _20 = (0, react_1.useState)({
177
+ default: "",
178
+ }), lastCursor = _20[0], setLastCursor = _20[1];
179
+ var _21 = (0, react_1.useState)({
180
+ default: [],
181
+ }), tableData = _21[0], setTableData = _21[1];
182
+ var _22 = (0, react_1.useState)({
183
+ default: [],
184
+ }), spaceTableData = _22[0], setSpaceTableData = _22[1];
185
+ var _23 = (0, react_1.useState)({ default: 0 }), size = _23[0], setSize = _23[1];
186
+ var _24 = (0, react_1.useState)({
187
+ default: (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
188
+ }), pageIndex = _24[0], setPageIndex = _24[1];
189
+ var _25 = (0, react_1.useState)([]), selectedIds = _25[0], setSelectedIds = _25[1];
190
+ var _26 = (0, react_1.useState)(false), selectAll = _26[0], setSelectAll = _26[1];
191
+ var _27 = (0, react_1.useState)(""), deletePasscode = _27[0], setDeletePasscode = _27[1];
192
+ var _28 = (0, react_1.useState)(""), deletePasscodeInput = _28[0], setDeletePasscodeInput = _28[1];
193
+ var _29 = (0, react_1.useState)(""), deleteFeedId = _29[0], setDeleteFeedId = _29[1];
182
194
  var previousType = (0, react_1.useRef)();
183
195
  var previousSelectedData = (0, react_1.useRef)();
184
196
  //INFO : Used by List Organise
185
- var _29 = (0, react_1.useState)(false), sortModal = _29[0], setSortModal = _29[1];
186
- var _30 = (0, react_1.useState)(false), filterModal = _30[0], setFilterModal = _30[1];
187
- var _31 = (0, react_1.useState)(false), addTabModal = _31[0], setAddTabModal = _31[1];
188
- var _32 = (0, react_1.useState)(false), overviewModal = _32[0], setOverviewModal = _32[1];
189
- var _33 = (0, react_1.useState)((_c = props.defaultTab) !== null && _c !== void 0 ? _c : ""), selectedTab = _33[0], setSelectedTab = _33[1];
190
- var _34 = (0, react_1.useState)("dayGridMonth"), calendarView = _34[0], setCalendarView = _34[1];
191
- var _35 = (0, react_1.useState)(new Date()), calendarTabMonth = _35[0], setCalendarTabMonth = _35[1];
192
- var _36 = (0, react_1.useState)(true), kanbanDroppable = _36[0], setKanbanDroppable = _36[1];
193
- var _37 = (0, react_1.useState)([]), kanbanOptions = _37[0], setKanbanOptions = _37[1];
194
- var _38 = (0, react_1.useState)(false), queryForm = _38[0], setQueryForm = _38[1];
195
- var _39 = (0, react_1.useState)(false), batchUpdateModal = _39[0], setBatchUpdateModal = _39[1];
196
- var _40 = (0, react_1.useState)({
197
+ var _30 = (0, react_1.useState)(false), sortModal = _30[0], setSortModal = _30[1];
198
+ var _31 = (0, react_1.useState)(false), filterModal = _31[0], setFilterModal = _31[1];
199
+ var _32 = (0, react_1.useState)(false), addTabModal = _32[0], setAddTabModal = _32[1];
200
+ var _33 = (0, react_1.useState)(false), overviewModal = _33[0], setOverviewModal = _33[1];
201
+ var _34 = (0, react_1.useState)((_c = props.defaultTab) !== null && _c !== void 0 ? _c : ""), selectedTab = _34[0], setSelectedTab = _34[1];
202
+ var _35 = (0, react_1.useState)("dayGridMonth"), calendarView = _35[0], setCalendarView = _35[1];
203
+ var _36 = (0, react_1.useState)(new Date()), calendarTabMonth = _36[0], setCalendarTabMonth = _36[1];
204
+ var _37 = (0, react_1.useState)(true), kanbanDroppable = _37[0], setKanbanDroppable = _37[1];
205
+ var _38 = (0, react_1.useState)([]), kanbanOptions = _38[0], setKanbanOptions = _38[1];
206
+ var _39 = (0, react_1.useState)(false), queryForm = _39[0], setQueryForm = _39[1];
207
+ var _40 = (0, react_1.useState)(false), batchUpdateModal = _40[0], setBatchUpdateModal = _40[1];
208
+ var _41 = (0, react_1.useState)({
197
209
  columnId: "",
198
210
  columnData: {},
199
- }), batchUpdateData = _40[0], setBatchUpdateData = _40[1];
211
+ }), batchUpdateData = _41[0], setBatchUpdateData = _41[1];
200
212
  //INFO : Used by Auth
201
- var _41 = (0, react_1.useState)({
213
+ var _42 = (0, react_1.useState)({
202
214
  email: "",
203
215
  google: "",
204
216
  phone: "",
205
217
  disabled: false,
206
- }), authMethods = _41[0], setAuthMethods = _41[1];
207
- var _42 = (0, react_1.useState)(""), selectedAuthMethod = _42[0], setSelectedAuthMethod = _42[1];
218
+ }), authMethods = _42[0], setAuthMethods = _42[1];
219
+ var _43 = (0, react_1.useState)(""), selectedAuthMethod = _43[0], setSelectedAuthMethod = _43[1];
208
220
  // INFO: Used by Activity Log
209
- var _43 = (0, react_1.useState)(false), activityModal = _43[0], setActivityModal = _43[1];
210
- var _44 = (0, react_1.useState)(""), activityId = _44[0], setActivityId = _44[1];
221
+ var _44 = (0, react_1.useState)(false), activityModal = _44[0], setActivityModal = _44[1];
222
+ var _45 = (0, react_1.useState)(""), activityId = _45[0], setActivityId = _45[1];
211
223
  //INFO : Used by Export
212
- var _45 = (0, react_1.useState)(null), csvFile = _45[0], setCSVFile = _45[1];
213
- var _46 = (0, react_1.useState)([]), csvFileData = _46[0], setCSVFileData = _46[1];
214
- var _47 = (0, react_1.useState)(0), stepCSVIndex = _47[0], setStepCSVIndex = _47[1];
215
- var _48 = (0, react_1.useState)({}), listCSVMapAttribute = _48[0], setListCSVMapAttribute = _48[1];
216
- var _49 = (0, react_1.useState)({}), listCSVObjAttribute = _49[0], setListCSVObjAttribute = _49[1];
217
- var _50 = (0, react_1.useState)([]), csvAPIAttribute = _50[0], setCSVAPIAttribute = _50[1];
218
- var _51 = (0, react_1.useState)(((_d = props.devSettings.currentUser) === null || _d === void 0 ? void 0 : _d.userEmail) || ""), exportCSVEmail = _51[0], setExportCSVEmail = _51[1];
219
- var _52 = (0, react_1.useState)(((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.exportSettings) === null || _f === void 0 ? void 0 : _f.defaultExportPDFName) || ""), exportPDFTitle = _52[0], setExportPDFTitle = _52[1];
220
- var _53 = (0, react_1.useState)([]), importTableData = _53[0], setImportTableData = _53[1];
221
- var _54 = (0, react_1.useState)([]), queryList = _54[0], setQueryList = _54[1];
222
- var _55 = (0, react_1.useState)(-1), queryIndex = _55[0], setQueryIndex = _55[1];
224
+ var _46 = (0, react_1.useState)(null), csvFile = _46[0], setCSVFile = _46[1];
225
+ var _47 = (0, react_1.useState)([]), csvFileData = _47[0], setCSVFileData = _47[1];
226
+ var _48 = (0, react_1.useState)(0), stepCSVIndex = _48[0], setStepCSVIndex = _48[1];
227
+ var _49 = (0, react_1.useState)({}), listCSVMapAttribute = _49[0], setListCSVMapAttribute = _49[1];
228
+ var _50 = (0, react_1.useState)({}), listCSVObjAttribute = _50[0], setListCSVObjAttribute = _50[1];
229
+ var _51 = (0, react_1.useState)([]), csvAPIAttribute = _51[0], setCSVAPIAttribute = _51[1];
230
+ var _52 = (0, react_1.useState)(((_d = props.devSettings.currentUser) === null || _d === void 0 ? void 0 : _d.userEmail) || ""), exportCSVEmail = _52[0], setExportCSVEmail = _52[1];
231
+ var _53 = (0, react_1.useState)(((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.exportSettings) === null || _f === void 0 ? void 0 : _f.defaultExportPDFName) || ""), exportPDFTitle = _53[0], setExportPDFTitle = _53[1];
232
+ var _54 = (0, react_1.useState)([]), importTableData = _54[0], setImportTableData = _54[1];
233
+ var _55 = (0, react_1.useState)([]), queryList = _55[0], setQueryList = _55[1];
234
+ var _56 = (0, react_1.useState)(-1), queryIndex = _56[0], setQueryIndex = _56[1];
235
+ var _57 = (0, react_1.useState)(((_g = props.organise) === null || _g === void 0 ? void 0 : _g.groupBy) || []), groupIds = _57[0], setGroupIds = _57[1];
223
236
  //INFO : Used by Read
224
237
  //INFO : Used by Update
225
- var _56 = (0, react_1.useState)(false), modalVisible = _56[0], setModalVisible = _56[1];
226
- var _57 = (0, react_1.useState)(false), deleteModal = _57[0], setDeleteModal = _57[1];
227
- var _58 = (0, react_1.useState)(false), excelModal = _58[0], setExcelModal = _58[1];
228
- var _59 = (0, react_1.useState)(false), exportExcel = _59[0], setExportExcel = _59[1];
229
- var _60 = (0, react_1.useState)(""), exportType = _60[0], setExportType = _60[1];
230
- var _61 = (0, react_1.useState)(false), exportQR = _61[0], setExportQR = _61[1];
231
- var _62 = (0, react_1.useState)(false), signatureSigning = _62[0], setSignatureSigning = _62[1];
232
- var _63 = (0, react_1.useState)({}), selectedData = _63[0], setSelectedData = _63[1];
233
- var _64 = (0, react_1.useState)(""), selectedObjectStructureId = _64[0], setSelectedObjectStructureId = _64[1];
234
- var _65 = (0, react_1.useState)(""), selectedObjectId = _65[0], setSelectedObjectId = _65[1];
235
- var _66 = (0, react_1.useState)(""), selectedListAddressId = _66[0], setSelectedListAddressId = _66[1];
236
- var _67 = (0, react_1.useState)({
238
+ var _58 = (0, react_1.useState)(false), modalVisible = _58[0], setModalVisible = _58[1];
239
+ var _59 = (0, react_1.useState)(false), deleteModal = _59[0], setDeleteModal = _59[1];
240
+ var _60 = (0, react_1.useState)(false), excelModal = _60[0], setExcelModal = _60[1];
241
+ var _61 = (0, react_1.useState)(false), exportExcel = _61[0], setExportExcel = _61[1];
242
+ var _62 = (0, react_1.useState)(""), exportType = _62[0], setExportType = _62[1];
243
+ var _63 = (0, react_1.useState)(false), exportQR = _63[0], setExportQR = _63[1];
244
+ var _64 = (0, react_1.useState)(false), signatureSigning = _64[0], setSignatureSigning = _64[1];
245
+ var _65 = (0, react_1.useState)({}), selectedData = _65[0], setSelectedData = _65[1];
246
+ var _66 = (0, react_1.useState)(""), selectedObjectStructureId = _66[0], setSelectedObjectStructureId = _66[1];
247
+ var _67 = (0, react_1.useState)(""), selectedObjectId = _67[0], setSelectedObjectId = _67[1];
248
+ var _68 = (0, react_1.useState)(""), selectedListAddressId = _68[0], setSelectedListAddressId = _68[1];
249
+ var _69 = (0, react_1.useState)({
237
250
  lat: 0,
238
251
  lng: 0,
239
252
  name: "",
240
- }), selectedListAddress = _67[0], setSelectedListAddress = _67[1];
241
- var _68 = (0, react_1.useState)({}), selectedObjectData = _68[0], setSelectedObjectData = _68[1];
242
- var _69 = (0, react_1.useState)(false), referenceLoading = _69[0], setReferenceLoading = _69[1];
243
- var _70 = (0, react_1.useState)({}), referencesOptions = _70[0], setReferencesOptions = _70[1];
244
- var _71 = (0, react_1.useState)({}), referencesDetails = _71[0], setReferencesDetails = _71[1];
245
- var _72 = (0, react_1.useState)({}), referenceDeleteTableData = _72[0], setReferenceDeleteTableData = _72[1];
246
- var _73 = (0, react_1.useState)(0), referenceDeleteIndex = _73[0], setReferenceDeleteIndex = _73[1];
247
- var _74 = (0, react_1.useState)({
253
+ }), selectedListAddress = _69[0], setSelectedListAddress = _69[1];
254
+ var _70 = (0, react_1.useState)({}), selectedObjectData = _70[0], setSelectedObjectData = _70[1];
255
+ var _71 = (0, react_1.useState)(false), referenceLoading = _71[0], setReferenceLoading = _71[1];
256
+ var _72 = (0, react_1.useState)({}), referencesOptions = _72[0], setReferencesOptions = _72[1];
257
+ var _73 = (0, react_1.useState)({}), referencesDetails = _73[0], setReferencesDetails = _73[1];
258
+ var _74 = (0, react_1.useState)({}), referenceDeleteTableData = _74[0], setReferenceDeleteTableData = _74[1];
259
+ var _75 = (0, react_1.useState)(0), referenceDeleteIndex = _75[0], setReferenceDeleteIndex = _75[1];
260
+ var _76 = (0, react_1.useState)({
248
261
  id: "",
249
262
  name: "",
250
263
  type: "string",
251
- }), referenceCreationModal = _74[0], setReferenceCreationModal = _74[1];
252
- var _75 = (0, react_1.useState)({}), referenceModelSchema = _75[0], setReferenceSchema = _75[1];
264
+ }), referenceCreationModal = _76[0], setReferenceCreationModal = _76[1];
265
+ var _77 = (0, react_1.useState)({}), referenceModelSchema = _77[0], setReferenceSchema = _77[1];
253
266
  // INFO ; Use to Trigger Update Prefill UI
254
- var _76 = (0, react_1.useState)(false), prefillTrigger = _76[0], setPrefillTrigger = _76[1];
267
+ var _78 = (0, react_1.useState)(false), prefillTrigger = _78[0], setPrefillTrigger = _78[1];
255
268
  //INFO : Offline
256
- var _77 = (0, react_1.useState)(0), offlineDataLength = _77[0], setOfflineDataLength = _77[1];
257
- var _78 = (0, react_1.useState)(false), offlineModal = _78[0], setOfflineModal = _78[1];
269
+ var _79 = (0, react_1.useState)(0), offlineDataLength = _79[0], setOfflineDataLength = _79[1];
270
+ var _80 = (0, react_1.useState)(false), offlineModal = _80[0], setOfflineModal = _80[1];
258
271
  var devSettings = props.devSettings;
259
272
  var serverId = (0, utils_1.parseServerId)(devSettings.server);
260
- var viewType = (_h = (_g = props.organise) === null || _g === void 0 ? void 0 : _g.viewId) !== null && _h !== void 0 ? _h : "general";
273
+ var viewType = (_j = (_h = props.organise) === null || _h === void 0 ? void 0 : _h.viewId) !== null && _j !== void 0 ? _j : "general";
261
274
  var isFirebaseClient = devSettings.server === "firebase";
262
275
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
263
- var dbModule = isFirebaseClient ? (_j = props.lib) === null || _j === void 0 ? void 0 : _j.firebase : (_k = props.lib) === null || _k === void 0 ? void 0 : _k.axios;
276
+ var dbModule = isFirebaseClient ? (_k = props.lib) === null || _k === void 0 ? void 0 : _k.firebase : (_l = props.lib) === null || _l === void 0 ? void 0 : _l.axios;
264
277
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
265
278
  var limit = props.limit ? props.limit : 10;
266
- var isEditor = ((_l = props.edit) === null || _l === void 0 ? void 0 : _l.allEditable) ? true : false;
267
- var isOffline = (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareOffline;
268
- var showId = (_o = props.space) === null || _o === void 0 ? void 0 : _o.showId;
269
- var idField = (_p = props.space) === null || _p === void 0 ? void 0 : _p.idField;
270
- var pipeline = (_q = props === null || props === void 0 ? void 0 : props.space) === null || _q === void 0 ? void 0 : _q.pipeline;
271
- var hasNavigation = ((_r = props.organise) === null || _r === void 0 ? void 0 : _r.handleNavigate) ? true : false;
272
- var formColumn = ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareUpdateOneColumn)
279
+ var isEditor = ((_m = props.edit) === null || _m === void 0 ? void 0 : _m.allEditable) ? true : false;
280
+ var isOffline = (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareOffline;
281
+ var showId = (_p = props.space) === null || _p === void 0 ? void 0 : _p.showId;
282
+ var idField = (_q = props.space) === null || _q === void 0 ? void 0 : _q.idField;
283
+ var pipeline = (_r = props === null || props === void 0 ? void 0 : props.space) === null || _r === void 0 ? void 0 : _r.pipeline;
284
+ var hasNavigation = ((_s = props.organise) === null || _s === void 0 ? void 0 : _s.handleNavigate) ? true : false;
285
+ var formColumn = ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareUpdateOneColumn)
273
286
  ? "grid-cols-2"
274
287
  : "grid-cols-4";
275
- var isActivityLog = (((_u = (_t = props.edit) === null || _t === void 0 ? void 0 : _t.activityLog) === null || _u === void 0 ? void 0 : _u.enableComments) &&
276
- ((_v = props.edit) === null || _v === void 0 ? void 0 : _v.activityLog.commentCollectionId)) ||
277
- (((_x = (_w = props.edit) === null || _w === void 0 ? void 0 : _w.activityLog) === null || _x === void 0 ? void 0 : _x.enableLogs) &&
278
- ((_y = props.edit) === null || _y === void 0 ? void 0 : _y.activityLog.logsCollectionId));
288
+ var isActivityLog = (((_v = (_u = props.edit) === null || _u === void 0 ? void 0 : _u.activityLog) === null || _v === void 0 ? void 0 : _v.enableComments) &&
289
+ ((_w = props.edit) === null || _w === void 0 ? void 0 : _w.activityLog.commentCollectionId)) ||
290
+ (((_y = (_x = props.edit) === null || _x === void 0 ? void 0 : _x.activityLog) === null || _y === void 0 ? void 0 : _y.enableLogs) &&
291
+ ((_z = props.edit) === null || _z === void 0 ? void 0 : _z.activityLog.logsCollectionId));
292
+ var authMethodProviders = [
293
+ "email",
294
+ "google",
295
+ "phone",
296
+ "disabled",
297
+ ];
279
298
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
280
299
  var writeServerQuery = new writeQuery_1.WriteQuery({
281
- dbModule: (_z = props.lib) === null || _z === void 0 ? void 0 : _z.axios,
300
+ dbModule: (_0 = props.lib) === null || _0 === void 0 ? void 0 : _0.axios,
282
301
  dbType: devSettings.server,
283
302
  dbCollection: props.collectionId,
284
303
  dbEndpoint: devSettings.dbEndpoint,
@@ -286,7 +305,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
286
305
  dbUserToken: devSettings.dbUserToken,
287
306
  });
288
307
  var readServerQuery = new readQuery_1.ReadQuery({
289
- dbModule: (_0 = props.lib) === null || _0 === void 0 ? void 0 : _0.axios,
308
+ dbModule: (_1 = props.lib) === null || _1 === void 0 ? void 0 : _1.axios,
290
309
  dbType: devSettings.server,
291
310
  dbCollection: props.collectionId,
292
311
  dbEndpoint: devSettings.dbEndpoint,
@@ -294,7 +313,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
294
313
  dbUserToken: devSettings.dbUserToken,
295
314
  });
296
315
  var moreButtonPopUp = [
297
- ((_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.allEditable) && !isFirebase
316
+ ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.allEditable) && !isFirebase
298
317
  ? {
299
318
  text: "Import Excel",
300
319
  onClick: function () {
@@ -343,7 +362,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
343
362
  },
344
363
  },
345
364
  ].filter(Boolean);
346
- if ((_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.moreSettings)
365
+ if ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.moreSettings)
347
366
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
348
367
  var renderImpSearchFilterConditions = function () {
349
368
  var _a;
@@ -496,8 +515,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
496
515
  props.collectionId,
497
516
  props.id,
498
517
  props.localURLEndpoint,
499
- (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.extendedTabs,
500
- (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.viewId,
518
+ (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.extendedTabs,
519
+ (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.viewId,
501
520
  props.type,
502
521
  ]);
503
522
  (0, react_1.useEffect)(function () {
@@ -505,9 +524,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
505
524
  setReferenceSchema(props.devSettings.schemaReference);
506
525
  }, [props.devSettings.schemaReference]);
507
526
  (0, react_1.useEffect)(function () {
508
- var query = renderImpSearchFilterConditions();
509
- if (query)
510
- setQueryList(query);
527
+ var newQuery = renderImpSearchFilterConditions();
528
+ var clonedTableData = {};
529
+ var clonedTableLoading = {};
530
+ var clonedPageIndex = {};
531
+ var clonedLastCurosr = {};
532
+ var clonedCursor = {};
533
+ if (groupIds.length > 0 && Object.keys(tableData).length > 1) {
534
+ if (newQuery &&
535
+ (newQuery === null || newQuery === void 0 ? void 0 : newQuery.length) > 0 &&
536
+ JSON.stringify(newQuery) !== JSON.stringify(queryList)) {
537
+ newQuery === null || newQuery === void 0 ? void 0 : newQuery.map(function (eachQuery) {
538
+ var _a, _b;
539
+ if (groupIds.includes((_a = eachQuery.queryId) !== null && _a !== void 0 ? _a : "")) {
540
+ if (eachQuery.value && Array.isArray(eachQuery.value)) {
541
+ (_b = eachQuery === null || eachQuery === void 0 ? void 0 : eachQuery.value) === null || _b === void 0 ? void 0 : _b.map(function (eachValue) {
542
+ clonedTableData[eachValue] = tableData === null || tableData === void 0 ? void 0 : tableData[eachValue];
543
+ clonedTableLoading[eachValue] = tableLoading === null || tableLoading === void 0 ? void 0 : tableLoading[eachValue];
544
+ clonedPageIndex[eachValue] = pageIndex === null || pageIndex === void 0 ? void 0 : pageIndex[eachValue];
545
+ clonedLastCurosr[eachValue] = lastCursor === null || lastCursor === void 0 ? void 0 : lastCursor[eachValue];
546
+ clonedCursor[eachValue] = cursor === null || cursor === void 0 ? void 0 : cursor[eachValue];
547
+ return null;
548
+ });
549
+ }
550
+ }
551
+ return null;
552
+ });
553
+ }
554
+ setTableData(clonedTableData);
555
+ setTableLoading(clonedTableLoading);
556
+ setPageIndex(clonedPageIndex);
557
+ setLastCursor(clonedLastCurosr);
558
+ setCursor(clonedCursor);
559
+ }
560
+ else {
561
+ clonedTableData["default"] = [];
562
+ clonedTableLoading["default"] = true;
563
+ clonedPageIndex["default"] = 0;
564
+ clonedLastCurosr["default"] = "";
565
+ clonedCursor["default"] = "";
566
+ setTableData(clonedTableData);
567
+ setTableLoading(clonedTableLoading);
568
+ setPageIndex(clonedPageIndex);
569
+ setLastCursor(clonedLastCurosr);
570
+ setCursor(clonedCursor);
571
+ }
572
+ if (newQuery)
573
+ setQueryList(newQuery);
511
574
  }, [filterSelection, filterReferenceDate, filterReference]);
512
575
  (0, react_1.useEffect)(function () {
513
576
  var _a;
@@ -556,7 +619,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
556
619
  }
557
620
  return sort;
558
621
  };
559
- var handleReadQueryHocCond = function () {
622
+ var handleReadQueryHocCond = function (prefix) {
560
623
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
561
624
  var query = (_a = renderImpSearchFilterConditions()) !== null && _a !== void 0 ? _a : [];
562
625
  var calendarSettings = false;
@@ -647,7 +710,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
647
710
  var cond = {
648
711
  type: "list",
649
712
  query: query,
650
- cursor: renderCursor(),
713
+ cursor: renderCursor(prefix),
651
714
  sort: handleReadQueryHocSort(query),
652
715
  limit: limit,
653
716
  pipeline: pipeline,
@@ -674,31 +737,42 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
674
737
  props.bareSettings.bareListHandleSelection(value, selectedIds, query);
675
738
  }
676
739
  };
677
- var handlePagination = function (value) {
740
+ var handlePagination = function (value, prefix) {
678
741
  var _a, _b, _c, _d, _e, _f;
679
742
  var isGridScroll = renderCheckGridScroll();
680
743
  if (!isFirebase && !isGridScroll) {
681
- setTableLoading(true);
682
- handleSetListData([], []);
744
+ tableLoading[prefix] = true;
745
+ setTableLoading(tableLoading);
746
+ handleSetListData([], [], prefix);
683
747
  }
684
748
  if (typeof value === "number") {
685
- setPageIndex(value);
749
+ var clonedPageIndex = JSON.parse(JSON.stringify(pageIndex));
750
+ clonedPageIndex[prefix] = value;
751
+ setPageIndex(clonedPageIndex);
686
752
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePagination) === null || _b === void 0 ? void 0 : _b.call(_a, value);
687
753
  }
688
754
  else {
689
755
  if (value === "next") {
690
756
  //INFO : Retrieve latest cursor data from Firebase only
691
757
  if ((isFirebase || isGridScroll) &&
692
- cursor &&
693
- (pageIndex + 1) * limit + 1 > tableData.length) {
694
- setLastCursor(cursor);
758
+ cursor[prefix] &&
759
+ (pageIndex[prefix] + 1) * limit + 1 > tableData[prefix].length) {
760
+ var clonedLastCursor = JSON.parse(JSON.stringify(lastCursor));
761
+ clonedLastCursor[prefix] = cursor[prefix];
762
+ console.log("see this");
763
+ console.log(clonedLastCursor);
764
+ setLastCursor(clonedLastCursor);
695
765
  }
696
- setPageIndex(pageIndex + 1);
697
- (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onChangePagination) === null || _d === void 0 ? void 0 : _d.call(_c, pageIndex + 1);
766
+ var clonedPageIndex = JSON.parse(JSON.stringify(pageIndex));
767
+ clonedPageIndex[prefix] = clonedPageIndex[prefix] + 1;
768
+ setPageIndex(clonedPageIndex);
769
+ (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onChangePagination) === null || _d === void 0 ? void 0 : _d.call(_c, clonedPageIndex[prefix] + 1);
698
770
  }
699
771
  else {
700
- setPageIndex(pageIndex - 1);
701
- (_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.onChangePagination) === null || _f === void 0 ? void 0 : _f.call(_e, pageIndex - 1);
772
+ var clonedPageIndex = JSON.parse(JSON.stringify(pageIndex));
773
+ clonedPageIndex[prefix] = clonedPageIndex[prefix] - 1;
774
+ setPageIndex(clonedPageIndex);
775
+ (_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.onChangePagination) === null || _f === void 0 ? void 0 : _f.call(_e, clonedPageIndex[prefix] - 1);
702
776
  }
703
777
  }
704
778
  };
@@ -711,8 +785,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
711
785
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, props.type, props.id, id);
712
786
  }
713
787
  };
714
- var handleSetListData = function (tableData, spaceTableData) {
788
+ var handleSetListData = function (newTableData, newSpaceTableData, prefix) {
715
789
  var _a, _b, _c, _d, _e;
790
+ tableData[prefix !== null && prefix !== void 0 ? prefix : "default"] = newTableData;
791
+ spaceTableData[prefix !== null && prefix !== void 0 ? prefix : "default"] = newSpaceTableData;
716
792
  setTableData(tableData);
717
793
  setSpaceTableData(spaceTableData);
718
794
  (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListHandleData) === null || _b === void 0 ? void 0 : _b.call(_a, tableData, spaceTableData);
@@ -724,14 +800,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
724
800
  }
725
801
  }
726
802
  };
727
- var handleGetListData = function (responseData, type, rowId) { return __awaiter(void 0, void 0, void 0, function () {
728
- var dataList, prettierDataList, dummyPrettierDataList_1, selectedIndex_1, isGridScroll, newTableData, newPrettierTableData, isExists, cursor_1, lastDataId;
729
- var _a, _b, _c, _d, _e, _f;
730
- return __generator(this, function (_g) {
731
- switch (_g.label) {
803
+ var handleGetListData = function (responseData, prefix, type, rowId) { return __awaiter(void 0, void 0, void 0, function () {
804
+ var dataList, prettierDataList, clonedTableData, clonedSpaceTableData, dummyPrettierDataList_1, selectedIndex_1, isGridScroll, clonedSize, newTableData, newPrettierTableData, isExists, clonedSize, cursor_1, lastDataId, clonedCursor;
805
+ var _a, _b, _c, _d, _e, _f, _g, _h;
806
+ return __generator(this, function (_j) {
807
+ switch (_j.label) {
732
808
  case 0:
733
809
  dataList = [];
734
810
  prettierDataList = [];
811
+ clonedTableData = JSON.parse(JSON.stringify(tableData));
812
+ clonedSpaceTableData = JSON.parse(JSON.stringify(spaceTableData));
735
813
  if (!responseData) return [3 /*break*/, 4];
736
814
  if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareOffline)) return [3 /*break*/, 1];
737
815
  dummyPrettierDataList_1 = [];
@@ -746,8 +824,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
746
824
  return [3 /*break*/, 3];
747
825
  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)];
748
826
  case 2:
749
- prettierDataList = _g.sent();
750
- _g.label = 3;
827
+ prettierDataList = _j.sent();
828
+ _j.label = 3;
751
829
  case 3:
752
830
  responseData.data.map(function (eachData) {
753
831
  if (eachData["_id"]) {
@@ -757,35 +835,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
757
835
  return null;
758
836
  });
759
837
  dataList = responseData.data;
760
- _g.label = 4;
838
+ _j.label = 4;
761
839
  case 4:
762
840
  if (type === "update" || type === "create") {
763
841
  try {
764
842
  if (type === "update") {
765
843
  selectedIndex_1 = -1;
766
- tableData.map(function (eachData, index) {
844
+ clonedTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].map(function (eachData, index) {
767
845
  if (eachData.id === rowId)
768
846
  selectedIndex_1 = index;
769
847
  return null;
770
848
  });
771
849
  if (selectedIndex_1 > -1) {
772
- tableData[selectedIndex_1] = responseData.data[0];
773
- spaceTableData[selectedIndex_1] = prettierDataList[0];
850
+ clonedTableData[selectedIndex_1] =
851
+ (_g = responseData.data) === null || _g === void 0 ? void 0 : _g[prefix !== null && prefix !== void 0 ? prefix : "default"][0];
852
+ clonedSpaceTableData[selectedIndex_1] =
853
+ prettierDataList === null || prettierDataList === void 0 ? void 0 : prettierDataList[prefix !== null && prefix !== void 0 ? prefix : "default"][0];
774
854
  }
775
855
  }
776
856
  else {
777
- tableData.push(responseData.data[0]);
778
- spaceTableData.push(prettierDataList[0]);
857
+ clonedTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].push(responseData.data[0]);
858
+ clonedSpaceTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].push(prettierDataList[0]);
779
859
  }
780
- handleSetListData(tableData, spaceTableData);
860
+ handleSetListData(clonedTableData, clonedSpaceTableData, prefix !== null && prefix !== void 0 ? prefix : "default");
781
861
  }
782
862
  catch (err) { }
783
863
  }
784
864
  else {
785
865
  isGridScroll = renderCheckGridScroll();
786
866
  if (!isGridScroll && !isFirebase) {
787
- handleSetListData(dataList, prettierDataList);
788
- setSize(responseData.count);
867
+ handleSetListData(dataList, prettierDataList, prefix !== null && prefix !== void 0 ? prefix : "default");
868
+ clonedSize = JSON.parse(JSON.stringify(size));
869
+ clonedSize[prefix !== null && prefix !== void 0 ? prefix : "default"] = (_h = responseData.count) !== null && _h !== void 0 ? _h : 0;
870
+ setSize(clonedSize);
789
871
  }
790
872
  else {
791
873
  newTableData = [];
@@ -795,14 +877,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
795
877
  newPrettierTableData = prettierDataList;
796
878
  }
797
879
  else {
798
- isExists = tableData.find(function (eachData) { var _a; return eachData.id === ((_a = dataList === null || dataList === void 0 ? void 0 : dataList[0]) === null || _a === void 0 ? void 0 : _a.id); });
799
- newTableData = isExists ? tableData : tableData.concat(dataList);
880
+ isExists = clonedTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].find(function (eachData) { var _a; return eachData.id === ((_a = dataList === null || dataList === void 0 ? void 0 : dataList[0]) === null || _a === void 0 ? void 0 : _a.id); });
881
+ newTableData = isExists
882
+ ? clonedTableData[prefix !== null && prefix !== void 0 ? prefix : "default"]
883
+ : clonedTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].concat(dataList);
800
884
  newPrettierTableData = isExists
801
- ? spaceTableData
802
- : spaceTableData.concat(prettierDataList);
885
+ ? clonedSpaceTableData[prefix !== null && prefix !== void 0 ? prefix : "default"]
886
+ : clonedSpaceTableData[prefix !== null && prefix !== void 0 ? prefix : "default"].concat(prettierDataList);
803
887
  }
804
- handleSetListData(newTableData, newPrettierTableData);
805
- setSize(newTableData.length);
888
+ handleSetListData(newTableData, newPrettierTableData, prefix);
889
+ clonedSize = JSON.parse(JSON.stringify(size));
890
+ clonedSize[prefix !== null && prefix !== void 0 ? prefix : "default"] = newTableData.length;
891
+ setSize(clonedSize);
806
892
  cursor_1 = responseData.count;
807
893
  if (isGridScroll) {
808
894
  if (dataList.length === 0)
@@ -812,10 +898,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
812
898
  cursor_1 = lastDataId;
813
899
  }
814
900
  }
815
- setCursor(cursor_1);
901
+ clonedCursor = JSON.parse(JSON.stringify(cursor_1));
902
+ clonedCursor[prefix !== null && prefix !== void 0 ? prefix : "default"] = cursor_1;
903
+ setCursor(clonedCursor);
816
904
  }
817
905
  }
818
- setTableLoading(false);
906
+ tableLoading[prefix !== null && prefix !== void 0 ? prefix : "default"] = false;
907
+ setTableLoading(tableLoading);
819
908
  return [2 /*return*/];
820
909
  }
821
910
  });
@@ -841,7 +930,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
841
930
  handleCheckOfflineDataLength();
842
931
  }, 500);
843
932
  };
844
- var handleClearDataByFilter = function (ignore) {
933
+ var handleClearDataByFilter = function (ignore, id) {
845
934
  if (isFirebase) {
846
935
  if (ignore) {
847
936
  if (ignore === "search") {
@@ -855,14 +944,28 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
855
944
  }
856
945
  }
857
946
  }
858
- handleSetListData([], []);
859
- setPageIndex(0);
860
- setCursor("");
861
- setLastCursor("");
862
- setTableLoading(true);
947
+ var keys = Object.keys(tableData).length > 0 ? Object.keys(tableData) : ["default"];
948
+ var clonedTableLoading = JSON.parse(JSON.stringify(tableLoading));
949
+ var clonedPageIndex = JSON.parse(JSON.stringify(pageIndex));
950
+ var clonedCursor = JSON.parse(JSON.stringify(cursor));
951
+ var clonedLastCurosr = JSON.parse(JSON.stringify(lastCursor));
952
+ keys.map(function (eachKey) {
953
+ if (id && groupIds.includes(id))
954
+ return null;
955
+ handleSetListData([], [], eachKey);
956
+ clonedTableLoading[eachKey] = true;
957
+ clonedPageIndex[eachKey] = 0;
958
+ clonedCursor[eachKey] = "";
959
+ clonedLastCurosr[eachKey] = "";
960
+ return null;
961
+ });
962
+ setPageIndex(clonedPageIndex);
963
+ setCursor(clonedCursor);
964
+ setLastCursor(clonedLastCurosr);
965
+ setTableLoading(clonedTableLoading);
863
966
  };
864
967
  var handleNameSearch = function (e) {
865
- handleClearDataByFilter("search");
968
+ handleClearDataByFilter("search", e.target.id);
866
969
  var clonedFilterSearch = {};
867
970
  clonedFilterSearch[e.target.id] = e.target.value;
868
971
  setFilterSearch(clonedFilterSearch);
@@ -878,7 +981,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
878
981
  }, 500);
879
982
  };
880
983
  var handleRangeFilterOnChange = function (id, value, type) {
881
- handleClearDataByFilter("date");
984
+ handleClearDataByFilter("date", id);
882
985
  var clonedRangeFilter = JSON.parse(JSON.stringify(filterReferenceDate));
883
986
  clonedRangeFilter[id] =
884
987
  type === "start" ? value : filterReferenceDate.startDate;
@@ -899,7 +1002,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
899
1002
  };
900
1003
  var handleGetItemError = function (err) {
901
1004
  var _a, _b, _c;
902
- setTableLoading(false);
1005
+ setTableLoading({ default: true });
903
1006
  setModalVisible(false);
904
1007
  setLoading(false);
905
1008
  if (props.type === "update" || props.type === "read") {
@@ -2151,7 +2254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2151
2254
  }
2152
2255
  });
2153
2256
  }); };
2154
- var handleSubmitData = function (type, rowId, columnId, data, offlineId, isOfflineUpdate) { return __awaiter(void 0, void 0, void 0, function () {
2257
+ var handleSubmitData = function (type, rowId, columnId, data, offlineId, isOfflineUpdate, prefix) { return __awaiter(void 0, void 0, void 0, function () {
2155
2258
  var selectedId_2, id, createSelectedData_1, uniqueDataStructure, uniqueColumnId, res, offlineDataResp, offlineData, tempData, err_13, offlineDataResp, tempData, selectedIndex_3, offlineData, err_14, dataToSubmit, operationType, selectedIndex_4, dataId, err_15;
2156
2259
  var _a, _b;
2157
2260
  var _c, _d, _e, _f, _g, _h;
@@ -2301,19 +2404,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2301
2404
  if (!(type === "update")) return [3 /*break*/, 23];
2302
2405
  if (!columnId) return [3 /*break*/, 22];
2303
2406
  selectedIndex_4 = -1;
2304
- tableData.map(function (eachData, index) {
2407
+ tableData[prefix !== null && prefix !== void 0 ? prefix : "default"].map(function (eachData, index) {
2305
2408
  if (eachData.id === rowId || eachData._id === rowId) {
2306
2409
  eachData[columnId] = createSelectedData_1[columnId];
2307
2410
  selectedIndex_4 = index;
2308
2411
  }
2309
2412
  return null;
2310
2413
  });
2311
- return [4 /*yield*/, handleGetListData({ data: [tableData[selectedIndex_4]] }, "update", rowId)];
2414
+ return [4 /*yield*/, handleGetListData({ data: tableData[selectedIndex_4] }, prefix, "update", rowId)];
2312
2415
  case 21:
2313
2416
  _j.sent();
2314
2417
  _j.label = 22;
2315
2418
  case 22: return [3 /*break*/, 25];
2316
- case 23: return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, "create")];
2419
+ case 23: return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, prefix, "create")];
2317
2420
  case 24:
2318
2421
  _j.sent();
2319
2422
  _j.label = 25;
@@ -2326,7 +2429,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2326
2429
  case 27: return [3 /*break*/, 30];
2327
2430
  case 28:
2328
2431
  createSelectedData_1[serverId] = id;
2329
- return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, selectedId_2 === "new" ? "create" : "update", id)];
2432
+ return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, prefix, selectedId_2 === "new" ? "create" : "update", id)];
2330
2433
  case 29:
2331
2434
  _j.sent();
2332
2435
  setNotification({
@@ -3236,9 +3339,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3236
3339
  });
3237
3340
  return tableHeader;
3238
3341
  };
3239
- var renderCursor = function () {
3342
+ var renderCursor = function (prefix) {
3240
3343
  if (!isFirebase) {
3241
- return pageIndex === 0 ? undefined : pageIndex * limit;
3344
+ return pageIndex[prefix] === 0 ? undefined : pageIndex[prefix] * limit;
3242
3345
  }
3243
3346
  else {
3244
3347
  var selectedModel = props.model.find(function (eachModel) { var _a, _b; return eachModel.id === ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.sort) === null || _b === void 0 ? void 0 : _b.sortId); });
@@ -3612,7 +3715,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3612
3715
  } }));
3613
3716
  return null;
3614
3717
  };
3615
- Object.keys(authMethods).map(function (eachMethod) {
3718
+ authMethodProviders.map(function (eachMethod) {
3616
3719
  var _a, _b, _c;
3617
3720
  var divClassName = "flex flex-row items-center justify-center";
3618
3721
  var iconClassName = "text-gray-600 w-6 h-6 mr-2";
@@ -3657,8 +3760,68 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3657
3760
  react_1.default.createElement("p", { className: "text-md font-bold mb-1" }, "Authenticated Via : "),
3658
3761
  authList));
3659
3762
  };
3763
+ var renderListRQHoc = function () {
3764
+ var _a, _b, _c, _d;
3765
+ var rqHOCCompList = [];
3766
+ var query = (_a = renderImpSearchFilterConditions()) !== null && _a !== void 0 ? _a : [];
3767
+ if (query.length > 0 &&
3768
+ query.some(function (eachQuery) { var _a; return groupIds.includes((_a = eachQuery === null || eachQuery === void 0 ? void 0 : eachQuery.queryId) !== null && _a !== void 0 ? _a : ""); })) {
3769
+ groupIds.map(function (eachAttribtueId) {
3770
+ var includeGroupQuery = query.filter(function (eachQuery) { return eachQuery.queryId === eachAttribtueId; });
3771
+ var excludeGroupQuery = query.filter(function (eachQuery) { return eachQuery.queryId !== eachAttribtueId; });
3772
+ if (includeGroupQuery && includeGroupQuery.length > 0) {
3773
+ includeGroupQuery.map(function (eachQuery) {
3774
+ if (eachQuery.value && Array.isArray(eachQuery.value)) {
3775
+ eachQuery.value.map(function (eachValue) {
3776
+ var _a, _b, _c;
3777
+ rqHOCCompList.push(react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
3778
+ dbModule: dbModule,
3779
+ dbType: devSettings.server,
3780
+ dbCollection: (_b = (_a = props === null || props === void 0 ? void 0 : props.space) === null || _a === void 0 ? void 0 : _a.pipelineDefaultSpaceId) !== null && _b !== void 0 ? _b : props.collectionId,
3781
+ dbEndpoint: devSettings.dbEndpoint,
3782
+ dbAPIToken: devSettings.dbAPIToken,
3783
+ dbUserToken: devSettings.dbUserToken,
3784
+ }, cond: {
3785
+ type: "list",
3786
+ query: JSON.parse(JSON.stringify(__spreadArray([
3787
+ {
3788
+ type: "=",
3789
+ value: eachValue,
3790
+ queryId: eachAttribtueId,
3791
+ }
3792
+ ], excludeGroupQuery, true))),
3793
+ cursor: renderCursor(eachValue),
3794
+ sort: handleReadQueryHocSort(query),
3795
+ limit: limit,
3796
+ pipeline: pipeline,
3797
+ }, offline: (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareOffline, onChangeData: function (data) {
3798
+ handleGetListData(data, eachValue, "", "");
3799
+ }, onError: handleGetItemError }));
3800
+ return null;
3801
+ });
3802
+ }
3803
+ return null;
3804
+ });
3805
+ }
3806
+ return null;
3807
+ });
3808
+ }
3809
+ else {
3810
+ rqHOCCompList.push(react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
3811
+ dbModule: dbModule,
3812
+ dbType: devSettings.server,
3813
+ dbCollection: (_c = (_b = props === null || props === void 0 ? void 0 : props.space) === null || _b === void 0 ? void 0 : _b.pipelineDefaultSpaceId) !== null && _c !== void 0 ? _c : props.collectionId,
3814
+ dbEndpoint: devSettings.dbEndpoint,
3815
+ dbAPIToken: devSettings.dbAPIToken,
3816
+ dbUserToken: devSettings.dbUserToken,
3817
+ }, cond: handleReadQueryHocCond("default"), offline: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareOffline, onChangeData: function (data) {
3818
+ handleGetListData(data, "default", "", "");
3819
+ }, onError: handleGetItemError }));
3820
+ }
3821
+ return rqHOCCompList;
3822
+ };
3660
3823
  var renderContent = function () {
3661
- 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;
3824
+ 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, _9, _10, _11;
3662
3825
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
3663
3826
  var tabs = renderTabs();
3664
3827
  var pages = [
@@ -3773,27 +3936,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3773
3936
  var filterComponent = renderSearchContent();
3774
3937
  var dataComponent = renderTabContent(tabs, props.type, viewType);
3775
3938
  var actionComponent = renderActionButtons(props.type);
3776
- var rqHOCComp = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
3777
- dbModule: dbModule,
3778
- dbType: devSettings.server,
3779
- 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,
3780
- dbEndpoint: devSettings.dbEndpoint,
3781
- dbAPIToken: devSettings.dbAPIToken,
3782
- dbUserToken: devSettings.dbUserToken,
3783
- }, cond: handleReadQueryHocCond(), offline: (_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareOffline, onChangeData: handleGetListData, onError: handleGetItemError }));
3784
- if ((_v = props.renderSettings) === null || _v === void 0 ? void 0 : _v.renderListUI) {
3939
+ if ((_s = props.renderSettings) === null || _s === void 0 ? void 0 : _s.renderListUI) {
3785
3940
  return (react_1.default.createElement(react_1.default.Fragment, null,
3786
- rqHOCComp,
3941
+ renderListRQHoc(),
3787
3942
  props.renderSettings.renderListUI(actionComponent, filterComponent, dataComponent)));
3788
3943
  }
3789
3944
  return (react_1.default.createElement(react_1.default.Fragment, null,
3790
- rqHOCComp,
3945
+ renderListRQHoc(),
3791
3946
  react_1.default.createElement("div", { className: "flex flex-col py-2 md:items-end md:flex-row" },
3792
3947
  react_1.default.createElement("div", { className: "flex flex-col" },
3793
3948
  react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
3794
3949
  react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
3795
3950
  react_1.default.createElement("div", { className: "grow" }),
3796
- !((_w = props.organise) === null || _w === void 0 ? void 0 : _w.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterComponent)),
3951
+ !((_t = props.organise) === null || _t === void 0 ? void 0 : _t.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" },
3952
+ ((_u = props === null || props === void 0 ? void 0 : props.organise) === null || _u === void 0 ? void 0 : _u.showGroupByFeature) && (react_1.default.createElement(select_1.Select, { label: "Group", options: (_0 = (_x = (_w = (_v = props === null || props === void 0 ? void 0 : props.organise) === null || _v === void 0 ? void 0 : _v.renderGroupByOptions) === null || _w === void 0 ? void 0 : _w.call(_v)) !== null && _x !== void 0 ? _x : (_z = (_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.renderReferenceLabelOptions) === null || _z === void 0 ? void 0 : _z.call(_y, props.collectionId, true)) !== null && _0 !== void 0 ? _0 : [], value: groupIds, onChange: function (value) { return setGroupIds(value); } })),
3953
+ filterComponent)),
3797
3954
  react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" },
3798
3955
  schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
3799
3956
  react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white", onClick: function () {
@@ -3818,22 +3975,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3818
3975
  });
3819
3976
  }, bgColor: "bg-white" }))),
3820
3977
  !isBottom && renderActionButtons(props.type),
3821
- (schemaPresent || ((_x = props.organise) === null || _x === void 0 ? void 0 : _x.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
3978
+ (schemaPresent || ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
3822
3979
  //TODO: Bug - Crash on Next Js
3823
3980
  // <Menu.Item>
3824
3981
  react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
3825
3982
  // </Menu.Item>
3826
3983
  ); })), lib: {
3827
- Transition: (_y = props === null || props === void 0 ? void 0 : props.lib) === null || _y === void 0 ? void 0 : _y.Transition,
3984
+ Transition: (_2 = props === null || props === void 0 ? void 0 : props.lib) === null || _2 === void 0 ? void 0 : _2.Transition,
3828
3985
  } })))),
3829
- ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" }, filterComponent.map(function (item, index) {
3830
- var _a, _b;
3831
- var filter = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) === null || _b === void 0 ? void 0 : _b[index];
3832
- return (react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
3833
- ? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
3834
- : "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
3835
- }))),
3836
- 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: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkMode })),
3986
+ ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" },
3987
+ ((_4 = props === null || props === void 0 ? void 0 : props.organise) === null || _4 === void 0 ? void 0 : _4.showGroupByFeature) && (react_1.default.createElement(select_1.Select, { label: "Group", options: (_10 = (_7 = (_6 = (_5 = props === null || props === void 0 ? void 0 : props.organise) === null || _5 === void 0 ? void 0 : _5.renderGroupByOptions) === null || _6 === void 0 ? void 0 : _6.call(_5)) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = props === null || props === void 0 ? void 0 : props.organise) === null || _8 === void 0 ? void 0 : _8.renderReferenceLabelOptions) === null || _9 === void 0 ? void 0 : _9.call(_8, props.collectionId, true)) !== null && _10 !== void 0 ? _10 : [], value: groupIds, onChange: function (value) { return setGroupIds(value); } })),
3988
+ filterComponent.map(function (item, index) {
3989
+ var _a, _b;
3990
+ var filter = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) === null || _b === void 0 ? void 0 : _b[index];
3991
+ return (react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
3992
+ ? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
3993
+ : "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
3994
+ }))),
3995
+ 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: (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.darkMode })),
3837
3996
  renderTabContent(tabs, props.type, viewType),
3838
3997
  isBottom && renderActionButtons(props.type, true)));
3839
3998
  default:
@@ -3897,7 +4056,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3897
4056
  });
3898
4057
  if (titleModel)
3899
4058
  titleKey = titleModel.id;
3900
- spaceTableData.forEach(function (eachData, index) {
4059
+ Object.values(spaceTableData).forEach(function (eachData, index) {
3901
4060
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
3902
4061
  var clonedEachData = JSON.parse(JSON.stringify(eachData));
3903
4062
  var allValues = Object.values(clonedEachData);
@@ -4072,56 +4231,63 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4072
4231
  var _a, _b, _c;
4073
4232
  return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: props.model, renderReferenceLabelOptions: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.renderReferenceSpaceOptions, onAddModelSchema: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onAddColumns, onClose: onClose }));
4074
4233
  };
4075
- var renderTabContent = function (tabs, dataType, viewType) {
4076
- 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, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
4077
- var selectedTabData = tabs.find(function (eachTab) {
4078
- if (eachTab.id === viewType) {
4079
- return eachTab;
4080
- }
4081
- else {
4234
+ console.log(size);
4235
+ console.log(cursor);
4236
+ console.log(lastCursor);
4237
+ var renderGroupTable = function (multipleSelect) {
4238
+ var tableList = [];
4239
+ Object.entries(tableData).map(function (data) {
4240
+ 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;
4241
+ var eachKey = data[0];
4242
+ if (Object.keys(tableData).length > 1 && eachKey === "default")
4082
4243
  return null;
4083
- }
4084
- });
4085
- var multipleSelect = isEditor && !((_a = props.organise) === null || _a === void 0 ? void 0 : _a.disableMulti) ? true : false;
4086
- if (viewType === "general") {
4087
- if (dataType === "list") {
4088
- return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: tableData, spaceData: spaceTableData, size: size, limit: limit, cursor: cursor, loading: tableLoading, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
4244
+ var allOptions = Object.values(filterReferenceList).flat();
4245
+ var label = (0, uuid_1.validate)(eachKey)
4246
+ ? (_a = allOptions.find(function (eachOption) { return eachOption.key === eachKey; })) === null || _a === void 0 ? void 0 : _a.label
4247
+ : eachKey;
4248
+ tableList.push(react_1.default.createElement(react_1.default.Fragment, null,
4249
+ eachKey !== "default" && (react_1.default.createElement("div", { className: "font-semibold text-md mt-5" },
4250
+ "Group By ",
4251
+ label)),
4252
+ react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: (_b = tableData[eachKey]) !== null && _b !== void 0 ? _b : [], spaceData: (_c = spaceTableData[eachKey]) !== null && _c !== void 0 ? _c : [], size: (_d = size[eachKey]) !== null && _d !== void 0 ? _d : 0, limit: limit, cursor: (_e = cursor[eachKey]) !== null && _e !== void 0 ? _e : "", loading: (_f = tableLoading[eachKey]) !== null && _f !== void 0 ? _f : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
4089
4253
  selectedIds.length > 0 &&
4090
- !((_b = props.edit) === null || _b === void 0 ? void 0 : _b.disabledUpdate) &&
4091
- !((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
4254
+ !((_g = props.edit) === null || _g === void 0 ? void 0 : _g.disabledUpdate) &&
4255
+ !((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
4092
4256
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
4093
4257
  handleBatchDraftData();
4094
4258
  } }),
4095
4259
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
4096
4260
  handleCloneSelectedData();
4097
4261
  } }))),
4098
- ((_d = props.edit) === null || _d === void 0 ? void 0 : _d.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
4262
+ ((_j = props.edit) === null || _j === void 0 ? void 0 : _j.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
4099
4263
  handleGenerateDeletePasscode();
4100
4264
  setDeleteModal(true);
4101
4265
  } })),
4102
- !isFirebase && !((_e = props.edit) === null || _e === void 0 ? void 0 : _e.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
4266
+ !isFirebase && !((_k = props.edit) === null || _k === void 0 ? void 0 : _k.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
4103
4267
  setBatchUpdateModal(true);
4104
4268
  } })),
4105
- ((_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMultipleSelectAddtionalActions) &&
4106
- ((_h = (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMultipleSelectAddtionalActions) === null || _h === void 0 ? void 0 : _h.map(function (eachButton) {
4269
+ ((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListMultipleSelectAddtionalActions) &&
4270
+ ((_o = (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListMultipleSelectAddtionalActions) === null || _o === void 0 ? void 0 : _o.map(function (eachButton) {
4107
4271
  return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
4108
4272
  var _a, _b;
4109
4273
  (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
4110
4274
  } }));
4111
- }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex, onClickRow: function (id) {
4275
+ }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: (_p = pageIndex[eachKey]) !== null && _p !== void 0 ? _p : 0, onClickRow: function (id) {
4112
4276
  var _a, _b;
4113
4277
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
4114
- }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, className: "mt-5", lib: { axios: (_j = props.lib) === null || _j === void 0 ? void 0 : _j.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.fixedPagination, advSettings: {
4115
- addColumnEnabled: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.addColumnEnabled,
4278
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
4279
+ handlePagination(value, eachKey);
4280
+ }, className: "mt-5", lib: { axios: (_q = props.lib) === null || _q === void 0 ? void 0 : _q.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.fixedPagination, advSettings: {
4281
+ addColumnEnabled: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.addColumnEnabled,
4116
4282
  renderAddColumnElements: renderAddMathColumn,
4117
- dragEnabled: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.advDragEnabled,
4118
- sortEnabled: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.advSortEnabled,
4119
- filterEnabled: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.advFilterEnabled,
4120
- sortId: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.sort,
4121
- sortOptions: (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.renderReferenceLabelOptions) === null || _s === void 0 ? void 0 : _s.call(_r),
4122
- onSortColumn: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeSort,
4123
- onDragColumn: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.onChangeDrag,
4124
- filterOptions: (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.additionalQuery) === null || _w === void 0 ? void 0 : _w.map(function (eachQuery) {
4283
+ dragEnabled: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.advDragEnabled,
4284
+ sortEnabled: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.advSortEnabled,
4285
+ filterEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.advFilterEnabled,
4286
+ sortId: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.sort,
4287
+ sortOptions: (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.renderReferenceLabelOptions) === null || _y === void 0 ? void 0 : _y.call(_x),
4288
+ onSortColumn: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.onChangeSort,
4289
+ onDragColumn: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.onChangeDrag,
4290
+ filterOptions: (_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) === null || _2 === void 0 ? void 0 : _2.map(function (eachQuery) {
4125
4291
  var _a;
4126
4292
  return {
4127
4293
  key: eachQuery.value,
@@ -4138,7 +4304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4138
4304
  return renderSearchContent(newQuery);
4139
4305
  },
4140
4306
  }, editable: {
4141
- active: ((_x = props.edit) === null || _x === void 0 ? void 0 : _x.listEditable) && !props.edit.disabledUpdate
4307
+ active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listEditable) && !props.edit.disabledUpdate
4142
4308
  ? true
4143
4309
  : false,
4144
4310
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -4152,7 +4318,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4152
4318
  });
4153
4319
  }); },
4154
4320
  }, addable: {
4155
- active: ((_y = props.edit) === null || _y === void 0 ? void 0 : _y.listAddable) ? true : false,
4321
+ active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
4156
4322
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
4157
4323
  return __generator(this, function (_a) {
4158
4324
  switch (_a.label) {
@@ -4163,54 +4329,78 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4163
4329
  }
4164
4330
  });
4165
4331
  }); },
4166
- }, darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode, hidePagination: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.hidePagination }));
4332
+ }, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode, hidePagination: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.hidePagination })));
4333
+ return null;
4334
+ });
4335
+ return tableList;
4336
+ };
4337
+ var renderTabContent = function (tabs, dataType, viewType) {
4338
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
4339
+ var selectedTabData = tabs.find(function (eachTab) {
4340
+ if (eachTab.id === viewType) {
4341
+ return eachTab;
4342
+ }
4343
+ else {
4344
+ return null;
4345
+ }
4346
+ });
4347
+ var multipleSelect = isEditor && !((_a = props.organise) === null || _a === void 0 ? void 0 : _a.disableMulti) ? true : false;
4348
+ if (viewType === "general") {
4349
+ if (dataType === "list") {
4350
+ return react_1.default.createElement(react_1.default.Fragment, null, renderGroupTable(multipleSelect));
4167
4351
  }
4168
4352
  else if (dataType === "read") {
4169
4353
  return (react_1.default.createElement(react_1.default.Fragment, null,
4170
- react_1.default.createElement(detailList_1.DetailList, { model: props.model, referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: "General Details", list: renderDetailListData(props.model), handleReferenceLink: !schemaPresent && ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareReadReferenceView)
4354
+ react_1.default.createElement(detailList_1.DetailList, { model: props.model, referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: "General Details", list: renderDetailListData(props.model), handleReferenceLink: !schemaPresent && ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadReferenceView)
4171
4355
  ? props.bareSettings.bareReadReferenceView
4172
- : undefined, splitView: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.splitView }),
4356
+ : undefined, splitView: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.splitView }),
4173
4357
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(dataType)),
4174
4358
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(dataType))));
4175
4359
  }
4176
4360
  }
4177
4361
  else if (selectedTabData) {
4178
- if ((_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListComponent) {
4362
+ if ((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListComponent) {
4179
4363
  return (react_1.default.createElement(react_1.default.Fragment, null,
4180
- props.bareSettings.bareListComponent(tableData, spaceTableData, tableLoading, pageIndex),
4181
- !((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: handlePagination, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode }))));
4364
+ props.bareSettings.bareListComponent(tableData["default"], spaceTableData["default"], tableLoading["default"], pageIndex["default"]),
4365
+ !((_e = props.organise) === null || _e === void 0 ? void 0 : _e.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData["default"], size: size["default"], limit: limit["default"], cursor: cursor["default"], pageIndex: pageIndex["default"], paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: function (value) {
4366
+ handlePagination(value, "default");
4367
+ }, darkMode: (_f = props.organise) === null || _f === void 0 ? void 0 : _f.darkMode }))));
4182
4368
  }
4183
4369
  else if (selectedTabData.viewType === "iframe") {
4184
- return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (_6 = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.iframeSrc) !== null && _6 !== void 0 ? _6 : "", title: (_7 = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.id) !== null && _7 !== void 0 ? _7 : "", onLoad: props.onLoadIframe }));
4370
+ return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (_g = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.iframeSrc) !== null && _g !== void 0 ? _g : "", title: (_h = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.id) !== null && _h !== void 0 ? _h : "", onLoad: props.onLoadIframe }));
4185
4371
  }
4186
4372
  else if (selectedTabData.viewType === "list") {
4187
4373
  return (react_1.default.createElement(react_1.default.Fragment, null,
4188
- react_1.default.createElement(list_1.List, { paginationType: isFirebase ? "cursor" : "page", list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
4189
- selectedIds.length > 0 && !((_8 = props.edit) === null || _8 === void 0 ? void 0 : _8.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
4374
+ react_1.default.createElement(list_1.List, { paginationType: isFirebase ? "cursor" : "page", list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size["default"], limit: limit, cursor: cursor["default"], loading: tableLoading["default"], pageIndex: pageIndex["default"], checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
4375
+ selectedIds.length > 0 && !((_j = props.edit) === null || _j === void 0 ? void 0 : _j.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
4190
4376
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
4191
4377
  handleBatchDraftData();
4192
4378
  } }),
4193
4379
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
4194
4380
  handleCloneSelectedData();
4195
4381
  } }))),
4196
- ((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
4382
+ ((_k = props.edit) === null || _k === void 0 ? void 0 : _k.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
4197
4383
  handleGenerateDeletePasscode();
4198
4384
  setDeleteModal(true);
4199
4385
  } })),
4200
- !isFirebase && !((_10 = props.edit) === null || _10 === void 0 ? void 0 : _10.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
4386
+ !isFirebase && !((_l = props.edit) === null || _l === void 0 ? void 0 : _l.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
4201
4387
  setBatchUpdateModal(true);
4202
4388
  } }))), onClickRow: function (id) {
4203
4389
  var _a, _b;
4204
4390
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
4205
- }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, className: "mt-5", hidePagination: (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.hidePagination })));
4391
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
4392
+ handlePagination(value, "default");
4393
+ }, className: "mt-5", hidePagination: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.hidePagination })));
4206
4394
  }
4207
4395
  else if (selectedTabData.viewType === "grid") {
4208
4396
  var isGridScroll = renderCheckGridScroll();
4209
4397
  return (react_1.default.createElement(react_1.default.Fragment, null,
4210
- react_1.default.createElement(grid_1.Grid, { paginationType: isGridScroll || isFirebase ? "cursor" : "page", data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, infinityScroll: isGridScroll, horizontalScroll: isGridScroll, pageIndex: pageIndex, onClickData: function (id) {
4398
+ react_1.default.createElement(grid_1.Grid, { paginationType: isGridScroll || isFirebase ? "cursor" : "page", data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size["default"], limit: limit, cursor: cursor["default"], loading: tableLoading["default"], infinityScroll: isGridScroll, horizontalScroll: isGridScroll, pageIndex: pageIndex["default"], onClickData: function (id) {
4211
4399
  var _a, _b;
4212
4400
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
4213
- }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, gridColClassName: (_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareListGridColClassName, className: "mt-5", hidePagination: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.hidePagination })));
4401
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
4402
+ handlePagination(value, "default");
4403
+ }, gridColClassName: (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListGridColClassName, className: "mt-5", hidePagination: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.hidePagination })));
4214
4404
  }
4215
4405
  else if (selectedTabData.viewType === "calendar") {
4216
4406
  var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
@@ -4219,7 +4409,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4219
4409
  : ["red", "blue", "green", "indigo", "orange", "violet", "yellow"];
4220
4410
  var valuesWithColour_1 = {};
4221
4411
  if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.groupId) {
4222
- spaceTableData.map(function (eachTableData) {
4412
+ spaceTableData["default"].map(function (eachTableData) {
4223
4413
  var _a;
4224
4414
  if (listOfColors_1.length === 0)
4225
4415
  return null;
@@ -4236,8 +4426,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4236
4426
  var renderEventAvailabilities = function () {
4237
4427
  var eventAvailabilities = [];
4238
4428
  if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.startDate) {
4239
- for (var _i = 0, spaceTableData_1 = spaceTableData; _i < spaceTableData_1.length; _i++) {
4240
- var eachData = spaceTableData_1[_i];
4429
+ for (var _i = 0, _a = spaceTableData["default"]; _i < _a.length; _i++) {
4430
+ var eachData = _a[_i];
4241
4431
  if (!eachData[calendarSettings_1.startDate])
4242
4432
  break;
4243
4433
  else if (!(0, moment_1.default)(eachData[calendarSettings_1.startDate], "YYYY-MM-DD HH:mm A").isValid()) {
@@ -4304,11 +4494,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4304
4494
  }
4305
4495
  return eventAvailabilities;
4306
4496
  };
4307
- return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_14 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _14 !== void 0 ? _14 : calendarView, handleMonthChange: function (date) {
4497
+ return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_q = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _q !== void 0 ? _q : calendarView, handleMonthChange: function (date) {
4308
4498
  var startOfMonth = (0, moment_1.default)(calendarTabMonth).startOf("month");
4309
4499
  var endOfMonth = (0, moment_1.default)(calendarTabMonth).endOf("month");
4310
4500
  if (!(0, moment_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
4311
- setTableLoading(true);
4501
+ setTableLoading({ default: true });
4312
4502
  }
4313
4503
  setCalendarTabMonth(date);
4314
4504
  }, handleViewChange: setCalendarView, renderEventAvailabilities: renderEventAvailabilities, onClickEvent: function (id) {
@@ -4320,7 +4510,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4320
4510
  else if (selectedTabData.viewType === "feeds") {
4321
4511
  var contentList_1 = [];
4322
4512
  var feedsSettings_1 = selectedTabData.feedsSettings;
4323
- var customFeedsData = (_15 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _15 === void 0 ? void 0 : _15.call(feedsSettings_1, tableData, spaceTableData);
4513
+ var customFeedsData = (_r = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _r === void 0 ? void 0 : _r.call(feedsSettings_1, tableData, spaceTableData);
4324
4514
  if (customFeedsData && customFeedsData.length > 0) {
4325
4515
  customFeedsData.map(function (eachData) {
4326
4516
  var _a, _b, _c, _d;
@@ -4343,7 +4533,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4343
4533
  if (IconFound) {
4344
4534
  selectedIcon_1 = react_1.default.createElement(IconFound, { className: "h-5 w-5 text-white" });
4345
4535
  }
4346
- spaceTableData.map(function (eachData) {
4536
+ spaceTableData["default"].map(function (eachData) {
4347
4537
  var _a, _b;
4348
4538
  if (feedsSettings_1 && feedsSettings_1.title && feedsSettings_1.desc) {
4349
4539
  var content = {
@@ -4361,9 +4551,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4361
4551
  });
4362
4552
  }
4363
4553
  return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", { className: "p-4 bg-white rounded-lg" },
4364
- react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.darkMode }),
4554
+ react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkMode }),
4365
4555
  react_1.default.createElement("div", { className: "my-10" }),
4366
- contentList_1.length > 0 && !((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: handlePagination, darkMode: (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.darkMode }))))));
4556
+ contentList_1.length > 0 && !((_t = props.organise) === null || _t === void 0 ? void 0 : _t.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData["default"], size: size["default"], limit: limit["default"], cursor: cursor["default"], pageIndex: pageIndex["default"], paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: function (value) {
4557
+ handlePagination(value, "default");
4558
+ }, darkMode: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.darkMode }))))));
4367
4559
  }
4368
4560
  else if (selectedTabData.viewType === "map") {
4369
4561
  var mapSettings_1 = selectedTabData.mapSettings;
@@ -4379,7 +4571,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4379
4571
  "purple",
4380
4572
  ];
4381
4573
  if (mapSettings_1.group) {
4382
- spaceTableData.map(function (eachData) {
4574
+ spaceTableData["default"].map(function (eachData) {
4383
4575
  if (eachData[mapSettings_1.group] &&
4384
4576
  !uniqueGroupList_1.includes(eachData[mapSettings_1.group])) {
4385
4577
  uniqueGroupList_1.push(eachData[mapSettings_1.group]);
@@ -4410,7 +4602,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4410
4602
  var infoWindowHeaderComponent = function (_, data) {
4411
4603
  return (react_1.default.createElement("p", { className: "text-primary-500 font-semibold text-base" }, data.title));
4412
4604
  };
4413
- spaceTableData.map(function (eachData) {
4605
+ spaceTableData["default"].map(function (eachData) {
4414
4606
  var _a, _b, _c, _d, _e, _f, _g, _h;
4415
4607
  var eachMarkerColor = "white";
4416
4608
  if (mapSettings_1.group) {
@@ -4462,7 +4654,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4462
4654
  }
4463
4655
  else if (selectedTabData.viewType === "kanban") {
4464
4656
  var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
4465
- var kanbanTitle_2 = (_19 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _19 !== void 0 ? _19 : "";
4657
+ var kanbanTitle_2 = (_v = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _v !== void 0 ? _v : "";
4466
4658
  var nullColumn_1 = false;
4467
4659
  var groupBy_1 = [];
4468
4660
  var groupLabel_1 = [];
@@ -4482,7 +4674,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4482
4674
  return null;
4483
4675
  });
4484
4676
  var kanbanData = renderGridAndListData("", "grid", kanbanTitle_2);
4485
- return (react_1.default.createElement(kanban_1.Kanban, { data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
4677
+ return (react_1.default.createElement(kanban_1.Kanban, { data: kanbanData, loading: tableLoading["default"], groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
4486
4678
  ? "Data has exceeded limit, please apply filters"
4487
4679
  : "", draggable: true, droppable: kanbanDroppable, onUpdateData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
4488
4680
  var _a;
@@ -5058,7 +5250,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5058
5250
  };
5059
5251
  return (react_1.default.createElement(react_1.default.Fragment, null,
5060
5252
  renderNotification("root"),
5061
- ((_6 = (_5 = props.renderSettings) === null || _5 === void 0 ? void 0 : _5.renderLoadingUI) === null || _6 === void 0 ? void 0 : _6.call(_5)) && loading ? ((_7 = props.renderSettings) === null || _7 === void 0 ? void 0 : _7.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
5253
+ ((_7 = (_6 = props.renderSettings) === null || _6 === void 0 ? void 0 : _6.renderLoadingUI) === null || _7 === void 0 ? void 0 : _7.call(_6)) && loading ? ((_8 = props.renderSettings) === null || _8 === void 0 ? void 0 : _8.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
5062
5254
  var _a, _b;
5063
5255
  if (loading)
5064
5256
  return;