blixify-ui-web 0.3.91 → 0.3.93
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/authModule.d.ts +4 -0
- package/lib/components/data/authModule.d.ts.map +1 -0
- package/lib/components/data/authModule.js +97 -0
- package/lib/components/data/authModule.js.map +1 -0
- package/lib/components/data/dataTemplate/authModal.d.ts +21 -0
- package/lib/components/data/dataTemplate/authModal.d.ts.map +1 -0
- package/lib/components/data/dataTemplate/authModal.js +170 -0
- package/lib/components/data/dataTemplate/authModal.js.map +1 -0
- 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 +411 -160
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +3 -11
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts +9 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +257 -61
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +35 -2
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts +1 -3
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +205 -303
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +5 -1
- package/lib/components/data/readModule.js.map +1 -1
- package/lib/components/data/readQuery/index.d.ts +3 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -1
- package/lib/components/data/readQuery/index.js +2 -0
- package/lib/components/data/readQuery/index.js.map +1 -1
- package/lib/components/data/readQueryHoc/index.d.ts.map +1 -1
- package/lib/components/data/readQueryHoc/index.js +2 -0
- package/lib/components/data/readQueryHoc/index.js.map +1 -1
- package/lib/components/data/stories.d.ts.map +1 -1
- package/lib/components/data/stories.js +1 -0
- package/lib/components/data/stories.js.map +1 -1
- package/lib/components/data/testData.d.ts +1 -1
- package/lib/components/data/testData.d.ts.map +1 -1
- package/lib/components/data/testData.js +1 -1
- package/lib/components/data/testData.js.map +1 -1
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +2 -0
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/data/utils.d.ts.map +1 -1
- package/lib/components/data/utils.js +1 -6
- package/lib/components/data/utils.js.map +1 -1
- package/lib/components/display/table/index.d.ts +5 -0
- package/lib/components/display/table/index.d.ts.map +1 -1
- package/lib/components/display/table/index.js +38 -6
- package/lib/components/display/table/index.js.map +1 -1
- package/lib/components/input/uploadInput/index.js +1 -1
- package/lib/components/input/uploadInput/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -120,6 +120,7 @@ var uploadInput_1 = require("../../input/uploadInput");
|
|
|
120
120
|
var breadcrumb_1 = require("../../navigation/breadcrumb");
|
|
121
121
|
var tabs_1 = require("../../navigation/tabs");
|
|
122
122
|
var link_1 = require("../../structure/link");
|
|
123
|
+
var authModule_1 = require("../authModule");
|
|
123
124
|
var blobModule_1 = require("../blobModule");
|
|
124
125
|
var listModule_1 = require("../listModule");
|
|
125
126
|
var moduleUtils_1 = require("../moduleUtils");
|
|
@@ -131,13 +132,14 @@ var updateModule_1 = require("../updateModule");
|
|
|
131
132
|
var utils_1 = require("../utils");
|
|
132
133
|
var writeQuery_1 = require("../writeQuery");
|
|
133
134
|
var activityModal_1 = require("./activityModal");
|
|
135
|
+
var authModal_1 = require("./authModal");
|
|
134
136
|
var dataStateModel_1 = require("./dataStateModel");
|
|
135
137
|
var indexedDb_1 = require("./indexedDb");
|
|
136
138
|
var pagination_1 = require("./pagination");
|
|
137
139
|
var referenceModal_1 = require("./referenceModal");
|
|
138
140
|
var settingsModal_1 = require("./settingsModal");
|
|
139
141
|
exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
140
|
-
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;
|
|
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;
|
|
141
143
|
var formRef = (0, react_1.createRef)();
|
|
142
144
|
var objectFormRef = (0, react_1.createRef)();
|
|
143
145
|
var listAddressFromRef = (0, react_1.createRef)();
|
|
@@ -152,98 +154,106 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
152
154
|
var typingTimeout = (0, react_1.useRef)();
|
|
153
155
|
// const oldCollectionId: any = useRef();
|
|
154
156
|
var mapViewRef = (0, react_1.useRef)();
|
|
155
|
-
var
|
|
156
|
-
var
|
|
157
|
+
var _6 = (0, react_1.useState)(false), loading = _6[0], setLoading = _6[1];
|
|
158
|
+
var _7 = (0, react_1.useState)(), notification = _7[0], setNotification = _7[1];
|
|
157
159
|
//INFO : Used by List
|
|
158
|
-
var
|
|
159
|
-
var
|
|
160
|
-
var
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
var
|
|
160
|
+
var _8 = (0, react_1.useState)({}), filterSearch = _8[0], setFilterSearch = _8[1];
|
|
161
|
+
var _9 = (0, react_1.useState)({}), filterSearchParams = _9[0], setFilterSearchParams = _9[1];
|
|
162
|
+
var _10 = (0, react_1.useState)({}), filterSelection = _10[0], setFilterSelection = _10[1];
|
|
163
|
+
var _11 = (0, react_1.useState)({}), filterReference = _11[0], setFilterReference = _11[1];
|
|
164
|
+
var _12 = (0, react_1.useState)({}), filterReferenceSearch = _12[0], setFilterReferenceSearch = _12[1];
|
|
165
|
+
var _13 = (0, react_1.useState)({}), filterReferenceList = _13[0], setFilterReferenceList = _13[1];
|
|
166
|
+
var _14 = (0, react_1.useState)({
|
|
165
167
|
startDate: undefined,
|
|
166
168
|
endDate: undefined,
|
|
167
|
-
}), filterReferenceDate =
|
|
168
|
-
var
|
|
169
|
-
var
|
|
170
|
-
var
|
|
171
|
-
var
|
|
172
|
-
var
|
|
173
|
-
var
|
|
174
|
-
var
|
|
175
|
-
var
|
|
176
|
-
var
|
|
177
|
-
var
|
|
178
|
-
var
|
|
179
|
-
var
|
|
169
|
+
}), filterReferenceDate = _14[0], setFilterReferenceDate = _14[1];
|
|
170
|
+
var _15 = (0, react_1.useState)(true), tableLoading = _15[0], setTableLoading = _15[1];
|
|
171
|
+
var _16 = (0, react_1.useState)(""), cursor = _16[0], setCursor = _16[1];
|
|
172
|
+
var _17 = (0, react_1.useState)(""), lastCursor = _17[0], setLastCursor = _17[1];
|
|
173
|
+
var _18 = (0, react_1.useState)([]), tableData = _18[0], setTableData = _18[1];
|
|
174
|
+
var _19 = (0, react_1.useState)([]), spaceTableData = _19[0], setSpaceTableData = _19[1];
|
|
175
|
+
var _20 = (0, react_1.useState)(0), size = _20[0], setSize = _20[1];
|
|
176
|
+
var _21 = (0, react_1.useState)((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0), pageIndex = _21[0], setPageIndex = _21[1];
|
|
177
|
+
var _22 = (0, react_1.useState)([]), selectedIds = _22[0], setSelectedIds = _22[1];
|
|
178
|
+
var _23 = (0, react_1.useState)(false), selectAll = _23[0], setSelectAll = _23[1];
|
|
179
|
+
var _24 = (0, react_1.useState)(""), deletePasscode = _24[0], setDeletePasscode = _24[1];
|
|
180
|
+
var _25 = (0, react_1.useState)(""), deletePasscodeInput = _25[0], setDeletePasscodeInput = _25[1];
|
|
181
|
+
var _26 = (0, react_1.useState)(""), deleteFeedId = _26[0], setDeleteFeedId = _26[1];
|
|
180
182
|
var previousType = (0, react_1.useRef)();
|
|
181
183
|
var previousSelectedData = (0, react_1.useRef)();
|
|
182
184
|
//INFO : Used by List Organise
|
|
183
|
-
var
|
|
184
|
-
var
|
|
185
|
-
var
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
var
|
|
185
|
+
var _27 = (0, react_1.useState)(false), sortModal = _27[0], setSortModal = _27[1];
|
|
186
|
+
var _28 = (0, react_1.useState)(false), filterModal = _28[0], setFilterModal = _28[1];
|
|
187
|
+
var _29 = (0, react_1.useState)(false), addTabModal = _29[0], setAddTabModal = _29[1];
|
|
188
|
+
var _30 = (0, react_1.useState)(false), overviewModal = _30[0], setOverviewModal = _30[1];
|
|
189
|
+
var _31 = (0, react_1.useState)((_c = props.defaultTab) !== null && _c !== void 0 ? _c : ""), selectedTab = _31[0], setSelectedTab = _31[1];
|
|
190
|
+
var _32 = (0, react_1.useState)("dayGridMonth"), calendarView = _32[0], setCalendarView = _32[1];
|
|
191
|
+
var _33 = (0, react_1.useState)(new Date()), calendarTabMonth = _33[0], setCalendarTabMonth = _33[1];
|
|
192
|
+
var _34 = (0, react_1.useState)(true), kanbanDroppable = _34[0], setKanbanDroppable = _34[1];
|
|
193
|
+
var _35 = (0, react_1.useState)([]), kanbanOptions = _35[0], setKanbanOptions = _35[1];
|
|
194
|
+
var _36 = (0, react_1.useState)(false), queryForm = _36[0], setQueryForm = _36[1];
|
|
195
|
+
var _37 = (0, react_1.useState)(false), batchUpdateModal = _37[0], setBatchUpdateModal = _37[1];
|
|
196
|
+
var _38 = (0, react_1.useState)({
|
|
195
197
|
columnId: "",
|
|
196
198
|
columnData: {},
|
|
197
|
-
}), batchUpdateData =
|
|
199
|
+
}), batchUpdateData = _38[0], setBatchUpdateData = _38[1];
|
|
200
|
+
//INFO : Used by Auth
|
|
201
|
+
var _39 = (0, react_1.useState)({
|
|
202
|
+
email: "",
|
|
203
|
+
google: "",
|
|
204
|
+
phone: "",
|
|
205
|
+
disabled: false,
|
|
206
|
+
}), authMethods = _39[0], setAuthMethods = _39[1];
|
|
207
|
+
var _40 = (0, react_1.useState)(""), selectedAuthMethod = _40[0], setSelectedAuthMethod = _40[1];
|
|
198
208
|
// INFO: Used by Activity Log
|
|
199
|
-
var
|
|
200
|
-
var
|
|
209
|
+
var _41 = (0, react_1.useState)(false), activityModal = _41[0], setActivityModal = _41[1];
|
|
210
|
+
var _42 = (0, react_1.useState)(""), activityId = _42[0], setActivityId = _42[1];
|
|
201
211
|
//INFO : Used by Export
|
|
202
|
-
var
|
|
203
|
-
var
|
|
204
|
-
var
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
var
|
|
208
|
-
var
|
|
209
|
-
var
|
|
210
|
-
var
|
|
211
|
-
var
|
|
212
|
+
var _43 = (0, react_1.useState)(null), csvFile = _43[0], setCSVFile = _43[1];
|
|
213
|
+
var _44 = (0, react_1.useState)([]), csvFileData = _44[0], setCSVFileData = _44[1];
|
|
214
|
+
var _45 = (0, react_1.useState)(0), stepCSVIndex = _45[0], setStepCSVIndex = _45[1];
|
|
215
|
+
var _46 = (0, react_1.useState)({}), listCSVMapAttribute = _46[0], setListCSVMapAttribute = _46[1];
|
|
216
|
+
var _47 = (0, react_1.useState)({}), listCSVObjAttribute = _47[0], setListCSVObjAttribute = _47[1];
|
|
217
|
+
var _48 = (0, react_1.useState)([]), csvAPIAttribute = _48[0], setCSVAPIAttribute = _48[1];
|
|
218
|
+
var _49 = (0, react_1.useState)(((_d = props.devSettings.currentUser) === null || _d === void 0 ? void 0 : _d.userEmail) || ""), exportCSVEmail = _49[0], setExportCSVEmail = _49[1];
|
|
219
|
+
var _50 = (0, react_1.useState)([]), importTableData = _50[0], setImportTableData = _50[1];
|
|
220
|
+
var _51 = (0, react_1.useState)([]), queryList = _51[0], setQueryList = _51[1];
|
|
221
|
+
var _52 = (0, react_1.useState)(-1), queryIndex = _52[0], setQueryIndex = _52[1];
|
|
212
222
|
//INFO : Used by Read
|
|
213
223
|
//INFO : Used by Update
|
|
214
|
-
var
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
var
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var
|
|
224
|
+
var _53 = (0, react_1.useState)(false), modalVisible = _53[0], setModalVisible = _53[1];
|
|
225
|
+
var _54 = (0, react_1.useState)(false), deleteModal = _54[0], setDeleteModal = _54[1];
|
|
226
|
+
var _55 = (0, react_1.useState)(false), excelModal = _55[0], setExcelModal = _55[1];
|
|
227
|
+
var _56 = (0, react_1.useState)(false), exportExcel = _56[0], setExportExcel = _56[1];
|
|
228
|
+
var _57 = (0, react_1.useState)(""), exportType = _57[0], setExportType = _57[1];
|
|
229
|
+
var _58 = (0, react_1.useState)(false), exportQR = _58[0], setExportQR = _58[1];
|
|
230
|
+
var _59 = (0, react_1.useState)(false), signatureSigning = _59[0], setSignatureSigning = _59[1];
|
|
231
|
+
var _60 = (0, react_1.useState)({}), selectedData = _60[0], setSelectedData = _60[1];
|
|
232
|
+
var _61 = (0, react_1.useState)(""), selectedObjectStructureId = _61[0], setSelectedObjectStructureId = _61[1];
|
|
233
|
+
var _62 = (0, react_1.useState)(""), selectedObjectId = _62[0], setSelectedObjectId = _62[1];
|
|
234
|
+
var _63 = (0, react_1.useState)(""), selectedListAddressId = _63[0], setSelectedListAddressId = _63[1];
|
|
235
|
+
var _64 = (0, react_1.useState)({
|
|
226
236
|
lat: 0,
|
|
227
237
|
lng: 0,
|
|
228
238
|
name: "",
|
|
229
|
-
}), selectedListAddress =
|
|
230
|
-
var
|
|
231
|
-
var
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
var
|
|
235
|
-
var
|
|
236
|
-
var
|
|
239
|
+
}), selectedListAddress = _64[0], setSelectedListAddress = _64[1];
|
|
240
|
+
var _65 = (0, react_1.useState)({}), selectedObjectData = _65[0], setSelectedObjectData = _65[1];
|
|
241
|
+
var _66 = (0, react_1.useState)(false), referenceLoading = _66[0], setReferenceLoading = _66[1];
|
|
242
|
+
var _67 = (0, react_1.useState)({}), referencesOptions = _67[0], setReferencesOptions = _67[1];
|
|
243
|
+
var _68 = (0, react_1.useState)({}), referencesDetails = _68[0], setReferencesDetails = _68[1];
|
|
244
|
+
var _69 = (0, react_1.useState)({}), referenceDeleteTableData = _69[0], setReferenceDeleteTableData = _69[1];
|
|
245
|
+
var _70 = (0, react_1.useState)(0), referenceDeleteIndex = _70[0], setReferenceDeleteIndex = _70[1];
|
|
246
|
+
var _71 = (0, react_1.useState)({
|
|
237
247
|
id: "",
|
|
238
248
|
name: "",
|
|
239
249
|
type: "string",
|
|
240
|
-
}), referenceCreationModal =
|
|
241
|
-
var
|
|
250
|
+
}), referenceCreationModal = _71[0], setReferenceCreationModal = _71[1];
|
|
251
|
+
var _72 = (0, react_1.useState)({}), referenceModelSchema = _72[0], setReferenceSchema = _72[1];
|
|
242
252
|
// INFO ; Use to Trigger Update Prefill UI
|
|
243
|
-
var
|
|
253
|
+
var _73 = (0, react_1.useState)(false), prefillTrigger = _73[0], setPrefillTrigger = _73[1];
|
|
244
254
|
//INFO : Offline
|
|
245
|
-
var
|
|
246
|
-
var
|
|
255
|
+
var _74 = (0, react_1.useState)(0), offlineDataLength = _74[0], setOfflineDataLength = _74[1];
|
|
256
|
+
var _75 = (0, react_1.useState)(false), offlineModal = _75[0], setOfflineModal = _75[1];
|
|
247
257
|
var devSettings = props.devSettings;
|
|
248
258
|
var serverId = (0, utils_1.parseServerId)(devSettings.server);
|
|
249
259
|
var viewType = (_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) !== null && _f !== void 0 ? _f : "general";
|
|
@@ -256,17 +266,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
256
266
|
var isOffline = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareOffline;
|
|
257
267
|
var showId = (_l = props.space) === null || _l === void 0 ? void 0 : _l.showId;
|
|
258
268
|
var idField = (_m = props.space) === null || _m === void 0 ? void 0 : _m.idField;
|
|
259
|
-
var
|
|
260
|
-
var
|
|
269
|
+
var pipeline = (_o = props === null || props === void 0 ? void 0 : props.space) === null || _o === void 0 ? void 0 : _o.pipeline;
|
|
270
|
+
var hasNavigation = ((_p = props.organise) === null || _p === void 0 ? void 0 : _p.handleNavigate) ? true : false;
|
|
271
|
+
var formColumn = ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareUpdateOneColumn)
|
|
261
272
|
? "grid-cols-2"
|
|
262
273
|
: "grid-cols-4";
|
|
263
|
-
var isActivityLog = (((
|
|
264
|
-
((
|
|
265
|
-
(((
|
|
266
|
-
((
|
|
274
|
+
var isActivityLog = (((_s = (_r = props.edit) === null || _r === void 0 ? void 0 : _r.activityLog) === null || _s === void 0 ? void 0 : _s.enableComments) &&
|
|
275
|
+
((_t = props.edit) === null || _t === void 0 ? void 0 : _t.activityLog.commentCollectionId)) ||
|
|
276
|
+
(((_v = (_u = props.edit) === null || _u === void 0 ? void 0 : _u.activityLog) === null || _v === void 0 ? void 0 : _v.enableLogs) &&
|
|
277
|
+
((_w = props.edit) === null || _w === void 0 ? void 0 : _w.activityLog.logsCollectionId));
|
|
267
278
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
268
279
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
269
|
-
dbModule: (
|
|
280
|
+
dbModule: (_x = props.lib) === null || _x === void 0 ? void 0 : _x.axios,
|
|
270
281
|
dbType: devSettings.server,
|
|
271
282
|
dbCollection: props.collectionId,
|
|
272
283
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -274,7 +285,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
274
285
|
dbUserToken: devSettings.dbUserToken,
|
|
275
286
|
});
|
|
276
287
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
277
|
-
dbModule: (
|
|
288
|
+
dbModule: (_y = props.lib) === null || _y === void 0 ? void 0 : _y.axios,
|
|
278
289
|
dbType: devSettings.server,
|
|
279
290
|
dbCollection: props.collectionId,
|
|
280
291
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -282,7 +293,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
282
293
|
dbUserToken: devSettings.dbUserToken,
|
|
283
294
|
});
|
|
284
295
|
var moreButtonPopUp = [
|
|
285
|
-
((
|
|
296
|
+
((_z = props.edit) === null || _z === void 0 ? void 0 : _z.allEditable) && !isFirebase
|
|
286
297
|
? {
|
|
287
298
|
text: "Import Excel",
|
|
288
299
|
onClick: function () {
|
|
@@ -331,7 +342,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
331
342
|
},
|
|
332
343
|
},
|
|
333
344
|
].filter(Boolean);
|
|
334
|
-
if ((
|
|
345
|
+
if ((_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.moreSettings)
|
|
335
346
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
336
347
|
var renderImpSearchFilterConditions = function () {
|
|
337
348
|
var _a;
|
|
@@ -397,6 +408,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
397
408
|
(_a = readQueryHocRef.current) === null || _a === void 0 ? void 0 : _a.handleRefresh();
|
|
398
409
|
}
|
|
399
410
|
}
|
|
411
|
+
//INFO : Auth Feature
|
|
412
|
+
if (props.type === "read")
|
|
413
|
+
handleDTAuthMethods();
|
|
400
414
|
break;
|
|
401
415
|
case "list":
|
|
402
416
|
setReferencesOptions({});
|
|
@@ -416,22 +430,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
416
430
|
(0, react_1.useEffect)(function () {
|
|
417
431
|
var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
418
432
|
var currentTab, kanbanSettings, kanbanTitle_1, kanbanRefRQ_1, kanbanRefOption_1, kanbanRefLabel_1, kanbanRefQuery;
|
|
419
|
-
var _a, _b, _c, _d
|
|
420
|
-
return __generator(this, function (
|
|
421
|
-
switch (
|
|
433
|
+
var _a, _b, _c, _d;
|
|
434
|
+
return __generator(this, function (_e) {
|
|
435
|
+
switch (_e.label) {
|
|
422
436
|
case 0:
|
|
423
|
-
if (!(props.type === "list"
|
|
424
|
-
currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (
|
|
437
|
+
if (!(props.type === "list")) return [3 /*break*/, 4];
|
|
438
|
+
currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
|
|
425
439
|
setSelectedTab(currentTab);
|
|
426
440
|
if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "calendar")) return [3 /*break*/, 1];
|
|
427
441
|
setFilterSearch({});
|
|
428
442
|
setFilterSearchParams({});
|
|
429
|
-
(
|
|
443
|
+
(_c = listRQueryHocRef.current) === null || _c === void 0 ? void 0 : _c.handleRefresh();
|
|
430
444
|
return [3 /*break*/, 4];
|
|
431
445
|
case 1:
|
|
432
446
|
if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "kanban")) return [3 /*break*/, 4];
|
|
433
447
|
kanbanSettings = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings;
|
|
434
|
-
kanbanTitle_1 = (
|
|
448
|
+
kanbanTitle_1 = (_d = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _d !== void 0 ? _d : "";
|
|
435
449
|
kanbanRefRQ_1 = null;
|
|
436
450
|
kanbanRefOption_1 = [];
|
|
437
451
|
kanbanRefLabel_1 = "";
|
|
@@ -458,7 +472,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
458
472
|
limit: limit,
|
|
459
473
|
})];
|
|
460
474
|
case 2:
|
|
461
|
-
kanbanRefQuery =
|
|
475
|
+
kanbanRefQuery = _e.sent();
|
|
462
476
|
if (kanbanRefQuery.data) {
|
|
463
477
|
kanbanRefQuery.data.map(function (eachData) {
|
|
464
478
|
kanbanRefOption_1.push({
|
|
@@ -468,10 +482,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
468
482
|
return null;
|
|
469
483
|
});
|
|
470
484
|
}
|
|
471
|
-
|
|
485
|
+
_e.label = 3;
|
|
472
486
|
case 3:
|
|
473
487
|
setKanbanOptions(kanbanRefOption_1);
|
|
474
|
-
|
|
488
|
+
_e.label = 4;
|
|
475
489
|
case 4: return [2 /*return*/];
|
|
476
490
|
}
|
|
477
491
|
});
|
|
@@ -481,8 +495,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
481
495
|
props.collectionId,
|
|
482
496
|
props.id,
|
|
483
497
|
props.localURLEndpoint,
|
|
484
|
-
(
|
|
485
|
-
(
|
|
498
|
+
(_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.extendedTabs,
|
|
499
|
+
(_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.viewId,
|
|
486
500
|
props.type,
|
|
487
501
|
selectedTab,
|
|
488
502
|
]);
|
|
@@ -636,6 +650,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
636
650
|
cursor: renderCursor(),
|
|
637
651
|
sort: handleReadQueryHocSort(query),
|
|
638
652
|
limit: limit,
|
|
653
|
+
pipeline: pipeline,
|
|
639
654
|
};
|
|
640
655
|
if (calendarSettings || (selectedTab && selectedTab.viewType === "map")) {
|
|
641
656
|
cond.limit = undefined;
|
|
@@ -729,7 +744,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
729
744
|
});
|
|
730
745
|
prettierDataList = dummyPrettierDataList_1;
|
|
731
746
|
return [3 /*break*/, 3];
|
|
732
|
-
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
|
|
747
|
+
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)];
|
|
733
748
|
case 2:
|
|
734
749
|
prettierDataList = _g.sent();
|
|
735
750
|
_g.label = 3;
|
|
@@ -906,6 +921,42 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
906
921
|
}
|
|
907
922
|
};
|
|
908
923
|
//=====================================================================================
|
|
924
|
+
//SECTION: Handle Auth
|
|
925
|
+
//=====================================================================================
|
|
926
|
+
var handleDTAuthMethods = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
927
|
+
var authProviders;
|
|
928
|
+
var _a;
|
|
929
|
+
return __generator(this, function (_b) {
|
|
930
|
+
switch (_b.label) {
|
|
931
|
+
case 0:
|
|
932
|
+
if (!props.space) return [3 /*break*/, 2];
|
|
933
|
+
return [4 /*yield*/, (0, authModule_1.handleAuthMethods)(props.space, (_a = props.id) !== null && _a !== void 0 ? _a : "")];
|
|
934
|
+
case 1:
|
|
935
|
+
authProviders = _b.sent();
|
|
936
|
+
if (authProviders)
|
|
937
|
+
setAuthMethods(authProviders);
|
|
938
|
+
else
|
|
939
|
+
setAuthMethods({
|
|
940
|
+
email: "",
|
|
941
|
+
google: "",
|
|
942
|
+
phone: "",
|
|
943
|
+
disabled: false,
|
|
944
|
+
});
|
|
945
|
+
_b.label = 2;
|
|
946
|
+
case 2: return [2 /*return*/];
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
}); };
|
|
950
|
+
var handleAuthComplete = function (title, description) {
|
|
951
|
+
setSelectedAuthMethod("");
|
|
952
|
+
setNotification({
|
|
953
|
+
title: title,
|
|
954
|
+
type: true,
|
|
955
|
+
msg: description,
|
|
956
|
+
});
|
|
957
|
+
handleDTAuthMethods();
|
|
958
|
+
};
|
|
959
|
+
//=====================================================================================
|
|
909
960
|
//SECTION: Handle Object
|
|
910
961
|
//=====================================================================================
|
|
911
962
|
var handleRemoveObjectListData = function () {
|
|
@@ -3115,7 +3166,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3115
3166
|
var _a;
|
|
3116
3167
|
var tableHeader = [];
|
|
3117
3168
|
props.model.map(function (eachAttribute) {
|
|
3118
|
-
var _a;
|
|
3119
3169
|
if (eachAttribute.id === "baseUpdatedAt" ||
|
|
3120
3170
|
eachAttribute.id === "baseDraft" ||
|
|
3121
3171
|
eachAttribute.type === "listObject" ||
|
|
@@ -3127,21 +3177,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3127
3177
|
eachAttribute.hide) {
|
|
3128
3178
|
return null;
|
|
3129
3179
|
}
|
|
3130
|
-
|
|
3131
|
-
eachAttribute.showReferenceColumnIds &&
|
|
3132
|
-
(eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.showReferenceColumnIds.length) > 0) {
|
|
3133
|
-
(_a = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.showReferenceColumnIds) === null || _a === void 0 ? void 0 : _a.map(function (eachAttributeLabel) {
|
|
3134
|
-
var _a, _b;
|
|
3135
|
-
var selectedModel = (_a = referenceModelSchema === null || referenceModelSchema === void 0 ? void 0 : referenceModelSchema[eachAttribute.id]) === null || _a === void 0 ? void 0 : _a.find(function (eachSchema) { return eachAttributeLabel === (eachSchema === null || eachSchema === void 0 ? void 0 : eachSchema.id); });
|
|
3136
|
-
if (!(selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.hide)) {
|
|
3137
|
-
tableHeader.push(__assign(__assign({}, eachAttribute), { key: "".concat(eachAttribute.id, "_").concat(eachAttributeLabel !== null && eachAttributeLabel !== void 0 ? eachAttributeLabel : ""), title: (_b = selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.name) !== null && _b !== void 0 ? _b : eachAttributeLabel }));
|
|
3138
|
-
}
|
|
3139
|
-
return null;
|
|
3140
|
-
});
|
|
3141
|
-
}
|
|
3142
|
-
else {
|
|
3143
|
-
tableHeader.push(__assign(__assign({}, eachAttribute), { key: eachAttribute.id, title: eachAttribute.name }));
|
|
3144
|
-
}
|
|
3180
|
+
tableHeader.push(__assign(__assign({}, eachAttribute), { key: eachAttribute.id, title: eachAttribute.name }));
|
|
3145
3181
|
return null;
|
|
3146
3182
|
});
|
|
3147
3183
|
if (isEditor && !((_a = props.edit) === null || _a === void 0 ? void 0 : _a.disabledUpdate))
|
|
@@ -3518,8 +3554,56 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3518
3554
|
}, __assign(__assign({}, props.organise), { additionalQuery: addQuery !== null && addQuery !== void 0 ? addQuery : (_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery, hideSearch: addQuery ? true : (_b = props.organise) === null || _b === void 0 ? void 0 : _b.hideSearch }), selectedTab, (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareListFilterAddComponent);
|
|
3519
3555
|
return filterComponent;
|
|
3520
3556
|
};
|
|
3557
|
+
var renderAuthContent = function () {
|
|
3558
|
+
var authList = [];
|
|
3559
|
+
var renderEditButton = function (type) {
|
|
3560
|
+
if (isEditor)
|
|
3561
|
+
return (react_1.default.createElement(outline_1.PencilSquareIcon, { className: "cursor-pointer ml-3 w-5 h-5 text-primary-600", onClick: function () {
|
|
3562
|
+
setSelectedAuthMethod(type);
|
|
3563
|
+
} }));
|
|
3564
|
+
return null;
|
|
3565
|
+
};
|
|
3566
|
+
Object.keys(authMethods).map(function (eachMethod) {
|
|
3567
|
+
var divClassName = "flex flex-row items-center justify-center";
|
|
3568
|
+
var iconClassName = "text-gray-600 w-6 h-6 mr-2";
|
|
3569
|
+
switch (eachMethod) {
|
|
3570
|
+
case "email":
|
|
3571
|
+
authList.push(react_1.default.createElement("div", { className: divClassName },
|
|
3572
|
+
react_1.default.createElement(solid_1.EnvelopeIcon, { className: iconClassName }),
|
|
3573
|
+
"Email : ",
|
|
3574
|
+
authMethods[eachMethod],
|
|
3575
|
+
renderEditButton(eachMethod)));
|
|
3576
|
+
break;
|
|
3577
|
+
case "google":
|
|
3578
|
+
authList.push(react_1.default.createElement("div", { className: divClassName },
|
|
3579
|
+
react_1.default.createElement(solid_1.BeakerIcon, { className: iconClassName }),
|
|
3580
|
+
"Google : ",
|
|
3581
|
+
authMethods[eachMethod],
|
|
3582
|
+
renderEditButton(eachMethod)));
|
|
3583
|
+
break;
|
|
3584
|
+
case "phone":
|
|
3585
|
+
authList.push(react_1.default.createElement("div", { className: divClassName },
|
|
3586
|
+
react_1.default.createElement(solid_1.PhoneIcon, { className: iconClassName }),
|
|
3587
|
+
"Phone : ",
|
|
3588
|
+
authMethods[eachMethod],
|
|
3589
|
+
renderEditButton(eachMethod)));
|
|
3590
|
+
break;
|
|
3591
|
+
case "disabled":
|
|
3592
|
+
authList.push(react_1.default.createElement("div", { className: divClassName },
|
|
3593
|
+
react_1.default.createElement(solid_1.BellIcon, { className: iconClassName }),
|
|
3594
|
+
"Disabled : ",
|
|
3595
|
+
authMethods[eachMethod] ? "Yes" : "No",
|
|
3596
|
+
renderEditButton(eachMethod)));
|
|
3597
|
+
break;
|
|
3598
|
+
}
|
|
3599
|
+
return null;
|
|
3600
|
+
});
|
|
3601
|
+
return (react_1.default.createElement("div", { className: "flex flex-col w-full text-sm items-start" },
|
|
3602
|
+
react_1.default.createElement("p", { className: "text-md font-bold mb-1" }, "Authenticated Via : "),
|
|
3603
|
+
authList));
|
|
3604
|
+
};
|
|
3521
3605
|
var renderContent = function () {
|
|
3522
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
3606
|
+
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;
|
|
3523
3607
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
3524
3608
|
var tabs = renderTabs();
|
|
3525
3609
|
var pages = [
|
|
@@ -3531,6 +3615,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3531
3615
|
];
|
|
3532
3616
|
switch (props.type) {
|
|
3533
3617
|
case "read":
|
|
3618
|
+
var anyAuthMethod = Object.values(authMethods).some(function (value) { return value; });
|
|
3534
3619
|
pages.push({
|
|
3535
3620
|
name: (_b = props.id) !== null && _b !== void 0 ? _b : "",
|
|
3536
3621
|
href: "#",
|
|
@@ -3540,14 +3625,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3540
3625
|
react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
|
|
3541
3626
|
dbModule: dbModule,
|
|
3542
3627
|
dbType: devSettings.server,
|
|
3543
|
-
dbCollection: props.collectionId,
|
|
3628
|
+
dbCollection: (_d = (_c = props === null || props === void 0 ? void 0 : props.space) === null || _c === void 0 ? void 0 : _c.pipelineDefaultSpaceId) !== null && _d !== void 0 ? _d : props.collectionId,
|
|
3544
3629
|
dbEndpoint: devSettings.dbEndpoint,
|
|
3545
3630
|
dbAPIToken: devSettings.dbAPIToken,
|
|
3546
3631
|
dbUserToken: devSettings.dbUserToken,
|
|
3547
3632
|
}, cond: {
|
|
3548
3633
|
type: "get",
|
|
3549
3634
|
id: props.id,
|
|
3550
|
-
|
|
3635
|
+
pipeline: pipeline,
|
|
3636
|
+
}, offline: (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError }),
|
|
3551
3637
|
!loading && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
3552
3638
|
renderBreadcrumb(pages),
|
|
3553
3639
|
react_1.default.createElement("div", null,
|
|
@@ -3556,12 +3642,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3556
3642
|
react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
|
|
3557
3643
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
3558
3644
|
!isBottom && renderActionButtons(props.type))),
|
|
3559
|
-
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: (
|
|
3560
|
-
((
|
|
3645
|
+
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: (_f = props.organise) === null || _f === void 0 ? void 0 : _f.darkMode })),
|
|
3646
|
+
((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareReadComponentPos) === "top" &&
|
|
3561
3647
|
renderBareReadComp(),
|
|
3562
|
-
|
|
3648
|
+
anyAuthMethod && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, renderAuthContent())),
|
|
3649
|
+
!((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareReadComponentHide) &&
|
|
3563
3650
|
renderTabContent(tabs, props.type, viewType),
|
|
3564
|
-
((
|
|
3651
|
+
((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareReadComponentPos) !== "top" &&
|
|
3565
3652
|
renderBareReadComp(),
|
|
3566
3653
|
isBottom && renderActionButtons(props.type, true)))));
|
|
3567
3654
|
case "update":
|
|
@@ -3578,7 +3665,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3578
3665
|
current: true,
|
|
3579
3666
|
});
|
|
3580
3667
|
var filterModel_1 = [];
|
|
3581
|
-
var disabledOnEnter_1 = (
|
|
3668
|
+
var disabledOnEnter_1 = (_l = (_k = props.organise) === null || _k === void 0 ? void 0 : _k.disabledOnEnter) !== null && _l !== void 0 ? _l : false;
|
|
3582
3669
|
props.model.map(function (eachModel) {
|
|
3583
3670
|
var _a;
|
|
3584
3671
|
var present = false;
|
|
@@ -3605,14 +3692,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3605
3692
|
props.id && props.id !== "new" && props.model.length > 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
|
|
3606
3693
|
dbModule: dbModule,
|
|
3607
3694
|
dbType: devSettings.server,
|
|
3608
|
-
dbCollection: props.collectionId,
|
|
3695
|
+
dbCollection: (_o = (_m = props === null || props === void 0 ? void 0 : props.space) === null || _m === void 0 ? void 0 : _m.pipelineDefaultSpaceId) !== null && _o !== void 0 ? _o : props.collectionId,
|
|
3609
3696
|
dbEndpoint: devSettings.dbEndpoint,
|
|
3610
3697
|
dbAPIToken: devSettings.dbAPIToken,
|
|
3611
3698
|
dbUserToken: devSettings.dbUserToken,
|
|
3612
3699
|
}, cond: {
|
|
3613
3700
|
type: "get",
|
|
3614
3701
|
id: props.id,
|
|
3615
|
-
|
|
3702
|
+
pipeline: pipeline,
|
|
3703
|
+
}, offline: (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
|
|
3616
3704
|
renderBreadcrumb(pages),
|
|
3617
3705
|
react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
|
|
3618
3706
|
react_1.default.createElement("div", { className: "flex flex-col w-full" },
|
|
@@ -3621,8 +3709,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3621
3709
|
!isBottom && renderActionButtons(props.type)),
|
|
3622
3710
|
react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " gap-6 mt-6"), ref: formRef, refList: modalFormInputRefs, handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1 },
|
|
3623
3711
|
renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
|
|
3624
|
-
((
|
|
3625
|
-
((
|
|
3712
|
+
((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareUpdateComponent) &&
|
|
3713
|
+
((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareUpdateComponent(selectedData))),
|
|
3626
3714
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
|
|
3627
3715
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
|
|
3628
3716
|
isBottom && renderActionButtons(props.type, true)));
|
|
@@ -3633,12 +3721,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3633
3721
|
var rqHOCComp = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
3634
3722
|
dbModule: dbModule,
|
|
3635
3723
|
dbType: devSettings.server,
|
|
3636
|
-
dbCollection: props.collectionId,
|
|
3724
|
+
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,
|
|
3637
3725
|
dbEndpoint: devSettings.dbEndpoint,
|
|
3638
3726
|
dbAPIToken: devSettings.dbAPIToken,
|
|
3639
3727
|
dbUserToken: devSettings.dbUserToken,
|
|
3640
|
-
}, cond: handleReadQueryHocCond(), offline: (
|
|
3641
|
-
if ((
|
|
3728
|
+
}, cond: handleReadQueryHocCond(), offline: (_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareOffline, onChangeData: handleGetListData, onError: handleGetItemError }));
|
|
3729
|
+
if ((_v = props.renderSettings) === null || _v === void 0 ? void 0 : _v.renderListUI) {
|
|
3642
3730
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
3643
3731
|
rqHOCComp,
|
|
3644
3732
|
props.renderSettings.renderListUI(actionComponent, filterComponent, dataComponent)));
|
|
@@ -3650,7 +3738,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3650
3738
|
react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
|
|
3651
3739
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
3652
3740
|
react_1.default.createElement("div", { className: "grow" }),
|
|
3653
|
-
!((
|
|
3741
|
+
!((_w = props.organise) === null || _w === void 0 ? void 0 : _w.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterComponent)),
|
|
3654
3742
|
react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" },
|
|
3655
3743
|
schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
3656
3744
|
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 () {
|
|
@@ -3675,16 +3763,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3675
3763
|
});
|
|
3676
3764
|
}, bgColor: "bg-white" }))),
|
|
3677
3765
|
!isBottom && renderActionButtons(props.type),
|
|
3678
|
-
(schemaPresent || ((
|
|
3766
|
+
(schemaPresent || ((_x = props.organise) === null || _x === void 0 ? void 0 : _x.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
|
|
3679
3767
|
//TODO: Bug - Crash on Next Js
|
|
3680
3768
|
// <Menu.Item>
|
|
3681
3769
|
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)
|
|
3682
3770
|
// </Menu.Item>
|
|
3683
3771
|
); })), lib: {
|
|
3684
|
-
Transition: (
|
|
3772
|
+
Transition: (_y = props === null || props === void 0 ? void 0 : props.lib) === null || _y === void 0 ? void 0 : _y.Transition,
|
|
3685
3773
|
} })))),
|
|
3686
|
-
((
|
|
3687
|
-
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: (
|
|
3774
|
+
((_z = props.organise) === null || _z === void 0 ? void 0 : _z.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" }, filterComponent.map(function (item, index) { return (react_1.default.createElement("div", { key: index, className: "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item)); }))),
|
|
3775
|
+
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkMode })),
|
|
3688
3776
|
renderTabContent(tabs, props.type, viewType),
|
|
3689
3777
|
isBottom && renderActionButtons(props.type, true)));
|
|
3690
3778
|
default:
|
|
@@ -3919,8 +4007,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3919
4007
|
});
|
|
3920
4008
|
return tabs;
|
|
3921
4009
|
};
|
|
4010
|
+
var renderAddMathColumn = function (id, onClose) {
|
|
4011
|
+
var _a, _b, _c;
|
|
4012
|
+
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 }));
|
|
4013
|
+
};
|
|
3922
4014
|
var renderTabContent = function (tabs, dataType, viewType) {
|
|
3923
|
-
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;
|
|
4015
|
+
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;
|
|
3924
4016
|
var selectedTabData = tabs.find(function (eachTab) {
|
|
3925
4017
|
if (eachTab.id === viewType) {
|
|
3926
4018
|
return eachTab;
|
|
@@ -3959,14 +4051,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3959
4051
|
var _a, _b;
|
|
3960
4052
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
3961
4053
|
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, className: "mt-5", lib: { axios: (_j = props.lib) === null || _j === void 0 ? void 0 : _j.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.fixedPagination, advSettings: {
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4054
|
+
addColumnEnabled: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.addColumnEnabled,
|
|
4055
|
+
renderAddColumnElements: renderAddMathColumn,
|
|
4056
|
+
dragEnabled: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.advDragEnabled,
|
|
4057
|
+
sortEnabled: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.advSortEnabled,
|
|
4058
|
+
filterEnabled: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.advFilterEnabled,
|
|
4059
|
+
sortId: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.sort,
|
|
4060
|
+
sortOptions: (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.renderReferenceLabelOptions) === null || _s === void 0 ? void 0 : _s.call(_r),
|
|
4061
|
+
onSortColumn: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeSort,
|
|
4062
|
+
onDragColumn: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.onChangeDrag,
|
|
4063
|
+
filterOptions: (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.additionalQuery) === null || _w === void 0 ? void 0 : _w.map(function (eachQuery) {
|
|
3970
4064
|
var _a;
|
|
3971
4065
|
return {
|
|
3972
4066
|
key: eachQuery.value,
|
|
@@ -3983,7 +4077,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3983
4077
|
return renderSearchContent(newQuery);
|
|
3984
4078
|
},
|
|
3985
4079
|
}, editable: {
|
|
3986
|
-
active: ((
|
|
4080
|
+
active: ((_x = props.edit) === null || _x === void 0 ? void 0 : _x.listEditable) && !props.edit.disabledUpdate
|
|
3987
4081
|
? true
|
|
3988
4082
|
: false,
|
|
3989
4083
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -3997,7 +4091,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3997
4091
|
});
|
|
3998
4092
|
}); },
|
|
3999
4093
|
}, addable: {
|
|
4000
|
-
active: ((
|
|
4094
|
+
active: ((_y = props.edit) === null || _y === void 0 ? void 0 : _y.listAddable) ? true : false,
|
|
4001
4095
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4002
4096
|
return __generator(this, function (_a) {
|
|
4003
4097
|
switch (_a.label) {
|
|
@@ -4008,46 +4102,46 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4008
4102
|
}
|
|
4009
4103
|
});
|
|
4010
4104
|
}); },
|
|
4011
|
-
}, darkMode: (
|
|
4105
|
+
}, darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode, hidePagination: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.hidePagination }));
|
|
4012
4106
|
}
|
|
4013
4107
|
else if (dataType === "read") {
|
|
4014
4108
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4015
|
-
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 && ((
|
|
4109
|
+
react_1.default.createElement(detailList_1.DetailList, { model: props.model, referenceModel: referenceModelSchema, className: "mt-5 bg-white rounded-md", title: "General Details", list: renderDetailListData(props.model), handleReferenceLink: !schemaPresent && ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareReadReferenceView)
|
|
4016
4110
|
? props.bareSettings.bareReadReferenceView
|
|
4017
|
-
: undefined, splitView: (
|
|
4111
|
+
: undefined, splitView: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.splitView }),
|
|
4018
4112
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(dataType)),
|
|
4019
4113
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(dataType))));
|
|
4020
4114
|
}
|
|
4021
4115
|
}
|
|
4022
4116
|
else if (selectedTabData) {
|
|
4023
|
-
if ((
|
|
4117
|
+
if ((_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListComponent) {
|
|
4024
4118
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4025
4119
|
props.bareSettings.bareListComponent(tableData, spaceTableData, tableLoading, pageIndex),
|
|
4026
|
-
!((
|
|
4120
|
+
!((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: handlePagination, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode }))));
|
|
4027
4121
|
}
|
|
4028
4122
|
else if (selectedTabData.viewType === "iframe") {
|
|
4029
|
-
return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (
|
|
4123
|
+
return (react_1.default.createElement("iframe", { id: "blixify-iframe", className: "w-full mt-5", style: { height: "70vh" }, src: (_6 = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.iframeSrc) !== null && _6 !== void 0 ? _6 : "", title: (_7 = selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.id) !== null && _7 !== void 0 ? _7 : "", onLoad: props.onLoadIframe }));
|
|
4030
4124
|
}
|
|
4031
4125
|
else if (selectedTabData.viewType === "list") {
|
|
4032
4126
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4033
4127
|
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" },
|
|
4034
|
-
selectedIds.length > 0 && !((
|
|
4128
|
+
selectedIds.length > 0 && !((_8 = props.edit) === null || _8 === void 0 ? void 0 : _8.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4035
4129
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
4036
4130
|
handleBatchDraftData();
|
|
4037
4131
|
} }),
|
|
4038
4132
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
4039
4133
|
handleCloneSelectedData();
|
|
4040
4134
|
} }))),
|
|
4041
|
-
((
|
|
4135
|
+
((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
4042
4136
|
handleGenerateDeletePasscode();
|
|
4043
4137
|
setDeleteModal(true);
|
|
4044
4138
|
} })),
|
|
4045
|
-
!isFirebase && !((
|
|
4139
|
+
!isFirebase && !((_10 = props.edit) === null || _10 === void 0 ? void 0 : _10.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
4046
4140
|
setBatchUpdateModal(true);
|
|
4047
4141
|
} }))), onClickRow: function (id) {
|
|
4048
4142
|
var _a, _b;
|
|
4049
4143
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4050
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, className: "mt-5", hidePagination: (
|
|
4144
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, className: "mt-5", hidePagination: (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.hidePagination })));
|
|
4051
4145
|
}
|
|
4052
4146
|
else if (selectedTabData.viewType === "grid") {
|
|
4053
4147
|
var isGridScroll = renderCheckGridScroll();
|
|
@@ -4055,7 +4149,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4055
4149
|
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) {
|
|
4056
4150
|
var _a, _b;
|
|
4057
4151
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4058
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, gridColClassName: (
|
|
4152
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: handlePagination, gridColClassName: (_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareListGridColClassName, className: "mt-5", hidePagination: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.hidePagination })));
|
|
4059
4153
|
}
|
|
4060
4154
|
else if (selectedTabData.viewType === "calendar") {
|
|
4061
4155
|
var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
|
|
@@ -4149,7 +4243,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4149
4243
|
}
|
|
4150
4244
|
return eventAvailabilities;
|
|
4151
4245
|
};
|
|
4152
|
-
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: (
|
|
4246
|
+
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_14 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _14 !== void 0 ? _14 : calendarView, handleMonthChange: function (date) {
|
|
4153
4247
|
var startOfMonth = (0, moment_1.default)(calendarTabMonth).startOf("month");
|
|
4154
4248
|
var endOfMonth = (0, moment_1.default)(calendarTabMonth).endOf("month");
|
|
4155
4249
|
if (!(0, moment_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
|
|
@@ -4165,7 +4259,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4165
4259
|
else if (selectedTabData.viewType === "feeds") {
|
|
4166
4260
|
var contentList_1 = [];
|
|
4167
4261
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
4168
|
-
var customFeedsData = (
|
|
4262
|
+
var customFeedsData = (_15 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _15 === void 0 ? void 0 : _15.call(feedsSettings_1, tableData, spaceTableData);
|
|
4169
4263
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
4170
4264
|
customFeedsData.map(function (eachData) {
|
|
4171
4265
|
var _a, _b, _c, _d;
|
|
@@ -4206,9 +4300,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4206
4300
|
});
|
|
4207
4301
|
}
|
|
4208
4302
|
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" },
|
|
4209
|
-
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (
|
|
4303
|
+
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.darkMode }),
|
|
4210
4304
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
4211
|
-
contentList_1.length > 0 && !((
|
|
4305
|
+
contentList_1.length > 0 && !((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: isFirebase ? "cursor" : "page", handleUpdatePageIndex: handlePagination, darkMode: (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.darkMode }))))));
|
|
4212
4306
|
}
|
|
4213
4307
|
else if (selectedTabData.viewType === "map") {
|
|
4214
4308
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -4307,7 +4401,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4307
4401
|
}
|
|
4308
4402
|
else if (selectedTabData.viewType === "kanban") {
|
|
4309
4403
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
4310
|
-
var kanbanTitle_2 = (
|
|
4404
|
+
var kanbanTitle_2 = (_19 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _19 !== void 0 ? _19 : "";
|
|
4311
4405
|
var nullColumn_1 = false;
|
|
4312
4406
|
var groupBy_1 = [];
|
|
4313
4407
|
var groupLabel_1 = [];
|
|
@@ -4349,6 +4443,155 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4349
4443
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
4350
4444
|
} }));
|
|
4351
4445
|
}
|
|
4446
|
+
// else if (selectedTabData.viewType === "report") {
|
|
4447
|
+
// return (
|
|
4448
|
+
// <Table
|
|
4449
|
+
// showId={showId}
|
|
4450
|
+
// paginationType={isFirebase ? "cursor" : "page"}
|
|
4451
|
+
// data={tableData}
|
|
4452
|
+
// spaceData={spaceTableData}
|
|
4453
|
+
// size={size}
|
|
4454
|
+
// limit={limit}
|
|
4455
|
+
// cursor={cursor}
|
|
4456
|
+
// loading={tableLoading}
|
|
4457
|
+
// checkbox={multipleSelect}
|
|
4458
|
+
// selectAll={selectAll}
|
|
4459
|
+
// selectedIds={selectedIds}
|
|
4460
|
+
// selectAllText={selectAll ? "from filter" : ""}
|
|
4461
|
+
// multiActionButton={
|
|
4462
|
+
// <div className="flex flex-row space-x-3">
|
|
4463
|
+
// {selectedIds.length > 0 &&
|
|
4464
|
+
// !props.edit?.disabledUpdate &&
|
|
4465
|
+
// !props.bareSettings?.bareHideTableExtraMultipleAction && (
|
|
4466
|
+
// <>
|
|
4467
|
+
// <TextButton
|
|
4468
|
+
// className="text-sm"
|
|
4469
|
+
// text="Change to Draft"
|
|
4470
|
+
// disable={loading}
|
|
4471
|
+
// onClick={() => {
|
|
4472
|
+
// handleBatchDraftData();
|
|
4473
|
+
// }}
|
|
4474
|
+
// />
|
|
4475
|
+
// <TextButton
|
|
4476
|
+
// className="text-sm"
|
|
4477
|
+
// text="Clone Items"
|
|
4478
|
+
// disable={loading}
|
|
4479
|
+
// onClick={() => {
|
|
4480
|
+
// handleCloneSelectedData();
|
|
4481
|
+
// }}
|
|
4482
|
+
// />
|
|
4483
|
+
// </>
|
|
4484
|
+
// )}
|
|
4485
|
+
// {props.edit?.deleteBtn && (
|
|
4486
|
+
// <TextButton
|
|
4487
|
+
// className="text-sm text-red-500 hover:text-red-600"
|
|
4488
|
+
// text="Delete"
|
|
4489
|
+
// onClick={() => {
|
|
4490
|
+
// handleGenerateDeletePasscode();
|
|
4491
|
+
// setDeleteModal(true);
|
|
4492
|
+
// }}
|
|
4493
|
+
// />
|
|
4494
|
+
// )}
|
|
4495
|
+
// {!isFirebase && !props.edit?.disableBatchUpdate && (
|
|
4496
|
+
// <TextButton
|
|
4497
|
+
// className="text-sm"
|
|
4498
|
+
// text="Update"
|
|
4499
|
+
// onClick={() => {
|
|
4500
|
+
// setBatchUpdateModal(true);
|
|
4501
|
+
// }}
|
|
4502
|
+
// />
|
|
4503
|
+
// )}
|
|
4504
|
+
// {props.bareSettings?.bareListMultipleSelectAddtionalActions &&
|
|
4505
|
+
// props.bareSettings?.bareListMultipleSelectAddtionalActions?.map(
|
|
4506
|
+
// (eachButton) => {
|
|
4507
|
+
// return (
|
|
4508
|
+
// <TextButton
|
|
4509
|
+
// className={`text-sm ${eachButton.className}`}
|
|
4510
|
+
// text={eachButton.text}
|
|
4511
|
+
// onClick={() => {
|
|
4512
|
+
// eachButton.onClick?.(
|
|
4513
|
+
// selectedIds,
|
|
4514
|
+
// selectAll,
|
|
4515
|
+
// renderImpSearchFilterConditions() ?? []
|
|
4516
|
+
// );
|
|
4517
|
+
// }}
|
|
4518
|
+
// />
|
|
4519
|
+
// );
|
|
4520
|
+
// }
|
|
4521
|
+
// )}
|
|
4522
|
+
// </div>
|
|
4523
|
+
// }
|
|
4524
|
+
// handleSelectAll={handleSelectAllPages}
|
|
4525
|
+
// handleSelectedIds={handleSelectIds}
|
|
4526
|
+
// header={renderTableHeader()}
|
|
4527
|
+
// pageIndex={pageIndex}
|
|
4528
|
+
// onClickRow={(id: string) => {
|
|
4529
|
+
// props.organise?.handleNavigate?.("read", id, "general");
|
|
4530
|
+
// }}
|
|
4531
|
+
// linkType={props.linkType}
|
|
4532
|
+
// custom={props.custom}
|
|
4533
|
+
// newTabUrl={`${props.localURLEndpoint}?data=`}
|
|
4534
|
+
// addNewTabUrl={`&type=read&collection=${props.collectionId}&view=general`}
|
|
4535
|
+
// handleUpdatePageIndex={handlePagination}
|
|
4536
|
+
// className="mt-5"
|
|
4537
|
+
// lib={{ axios: props.lib?.axios }}
|
|
4538
|
+
// devSettings={props.devSettings}
|
|
4539
|
+
// bareSettings={props.bareSettings}
|
|
4540
|
+
// fixedPagination={props.organise?.fixedPagination}
|
|
4541
|
+
// advSettings={{
|
|
4542
|
+
// addColumnEnabled: true,
|
|
4543
|
+
// renderAddColumnElements: renderAddMathColumn,
|
|
4544
|
+
// dragEnabled: props.organise?.advDragEnabled,
|
|
4545
|
+
// sortEnabled: props.organise?.advSortEnabled,
|
|
4546
|
+
// filterEnabled: props.organise?.advFilterEnabled,
|
|
4547
|
+
// sortId: props.organise?.sort,
|
|
4548
|
+
// sortOptions: props.organise?.renderReferenceLabelOptions?.(),
|
|
4549
|
+
// onSortColumn: props.organise?.onChangeSort,
|
|
4550
|
+
// onDragColumn: props.organise?.onChangeDrag,
|
|
4551
|
+
// filterOptions: props.organise?.additionalQuery?.map(
|
|
4552
|
+
// (eachQuery) => {
|
|
4553
|
+
// return {
|
|
4554
|
+
// key: eachQuery.value,
|
|
4555
|
+
// label: eachQuery.label ?? "",
|
|
4556
|
+
// };
|
|
4557
|
+
// }
|
|
4558
|
+
// ),
|
|
4559
|
+
// renderFilterElements: (id: string) => {
|
|
4560
|
+
// const selectedQuery = props.organise?.additionalQuery?.filter(
|
|
4561
|
+
// (eachQuery) => {
|
|
4562
|
+
// return eachQuery.value === id;
|
|
4563
|
+
// }
|
|
4564
|
+
// );
|
|
4565
|
+
// const selectedModelList = props.model.filter(
|
|
4566
|
+
// (eachModel) => eachModel.id === id
|
|
4567
|
+
// );
|
|
4568
|
+
// const newQuery = renderSearchAdditionalQueries(
|
|
4569
|
+
// selectedModelList,
|
|
4570
|
+
// selectedQuery
|
|
4571
|
+
// );
|
|
4572
|
+
// return renderSearchContent(newQuery);
|
|
4573
|
+
// },
|
|
4574
|
+
// }}
|
|
4575
|
+
// editable={{
|
|
4576
|
+
// active:
|
|
4577
|
+
// props.edit?.listEditable && !props.edit.disabledUpdate
|
|
4578
|
+
// ? true
|
|
4579
|
+
// : false,
|
|
4580
|
+
// onUpdateData: async (rowId, columnId, data) => {
|
|
4581
|
+
// await handleSubmitData("update", rowId, columnId, data);
|
|
4582
|
+
// },
|
|
4583
|
+
// }}
|
|
4584
|
+
// addable={{
|
|
4585
|
+
// active: props.edit?.listAddable ? true : false,
|
|
4586
|
+
// onAddData: async (data) => {
|
|
4587
|
+
// await handleSubmitData("create", "", "", data);
|
|
4588
|
+
// },
|
|
4589
|
+
// }}
|
|
4590
|
+
// darkMode={props.organise?.darkMode}
|
|
4591
|
+
// hidePagination={props.organise?.hidePagination}
|
|
4592
|
+
// />
|
|
4593
|
+
// );
|
|
4594
|
+
// }
|
|
4352
4595
|
else if (selectedTabData.renderComp) {
|
|
4353
4596
|
return react_1.default.createElement(react_1.default.Fragment, null, selectedTabData.renderComp());
|
|
4354
4597
|
}
|
|
@@ -4752,7 +4995,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4752
4995
|
};
|
|
4753
4996
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4754
4997
|
renderNotification("root"),
|
|
4755
|
-
((
|
|
4998
|
+
((_4 = (_3 = props.renderSettings) === null || _3 === void 0 ? void 0 : _3.renderLoadingUI) === null || _4 === void 0 ? void 0 : _4.call(_3)) && loading ? ((_5 = props.renderSettings) === null || _5 === void 0 ? void 0 : _5.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
4756
4999
|
var _a, _b;
|
|
4757
5000
|
if (loading)
|
|
4758
5001
|
return;
|
|
@@ -4791,6 +5034,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4791
5034
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
4792
5035
|
setBatchUpdateModal(false);
|
|
4793
5036
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
5037
|
+
react_1.default.createElement(modal_1.Modal, { title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
5038
|
+
var _a;
|
|
5039
|
+
if (props.space)
|
|
5040
|
+
return (react_1.default.createElement(authModal_1.AuthModal, { space: props.space, userId: (_a = props.id) !== null && _a !== void 0 ? _a : "", type: selectedAuthMethod, authMethods: authMethods, onComplete: handleAuthComplete }));
|
|
5041
|
+
return null;
|
|
5042
|
+
}, onClose: function () {
|
|
5043
|
+
setSelectedAuthMethod("");
|
|
5044
|
+
} }),
|
|
4794
5045
|
isActivityLog && (react_1.default.createElement(modal_1.Modal, { open: activityModal, title: "Activity Log", renderContent: function () {
|
|
4795
5046
|
var _a, _b;
|
|
4796
5047
|
return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|