blixify-ui-web 0.3.99 → 0.4.1
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 +2 -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 +430 -232
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +63 -24
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/readModule.d.ts +1 -1
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +10 -4
- package/lib/components/data/readModule.js.map +1 -1
- package/lib/components/display/table/index.d.ts.map +1 -1
- package/lib/components/display/table/index.js +4 -4
- package/lib/components/display/table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
158
|
-
var
|
|
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
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
var
|
|
165
|
-
var
|
|
166
|
-
var
|
|
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 =
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var
|
|
180
|
-
|
|
181
|
-
|
|
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
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var
|
|
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 =
|
|
211
|
+
}), batchUpdateData = _41[0], setBatchUpdateData = _41[1];
|
|
200
212
|
//INFO : Used by Auth
|
|
201
|
-
var
|
|
213
|
+
var _42 = (0, react_1.useState)({
|
|
202
214
|
email: "",
|
|
203
215
|
google: "",
|
|
204
216
|
phone: "",
|
|
205
217
|
disabled: false,
|
|
206
|
-
}), authMethods =
|
|
207
|
-
var
|
|
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
|
|
210
|
-
var
|
|
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
|
|
213
|
-
var
|
|
214
|
-
var
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
var
|
|
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
|
|
226
|
-
var
|
|
227
|
-
var
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
var
|
|
235
|
-
var
|
|
236
|
-
var
|
|
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 =
|
|
241
|
-
var
|
|
242
|
-
var
|
|
243
|
-
var
|
|
244
|
-
var
|
|
245
|
-
var
|
|
246
|
-
var
|
|
247
|
-
var
|
|
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 =
|
|
252
|
-
var
|
|
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
|
|
267
|
+
var _78 = (0, react_1.useState)(false), prefillTrigger = _78[0], setPrefillTrigger = _78[1];
|
|
255
268
|
//INFO : Offline
|
|
256
|
-
var
|
|
257
|
-
var
|
|
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 = (
|
|
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 ? (
|
|
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 = ((
|
|
267
|
-
var isOffline = (
|
|
268
|
-
var showId = (
|
|
269
|
-
var idField = (
|
|
270
|
-
var pipeline = (
|
|
271
|
-
var hasNavigation = ((
|
|
272
|
-
var formColumn = ((
|
|
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 = (((
|
|
276
|
-
((
|
|
277
|
-
(((
|
|
278
|
-
((
|
|
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: (
|
|
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: (
|
|
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
|
-
((
|
|
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 ((
|
|
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
|
-
(
|
|
500
|
-
(
|
|
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
|
|
509
|
-
|
|
510
|
-
|
|
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
|
-
|
|
682
|
-
|
|
744
|
+
tableLoading[prefix] = true;
|
|
745
|
+
setTableLoading(tableLoading);
|
|
746
|
+
handleSetListData([], [], prefix);
|
|
683
747
|
}
|
|
684
748
|
if (typeof value === "number") {
|
|
685
|
-
|
|
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
|
-
|
|
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
|
-
|
|
697
|
-
|
|
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
|
-
|
|
701
|
-
|
|
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 (
|
|
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 (
|
|
731
|
-
switch (
|
|
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 =
|
|
750
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
773
|
-
|
|
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
|
-
|
|
778
|
-
|
|
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(
|
|
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
|
-
|
|
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 =
|
|
799
|
-
newTableData = isExists
|
|
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
|
-
?
|
|
802
|
-
:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
!((
|
|
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: (_x = (_w = (_v = props === null || props === void 0 ? void 0 : props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceLabelOptions) === null || _w === void 0 ? void 0 : _w.call(_v, props.collectionId, true)) !== null && _x !== void 0 ? _x : [], 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,16 +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 || ((
|
|
3978
|
+
(schemaPresent || ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.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: (
|
|
3984
|
+
Transition: (_z = props === null || props === void 0 ? void 0 : props.lib) === null || _z === void 0 ? void 0 : _z.Transition,
|
|
3828
3985
|
} })))),
|
|
3829
|
-
((
|
|
3830
|
-
|
|
3986
|
+
((_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" },
|
|
3987
|
+
((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.showGroupByFeature) && (react_1.default.createElement(select_1.Select, { label: "Group", options: (_4 = (_3 = (_2 = props.organise).renderReferenceLabelOptions) === null || _3 === void 0 ? void 0 : _3.call(_2, props.collectionId, true)) !== null && _4 !== void 0 ? _4 : [], 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: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode })),
|
|
3831
3996
|
renderTabContent(tabs, props.type, viewType),
|
|
3832
3997
|
isBottom && renderActionButtons(props.type, true)));
|
|
3833
3998
|
default:
|
|
@@ -3891,7 +4056,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3891
4056
|
});
|
|
3892
4057
|
if (titleModel)
|
|
3893
4058
|
titleKey = titleModel.id;
|
|
3894
|
-
spaceTableData.forEach(function (eachData, index) {
|
|
4059
|
+
Object.values(spaceTableData).forEach(function (eachData, index) {
|
|
3895
4060
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3896
4061
|
var clonedEachData = JSON.parse(JSON.stringify(eachData));
|
|
3897
4062
|
var allValues = Object.values(clonedEachData);
|
|
@@ -4066,56 +4231,63 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4066
4231
|
var _a, _b, _c;
|
|
4067
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 }));
|
|
4068
4233
|
};
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
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")
|
|
4076
4243
|
return null;
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
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" },
|
|
4083
4253
|
selectedIds.length > 0 &&
|
|
4084
|
-
!((
|
|
4085
|
-
!((
|
|
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,
|
|
4086
4256
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4087
4257
|
handleBatchDraftData();
|
|
4088
4258
|
} }),
|
|
4089
4259
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4090
4260
|
handleCloneSelectedData();
|
|
4091
4261
|
} }))),
|
|
4092
|
-
((
|
|
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 () {
|
|
4093
4263
|
handleGenerateDeletePasscode();
|
|
4094
4264
|
setDeleteModal(true);
|
|
4095
4265
|
} })),
|
|
4096
|
-
!isFirebase && !((
|
|
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 () {
|
|
4097
4267
|
setBatchUpdateModal(true);
|
|
4098
4268
|
} })),
|
|
4099
|
-
((
|
|
4100
|
-
((
|
|
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) {
|
|
4101
4271
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
4102
4272
|
var _a, _b;
|
|
4103
4273
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
4104
4274
|
} }));
|
|
4105
|
-
}))), 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) {
|
|
4106
4276
|
var _a, _b;
|
|
4107
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");
|
|
4108
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex:
|
|
4109
|
-
|
|
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,
|
|
4110
4282
|
renderAddColumnElements: renderAddMathColumn,
|
|
4111
|
-
dragEnabled: (
|
|
4112
|
-
sortEnabled: (
|
|
4113
|
-
filterEnabled: (
|
|
4114
|
-
sortId: (
|
|
4115
|
-
sortOptions: (
|
|
4116
|
-
onSortColumn: (
|
|
4117
|
-
onDragColumn: (
|
|
4118
|
-
filterOptions: (
|
|
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) {
|
|
4119
4291
|
var _a;
|
|
4120
4292
|
return {
|
|
4121
4293
|
key: eachQuery.value,
|
|
@@ -4132,7 +4304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4132
4304
|
return renderSearchContent(newQuery);
|
|
4133
4305
|
},
|
|
4134
4306
|
}, editable: {
|
|
4135
|
-
active: ((
|
|
4307
|
+
active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listEditable) && !props.edit.disabledUpdate
|
|
4136
4308
|
? true
|
|
4137
4309
|
: false,
|
|
4138
4310
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -4146,7 +4318,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4146
4318
|
});
|
|
4147
4319
|
}); },
|
|
4148
4320
|
}, addable: {
|
|
4149
|
-
active: ((
|
|
4321
|
+
active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
|
|
4150
4322
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4151
4323
|
return __generator(this, function (_a) {
|
|
4152
4324
|
switch (_a.label) {
|
|
@@ -4157,54 +4329,78 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4157
4329
|
}
|
|
4158
4330
|
});
|
|
4159
4331
|
}); },
|
|
4160
|
-
}, darkMode: (
|
|
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));
|
|
4161
4351
|
}
|
|
4162
4352
|
else if (dataType === "read") {
|
|
4163
4353
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4164
|
-
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 && ((
|
|
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)
|
|
4165
4355
|
? props.bareSettings.bareReadReferenceView
|
|
4166
|
-
: undefined, splitView: (
|
|
4356
|
+
: undefined, splitView: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.splitView }),
|
|
4167
4357
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(dataType)),
|
|
4168
4358
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(dataType))));
|
|
4169
4359
|
}
|
|
4170
4360
|
}
|
|
4171
4361
|
else if (selectedTabData) {
|
|
4172
|
-
if ((
|
|
4362
|
+
if ((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListComponent) {
|
|
4173
4363
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4174
|
-
props.bareSettings.bareListComponent(tableData, spaceTableData, tableLoading, pageIndex),
|
|
4175
|
-
!((
|
|
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 }))));
|
|
4176
4368
|
}
|
|
4177
4369
|
else if (selectedTabData.viewType === "iframe") {
|
|
4178
|
-
return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (
|
|
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 }));
|
|
4179
4371
|
}
|
|
4180
4372
|
else if (selectedTabData.viewType === "list") {
|
|
4181
4373
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4182
|
-
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" },
|
|
4183
|
-
selectedIds.length > 0 && !((
|
|
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,
|
|
4184
4376
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4185
4377
|
handleBatchDraftData();
|
|
4186
4378
|
} }),
|
|
4187
4379
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4188
4380
|
handleCloneSelectedData();
|
|
4189
4381
|
} }))),
|
|
4190
|
-
((
|
|
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 () {
|
|
4191
4383
|
handleGenerateDeletePasscode();
|
|
4192
4384
|
setDeleteModal(true);
|
|
4193
4385
|
} })),
|
|
4194
|
-
!isFirebase && !((
|
|
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 () {
|
|
4195
4387
|
setBatchUpdateModal(true);
|
|
4196
4388
|
} }))), onClickRow: function (id) {
|
|
4197
4389
|
var _a, _b;
|
|
4198
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");
|
|
4199
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex:
|
|
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 })));
|
|
4200
4394
|
}
|
|
4201
4395
|
else if (selectedTabData.viewType === "grid") {
|
|
4202
4396
|
var isGridScroll = renderCheckGridScroll();
|
|
4203
4397
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4204
|
-
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) {
|
|
4205
4399
|
var _a, _b;
|
|
4206
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");
|
|
4207
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex:
|
|
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 })));
|
|
4208
4404
|
}
|
|
4209
4405
|
else if (selectedTabData.viewType === "calendar") {
|
|
4210
4406
|
var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
|
|
@@ -4213,7 +4409,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4213
4409
|
: ["red", "blue", "green", "indigo", "orange", "violet", "yellow"];
|
|
4214
4410
|
var valuesWithColour_1 = {};
|
|
4215
4411
|
if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.groupId) {
|
|
4216
|
-
spaceTableData.map(function (eachTableData) {
|
|
4412
|
+
spaceTableData["default"].map(function (eachTableData) {
|
|
4217
4413
|
var _a;
|
|
4218
4414
|
if (listOfColors_1.length === 0)
|
|
4219
4415
|
return null;
|
|
@@ -4230,8 +4426,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4230
4426
|
var renderEventAvailabilities = function () {
|
|
4231
4427
|
var eventAvailabilities = [];
|
|
4232
4428
|
if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.startDate) {
|
|
4233
|
-
for (var _i = 0,
|
|
4234
|
-
var eachData =
|
|
4429
|
+
for (var _i = 0, _a = spaceTableData["default"]; _i < _a.length; _i++) {
|
|
4430
|
+
var eachData = _a[_i];
|
|
4235
4431
|
if (!eachData[calendarSettings_1.startDate])
|
|
4236
4432
|
break;
|
|
4237
4433
|
else if (!(0, moment_1.default)(eachData[calendarSettings_1.startDate], "YYYY-MM-DD HH:mm A").isValid()) {
|
|
@@ -4298,11 +4494,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4298
4494
|
}
|
|
4299
4495
|
return eventAvailabilities;
|
|
4300
4496
|
};
|
|
4301
|
-
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: (
|
|
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) {
|
|
4302
4498
|
var startOfMonth = (0, moment_1.default)(calendarTabMonth).startOf("month");
|
|
4303
4499
|
var endOfMonth = (0, moment_1.default)(calendarTabMonth).endOf("month");
|
|
4304
4500
|
if (!(0, moment_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
|
|
4305
|
-
setTableLoading(true);
|
|
4501
|
+
setTableLoading({ default: true });
|
|
4306
4502
|
}
|
|
4307
4503
|
setCalendarTabMonth(date);
|
|
4308
4504
|
}, handleViewChange: setCalendarView, renderEventAvailabilities: renderEventAvailabilities, onClickEvent: function (id) {
|
|
@@ -4314,7 +4510,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4314
4510
|
else if (selectedTabData.viewType === "feeds") {
|
|
4315
4511
|
var contentList_1 = [];
|
|
4316
4512
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
4317
|
-
var customFeedsData = (
|
|
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);
|
|
4318
4514
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
4319
4515
|
customFeedsData.map(function (eachData) {
|
|
4320
4516
|
var _a, _b, _c, _d;
|
|
@@ -4337,7 +4533,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4337
4533
|
if (IconFound) {
|
|
4338
4534
|
selectedIcon_1 = react_1.default.createElement(IconFound, { className: "h-5 w-5 text-white" });
|
|
4339
4535
|
}
|
|
4340
|
-
spaceTableData.map(function (eachData) {
|
|
4536
|
+
spaceTableData["default"].map(function (eachData) {
|
|
4341
4537
|
var _a, _b;
|
|
4342
4538
|
if (feedsSettings_1 && feedsSettings_1.title && feedsSettings_1.desc) {
|
|
4343
4539
|
var content = {
|
|
@@ -4355,9 +4551,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4355
4551
|
});
|
|
4356
4552
|
}
|
|
4357
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" },
|
|
4358
|
-
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, 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 }),
|
|
4359
4555
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
4360
|
-
contentList_1.length > 0 && !((
|
|
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 }))))));
|
|
4361
4559
|
}
|
|
4362
4560
|
else if (selectedTabData.viewType === "map") {
|
|
4363
4561
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -4373,7 +4571,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4373
4571
|
"purple",
|
|
4374
4572
|
];
|
|
4375
4573
|
if (mapSettings_1.group) {
|
|
4376
|
-
spaceTableData.map(function (eachData) {
|
|
4574
|
+
spaceTableData["default"].map(function (eachData) {
|
|
4377
4575
|
if (eachData[mapSettings_1.group] &&
|
|
4378
4576
|
!uniqueGroupList_1.includes(eachData[mapSettings_1.group])) {
|
|
4379
4577
|
uniqueGroupList_1.push(eachData[mapSettings_1.group]);
|
|
@@ -4404,7 +4602,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4404
4602
|
var infoWindowHeaderComponent = function (_, data) {
|
|
4405
4603
|
return (react_1.default.createElement("p", { className: "text-primary-500 font-semibold text-base" }, data.title));
|
|
4406
4604
|
};
|
|
4407
|
-
spaceTableData.map(function (eachData) {
|
|
4605
|
+
spaceTableData["default"].map(function (eachData) {
|
|
4408
4606
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4409
4607
|
var eachMarkerColor = "white";
|
|
4410
4608
|
if (mapSettings_1.group) {
|
|
@@ -4456,7 +4654,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4456
4654
|
}
|
|
4457
4655
|
else if (selectedTabData.viewType === "kanban") {
|
|
4458
4656
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
4459
|
-
var kanbanTitle_2 = (
|
|
4657
|
+
var kanbanTitle_2 = (_v = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _v !== void 0 ? _v : "";
|
|
4460
4658
|
var nullColumn_1 = false;
|
|
4461
4659
|
var groupBy_1 = [];
|
|
4462
4660
|
var groupLabel_1 = [];
|
|
@@ -4476,7 +4674,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4476
4674
|
return null;
|
|
4477
4675
|
});
|
|
4478
4676
|
var kanbanData = renderGridAndListData("", "grid", kanbanTitle_2);
|
|
4479
|
-
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
|
|
4480
4678
|
? "Data has exceeded limit, please apply filters"
|
|
4481
4679
|
: "", draggable: true, droppable: kanbanDroppable, onUpdateData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4482
4680
|
var _a;
|
|
@@ -5052,7 +5250,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5052
5250
|
};
|
|
5053
5251
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
5054
5252
|
renderNotification("root"),
|
|
5055
|
-
((
|
|
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 () {
|
|
5056
5254
|
var _a, _b;
|
|
5057
5255
|
if (loading)
|
|
5058
5256
|
return;
|