blixify-ui-web 0.1.166 → 0.1.167

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.
Files changed (31) hide show
  1. package/lib/components/data/dataTemplate/index.d.ts +1 -1
  2. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  3. package/lib/components/data/dataTemplate/index.js +161 -156
  4. package/lib/components/data/dataTemplate/index.js.map +1 -1
  5. package/lib/components/data/display.d.ts +1 -1
  6. package/lib/components/data/display.d.ts.map +1 -1
  7. package/lib/components/data/display.js +93 -64
  8. package/lib/components/data/display.js.map +1 -1
  9. package/lib/components/data/stories.d.ts +1 -1
  10. package/lib/components/data/stories.js +1 -1
  11. package/lib/components/data/testData.d.ts +3 -1
  12. package/lib/components/data/testData.d.ts.map +1 -1
  13. package/lib/components/data/testData.js +4 -2
  14. package/lib/components/data/testData.js.map +1 -1
  15. package/lib/components/display/list/index.d.ts.map +1 -1
  16. package/lib/components/display/list/index.js +1 -1
  17. package/lib/components/display/list/index.js.map +1 -1
  18. package/lib/components/display/table/index.d.ts.map +1 -1
  19. package/lib/components/display/table/index.js +3 -2
  20. package/lib/components/display/table/index.js.map +1 -1
  21. package/lib/components/input/datePicker/index.d.ts.map +1 -1
  22. package/lib/components/input/datePicker/index.js +27 -22
  23. package/lib/components/input/datePicker/index.js.map +1 -1
  24. package/lib/components/input/select/index.d.ts.map +1 -1
  25. package/lib/components/input/select/index.js +17 -17
  26. package/lib/components/input/select/index.js.map +1 -1
  27. package/lib/components/input/uploadInput/index.d.ts +2 -1
  28. package/lib/components/input/uploadInput/index.d.ts.map +1 -1
  29. package/lib/components/input/uploadInput/index.js +11 -4
  30. package/lib/components/input/uploadInput/index.js.map +1 -1
  31. package/package.json +1 -1
@@ -16,7 +16,7 @@ interface Organise {
16
16
  onChangeSort?: (value: Sort) => void;
17
17
  onChangeFilter?: (value: any) => void;
18
18
  onChangeTabs?: (value: ExtendedTabs[]) => void;
19
- debugOnChangeType?: (type: string, selectedId?: string) => void;
19
+ handleNavigate?: (type: string, selectedId?: string, viewId?: string) => void;
20
20
  renderReferenceLabelOptions?: (spaceId?: string, includeReference?: boolean, type?: string) => Option[];
21
21
  renderReferenceSpaceOptions?: () => Option[];
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAkBf,OAAO,EAAE,MAAM,EAAU,MAAM,oBAAoB,CAAC;AAKpD,OAAO,EAAQ,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAavD,OAAO,EAAS,IAAI,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAmB,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEpE,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,EAAE,CAAC;IACvD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC/C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,2BAA2B,CAAC,EAAE,CAC5B,OAAO,CAAC,EAAE,MAA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, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
143
143
  var formRef = (0, react_1.createRef)();
144
144
  var objectFormRef = (0, react_1.createRef)();
145
145
  var modalFormInputRefs = props.model.map(function () { return (0, react_1.createRef)(); });
@@ -149,64 +149,64 @@ function DataTemplate(props) {
149
149
  var limit = props.limit ? props.limit : 10;
150
150
  var readQueryHocRef = (0, react_1.useRef)();
151
151
  var typingTimeout = (0, react_1.useRef)();
152
- var _o = (0, react_1.useState)(false), loading = _o[0], setLoading = _o[1];
153
- var _p = (0, react_1.useState)(), notification = _p[0], setNotification = _p[1];
152
+ var _r = (0, react_1.useState)(false), loading = _r[0], setLoading = _r[1];
153
+ var _s = (0, react_1.useState)(), notification = _s[0], setNotification = _s[1];
154
154
  //INFO : Used by List
155
- var _q = (0, react_1.useState)(""), filterSearch = _q[0], setFilterSearch = _q[1];
156
- var _r = (0, react_1.useState)(""), filterSearchParams = _r[0], setFilterSearchParams = _r[1];
157
- var _s = (0, react_1.useState)(""), filterSelection = _s[0], setFilterSelection = _s[1];
158
- var _t = (0, react_1.useState)(""), filterReference = _t[0], setFilterReference = _t[1];
159
- var _u = (0, react_1.useState)(""), filterReferenceSearch = _u[0], setFilterReferenceSearch = _u[1];
160
- var _v = (0, react_1.useState)([]), filterReferenceList = _v[0], setFilterReferenceList = _v[1];
161
- var _w = (0, react_1.useState)({
155
+ var _t = (0, react_1.useState)(""), filterSearch = _t[0], setFilterSearch = _t[1];
156
+ var _u = (0, react_1.useState)(""), filterSearchParams = _u[0], setFilterSearchParams = _u[1];
157
+ var _v = (0, react_1.useState)(""), filterSelection = _v[0], setFilterSelection = _v[1];
158
+ var _w = (0, react_1.useState)(""), filterReference = _w[0], setFilterReference = _w[1];
159
+ var _x = (0, react_1.useState)(""), filterReferenceSearch = _x[0], setFilterReferenceSearch = _x[1];
160
+ var _y = (0, react_1.useState)([]), filterReferenceList = _y[0], setFilterReferenceList = _y[1];
161
+ var _z = (0, react_1.useState)({
162
162
  startDate: undefined,
163
163
  endDate: undefined,
164
- }), filterReferenceDate = _w[0], setFilterReferenceDate = _w[1];
165
- var _x = (0, react_1.useState)(true), tableLoading = _x[0], setTableLoading = _x[1];
166
- var _y = (0, react_1.useState)(""), cursor = _y[0], setCursor = _y[1];
167
- var _z = (0, react_1.useState)(""), lastCursor = _z[0], setLastCursor = _z[1];
168
- var _0 = (0, react_1.useState)([]), tableData = _0[0], setTableData = _0[1];
169
- var _1 = (0, react_1.useState)([]), spaceTableData = _1[0], setSpaceTableData = _1[1];
170
- var _2 = (0, react_1.useState)(0), size = _2[0], setSize = _2[1];
171
- var _3 = (0, react_1.useState)(0), pageIndex = _3[0], setPageIndex = _3[1];
172
- var _4 = (0, react_1.useState)([]), selectedIds = _4[0], setSelectedIds = _4[1];
173
- var _5 = (0, react_1.useState)(false), selectAll = _5[0], setSelectAll = _5[1];
174
- var _6 = (0, react_1.useState)(""), deletePasscode = _6[0], setDeletePasscode = _6[1];
175
- var _7 = (0, react_1.useState)(""), deletePasscodeInput = _7[0], setDeletePasscodeInput = _7[1];
164
+ }), filterReferenceDate = _z[0], setFilterReferenceDate = _z[1];
165
+ var _0 = (0, react_1.useState)(true), tableLoading = _0[0], setTableLoading = _0[1];
166
+ var _1 = (0, react_1.useState)(""), cursor = _1[0], setCursor = _1[1];
167
+ var _2 = (0, react_1.useState)(""), lastCursor = _2[0], setLastCursor = _2[1];
168
+ var _3 = (0, react_1.useState)([]), tableData = _3[0], setTableData = _3[1];
169
+ var _4 = (0, react_1.useState)([]), spaceTableData = _4[0], setSpaceTableData = _4[1];
170
+ var _5 = (0, react_1.useState)(0), size = _5[0], setSize = _5[1];
171
+ var _6 = (0, react_1.useState)(0), pageIndex = _6[0], setPageIndex = _6[1];
172
+ var _7 = (0, react_1.useState)([]), selectedIds = _7[0], setSelectedIds = _7[1];
173
+ var _8 = (0, react_1.useState)(false), selectAll = _8[0], setSelectAll = _8[1];
174
+ var _9 = (0, react_1.useState)(""), deletePasscode = _9[0], setDeletePasscode = _9[1];
175
+ var _10 = (0, react_1.useState)(""), deletePasscodeInput = _10[0], setDeletePasscodeInput = _10[1];
176
176
  //INFO : Used by List Organise
177
- var _8 = (0, react_1.useState)(false), sortModal = _8[0], setSortModal = _8[1];
178
- var _9 = (0, react_1.useState)(false), filterModal = _9[0], setFilterModal = _9[1];
179
- var _10 = (0, react_1.useState)(false), addTabModal = _10[0], setAddTabModal = _10[1];
180
- var _11 = (0, react_1.useState)(false), queryForm = _11[0], setQueryForm = _11[1];
181
- var _12 = (0, react_1.useState)(false), batchUpdateModal = _12[0], setBatchUpdateModal = _12[1];
182
- var _13 = (0, react_1.useState)({
177
+ var _11 = (0, react_1.useState)(false), sortModal = _11[0], setSortModal = _11[1];
178
+ var _12 = (0, react_1.useState)(false), filterModal = _12[0], setFilterModal = _12[1];
179
+ var _13 = (0, react_1.useState)(false), addTabModal = _13[0], setAddTabModal = _13[1];
180
+ var _14 = (0, react_1.useState)(false), queryForm = _14[0], setQueryForm = _14[1];
181
+ var _15 = (0, react_1.useState)(false), batchUpdateModal = _15[0], setBatchUpdateModal = _15[1];
182
+ var _16 = (0, react_1.useState)({
183
183
  columnId: "",
184
184
  columnData: {},
185
- }), batchUpdateData = _13[0], setBatchUpdateData = _13[1];
185
+ }), batchUpdateData = _16[0], setBatchUpdateData = _16[1];
186
186
  //INFO : Used by Export
187
- var _14 = (0, react_1.useState)(null), csvFile = _14[0], setCSVFile = _14[1];
188
- var _15 = (0, react_1.useState)([]), csvFileData = _15[0], setCSVFileData = _15[1];
189
- var _16 = (0, react_1.useState)(0), stepCSVIndex = _16[0], setStepCSVIndex = _16[1];
190
- var _17 = (0, react_1.useState)({}), listCSVMapAttribute = _17[0], setListCSVMapAttribute = _17[1];
191
- var _18 = (0, react_1.useState)({}), listCSVObjAttribute = _18[0], setListCSVObjAttribute = _18[1];
192
- var _19 = (0, react_1.useState)([]), csvAPIAttribute = _19[0], setCSVAPIAttribute = _19[1];
193
- var _20 = (0, react_1.useState)([]), importTableData = _20[0], setImportTableData = _20[1];
194
- var _21 = (0, react_1.useState)(""), exportLink = _21[0], setExportLink = _21[1];
195
- var _22 = (0, react_1.useState)([]), queryList = _22[0], setQueryList = _22[1];
196
- var _23 = (0, react_1.useState)(-1), queryIndex = _23[0], setQueryIndex = _23[1];
187
+ var _17 = (0, react_1.useState)(null), csvFile = _17[0], setCSVFile = _17[1];
188
+ var _18 = (0, react_1.useState)([]), csvFileData = _18[0], setCSVFileData = _18[1];
189
+ var _19 = (0, react_1.useState)(0), stepCSVIndex = _19[0], setStepCSVIndex = _19[1];
190
+ var _20 = (0, react_1.useState)({}), listCSVMapAttribute = _20[0], setListCSVMapAttribute = _20[1];
191
+ var _21 = (0, react_1.useState)({}), listCSVObjAttribute = _21[0], setListCSVObjAttribute = _21[1];
192
+ var _22 = (0, react_1.useState)([]), csvAPIAttribute = _22[0], setCSVAPIAttribute = _22[1];
193
+ var _23 = (0, react_1.useState)([]), importTableData = _23[0], setImportTableData = _23[1];
194
+ var _24 = (0, react_1.useState)(""), exportLink = _24[0], setExportLink = _24[1];
195
+ var _25 = (0, react_1.useState)([]), queryList = _25[0], setQueryList = _25[1];
196
+ var _26 = (0, react_1.useState)(-1), queryIndex = _26[0], setQueryIndex = _26[1];
197
197
  //INFO : Used by Read
198
198
  //INFO : Used by Update
199
- var _24 = (0, react_1.useState)(false), modalVisible = _24[0], setModalVisible = _24[1];
200
- var _25 = (0, react_1.useState)(false), deleteModal = _25[0], setDeleteModal = _25[1];
201
- var _26 = (0, react_1.useState)(false), excelModal = _26[0], setExcelModal = _26[1];
202
- var _27 = (0, react_1.useState)(false), exportExcel = _27[0], setExportExcel = _27[1];
203
- var _28 = (0, react_1.useState)({}), selectedData = _28[0], setSelectedData = _28[1];
204
- var _29 = (0, react_1.useState)(""), selectedObjectStructureId = _29[0], setSelectedObjectStructureId = _29[1];
205
- var _30 = (0, react_1.useState)(""), selectedObjectId = _30[0], setSelectedObjectId = _30[1];
206
- var _31 = (0, react_1.useState)({}), selectedObjectData = _31[0], setSelectedObjectData = _31[1];
207
- var _32 = (0, react_1.useState)(false), referenceLoading = _32[0], setReferenceLoading = _32[1];
208
- var _33 = (0, react_1.useState)({}), referencesOptions = _33[0], setReferencesOptions = _33[1];
209
- var _34 = (0, react_1.useState)({}), referenceModelSchema = _34[0], setReferenceSchema = _34[1];
199
+ var _27 = (0, react_1.useState)(false), modalVisible = _27[0], setModalVisible = _27[1];
200
+ var _28 = (0, react_1.useState)(false), deleteModal = _28[0], setDeleteModal = _28[1];
201
+ var _29 = (0, react_1.useState)(false), excelModal = _29[0], setExcelModal = _29[1];
202
+ var _30 = (0, react_1.useState)(false), exportExcel = _30[0], setExportExcel = _30[1];
203
+ var _31 = (0, react_1.useState)({}), selectedData = _31[0], setSelectedData = _31[1];
204
+ var _32 = (0, react_1.useState)(""), selectedObjectStructureId = _32[0], setSelectedObjectStructureId = _32[1];
205
+ var _33 = (0, react_1.useState)(""), selectedObjectId = _33[0], setSelectedObjectId = _33[1];
206
+ var _34 = (0, react_1.useState)({}), selectedObjectData = _34[0], setSelectedObjectData = _34[1];
207
+ var _35 = (0, react_1.useState)(false), referenceLoading = _35[0], setReferenceLoading = _35[1];
208
+ var _36 = (0, react_1.useState)({}), referencesOptions = _36[0], setReferencesOptions = _36[1];
209
+ var _37 = (0, react_1.useState)({}), referenceModelSchema = _37[0], setReferenceSchema = _37[1];
210
210
  var devSettings = props.devSettings;
211
211
  var serverId = devSettings.server === "mongoServer" ? "_id" : "id";
212
212
  var isEditor = ((_a = props.edit) === null || _a === void 0 ? void 0 : _a.allEditable) ? true : false;
@@ -217,15 +217,17 @@ function DataTemplate(props) {
217
217
  dbCollection: props.collectionId,
218
218
  dbEndpoint: devSettings.dbEndpoint,
219
219
  });
220
- var debug = ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.debugOnChangeType) ? true : false;
220
+ var debug = ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.handleNavigate) ? true : false;
221
221
  var moreButtonPopUp = [
222
- {
223
- text: "Import Excel",
224
- onClick: function () {
225
- setExcelModal(true);
226
- setModalVisible(true);
227
- },
228
- },
222
+ ((_f = props.edit) === null || _f === void 0 ? void 0 : _f.allEditable)
223
+ ? {
224
+ text: "Import Excel",
225
+ onClick: function () {
226
+ setExcelModal(true);
227
+ setModalVisible(true);
228
+ },
229
+ }
230
+ : null,
229
231
  {
230
232
  text: "Export Excel",
231
233
  onClick: function () {
@@ -233,8 +235,8 @@ function DataTemplate(props) {
233
235
  setModalVisible(true);
234
236
  },
235
237
  },
236
- ];
237
- if ((_f = props.organise) === null || _f === void 0 ? void 0 : _f.moreSettings)
238
+ ].filter(Boolean);
239
+ if ((_g = props.organise) === null || _g === void 0 ? void 0 : _g.moreSettings)
238
240
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
239
241
  (0, react_1.useEffect)(function () {
240
242
  switch (props.type) {
@@ -291,7 +293,7 @@ function DataTemplate(props) {
291
293
  }
292
294
  };
293
295
  var handleGetListData = function (responseData, type, rowId) { return __awaiter(_this, void 0, void 0, function () {
294
- var dataList, prettierDataList, selectedIndex_1;
296
+ var dataList, prettierDataList, selectedIndex_1, newTableData;
295
297
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
296
298
  return __generator(this, function (_m) {
297
299
  switch (_m.label) {
@@ -299,7 +301,7 @@ function DataTemplate(props) {
299
301
  dataList = [];
300
302
  prettierDataList = [];
301
303
  if (!responseData) return [3 /*break*/, 2];
302
- return [4 /*yield*/, (0, display_1.handleListDataBasedOnModel)(responseData.data, (_b = (_a = props.devSettings) === null || _a === void 0 ? void 0 : _a.server) !== null && _b !== void 0 ? _b : "mongoServer", (_c = props.lib) === null || _c === void 0 ? void 0 : _c.axios, props.model, (_e = (_d = props.devSettings) === null || _d === void 0 ? void 0 : _d.imageEndpoint) !== null && _e !== void 0 ? _e : "", props.localURLEndpoint, props.collectionId, (_g = (_f = props.devSettings) === null || _f === void 0 ? void 0 : _f.dbEndpoint) !== null && _g !== void 0 ? _g : "", (_h = props.devSettings.organisationMembers) !== null && _h !== void 0 ? _h : [], handleNavigate, (_j = props.devSettings) === null || _j === void 0 ? void 0 : _j.bucketName, ((_k = props.organise) === null || _k === void 0 ? void 0 : _k.viewId) === "general", (_l = props.organise) === null || _l === void 0 ? void 0 : _l.debugOnChangeType)];
304
+ return [4 /*yield*/, (0, display_1.handleListDataBasedOnModel)(responseData.data, (_b = (_a = props.devSettings) === null || _a === void 0 ? void 0 : _a.server) !== null && _b !== void 0 ? _b : "mongoServer", (_c = props.lib) === null || _c === void 0 ? void 0 : _c.axios, props.model, (_e = (_d = props.devSettings) === null || _d === void 0 ? void 0 : _d.imageEndpoint) !== null && _e !== void 0 ? _e : "", (_g = (_f = props.devSettings) === null || _f === void 0 ? void 0 : _f.dbEndpoint) !== null && _g !== void 0 ? _g : "", (_h = props.devSettings.organisationMembers) !== null && _h !== void 0 ? _h : [], (_j = props.organise) === null || _j === void 0 ? void 0 : _j.handleNavigate, (_k = props.devSettings) === null || _k === void 0 ? void 0 : _k.bucketName, ((_l = props.organise) === null || _l === void 0 ? void 0 : _l.viewId) === "general")];
303
305
  case 1:
304
306
  prettierDataList = _m.sent();
305
307
  responseData.data.map(function (eachData) {
@@ -342,7 +344,11 @@ function DataTemplate(props) {
342
344
  setSize(responseData.count);
343
345
  }
344
346
  else {
345
- setTableData(filterSearchParams ? dataList : dataList.concat(tableData));
347
+ newTableData = filterSearchParams
348
+ ? dataList
349
+ : tableData.concat(dataList);
350
+ setTableData(newTableData);
351
+ setSize(newTableData.length);
346
352
  setSpaceTableData(filterSearchParams
347
353
  ? dataList
348
354
  : spaceTableData.concat(prettierDataList));
@@ -375,6 +381,8 @@ function DataTemplate(props) {
375
381
  setTableData([]);
376
382
  setSpaceTableData([]);
377
383
  setPageIndex(0);
384
+ setCursor("");
385
+ setLastCursor("");
378
386
  setTableLoading(true);
379
387
  };
380
388
  var handleNameSearch = function (e) {
@@ -402,10 +410,8 @@ function DataTemplate(props) {
402
410
  setModalVisible(false);
403
411
  setLoading(false);
404
412
  if (props.type === "update" || props.type === "read") {
405
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType)
406
- props.organise.debugOnChangeType("list", "");
407
- else
408
- handleNavigate();
413
+ if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate)
414
+ props.organise.handleNavigate("list", "");
409
415
  }
410
416
  else {
411
417
  console.log("Data Retrieval Error - " + err.message);
@@ -909,11 +915,11 @@ function DataTemplate(props) {
909
915
  }); };
910
916
  var handleRemoveSelectedData = function () { return __awaiter(_this, void 0, void 0, function () {
911
917
  var selectedId, res, err_7;
912
- var _a;
913
- return __generator(this, function (_b) {
914
- switch (_b.label) {
918
+ var _a, _b, _c;
919
+ return __generator(this, function (_d) {
920
+ switch (_d.label) {
915
921
  case 0:
916
- _b.trys.push([0, 4, , 5]);
922
+ _d.trys.push([0, 4, , 5]);
917
923
  selectedId = props.id;
918
924
  if (!selectedId) return [3 /*break*/, 3];
919
925
  setLoading(true);
@@ -921,16 +927,18 @@ function DataTemplate(props) {
921
927
  setDeleteModal(true);
922
928
  return [4 /*yield*/, handleRemoveImage((_a = devSettings.bucketName) !== null && _a !== void 0 ? _a : "")];
923
929
  case 1:
924
- _b.sent();
930
+ _d.sent();
925
931
  return [4 /*yield*/, writeServerQuery.call("delete", { id: selectedId })];
926
932
  case 2:
927
- res = _b.sent();
928
- if (res)
929
- handleNavigate("".concat(props.localURLEndpoint, "?type=list&collection=").concat(props.collectionId, "&data=r"));
930
- _b.label = 3;
933
+ res = _d.sent();
934
+ if (res) {
935
+ handleRefresh();
936
+ (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.handleNavigate) === null || _c === void 0 ? void 0 : _c.call(_b, "list", "", "general");
937
+ }
938
+ _d.label = 3;
931
939
  case 3: return [3 /*break*/, 5];
932
940
  case 4:
933
- err_7 = _b.sent();
941
+ err_7 = _d.sent();
934
942
  setDeleteModal(false);
935
943
  return [3 /*break*/, 5];
936
944
  case 5:
@@ -998,7 +1006,7 @@ function DataTemplate(props) {
998
1006
  data: dataToSubmit_1,
999
1007
  query: [
1000
1008
  {
1001
- queryId: "_id",
1009
+ queryId: serverId,
1002
1010
  type: "in",
1003
1011
  value: selectedIds,
1004
1012
  },
@@ -1033,7 +1041,7 @@ function DataTemplate(props) {
1033
1041
  return __generator(this, function (_c) {
1034
1042
  switch (_c.label) {
1035
1043
  case 0:
1036
- _c.trys.push([0, 11, , 12]);
1044
+ _c.trys.push([0, 14, , 15]);
1037
1045
  selectedId = "";
1038
1046
  if (type === "update")
1039
1047
  selectedId = rowId !== null && rowId !== void 0 ? rowId : "";
@@ -1086,7 +1094,7 @@ function DataTemplate(props) {
1086
1094
  res = _c.sent();
1087
1095
  _c.label = 5;
1088
1096
  case 5:
1089
- if (!(type === "update" || type === "create")) return [3 /*break*/, 10];
1097
+ if (!(type === "update" || type === "create")) return [3 /*break*/, 11];
1090
1098
  if (!res) return [3 /*break*/, 10];
1091
1099
  if (!(type === "update")) return [3 /*break*/, 8];
1092
1100
  if (!columnId) return [3 /*break*/, 7];
@@ -1107,8 +1115,25 @@ function DataTemplate(props) {
1107
1115
  case 9:
1108
1116
  _c.sent();
1109
1117
  _c.label = 10;
1110
- case 10: return [2 /*return*/, res];
1118
+ case 10: return [3 /*break*/, 13];
1111
1119
  case 11:
1120
+ // INFO - ON NORMAL UPDATE AND CREATE
1121
+ createSelectedData_1[serverId] = id;
1122
+ return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, selectedId === "new" ? "create" : "update", id)];
1123
+ case 12:
1124
+ _c.sent();
1125
+ setNotification({
1126
+ type: true,
1127
+ title: props.id === "new"
1128
+ ? "Created Successfully"
1129
+ : "Updated Successfully",
1130
+ msg: props.id === "new"
1131
+ ? "Data sucessfully created"
1132
+ : "Data sucessfully updated",
1133
+ });
1134
+ _c.label = 13;
1135
+ case 13: return [2 /*return*/, res];
1136
+ case 14:
1112
1137
  err_9 = _c.sent();
1113
1138
  if (err_9.response && err_9.response.status === 400) {
1114
1139
  setNotification({
@@ -1117,23 +1142,23 @@ function DataTemplate(props) {
1117
1142
  msg: err_9.response.data.err,
1118
1143
  });
1119
1144
  }
1120
- return [3 /*break*/, 12];
1121
- case 12: return [2 /*return*/];
1145
+ return [3 /*break*/, 15];
1146
+ case 15: return [2 /*return*/];
1122
1147
  }
1123
1148
  });
1124
1149
  }); };
1125
1150
  var handleSubmit = function () { return __awaiter(_this, void 0, void 0, function () {
1126
1151
  var res, err_10;
1127
- var _a;
1128
- return __generator(this, function (_b) {
1129
- switch (_b.label) {
1152
+ var _a, _b;
1153
+ return __generator(this, function (_c) {
1154
+ switch (_c.label) {
1130
1155
  case 0:
1131
- _b.trys.push([0, 2, , 3]);
1156
+ _c.trys.push([0, 2, , 3]);
1132
1157
  setLoading(true);
1133
1158
  setModalVisible(true);
1134
1159
  return [4 /*yield*/, handleSubmitData()];
1135
1160
  case 1:
1136
- res = _b.sent();
1161
+ res = _c.sent();
1137
1162
  setModalVisible(false);
1138
1163
  setLoading(false);
1139
1164
  if (res) {
@@ -1141,17 +1166,12 @@ function DataTemplate(props) {
1141
1166
  props.onComplete();
1142
1167
  }
1143
1168
  else {
1144
- if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType) && props.id !== "new") {
1145
- props.organise.debugOnChangeType("list", "");
1146
- }
1147
- else
1148
- handleNavigate("".concat(props.localURLEndpoint, "?type=list&collection=").concat(props.collectionId) +
1149
- (props.id === "new" ? "&data=r" : ""));
1169
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", "", "general");
1150
1170
  }
1151
1171
  }
1152
1172
  return [3 /*break*/, 3];
1153
1173
  case 2:
1154
- err_10 = _b.sent();
1174
+ err_10 = _c.sent();
1155
1175
  setModalVisible(false);
1156
1176
  setLoading(false);
1157
1177
  return [3 /*break*/, 3];
@@ -1624,25 +1644,9 @@ function DataTemplate(props) {
1624
1644
  setImportTableData([]);
1625
1645
  }
1626
1646
  };
1627
- var handleNavigate = function (link) {
1628
- var _a, _b, _c;
1629
- var href = link !== null && link !== void 0 ? link : "".concat(props.localURLEndpoint, "?type=list&collection=").concat(props.collectionId);
1630
- if ((_a = props.lib) === null || _a === void 0 ? void 0 : _a.navigateNext) {
1631
- props.lib.navigateNext.push(href);
1632
- }
1633
- else if ((_b = props.lib) === null || _b === void 0 ? void 0 : _b.navigate) {
1634
- (_c = props.lib) === null || _c === void 0 ? void 0 : _c.navigate(href);
1635
- }
1636
- else if (window) {
1637
- window.location.replace(href);
1638
- }
1639
- };
1640
1647
  var handleBreadcrumbNavigate = function () {
1641
- var _a;
1642
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType)
1643
- props.organise.debugOnChangeType("list", "");
1644
- else
1645
- handleNavigate();
1648
+ var _a, _b;
1649
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", "", "general");
1646
1650
  };
1647
1651
  //=====================================================================================
1648
1652
  //SECTION: Render CSV
@@ -1783,7 +1787,14 @@ function DataTemplate(props) {
1783
1787
  return pageIndex === 0 ? undefined : pageIndex * limit;
1784
1788
  }
1785
1789
  else {
1786
- return lastCursor ? undefined : lastCursor;
1790
+ 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); });
1791
+ var cursor_1 = lastCursor;
1792
+ switch (selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.type) {
1793
+ case "date":
1794
+ cursor_1 = (0, moment_1.default)(cursor_1._seconds * 1000).toDate();
1795
+ break;
1796
+ }
1797
+ return lastCursor ? cursor_1 : undefined;
1787
1798
  }
1788
1799
  };
1789
1800
  var renderObjectTags = function (id) {
@@ -1915,7 +1926,8 @@ function DataTemplate(props) {
1915
1926
  handlePopUpModal(true);
1916
1927
  } }))),
1917
1928
  react_1.default.createElement(list_1.List, { className: "mt-5", list: (_a = list[eachListObject.id]) !== null && _a !== void 0 ? _a : [], loading: false, onClickRow: function (id) {
1918
- handleSelectListObjectData(id, eachListObject.id);
1929
+ if (id)
1930
+ handleSelectListObjectData(id, eachListObject.id);
1919
1931
  } })))))));
1920
1932
  }
1921
1933
  else {
@@ -1924,7 +1936,7 @@ function DataTemplate(props) {
1924
1936
  });
1925
1937
  };
1926
1938
  var renderContent = function () {
1927
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1939
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1928
1940
  var viewType = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId) !== null && _b !== void 0 ? _b : "general";
1929
1941
  var tabs = [
1930
1942
  {
@@ -2003,17 +2015,18 @@ function DataTemplate(props) {
2003
2015
  ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && isEditor && (react_1.default.createElement("div", { className: "flex flex-col sm:flex-row" },
2004
2016
  react_1.default.createElement("div", { className: "w-full mt-5 ml-0 sm:mt-0 sm:ml-3" }, debug ? (react_1.default.createElement(button_1.Button, { text: "Update", className: "w-full", type: "normal", onClick: function () {
2005
2017
  var _a, _b;
2006
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType) === null || _b === void 0 ? void 0 : _b.call(_a, "update", props.id);
2018
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", props.id);
2007
2019
  } })) : (react_1.default.createElement(link_1.Link, { className: "w-full", href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=update&collection=").concat(props.collectionId, "&view=general"), linkType: props.linkType, custom: props.custom },
2008
2020
  react_1.default.createElement(button_1.Button, { text: "Update", className: "w-full", type: "normal" })))),
2009
2021
  react_1.default.createElement(button_1.Button, { text: "Delete", className: "mt-3 ml-0 sm:mt-0 sm:ml-3", type: "danger", onClick: function () {
2010
2022
  setDeleteModal(true);
2011
2023
  } }))))),
2012
2024
  react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) {
2025
+ var _a, _b;
2013
2026
  if (id === "blixify_new_tab")
2014
2027
  handlePopUpModal(true, id);
2015
2028
  else
2016
- handleNavigate("".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(props.type, "&collection=").concat(props.collectionId, "&view=").concat(id));
2029
+ (_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);
2017
2030
  } }),
2018
2031
  renderTabContent(tabs, props.type, viewType)))));
2019
2032
  case "update":
@@ -2057,19 +2070,6 @@ function DataTemplate(props) {
2057
2070
  }); } }))));
2058
2071
  case "list":
2059
2072
  return (react_1.default.createElement(react_1.default.Fragment, null,
2060
- react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
2061
- dbModule: dbModule,
2062
- dbType: devSettings.server,
2063
- dbCollection: props.collectionId,
2064
- dbEndpoint: devSettings.dbEndpoint,
2065
- dbAPIToken: devSettings.dbAPIToken,
2066
- }, cond: {
2067
- type: "list",
2068
- query: renderSearchFilterConditions(),
2069
- cursor: renderCursor(),
2070
- sort: (_k = (_j = props.organise) === null || _j === void 0 ? void 0 : _j.sort) !== null && _k !== void 0 ? _k : undefined,
2071
- limit: limit,
2072
- }, onChangeData: handleGetListData, onError: handleGetItemError }),
2073
2073
  react_1.default.createElement("div", { className: "flex flex-col py-2 md:items-center md:flex-row" },
2074
2074
  react_1.default.createElement("div", { className: "flex flex-col" },
2075
2075
  react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
@@ -2083,26 +2083,27 @@ function DataTemplate(props) {
2083
2083
  react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100 mr-2", icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
2084
2084
  handlePopUpModal(true, "filter");
2085
2085
  } }),
2086
- ((_l = props.organise) === null || _l === void 0 ? void 0 : _l.debugOnChangeType) ? (react_1.default.createElement(button_1.Button, { text: "Add", type: "normal", onClick: function () {
2086
+ ((_j = props.edit) === null || _j === void 0 ? void 0 : _j.allEditable) && (react_1.default.createElement(react_1.default.Fragment, null, ((_k = props.organise) === null || _k === void 0 ? void 0 : _k.handleNavigate) ? (react_1.default.createElement(button_1.Button, { text: "Add", type: "normal", onClick: function () {
2087
2087
  var _a, _b;
2088
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType) === null || _b === void 0 ? void 0 : _b.call(_a, "update", "new");
2088
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", "new");
2089
2089
  } })) : (react_1.default.createElement(link_1.Link, { className: "mr-2", href: "".concat(props.localURLEndpoint, "?data=new&type=update&collection=").concat(props.collectionId), linkType: props.linkType, custom: props.custom },
2090
- react_1.default.createElement(button_1.Button, { text: "Add", type: "normal" }))),
2090
+ react_1.default.createElement(button_1.Button, { text: "Add", type: "normal" }))))),
2091
2091
  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" }) }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
2092
2092
  //TODO: Crash on Next Js
2093
2093
  // <Menu.Item>
2094
- 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.onClick }, eachPopup.text)
2094
+ 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)
2095
2095
  // </Menu.Item>
2096
2096
  ); })), lib: {
2097
- Menu: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Menu,
2098
- Transition: (_o = props === null || props === void 0 ? void 0 : props.lib) === null || _o === void 0 ? void 0 : _o.Transition,
2097
+ Menu: (_l = props === null || props === void 0 ? void 0 : props.lib) === null || _l === void 0 ? void 0 : _l.Menu,
2098
+ Transition: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Transition,
2099
2099
  } }))),
2100
2100
  react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) {
2101
+ var _a, _b;
2101
2102
  if (id === "blixify_new_tab") {
2102
2103
  handlePopUpModal(true, id);
2103
2104
  }
2104
2105
  else {
2105
- handleNavigate("".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(props.type, "&collection=").concat(props.collectionId, "&view=").concat(id));
2106
+ (_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);
2106
2107
  }
2107
2108
  } }),
2108
2109
  renderTabContent(tabs, props.type, viewType)));
@@ -2380,11 +2381,8 @@ function DataTemplate(props) {
2380
2381
  !selectAll && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
2381
2382
  setBatchUpdateModal(true);
2382
2383
  } }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex, onClickRow: function (id) {
2383
- var _a;
2384
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType)
2385
- props.organise.debugOnChangeType("read", id);
2386
- else
2387
- handleNavigate("".concat(props.localURLEndpoint, "?data=").concat(id, "&type=read&collection=").concat(props.collectionId, "&view=general"));
2384
+ var _a, _b;
2385
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
2388
2386
  }, 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: (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios }, devSettings: {
2389
2387
  schemaEndpoint: devSettings.schemaEndpoint,
2390
2388
  server: devSettings.server,
@@ -2433,21 +2431,15 @@ function DataTemplate(props) {
2433
2431
  else if (selectedTabData.viewType === "list") {
2434
2432
  return (react_1.default.createElement(react_1.default.Fragment, null,
2435
2433
  react_1.default.createElement(list_1.List, { paginationType: devSettings.server === "mongoServer" ? "page" : "cursor", list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, onClickRow: function (id) {
2436
- var _a;
2437
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType)
2438
- props.organise.debugOnChangeType("read", id);
2439
- else
2440
- handleNavigate("".concat(props.localURLEndpoint, "?data=").concat(id, "&type=read&collection=").concat(props.collectionId, "&view=general"));
2434
+ var _a, _b;
2435
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
2441
2436
  }, 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" })));
2442
2437
  }
2443
2438
  else if (selectedTabData.viewType === "grid") {
2444
2439
  return (react_1.default.createElement(react_1.default.Fragment, null,
2445
2440
  react_1.default.createElement(grid_1.Grid, { paginationType: devSettings.server === "mongoServer" ? "page" : "cursor", data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, onClickData: function (id) {
2446
- var _a;
2447
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.debugOnChangeType)
2448
- props.organise.debugOnChangeType("read", id);
2449
- else
2450
- handleNavigate("".concat(props.localURLEndpoint, "?data=").concat(id, "&type=read&collection=").concat(props.collectionId, "&view=general"));
2441
+ var _a, _b;
2442
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
2451
2443
  }, 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" })));
2452
2444
  }
2453
2445
  else if (selectedTabData.renderComp) {
@@ -2688,20 +2680,33 @@ function DataTemplate(props) {
2688
2680
  };
2689
2681
  return (react_1.default.createElement(react_1.default.Fragment, null,
2690
2682
  renderNotification("root"),
2691
- react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), lib: { Dialog: (_g = props.lib) === null || _g === void 0 ? void 0 : _g.Dialog, Transition: (_h = props.lib) === null || _h === void 0 ? void 0 : _h.Transition }, renderContent: renderModalContent, onClose: function () {
2683
+ react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), lib: { Dialog: (_h = props.lib) === null || _h === void 0 ? void 0 : _h.Dialog, Transition: (_j = props.lib) === null || _j === void 0 ? void 0 : _j.Transition }, renderContent: renderModalContent, onClose: function () {
2692
2684
  if (queryForm)
2693
2685
  handleViewQuery(-1);
2694
2686
  else
2695
2687
  handlePopUpModal(false);
2696
2688
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
2697
- react_1.default.createElement(modal_1.Modal, { open: deleteModal, lib: { Dialog: (_j = props.lib) === null || _j === void 0 ? void 0 : _j.Dialog, Transition: (_k = props.lib) === null || _k === void 0 ? void 0 : _k.Transition }, renderContent: renderDeleteModalContent, onClose: function () {
2689
+ react_1.default.createElement(modal_1.Modal, { open: deleteModal, lib: { Dialog: (_k = props.lib) === null || _k === void 0 ? void 0 : _k.Dialog, Transition: (_l = props.lib) === null || _l === void 0 ? void 0 : _l.Transition }, renderContent: renderDeleteModalContent, onClose: function () {
2698
2690
  setDeletePasscodeInput("");
2699
2691
  setDeleteModal(!deleteModal);
2700
2692
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
2701
- react_1.default.createElement(modal_1.Modal, { open: batchUpdateModal, lib: { Dialog: (_l = props.lib) === null || _l === void 0 ? void 0 : _l.Dialog, Transition: (_m = props.lib) === null || _m === void 0 ? void 0 : _m.Transition }, renderContent: renderBatchUpdateModalContent, onClose: function () {
2693
+ react_1.default.createElement(modal_1.Modal, { open: batchUpdateModal, lib: { Dialog: (_m = props.lib) === null || _m === void 0 ? void 0 : _m.Dialog, Transition: (_o = props.lib) === null || _o === void 0 ? void 0 : _o.Transition }, renderContent: renderBatchUpdateModalContent, onClose: function () {
2702
2694
  setBatchUpdateData({ columnId: "", columnData: {} });
2703
2695
  setBatchUpdateModal(false);
2704
2696
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
2697
+ react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
2698
+ dbModule: dbModule,
2699
+ dbType: devSettings.server,
2700
+ dbCollection: props.collectionId,
2701
+ dbEndpoint: devSettings.dbEndpoint,
2702
+ dbAPIToken: devSettings.dbAPIToken,
2703
+ }, cond: {
2704
+ type: "list",
2705
+ query: renderSearchFilterConditions(),
2706
+ cursor: renderCursor(),
2707
+ sort: (_q = (_p = props.organise) === null || _p === void 0 ? void 0 : _p.sort) !== null && _q !== void 0 ? _q : undefined,
2708
+ limit: limit,
2709
+ }, onChangeData: handleGetListData, onError: handleGetItemError }),
2705
2710
  renderContent()));
2706
2711
  }
2707
2712
  exports.DataTemplate = DataTemplate;