blixify-ui-web 0.4.42 → 0.4.44
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/action/buttonGroup/index.d.ts +1 -0
- package/lib/components/action/buttonGroup/index.d.ts.map +1 -1
- package/lib/components/action/buttonGroup/index.js +4 -1
- package/lib/components/action/buttonGroup/index.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +5 -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 +222 -181
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +1 -0
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts +1 -0
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +54 -33
- package/lib/components/data/listModule.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 -1
- 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 +2 -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/lib/components/structure/link/index.d.ts +1 -0
- package/lib/components/structure/link/index.d.ts.map +1 -1
- package/lib/components/structure/link/index.js +14 -6
- package/lib/components/structure/link/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -140,7 +140,7 @@ var pagination_1 = require("./pagination");
|
|
|
140
140
|
var referenceModal_1 = require("./referenceModal");
|
|
141
141
|
var settingsModal_1 = require("./settingsModal");
|
|
142
142
|
exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
143
|
-
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;
|
|
143
|
+
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;
|
|
144
144
|
var formRef = (0, react_1.createRef)();
|
|
145
145
|
var objectFormRef = (0, react_1.createRef)();
|
|
146
146
|
var listAddressFromRef = (0, react_1.createRef)();
|
|
@@ -153,137 +153,182 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
153
153
|
var readQueryHocRef = (0, react_1.useRef)();
|
|
154
154
|
var listRQueryHocRef = (0, react_1.useRef)();
|
|
155
155
|
var typingTimeout = (0, react_1.useRef)();
|
|
156
|
-
// const oldCollectionId: any = useRef();
|
|
157
156
|
var mapViewRef = (0, react_1.useRef)();
|
|
158
|
-
var
|
|
159
|
-
var
|
|
157
|
+
var _27 = (0, react_1.useState)(false), loading = _27[0], setLoading = _27[1];
|
|
158
|
+
var _28 = (0, react_1.useState)(), notification = _28[0], setNotification = _28[1];
|
|
159
|
+
var intialiseDefaultFilterValues = function () {
|
|
160
|
+
var _a;
|
|
161
|
+
var initialFilterSearch = {};
|
|
162
|
+
var initialFilterSelection = {};
|
|
163
|
+
var initialFilterReference = {};
|
|
164
|
+
var initialFilterReferenceDate = {
|
|
165
|
+
startDate: undefined,
|
|
166
|
+
endDate: undefined,
|
|
167
|
+
};
|
|
168
|
+
if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) {
|
|
169
|
+
props.organise.additionalQuery.forEach(function (eachQuery) {
|
|
170
|
+
var _a, _b;
|
|
171
|
+
if (eachQuery.defaultValue) {
|
|
172
|
+
switch (eachQuery.type) {
|
|
173
|
+
case "list":
|
|
174
|
+
case "person":
|
|
175
|
+
initialFilterSelection[eachQuery.value] = eachQuery.defaultValue;
|
|
176
|
+
break;
|
|
177
|
+
case "reference":
|
|
178
|
+
case "listReference":
|
|
179
|
+
initialFilterReference[eachQuery.value] = eachQuery.defaultValue;
|
|
180
|
+
break;
|
|
181
|
+
case "search":
|
|
182
|
+
initialFilterSearch[eachQuery.value] = eachQuery.defaultValue;
|
|
183
|
+
break;
|
|
184
|
+
case "range":
|
|
185
|
+
if (Array.isArray(eachQuery.defaultValue)) {
|
|
186
|
+
initialFilterReferenceDate.startDate = ((_a = eachQuery
|
|
187
|
+
.defaultValue) === null || _a === void 0 ? void 0 : _a[0])
|
|
188
|
+
? new Date(eachQuery.defaultValue[0])
|
|
189
|
+
: undefined;
|
|
190
|
+
initialFilterReferenceDate.endDate = ((_b = eachQuery.defaultValue) === null || _b === void 0 ? void 0 : _b[1])
|
|
191
|
+
? new Date(eachQuery.defaultValue[1])
|
|
192
|
+
: undefined;
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
initialFilterSearch: initialFilterSearch,
|
|
201
|
+
initialFilterSelection: initialFilterSelection,
|
|
202
|
+
initialFilterReference: initialFilterReference,
|
|
203
|
+
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
var _29 = intialiseDefaultFilterValues(), initialFilterSearch = _29.initialFilterSearch, initialFilterSelection = _29.initialFilterSelection, initialFilterReference = _29.initialFilterReference, initialFilterReferenceDate = _29.initialFilterReferenceDate;
|
|
160
207
|
//INFO : Used by List
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
var
|
|
165
|
-
var
|
|
166
|
-
var
|
|
167
|
-
var
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
var
|
|
172
|
-
var
|
|
173
|
-
var
|
|
174
|
-
var
|
|
175
|
-
var
|
|
176
|
-
var
|
|
177
|
-
var
|
|
178
|
-
var
|
|
179
|
-
var
|
|
180
|
-
var _42 = (0, react_1.useState)(""), deletePasscode = _42[0], setDeletePasscode = _42[1];
|
|
181
|
-
var _43 = (0, react_1.useState)(""), deletePasscodeInput = _43[0], setDeletePasscodeInput = _43[1];
|
|
182
|
-
var _44 = (0, react_1.useState)(""), deleteFeedId = _44[0], setDeleteFeedId = _44[1];
|
|
208
|
+
var _30 = (0, react_1.useState)(initialFilterSearch), filterSearch = _30[0], setFilterSearch = _30[1];
|
|
209
|
+
var _31 = (0, react_1.useState)({}), filterSearchParams = _31[0], setFilterSearchParams = _31[1];
|
|
210
|
+
var _32 = (0, react_1.useState)(initialFilterSelection), filterSelection = _32[0], setFilterSelection = _32[1];
|
|
211
|
+
var _33 = (0, react_1.useState)(initialFilterReference), filterReference = _33[0], setFilterReference = _33[1];
|
|
212
|
+
var _34 = (0, react_1.useState)({}), filterReferenceSearch = _34[0], setFilterReferenceSearch = _34[1];
|
|
213
|
+
var _35 = (0, react_1.useState)({}), filterReferenceList = _35[0], setFilterReferenceList = _35[1];
|
|
214
|
+
var _36 = (0, react_1.useState)(initialFilterReferenceDate), filterReferenceDate = _36[0], setFilterReferenceDate = _36[1];
|
|
215
|
+
var _37 = (0, react_1.useState)(true), tableLoading = _37[0], setTableLoading = _37[1];
|
|
216
|
+
var _38 = (0, react_1.useState)(""), cursor = _38[0], setCursor = _38[1];
|
|
217
|
+
var _39 = (0, react_1.useState)(""), lastCursor = _39[0], setLastCursor = _39[1];
|
|
218
|
+
var _40 = (0, react_1.useState)([]), tableData = _40[0], setTableData = _40[1];
|
|
219
|
+
var _41 = (0, react_1.useState)([]), spaceTableData = _41[0], setSpaceTableData = _41[1];
|
|
220
|
+
var _42 = (0, react_1.useState)(0), size = _42[0], setSize = _42[1];
|
|
221
|
+
var _43 = (0, react_1.useState)((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0), pageIndex = _43[0], setPageIndex = _43[1];
|
|
222
|
+
var _44 = (0, react_1.useState)([]), selectedIds = _44[0], setSelectedIds = _44[1];
|
|
223
|
+
var _45 = (0, react_1.useState)(false), selectAll = _45[0], setSelectAll = _45[1];
|
|
224
|
+
var _46 = (0, react_1.useState)(""), deletePasscode = _46[0], setDeletePasscode = _46[1];
|
|
225
|
+
var _47 = (0, react_1.useState)(""), deletePasscodeInput = _47[0], setDeletePasscodeInput = _47[1];
|
|
226
|
+
var _48 = (0, react_1.useState)(""), deleteFeedId = _48[0], setDeleteFeedId = _48[1];
|
|
183
227
|
var previousType = (0, react_1.useRef)();
|
|
184
228
|
var previousSelectedData = (0, react_1.useRef)();
|
|
185
229
|
//INFO : Used by List Organise
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var
|
|
197
|
-
var
|
|
230
|
+
var _49 = (0, react_1.useState)(false), sortModal = _49[0], setSortModal = _49[1];
|
|
231
|
+
var _50 = (0, react_1.useState)(false), filterModal = _50[0], setFilterModal = _50[1];
|
|
232
|
+
var _51 = (0, react_1.useState)(false), filterDraft = _51[0], setFilterDraft = _51[1];
|
|
233
|
+
var _52 = (0, react_1.useState)(false), addTabModal = _52[0], setAddTabModal = _52[1];
|
|
234
|
+
var _53 = (0, react_1.useState)(false), overviewModal = _53[0], setOverviewModal = _53[1];
|
|
235
|
+
var _54 = (0, react_1.useState)((_c = props.defaultTab) !== null && _c !== void 0 ? _c : ""), selectedTab = _54[0], setSelectedTab = _54[1];
|
|
236
|
+
var _55 = (0, react_1.useState)("dayGridMonth"), calendarView = _55[0], setCalendarView = _55[1];
|
|
237
|
+
var _56 = (0, react_1.useState)(new Date()), calendarTabMonth = _56[0], setCalendarTabMonth = _56[1];
|
|
238
|
+
var _57 = (0, react_1.useState)(true), kanbanDroppable = _57[0], setKanbanDroppable = _57[1];
|
|
239
|
+
var _58 = (0, react_1.useState)([]), kanbanOptions = _58[0], setKanbanOptions = _58[1];
|
|
240
|
+
var _59 = (0, react_1.useState)(false), queryForm = _59[0], setQueryForm = _59[1];
|
|
241
|
+
var _60 = (0, react_1.useState)(false), batchUpdateModal = _60[0], setBatchUpdateModal = _60[1];
|
|
242
|
+
var _61 = (0, react_1.useState)({
|
|
198
243
|
columnId: "",
|
|
199
244
|
columnData: {},
|
|
200
|
-
}), batchUpdateData =
|
|
201
|
-
var
|
|
202
|
-
var
|
|
245
|
+
}), batchUpdateData = _61[0], setBatchUpdateData = _61[1];
|
|
246
|
+
var _62 = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.model) || []), structure = _62[0], setStructure = _62[1];
|
|
247
|
+
var _63 = (0, react_1.useState)(((_d = props === null || props === void 0 ? void 0 : props.organise) === null || _d === void 0 ? void 0 : _d.additionalQuery) || []), additionalQuery = _63[0], setAdditionalQuery = _63[1];
|
|
203
248
|
//INFO : Used by Auth
|
|
204
|
-
var
|
|
249
|
+
var _64 = (0, react_1.useState)({
|
|
205
250
|
email: "",
|
|
206
251
|
google: "",
|
|
207
252
|
phone: "",
|
|
208
253
|
disabled: false,
|
|
209
|
-
}), authMethods =
|
|
210
|
-
var
|
|
254
|
+
}), authMethods = _64[0], setAuthMethods = _64[1];
|
|
255
|
+
var _65 = (0, react_1.useState)(""), selectedAuthMethod = _65[0], setSelectedAuthMethod = _65[1];
|
|
211
256
|
// INFO: Used by Activity Log
|
|
212
|
-
var
|
|
213
|
-
var
|
|
257
|
+
var _66 = (0, react_1.useState)(false), activityModal = _66[0], setActivityModal = _66[1];
|
|
258
|
+
var _67 = (0, react_1.useState)(""), activityId = _67[0], setActivityId = _67[1];
|
|
214
259
|
//INFO : Used by Export
|
|
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
|
|
260
|
+
var _68 = (0, react_1.useState)(null), csvFile = _68[0], setCSVFile = _68[1];
|
|
261
|
+
var _69 = (0, react_1.useState)([]), csvFileData = _69[0], setCSVFileData = _69[1];
|
|
262
|
+
var _70 = (0, react_1.useState)(0), stepCSVIndex = _70[0], setStepCSVIndex = _70[1];
|
|
263
|
+
var _71 = (0, react_1.useState)({}), listCSVMapAttribute = _71[0], setListCSVMapAttribute = _71[1];
|
|
264
|
+
var _72 = (0, react_1.useState)({}), listCSVObjAttribute = _72[0], setListCSVObjAttribute = _72[1];
|
|
265
|
+
var _73 = (0, react_1.useState)([]), csvAPIAttribute = _73[0], setCSVAPIAttribute = _73[1];
|
|
266
|
+
var _74 = (0, react_1.useState)(((_e = props.devSettings.currentUser) === null || _e === void 0 ? void 0 : _e.userEmail) || ""), exportCSVEmail = _74[0], setExportCSVEmail = _74[1];
|
|
267
|
+
var _75 = (0, react_1.useState)(((_g = (_f = props.organise) === null || _f === void 0 ? void 0 : _f.exportSettings) === null || _g === void 0 ? void 0 : _g.defaultExportPDFName) || ""), exportPDFTitle = _75[0], setExportPDFTitle = _75[1];
|
|
268
|
+
var _76 = (0, react_1.useState)((_k = (_j = (_h = props.organise) === null || _h === void 0 ? void 0 : _h.exportSettings) === null || _j === void 0 ? void 0 : _j.sumColumnId) !== null && _k !== void 0 ? _k : []), exportSumAttributeIds = _76[0], setExportSumAttributeIds = _76[1];
|
|
269
|
+
var _77 = (0, react_1.useState)([]), importTableData = _77[0], setImportTableData = _77[1];
|
|
270
|
+
var _78 = (0, react_1.useState)([]), queryList = _78[0], setQueryList = _78[1];
|
|
271
|
+
var _79 = (0, react_1.useState)(-1), queryIndex = _79[0], setQueryIndex = _79[1];
|
|
272
|
+
var _80 = (0, react_1.useState)((_l = props.organise) === null || _l === void 0 ? void 0 : _l.groupBy), groupId = _80[0], setGroupId = _80[1];
|
|
228
273
|
//INFO : Used by Read
|
|
229
274
|
//INFO : Used by Update
|
|
230
|
-
var
|
|
231
|
-
var
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
var
|
|
235
|
-
var
|
|
236
|
-
var
|
|
237
|
-
var
|
|
238
|
-
var
|
|
239
|
-
var
|
|
240
|
-
var
|
|
241
|
-
var
|
|
275
|
+
var _81 = (0, react_1.useState)(false), modalVisible = _81[0], setModalVisible = _81[1];
|
|
276
|
+
var _82 = (0, react_1.useState)(false), deleteModal = _82[0], setDeleteModal = _82[1];
|
|
277
|
+
var _83 = (0, react_1.useState)(false), excelModal = _83[0], setExcelModal = _83[1];
|
|
278
|
+
var _84 = (0, react_1.useState)(false), exportExcel = _84[0], setExportExcel = _84[1];
|
|
279
|
+
var _85 = (0, react_1.useState)(""), exportType = _85[0], setExportType = _85[1];
|
|
280
|
+
var _86 = (0, react_1.useState)(false), exportQR = _86[0], setExportQR = _86[1];
|
|
281
|
+
var _87 = (0, react_1.useState)(false), signatureSigning = _87[0], setSignatureSigning = _87[1];
|
|
282
|
+
var _88 = (0, react_1.useState)({}), selectedData = _88[0], setSelectedData = _88[1];
|
|
283
|
+
var _89 = (0, react_1.useState)(""), selectedObjectStructureId = _89[0], setSelectedObjectStructureId = _89[1];
|
|
284
|
+
var _90 = (0, react_1.useState)(""), selectedObjectId = _90[0], setSelectedObjectId = _90[1];
|
|
285
|
+
var _91 = (0, react_1.useState)(""), selectedListAddressId = _91[0], setSelectedListAddressId = _91[1];
|
|
286
|
+
var _92 = (0, react_1.useState)({
|
|
242
287
|
lat: 0,
|
|
243
288
|
lng: 0,
|
|
244
289
|
name: "",
|
|
245
|
-
}), selectedListAddress =
|
|
246
|
-
var
|
|
247
|
-
var
|
|
248
|
-
var
|
|
249
|
-
var
|
|
250
|
-
var
|
|
251
|
-
var
|
|
252
|
-
var
|
|
290
|
+
}), selectedListAddress = _92[0], setSelectedListAddress = _92[1];
|
|
291
|
+
var _93 = (0, react_1.useState)({}), selectedObjectData = _93[0], setSelectedObjectData = _93[1];
|
|
292
|
+
var _94 = (0, react_1.useState)(false), referenceLoading = _94[0], setReferenceLoading = _94[1];
|
|
293
|
+
var _95 = (0, react_1.useState)({}), referencesOptions = _95[0], setReferencesOptions = _95[1];
|
|
294
|
+
var _96 = (0, react_1.useState)({}), referencesDetails = _96[0], setReferencesDetails = _96[1];
|
|
295
|
+
var _97 = (0, react_1.useState)({}), referenceDeleteTableData = _97[0], setReferenceDeleteTableData = _97[1];
|
|
296
|
+
var _98 = (0, react_1.useState)(0), referenceDeleteIndex = _98[0], setReferenceDeleteIndex = _98[1];
|
|
297
|
+
var _99 = (0, react_1.useState)({
|
|
253
298
|
id: "",
|
|
254
299
|
name: "",
|
|
255
300
|
type: "string",
|
|
256
|
-
}), referenceCreationModal =
|
|
257
|
-
var
|
|
301
|
+
}), referenceCreationModal = _99[0], setReferenceCreationModal = _99[1];
|
|
302
|
+
var _100 = (0, react_1.useState)({}), referenceModelSchema = _100[0], setReferenceSchema = _100[1];
|
|
258
303
|
// INFO ; Use to Trigger Update Prefill UI
|
|
259
|
-
var
|
|
304
|
+
var _101 = (0, react_1.useState)(false), prefillTrigger = _101[0], setPrefillTrigger = _101[1];
|
|
260
305
|
//INFO : Offline
|
|
261
|
-
var
|
|
262
|
-
var
|
|
306
|
+
var _102 = (0, react_1.useState)(0), offlineDataLength = _102[0], setOfflineDataLength = _102[1];
|
|
307
|
+
var _103 = (0, react_1.useState)(false), offlineModal = _103[0], setOfflineModal = _103[1];
|
|
263
308
|
var devSettings = props.devSettings;
|
|
264
309
|
var serverId = (0, utils_1.parseServerId)(devSettings.server);
|
|
265
|
-
var viewType = (
|
|
310
|
+
var viewType = (_o = (_m = props.organise) === null || _m === void 0 ? void 0 : _m.viewId) !== null && _o !== void 0 ? _o : "general";
|
|
266
311
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
267
312
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
268
|
-
var dbModule = isFirebaseClient ? (
|
|
313
|
+
var dbModule = isFirebaseClient ? (_p = props.lib) === null || _p === void 0 ? void 0 : _p.firebase : (_q = props.lib) === null || _q === void 0 ? void 0 : _q.axios;
|
|
269
314
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
270
315
|
var limit = props.limit ? props.limit : 10;
|
|
271
|
-
var isEditor = ((
|
|
272
|
-
var isOffline = (
|
|
273
|
-
var showId = (
|
|
274
|
-
var idField = (
|
|
275
|
-
var pipeline = (
|
|
276
|
-
var hasNavigation = ((
|
|
277
|
-
var formColumn = ((
|
|
316
|
+
var isEditor = ((_r = props.edit) === null || _r === void 0 ? void 0 : _r.allEditable) ? true : false;
|
|
317
|
+
var isOffline = (_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareOffline;
|
|
318
|
+
var showId = (_t = props.space) === null || _t === void 0 ? void 0 : _t.showId;
|
|
319
|
+
var idField = (_u = props.space) === null || _u === void 0 ? void 0 : _u.idField;
|
|
320
|
+
var pipeline = (_v = props === null || props === void 0 ? void 0 : props.space) === null || _v === void 0 ? void 0 : _v.pipeline;
|
|
321
|
+
var hasNavigation = ((_w = props.organise) === null || _w === void 0 ? void 0 : _w.handleNavigate) ? true : false;
|
|
322
|
+
var formColumn = ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareUpdateOneColumn)
|
|
278
323
|
? "grid-cols-2"
|
|
279
324
|
: "grid-cols-4";
|
|
280
|
-
var isActivityLog = (((
|
|
281
|
-
((
|
|
282
|
-
(((
|
|
283
|
-
((
|
|
325
|
+
var isActivityLog = (((_z = (_y = props.edit) === null || _y === void 0 ? void 0 : _y.activityLog) === null || _z === void 0 ? void 0 : _z.enableComments) &&
|
|
326
|
+
((_0 = props.edit) === null || _0 === void 0 ? void 0 : _0.activityLog.commentCollectionId)) ||
|
|
327
|
+
(((_2 = (_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.activityLog) === null || _2 === void 0 ? void 0 : _2.enableLogs) &&
|
|
328
|
+
((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.activityLog.logsCollectionId));
|
|
284
329
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
285
330
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
286
|
-
dbModule: (
|
|
331
|
+
dbModule: (_4 = props.lib) === null || _4 === void 0 ? void 0 : _4.axios,
|
|
287
332
|
dbType: devSettings.server,
|
|
288
333
|
dbCollection: props.collectionId,
|
|
289
334
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -291,7 +336,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
291
336
|
dbUserToken: devSettings.dbUserToken,
|
|
292
337
|
});
|
|
293
338
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
294
|
-
dbModule: (
|
|
339
|
+
dbModule: (_5 = props.lib) === null || _5 === void 0 ? void 0 : _5.axios,
|
|
295
340
|
dbType: devSettings.server,
|
|
296
341
|
dbCollection: props.collectionId,
|
|
297
342
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -299,7 +344,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
299
344
|
dbUserToken: devSettings.dbUserToken,
|
|
300
345
|
});
|
|
301
346
|
var moreButtonPopUp = [
|
|
302
|
-
((
|
|
347
|
+
((_6 = props.edit) === null || _6 === void 0 ? void 0 : _6.allEditable) && !isFirebase
|
|
303
348
|
? {
|
|
304
349
|
text: "Import Excel",
|
|
305
350
|
onClick: function () {
|
|
@@ -308,7 +353,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
308
353
|
},
|
|
309
354
|
}
|
|
310
355
|
: null,
|
|
311
|
-
!((
|
|
356
|
+
!((_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.hideExportCSV)
|
|
312
357
|
? {
|
|
313
358
|
text: "Export CSV",
|
|
314
359
|
onClick: function () {
|
|
@@ -318,7 +363,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
318
363
|
},
|
|
319
364
|
}
|
|
320
365
|
: null,
|
|
321
|
-
!((
|
|
366
|
+
!((_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.exportSettings) === null || _10 === void 0 ? void 0 : _10.hideExportExcel)
|
|
322
367
|
? {
|
|
323
368
|
text: "Export Excel",
|
|
324
369
|
onClick: function () {
|
|
@@ -328,7 +373,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
328
373
|
},
|
|
329
374
|
}
|
|
330
375
|
: null,
|
|
331
|
-
!((
|
|
376
|
+
!((_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.exportSettings) === null || _12 === void 0 ? void 0 : _12.hideExportPDF)
|
|
332
377
|
? {
|
|
333
378
|
text: "Export PDF",
|
|
334
379
|
onClick: function () {
|
|
@@ -338,7 +383,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
338
383
|
},
|
|
339
384
|
}
|
|
340
385
|
: null,
|
|
341
|
-
!((
|
|
386
|
+
!((_14 = (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.exportSettings) === null || _14 === void 0 ? void 0 : _14.hideExportQR)
|
|
342
387
|
? {
|
|
343
388
|
text: "Export QR",
|
|
344
389
|
onClick: function () {
|
|
@@ -348,19 +393,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
348
393
|
},
|
|
349
394
|
}
|
|
350
395
|
: null,
|
|
351
|
-
!((
|
|
396
|
+
!((_16 = (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.exportSettings) === null || _16 === void 0 ? void 0 : _16.hideExportPrint)
|
|
352
397
|
? {
|
|
353
398
|
text: "Print",
|
|
354
399
|
onClick: function () {
|
|
355
400
|
setExportExcel(true);
|
|
356
401
|
setModalVisible(true);
|
|
357
402
|
setExportType("print");
|
|
358
|
-
|
|
403
|
+
},
|
|
404
|
+
}
|
|
405
|
+
: null,
|
|
406
|
+
!((_18 = (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.exportSettings) === null || _18 === void 0 ? void 0 : _18.hideExportDraft)
|
|
407
|
+
? {
|
|
408
|
+
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
409
|
+
onClick: function () {
|
|
410
|
+
setFilterDraft(!filterDraft);
|
|
411
|
+
handleRefresh();
|
|
359
412
|
},
|
|
360
413
|
}
|
|
361
414
|
: null,
|
|
362
415
|
].filter(Boolean);
|
|
363
|
-
if ((
|
|
416
|
+
if ((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.moreSettings)
|
|
364
417
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
365
418
|
var renderImpSearchFilterConditions = function () {
|
|
366
419
|
var _a;
|
|
@@ -369,6 +422,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
369
422
|
filterSelection: filterSelection,
|
|
370
423
|
filterReferenceDate: filterReferenceDate,
|
|
371
424
|
filterReference: filterReference,
|
|
425
|
+
filterDraft: filterDraft,
|
|
372
426
|
}, props.organise, (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListFilterQuery, selectedTab);
|
|
373
427
|
};
|
|
374
428
|
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
@@ -437,14 +491,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
437
491
|
}
|
|
438
492
|
previousType.current = props.type;
|
|
439
493
|
}, [props.type, props.id]);
|
|
440
|
-
//INFO : Change Collection ID Refresh During Logs To Resolve Flickering
|
|
441
|
-
// Trigger Twice Network
|
|
442
|
-
// useEffect(() => {
|
|
443
|
-
// if (oldCollectionId.current) {
|
|
444
|
-
// if (listRQueryHocRef.current) listRQueryHocRef.current.handleRefresh();
|
|
445
|
-
// }
|
|
446
|
-
// oldCollectionId.current = props.collectionId;
|
|
447
|
-
// }, [props.collectionId]);
|
|
448
494
|
(0, react_1.useEffect)(function () {
|
|
449
495
|
var _a, _b, _c, _d, _e;
|
|
450
496
|
var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -527,21 +573,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
527
573
|
handleInitTab();
|
|
528
574
|
}, [
|
|
529
575
|
props.model,
|
|
530
|
-
(
|
|
531
|
-
(
|
|
576
|
+
(_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.additionalQuery,
|
|
577
|
+
(_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.groupBy,
|
|
532
578
|
props.collectionId,
|
|
533
579
|
props.id,
|
|
534
580
|
props.localURLEndpoint,
|
|
535
|
-
(
|
|
536
|
-
(
|
|
581
|
+
(_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.extendedTabs,
|
|
582
|
+
(_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.viewId,
|
|
537
583
|
props.type,
|
|
538
584
|
]);
|
|
539
|
-
(0, react_1.useEffect)(function () {
|
|
540
|
-
var _a, _b, _c, _d, _e;
|
|
541
|
-
if ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.exportSettings) === null || _b === void 0 ? void 0 : _b.sumColumnId) {
|
|
542
|
-
setExportSumAttributeIds((_e = (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.exportSettings) === null || _d === void 0 ? void 0 : _d.sumColumnId) !== null && _e !== void 0 ? _e : []);
|
|
543
|
-
}
|
|
544
|
-
}, (_20 = (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.exportSettings) === null || _20 === void 0 ? void 0 : _20.sumColumnId);
|
|
545
585
|
(0, react_1.useEffect)(function () {
|
|
546
586
|
if (props.devSettings.schemaReference)
|
|
547
587
|
setReferenceSchema(props.devSettings.schemaReference);
|
|
@@ -568,6 +608,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
568
608
|
selectedData[key] = value;
|
|
569
609
|
return null;
|
|
570
610
|
});
|
|
611
|
+
(0, updateModule_1.handleRetrieveReferenceOptions)(selectedData, props.model, dbModule, devSettings, setReferencesOptions, setReferencesDetails);
|
|
571
612
|
setTimeout(function () {
|
|
572
613
|
setPrefillTrigger(!prefillTrigger);
|
|
573
614
|
}, 50);
|
|
@@ -940,10 +981,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
940
981
|
handleFilterDataSelected("search", clonedFilterSearchParams);
|
|
941
982
|
}, 500);
|
|
942
983
|
};
|
|
943
|
-
var handleRangeFilterOnChange = function (
|
|
984
|
+
var handleRangeFilterOnChange = function (value, type) {
|
|
944
985
|
handleClearDataByFilter("date");
|
|
945
986
|
var clonedRangeFilter = JSON.parse(JSON.stringify(filterReferenceDate));
|
|
946
|
-
clonedRangeFilter[
|
|
987
|
+
clonedRangeFilter["startDate"] =
|
|
947
988
|
type === "start" ? value : filterReferenceDate.startDate;
|
|
948
989
|
clonedRangeFilter["endDate"] =
|
|
949
990
|
type === "end" ? value : filterReferenceDate.endDate;
|
|
@@ -4218,7 +4259,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4218
4259
|
return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: structure, 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 }));
|
|
4219
4260
|
};
|
|
4220
4261
|
var renderGroupTable = function (multipleSelect) {
|
|
4221
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
4262
|
+
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;
|
|
4222
4263
|
if (groupId) {
|
|
4223
4264
|
var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
|
|
4224
4265
|
var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
|
|
@@ -4246,7 +4287,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4246
4287
|
}
|
|
4247
4288
|
else {
|
|
4248
4289
|
return Object.entries(groupedSpaceTableData).map(function (_a) {
|
|
4249
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
4290
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
4250
4291
|
var eachKey = _a[0], eachValue = _a[1];
|
|
4251
4292
|
var dataList = eachValue;
|
|
4252
4293
|
var ids = (dataList === null || dataList === void 0 ? void 0 : dataList.map(function (eachData) { return eachData._id; })) || [];
|
|
@@ -4257,25 +4298,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4257
4298
|
react_1.default.createElement("div", { className: "font-semibold text-md mt-5" },
|
|
4258
4299
|
"Group By ",
|
|
4259
4300
|
eachKey),
|
|
4260
|
-
react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: filterTableData, spaceData: dataList !== null && dataList !== void 0 ? dataList : [], size: (_b = dataList.length) !== null && _b !== void 0 ? _b : 0, limit: 5, cursor: "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
4301
|
+
react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: filterTableData, spaceData: dataList !== null && dataList !== void 0 ? dataList : [], size: (_b = dataList.length) !== null && _b !== void 0 ? _b : 0, limit: 5, cursor: "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.disableSelectFullData) === null || _d === void 0 ? void 0 : _d.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
4261
4302
|
selectedIds.length > 0 &&
|
|
4262
|
-
!((
|
|
4263
|
-
!((
|
|
4303
|
+
!((_e = props.edit) === null || _e === void 0 ? void 0 : _e.disabledUpdate) &&
|
|
4304
|
+
!((_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4264
4305
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4265
4306
|
handleBatchDraftData();
|
|
4266
4307
|
} }),
|
|
4267
4308
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4268
4309
|
handleCloneSelectedData();
|
|
4269
4310
|
} }))),
|
|
4270
|
-
((
|
|
4311
|
+
((_g = props.edit) === null || _g === void 0 ? void 0 : _g.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
4271
4312
|
handleGenerateDeletePasscode();
|
|
4272
4313
|
setDeleteModal(true);
|
|
4273
4314
|
} })),
|
|
4274
|
-
!isFirebase && !((
|
|
4315
|
+
!isFirebase && !((_h = props.edit) === null || _h === void 0 ? void 0 : _h.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
4275
4316
|
setBatchUpdateModal(true);
|
|
4276
4317
|
} })),
|
|
4277
|
-
((
|
|
4278
|
-
((
|
|
4318
|
+
((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareListMultipleSelectAddtionalActions) &&
|
|
4319
|
+
((_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListMultipleSelectAddtionalActions) === null || _l === void 0 ? void 0 : _l.map(function (eachButton) {
|
|
4279
4320
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
4280
4321
|
var _a, _b;
|
|
4281
4322
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -4283,16 +4324,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4283
4324
|
}))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), onClickRow: function (id) {
|
|
4284
4325
|
var _a, _b;
|
|
4285
4326
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4286
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), className: "mt-5", lib: { axios: (
|
|
4287
|
-
addColumnEnabled: (
|
|
4327
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), className: "mt-5", lib: { axios: (_m = props.lib) === null || _m === void 0 ? void 0 : _m.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.fixedPagination, advSettings: {
|
|
4328
|
+
addColumnEnabled: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.addColumnEnabled,
|
|
4288
4329
|
renderAddColumnElements: renderAddMathColumn,
|
|
4289
|
-
dragEnabled: (
|
|
4290
|
-
sortEnabled: (
|
|
4291
|
-
filterEnabled: (
|
|
4292
|
-
sortId: (
|
|
4293
|
-
sortOptions: (
|
|
4294
|
-
onSortColumn: (
|
|
4295
|
-
onDragColumn: (
|
|
4330
|
+
dragEnabled: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.advDragEnabled,
|
|
4331
|
+
sortEnabled: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.advSortEnabled,
|
|
4332
|
+
filterEnabled: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.advFilterEnabled,
|
|
4333
|
+
sortId: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.sort,
|
|
4334
|
+
sortOptions: (_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions) === null || _v === void 0 ? void 0 : _v.call(_u),
|
|
4335
|
+
onSortColumn: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.onChangeSort,
|
|
4336
|
+
onDragColumn: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.onChangeDrag,
|
|
4296
4337
|
filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
|
|
4297
4338
|
var _a;
|
|
4298
4339
|
return {
|
|
@@ -4309,7 +4350,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4309
4350
|
return renderSearchContent(newQuery);
|
|
4310
4351
|
},
|
|
4311
4352
|
}, editable: {
|
|
4312
|
-
active: ((
|
|
4353
|
+
active: ((_y = props.edit) === null || _y === void 0 ? void 0 : _y.listEditable) && !props.edit.disabledUpdate
|
|
4313
4354
|
? true
|
|
4314
4355
|
: false,
|
|
4315
4356
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -4323,7 +4364,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4323
4364
|
});
|
|
4324
4365
|
}); },
|
|
4325
4366
|
}, addable: {
|
|
4326
|
-
active: ((
|
|
4367
|
+
active: ((_z = props.edit) === null || _z === void 0 ? void 0 : _z.listAddable) ? true : false,
|
|
4327
4368
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4328
4369
|
return __generator(this, function (_a) {
|
|
4329
4370
|
switch (_a.label) {
|
|
@@ -4334,30 +4375,30 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4334
4375
|
}
|
|
4335
4376
|
});
|
|
4336
4377
|
}); },
|
|
4337
|
-
}, darkMode: (
|
|
4378
|
+
}, darkMode: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkMode, hidePagination: true })));
|
|
4338
4379
|
});
|
|
4339
4380
|
}
|
|
4340
4381
|
}
|
|
4341
4382
|
else {
|
|
4342
|
-
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
4383
|
+
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: isFirebase ? "cursor" : "page", data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.disableSelectFullData) === null || _b === void 0 ? void 0 : _b.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
4343
4384
|
selectedIds.length > 0 &&
|
|
4344
|
-
!((
|
|
4345
|
-
!((
|
|
4385
|
+
!((_c = props.edit) === null || _c === void 0 ? void 0 : _c.disabledUpdate) &&
|
|
4386
|
+
!((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4346
4387
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4347
4388
|
handleBatchDraftData();
|
|
4348
4389
|
} }),
|
|
4349
4390
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4350
4391
|
handleCloneSelectedData();
|
|
4351
4392
|
} }))),
|
|
4352
|
-
((
|
|
4393
|
+
((_e = props.edit) === null || _e === void 0 ? void 0 : _e.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
4353
4394
|
handleGenerateDeletePasscode();
|
|
4354
4395
|
setDeleteModal(true);
|
|
4355
4396
|
} })),
|
|
4356
|
-
!isFirebase && !((
|
|
4397
|
+
!isFirebase && !((_f = props.edit) === null || _f === void 0 ? void 0 : _f.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
4357
4398
|
setBatchUpdateModal(true);
|
|
4358
4399
|
} })),
|
|
4359
|
-
((
|
|
4360
|
-
((
|
|
4400
|
+
((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMultipleSelectAddtionalActions) &&
|
|
4401
|
+
((_j = (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListMultipleSelectAddtionalActions) === null || _j === void 0 ? void 0 : _j.map(function (eachButton) {
|
|
4361
4402
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
4362
4403
|
var _a, _b;
|
|
4363
4404
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -4367,16 +4408,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4367
4408
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4368
4409
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
4369
4410
|
handlePagination(value);
|
|
4370
|
-
}, className: "mt-5", lib: { axios: (
|
|
4371
|
-
addColumnEnabled: (
|
|
4411
|
+
}, className: "mt-5", lib: { axios: (_k = props.lib) === null || _k === void 0 ? void 0 : _k.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.fixedPagination, advSettings: {
|
|
4412
|
+
addColumnEnabled: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.addColumnEnabled,
|
|
4372
4413
|
renderAddColumnElements: renderAddMathColumn,
|
|
4373
|
-
dragEnabled: (
|
|
4374
|
-
sortEnabled: (
|
|
4375
|
-
filterEnabled: (
|
|
4376
|
-
sortId: (
|
|
4377
|
-
sortOptions: (
|
|
4378
|
-
onSortColumn: (
|
|
4379
|
-
onDragColumn: (
|
|
4414
|
+
dragEnabled: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.advDragEnabled,
|
|
4415
|
+
sortEnabled: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.advSortEnabled,
|
|
4416
|
+
filterEnabled: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.advFilterEnabled,
|
|
4417
|
+
sortId: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.sort,
|
|
4418
|
+
sortOptions: (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.renderReferenceLabelOptions) === null || _t === void 0 ? void 0 : _t.call(_s),
|
|
4419
|
+
onSortColumn: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.onChangeSort,
|
|
4420
|
+
onDragColumn: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeDrag,
|
|
4380
4421
|
filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
|
|
4381
4422
|
var _a;
|
|
4382
4423
|
return {
|
|
@@ -4393,7 +4434,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4393
4434
|
return renderSearchContent(newQuery);
|
|
4394
4435
|
},
|
|
4395
4436
|
}, editable: {
|
|
4396
|
-
active: ((
|
|
4437
|
+
active: ((_w = props.edit) === null || _w === void 0 ? void 0 : _w.listEditable) && !props.edit.disabledUpdate
|
|
4397
4438
|
? true
|
|
4398
4439
|
: false,
|
|
4399
4440
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -4407,7 +4448,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4407
4448
|
});
|
|
4408
4449
|
}); },
|
|
4409
4450
|
}, addable: {
|
|
4410
|
-
active: ((
|
|
4451
|
+
active: ((_x = props.edit) === null || _x === void 0 ? void 0 : _x.listAddable) ? true : false,
|
|
4411
4452
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4412
4453
|
return __generator(this, function (_a) {
|
|
4413
4454
|
switch (_a.label) {
|
|
@@ -4418,11 +4459,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4418
4459
|
}
|
|
4419
4460
|
});
|
|
4420
4461
|
}); },
|
|
4421
|
-
}, darkMode: (
|
|
4462
|
+
}, darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, hidePagination: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.hidePagination }));
|
|
4422
4463
|
}
|
|
4423
4464
|
};
|
|
4424
4465
|
var renderTabContent = function (tabs, dataType, viewType) {
|
|
4425
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
4466
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
4426
4467
|
var selectedTabData = tabs.find(function (eachTab) {
|
|
4427
4468
|
if (eachTab.id === viewType) {
|
|
4428
4469
|
return eachTab;
|
|
@@ -4458,26 +4499,26 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4458
4499
|
}
|
|
4459
4500
|
else if (selectedTabData.viewType === "list") {
|
|
4460
4501
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4461
|
-
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" },
|
|
4462
|
-
selectedIds.length > 0 && !((
|
|
4502
|
+
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, disableSelectFullData: (_k = (_j = props.organise) === null || _j === void 0 ? void 0 : _j.disableSelectFullData) === null || _k === void 0 ? void 0 : _k.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
4503
|
+
selectedIds.length > 0 && !((_l = props.edit) === null || _l === void 0 ? void 0 : _l.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4463
4504
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4464
4505
|
handleBatchDraftData();
|
|
4465
4506
|
} }),
|
|
4466
4507
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4467
4508
|
handleCloneSelectedData();
|
|
4468
4509
|
} }))),
|
|
4469
|
-
((
|
|
4510
|
+
((_m = props.edit) === null || _m === void 0 ? void 0 : _m.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
4470
4511
|
handleGenerateDeletePasscode();
|
|
4471
4512
|
setDeleteModal(true);
|
|
4472
4513
|
} })),
|
|
4473
|
-
!isFirebase && !((
|
|
4514
|
+
!isFirebase && !((_o = props.edit) === null || _o === void 0 ? void 0 : _o.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
4474
4515
|
setBatchUpdateModal(true);
|
|
4475
4516
|
} }))), onClickRow: function (id) {
|
|
4476
4517
|
var _a, _b;
|
|
4477
4518
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4478
4519
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
4479
4520
|
handlePagination(value);
|
|
4480
|
-
}, className: "mt-5", hidePagination: (
|
|
4521
|
+
}, className: "mt-5", hidePagination: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.hidePagination })));
|
|
4481
4522
|
}
|
|
4482
4523
|
else if (selectedTabData.viewType === "grid") {
|
|
4483
4524
|
var isGridScroll = renderCheckGridScroll();
|
|
@@ -4487,7 +4528,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4487
4528
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4488
4529
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
4489
4530
|
handlePagination(value);
|
|
4490
|
-
}, gridColClassName: (
|
|
4531
|
+
}, gridColClassName: (_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareListGridColClassName, className: "mt-5", hidePagination: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.hidePagination })));
|
|
4491
4532
|
}
|
|
4492
4533
|
else if (selectedTabData.viewType === "calendar") {
|
|
4493
4534
|
var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
|
|
@@ -4581,7 +4622,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4581
4622
|
}
|
|
4582
4623
|
return eventAvailabilities;
|
|
4583
4624
|
};
|
|
4584
|
-
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: (
|
|
4625
|
+
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: (_s = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _s !== void 0 ? _s : calendarView, handleMonthChange: function (date) {
|
|
4585
4626
|
var startOfMonth = (0, moment_1.default)(calendarTabMonth).startOf("month");
|
|
4586
4627
|
var endOfMonth = (0, moment_1.default)(calendarTabMonth).endOf("month");
|
|
4587
4628
|
if (!(0, moment_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
|
|
@@ -4597,7 +4638,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4597
4638
|
else if (selectedTabData.viewType === "feeds") {
|
|
4598
4639
|
var contentList_1 = [];
|
|
4599
4640
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
4600
|
-
var customFeedsData = (
|
|
4641
|
+
var customFeedsData = (_t = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _t === void 0 ? void 0 : _t.call(feedsSettings_1, tableData, spaceTableData);
|
|
4601
4642
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
4602
4643
|
customFeedsData.map(function (eachData) {
|
|
4603
4644
|
var _a, _b, _c, _d;
|
|
@@ -4638,11 +4679,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4638
4679
|
});
|
|
4639
4680
|
}
|
|
4640
4681
|
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" },
|
|
4641
|
-
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (
|
|
4682
|
+
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.darkMode }),
|
|
4642
4683
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
4643
|
-
contentList_1.length > 0 && !((
|
|
4684
|
+
contentList_1.length > 0 && !((_v = props.organise) === null || _v === void 0 ? void 0 : _v.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) {
|
|
4644
4685
|
handlePagination(value);
|
|
4645
|
-
}, darkMode: (
|
|
4686
|
+
}, darkMode: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkMode }))))));
|
|
4646
4687
|
}
|
|
4647
4688
|
else if (selectedTabData.viewType === "map") {
|
|
4648
4689
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -4741,7 +4782,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4741
4782
|
}
|
|
4742
4783
|
else if (selectedTabData.viewType === "kanban") {
|
|
4743
4784
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
4744
|
-
var kanbanTitle_2 = (
|
|
4785
|
+
var kanbanTitle_2 = (_x = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _x !== void 0 ? _x : "";
|
|
4745
4786
|
var nullColumn_1 = false;
|
|
4746
4787
|
var groupBy_1 = [];
|
|
4747
4788
|
var groupLabel_1 = [];
|
|
@@ -5199,7 +5240,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5199
5240
|
};
|
|
5200
5241
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
5201
5242
|
renderNotification("root"),
|
|
5202
|
-
((
|
|
5243
|
+
((_25 = (_24 = props.renderSettings) === null || _24 === void 0 ? void 0 : _24.renderLoadingUI) === null || _25 === void 0 ? void 0 : _25.call(_24)) && loading ? ((_26 = props.renderSettings) === null || _26 === void 0 ? void 0 : _26.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
5203
5244
|
var _a, _b;
|
|
5204
5245
|
if (loading)
|
|
5205
5246
|
return;
|