blixify-ui-web 1.2.142 → 1.2.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +263 -192
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +19 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts +2 -1
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +7 -2
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +3 -1
- package/lib/components/data/listModule.js.map +1 -1
- package/package.json +1 -1
|
@@ -215,10 +215,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
215
215
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
216
216
|
// most in effect dependency arrays — following props.type there would leave
|
|
217
217
|
// the list never refetching while the panel is open, which fails silently.
|
|
218
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84
|
|
218
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84;
|
|
219
219
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
220
220
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
221
|
-
var
|
|
221
|
+
var _85 = (0, react_1.useState)(false), drawerPageView = _85[0], setDrawerPageView = _85[1];
|
|
222
222
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
223
223
|
// live props. Without this, navigating back to the list would re-render the
|
|
224
224
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -300,18 +300,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
300
300
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
301
301
|
};
|
|
302
302
|
};
|
|
303
|
-
var
|
|
303
|
+
var _86 = intialiseDefaultFilterValues(), initialFilterSearch = _86.initialFilterSearch, initialFilterSearchParams = _86.initialFilterSearchParams, initialFilterSelection = _86.initialFilterSelection, initialFilterReference = _86.initialFilterReference, initialFilterReferenceDate = _86.initialFilterReferenceDate;
|
|
304
304
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
305
|
-
var
|
|
305
|
+
var _87 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
306
306
|
mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
|
|
307
307
|
collectionId: props.collectionId,
|
|
308
308
|
persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
|
|
309
309
|
type: resolvedType,
|
|
310
|
-
}), rawPersistedState =
|
|
310
|
+
}), rawPersistedState = _87.persistedState, isPersistEnabled = _87.isEnabled, handleSaveView = _87.handleSaveView, handleRegisterViewSnapshot = _87.handleRegisterViewSnapshot;
|
|
311
311
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
312
312
|
var persistedState = (0, react_1.useMemo)(function () { return (0, viewStatePersistence_1.handlePruneStaleColumns)(rawPersistedState, props.model); }, [rawPersistedState, props.model]);
|
|
313
|
-
var
|
|
314
|
-
var
|
|
313
|
+
var _88 = (0, react_1.useState)(false), loading = _88[0], setLoading = _88[1];
|
|
314
|
+
var _89 = (0, react_1.useState)(), notification = _89[0], setNotification = _89[1];
|
|
315
315
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
316
316
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
317
317
|
(0, react_1.useEffect)(function () {
|
|
@@ -321,62 +321,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
321
321
|
return function () { return clearTimeout(timer); };
|
|
322
322
|
}, [notification]);
|
|
323
323
|
//INFO : Used by List
|
|
324
|
-
var
|
|
325
|
-
var
|
|
326
|
-
var
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
var
|
|
330
|
-
var
|
|
324
|
+
var _90 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _90[0], setFilterSearch = _90[1];
|
|
325
|
+
var _91 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _91[0], setFilterSearchParams = _91[1];
|
|
326
|
+
var _92 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _92[0], setFilterSelection = _92[1];
|
|
327
|
+
var _93 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _93[0], setFilterReference = _93[1];
|
|
328
|
+
var _94 = (0, react_1.useState)({}), filterReferenceSearch = _94[0], setFilterReferenceSearch = _94[1];
|
|
329
|
+
var _95 = (0, react_1.useState)({}), filterReferenceList = _95[0], setFilterReferenceList = _95[1];
|
|
330
|
+
var _96 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
331
331
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
332
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
333
|
-
var
|
|
334
|
-
var
|
|
335
|
-
var
|
|
336
|
-
var
|
|
337
|
-
var
|
|
332
|
+
: initialFilterReferenceDate), filterReferenceDate = _96[0], setFilterReferenceDate = _96[1];
|
|
333
|
+
var _97 = (0, react_1.useState)(true), tableLoading = _97[0], setTableLoading = _97[1];
|
|
334
|
+
var _98 = (0, react_1.useState)(""), cursor = _98[0], setCursor = _98[1];
|
|
335
|
+
var _99 = (0, react_1.useState)(""), lastCursor = _99[0], setLastCursor = _99[1];
|
|
336
|
+
var _100 = (0, react_1.useState)([]), tableData = _100[0], setTableData = _100[1];
|
|
337
|
+
var _101 = (0, react_1.useState)([]), spaceTableData = _101[0], setSpaceTableData = _101[1];
|
|
338
338
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
339
339
|
// the state it closed over can predate an earlier save on the same row
|
|
340
340
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
341
341
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
342
342
|
tableDataRef.current = tableData;
|
|
343
343
|
spaceTableDataRef.current = spaceTableData;
|
|
344
|
-
var
|
|
345
|
-
var
|
|
346
|
-
var
|
|
347
|
-
var
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
-
var
|
|
344
|
+
var _102 = (0, react_1.useState)(0), size = _102[0], setSize = _102[1];
|
|
345
|
+
var _103 = (0, react_1.useState)((_k = (_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _h !== void 0 ? _h : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.pageIndex) !== null && _k !== void 0 ? _k : 0), pageIndex = _103[0], setPageIndex = _103[1];
|
|
346
|
+
var _104 = (0, react_1.useState)([]), selectedIds = _104[0], setSelectedIds = _104[1];
|
|
347
|
+
var _105 = (0, react_1.useState)(false), selectAll = _105[0], setSelectAll = _105[1];
|
|
348
|
+
var _106 = (0, react_1.useState)(""), deletePasscode = _106[0], setDeletePasscode = _106[1];
|
|
349
|
+
var _107 = (0, react_1.useState)(""), deletePasscodeInput = _107[0], setDeletePasscodeInput = _107[1];
|
|
350
|
+
var _108 = (0, react_1.useState)(""), deleteFeedId = _108[0], setDeleteFeedId = _108[1];
|
|
351
351
|
//INFO : Used by List Organise
|
|
352
352
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
353
353
|
// persistViewState is enabled and a persisted sort exists
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var
|
|
354
|
+
var _109 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _109[0], setPersistedSort = _109[1];
|
|
355
|
+
var _110 = (0, react_1.useState)(false), filterDraft = _110[0], setFilterDraft = _110[1];
|
|
356
|
+
var _111 = (0, react_1.useState)(false), addTabModal = _111[0], setAddTabModal = _111[1];
|
|
357
357
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
358
358
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
359
|
-
var
|
|
359
|
+
var _112 = (0, react_1.useState)(function () {
|
|
360
360
|
var _a, _b;
|
|
361
361
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, 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);
|
|
362
|
-
}), selectedTab =
|
|
363
|
-
var
|
|
362
|
+
}), selectedTab = _112[0], setSelectedTab = _112[1];
|
|
363
|
+
var _113 = (0, react_1.useState)("dayGridMonth"), calendarView = _113[0], setCalendarView = _113[1];
|
|
364
364
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
365
365
|
// (calendarView above drives the matching range query)
|
|
366
|
-
var
|
|
367
|
-
var
|
|
366
|
+
var _114 = (0, react_1.useState)("month"), newCalendarViewMode = _114[0], setNewCalendarViewMode = _114[1];
|
|
367
|
+
var _115 = (0, react_1.useState)(new Date()), calendarTabMonth = _115[0], setCalendarTabMonth = _115[1];
|
|
368
368
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
369
369
|
// whenever its settings change, and that must not undo the user's switch
|
|
370
370
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
371
|
-
var
|
|
372
|
-
var
|
|
373
|
-
var
|
|
374
|
-
var
|
|
375
|
-
var
|
|
371
|
+
var _116 = (0, react_1.useState)(true), kanbanDroppable = _116[0], setKanbanDroppable = _116[1];
|
|
372
|
+
var _117 = (0, react_1.useState)([]), kanbanOptions = _117[0], setKanbanOptions = _117[1];
|
|
373
|
+
var _118 = (0, react_1.useState)(false), queryForm = _118[0], setQueryForm = _118[1];
|
|
374
|
+
var _119 = (0, react_1.useState)(false), batchUpdateModal = _119[0], setBatchUpdateModal = _119[1];
|
|
375
|
+
var _120 = (0, react_1.useState)({
|
|
376
376
|
columnId: "",
|
|
377
377
|
columnData: {},
|
|
378
|
-
}), batchUpdateData =
|
|
379
|
-
var
|
|
378
|
+
}), batchUpdateData = _120[0], setBatchUpdateData = _120[1];
|
|
379
|
+
var _121 = (0, react_1.useState)(function () {
|
|
380
380
|
var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
|
|
381
381
|
if (!persistedState)
|
|
382
382
|
return baseModel;
|
|
@@ -402,8 +402,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
404
|
return model;
|
|
405
|
-
}), structure =
|
|
406
|
-
var
|
|
405
|
+
}), structure = _121[0], setStructure = _121[1];
|
|
406
|
+
var _122 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _122[0], setAdditionalQuery = _122[1];
|
|
407
407
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
408
408
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
409
409
|
var defaultFlexFilterRow = [
|
|
@@ -414,9 +414,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
414
414
|
value: undefined,
|
|
415
415
|
},
|
|
416
416
|
];
|
|
417
|
-
var
|
|
417
|
+
var _123 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
418
418
|
? persistedState.flexFilters
|
|
419
|
-
: defaultFlexFilterRow), flexFilters =
|
|
419
|
+
: defaultFlexFilterRow), flexFilters = _123[0], setFlexFilters = _123[1];
|
|
420
420
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
421
421
|
// clear methods so chained calls in one tick aren't stale.
|
|
422
422
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -429,109 +429,109 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
429
429
|
}, [flexFilters]);
|
|
430
430
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
431
431
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
432
|
-
var
|
|
432
|
+
var _124 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
433
433
|
? persistedState.flexFilters
|
|
434
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
438
|
-
var
|
|
434
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _124[0], setFlexFiltersDebounced = _124[1];
|
|
435
|
+
var _125 = (0, react_1.useState)({}), flexFilterReferenceOptions = _125[0], setFlexFilterReferenceOptions = _125[1];
|
|
436
|
+
var _126 = (0, react_1.useState)({}), flexFilterReferenceSearch = _126[0], setFlexFilterReferenceSearch = _126[1];
|
|
437
|
+
var _127 = (0, react_1.useState)(false), flexFilterModalOpen = _127[0], setFlexFilterModalOpen = _127[1];
|
|
438
|
+
var _128 = (0, react_1.useState)(false), viewSettingsModalOpen = _128[0], setViewSettingsModalOpen = _128[1];
|
|
439
439
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
440
440
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
441
441
|
// structure to props.model whenever props change, which would wipe the
|
|
442
442
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
443
443
|
// structure — writing user hides there would blur the two concepts.
|
|
444
|
-
var
|
|
445
|
-
var
|
|
446
|
-
var
|
|
447
|
-
var
|
|
444
|
+
var _129 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _129[0], setUserHiddenColumnIds = _129[1];
|
|
445
|
+
var _130 = (0, react_1.useState)(""), columnSearch = _130[0], setColumnSearch = _130[1];
|
|
446
|
+
var _131 = (0, react_1.useState)([]), savedViews = _131[0], setSavedViews = _131[1];
|
|
447
|
+
var _132 = (0, react_1.useState)(null), activeSavedViewId = _132[0], setActiveSavedViewId = _132[1];
|
|
448
448
|
// INFO: null while the name box is closed
|
|
449
|
-
var
|
|
450
|
-
var
|
|
451
|
-
var
|
|
449
|
+
var _133 = (0, react_1.useState)(null), savedViewName = _133[0], setSavedViewName = _133[1];
|
|
450
|
+
var _134 = (0, react_1.useState)(null), deletingSavedViewId = _134[0], setDeletingSavedViewId = _134[1];
|
|
451
|
+
var _135 = (0, react_1.useState)(null), draggingColumnId = _135[0], setDraggingColumnId = _135[1];
|
|
452
452
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
453
453
|
//INFO : Used by Auth
|
|
454
|
-
var
|
|
454
|
+
var _136 = (0, react_1.useState)({
|
|
455
455
|
email: "",
|
|
456
456
|
google: "",
|
|
457
457
|
phone: "",
|
|
458
458
|
disabled: false,
|
|
459
459
|
create: false,
|
|
460
|
-
}), authMethods =
|
|
461
|
-
var
|
|
460
|
+
}), authMethods = _136[0], setAuthMethods = _136[1];
|
|
461
|
+
var _137 = (0, react_1.useState)(""), selectedAuthMethod = _137[0], setSelectedAuthMethod = _137[1];
|
|
462
462
|
// INFO: Used by Activity Log
|
|
463
|
-
var
|
|
464
|
-
var
|
|
463
|
+
var _138 = (0, react_1.useState)(false), activityModal = _138[0], setActivityModal = _138[1];
|
|
464
|
+
var _139 = (0, react_1.useState)(""), activityId = _139[0], setActivityId = _139[1];
|
|
465
465
|
//INFO : Used by Export
|
|
466
|
-
var
|
|
467
|
-
var
|
|
468
|
-
var
|
|
469
|
-
var
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
-
var
|
|
474
|
-
var
|
|
475
|
-
var
|
|
476
|
-
var
|
|
477
|
-
var
|
|
478
|
-
var
|
|
479
|
-
var
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
var
|
|
483
|
-
var
|
|
484
|
-
var
|
|
466
|
+
var _140 = (0, react_1.useState)(null), csvFile = _140[0], setCSVFile = _140[1];
|
|
467
|
+
var _141 = (0, react_1.useState)([]), csvFileData = _141[0], setCSVFileData = _141[1];
|
|
468
|
+
var _142 = (0, react_1.useState)(0), stepCSVIndex = _142[0], setStepCSVIndex = _142[1];
|
|
469
|
+
var _143 = (0, react_1.useState)({}), listCSVMapAttribute = _143[0], setListCSVMapAttribute = _143[1];
|
|
470
|
+
var _144 = (0, react_1.useState)({}), listCSVObjAttribute = _144[0], setListCSVObjAttribute = _144[1];
|
|
471
|
+
var _145 = (0, react_1.useState)([]), csvAPIAttribute = _145[0], setCSVAPIAttribute = _145[1];
|
|
472
|
+
var _146 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _146[0], setExportCSVEmail = _146[1];
|
|
473
|
+
var _147 = (0, react_1.useState)(((_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.defaultExportPDFName) || ""), exportPDFTitle = _147[0], setExportPDFTitle = _147[1];
|
|
474
|
+
var _148 = (0, react_1.useState)(false), exportPDFLoading = _148[0], setExportPDFLoading = _148[1];
|
|
475
|
+
var _149 = (0, react_1.useState)(false), exportReadPDFLoading = _149[0], setExportReadPDFLoading = _149[1];
|
|
476
|
+
var _150 = (0, react_1.useState)((_u = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.sumColumnId) !== null && _u !== void 0 ? _u : []), exportSumAttributeIds = _150[0], setExportSumAttributeIds = _150[1];
|
|
477
|
+
var _151 = (0, react_1.useState)((_x = (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.hideSubItems) !== null && _x !== void 0 ? _x : false), hideSubItems = _151[0], setHideSubItems = _151[1];
|
|
478
|
+
var _152 = (0, react_1.useState)([]), importTableData = _152[0], setImportTableData = _152[1];
|
|
479
|
+
var _153 = (0, react_1.useState)([]), queryList = _153[0], setQueryList = _153[1];
|
|
480
|
+
var _154 = (0, react_1.useState)(undefined), allQueryList = _154[0], setAllQueryList = _154[1];
|
|
481
|
+
var _155 = (0, react_1.useState)(-1), queryIndex = _155[0], setQueryIndex = _155[1];
|
|
482
|
+
var _156 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _156[0], setGroupId = _156[1];
|
|
483
|
+
var _157 = (0, react_1.useState)(""), readTabSection = _157[0], setReadTabSection = _157[1];
|
|
484
|
+
var _158 = (0, react_1.useState)(false), readFloatingNav = _158[0], setReadFloatingNav = _158[1];
|
|
485
485
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
486
486
|
//INFO : Used by Read
|
|
487
487
|
//INFO : Used by Update
|
|
488
|
-
var
|
|
489
|
-
var
|
|
490
|
-
var
|
|
491
|
-
var
|
|
492
|
-
var
|
|
493
|
-
var
|
|
494
|
-
var
|
|
488
|
+
var _159 = (0, react_1.useState)(false), modalVisible = _159[0], setModalVisible = _159[1];
|
|
489
|
+
var _160 = (0, react_1.useState)(false), deleteModal = _160[0], setDeleteModal = _160[1];
|
|
490
|
+
var _161 = (0, react_1.useState)(false), excelModal = _161[0], setExcelModal = _161[1];
|
|
491
|
+
var _162 = (0, react_1.useState)(false), exportExcel = _162[0], setExportExcel = _162[1];
|
|
492
|
+
var _163 = (0, react_1.useState)(""), exportType = _163[0], setExportType = _163[1];
|
|
493
|
+
var _164 = (0, react_1.useState)(false), exportQR = _164[0], setExportQR = _164[1];
|
|
494
|
+
var _165 = (0, react_1.useState)(function () {
|
|
495
495
|
var _a, _b;
|
|
496
496
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
497
497
|
return firstTabId;
|
|
498
|
-
}), activeTab =
|
|
499
|
-
var
|
|
500
|
-
var
|
|
501
|
-
var
|
|
502
|
-
var
|
|
503
|
-
var
|
|
504
|
-
var
|
|
505
|
-
var
|
|
498
|
+
}), activeTab = _165[0], setActiveTab = _165[1];
|
|
499
|
+
var _166 = (0, react_1.useState)(false), signatureSigning = _166[0], setSignatureSigning = _166[1];
|
|
500
|
+
var _167 = (0, react_1.useState)({}), selectedData = _167[0], setSelectedData = _167[1];
|
|
501
|
+
var _168 = (0, react_1.useState)(""), selectedObjectStructureId = _168[0], setSelectedObjectStructureId = _168[1];
|
|
502
|
+
var _169 = (0, react_1.useState)(""), selectedObjectId = _169[0], setSelectedObjectId = _169[1];
|
|
503
|
+
var _170 = (0, react_1.useState)(""), selectedListAddressId = _170[0], setSelectedListAddressId = _170[1];
|
|
504
|
+
var _171 = (0, react_1.useState)(-1), selectedListAddressIndex = _171[0], setSelectedListAddressIndex = _171[1];
|
|
505
|
+
var _172 = (0, react_1.useState)({
|
|
506
506
|
lat: 0,
|
|
507
507
|
lng: 0,
|
|
508
508
|
name: "",
|
|
509
|
-
}), selectedListAddress =
|
|
510
|
-
var
|
|
511
|
-
var
|
|
512
|
-
var
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
518
|
-
var
|
|
509
|
+
}), selectedListAddress = _172[0], setSelectedListAddress = _172[1];
|
|
510
|
+
var _173 = (0, react_1.useState)({}), selectedObjectData = _173[0], setSelectedObjectData = _173[1];
|
|
511
|
+
var _174 = (0, react_1.useState)(null), objectCellEdit = _174[0], setObjectCellEdit = _174[1];
|
|
512
|
+
var _175 = (0, react_1.useState)(false), referenceLoading = _175[0], setReferenceLoading = _175[1];
|
|
513
|
+
var _176 = (0, react_1.useState)({}), referencesOptions = _176[0], setReferencesOptions = _176[1];
|
|
514
|
+
var _177 = (0, react_1.useState)({}), referencesDetails = _177[0], setReferencesDetails = _177[1];
|
|
515
|
+
var _178 = (0, react_1.useState)({}), listReferencesOptions = _178[0], setListReferencesOptions = _178[1];
|
|
516
|
+
var _179 = (0, react_1.useState)({}), referenceDeleteTableData = _179[0], setReferenceDeleteTableData = _179[1];
|
|
517
|
+
var _180 = (0, react_1.useState)(0), referenceDeleteIndex = _180[0], setReferenceDeleteIndex = _180[1];
|
|
518
|
+
var _181 = (0, react_1.useState)({
|
|
519
519
|
id: "",
|
|
520
520
|
name: "",
|
|
521
521
|
type: "string",
|
|
522
|
-
}), referenceCreationModal =
|
|
523
|
-
var
|
|
524
|
-
var
|
|
522
|
+
}), referenceCreationModal = _181[0], setReferenceCreationModal = _181[1];
|
|
523
|
+
var _182 = (0, react_1.useState)({}), referenceModelSchema = _182[0], setReferenceSchema = _182[1];
|
|
524
|
+
var _183 = (0, react_1.useState)([]), kanbanChecked = _183[0], setKanbanChecked = _183[1];
|
|
525
525
|
//INFO : Offline
|
|
526
|
-
var
|
|
527
|
-
var
|
|
526
|
+
var _184 = (0, react_1.useState)(0), offlineDataLength = _184[0], setOfflineDataLength = _184[1];
|
|
527
|
+
var _185 = (0, react_1.useState)(false), offlineModal = _185[0], setOfflineModal = _185[1];
|
|
528
528
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
529
|
-
var
|
|
530
|
-
var
|
|
529
|
+
var _186 = (0, react_1.useState)(false), isLive = _186[0], setIsLive = _186[1];
|
|
530
|
+
var _187 = (0, react_1.useState)(false), isLiveOffline = _187[0], setIsLiveOffline = _187[1];
|
|
531
531
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
532
532
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
533
533
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
534
|
-
var
|
|
534
|
+
var _188 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _188[0], setIsNetworkOffline = _188[1];
|
|
535
535
|
var previousType = (0, react_1.useRef)(null);
|
|
536
536
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
537
537
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -663,7 +663,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
663
663
|
var isSchemaHideMode = ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.onChangeHide) ? true : false;
|
|
664
664
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
665
665
|
// the persisted value and falls back to the consumer's limit
|
|
666
|
-
var
|
|
666
|
+
var _189 = (0, react_1.useState)((_10 = (_9 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _9 !== void 0 ? _9 : props.limit) !== null && _10 !== void 0 ? _10 : 10), pageLimit = _189[0], setPageLimit = _189[1];
|
|
667
667
|
var limit = pageLimit;
|
|
668
668
|
var isSavedViewsEnabled = !!((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.savedViews) && resolvedType === "list";
|
|
669
669
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
@@ -675,7 +675,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
675
675
|
setPersistedSort(value);
|
|
676
676
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
677
677
|
};
|
|
678
|
-
var
|
|
678
|
+
var _190 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _190.canUpdateRecord, canInlineUpdate = _190.canInlineUpdate, canBatchUpdate = _190.canBatchUpdate, canDeleteRecord = _190.canDeleteRecord;
|
|
679
679
|
var isEditor = ((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.allEditable) ? true : false;
|
|
680
680
|
var isOffline = (_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareOffline;
|
|
681
681
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -711,17 +711,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
711
711
|
((_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.activityLog.commentCollectionId)) ||
|
|
712
712
|
(((_32 = (_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.activityLog) === null || _32 === void 0 ? void 0 : _32.enableLogs) &&
|
|
713
713
|
((_33 = props.edit) === null || _33 === void 0 ? void 0 : _33.activityLog.logsCollectionId));
|
|
714
|
-
var
|
|
715
|
-
var activityTitleColumn = (_43 = (_41 = (_39 = (_37 = (_36 = (_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.activityLog) === null || _36 === void 0 ? void 0 : _36.recordTitleColumn) !== null && _37 !== void 0 ? _37 : (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.breadcrumbAttributeId) !== null && _39 !== void 0 ? _39 : (_40 = structure.find(function (column) { return column.id === "title" || column.id === "name"; })) === null || _40 === void 0 ? void 0 : _40.id) !== null && _41 !== void 0 ? _41 : (_42 = structure.find(function (column) { return column.type === "string"; })) === null || _42 === void 0 ? void 0 : _42.id) !== null && _43 !== void 0 ? _43 : "title";
|
|
716
|
-
var activityRecord = resolvedType === "read" ? selectedData :
|
|
717
|
-
tableData.find(function (record) { var _a; return ((_a = record._id) !== null && _a !== void 0 ? _a : record.id) === activityRecordId; });
|
|
718
|
-
var activityRecordTitle = (_44 = activityRecord === null || activityRecord === void 0 ? void 0 : activityRecord[activityTitleColumn]) !== null && _44 !== void 0 ? _44 : activityRecordId;
|
|
719
|
-
var customPaginationSize = ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.customPaginationCount)
|
|
714
|
+
var customPaginationSize = ((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.customPaginationCount)
|
|
720
715
|
? props.organise.customPaginationCount(size)
|
|
721
716
|
: undefined;
|
|
722
717
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
723
718
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
724
|
-
dbModule: (
|
|
719
|
+
dbModule: (_35 = props.lib) === null || _35 === void 0 ? void 0 : _35.axios,
|
|
725
720
|
dbType: devSettings.server,
|
|
726
721
|
dbCollection: props.collectionId,
|
|
727
722
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -729,7 +724,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
729
724
|
dbUserToken: devSettings.dbUserToken,
|
|
730
725
|
});
|
|
731
726
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
732
|
-
dbModule: (
|
|
727
|
+
dbModule: (_36 = props.lib) === null || _36 === void 0 ? void 0 : _36.axios,
|
|
733
728
|
dbType: devSettings.server,
|
|
734
729
|
dbCollection: props.collectionId,
|
|
735
730
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -737,9 +732,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
737
732
|
dbUserToken: devSettings.dbUserToken,
|
|
738
733
|
});
|
|
739
734
|
var moreButtonPopUp = [
|
|
740
|
-
((
|
|
735
|
+
((_37 = props.edit) === null || _37 === void 0 ? void 0 : _37.allEditable) &&
|
|
741
736
|
!isFirebase &&
|
|
742
|
-
!((
|
|
737
|
+
!((_39 = (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.exportSettings) === null || _39 === void 0 ? void 0 : _39.hideImportCSV)
|
|
743
738
|
? {
|
|
744
739
|
text: "Import Excel",
|
|
745
740
|
onClick: function () {
|
|
@@ -748,7 +743,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
748
743
|
},
|
|
749
744
|
}
|
|
750
745
|
: null,
|
|
751
|
-
!((
|
|
746
|
+
!((_41 = (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.exportSettings) === null || _41 === void 0 ? void 0 : _41.hideExportCSV)
|
|
752
747
|
? {
|
|
753
748
|
text: "Export CSV",
|
|
754
749
|
onClick: function () {
|
|
@@ -758,7 +753,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
758
753
|
},
|
|
759
754
|
}
|
|
760
755
|
: null,
|
|
761
|
-
!((
|
|
756
|
+
!((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.exportSettings) === null || _43 === void 0 ? void 0 : _43.hideExportExcel)
|
|
762
757
|
? {
|
|
763
758
|
text: "Export Excel",
|
|
764
759
|
onClick: function () {
|
|
@@ -768,7 +763,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
768
763
|
},
|
|
769
764
|
}
|
|
770
765
|
: null,
|
|
771
|
-
!((
|
|
766
|
+
!((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.exportSettings) === null || _45 === void 0 ? void 0 : _45.hideExportPDF)
|
|
772
767
|
? {
|
|
773
768
|
text: "Export PDF",
|
|
774
769
|
onClick: function () {
|
|
@@ -778,7 +773,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
778
773
|
},
|
|
779
774
|
}
|
|
780
775
|
: null,
|
|
781
|
-
!((
|
|
776
|
+
!((_47 = (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.exportSettings) === null || _47 === void 0 ? void 0 : _47.hideExportQR)
|
|
782
777
|
? {
|
|
783
778
|
text: "Export QR",
|
|
784
779
|
onClick: function () {
|
|
@@ -788,7 +783,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
788
783
|
},
|
|
789
784
|
}
|
|
790
785
|
: null,
|
|
791
|
-
!((
|
|
786
|
+
!((_49 = (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.exportSettings) === null || _49 === void 0 ? void 0 : _49.hideExportQR)
|
|
792
787
|
? {
|
|
793
788
|
text: "Export QR(Data)",
|
|
794
789
|
onClick: function () {
|
|
@@ -798,7 +793,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
798
793
|
},
|
|
799
794
|
}
|
|
800
795
|
: null,
|
|
801
|
-
!((
|
|
796
|
+
!((_51 = (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.exportSettings) === null || _51 === void 0 ? void 0 : _51.hideExportPrint)
|
|
802
797
|
? {
|
|
803
798
|
text: "Print",
|
|
804
799
|
onClick: function () {
|
|
@@ -808,7 +803,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
808
803
|
},
|
|
809
804
|
}
|
|
810
805
|
: null,
|
|
811
|
-
!((
|
|
806
|
+
!((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.exportSettings) === null || _53 === void 0 ? void 0 : _53.hideExportDraft)
|
|
812
807
|
? {
|
|
813
808
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
814
809
|
onClick: function () {
|
|
@@ -817,7 +812,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
817
812
|
}
|
|
818
813
|
: null,
|
|
819
814
|
].filter(Boolean);
|
|
820
|
-
if ((
|
|
815
|
+
if ((_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.moreSettings)
|
|
821
816
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
822
817
|
//=====================================================================================
|
|
823
818
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1128,7 +1123,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1128
1123
|
//=====================================================================================
|
|
1129
1124
|
//SECTION: Saved Views
|
|
1130
1125
|
//=====================================================================================
|
|
1131
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1126
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.persistKey, (_56 = devSettings.currentUser) === null || _56 === void 0 ? void 0 : _56.userEmail);
|
|
1132
1127
|
(0, react_1.useEffect)(function () {
|
|
1133
1128
|
if (isSavedViewsEnabled)
|
|
1134
1129
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
@@ -1170,7 +1165,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1170
1165
|
})
|
|
1171
1166
|
.filter(function (eachView) { return eachView.tabId === viewType; }), true), savedViews.filter(function (eachView) { return eachView.tabId === viewType; }), true);
|
|
1172
1167
|
};
|
|
1173
|
-
var defaultSavedViewIds = ((
|
|
1168
|
+
var defaultSavedViewIds = ((_58 = (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.defaultSavedViews) !== null && _58 !== void 0 ? _58 : [])
|
|
1174
1169
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1175
1170
|
.join("|");
|
|
1176
1171
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1377,7 +1372,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1377
1372
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
1378
1373
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
1379
1374
|
/* eslint-disable */
|
|
1380
|
-
}, [props.collectionId, (
|
|
1375
|
+
}, [props.collectionId, (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.persistKey]);
|
|
1381
1376
|
/* eslint-enable */
|
|
1382
1377
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
1383
1378
|
(0, react_1.useEffect)(function () {
|
|
@@ -1412,7 +1407,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1412
1407
|
(0, react_1.useEffect)(function () {
|
|
1413
1408
|
handleOfflinePrefetch();
|
|
1414
1409
|
/* eslint-disable */
|
|
1415
|
-
}, [props.collectionId, (
|
|
1410
|
+
}, [props.collectionId, (_60 = props.bareSettings) === null || _60 === void 0 ? void 0 : _60.bareOffline]);
|
|
1416
1411
|
/* eslint-enable */
|
|
1417
1412
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
1418
1413
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -1432,7 +1427,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1432
1427
|
}, interval);
|
|
1433
1428
|
return function () { return clearInterval(timer); };
|
|
1434
1429
|
/* eslint-disable */
|
|
1435
|
-
}, [(
|
|
1430
|
+
}, [(_61 = props.bareSettings) === null || _61 === void 0 ? void 0 : _61.barePollingInterval, isLive, isNetworkOffline]);
|
|
1436
1431
|
/* eslint-enable */
|
|
1437
1432
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
1438
1433
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -1474,7 +1469,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1474
1469
|
};
|
|
1475
1470
|
/* eslint-disable */
|
|
1476
1471
|
}, [
|
|
1477
|
-
(
|
|
1472
|
+
(_62 = props.bareSettings) === null || _62 === void 0 ? void 0 : _62.bareSocketName,
|
|
1478
1473
|
props.collectionId,
|
|
1479
1474
|
props.devSettings.sseEndpoint,
|
|
1480
1475
|
props.devSettings.dbAPIToken,
|
|
@@ -1726,10 +1721,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1726
1721
|
props.collectionId,
|
|
1727
1722
|
props.model,
|
|
1728
1723
|
props.localURLEndpoint,
|
|
1729
|
-
(
|
|
1730
|
-
(
|
|
1731
|
-
(
|
|
1732
|
-
(
|
|
1724
|
+
(_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.extendedTabs,
|
|
1725
|
+
(_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.viewId,
|
|
1726
|
+
(_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.additionalQuery,
|
|
1727
|
+
(_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.groupBy,
|
|
1733
1728
|
resolvedType,
|
|
1734
1729
|
]);
|
|
1735
1730
|
/**
|
|
@@ -1870,7 +1865,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1870
1865
|
};
|
|
1871
1866
|
}, 100);
|
|
1872
1867
|
return function () { return clearTimeout(timeoutId); };
|
|
1873
|
-
}, [(
|
|
1868
|
+
}, [(_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
1874
1869
|
(0, react_1.useEffect)(function () {
|
|
1875
1870
|
if (resolvedType !== "read")
|
|
1876
1871
|
return;
|
|
@@ -2498,8 +2493,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2498
2493
|
skip: 0,
|
|
2499
2494
|
};
|
|
2500
2495
|
if (calendarSettings ||
|
|
2501
|
-
(selectedTab &&
|
|
2496
|
+
(selectedTab &&
|
|
2497
|
+
(selectedTab.viewType === "map" ||
|
|
2498
|
+
selectedTab.viewType === "timeline")) ||
|
|
2502
2499
|
groupId) {
|
|
2500
|
+
// INFO: a Gantt needs every bar at once — a page of rows would hide
|
|
2501
|
+
// spans that fall outside it, so fetch the full set like map/calendar
|
|
2503
2502
|
cond.limit = undefined;
|
|
2504
2503
|
cond.stopLimit = true;
|
|
2505
2504
|
}
|
|
@@ -7352,9 +7351,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7352
7351
|
setDeleteModal(true);
|
|
7353
7352
|
} })))),
|
|
7354
7353
|
showExport && (react_1.default.createElement(button_1.Button, { type: "light", text: "Export PDF", size: "small", onClick: handleExportReadPDF })),
|
|
7355
|
-
isActivityLog && (react_1.default.createElement(
|
|
7356
|
-
react_1.default.createElement(outline_1.ChatBubbleOvalLeftEllipsisIcon, { className: "h-5 w-5" }),
|
|
7357
|
-
react_1.default.createElement("span", { className: "sr-only" }, "Comments and activity")), background: "bg-transparent text-primary-500 hover:bg-primary-50", onClick: function () { return setActivityModal(true); } })),
|
|
7354
|
+
isActivityLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
|
|
7358
7355
|
hasCustomActions && bareActionComponent,
|
|
7359
7356
|
showUpdate &&
|
|
7360
7357
|
(hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small", onClick: function () {
|
|
@@ -7404,9 +7401,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7404
7401
|
else if (type === "list") {
|
|
7405
7402
|
var listActionBtns = [];
|
|
7406
7403
|
if (isActivityLog) {
|
|
7407
|
-
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, {
|
|
7408
|
-
react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }),
|
|
7409
|
-
react_1.default.createElement("span", { className: "sr-only" }, "All activity")), onClick: function () { return setActivityModal(true); }, background: "bg-primary-500 hover:bg-primary-600" }));
|
|
7404
|
+
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () { return setActivityModal(true); }, background: "bg-primary-500 hover:bg-primary-600" }));
|
|
7410
7405
|
}
|
|
7411
7406
|
if (bareActionComponent) {
|
|
7412
7407
|
listActionBtns.push(bareActionComponent);
|
|
@@ -8474,7 +8469,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8474
8469
|
if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) &&
|
|
8475
8470
|
((_b = props.organise.extendedTabs) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
8476
8471
|
(_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs.map(function (eachTab) {
|
|
8477
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
8472
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8478
8473
|
var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(resolvedType, "&collection=").concat(props.collectionId);
|
|
8479
8474
|
if (props.id)
|
|
8480
8475
|
hrefPoint += "&data=".concat(props.id);
|
|
@@ -8490,11 +8485,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8490
8485
|
calendarSettings: (_b = eachTab.calendarSettings) !== null && _b !== void 0 ? _b : undefined,
|
|
8491
8486
|
feedsSettings: (_c = eachTab.feedsSettings) !== null && _c !== void 0 ? _c : undefined,
|
|
8492
8487
|
mapSettings: (_d = eachTab.mapSettings) !== null && _d !== void 0 ? _d : undefined,
|
|
8488
|
+
// INFO: the timeline branch reads its date/group columns from the tab
|
|
8489
|
+
// it renders, so the settings have to survive this copy — same as
|
|
8490
|
+
// calendarSettings above
|
|
8491
|
+
timelineSettings: (_e = eachTab.timelineSettings) !== null && _e !== void 0 ? _e : undefined,
|
|
8493
8492
|
// INFO: the file view reads its column from the tab it renders, so
|
|
8494
8493
|
// the settings have to survive this copy. Without them the query
|
|
8495
8494
|
// still unwound the column (it reads the raw extendedTabs) while
|
|
8496
8495
|
// the tile had no column to read and every file said "Attachment".
|
|
8497
|
-
fileSettings: (
|
|
8496
|
+
fileSettings: (_f = eachTab.fileSettings) !== null && _f !== void 0 ? _f : undefined,
|
|
8498
8497
|
};
|
|
8499
8498
|
if (eachTab.viewType === "iframe") {
|
|
8500
8499
|
if (typeof eachTab.src === "string") {
|
|
@@ -8509,7 +8508,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8509
8508
|
}
|
|
8510
8509
|
if (eachTab.type === resolvedType) {
|
|
8511
8510
|
tabs.push(__assign(__assign(__assign({}, tabData), (isEditor &&
|
|
8512
|
-
((
|
|
8511
|
+
((_g = props.organise) === null || _g === void 0 ? void 0 : _g.onChangeTabs) && {
|
|
8513
8512
|
action: (react_1.default.createElement("span", { role: "button", "data-testid": "tab-default-".concat(tabData.id), "aria-label": eachTab.defaultTab
|
|
8514
8513
|
? "Opens by default"
|
|
8515
8514
|
: "Open this tab by default", className: "ml-2 self-center ".concat(eachTab.defaultTab
|
|
@@ -8519,8 +8518,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8519
8518
|
e.preventDefault();
|
|
8520
8519
|
handleToggleDefaultTab(eachTab.name);
|
|
8521
8520
|
} }, eachTab.defaultTab ? (react_1.default.createElement(HeroIcons.BookmarkIcon, { className: "h-4 w-4" })) : (react_1.default.createElement(BookmarkIcon_1.default, { className: "h-4 w-4" })))),
|
|
8522
|
-
})), (!((
|
|
8523
|
-
((
|
|
8521
|
+
})), (!((_h = props.edit) === null || _h === void 0 ? void 0 : _h.disabledTabsDeleteBtn) &&
|
|
8522
|
+
((_j = props.organise) === null || _j === void 0 ? void 0 : _j.onChangeTabs) && {
|
|
8524
8523
|
del: (react_1.default.createElement(outline_1.XMarkIcon, { className: "h-4 w-4 ml-2 self-center text-red-600 hover:text-red-400 ", onClick: function (e) {
|
|
8525
8524
|
e.stopPropagation();
|
|
8526
8525
|
e.preventDefault();
|
|
@@ -8763,10 +8762,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8763
8762
|
else {
|
|
8764
8763
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
8765
8764
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
|
|
8766
|
-
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(),
|
|
8767
|
-
setActivityId(id);
|
|
8768
|
-
setActivityModal(true);
|
|
8769
|
-
} : undefined, 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: (_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.disableSelectFullData) === null || _e === void 0 ? void 0 : _e.table, maxSelectedCount: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMaxSelectedCount, mobileView: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMobileView, mobileTooltip: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
8765
|
+
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), 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: (_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.disableSelectFullData) === null || _e === void 0 ? void 0 : _e.table, maxSelectedCount: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListMaxSelectedCount, mobileView: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMobileView, mobileTooltip: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
8770
8766
|
!((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideTableExtraMultipleAction)
|
|
8771
8767
|
? [
|
|
8772
8768
|
{
|
|
@@ -9063,7 +9059,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9063
9059
|
renderTabContent(tabs, dataType, requestedViewType),
|
|
9064
9060
|
react_1.default.createElement("span", { ref: scrollScopeEndRef, hidden: true, "aria-hidden": "true" }))); };
|
|
9065
9061
|
var renderTabContent = function (tabs, dataType, requestedViewType) {
|
|
9066
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57;
|
|
9062
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59;
|
|
9067
9063
|
var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
|
|
9068
9064
|
/**
|
|
9069
9065
|
* INFO: a list tab must not supply the content of a read view. The selected
|
|
@@ -9644,10 +9640,90 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9644
9640
|
? function () { return calendarSettings_1.customHeader || ""; }
|
|
9645
9641
|
: undefined, customView: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customView, handleCalendarResize: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.handleCalendarResize, eventColorRules: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.eventColorRules }))));
|
|
9646
9642
|
}
|
|
9643
|
+
else if (selectedTabData.viewType === "timeline") {
|
|
9644
|
+
var timelineSettings_1 = selectedTabData.timelineSettings;
|
|
9645
|
+
// INFO: pin each group value to a fixed colour — deterministic across
|
|
9646
|
+
// fetches, mirroring the calendar's groupColorMap / first-appearance
|
|
9647
|
+
// assignment so the two views colour the same data the same way
|
|
9648
|
+
var timelineColorPalette_1 = (timelineSettings_1 === null || timelineSettings_1 === void 0 ? void 0 : timelineSettings_1.groupColor)
|
|
9649
|
+
? JSON.parse(JSON.stringify(timelineSettings_1.groupColor))
|
|
9650
|
+
: ["red", "blue", "green", "indigo", "orange", "violet", "yellow"];
|
|
9651
|
+
var timelineValuesWithColour_1 = {};
|
|
9652
|
+
if (timelineSettings_1 === null || timelineSettings_1 === void 0 ? void 0 : timelineSettings_1.groupColorMap) {
|
|
9653
|
+
Object.assign(timelineValuesWithColour_1, timelineSettings_1.groupColorMap);
|
|
9654
|
+
}
|
|
9655
|
+
else if (timelineSettings_1 === null || timelineSettings_1 === void 0 ? void 0 : timelineSettings_1.groupId) {
|
|
9656
|
+
spaceTableData.map(function (eachTableData) {
|
|
9657
|
+
var _a;
|
|
9658
|
+
if (timelineColorPalette_1.length === 0)
|
|
9659
|
+
return null;
|
|
9660
|
+
var tableValue = eachTableData[(_a = timelineSettings_1.groupId) !== null && _a !== void 0 ? _a : ""];
|
|
9661
|
+
if (!tableValue)
|
|
9662
|
+
return null;
|
|
9663
|
+
if (tableValue && !timelineValuesWithColour_1[tableValue]) {
|
|
9664
|
+
timelineValuesWithColour_1[tableValue] =
|
|
9665
|
+
timelineColorPalette_1.splice(0, 1)[0];
|
|
9666
|
+
}
|
|
9667
|
+
return null;
|
|
9668
|
+
});
|
|
9669
|
+
}
|
|
9670
|
+
// INFO: Tailwind palette hexes — the Gantt colours bars through Apex's
|
|
9671
|
+
// `colors` array (hex), not the bg-* class names the calendar uses
|
|
9672
|
+
var TIMELINE_COLOR_HEX_1 = {
|
|
9673
|
+
red: "#ef4444",
|
|
9674
|
+
blue: "#3b82f6",
|
|
9675
|
+
green: "#22c55e",
|
|
9676
|
+
indigo: "#6366f1",
|
|
9677
|
+
orange: "#f97316",
|
|
9678
|
+
violet: "#8b5cf6",
|
|
9679
|
+
yellow: "#eab308",
|
|
9680
|
+
};
|
|
9681
|
+
var renderTimelineTasks = function () {
|
|
9682
|
+
var _a;
|
|
9683
|
+
var tasks = [];
|
|
9684
|
+
if (!(timelineSettings_1 === null || timelineSettings_1 === void 0 ? void 0 : timelineSettings_1.startDate) || !(timelineSettings_1 === null || timelineSettings_1 === void 0 ? void 0 : timelineSettings_1.endDate))
|
|
9685
|
+
return tasks;
|
|
9686
|
+
for (var _i = 0, _b = spaceTableData; _i < _b.length; _i++) {
|
|
9687
|
+
var eachData = _b[_i];
|
|
9688
|
+
var rawStart = eachData[timelineSettings_1.startDate];
|
|
9689
|
+
var rawEnd = eachData[timelineSettings_1.endDate];
|
|
9690
|
+
// INFO: a bar needs both ends — skip only the incomplete row so one
|
|
9691
|
+
// undated record in a union does not drop every bar after it
|
|
9692
|
+
if (!rawStart || !rawEnd)
|
|
9693
|
+
continue;
|
|
9694
|
+
var startDate = (0, dayjs_1.default)(rawStart, "YYYY-MM-DD HH:mm A");
|
|
9695
|
+
var endDate = (0, dayjs_1.default)(rawEnd, "YYYY-MM-DD HH:mm A");
|
|
9696
|
+
if (!startDate.isValid() || !endDate.isValid())
|
|
9697
|
+
continue;
|
|
9698
|
+
var color = undefined;
|
|
9699
|
+
if (timelineSettings_1.groupId && eachData[timelineSettings_1.groupId]) {
|
|
9700
|
+
var groupValue = eachData[timelineSettings_1.groupId];
|
|
9701
|
+
color = TIMELINE_COLOR_HEX_1[timelineValuesWithColour_1[groupValue]];
|
|
9702
|
+
}
|
|
9703
|
+
tasks.push({
|
|
9704
|
+
id: eachData.id,
|
|
9705
|
+
name: (_a = eachData[timelineSettings_1.title]) !== null && _a !== void 0 ? _a : "",
|
|
9706
|
+
start: startDate.toDate(),
|
|
9707
|
+
end: endDate.toDate(),
|
|
9708
|
+
color: color,
|
|
9709
|
+
});
|
|
9710
|
+
}
|
|
9711
|
+
return tasks;
|
|
9712
|
+
};
|
|
9713
|
+
var timelineTasks = renderTimelineTasks();
|
|
9714
|
+
// INFO: parallel hex list for Apex distributed bars — one colour per
|
|
9715
|
+
// task, in the same order; undefined falls back to the chart default
|
|
9716
|
+
var timelineColors = timelineTasks.map(function (eachTask) { var _a; return (_a = eachTask.color) !== null && _a !== void 0 ? _a : "#3b82f6"; });
|
|
9717
|
+
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : timelineTasks.length === 0 ? (react_1.default.createElement(emptyState_1.EmptyState, { icon: react_1.default.createElement(HeroIcons.CalendarDaysIcon, { className: "h-10 w-10 text-gray-400" }), text: "Nothing to show on the timeline", description: "Records need both a start and end date to appear here.", darkMode: (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.darkMode })) : (react_1.default.createElement(ganttChart_1.GanttChart, { title: typeof props.title === "string" ? props.title : "Timeline", tasks: timelineTasks, colors: timelineColors, chartOnly: true, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, onClick: function (taskId) {
|
|
9718
|
+
var _a, _b;
|
|
9719
|
+
if (taskId)
|
|
9720
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", taskId, "general");
|
|
9721
|
+
} }))));
|
|
9722
|
+
}
|
|
9647
9723
|
else if (selectedTabData.viewType === "feeds") {
|
|
9648
9724
|
var contentList_1 = [];
|
|
9649
9725
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
9650
|
-
var customFeedsData = (
|
|
9726
|
+
var customFeedsData = (_42 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _42 === void 0 ? void 0 : _42.call(feedsSettings_1, tableData, spaceTableData);
|
|
9651
9727
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
9652
9728
|
customFeedsData.map(function (eachData) {
|
|
9653
9729
|
var _a, _b, _c, _d;
|
|
@@ -9692,25 +9768,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9692
9768
|
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
|
|
9693
9769
|
// INFO: NewFeeds is already a card like the table and list, so the new
|
|
9694
9770
|
// DTW renders it bare; the legacy feed still needs its own surface
|
|
9695
|
-
className: ((
|
|
9771
|
+
className: ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareNewDTW)
|
|
9696
9772
|
? ""
|
|
9697
|
-
: "p-4 rounded-lg ".concat(((
|
|
9698
|
-
((
|
|
9773
|
+
: "p-4 rounded-lg ".concat(((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode) ? "bg-white/5" : "bg-white") },
|
|
9774
|
+
((_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.darkMode, onClickItem: function (id) {
|
|
9699
9775
|
var _a, _b;
|
|
9700
9776
|
handleCaptureListScroll(id);
|
|
9701
9777
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
9702
|
-
} })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (
|
|
9778
|
+
} })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.darkMode })),
|
|
9703
9779
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
9704
9780
|
contentList_1.length > 0 &&
|
|
9705
|
-
!((
|
|
9706
|
-
((
|
|
9781
|
+
!((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.hidePagination) &&
|
|
9782
|
+
((_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.darkMode, darkModeBg: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkModeBg, handleUpdatePageIndex: function (value) {
|
|
9707
9783
|
handlePagination(value);
|
|
9708
9784
|
} })),
|
|
9709
9785
|
contentList_1.length > 0 &&
|
|
9710
|
-
!((
|
|
9711
|
-
!((
|
|
9786
|
+
!((_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.hidePagination) &&
|
|
9787
|
+
!((_53 = props.bareSettings) === null || _53 === void 0 ? void 0 : _53.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
|
|
9712
9788
|
handlePagination(value);
|
|
9713
|
-
}, darkMode: (
|
|
9789
|
+
}, darkMode: (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.darkMode, customPaginationSize: customPaginationSize }))))));
|
|
9714
9790
|
}
|
|
9715
9791
|
else if (selectedTabData.viewType === "map") {
|
|
9716
9792
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -9813,7 +9889,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9813
9889
|
}
|
|
9814
9890
|
else if (selectedTabData.viewType === "kanban") {
|
|
9815
9891
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
9816
|
-
var kanbanTitle_2 = (
|
|
9892
|
+
var kanbanTitle_2 = (_55 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _55 !== void 0 ? _55 : "";
|
|
9817
9893
|
var nullColumn_1 = false;
|
|
9818
9894
|
var groupBy_1 = [];
|
|
9819
9895
|
var groupLabel_1 = [];
|
|
@@ -9834,13 +9910,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9834
9910
|
});
|
|
9835
9911
|
var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
|
|
9836
9912
|
// INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
|
|
9837
|
-
if ((
|
|
9913
|
+
if ((_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.bareNewDTW) {
|
|
9838
9914
|
return (
|
|
9839
9915
|
// INFO: the same top spacing as the table, list and grid
|
|
9840
9916
|
react_1.default.createElement("div", { className: "mt-5" },
|
|
9841
9917
|
react_1.default.createElement(newKanban_1.NewKanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
9842
9918
|
? "Data has exceeded limit, please apply filters"
|
|
9843
|
-
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (
|
|
9919
|
+
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareListMobileView, onUpdateData: canUpdateRecord
|
|
9844
9920
|
? function (cardId, _fromCol, toCol) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9845
9921
|
var _a;
|
|
9846
9922
|
return __generator(this, function (_b) {
|
|
@@ -9867,7 +9943,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9867
9943
|
var _a, _b;
|
|
9868
9944
|
handleCaptureListScroll(id);
|
|
9869
9945
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
9870
|
-
}, darkMode: (
|
|
9946
|
+
}, darkMode: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkMode, darkModeBg: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkModeBg })));
|
|
9871
9947
|
}
|
|
9872
9948
|
return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
9873
9949
|
? "Data has exceeded limit, please apply filters"
|
|
@@ -10380,7 +10456,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10380
10456
|
};
|
|
10381
10457
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10382
10458
|
renderNotification("root"),
|
|
10383
|
-
((
|
|
10459
|
+
((_69 = (_68 = props.renderSettings) === null || _68 === void 0 ? void 0 : _68.renderLoadingUI) === null || _69 === void 0 ? void 0 : _69.call(_68)) && loading ? ((_70 = props.renderSettings) === null || _70 === void 0 ? void 0 : _70.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.darkMode, darkModeBg: (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
10384
10460
|
var _a, _b;
|
|
10385
10461
|
if (loading)
|
|
10386
10462
|
return;
|
|
@@ -10391,7 +10467,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10391
10467
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
10392
10468
|
}
|
|
10393
10469
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
10394
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10470
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.darkMode, darkModeBg: (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
10395
10471
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
10396
10472
|
if (dataId) {
|
|
10397
10473
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -10407,19 +10483,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10407
10483
|
}, onClose: function () {
|
|
10408
10484
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
10409
10485
|
} }),
|
|
10410
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10486
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.darkMode, darkModeBg: (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
10411
10487
|
setReferenceDeleteTableData({});
|
|
10412
10488
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
10413
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10489
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.darkMode, darkModeBg: (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
10414
10490
|
setDeletePasscodeInput("");
|
|
10415
10491
|
setDeleteModal(!deleteModal);
|
|
10416
10492
|
setDeleteFeedId("");
|
|
10417
10493
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
10418
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10494
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.darkMode, darkModeBg: (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
10419
10495
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
10420
10496
|
setBatchUpdateModal(false);
|
|
10421
10497
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
10422
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10498
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.darkMode, darkModeBg: (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
10423
10499
|
var _a;
|
|
10424
10500
|
if (props.space)
|
|
10425
10501
|
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 }));
|
|
@@ -10427,16 +10503,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10427
10503
|
}, onClose: function () {
|
|
10428
10504
|
setSelectedAuthMethod("");
|
|
10429
10505
|
} }),
|
|
10430
|
-
isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
10431
|
-
var _a, _b
|
|
10506
|
+
isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.darkMode, darkModeBg: (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
|
|
10507
|
+
var _a, _b;
|
|
10432
10508
|
return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
10433
10509
|
? props.title
|
|
10434
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_a = props.id) !== null && _a !== void 0 ? _a : "") : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog
|
|
10435
|
-
var _a, _b;
|
|
10436
|
-
setActivityModal(false);
|
|
10437
|
-
setActivityId("");
|
|
10438
|
-
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
10439
|
-
}, darkMode: (_e = props.organise) === null || _e === void 0 ? void 0 : _e.darkMode }));
|
|
10510
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_a = props.id) !== null && _a !== void 0 ? _a : "") : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog }));
|
|
10440
10511
|
}, maxWidth: "4xl", onClose: function () {
|
|
10441
10512
|
setActivityModal(false);
|
|
10442
10513
|
setActivityId("");
|