blixify-ui-web 1.1.3 → 1.1.5
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.
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +1 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +231 -192
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/pagination.d.ts +1 -0
- package/lib/components/data/dataTemplate/pagination.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/pagination.js +3 -2
- package/lib/components/data/dataTemplate/pagination.js.map +1 -1
- package/lib/components/display/grid/index.d.ts +1 -0
- package/lib/components/display/grid/index.d.ts.map +1 -1
- package/lib/components/display/grid/index.js +3 -2
- package/lib/components/display/grid/index.js.map +1 -1
- package/lib/components/display/list/index.d.ts +1 -0
- package/lib/components/display/list/index.d.ts.map +1 -1
- package/lib/components/display/list/index.js +3 -2
- package/lib/components/display/list/index.js.map +1 -1
- package/lib/components/display/table/index.d.ts +1 -0
- package/lib/components/display/table/index.d.ts.map +1 -1
- package/lib/components/display/table/index.js +3 -2
- package/lib/components/display/table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -146,7 +146,7 @@ var pagination_1 = require("./pagination");
|
|
|
146
146
|
var referenceModal_1 = require("./referenceModal");
|
|
147
147
|
var settingsModal_1 = require("./settingsModal");
|
|
148
148
|
exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
149
|
-
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, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40;
|
|
149
|
+
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, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41;
|
|
150
150
|
var intialiseDefaultFilterValues = function () {
|
|
151
151
|
var _a;
|
|
152
152
|
var initialFilterSearch = {};
|
|
@@ -207,123 +207,123 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
207
207
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
208
208
|
};
|
|
209
209
|
};
|
|
210
|
-
var
|
|
211
|
-
var
|
|
212
|
-
var
|
|
210
|
+
var _42 = intialiseDefaultFilterValues(), initialFilterSearch = _42.initialFilterSearch, initialFilterSearchParams = _42.initialFilterSearchParams, initialFilterSelection = _42.initialFilterSelection, initialFilterReference = _42.initialFilterReference, initialFilterReferenceDate = _42.initialFilterReferenceDate;
|
|
211
|
+
var _43 = (0, react_1.useState)(false), loading = _43[0], setLoading = _43[1];
|
|
212
|
+
var _44 = (0, react_1.useState)(), notification = _44[0], setNotification = _44[1];
|
|
213
213
|
//INFO : Used by List
|
|
214
|
-
var
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
var
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var
|
|
226
|
-
var
|
|
227
|
-
var
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var
|
|
232
|
-
var
|
|
214
|
+
var _45 = (0, react_1.useState)(initialFilterSearch), filterSearch = _45[0], setFilterSearch = _45[1];
|
|
215
|
+
var _46 = (0, react_1.useState)(initialFilterSearchParams), filterSearchParams = _46[0], setFilterSearchParams = _46[1];
|
|
216
|
+
var _47 = (0, react_1.useState)(initialFilterSelection), filterSelection = _47[0], setFilterSelection = _47[1];
|
|
217
|
+
var _48 = (0, react_1.useState)(initialFilterReference), filterReference = _48[0], setFilterReference = _48[1];
|
|
218
|
+
var _49 = (0, react_1.useState)({}), filterReferenceSearch = _49[0], setFilterReferenceSearch = _49[1];
|
|
219
|
+
var _50 = (0, react_1.useState)({}), filterReferenceList = _50[0], setFilterReferenceList = _50[1];
|
|
220
|
+
var _51 = (0, react_1.useState)(initialFilterReferenceDate), filterReferenceDate = _51[0], setFilterReferenceDate = _51[1];
|
|
221
|
+
var _52 = (0, react_1.useState)(true), tableLoading = _52[0], setTableLoading = _52[1];
|
|
222
|
+
var _53 = (0, react_1.useState)(""), cursor = _53[0], setCursor = _53[1];
|
|
223
|
+
var _54 = (0, react_1.useState)(""), lastCursor = _54[0], setLastCursor = _54[1];
|
|
224
|
+
var _55 = (0, react_1.useState)([]), tableData = _55[0], setTableData = _55[1];
|
|
225
|
+
var _56 = (0, react_1.useState)([]), spaceTableData = _56[0], setSpaceTableData = _56[1];
|
|
226
|
+
var _57 = (0, react_1.useState)(0), size = _57[0], setSize = _57[1];
|
|
227
|
+
var _58 = (0, react_1.useState)((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0), pageIndex = _58[0], setPageIndex = _58[1];
|
|
228
|
+
var _59 = (0, react_1.useState)([]), selectedIds = _59[0], setSelectedIds = _59[1];
|
|
229
|
+
var _60 = (0, react_1.useState)(false), selectAll = _60[0], setSelectAll = _60[1];
|
|
230
|
+
var _61 = (0, react_1.useState)(""), deletePasscode = _61[0], setDeletePasscode = _61[1];
|
|
231
|
+
var _62 = (0, react_1.useState)(""), deletePasscodeInput = _62[0], setDeletePasscodeInput = _62[1];
|
|
232
|
+
var _63 = (0, react_1.useState)(""), deleteFeedId = _63[0], setDeleteFeedId = _63[1];
|
|
233
233
|
//INFO : Used by List Organise
|
|
234
|
-
var
|
|
235
|
-
var
|
|
236
|
-
var
|
|
237
|
-
var
|
|
238
|
-
var
|
|
239
|
-
var
|
|
234
|
+
var _64 = (0, react_1.useState)(false), sortModal = _64[0], setSortModal = _64[1];
|
|
235
|
+
var _65 = (0, react_1.useState)(false), filterModal = _65[0], setFilterModal = _65[1];
|
|
236
|
+
var _66 = (0, react_1.useState)(false), filterDraft = _66[0], setFilterDraft = _66[1];
|
|
237
|
+
var _67 = (0, react_1.useState)(false), addTabModal = _67[0], setAddTabModal = _67[1];
|
|
238
|
+
var _68 = (0, react_1.useState)(false), overviewModal = _68[0], setOverviewModal = _68[1];
|
|
239
|
+
var _69 = (0, react_1.useState)(props.defaultTab
|
|
240
240
|
? (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs, (_d = props.organise) === null || _d === void 0 ? void 0 : _d.viewId)
|
|
241
|
-
: ""), selectedTab =
|
|
242
|
-
var
|
|
243
|
-
var
|
|
244
|
-
var
|
|
245
|
-
var
|
|
246
|
-
var
|
|
247
|
-
var
|
|
248
|
-
var
|
|
241
|
+
: ""), selectedTab = _69[0], setSelectedTab = _69[1];
|
|
242
|
+
var _70 = (0, react_1.useState)("dayGridMonth"), calendarView = _70[0], setCalendarView = _70[1];
|
|
243
|
+
var _71 = (0, react_1.useState)(new Date()), calendarTabMonth = _71[0], setCalendarTabMonth = _71[1];
|
|
244
|
+
var _72 = (0, react_1.useState)(true), kanbanDroppable = _72[0], setKanbanDroppable = _72[1];
|
|
245
|
+
var _73 = (0, react_1.useState)([]), kanbanOptions = _73[0], setKanbanOptions = _73[1];
|
|
246
|
+
var _74 = (0, react_1.useState)(false), queryForm = _74[0], setQueryForm = _74[1];
|
|
247
|
+
var _75 = (0, react_1.useState)(false), batchUpdateModal = _75[0], setBatchUpdateModal = _75[1];
|
|
248
|
+
var _76 = (0, react_1.useState)({
|
|
249
249
|
columnId: "",
|
|
250
250
|
columnData: {},
|
|
251
|
-
}), batchUpdateData =
|
|
252
|
-
var
|
|
253
|
-
var
|
|
251
|
+
}), batchUpdateData = _76[0], setBatchUpdateData = _76[1];
|
|
252
|
+
var _77 = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.model) || []), structure = _77[0], setStructure = _77[1];
|
|
253
|
+
var _78 = (0, react_1.useState)(((_e = props === null || props === void 0 ? void 0 : props.organise) === null || _e === void 0 ? void 0 : _e.additionalQuery) || []), additionalQuery = _78[0], setAdditionalQuery = _78[1];
|
|
254
254
|
//INFO : Used by Auth
|
|
255
|
-
var
|
|
255
|
+
var _79 = (0, react_1.useState)({
|
|
256
256
|
email: "",
|
|
257
257
|
google: "",
|
|
258
258
|
phone: "",
|
|
259
259
|
disabled: false,
|
|
260
260
|
create: false,
|
|
261
|
-
}), authMethods =
|
|
262
|
-
var
|
|
261
|
+
}), authMethods = _79[0], setAuthMethods = _79[1];
|
|
262
|
+
var _80 = (0, react_1.useState)(""), selectedAuthMethod = _80[0], setSelectedAuthMethod = _80[1];
|
|
263
263
|
// INFO: Used by Activity Log
|
|
264
|
-
var
|
|
265
|
-
var
|
|
264
|
+
var _81 = (0, react_1.useState)(false), activityModal = _81[0], setActivityModal = _81[1];
|
|
265
|
+
var _82 = (0, react_1.useState)(""), activityId = _82[0], setActivityId = _82[1];
|
|
266
266
|
//INFO : Used by Export
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
var
|
|
270
|
-
var
|
|
271
|
-
var
|
|
272
|
-
var
|
|
273
|
-
var
|
|
274
|
-
var
|
|
275
|
-
var
|
|
276
|
-
var
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
282
|
-
var
|
|
283
|
-
var
|
|
284
|
-
var
|
|
285
|
-
var
|
|
267
|
+
var _83 = (0, react_1.useState)(null), csvFile = _83[0], setCSVFile = _83[1];
|
|
268
|
+
var _84 = (0, react_1.useState)([]), csvFileData = _84[0], setCSVFileData = _84[1];
|
|
269
|
+
var _85 = (0, react_1.useState)(0), stepCSVIndex = _85[0], setStepCSVIndex = _85[1];
|
|
270
|
+
var _86 = (0, react_1.useState)({}), listCSVMapAttribute = _86[0], setListCSVMapAttribute = _86[1];
|
|
271
|
+
var _87 = (0, react_1.useState)({}), listCSVObjAttribute = _87[0], setListCSVObjAttribute = _87[1];
|
|
272
|
+
var _88 = (0, react_1.useState)([]), csvAPIAttribute = _88[0], setCSVAPIAttribute = _88[1];
|
|
273
|
+
var _89 = (0, react_1.useState)(((_f = props.devSettings.currentUser) === null || _f === void 0 ? void 0 : _f.userEmail) || ""), exportCSVEmail = _89[0], setExportCSVEmail = _89[1];
|
|
274
|
+
var _90 = (0, react_1.useState)(((_h = (_g = props.organise) === null || _g === void 0 ? void 0 : _g.exportSettings) === null || _h === void 0 ? void 0 : _h.defaultExportPDFName) || ""), exportPDFTitle = _90[0], setExportPDFTitle = _90[1];
|
|
275
|
+
var _91 = (0, react_1.useState)(false), exportPDFLoading = _91[0], setExportPDFLoading = _91[1];
|
|
276
|
+
var _92 = (0, react_1.useState)(false), exportReadPDFLoading = _92[0], setExportReadPDFLoading = _92[1];
|
|
277
|
+
var _93 = (0, react_1.useState)((_l = (_k = (_j = props.organise) === null || _j === void 0 ? void 0 : _j.exportSettings) === null || _k === void 0 ? void 0 : _k.sumColumnId) !== null && _l !== void 0 ? _l : []), exportSumAttributeIds = _93[0], setExportSumAttributeIds = _93[1];
|
|
278
|
+
var _94 = (0, react_1.useState)((_p = (_o = (_m = props.organise) === null || _m === void 0 ? void 0 : _m.exportSettings) === null || _o === void 0 ? void 0 : _o.hideSubItems) !== null && _p !== void 0 ? _p : false), hideSubItems = _94[0], setHideSubItems = _94[1];
|
|
279
|
+
var _95 = (0, react_1.useState)([]), importTableData = _95[0], setImportTableData = _95[1];
|
|
280
|
+
var _96 = (0, react_1.useState)([]), queryList = _96[0], setQueryList = _96[1];
|
|
281
|
+
var _97 = (0, react_1.useState)(undefined), allQueryList = _97[0], setAllQueryList = _97[1];
|
|
282
|
+
var _98 = (0, react_1.useState)(-1), queryIndex = _98[0], setQueryIndex = _98[1];
|
|
283
|
+
var _99 = (0, react_1.useState)((_q = props.organise) === null || _q === void 0 ? void 0 : _q.groupBy), groupId = _99[0], setGroupId = _99[1];
|
|
284
|
+
var _100 = (0, react_1.useState)(""), readTabSection = _100[0], setReadTabSection = _100[1];
|
|
285
|
+
var _101 = (0, react_1.useState)(false), readFloatingNav = _101[0], setReadFloatingNav = _101[1];
|
|
286
286
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
287
287
|
//INFO : Used by Read
|
|
288
288
|
//INFO : Used by Update
|
|
289
|
-
var
|
|
290
|
-
var
|
|
291
|
-
var
|
|
292
|
-
var
|
|
293
|
-
var
|
|
294
|
-
var
|
|
295
|
-
var
|
|
289
|
+
var _102 = (0, react_1.useState)(false), modalVisible = _102[0], setModalVisible = _102[1];
|
|
290
|
+
var _103 = (0, react_1.useState)(false), deleteModal = _103[0], setDeleteModal = _103[1];
|
|
291
|
+
var _104 = (0, react_1.useState)(false), excelModal = _104[0], setExcelModal = _104[1];
|
|
292
|
+
var _105 = (0, react_1.useState)(false), exportExcel = _105[0], setExportExcel = _105[1];
|
|
293
|
+
var _106 = (0, react_1.useState)(""), exportType = _106[0], setExportType = _106[1];
|
|
294
|
+
var _107 = (0, react_1.useState)(false), exportQR = _107[0], setExportQR = _107[1];
|
|
295
|
+
var _108 = (0, react_1.useState)(function () {
|
|
296
296
|
var _a, _b;
|
|
297
297
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
298
298
|
return firstTabId;
|
|
299
|
-
}), activeTab =
|
|
300
|
-
var
|
|
301
|
-
var
|
|
302
|
-
var
|
|
303
|
-
var
|
|
304
|
-
var
|
|
305
|
-
var
|
|
306
|
-
var
|
|
299
|
+
}), activeTab = _108[0], setActiveTab = _108[1];
|
|
300
|
+
var _109 = (0, react_1.useState)(false), signatureSigning = _109[0], setSignatureSigning = _109[1];
|
|
301
|
+
var _110 = (0, react_1.useState)({}), selectedData = _110[0], setSelectedData = _110[1];
|
|
302
|
+
var _111 = (0, react_1.useState)(""), selectedObjectStructureId = _111[0], setSelectedObjectStructureId = _111[1];
|
|
303
|
+
var _112 = (0, react_1.useState)(""), selectedObjectId = _112[0], setSelectedObjectId = _112[1];
|
|
304
|
+
var _113 = (0, react_1.useState)(""), selectedListAddressId = _113[0], setSelectedListAddressId = _113[1];
|
|
305
|
+
var _114 = (0, react_1.useState)(-1), selectedListAddressIndex = _114[0], setSelectedListAddressIndex = _114[1];
|
|
306
|
+
var _115 = (0, react_1.useState)({
|
|
307
307
|
lat: 0,
|
|
308
308
|
lng: 0,
|
|
309
309
|
name: "",
|
|
310
|
-
}), selectedListAddress =
|
|
311
|
-
var
|
|
312
|
-
var
|
|
313
|
-
var
|
|
314
|
-
var
|
|
315
|
-
var
|
|
316
|
-
var
|
|
317
|
-
var
|
|
310
|
+
}), selectedListAddress = _115[0], setSelectedListAddress = _115[1];
|
|
311
|
+
var _116 = (0, react_1.useState)({}), selectedObjectData = _116[0], setSelectedObjectData = _116[1];
|
|
312
|
+
var _117 = (0, react_1.useState)(false), referenceLoading = _117[0], setReferenceLoading = _117[1];
|
|
313
|
+
var _118 = (0, react_1.useState)({}), referencesOptions = _118[0], setReferencesOptions = _118[1];
|
|
314
|
+
var _119 = (0, react_1.useState)({}), referencesDetails = _119[0], setReferencesDetails = _119[1];
|
|
315
|
+
var _120 = (0, react_1.useState)({}), referenceDeleteTableData = _120[0], setReferenceDeleteTableData = _120[1];
|
|
316
|
+
var _121 = (0, react_1.useState)(0), referenceDeleteIndex = _121[0], setReferenceDeleteIndex = _121[1];
|
|
317
|
+
var _122 = (0, react_1.useState)({
|
|
318
318
|
id: "",
|
|
319
319
|
name: "",
|
|
320
320
|
type: "string",
|
|
321
|
-
}), referenceCreationModal =
|
|
322
|
-
var
|
|
323
|
-
var
|
|
321
|
+
}), referenceCreationModal = _122[0], setReferenceCreationModal = _122[1];
|
|
322
|
+
var _123 = (0, react_1.useState)({}), referenceModelSchema = _123[0], setReferenceSchema = _123[1];
|
|
323
|
+
var _124 = (0, react_1.useState)([]), kanbanChecked = _124[0], setKanbanChecked = _124[1];
|
|
324
324
|
//INFO : Offline
|
|
325
|
-
var
|
|
326
|
-
var
|
|
325
|
+
var _125 = (0, react_1.useState)(0), offlineDataLength = _125[0], setOfflineDataLength = _125[1];
|
|
326
|
+
var _126 = (0, react_1.useState)(false), offlineModal = _126[0], setOfflineModal = _126[1];
|
|
327
327
|
var previousType = (0, react_1.useRef)(null);
|
|
328
328
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
329
329
|
var formRef = (0, react_1.createRef)();
|
|
@@ -389,9 +389,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
389
389
|
((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.activityLog.commentCollectionId)) ||
|
|
390
390
|
(((_11 = (_10 = props.edit) === null || _10 === void 0 ? void 0 : _10.activityLog) === null || _11 === void 0 ? void 0 : _11.enableLogs) &&
|
|
391
391
|
((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.activityLog.logsCollectionId));
|
|
392
|
+
var customPaginationSize = ((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.customPaginationCount)
|
|
393
|
+
? props.organise.customPaginationCount(size)
|
|
394
|
+
: undefined;
|
|
392
395
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
393
396
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
394
|
-
dbModule: (
|
|
397
|
+
dbModule: (_14 = props.lib) === null || _14 === void 0 ? void 0 : _14.axios,
|
|
395
398
|
dbType: devSettings.server,
|
|
396
399
|
dbCollection: props.collectionId,
|
|
397
400
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -399,7 +402,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
399
402
|
dbUserToken: devSettings.dbUserToken,
|
|
400
403
|
});
|
|
401
404
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
402
|
-
dbModule: (
|
|
405
|
+
dbModule: (_15 = props.lib) === null || _15 === void 0 ? void 0 : _15.axios,
|
|
403
406
|
dbType: devSettings.server,
|
|
404
407
|
dbCollection: props.collectionId,
|
|
405
408
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -407,9 +410,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
407
410
|
dbUserToken: devSettings.dbUserToken,
|
|
408
411
|
});
|
|
409
412
|
var moreButtonPopUp = [
|
|
410
|
-
((
|
|
413
|
+
((_16 = props.edit) === null || _16 === void 0 ? void 0 : _16.allEditable) &&
|
|
411
414
|
!isFirebase &&
|
|
412
|
-
!((
|
|
415
|
+
!((_18 = (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.exportSettings) === null || _18 === void 0 ? void 0 : _18.hideImportCSV)
|
|
413
416
|
? {
|
|
414
417
|
text: "Import Excel",
|
|
415
418
|
onClick: function () {
|
|
@@ -418,7 +421,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
418
421
|
},
|
|
419
422
|
}
|
|
420
423
|
: null,
|
|
421
|
-
!((
|
|
424
|
+
!((_20 = (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.exportSettings) === null || _20 === void 0 ? void 0 : _20.hideExportCSV)
|
|
422
425
|
? {
|
|
423
426
|
text: "Export CSV",
|
|
424
427
|
onClick: function () {
|
|
@@ -428,7 +431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
428
431
|
},
|
|
429
432
|
}
|
|
430
433
|
: null,
|
|
431
|
-
!((
|
|
434
|
+
!((_22 = (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.exportSettings) === null || _22 === void 0 ? void 0 : _22.hideExportExcel)
|
|
432
435
|
? {
|
|
433
436
|
text: "Export Excel",
|
|
434
437
|
onClick: function () {
|
|
@@ -438,7 +441,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
438
441
|
},
|
|
439
442
|
}
|
|
440
443
|
: null,
|
|
441
|
-
!((
|
|
444
|
+
!((_24 = (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.exportSettings) === null || _24 === void 0 ? void 0 : _24.hideExportPDF)
|
|
442
445
|
? {
|
|
443
446
|
text: "Export PDF",
|
|
444
447
|
onClick: function () {
|
|
@@ -448,7 +451,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
448
451
|
},
|
|
449
452
|
}
|
|
450
453
|
: null,
|
|
451
|
-
!((
|
|
454
|
+
!((_26 = (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.exportSettings) === null || _26 === void 0 ? void 0 : _26.hideExportQR)
|
|
452
455
|
? {
|
|
453
456
|
text: "Export QR",
|
|
454
457
|
onClick: function () {
|
|
@@ -458,7 +461,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
458
461
|
},
|
|
459
462
|
}
|
|
460
463
|
: null,
|
|
461
|
-
!((
|
|
464
|
+
!((_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.exportSettings) === null || _28 === void 0 ? void 0 : _28.hideExportQR)
|
|
462
465
|
? {
|
|
463
466
|
text: "Export QR(Data)",
|
|
464
467
|
onClick: function () {
|
|
@@ -468,7 +471,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
468
471
|
},
|
|
469
472
|
}
|
|
470
473
|
: null,
|
|
471
|
-
!((
|
|
474
|
+
!((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.exportSettings) === null || _30 === void 0 ? void 0 : _30.hideExportPrint)
|
|
472
475
|
? {
|
|
473
476
|
text: "Print",
|
|
474
477
|
onClick: function () {
|
|
@@ -478,7 +481,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
478
481
|
},
|
|
479
482
|
}
|
|
480
483
|
: null,
|
|
481
|
-
!((
|
|
484
|
+
!((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.exportSettings) === null || _32 === void 0 ? void 0 : _32.hideExportDraft)
|
|
482
485
|
? {
|
|
483
486
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
484
487
|
onClick: function () {
|
|
@@ -487,7 +490,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
487
490
|
}
|
|
488
491
|
: null,
|
|
489
492
|
].filter(Boolean);
|
|
490
|
-
if ((
|
|
493
|
+
if ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.moreSettings)
|
|
491
494
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
492
495
|
var renderImpSearchFilterConditions = function () {
|
|
493
496
|
var _a;
|
|
@@ -676,10 +679,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
676
679
|
props.collectionId,
|
|
677
680
|
props.model,
|
|
678
681
|
props.localURLEndpoint,
|
|
679
|
-
(
|
|
680
|
-
(
|
|
681
|
-
(
|
|
682
|
-
(
|
|
682
|
+
(_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.extendedTabs,
|
|
683
|
+
(_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.viewId,
|
|
684
|
+
(_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.additionalQuery,
|
|
685
|
+
(_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.groupBy,
|
|
683
686
|
props.type,
|
|
684
687
|
]);
|
|
685
688
|
(0, react_1.useEffect)(function () {
|
|
@@ -757,7 +760,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
757
760
|
};
|
|
758
761
|
}, 100);
|
|
759
762
|
return function () { return clearTimeout(timeoutId); };
|
|
760
|
-
}, [(
|
|
763
|
+
}, [(_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.showReadFloatingNav, props.type, props.id, loading]);
|
|
761
764
|
(0, react_1.useEffect)(function () {
|
|
762
765
|
if (props.type !== "read")
|
|
763
766
|
return;
|
|
@@ -2988,13 +2991,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2988
2991
|
});
|
|
2989
2992
|
}); };
|
|
2990
2993
|
var handleSubmitData = function (type, rowId, columnId, data, offlineId, isOfflineUpdate, isDraft) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2991
|
-
var selectedId_2, id, createSelectedData_1, uniqueDataStructure, uniqueColumnId, res, offlineDataResp, offlineData, tempData, err_19, offlineDataResp, tempData, selectedIndex_3, offlineData, err_20,
|
|
2994
|
+
var selectedId_2, id, createSelectedData_1, uniqueDataStructure, uniqueColumnId, res, offlineDataResp, offlineData, tempData, err_19, offlineDataResp, tempData, selectedIndex_3, offlineData, err_20, dataToSubmit_2, changedAttributeIds, operationType, selectedIndex_4, dataId, err_21;
|
|
2992
2995
|
var _a, _b;
|
|
2993
|
-
var _c, _d, _e, _f, _g, _h;
|
|
2994
|
-
return __generator(this, function (
|
|
2995
|
-
switch (
|
|
2996
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2997
|
+
return __generator(this, function (_o) {
|
|
2998
|
+
switch (_o.label) {
|
|
2996
2999
|
case 0:
|
|
2997
|
-
|
|
3000
|
+
_o.trys.push([0, 35, , 36]);
|
|
2998
3001
|
selectedId_2 = "";
|
|
2999
3002
|
if (type === "update")
|
|
3000
3003
|
selectedId_2 = rowId !== null && rowId !== void 0 ? rowId : "";
|
|
@@ -3024,8 +3027,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3024
3027
|
return [3 /*break*/, 3];
|
|
3025
3028
|
case 1: return [4 /*yield*/, handleUploadImage(id, data)];
|
|
3026
3029
|
case 2:
|
|
3027
|
-
createSelectedData_1 =
|
|
3028
|
-
|
|
3030
|
+
createSelectedData_1 = _o.sent();
|
|
3031
|
+
_o.label = 3;
|
|
3029
3032
|
case 3:
|
|
3030
3033
|
uniqueDataStructure = structure.filter(function (eachStructure) {
|
|
3031
3034
|
return eachStructure.unique;
|
|
@@ -3039,18 +3042,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3039
3042
|
});
|
|
3040
3043
|
}
|
|
3041
3044
|
res = "";
|
|
3042
|
-
if (!(selectedId_2 === "new")) return [3 /*break*/,
|
|
3045
|
+
if (!(selectedId_2 === "new")) return [3 /*break*/, 16];
|
|
3043
3046
|
if (!showId)
|
|
3044
3047
|
createSelectedData_1[serverId] = id;
|
|
3045
3048
|
if (isDraft)
|
|
3046
3049
|
createSelectedData_1["baseDraft"] = true;
|
|
3047
3050
|
if (!isOffline) return [3 /*break*/, 9];
|
|
3048
|
-
|
|
3051
|
+
_o.label = 4;
|
|
3049
3052
|
case 4:
|
|
3050
|
-
|
|
3053
|
+
_o.trys.push([4, 7, , 8]);
|
|
3051
3054
|
return [4 /*yield*/, indexedDb_1.indexedDb.getValue("local", props.collectionId)];
|
|
3052
3055
|
case 5:
|
|
3053
|
-
offlineDataResp =
|
|
3056
|
+
offlineDataResp = _o.sent();
|
|
3054
3057
|
offlineData = (_e = offlineDataResp === null || offlineDataResp === void 0 ? void 0 : offlineDataResp.data) !== null && _e !== void 0 ? _e : [];
|
|
3055
3058
|
tempData = (0, updateModule_1.handleParseOfflineWrite)(selectedData, structure);
|
|
3056
3059
|
offlineData.push(tempData);
|
|
@@ -3059,14 +3062,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3059
3062
|
type: props.collectionId,
|
|
3060
3063
|
})];
|
|
3061
3064
|
case 6:
|
|
3062
|
-
|
|
3065
|
+
_o.sent();
|
|
3063
3066
|
res = true;
|
|
3064
3067
|
return [3 /*break*/, 8];
|
|
3065
3068
|
case 7:
|
|
3066
|
-
err_19 =
|
|
3069
|
+
err_19 = _o.sent();
|
|
3067
3070
|
return [3 /*break*/, 8];
|
|
3068
|
-
case 8: return [3 /*break*/,
|
|
3071
|
+
case 8: return [3 /*break*/, 15];
|
|
3069
3072
|
case 9:
|
|
3073
|
+
if (!((idField && selectedData[idField]) ||
|
|
3074
|
+
((_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareUpsertPartialUpdate))) return [3 /*break*/, 11];
|
|
3075
|
+
return [4 /*yield*/, writeServerQuery.call("update", {
|
|
3076
|
+
id: id,
|
|
3077
|
+
data: createSelectedData_1,
|
|
3078
|
+
upsert: true,
|
|
3079
|
+
})];
|
|
3080
|
+
case 10:
|
|
3081
|
+
res = _o.sent();
|
|
3082
|
+
return [3 /*break*/, 15];
|
|
3083
|
+
case 11:
|
|
3070
3084
|
// INFO: stepper create guard — if a create is already in-flight, queue this
|
|
3071
3085
|
// draft save and return early. It will be replayed as an update once the
|
|
3072
3086
|
// in-flight create resolves.
|
|
@@ -3082,39 +3096,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3082
3096
|
data: createSelectedData_1,
|
|
3083
3097
|
unique: uniqueColumnId,
|
|
3084
3098
|
})];
|
|
3085
|
-
case
|
|
3099
|
+
case 12:
|
|
3086
3100
|
//INFO: [CREATE] Create new data
|
|
3087
|
-
res =
|
|
3088
|
-
if (!(selectedId_2 === "new")) return [3 /*break*/,
|
|
3101
|
+
res = _o.sent();
|
|
3102
|
+
if (!(selectedId_2 === "new")) return [3 /*break*/, 15];
|
|
3089
3103
|
isCreatingRef.current = false;
|
|
3090
|
-
if (!pendingDraftSaveRef.current) return [3 /*break*/,
|
|
3104
|
+
if (!pendingDraftSaveRef.current) return [3 /*break*/, 14];
|
|
3091
3105
|
pendingDraftSaveRef.current = false;
|
|
3092
3106
|
// INFO: replay as update — inflightIdRef.current holds the real _id
|
|
3093
3107
|
return [4 /*yield*/, writeServerQuery.call("update", {
|
|
3094
3108
|
id: inflightIdRef.current,
|
|
3095
3109
|
data: __assign(__assign({}, createSelectedData_1), { baseDraft: true }),
|
|
3096
3110
|
})];
|
|
3097
|
-
case
|
|
3111
|
+
case 13:
|
|
3098
3112
|
// INFO: replay as update — inflightIdRef.current holds the real _id
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
case 12:
|
|
3102
|
-
inflightIdRef.current = "";
|
|
3103
|
-
_j.label = 13;
|
|
3104
|
-
case 13: return [3 /*break*/, 22];
|
|
3113
|
+
_o.sent();
|
|
3114
|
+
_o.label = 14;
|
|
3105
3115
|
case 14:
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
case 15:
|
|
3110
|
-
_j.trys.push([15, 18, , 19]);
|
|
3111
|
-
return [4 /*yield*/, indexedDb_1.indexedDb.getValue("local", props.collectionId)];
|
|
3116
|
+
inflightIdRef.current = "";
|
|
3117
|
+
_o.label = 15;
|
|
3118
|
+
case 15: return [3 /*break*/, 24];
|
|
3112
3119
|
case 16:
|
|
3113
|
-
|
|
3120
|
+
if (!selectedId_2) return [3 /*break*/, 24];
|
|
3121
|
+
if (!(isOffline && !offlineId)) return [3 /*break*/, 22];
|
|
3122
|
+
_o.label = 17;
|
|
3123
|
+
case 17:
|
|
3124
|
+
_o.trys.push([17, 20, , 21]);
|
|
3125
|
+
return [4 /*yield*/, indexedDb_1.indexedDb.getValue("local", props.collectionId)];
|
|
3126
|
+
case 18:
|
|
3127
|
+
offlineDataResp = _o.sent();
|
|
3114
3128
|
tempData = (0, updateModule_1.handleParseOfflineWrite)(selectedData, structure);
|
|
3115
3129
|
tempData[serverId] = selectedId_2;
|
|
3116
3130
|
selectedIndex_3 = -1;
|
|
3117
|
-
offlineData = (
|
|
3131
|
+
offlineData = (_g = offlineDataResp === null || offlineDataResp === void 0 ? void 0 : offlineDataResp.data) !== null && _g !== void 0 ? _g : [];
|
|
3118
3132
|
offlineData.map(function (eachOfflineData, index) {
|
|
3119
3133
|
var offlineDataId = eachOfflineData[serverId];
|
|
3120
3134
|
if (selectedId_2 === offlineDataId)
|
|
@@ -3127,27 +3141,43 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3127
3141
|
data: offlineData,
|
|
3128
3142
|
type: props.collectionId,
|
|
3129
3143
|
})];
|
|
3130
|
-
case
|
|
3131
|
-
|
|
3144
|
+
case 19:
|
|
3145
|
+
_o.sent();
|
|
3132
3146
|
res = true;
|
|
3133
|
-
return [3 /*break*/,
|
|
3134
|
-
case 18:
|
|
3135
|
-
err_20 = _j.sent();
|
|
3136
|
-
return [3 /*break*/, 19];
|
|
3137
|
-
case 19: return [3 /*break*/, 22];
|
|
3147
|
+
return [3 /*break*/, 21];
|
|
3138
3148
|
case 20:
|
|
3139
|
-
|
|
3149
|
+
err_20 = _o.sent();
|
|
3150
|
+
return [3 /*break*/, 21];
|
|
3151
|
+
case 21: return [3 /*break*/, 24];
|
|
3152
|
+
case 22:
|
|
3140
3153
|
if (type === "update" && columnId) {
|
|
3141
|
-
|
|
3154
|
+
dataToSubmit_2 = (_a = {},
|
|
3142
3155
|
_a[columnId] = createSelectedData_1[columnId],
|
|
3143
3156
|
_a);
|
|
3144
3157
|
}
|
|
3158
|
+
else if ((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareUpsertPartialUpdate) {
|
|
3159
|
+
changedAttributeIds = (0, updateModule_1.compareUpdatedFields)((_j = previousSelectedData.current) !== null && _j !== void 0 ? _j : {}, createSelectedData_1).changedAttributeIds;
|
|
3160
|
+
// INFO: if nothing changed, skip the write entirely — sending an
|
|
3161
|
+
// empty payload would be a no-op at best and an error at worst.
|
|
3162
|
+
if (changedAttributeIds.length === 0)
|
|
3163
|
+
return [2 /*return*/, id];
|
|
3164
|
+
dataToSubmit_2 = {};
|
|
3165
|
+
changedAttributeIds.forEach(function (key) {
|
|
3166
|
+
dataToSubmit_2[key] = createSelectedData_1[key];
|
|
3167
|
+
});
|
|
3168
|
+
if (isDraft)
|
|
3169
|
+
dataToSubmit_2["baseDraft"] = true;
|
|
3170
|
+
else
|
|
3171
|
+
dataToSubmit_2["baseDraft"] = false; // INFO: clear draft flag on final save
|
|
3172
|
+
if (offlineId)
|
|
3173
|
+
dataToSubmit_2[serverId] = offlineId;
|
|
3174
|
+
}
|
|
3145
3175
|
else {
|
|
3146
|
-
|
|
3176
|
+
dataToSubmit_2 = __assign(__assign({}, createSelectedData_1), { baseDraft: false });
|
|
3147
3177
|
if (isDraft)
|
|
3148
|
-
|
|
3178
|
+
dataToSubmit_2["baseDraft"] = true;
|
|
3149
3179
|
if (offlineId)
|
|
3150
|
-
|
|
3180
|
+
dataToSubmit_2[serverId] = offlineId;
|
|
3151
3181
|
}
|
|
3152
3182
|
operationType = isOfflineUpdate
|
|
3153
3183
|
? "update"
|
|
@@ -3156,17 +3186,26 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3156
3186
|
: "update";
|
|
3157
3187
|
return [4 /*yield*/, writeServerQuery.call(operationType, {
|
|
3158
3188
|
id: selectedId_2,
|
|
3159
|
-
data:
|
|
3189
|
+
data: dataToSubmit_2,
|
|
3160
3190
|
unique: uniqueColumnId,
|
|
3191
|
+
// INFO: bareUpsertPartialUpdate — upsert so the doc is created if it
|
|
3192
|
+
// doesn't exist yet (covers deterministicId passed directly as props.id).
|
|
3193
|
+
// Scoped away from offline paths: offlineId uses operationType="create"
|
|
3194
|
+
// and isOfflineUpdate is a separate flow — upsert is not meaningful there.
|
|
3195
|
+
upsert: ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpsertPartialUpdate) &&
|
|
3196
|
+
!offlineId &&
|
|
3197
|
+
!isOfflineUpdate
|
|
3198
|
+
? true
|
|
3199
|
+
: undefined,
|
|
3161
3200
|
})];
|
|
3162
|
-
case
|
|
3163
|
-
res =
|
|
3164
|
-
|
|
3165
|
-
case
|
|
3166
|
-
if (!(type === "update" || type === "create")) return [3 /*break*/,
|
|
3167
|
-
if (!res) return [3 /*break*/,
|
|
3168
|
-
if (!(type === "update")) return [3 /*break*/,
|
|
3169
|
-
if (!columnId) return [3 /*break*/,
|
|
3201
|
+
case 23:
|
|
3202
|
+
res = _o.sent();
|
|
3203
|
+
_o.label = 24;
|
|
3204
|
+
case 24:
|
|
3205
|
+
if (!(type === "update" || type === "create")) return [3 /*break*/, 32];
|
|
3206
|
+
if (!res) return [3 /*break*/, 31];
|
|
3207
|
+
if (!(type === "update")) return [3 /*break*/, 27];
|
|
3208
|
+
if (!columnId) return [3 /*break*/, 26];
|
|
3170
3209
|
selectedIndex_4 = -1;
|
|
3171
3210
|
tableData.map(function (eachData, index) {
|
|
3172
3211
|
if (eachData.id === rowId || eachData._id === rowId) {
|
|
@@ -3176,26 +3215,26 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3176
3215
|
return null;
|
|
3177
3216
|
});
|
|
3178
3217
|
return [4 /*yield*/, handleGetListData({ data: tableData[selectedIndex_4] }, "update", rowId)];
|
|
3179
|
-
case
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
case
|
|
3183
|
-
case
|
|
3184
|
-
case 26:
|
|
3185
|
-
_j.sent();
|
|
3186
|
-
_j.label = 27;
|
|
3187
|
-
case 27:
|
|
3188
|
-
if (!((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdateHandlePostComplete)) return [3 /*break*/, 29];
|
|
3189
|
-
return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete(__assign((_b = {}, _b[serverId] = id, _b), createSelectedData_1))];
|
|
3218
|
+
case 25:
|
|
3219
|
+
_o.sent();
|
|
3220
|
+
_o.label = 26;
|
|
3221
|
+
case 26: return [3 /*break*/, 29];
|
|
3222
|
+
case 27: return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, "create")];
|
|
3190
3223
|
case 28:
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
case 29:
|
|
3224
|
+
_o.sent();
|
|
3225
|
+
_o.label = 29;
|
|
3226
|
+
case 29:
|
|
3227
|
+
if (!((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareUpdateHandlePostComplete)) return [3 /*break*/, 31];
|
|
3228
|
+
return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete(__assign((_b = {}, _b[serverId] = id, _b), createSelectedData_1))];
|
|
3194
3229
|
case 30:
|
|
3230
|
+
_o.sent();
|
|
3231
|
+
_o.label = 31;
|
|
3232
|
+
case 31: return [3 /*break*/, 34];
|
|
3233
|
+
case 32:
|
|
3195
3234
|
createSelectedData_1[serverId] = id;
|
|
3196
3235
|
return [4 /*yield*/, handleGetListData({ data: [createSelectedData_1] }, selectedId_2 === "new" ? "create" : "update", id)];
|
|
3197
|
-
case
|
|
3198
|
-
|
|
3236
|
+
case 33:
|
|
3237
|
+
_o.sent();
|
|
3199
3238
|
setNotification({
|
|
3200
3239
|
type: true,
|
|
3201
3240
|
title: props.id === "new"
|
|
@@ -3205,12 +3244,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3205
3244
|
? "Data sucessfully created"
|
|
3206
3245
|
: "Data sucessfully updated",
|
|
3207
3246
|
});
|
|
3208
|
-
|
|
3209
|
-
case
|
|
3247
|
+
_o.label = 34;
|
|
3248
|
+
case 34:
|
|
3210
3249
|
dataId = res ? id : "";
|
|
3211
3250
|
return [2 /*return*/, dataId];
|
|
3212
|
-
case
|
|
3213
|
-
err_21 =
|
|
3251
|
+
case 35:
|
|
3252
|
+
err_21 = _o.sent();
|
|
3214
3253
|
console.log("error", err_21);
|
|
3215
3254
|
// INFO: clear in-flight guard on failure so the next save retries as a create
|
|
3216
3255
|
if (isCreatingRef.current) {
|
|
@@ -3219,7 +3258,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3219
3258
|
inflightIdRef.current = "";
|
|
3220
3259
|
}
|
|
3221
3260
|
if (err_21.response && err_21.response.status === 400) {
|
|
3222
|
-
if (typeof ((
|
|
3261
|
+
if (typeof ((_m = err_21.response.data) === null || _m === void 0 ? void 0 : _m.err) === "string")
|
|
3223
3262
|
setNotification({
|
|
3224
3263
|
type: false,
|
|
3225
3264
|
title: "Error",
|
|
@@ -3232,8 +3271,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3232
3271
|
msg: "Please contact our administrator for assistance or try your request again later. We apologize for any inconvenience",
|
|
3233
3272
|
});
|
|
3234
3273
|
}
|
|
3235
|
-
return [3 /*break*/,
|
|
3236
|
-
case
|
|
3274
|
+
return [3 /*break*/, 36];
|
|
3275
|
+
case 36: return [2 /*return*/];
|
|
3237
3276
|
}
|
|
3238
3277
|
});
|
|
3239
3278
|
}); };
|
|
@@ -6183,7 +6222,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6183
6222
|
}
|
|
6184
6223
|
});
|
|
6185
6224
|
}); },
|
|
6186
|
-
}, darkMode: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkMode, hidePagination: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.hidePagination, disableEllipsisOnLongWord: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.disableEllipsisOnLongWord }));
|
|
6225
|
+
}, darkMode: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkMode, hidePagination: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.disableEllipsisOnLongWord }));
|
|
6187
6226
|
}
|
|
6188
6227
|
};
|
|
6189
6228
|
var renderTabContent = function (tabs, dataType, viewType) {
|
|
@@ -6350,7 +6389,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6350
6389
|
props.bareSettings.bareListComponent(tableData, spaceTableData, tableLoading, pageIndex),
|
|
6351
6390
|
!((_k = props.organise) === null || _k === void 0 ? void 0 : _k.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: function (value) {
|
|
6352
6391
|
handlePagination(value);
|
|
6353
|
-
}, darkMode: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode }))));
|
|
6392
|
+
}, darkMode: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode, customPaginationSize: customPaginationSize }))));
|
|
6354
6393
|
}
|
|
6355
6394
|
else if (selectedTabData.viewType === "iframe") {
|
|
6356
6395
|
if (selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.customComponent) {
|
|
@@ -6381,7 +6420,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6381
6420
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
6382
6421
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_v = (_u = props.newTabUrl) === null || _u === void 0 ? void 0 : _u.default) !== null && _v !== void 0 ? _v : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_x = (_w = props.newTabUrl) === null || _w === void 0 ? void 0 : _w.addons) !== null && _x !== void 0 ? _x : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
6383
6422
|
handlePagination(value);
|
|
6384
|
-
}, className: "mt-5", hidePagination: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.hidePagination })));
|
|
6423
|
+
}, className: "mt-5", hidePagination: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.hidePagination, customPaginationSize: customPaginationSize })));
|
|
6385
6424
|
}
|
|
6386
6425
|
else if (selectedTabData.viewType === "grid") {
|
|
6387
6426
|
var isGridScroll = renderCheckGridScroll();
|
|
@@ -6391,7 +6430,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6391
6430
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
6392
6431
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_0 = (_z = props.newTabUrl) === null || _z === void 0 ? void 0 : _z.default) !== null && _0 !== void 0 ? _0 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_2 = (_1 = props.newTabUrl) === null || _1 === void 0 ? void 0 : _1.addons) !== null && _2 !== void 0 ? _2 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
6393
6432
|
handlePagination(value);
|
|
6394
|
-
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListGridColClassName, className: "mt-5", hidePagination: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.hidePagination })));
|
|
6433
|
+
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListGridColClassName, className: "mt-5", hidePagination: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.hidePagination, customPaginationSize: customPaginationSize })));
|
|
6395
6434
|
}
|
|
6396
6435
|
else if (selectedTabData.viewType === "calendar") {
|
|
6397
6436
|
var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
|
|
@@ -6548,7 +6587,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6548
6587
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
6549
6588
|
contentList_1.length > 0 && !((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: function (value) {
|
|
6550
6589
|
handlePagination(value);
|
|
6551
|
-
}, darkMode: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.darkMode }))))));
|
|
6590
|
+
}, darkMode: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.darkMode, customPaginationSize: customPaginationSize }))))));
|
|
6552
6591
|
}
|
|
6553
6592
|
else if (selectedTabData.viewType === "map") {
|
|
6554
6593
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -7179,7 +7218,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7179
7218
|
};
|
|
7180
7219
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
7181
7220
|
renderNotification("root"),
|
|
7182
|
-
((
|
|
7221
|
+
((_40 = (_39 = props.renderSettings) === null || _39 === void 0 ? void 0 : _39.renderLoadingUI) === null || _40 === void 0 ? void 0 : _40.call(_39)) && loading ? ((_41 = props.renderSettings) === null || _41 === void 0 ? void 0 : _41.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
7183
7222
|
var _a, _b;
|
|
7184
7223
|
if (loading)
|
|
7185
7224
|
return;
|