blixify-ui-web 1.2.228 → 1.2.230
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/columnTypes/context.d.ts +1 -0
- package/lib/components/data/columnTypes/context.d.ts.map +1 -1
- package/lib/components/data/columnTypes/context.js.map +1 -1
- package/lib/components/data/columnTypes/dateRangeCell.d.ts.map +1 -1
- package/lib/components/data/columnTypes/dateRangeCell.js +8 -2
- package/lib/components/data/columnTypes/dateRangeCell.js.map +1 -1
- package/lib/components/data/columnTypes/dateWarning.d.ts +6 -0
- package/lib/components/data/columnTypes/dateWarning.d.ts.map +1 -0
- package/lib/components/data/columnTypes/dateWarning.js +46 -0
- package/lib/components/data/columnTypes/dateWarning.js.map +1 -0
- package/lib/components/data/columnTypes/defaultColours.d.ts +22 -0
- package/lib/components/data/columnTypes/defaultColours.d.ts.map +1 -0
- package/lib/components/data/columnTypes/defaultColours.js +101 -0
- package/lib/components/data/columnTypes/defaultColours.js.map +1 -0
- package/lib/components/data/columnTypes/groupSections.d.ts +13 -0
- package/lib/components/data/columnTypes/groupSections.d.ts.map +1 -1
- package/lib/components/data/columnTypes/groupSections.js +19 -1
- package/lib/components/data/columnTypes/groupSections.js.map +1 -1
- package/lib/components/data/dataGraph/index.d.ts +1 -0
- package/lib/components/data/dataGraph/index.d.ts.map +1 -1
- package/lib/components/data/dataGraph/index.js +74 -25
- package/lib/components/data/dataGraph/index.js.map +1 -1
- package/lib/components/data/dataTemplate/chartBuilder.d.ts +1 -1
- package/lib/components/data/dataTemplate/chartBuilder.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/chartBuilder.js +11 -19
- package/lib/components/data/dataTemplate/chartBuilder.js.map +1 -1
- package/lib/components/data/dataTemplate/chartView.d.ts +2 -0
- package/lib/components/data/dataTemplate/chartView.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/chartView.js +8 -5
- package/lib/components/data/dataTemplate/chartView.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +10 -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 +461 -245
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +15 -2
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/display/groupSection/index.d.ts +6 -0
- package/lib/components/display/groupSection/index.d.ts.map +1 -1
- package/lib/components/display/groupSection/index.js +5 -2
- package/lib/components/display/groupSection/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +13 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +323 -126
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/recordActions/index.d.ts +1 -0
- package/lib/components/display/recordActions/index.d.ts.map +1 -1
- package/lib/components/display/recordActions/index.js +6 -3
- package/lib/components/display/recordActions/index.js.map +1 -1
- package/lib/components/input/select/index.d.ts.map +1 -1
- package/lib/components/input/select/index.js +13 -4
- package/lib/components/input/select/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -161,6 +161,8 @@ var authModal_1 = require("./authModal");
|
|
|
161
161
|
var indexedDb_1 = require("./indexedDb");
|
|
162
162
|
var context_1 = require("../columnTypes/context");
|
|
163
163
|
var groupSections_1 = require("../columnTypes/groupSections");
|
|
164
|
+
var chartResults_1 = require("../dataGraph/chartResults");
|
|
165
|
+
var defaultColours_1 = require("../columnTypes/defaultColours");
|
|
164
166
|
var systemColumns_1 = require("../columnTypes/systemColumns");
|
|
165
167
|
var dateRange_1 = require("../columnTypes/dateRange");
|
|
166
168
|
var socket_1 = require("./socket");
|
|
@@ -249,10 +251,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
249
251
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
250
252
|
// most in effect dependency arrays — following props.type there would leave
|
|
251
253
|
// the list never refetching while the panel is open, which fails silently.
|
|
252
|
-
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, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117;
|
|
254
|
+
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, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119;
|
|
253
255
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
254
256
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
255
|
-
var
|
|
257
|
+
var _120 = (0, react_1.useState)(false), drawerPageView = _120[0], setDrawerPageView = _120[1];
|
|
256
258
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
257
259
|
// live props. Without this, navigating back to the list would re-render the
|
|
258
260
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -308,7 +310,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
308
310
|
drawerFormEditedRef.current = false;
|
|
309
311
|
}
|
|
310
312
|
drawerOpenRef.current = isDrawerHost;
|
|
311
|
-
var
|
|
313
|
+
var _121 = (0, react_1.useState)(false), drawerDiscardModal = _121[0], setDrawerDiscardModal = _121[1];
|
|
312
314
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
313
315
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
314
316
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -387,14 +389,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
387
389
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
388
390
|
};
|
|
389
391
|
};
|
|
390
|
-
var
|
|
392
|
+
var _122 = intialiseDefaultFilterValues(), initialFilterSearch = _122.initialFilterSearch, initialFilterSearchParams = _122.initialFilterSearchParams, initialFilterSelection = _122.initialFilterSelection, initialFilterReference = _122.initialFilterReference, initialFilterReferenceDate = _122.initialFilterReferenceDate;
|
|
391
393
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
392
|
-
var
|
|
394
|
+
var _123 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
393
395
|
mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
|
|
394
396
|
collectionId: props.collectionId,
|
|
395
397
|
persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
|
|
396
398
|
type: resolvedType,
|
|
397
|
-
}), rawPersistedState =
|
|
399
|
+
}), rawPersistedState = _123.persistedState, isPersistEnabled = _123.isEnabled, handleSaveView = _123.handleSaveView, handleRegisterViewSnapshot = _123.handleRegisterViewSnapshot;
|
|
398
400
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
399
401
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
400
402
|
var _a, _b, _c, _d;
|
|
@@ -410,8 +412,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
410
412
|
(_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
|
|
411
413
|
(_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
|
|
412
414
|
]);
|
|
413
|
-
var
|
|
414
|
-
var
|
|
415
|
+
var _124 = (0, react_1.useState)(false), loading = _124[0], setLoading = _124[1];
|
|
416
|
+
var _125 = (0, react_1.useState)(), notification = _125[0], setNotification = _125[1];
|
|
415
417
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
416
418
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
417
419
|
(0, react_1.useEffect)(function () {
|
|
@@ -421,67 +423,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
421
423
|
return function () { return clearTimeout(timer); };
|
|
422
424
|
}, [notification]);
|
|
423
425
|
//INFO : Used by List
|
|
424
|
-
var
|
|
425
|
-
var
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
429
|
-
var
|
|
430
|
-
var
|
|
426
|
+
var _126 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _126[0], setFilterSearch = _126[1];
|
|
427
|
+
var _127 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _127[0], setFilterSearchParams = _127[1];
|
|
428
|
+
var _128 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _128[0], setFilterSelection = _128[1];
|
|
429
|
+
var _129 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _129[0], setFilterReference = _129[1];
|
|
430
|
+
var _130 = (0, react_1.useState)({}), filterReferenceSearch = _130[0], setFilterReferenceSearch = _130[1];
|
|
431
|
+
var _131 = (0, react_1.useState)({}), filterReferenceList = _131[0], setFilterReferenceList = _131[1];
|
|
432
|
+
var _132 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
431
433
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
432
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
434
|
+
: initialFilterReferenceDate), filterReferenceDate = _132[0], setFilterReferenceDate = _132[1];
|
|
435
|
+
var _133 = (0, react_1.useState)(true), tableLoading = _133[0], setTableLoading = _133[1];
|
|
436
|
+
var _134 = (0, react_1.useState)(""), cursor = _134[0], setCursor = _134[1];
|
|
437
|
+
var _135 = (0, react_1.useState)(""), lastCursor = _135[0], setLastCursor = _135[1];
|
|
438
|
+
var _136 = (0, react_1.useState)([]), tableData = _136[0], setTableData = _136[1];
|
|
439
|
+
var _137 = (0, react_1.useState)([]), spaceTableData = _137[0], setSpaceTableData = _137[1];
|
|
438
440
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
439
441
|
// the state it closed over can predate an earlier save on the same row
|
|
440
442
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
441
443
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
442
444
|
tableDataRef.current = tableData;
|
|
443
445
|
spaceTableDataRef.current = spaceTableData;
|
|
444
|
-
var
|
|
445
|
-
var
|
|
446
|
+
var _138 = (0, react_1.useState)(0), size = _138[0], setSize = _138[1];
|
|
447
|
+
var _139 = (0, react_1.useState)((_t = (_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _r !== void 0 ? _r : (_s = props.organise) === null || _s === void 0 ? void 0 : _s.pageIndex) !== null && _t !== void 0 ? _t : 0), pageIndex = _139[0], setPageIndex = _139[1];
|
|
446
448
|
// INFO: every change of page, including the return to the first page when a
|
|
447
449
|
// filter or search changes, which onChangePagination does not always report
|
|
448
450
|
(0, react_1.useEffect)(function () {
|
|
449
451
|
var _a, _b;
|
|
450
452
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
451
453
|
}, [pageIndex]);
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var
|
|
454
|
+
var _140 = (0, react_1.useState)([]), selectedIds = _140[0], setSelectedIds = _140[1];
|
|
455
|
+
var _141 = (0, react_1.useState)(false), selectAll = _141[0], setSelectAll = _141[1];
|
|
456
|
+
var _142 = (0, react_1.useState)(""), deletePasscode = _142[0], setDeletePasscode = _142[1];
|
|
457
|
+
var _143 = (0, react_1.useState)(""), deletePasscodeInput = _143[0], setDeletePasscodeInput = _143[1];
|
|
458
|
+
var _144 = (0, react_1.useState)(""), deleteFeedId = _144[0], setDeleteFeedId = _144[1];
|
|
457
459
|
//INFO : Used by List Organise
|
|
458
460
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
459
461
|
// persistViewState is enabled and a persisted sort exists
|
|
460
|
-
var
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
var
|
|
462
|
+
var _145 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _145[0], setPersistedSort = _145[1];
|
|
463
|
+
var _146 = (0, react_1.useState)(false), filterDraft = _146[0], setFilterDraft = _146[1];
|
|
464
|
+
var _147 = (0, react_1.useState)(false), addTabModal = _147[0], setAddTabModal = _147[1];
|
|
465
|
+
var _148 = (0, react_1.useState)(-1), editTabIndex = _148[0], setEditTabIndex = _148[1];
|
|
464
466
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
465
467
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
466
|
-
var
|
|
468
|
+
var _149 = (0, react_1.useState)(function () {
|
|
467
469
|
var _a;
|
|
468
470
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
469
|
-
}), selectedTab =
|
|
470
|
-
var
|
|
471
|
+
}), selectedTab = _149[0], setSelectedTab = _149[1];
|
|
472
|
+
var _150 = (0, react_1.useState)("dayGridMonth"), calendarView = _150[0], setCalendarView = _150[1];
|
|
471
473
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
472
474
|
// (calendarView above drives the matching range query)
|
|
473
|
-
var
|
|
474
|
-
var
|
|
475
|
+
var _151 = (0, react_1.useState)("month"), newCalendarViewMode = _151[0], setNewCalendarViewMode = _151[1];
|
|
476
|
+
var _152 = (0, react_1.useState)(new Date()), calendarTabMonth = _152[0], setCalendarTabMonth = _152[1];
|
|
475
477
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
476
478
|
// whenever its settings change, and that must not undo the user's switch
|
|
477
479
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
478
|
-
var
|
|
479
|
-
var
|
|
480
|
-
var
|
|
481
|
-
var
|
|
480
|
+
var _153 = (0, react_1.useState)(true), kanbanDroppable = _153[0], setKanbanDroppable = _153[1];
|
|
481
|
+
var _154 = (0, react_1.useState)([]), kanbanOptions = _154[0], setKanbanOptions = _154[1];
|
|
482
|
+
var _155 = (0, react_1.useState)(false), batchUpdateModal = _155[0], setBatchUpdateModal = _155[1];
|
|
483
|
+
var _156 = (0, react_1.useState)({
|
|
482
484
|
columnId: "",
|
|
483
485
|
columnData: {},
|
|
484
|
-
}), batchUpdateData =
|
|
486
|
+
}), batchUpdateData = _156[0], setBatchUpdateData = _156[1];
|
|
485
487
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
486
488
|
// join the structure hidden; the ones a user shows are kept per view
|
|
487
489
|
var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
|
|
@@ -489,12 +491,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
489
491
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
490
492
|
? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
|
|
491
493
|
: [];
|
|
492
|
-
var
|
|
494
|
+
var _157 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _157[0], setShownSystemColumnIds = _157[1];
|
|
493
495
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
494
496
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
495
497
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
496
498
|
};
|
|
497
|
-
var
|
|
499
|
+
var _158 = (0, react_1.useState)(function () {
|
|
498
500
|
var _a;
|
|
499
501
|
var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
|
|
500
502
|
if (!persistedState)
|
|
@@ -521,8 +523,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
521
523
|
});
|
|
522
524
|
}
|
|
523
525
|
return model;
|
|
524
|
-
}), structure =
|
|
525
|
-
var
|
|
526
|
+
}), structure = _158[0], setStructure = _158[1];
|
|
527
|
+
var _159 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _159[0], setAdditionalQuery = _159[1];
|
|
526
528
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
527
529
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
528
530
|
var defaultFlexFilterRow = [
|
|
@@ -533,9 +535,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
533
535
|
value: undefined,
|
|
534
536
|
},
|
|
535
537
|
];
|
|
536
|
-
var
|
|
538
|
+
var _160 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
537
539
|
? persistedState.flexFilters
|
|
538
|
-
: defaultFlexFilterRow), flexFilters =
|
|
540
|
+
: defaultFlexFilterRow), flexFilters = _160[0], setFlexFilters = _160[1];
|
|
539
541
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
540
542
|
// clear methods so chained calls in one tick aren't stale.
|
|
541
543
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -548,81 +550,85 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
548
550
|
}, [flexFilters]);
|
|
549
551
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
550
552
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
551
|
-
var
|
|
553
|
+
var _161 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
552
554
|
? persistedState.flexFilters
|
|
553
|
-
: defaultFlexFilterRow), flexFiltersDebounced =
|
|
555
|
+
: defaultFlexFilterRow), flexFiltersDebounced = _161[0], setFlexFiltersDebounced = _161[1];
|
|
554
556
|
// INFO: the filter rows of the export being set up — started from the
|
|
555
557
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
556
|
-
var
|
|
557
|
-
var
|
|
558
|
-
var
|
|
559
|
-
var
|
|
560
|
-
var
|
|
558
|
+
var _162 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _162[0], setExportFlexFilters = _162[1];
|
|
559
|
+
var _163 = (0, react_1.useState)({}), flexFilterReferenceOptions = _163[0], setFlexFilterReferenceOptions = _163[1];
|
|
560
|
+
var _164 = (0, react_1.useState)({}), flexFilterReferenceSearch = _164[0], setFlexFilterReferenceSearch = _164[1];
|
|
561
|
+
var _165 = (0, react_1.useState)(false), flexFilterModalOpen = _165[0], setFlexFilterModalOpen = _165[1];
|
|
562
|
+
var _166 = (0, react_1.useState)(false), viewSettingsModalOpen = _166[0], setViewSettingsModalOpen = _166[1];
|
|
561
563
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
562
564
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
563
565
|
// structure to props.model whenever props change, which would wipe the
|
|
564
566
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
565
567
|
// structure — writing user hides there would blur the two concepts.
|
|
566
|
-
var
|
|
567
|
-
var
|
|
568
|
-
var
|
|
569
|
-
var
|
|
568
|
+
var _167 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _z !== void 0 ? _z : []), userHiddenColumnIds = _167[0], setUserHiddenColumnIds = _167[1];
|
|
569
|
+
var _168 = (0, react_1.useState)(""), columnSearch = _168[0], setColumnSearch = _168[1];
|
|
570
|
+
var _169 = (0, react_1.useState)([]), savedViews = _169[0], setSavedViews = _169[1];
|
|
571
|
+
var _170 = (0, react_1.useState)(null), activeSavedViewId = _170[0], setActiveSavedViewId = _170[1];
|
|
570
572
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
571
|
-
var
|
|
573
|
+
var _171 = (0, react_1.useState)(function () { var _a, _b, _c; return (_c = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.columnWidths) !== null && _c !== void 0 ? _c : {}; }), columnWidths = _171[0], setColumnWidths = _171[1];
|
|
572
574
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
573
575
|
// so the defaults drawn before it never overwrite a person's own
|
|
574
|
-
var
|
|
576
|
+
var _172 = (0, react_1.useState)(false), isViewDraftReady = _172[0], setIsViewDraftReady = _172[1];
|
|
575
577
|
// INFO: null while the name box is closed
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
var
|
|
578
|
+
var _173 = (0, react_1.useState)(null), savedViewName = _173[0], setSavedViewName = _173[1];
|
|
579
|
+
var _174 = (0, react_1.useState)(null), deletingSavedViewId = _174[0], setDeletingSavedViewId = _174[1];
|
|
580
|
+
var _175 = (0, react_1.useState)(null), draggingColumnId = _175[0], setDraggingColumnId = _175[1];
|
|
579
581
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
580
582
|
//INFO : Used by Auth
|
|
581
|
-
var
|
|
583
|
+
var _176 = (0, react_1.useState)({
|
|
582
584
|
email: "",
|
|
583
585
|
google: "",
|
|
584
586
|
phone: "",
|
|
585
587
|
disabled: false,
|
|
586
588
|
create: false,
|
|
587
|
-
}), authMethods =
|
|
588
|
-
var
|
|
589
|
+
}), authMethods = _176[0], setAuthMethods = _176[1];
|
|
590
|
+
var _177 = (0, react_1.useState)(""), selectedAuthMethod = _177[0], setSelectedAuthMethod = _177[1];
|
|
589
591
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
590
592
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
591
|
-
var
|
|
593
|
+
var _178 = (0, react_1.useState)(false), authLoading = _178[0], setAuthLoading = _178[1];
|
|
592
594
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
593
595
|
// the state has rendered, and the state disables the confirm button
|
|
594
596
|
var deletingRef = (0, react_1.useRef)(false);
|
|
595
|
-
var
|
|
597
|
+
var _179 = (0, react_1.useState)(false), deleting = _179[0], setDeleting = _179[1];
|
|
596
598
|
// INFO: Used by Activity Log
|
|
597
|
-
var
|
|
598
|
-
var
|
|
599
|
+
var _180 = (0, react_1.useState)(false), activityModal = _180[0], setActivityModal = _180[1];
|
|
600
|
+
var _181 = (0, react_1.useState)(""), activityId = _181[0], setActivityId = _181[1];
|
|
599
601
|
//INFO : Used by Export
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var
|
|
605
|
-
var
|
|
606
|
-
var
|
|
607
|
-
var
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
602
|
+
var _182 = (0, react_1.useState)(null), csvFile = _182[0], setCSVFile = _182[1];
|
|
603
|
+
var _183 = (0, react_1.useState)([]), csvFileData = _183[0], setCSVFileData = _183[1];
|
|
604
|
+
var _184 = (0, react_1.useState)(0), stepCSVIndex = _184[0], setStepCSVIndex = _184[1];
|
|
605
|
+
var _185 = (0, react_1.useState)({}), listCSVMapAttribute = _185[0], setListCSVMapAttribute = _185[1];
|
|
606
|
+
var _186 = (0, react_1.useState)({}), listCSVObjAttribute = _186[0], setListCSVObjAttribute = _186[1];
|
|
607
|
+
var _187 = (0, react_1.useState)([]), csvAPIAttribute = _187[0], setCSVAPIAttribute = _187[1];
|
|
608
|
+
var _188 = (0, react_1.useState)(((_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) || ""), exportCSVEmail = _188[0], setExportCSVEmail = _188[1];
|
|
609
|
+
var _189 = (0, react_1.useState)(((_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.defaultExportPDFName) || ""), exportPDFTitle = _189[0], setExportPDFTitle = _189[1];
|
|
610
|
+
var _190 = (0, react_1.useState)(false), exportPDFLoading = _190[0], setExportPDFLoading = _190[1];
|
|
611
|
+
var _191 = (0, react_1.useState)(false), exportReadPDFLoading = _191[0], setExportReadPDFLoading = _191[1];
|
|
612
|
+
var _192 = (0, react_1.useState)((_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.exportSettings) === null || _4 === void 0 ? void 0 : _4.sumColumnId) !== null && _5 !== void 0 ? _5 : []), exportSumAttributeIds = _192[0], setExportSumAttributeIds = _192[1];
|
|
613
|
+
var _193 = (0, react_1.useState)((_8 = (_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.exportSettings) === null || _7 === void 0 ? void 0 : _7.hideSubItems) !== null && _8 !== void 0 ? _8 : false), hideSubItems = _193[0], setHideSubItems = _193[1];
|
|
614
|
+
var _194 = (0, react_1.useState)([]), importTableData = _194[0], setImportTableData = _194[1];
|
|
615
|
+
var _195 = (0, react_1.useState)([]), queryList = _195[0], setQueryList = _195[1];
|
|
616
|
+
var _196 = (0, react_1.useState)(undefined), allQueryList = _196[0], setAllQueryList = _196[1];
|
|
615
617
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
616
618
|
// ungrouped, so it opens ungrouped
|
|
617
|
-
var
|
|
619
|
+
var _197 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
618
620
|
? persistedState.groupBy || undefined
|
|
619
|
-
: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId =
|
|
621
|
+
: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _197[0], setGroupId = _197[1];
|
|
622
|
+
// INFO: each group's total per number column, keyed by section id
|
|
623
|
+
var _198 = (0, react_1.useState)({}), groupSummaries = _198[0], setGroupSummaries = _198[1];
|
|
624
|
+
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
625
|
+
var _199 = (0, react_1.useState)({}), commentCounts = _199[0], setCommentCounts = _199[1];
|
|
620
626
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
621
627
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
622
628
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
623
629
|
// next page as the user scrolls inside that band, independent of every other
|
|
624
630
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
625
|
-
var
|
|
631
|
+
var _200 = (0, react_1.useState)({}), groupPageState = _200[0], setGroupPageState = _200[1];
|
|
626
632
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
627
633
|
// in one tick do not re-fetch an already in-flight page.
|
|
628
634
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
@@ -631,59 +637,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
631
637
|
// list was re-read (new search, filter, sort or grouping) is dropped on
|
|
632
638
|
// arrival instead of appending rows that belong to the old list
|
|
633
639
|
var groupPagingGenRef = (0, react_1.useRef)(0);
|
|
634
|
-
var
|
|
635
|
-
var
|
|
640
|
+
var _201 = (0, react_1.useState)(""), readTabSection = _201[0], setReadTabSection = _201[1];
|
|
641
|
+
var _202 = (0, react_1.useState)(false), readFloatingNav = _202[0], setReadFloatingNav = _202[1];
|
|
636
642
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
637
643
|
//INFO : Used by Read
|
|
638
644
|
//INFO : Used by Update
|
|
639
|
-
var
|
|
640
|
-
var
|
|
641
|
-
var
|
|
642
|
-
var
|
|
643
|
-
var
|
|
644
|
-
var
|
|
645
|
-
var
|
|
645
|
+
var _203 = (0, react_1.useState)(false), modalVisible = _203[0], setModalVisible = _203[1];
|
|
646
|
+
var _204 = (0, react_1.useState)(false), deleteModal = _204[0], setDeleteModal = _204[1];
|
|
647
|
+
var _205 = (0, react_1.useState)(false), excelModal = _205[0], setExcelModal = _205[1];
|
|
648
|
+
var _206 = (0, react_1.useState)(false), exportExcel = _206[0], setExportExcel = _206[1];
|
|
649
|
+
var _207 = (0, react_1.useState)(""), exportType = _207[0], setExportType = _207[1];
|
|
650
|
+
var _208 = (0, react_1.useState)(false), exportQR = _208[0], setExportQR = _208[1];
|
|
651
|
+
var _209 = (0, react_1.useState)(function () {
|
|
646
652
|
var _a, _b;
|
|
647
653
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
648
654
|
return firstTabId;
|
|
649
|
-
}), activeTab =
|
|
650
|
-
var
|
|
651
|
-
var
|
|
652
|
-
var
|
|
653
|
-
var
|
|
654
|
-
var
|
|
655
|
-
var
|
|
656
|
-
var
|
|
655
|
+
}), activeTab = _209[0], setActiveTab = _209[1];
|
|
656
|
+
var _210 = (0, react_1.useState)(false), signatureSigning = _210[0], setSignatureSigning = _210[1];
|
|
657
|
+
var _211 = (0, react_1.useState)({}), selectedData = _211[0], setSelectedData = _211[1];
|
|
658
|
+
var _212 = (0, react_1.useState)(""), selectedObjectStructureId = _212[0], setSelectedObjectStructureId = _212[1];
|
|
659
|
+
var _213 = (0, react_1.useState)(""), selectedObjectId = _213[0], setSelectedObjectId = _213[1];
|
|
660
|
+
var _214 = (0, react_1.useState)(""), selectedListAddressId = _214[0], setSelectedListAddressId = _214[1];
|
|
661
|
+
var _215 = (0, react_1.useState)(-1), selectedListAddressIndex = _215[0], setSelectedListAddressIndex = _215[1];
|
|
662
|
+
var _216 = (0, react_1.useState)({
|
|
657
663
|
lat: 0,
|
|
658
664
|
lng: 0,
|
|
659
665
|
name: "",
|
|
660
|
-
}), selectedListAddress =
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
666
|
-
var
|
|
667
|
-
var
|
|
668
|
-
var
|
|
669
|
-
var
|
|
670
|
-
var
|
|
666
|
+
}), selectedListAddress = _216[0], setSelectedListAddress = _216[1];
|
|
667
|
+
var _217 = (0, react_1.useState)({}), selectedObjectData = _217[0], setSelectedObjectData = _217[1];
|
|
668
|
+
var _218 = (0, react_1.useState)(null), objectCellEdit = _218[0], setObjectCellEdit = _218[1];
|
|
669
|
+
var _219 = (0, react_1.useState)(false), referenceLoading = _219[0], setReferenceLoading = _219[1];
|
|
670
|
+
var _220 = (0, react_1.useState)({}), referencesOptions = _220[0], setReferencesOptions = _220[1];
|
|
671
|
+
var _221 = (0, react_1.useState)({}), referencesDetails = _221[0], setReferencesDetails = _221[1];
|
|
672
|
+
var _222 = (0, react_1.useState)({}), listReferencesOptions = _222[0], setListReferencesOptions = _222[1];
|
|
673
|
+
var _223 = (0, react_1.useState)({}), referenceDeleteTableData = _223[0], setReferenceDeleteTableData = _223[1];
|
|
674
|
+
var _224 = (0, react_1.useState)([]), relatedSections = _224[0], setRelatedSections = _224[1];
|
|
675
|
+
var _225 = (0, react_1.useState)(0), referenceDeleteIndex = _225[0], setReferenceDeleteIndex = _225[1];
|
|
676
|
+
var _226 = (0, react_1.useState)({
|
|
671
677
|
id: "",
|
|
672
678
|
name: "",
|
|
673
679
|
type: "string",
|
|
674
|
-
}), referenceCreationModal =
|
|
675
|
-
var
|
|
676
|
-
var
|
|
680
|
+
}), referenceCreationModal = _226[0], setReferenceCreationModal = _226[1];
|
|
681
|
+
var _227 = (0, react_1.useState)({}), referenceModelSchema = _227[0], setReferenceSchema = _227[1];
|
|
682
|
+
var _228 = (0, react_1.useState)([]), kanbanChecked = _228[0], setKanbanChecked = _228[1];
|
|
677
683
|
//INFO : Offline
|
|
678
|
-
var
|
|
679
|
-
var
|
|
684
|
+
var _229 = (0, react_1.useState)(0), offlineDataLength = _229[0], setOfflineDataLength = _229[1];
|
|
685
|
+
var _230 = (0, react_1.useState)(false), offlineModal = _230[0], setOfflineModal = _230[1];
|
|
680
686
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
681
|
-
var
|
|
682
|
-
var
|
|
687
|
+
var _231 = (0, react_1.useState)(false), isLive = _231[0], setIsLive = _231[1];
|
|
688
|
+
var _232 = (0, react_1.useState)(false), isLiveOffline = _232[0], setIsLiveOffline = _232[1];
|
|
683
689
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
684
690
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
685
691
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
686
|
-
var
|
|
692
|
+
var _233 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _233[0], setIsNetworkOffline = _233[1];
|
|
687
693
|
var previousType = (0, react_1.useRef)(null);
|
|
688
694
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
689
695
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -809,7 +815,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
809
815
|
: "general");
|
|
810
816
|
var isFirebaseClient = devSettings.server === "firebase";
|
|
811
817
|
var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
|
|
812
|
-
var
|
|
818
|
+
var isDateWarnings = !!((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.dateWarnings);
|
|
819
|
+
var isDatasheetDefaults = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.datasheetDefaults);
|
|
820
|
+
// INFO: the columns as the views draw them — with datasheet defaults every
|
|
821
|
+
// list option without a colour takes the palette colour of its position
|
|
822
|
+
var displayStructure = isDatasheetDefaults
|
|
823
|
+
? (0, defaultColours_1.handleApplyDefaultColours)(structure)
|
|
824
|
+
: structure;
|
|
825
|
+
var dbModule = isFirebaseClient ? (_15 = props.lib) === null || _15 === void 0 ? void 0 : _15.firebase : (_16 = props.lib) === null || _16 === void 0 ? void 0 : _16.axios;
|
|
813
826
|
var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
|
|
814
827
|
var selectedRelated = resolvedType === "read"
|
|
815
828
|
? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
|
|
@@ -818,6 +831,49 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
818
831
|
var _a, _b;
|
|
819
832
|
(_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListHandleLoading) === null || _b === void 0 ? void 0 : _b.call(_a, tableLoading);
|
|
820
833
|
}, [tableLoading]);
|
|
834
|
+
// INFO: group totals follow the rows — each read of the list, a filter or a
|
|
835
|
+
// saved edit, asks again
|
|
836
|
+
// INFO: per-group paging lands one read per group at first load, so the
|
|
837
|
+
// request waits for the reads to settle and goes once
|
|
838
|
+
(0, react_1.useEffect)(function () {
|
|
839
|
+
var timer = setTimeout(function () { return handleFetchGroupSummaries(); }, 300);
|
|
840
|
+
return function () { return clearTimeout(timer); };
|
|
841
|
+
/* eslint-disable */
|
|
842
|
+
}, [groupId, tableData]);
|
|
843
|
+
/* eslint-enable */
|
|
844
|
+
// INFO: comments are asked for again only when the rows on screen change,
|
|
845
|
+
// not on every edit of one of them
|
|
846
|
+
var commentCountKey = (tableData !== null && tableData !== void 0 ? tableData : [])
|
|
847
|
+
.map(function (eachRow) { var _a; return (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id; })
|
|
848
|
+
.join(",");
|
|
849
|
+
(0, react_1.useEffect)(function () {
|
|
850
|
+
var _a;
|
|
851
|
+
var onFetchCommentCounts = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onFetchCommentCounts;
|
|
852
|
+
if (!onFetchCommentCounts)
|
|
853
|
+
return;
|
|
854
|
+
var recordIds = (tableData !== null && tableData !== void 0 ? tableData : [])
|
|
855
|
+
.map(function (eachRow) { var _a; return (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id; })
|
|
856
|
+
.filter(Boolean);
|
|
857
|
+
if (recordIds.length === 0) {
|
|
858
|
+
setCommentCounts({});
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
var isCurrent = true;
|
|
862
|
+
var timer = setTimeout(function () {
|
|
863
|
+
onFetchCommentCounts(recordIds)
|
|
864
|
+
.then(function (counts) {
|
|
865
|
+
if (isCurrent)
|
|
866
|
+
setCommentCounts(counts !== null && counts !== void 0 ? counts : {});
|
|
867
|
+
})
|
|
868
|
+
.catch(function () { });
|
|
869
|
+
}, 300);
|
|
870
|
+
return function () {
|
|
871
|
+
isCurrent = false;
|
|
872
|
+
clearTimeout(timer);
|
|
873
|
+
};
|
|
874
|
+
/* eslint-disable */
|
|
875
|
+
}, [commentCountKey]);
|
|
876
|
+
/* eslint-enable */
|
|
821
877
|
// INFO: each other space whose rows point at this record becomes a tab of
|
|
822
878
|
// the read view, so the counts are taken with the record — one schema query
|
|
823
879
|
// plus one single-row query per referencing column. The rows themselves load
|
|
@@ -891,32 +947,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
891
947
|
}, [
|
|
892
948
|
resolvedType,
|
|
893
949
|
props.id,
|
|
894
|
-
(
|
|
950
|
+
(_17 = props.space) === null || _17 === void 0 ? void 0 : _17._id,
|
|
895
951
|
props.devSettings.schemaEndpoint,
|
|
896
|
-
(
|
|
952
|
+
(_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.showRelatedTab,
|
|
897
953
|
]);
|
|
898
954
|
/* eslint-enable */
|
|
899
955
|
// INFO: the view settings panel (columns, sort, rows per page) is standard on
|
|
900
956
|
// the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
|
|
901
|
-
var isViewSettingsEnabled = ((
|
|
957
|
+
var isViewSettingsEnabled = ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareViewSettings) || ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareNewDTW)
|
|
902
958
|
? true
|
|
903
959
|
: false;
|
|
904
960
|
// INFO: a consumer that wires onChangeHide owns the hide at schema level
|
|
905
961
|
// (shared by every user) — toggling writes to the model and calls back. Without it
|
|
906
962
|
// the hide is this user's own and lives in userHiddenColumnIds.
|
|
907
|
-
var isSchemaHideMode = ((
|
|
963
|
+
var isSchemaHideMode = ((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.onChangeHide) ? true : false;
|
|
908
964
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
909
965
|
// the persisted value and falls back to the consumer's limit
|
|
910
|
-
var
|
|
966
|
+
var _234 = (0, react_1.useState)((_23 = (_22 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _22 !== void 0 ? _22 : props.limit) !== null && _23 !== void 0 ? _23 : 10), pageLimit = _234[0], setPageLimit = _234[1];
|
|
911
967
|
var limit = pageLimit;
|
|
912
|
-
var isSavedViewsEnabled = !!((
|
|
968
|
+
var isSavedViewsEnabled = !!((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.savedViews) && resolvedType === "list";
|
|
913
969
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
914
970
|
// every view is the team's and nothing is kept locally
|
|
915
|
-
var isAppViews = ((
|
|
916
|
-
!!((
|
|
971
|
+
var isAppViews = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.sharedViews) !== undefined ||
|
|
972
|
+
!!((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.onChangeSharedViews);
|
|
917
973
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
918
974
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
919
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
975
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.sort);
|
|
920
976
|
var handleSortColumn = function (value) {
|
|
921
977
|
var _a, _b, _c, _d;
|
|
922
978
|
if (isInternalSort)
|
|
@@ -946,7 +1002,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
946
1002
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
947
1003
|
// can hand over the whole set — there formula columns are not offered for
|
|
948
1004
|
// sorting or filtering, rather than ordering one page
|
|
949
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
1005
|
+
var isFormulaViewSupported = !isFirebase && !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.unionCollections) === null || _29 === void 0 ? void 0 : _29.length);
|
|
950
1006
|
var formulaSort = isFormulaViewSupported &&
|
|
951
1007
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
952
1008
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -955,11 +1011,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
955
1011
|
// INFO: a referenced record and related rows are joined by MongoWrapper's
|
|
956
1012
|
// lookups and a list row is matched by its Mongo path — neither Firebase nor
|
|
957
1013
|
// a union read runs them
|
|
958
|
-
var flexFilterExtras = !isFirebase && !((
|
|
1014
|
+
var flexFilterExtras = !isFirebase && !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.unionCollections) === null || _31 === void 0 ? void 0 : _31.length)
|
|
959
1015
|
? {
|
|
960
|
-
references: (
|
|
961
|
-
listObjects: (
|
|
962
|
-
related: (
|
|
1016
|
+
references: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterReferences,
|
|
1017
|
+
listObjects: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterListObjects,
|
|
1018
|
+
related: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterRelated,
|
|
963
1019
|
}
|
|
964
1020
|
: undefined;
|
|
965
1021
|
var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
|
|
@@ -1020,18 +1076,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1020
1076
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1021
1077
|
};
|
|
1022
1078
|
};
|
|
1023
|
-
var
|
|
1024
|
-
var isEditor = ((
|
|
1025
|
-
var isOffline = (
|
|
1079
|
+
var _235 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _235.canUpdateRecord, canInlineUpdate = _235.canInlineUpdate, canBatchUpdate = _235.canBatchUpdate, canDeleteRecord = _235.canDeleteRecord;
|
|
1080
|
+
var isEditor = ((_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.allEditable) ? true : false;
|
|
1081
|
+
var isOffline = (_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOffline;
|
|
1026
1082
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1027
1083
|
// the live network state — online saves go to the server even if bareOffline
|
|
1028
1084
|
// is true, offline saves go to IDB as normal.
|
|
1029
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1030
|
-
var showId = (
|
|
1085
|
+
var isOfflineNetworkListener = isOffline && ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOfflineNetworkListener);
|
|
1086
|
+
var showId = (_38 = props.space) === null || _38 === void 0 ? void 0 : _38.showId;
|
|
1031
1087
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1032
|
-
var idField = ((
|
|
1033
|
-
var pipeline = (
|
|
1034
|
-
if ((
|
|
1088
|
+
var idField = ((_39 = props.space) === null || _39 === void 0 ? void 0 : _39.idField) || ((_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.idField);
|
|
1089
|
+
var pipeline = (_41 = props === null || props === void 0 ? void 0 : props.space) === null || _41 === void 0 ? void 0 : _41.pipeline;
|
|
1090
|
+
if ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareListPipeline) {
|
|
1035
1091
|
pipeline = pipeline
|
|
1036
1092
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1037
1093
|
}
|
|
@@ -1044,24 +1100,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1044
1100
|
* three records came back instead of five files, and each tile received the
|
|
1045
1101
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1046
1102
|
*/
|
|
1047
|
-
var fileViewColumnId = (
|
|
1103
|
+
var fileViewColumnId = (_46 = (_45 = ((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.extendedTabs) !== null && _44 !== void 0 ? _44 : []).find(function (eachTab) {
|
|
1048
1104
|
return eachTab.viewType === "file" &&
|
|
1049
1105
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1050
|
-
})) === null ||
|
|
1051
|
-
var hasNavigation = ((
|
|
1106
|
+
})) === null || _45 === void 0 ? void 0 : _45.fileSettings) === null || _46 === void 0 ? void 0 : _46.columnId;
|
|
1107
|
+
var hasNavigation = ((_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.handleNavigate) ? true : false;
|
|
1052
1108
|
var formColumn = "grid-cols-12";
|
|
1053
|
-
var useMobileView = (
|
|
1109
|
+
var useMobileView = (_49 = (_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareUpdateMobileView) !== null && _49 !== void 0 ? _49 : false;
|
|
1054
1110
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1055
|
-
var isActivityLog = (((
|
|
1056
|
-
((
|
|
1057
|
-
(((
|
|
1058
|
-
((
|
|
1059
|
-
var customPaginationSize = ((
|
|
1111
|
+
var isActivityLog = (((_51 = (_50 = props.edit) === null || _50 === void 0 ? void 0 : _50.activityLog) === null || _51 === void 0 ? void 0 : _51.enableComments) &&
|
|
1112
|
+
((_52 = props.edit) === null || _52 === void 0 ? void 0 : _52.activityLog.commentCollectionId)) ||
|
|
1113
|
+
(((_54 = (_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog) === null || _54 === void 0 ? void 0 : _54.enableLogs) &&
|
|
1114
|
+
((_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.activityLog.logsCollectionId));
|
|
1115
|
+
var customPaginationSize = ((_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.customPaginationCount)
|
|
1060
1116
|
? props.organise.customPaginationCount(size)
|
|
1061
1117
|
: undefined;
|
|
1062
1118
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1063
1119
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1064
|
-
dbModule: (
|
|
1120
|
+
dbModule: (_57 = props.lib) === null || _57 === void 0 ? void 0 : _57.axios,
|
|
1065
1121
|
dbType: devSettings.server,
|
|
1066
1122
|
dbCollection: props.collectionId,
|
|
1067
1123
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1069,7 +1125,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1069
1125
|
dbUserToken: devSettings.dbUserToken,
|
|
1070
1126
|
});
|
|
1071
1127
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1072
|
-
dbModule: (
|
|
1128
|
+
dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
|
|
1073
1129
|
dbType: devSettings.server,
|
|
1074
1130
|
dbCollection: props.collectionId,
|
|
1075
1131
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1077,12 +1133,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1077
1133
|
dbUserToken: devSettings.dbUserToken,
|
|
1078
1134
|
});
|
|
1079
1135
|
var moreButtonPopUp = [
|
|
1080
|
-
((
|
|
1136
|
+
((_59 = props.edit) === null || _59 === void 0 ? void 0 : _59.allEditable) &&
|
|
1081
1137
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1082
1138
|
// datasheet served through one can import; only the browser-direct
|
|
1083
1139
|
// Firebase client has no server to import through
|
|
1084
1140
|
!isFirebaseClient &&
|
|
1085
|
-
!((
|
|
1141
|
+
!((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideImportCSV)
|
|
1086
1142
|
? {
|
|
1087
1143
|
text: "Import Excel",
|
|
1088
1144
|
onClick: function () {
|
|
@@ -1091,7 +1147,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1091
1147
|
},
|
|
1092
1148
|
}
|
|
1093
1149
|
: null,
|
|
1094
|
-
!((
|
|
1150
|
+
!((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportCSV)
|
|
1095
1151
|
? {
|
|
1096
1152
|
text: "Export CSV",
|
|
1097
1153
|
onClick: function () {
|
|
@@ -1101,7 +1157,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1101
1157
|
},
|
|
1102
1158
|
}
|
|
1103
1159
|
: null,
|
|
1104
|
-
!((
|
|
1160
|
+
!((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportExcel)
|
|
1105
1161
|
? {
|
|
1106
1162
|
text: "Export Excel",
|
|
1107
1163
|
onClick: function () {
|
|
@@ -1111,7 +1167,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1111
1167
|
},
|
|
1112
1168
|
}
|
|
1113
1169
|
: null,
|
|
1114
|
-
!((
|
|
1170
|
+
!((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportPDF)
|
|
1115
1171
|
? {
|
|
1116
1172
|
text: "Export PDF",
|
|
1117
1173
|
onClick: function () {
|
|
@@ -1121,7 +1177,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1121
1177
|
},
|
|
1122
1178
|
}
|
|
1123
1179
|
: null,
|
|
1124
|
-
!((
|
|
1180
|
+
!((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportQR)
|
|
1125
1181
|
? {
|
|
1126
1182
|
text: "Export QR",
|
|
1127
1183
|
onClick: function () {
|
|
@@ -1131,7 +1187,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1131
1187
|
},
|
|
1132
1188
|
}
|
|
1133
1189
|
: null,
|
|
1134
|
-
!((
|
|
1190
|
+
!((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportQR)
|
|
1135
1191
|
? {
|
|
1136
1192
|
text: "Export QR(Data)",
|
|
1137
1193
|
onClick: function () {
|
|
@@ -1141,7 +1197,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1141
1197
|
},
|
|
1142
1198
|
}
|
|
1143
1199
|
: null,
|
|
1144
|
-
!((
|
|
1200
|
+
!((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportPrint)
|
|
1145
1201
|
? {
|
|
1146
1202
|
text: "Print",
|
|
1147
1203
|
onClick: function () {
|
|
@@ -1153,8 +1209,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1153
1209
|
: null,
|
|
1154
1210
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1155
1211
|
// nothing to find on any other page
|
|
1156
|
-
((
|
|
1157
|
-
!((
|
|
1212
|
+
((_74 = props.edit) === null || _74 === void 0 ? void 0 : _74.enableUpdateDraft) &&
|
|
1213
|
+
!((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideExportDraft)
|
|
1158
1214
|
? {
|
|
1159
1215
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1160
1216
|
onClick: function () {
|
|
@@ -1163,7 +1219,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1163
1219
|
}
|
|
1164
1220
|
: null,
|
|
1165
1221
|
].filter(Boolean);
|
|
1166
|
-
if ((
|
|
1222
|
+
if ((_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.moreSettings)
|
|
1167
1223
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1168
1224
|
//=====================================================================================
|
|
1169
1225
|
//SECTION: User Column Visibility Handlers
|
|
@@ -1557,14 +1613,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1557
1613
|
//=====================================================================================
|
|
1558
1614
|
//SECTION: Saved Views
|
|
1559
1615
|
//=====================================================================================
|
|
1560
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
1616
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.persistKey, (_79 = devSettings.currentUser) === null || _79 === void 0 ? void 0 : _79.userEmail);
|
|
1561
1617
|
(0, react_1.useEffect)(function () {
|
|
1562
1618
|
if (isSavedViewsEnabled && !isAppViews)
|
|
1563
1619
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
1564
1620
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
1565
1621
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
1566
1622
|
// browser until the person updates the view for everyone or resets it
|
|
1567
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
1623
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.allView) !== undefined;
|
|
1568
1624
|
var handleGetViewDraftKey = function (viewId) {
|
|
1569
1625
|
var _a, _b;
|
|
1570
1626
|
return (0, viewStatePersistence_1.buildViewDraftKey)(props.collectionId, viewId !== null && viewId !== void 0 ? viewId : "all", (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistKey, (_b = devSettings.currentUser) === null || _b === void 0 ? void 0 : _b.userEmail);
|
|
@@ -1641,7 +1697,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1641
1697
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
1642
1698
|
(0, react_1.useEffect)(function () {
|
|
1643
1699
|
lastSentSharedViewsRef.current = null;
|
|
1644
|
-
}, [(
|
|
1700
|
+
}, [(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.sharedViews]);
|
|
1645
1701
|
var handleStoreSharedViews = function (update) {
|
|
1646
1702
|
var _a, _b, _c;
|
|
1647
1703
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -1686,13 +1742,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1686
1742
|
/* eslint-disable */
|
|
1687
1743
|
}, [
|
|
1688
1744
|
isSavedViewsEnabled,
|
|
1689
|
-
(
|
|
1690
|
-
(
|
|
1691
|
-
(
|
|
1745
|
+
(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.initialSavedViewId,
|
|
1746
|
+
(_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.defaultSavedViewId,
|
|
1747
|
+
(_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.sharedViews,
|
|
1692
1748
|
savedViews,
|
|
1693
1749
|
]);
|
|
1694
1750
|
/* eslint-enable */
|
|
1695
|
-
var defaultSavedViewIds = ((
|
|
1751
|
+
var defaultSavedViewIds = ((_86 = (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.defaultSavedViews) !== null && _86 !== void 0 ? _86 : [])
|
|
1696
1752
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
1697
1753
|
.join("|");
|
|
1698
1754
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -1994,8 +2050,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1994
2050
|
pageLimit,
|
|
1995
2051
|
groupId,
|
|
1996
2052
|
columnWidths,
|
|
1997
|
-
(
|
|
1998
|
-
(
|
|
2053
|
+
(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.allView,
|
|
2054
|
+
(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.sharedViews,
|
|
1999
2055
|
savedViews,
|
|
2000
2056
|
]);
|
|
2001
2057
|
/* eslint-enable */
|
|
@@ -2035,7 +2091,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2035
2091
|
var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
|
|
2036
2092
|
scrollRestoredRef.current = isSwitch || isOtherListReturn;
|
|
2037
2093
|
/* eslint-disable */
|
|
2038
|
-
}, [props.collectionId, (
|
|
2094
|
+
}, [props.collectionId, (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.persistKey]);
|
|
2039
2095
|
/* eslint-enable */
|
|
2040
2096
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2041
2097
|
(0, react_1.useEffect)(function () {
|
|
@@ -2070,7 +2126,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2070
2126
|
(0, react_1.useEffect)(function () {
|
|
2071
2127
|
handleOfflinePrefetch();
|
|
2072
2128
|
/* eslint-disable */
|
|
2073
|
-
}, [props.collectionId, (
|
|
2129
|
+
}, [props.collectionId, (_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.bareOffline]);
|
|
2074
2130
|
/* eslint-enable */
|
|
2075
2131
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2076
2132
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2090,7 +2146,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2090
2146
|
}, interval);
|
|
2091
2147
|
return function () { return clearInterval(timer); };
|
|
2092
2148
|
/* eslint-disable */
|
|
2093
|
-
}, [(
|
|
2149
|
+
}, [(_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.barePollingInterval, isLive, isNetworkOffline]);
|
|
2094
2150
|
/* eslint-enable */
|
|
2095
2151
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2096
2152
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2132,7 +2188,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2132
2188
|
};
|
|
2133
2189
|
/* eslint-disable */
|
|
2134
2190
|
}, [
|
|
2135
|
-
(
|
|
2191
|
+
(_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.bareSocketName,
|
|
2136
2192
|
props.collectionId,
|
|
2137
2193
|
props.devSettings.sseEndpoint,
|
|
2138
2194
|
props.devSettings.dbAPIToken,
|
|
@@ -2406,10 +2462,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2406
2462
|
props.collectionId,
|
|
2407
2463
|
props.model,
|
|
2408
2464
|
props.localURLEndpoint,
|
|
2409
|
-
(
|
|
2465
|
+
(_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.extendedTabs,
|
|
2410
2466
|
listViewId,
|
|
2411
|
-
(
|
|
2412
|
-
(
|
|
2467
|
+
(_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.additionalQuery,
|
|
2468
|
+
(_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.groupBy,
|
|
2413
2469
|
resolvedType,
|
|
2414
2470
|
]);
|
|
2415
2471
|
/**
|
|
@@ -2561,7 +2617,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2561
2617
|
};
|
|
2562
2618
|
}, 100);
|
|
2563
2619
|
return function () { return clearTimeout(timeoutId); };
|
|
2564
|
-
}, [(
|
|
2620
|
+
}, [(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
2565
2621
|
(0, react_1.useEffect)(function () {
|
|
2566
2622
|
if (resolvedType !== "read")
|
|
2567
2623
|
return;
|
|
@@ -2860,7 +2916,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2860
2916
|
(0, listModule_1.handleDataEditButton)(tempData, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate, (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListActionBtns, undefined, undefined, undefined, !canUpdateRecord);
|
|
2861
2917
|
return tempData;
|
|
2862
2918
|
})];
|
|
2863
|
-
case 2: return [2 /*return*/, (0, listModule_1.handleListDataBasedOnModel)(records, props.devSettings, (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios,
|
|
2919
|
+
case 2: return [2 /*return*/, (0, listModule_1.handleListDataBasedOnModel)(records, props.devSettings, (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios, displayStructure, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_c = props.edit) === null || _c === void 0 ? void 0 : _c.activityLog : undefined, (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
|
|
2864
2920
|
}
|
|
2865
2921
|
});
|
|
2866
2922
|
}); };
|
|
@@ -3363,7 +3419,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3363
3419
|
return serverId === "_id" && eachRow && eachRow["_id"] === undefined
|
|
3364
3420
|
? __assign(__assign({}, eachRow), { _id: (_a = eachRow.recordId) !== null && _a !== void 0 ? _a : eachRow.id }) : eachRow;
|
|
3365
3421
|
});
|
|
3366
|
-
return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(sourceRows, props.devSettings, (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios,
|
|
3422
|
+
return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(sourceRows, props.devSettings, (_a = props.lib) === null || _a === void 0 ? void 0 : _a.axios, displayStructure, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_c = props.edit) === null || _c === void 0 ? void 0 : _c.activityLog : undefined, (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
|
|
3367
3423
|
case 1:
|
|
3368
3424
|
rebuilt = _e.sent();
|
|
3369
3425
|
if (rebuilt.length !== displayRows.length)
|
|
@@ -3599,7 +3655,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3599
3655
|
});
|
|
3600
3656
|
prettierDataList = dummyPrettierDataList_1;
|
|
3601
3657
|
return [3 /*break*/, 5];
|
|
3602
|
-
case 3: return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(responseData === null || responseData === void 0 ? void 0 : responseData.data, props.devSettings, (_b = props.lib) === null || _b === void 0 ? void 0 : _b.axios,
|
|
3658
|
+
case 3: return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(responseData === null || responseData === void 0 ? void 0 : responseData.data, props.devSettings, (_b = props.lib) === null || _b === void 0 ? void 0 : _b.axios, displayStructure, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_d = props.edit) === null || _d === void 0 ? void 0 : _d.activityLog : undefined, (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
|
|
3603
3659
|
case 4:
|
|
3604
3660
|
prettierDataList = _p.sent();
|
|
3605
3661
|
if (props.groupId) {
|
|
@@ -5637,7 +5693,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5637
5693
|
// update an inline cell edit makes, gated on the same update right
|
|
5638
5694
|
var columnTypeActions = {
|
|
5639
5695
|
canUpdate: canUpdateRecord,
|
|
5640
|
-
|
|
5696
|
+
dateWarnings: isDateWarnings,
|
|
5697
|
+
onButtonClick: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.onButtonClick,
|
|
5641
5698
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5642
5699
|
var _a;
|
|
5643
5700
|
return __generator(this, function (_b) {
|
|
@@ -5654,7 +5711,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5654
5711
|
}
|
|
5655
5712
|
});
|
|
5656
5713
|
}); },
|
|
5657
|
-
onTimeTrackingAction: ((
|
|
5714
|
+
onTimeTrackingAction: ((_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onTimeTrackingAction) && canUpdateRecord
|
|
5658
5715
|
? function (rowId, columnId, action) {
|
|
5659
5716
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
5660
5717
|
}
|
|
@@ -7872,8 +7929,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7872
7929
|
: rows;
|
|
7873
7930
|
};
|
|
7874
7931
|
/* eslint-disable */
|
|
7875
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
7876
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
7932
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_99 = props.bareSettings) === null || _99 === void 0 ? void 0 : _99.bareNewDTW]);
|
|
7933
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
|
|
7877
7934
|
/* eslint-enable */
|
|
7878
7935
|
// INFO: the pencil beside a record's title opens the same form the Update
|
|
7879
7936
|
// column's pencil did, for whoever may update; the bubble beside it opens
|
|
@@ -7898,7 +7955,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7898
7955
|
var _a, _b;
|
|
7899
7956
|
var tableHeader = [];
|
|
7900
7957
|
var activeUserHiddenColumnIds = getActiveUserHiddenColumnIds();
|
|
7901
|
-
|
|
7958
|
+
displayStructure.map(function (eachAttribute) {
|
|
7902
7959
|
var _a, _b;
|
|
7903
7960
|
if (eachAttribute.id === "baseDraft" ||
|
|
7904
7961
|
utils_1.NON_TABLE_COLUMN_DATA_TYPES.includes(eachAttribute.type) ||
|
|
@@ -9819,7 +9876,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9819
9876
|
// INFO: the grouped column and its sections in option order — a status
|
|
9820
9877
|
// column's options, Yes / No, or the workspace's members
|
|
9821
9878
|
var handleGetGroupColumn = function () {
|
|
9822
|
-
return groupId
|
|
9879
|
+
return groupId
|
|
9880
|
+
? displayStructure.find(function (eachDS) { return eachDS.id === groupId; })
|
|
9881
|
+
: undefined;
|
|
9823
9882
|
};
|
|
9824
9883
|
var handleGetGroupColumnOptions = function () {
|
|
9825
9884
|
return (0, groupSections_1.handleGetGroupOptions)(handleGetGroupColumn(), props.devSettings.organisationMembers);
|
|
@@ -9845,20 +9904,175 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9845
9904
|
isFirebase: isFirebase,
|
|
9846
9905
|
}).map(function (eachSection) {
|
|
9847
9906
|
var _a;
|
|
9848
|
-
return (__assign(__assign({}, eachSection), {
|
|
9849
|
-
|
|
9907
|
+
return (__assign(__assign({}, eachSection), {
|
|
9908
|
+
// INFO: a row added in the group since its read is counted at once
|
|
9909
|
+
count: isGroupPaging && ((_a = groupPageState[eachSection.id]) === null || _a === void 0 ? void 0 : _a.fetched)
|
|
9910
|
+
? Math.max(groupPageState[eachSection.id].size, eachSection.rowIds.length)
|
|
9850
9911
|
: undefined }));
|
|
9851
9912
|
});
|
|
9852
9913
|
// INFO: a section whose own query came back empty has nothing to show
|
|
9853
|
-
|
|
9854
|
-
|
|
9914
|
+
var shownSections = isGroupPaging
|
|
9915
|
+
? sections.filter(function (eachGroup) {
|
|
9855
9916
|
var _a, _b;
|
|
9856
9917
|
return eachGroup.rowIds.length > 0 ||
|
|
9857
9918
|
!(((_a = groupPageState[eachGroup.id]) === null || _a === void 0 ? void 0 : _a.fetched) &&
|
|
9858
9919
|
((_b = groupPageState[eachGroup.id]) === null || _b === void 0 ? void 0 : _b.size) === 0);
|
|
9859
|
-
})
|
|
9860
|
-
|
|
9920
|
+
})
|
|
9921
|
+
: sections;
|
|
9922
|
+
return handleApplyGroupDefaults(shownSections);
|
|
9923
|
+
};
|
|
9924
|
+
// INFO: every section is coloured — by its option's
|
|
9925
|
+
// position, so a group keeps its colour as others empty — person groups
|
|
9926
|
+
// show the person's face, and a section that one value stands for can be
|
|
9927
|
+
// joined by adding a row in it or dragging one onto it
|
|
9928
|
+
var handleApplyGroupDefaults = function (sections) {
|
|
9929
|
+
var _a, _b;
|
|
9930
|
+
if (!isDatasheetDefaults)
|
|
9931
|
+
return sections;
|
|
9932
|
+
var column = handleGetGroupColumn();
|
|
9933
|
+
var options = (_a = handleGetGroupColumnOptions()) !== null && _a !== void 0 ? _a : [];
|
|
9934
|
+
var members = (_b = props.devSettings.organisationMembers) !== null && _b !== void 0 ? _b : [];
|
|
9935
|
+
return sections.map(function (eachSection, index) {
|
|
9936
|
+
var _a;
|
|
9937
|
+
var _b, _c;
|
|
9938
|
+
var isSpecial = eachSection.id === groupSections_1.GROUP_UNKNOWN_KEY ||
|
|
9939
|
+
eachSection.id === groupSections_1.GROUP_EMPTY_KEY;
|
|
9940
|
+
var optionIndex = options.findIndex(function (eachOption) { return eachOption.key === eachSection.id; });
|
|
9941
|
+
var member = (column === null || column === void 0 ? void 0 : column.type) === "person" && !isSpecial
|
|
9942
|
+
? members.find(function (eachMember) { return eachMember.key === eachSection.id; })
|
|
9943
|
+
: undefined;
|
|
9944
|
+
var join = handleGetGroupJoin(column, eachSection.id);
|
|
9945
|
+
return __assign(__assign({}, eachSection), { colour: (_b = eachSection.colour) !== null && _b !== void 0 ? _b : (isSpecial
|
|
9946
|
+
? undefined
|
|
9947
|
+
: (0, defaultColours_1.handleGetDefaultColour)(optionIndex >= 0 ? optionIndex : index)), avatar: (column === null || column === void 0 ? void 0 : column.type) === "person" && !isSpecial
|
|
9948
|
+
? { label: (_c = member === null || member === void 0 ? void 0 : member.label) !== null && _c !== void 0 ? _c : eachSection.title, image: member === null || member === void 0 ? void 0 : member.image }
|
|
9949
|
+
: undefined, joinValues: column && join ? (_a = {}, _a[column.id] = join.value, _a) : undefined,
|
|
9950
|
+
// INFO: drawn once the totals are in. The count is shown only when it
|
|
9951
|
+
// is the group's real total — a group built from one page of the list
|
|
9952
|
+
// would otherwise count that page beside sums of every row
|
|
9953
|
+
summary: groupSummaries[eachSection.id]
|
|
9954
|
+
? {
|
|
9955
|
+
count: eachSection.count,
|
|
9956
|
+
sums: groupSummaries[eachSection.id],
|
|
9957
|
+
}
|
|
9958
|
+
: undefined });
|
|
9959
|
+
});
|
|
9960
|
+
};
|
|
9961
|
+
// INFO: the number columns on screen, which each group totals
|
|
9962
|
+
var handleGetGroupSumIds = function () {
|
|
9963
|
+
var hiddenIds = getActiveUserHiddenColumnIds();
|
|
9964
|
+
return displayStructure
|
|
9965
|
+
.filter(function (eachColumn) {
|
|
9966
|
+
return eachColumn.type === "number" &&
|
|
9967
|
+
!eachColumn.ratingMax &&
|
|
9968
|
+
!eachColumn.hide &&
|
|
9969
|
+
!hiddenIds.includes(eachColumn.id);
|
|
9970
|
+
})
|
|
9971
|
+
.map(function (eachColumn) { return eachColumn.id; });
|
|
9972
|
+
};
|
|
9973
|
+
/**
|
|
9974
|
+
* INFO: each group's total per number column over every row the filters
|
|
9975
|
+
* match — the database sums them, one request per column, as a chart's
|
|
9976
|
+
* grouped sum does, so a group showing one page of its rows still totals
|
|
9977
|
+
* all of them. The latest request wins; a reply to filters since changed is
|
|
9978
|
+
* dropped.
|
|
9979
|
+
*/
|
|
9980
|
+
var handleFetchGroupSummaries = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
9981
|
+
var column, requestId, sumIds, query, range, results, options_1, sums_1, _a;
|
|
9982
|
+
var _b, _c, _d, _e;
|
|
9983
|
+
return __generator(this, function (_f) {
|
|
9984
|
+
switch (_f.label) {
|
|
9985
|
+
case 0:
|
|
9986
|
+
column = handleGetGroupColumn();
|
|
9987
|
+
requestId = ++groupSummaryRequestRef.current;
|
|
9988
|
+
sumIds = handleGetGroupSumIds();
|
|
9989
|
+
if (!column ||
|
|
9990
|
+
!isDatasheetDefaults ||
|
|
9991
|
+
!((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) ||
|
|
9992
|
+
isFirebase ||
|
|
9993
|
+
// INFO: a formula filter is applied here, not on the server, so the
|
|
9994
|
+
// server's sums would include rows it hides; a union list cannot take
|
|
9995
|
+
// an aggregate
|
|
9996
|
+
isFormulaView ||
|
|
9997
|
+
!!((_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.unionCollections) === null || _d === void 0 ? void 0 : _d.length) ||
|
|
9998
|
+
sumIds.length === 0) {
|
|
9999
|
+
setGroupSummaries(function (previous) {
|
|
10000
|
+
return Object.keys(previous).length > 0 ? {} : previous;
|
|
10001
|
+
});
|
|
10002
|
+
return [2 /*return*/];
|
|
10003
|
+
}
|
|
10004
|
+
query = (_e = renderImpSearchFilterConditions()) !== null && _e !== void 0 ? _e : [];
|
|
10005
|
+
range = [(0, dayjs_1.default)().add(1, "day").format("DD/MM/YYYY HH:mm:ss")];
|
|
10006
|
+
_f.label = 1;
|
|
10007
|
+
case 1:
|
|
10008
|
+
_f.trys.push([1, 3, , 4]);
|
|
10009
|
+
return [4 /*yield*/, Promise.all(sumIds.map(function (eachId) {
|
|
10010
|
+
return readServerQuery.call({
|
|
10011
|
+
type: "list",
|
|
10012
|
+
query: query,
|
|
10013
|
+
aggregate: {
|
|
10014
|
+
type: "sum",
|
|
10015
|
+
queryId: eachId,
|
|
10016
|
+
groupId: column.id,
|
|
10017
|
+
range: range,
|
|
10018
|
+
timezone: dayjs_1.default.tz.guess(),
|
|
10019
|
+
},
|
|
10020
|
+
});
|
|
10021
|
+
}))];
|
|
10022
|
+
case 2:
|
|
10023
|
+
results = _f.sent();
|
|
10024
|
+
if (requestId !== groupSummaryRequestRef.current)
|
|
10025
|
+
return [2 /*return*/];
|
|
10026
|
+
options_1 = handleGetGroupColumnOptions();
|
|
10027
|
+
sums_1 = {};
|
|
10028
|
+
results.forEach(function (eachResult, index) {
|
|
10029
|
+
(0, chartResults_1.handleFlattenGroupedResult)(eachResult === null || eachResult === void 0 ? void 0 : eachResult.data).forEach(function (eachGroup) {
|
|
10030
|
+
var _a, _b, _c;
|
|
10031
|
+
var sectionId = (0, groupSections_1.handleGetGroupKey)(column, eachGroup.key, options_1, isFirebase);
|
|
10032
|
+
var sectionSums = (sums_1[sectionId] = (_a = sums_1[sectionId]) !== null && _a !== void 0 ? _a : {});
|
|
10033
|
+
sectionSums[sumIds[index]] =
|
|
10034
|
+
((_b = sectionSums[sumIds[index]]) !== null && _b !== void 0 ? _b : 0) + ((_c = eachGroup.value) !== null && _c !== void 0 ? _c : 0);
|
|
10035
|
+
});
|
|
10036
|
+
});
|
|
10037
|
+
setGroupSummaries(sums_1);
|
|
10038
|
+
return [3 /*break*/, 4];
|
|
10039
|
+
case 3:
|
|
10040
|
+
_a = _f.sent();
|
|
10041
|
+
if (requestId === groupSummaryRequestRef.current)
|
|
10042
|
+
setGroupSummaries({});
|
|
10043
|
+
return [3 /*break*/, 4];
|
|
10044
|
+
case 4: return [2 /*return*/];
|
|
10045
|
+
}
|
|
10046
|
+
});
|
|
10047
|
+
}); };
|
|
10048
|
+
// INFO: a required column cannot be emptied, so its No Value group takes
|
|
10049
|
+
// no new or moved row — as a kanban's Unassigned column does not
|
|
10050
|
+
var handleGetGroupJoin = function (column, sectionId) {
|
|
10051
|
+
return sectionId === groupSections_1.GROUP_EMPTY_KEY && !(column === null || column === void 0 ? void 0 : column.optional)
|
|
10052
|
+
? undefined
|
|
10053
|
+
: (0, groupSections_1.handleGetGroupSectionValue)(column, sectionId);
|
|
9861
10054
|
};
|
|
10055
|
+
// INFO: a row dropped on a group saves that group's value, as a card moved
|
|
10056
|
+
// to another kanban column does
|
|
10057
|
+
var handleMoveRowToGroup = function (rowId, sectionId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10058
|
+
var column, join;
|
|
10059
|
+
var _a;
|
|
10060
|
+
return __generator(this, function (_b) {
|
|
10061
|
+
switch (_b.label) {
|
|
10062
|
+
case 0:
|
|
10063
|
+
column = handleGetGroupColumn();
|
|
10064
|
+
join = handleGetGroupJoin(column, sectionId);
|
|
10065
|
+
if (!column || !join || !canUpdateRecord)
|
|
10066
|
+
return [2 /*return*/];
|
|
10067
|
+
return [4 /*yield*/, handleSubmitData("update", rowId, column.id, (_a = {},
|
|
10068
|
+
_a[column.id] = join.value,
|
|
10069
|
+
_a))];
|
|
10070
|
+
case 1:
|
|
10071
|
+
_b.sent();
|
|
10072
|
+
return [2 /*return*/];
|
|
10073
|
+
}
|
|
10074
|
+
});
|
|
10075
|
+
}); };
|
|
9862
10076
|
// INFO: a row's section under per-group paging
|
|
9863
10077
|
var handleResolveGroupKey = function (row) {
|
|
9864
10078
|
return (0, groupSections_1.handleGetGroupKey)(handleGetGroupColumn(), groupId ? row === null || row === void 0 ? void 0 : row[groupId] : undefined, handleGetGroupColumnOptions(), isFirebase);
|
|
@@ -9902,7 +10116,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9902
10116
|
count = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.count) !== null && _d !== void 0 ? _d : 0;
|
|
9903
10117
|
prettierRows = [];
|
|
9904
10118
|
if (!(rawRows.length > 0)) return [3 /*break*/, 3];
|
|
9905
|
-
return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(rawRows, props.devSettings, (_e = props.lib) === null || _e === void 0 ? void 0 : _e.axios,
|
|
10119
|
+
return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(rawRows, props.devSettings, (_e = props.lib) === null || _e === void 0 ? void 0 : _e.axios, displayStructure, (_f = props.organise) === null || _f === void 0 ? void 0 : _f.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_g = props.edit) === null || _g === void 0 ? void 0 : _g.activityLog : undefined, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
|
|
9906
10120
|
case 2:
|
|
9907
10121
|
prettierRows = _j.sent();
|
|
9908
10122
|
rawRows.forEach(function (eachData) {
|
|
@@ -10071,7 +10285,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10071
10285
|
};
|
|
10072
10286
|
};
|
|
10073
10287
|
var renderGroupTable = function (multipleSelect) {
|
|
10074
|
-
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;
|
|
10288
|
+
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;
|
|
10075
10289
|
if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
|
|
10076
10290
|
// INFO: sections are keyed off the raw rows, in option order, with
|
|
10077
10291
|
// Unknown and No Value last — the same sections the new table draws
|
|
@@ -10198,7 +10412,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10198
10412
|
else {
|
|
10199
10413
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
10200
10414
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
|
|
10201
|
-
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: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), onRowActivity: recordActivityAction, onRowEdit: recordEditAction,
|
|
10415
|
+
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: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), onRowActivity: recordActivityAction, onRowEdit: recordEditAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
|
|
10416
|
+
? handleMoveRowToGroup
|
|
10417
|
+
: undefined,
|
|
10202
10418
|
// INFO: per-group paging — scroll appends inside a band, page
|
|
10203
10419
|
// mode gives each band its own pager; undefined = bands as before
|
|
10204
10420
|
onGroupLoadMore: renderCheckGroupPaging() && renderCheckScrollMode()
|
|
@@ -10207,8 +10423,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10207
10423
|
? function (groupKey, page) {
|
|
10208
10424
|
return handleFetchGroupPage(groupKey, page);
|
|
10209
10425
|
}
|
|
10210
|
-
: undefined, groupLoadingStatus: renderCheckGroupPaging() ? groupPageState : 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: ((
|
|
10211
|
-
!((
|
|
10426
|
+
: undefined, groupLoadingStatus: renderCheckGroupPaging() ? groupPageState : 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: ((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.disableSelectFullData) === null || _f === void 0 ? void 0 : _f.table) || isFormulaView, maxSelectedCount: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMaxSelectedCount, mobileView: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListMobileView, mobileTooltip: (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
10427
|
+
!((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareHideTableExtraMultipleAction)
|
|
10212
10428
|
? [
|
|
10213
10429
|
{
|
|
10214
10430
|
id: "clone",
|
|
@@ -10236,7 +10452,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10236
10452
|
onClick: function () { return setBatchUpdateModal(true); },
|
|
10237
10453
|
},
|
|
10238
10454
|
]
|
|
10239
|
-
: []), true), (((
|
|
10455
|
+
: []), true), (((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListMultipleSelectAddtionalActions)
|
|
10240
10456
|
? props.bareSettings.bareListMultipleSelectAddtionalActions.map(function (eachButton) { return ({
|
|
10241
10457
|
id: "dt-list-multi-action-btn-" + eachButton.text,
|
|
10242
10458
|
btnText: eachButton.text,
|
|
@@ -10245,43 +10461,43 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10245
10461
|
return (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
10246
10462
|
},
|
|
10247
10463
|
}); })
|
|
10248
|
-
: []), true), multiActionFloatingOffset: (
|
|
10464
|
+
: []), true), multiActionFloatingOffset: (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(true), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
|
|
10249
10465
|
var _a, _b;
|
|
10250
10466
|
handleCaptureListScroll(id);
|
|
10251
10467
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
10252
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
10468
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_p = (_o = props.newTabUrl) === null || _o === void 0 ? void 0 : _o.default) !== null && _p !== void 0 ? _p : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_r = (_q = props.newTabUrl) === null || _q === void 0 ? void 0 : _q.addons) !== null && _r !== void 0 ? _r : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
10253
10469
|
handlePagination(value);
|
|
10254
|
-
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (
|
|
10470
|
+
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.fixedPagination, advSettings: {
|
|
10255
10471
|
// INFO: bareAddColumns routes the + to the name/type popup; without
|
|
10256
10472
|
// it the flag behaves as it always did and opens the formula builder
|
|
10257
|
-
flat: (
|
|
10258
|
-
addColumnEnabled: ((
|
|
10259
|
-
((
|
|
10260
|
-
onAddColumn: ((
|
|
10473
|
+
flat: (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareFlatTable,
|
|
10474
|
+
addColumnEnabled: ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareAddColumns) ||
|
|
10475
|
+
((_v = props.organise) === null || _v === void 0 ? void 0 : _v.addColumnEnabled),
|
|
10476
|
+
onAddColumn: ((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareAddColumns)
|
|
10261
10477
|
? handleAddPlainColumn
|
|
10262
10478
|
: undefined,
|
|
10263
|
-
onDeleteColumn: ((
|
|
10479
|
+
onDeleteColumn: ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareAddColumns)
|
|
10264
10480
|
? handleDeletePlainColumn
|
|
10265
10481
|
: undefined,
|
|
10266
|
-
onEditColumn: ((
|
|
10482
|
+
onEditColumn: ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareAddColumns)
|
|
10267
10483
|
? handleEditPlainColumn
|
|
10268
10484
|
: undefined,
|
|
10269
|
-
getColumnSchema: ((
|
|
10485
|
+
getColumnSchema: ((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareAddColumns)
|
|
10270
10486
|
? function (columnId) {
|
|
10271
|
-
return
|
|
10487
|
+
return displayStructure.find(function (eachColumn) { return eachColumn.id === columnId; });
|
|
10272
10488
|
}
|
|
10273
10489
|
: undefined,
|
|
10274
|
-
getSchema: ((
|
|
10490
|
+
getSchema: ((_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareAddColumns)
|
|
10275
10491
|
? function () { return structure; }
|
|
10276
10492
|
: undefined,
|
|
10277
|
-
renderAddColumnElements: ((
|
|
10493
|
+
renderAddColumnElements: ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareAddColumns)
|
|
10278
10494
|
? undefined
|
|
10279
10495
|
: renderAddMathColumn,
|
|
10280
10496
|
// INFO: the popup's reference pickers read from the same providers
|
|
10281
10497
|
// the schema editor uses — without them a reference column would be
|
|
10282
10498
|
// created with no target and resolve nothing
|
|
10283
|
-
renderReferenceSpaceOptions: (
|
|
10284
|
-
renderReferenceLabelOptions: (
|
|
10499
|
+
renderReferenceSpaceOptions: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.renderReferenceSpaceOptions,
|
|
10500
|
+
renderReferenceLabelOptions: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.renderReferenceLabelOptions,
|
|
10285
10501
|
dragEnabled: isViewSettingsEnabled,
|
|
10286
10502
|
sortEnabled: isViewSettingsEnabled,
|
|
10287
10503
|
// INFO: per-column header filter is replaced by the flex filters
|
|
@@ -10327,7 +10543,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10327
10543
|
});
|
|
10328
10544
|
}); },
|
|
10329
10545
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
10330
|
-
active: ((
|
|
10546
|
+
active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
|
|
10331
10547
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10332
10548
|
var createdId;
|
|
10333
10549
|
return __generator(this, function (_a) {
|
|
@@ -10341,16 +10557,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10341
10557
|
}
|
|
10342
10558
|
});
|
|
10343
10559
|
}); },
|
|
10344
|
-
}, darkMode: (
|
|
10560
|
+
}, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode,
|
|
10345
10561
|
// INFO: each band pages itself, so the list-wide pager would only
|
|
10346
10562
|
// page the read that seeded them
|
|
10347
|
-
hidePagination: ((
|
|
10348
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (
|
|
10563
|
+
hidePagination: ((_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.hidePagination) ||
|
|
10564
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.disableEllipsisOnLongWord, pinColumns: (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareListTablePinColumns }));
|
|
10349
10565
|
}
|
|
10350
|
-
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, 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: ((
|
|
10566
|
+
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, 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: ((_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.disableSelectFullData) === null || _10 === void 0 ? void 0 : _10.table) || isFormulaView, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
10351
10567
|
selectedIds.length > 0 &&
|
|
10352
10568
|
canBatchUpdate &&
|
|
10353
|
-
!((
|
|
10569
|
+
!((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10354
10570
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10355
10571
|
handleCloneSelectedData();
|
|
10356
10572
|
} }))),
|
|
@@ -10361,8 +10577,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10361
10577
|
!isFirebase && canBatchUpdate && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
10362
10578
|
setBatchUpdateModal(true);
|
|
10363
10579
|
} })),
|
|
10364
|
-
((
|
|
10365
|
-
((
|
|
10580
|
+
((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareListMultipleSelectAddtionalActions) &&
|
|
10581
|
+
((_14 = (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareListMultipleSelectAddtionalActions) === null || _14 === void 0 ? void 0 : _14.map(function (eachButton) {
|
|
10366
10582
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
10367
10583
|
var _a, _b;
|
|
10368
10584
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -10371,10 +10587,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10371
10587
|
var _a, _b;
|
|
10372
10588
|
handleCaptureListScroll(id);
|
|
10373
10589
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
10374
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
10590
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_16 = (_15 = props.newTabUrl) === null || _15 === void 0 ? void 0 : _15.default) !== null && _16 !== void 0 ? _16 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_18 = (_17 = props.newTabUrl) === null || _17 === void 0 ? void 0 : _17.addons) !== null && _18 !== void 0 ? _18 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
10375
10591
|
handlePagination(value);
|
|
10376
|
-
}, className: "mt-5", lib: { axios: (
|
|
10377
|
-
addColumnEnabled: (
|
|
10592
|
+
}, className: "mt-5", lib: { axios: (_19 = props.lib) === null || _19 === void 0 ? void 0 : _19.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.fixedPagination, advSettings: {
|
|
10593
|
+
addColumnEnabled: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.addColumnEnabled,
|
|
10378
10594
|
renderAddColumnElements: renderAddMathColumn,
|
|
10379
10595
|
dragEnabled: isViewSettingsEnabled,
|
|
10380
10596
|
sortEnabled: isViewSettingsEnabled,
|
|
@@ -10417,7 +10633,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10417
10633
|
});
|
|
10418
10634
|
}); },
|
|
10419
10635
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
10420
|
-
active: ((
|
|
10636
|
+
active: ((_22 = props.edit) === null || _22 === void 0 ? void 0 : _22.listAddable) ? true : false,
|
|
10421
10637
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10422
10638
|
var createdId;
|
|
10423
10639
|
return __generator(this, function (_a) {
|
|
@@ -10431,7 +10647,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10431
10647
|
}
|
|
10432
10648
|
});
|
|
10433
10649
|
}); },
|
|
10434
|
-
}, darkMode: (
|
|
10650
|
+
}, darkMode: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.darkMode, hidePagination: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.disableEllipsisOnLongWord }));
|
|
10435
10651
|
}
|
|
10436
10652
|
};
|
|
10437
10653
|
// INFO: `hidden` keeps the markers out of space-y spacing
|
|
@@ -11449,7 +11665,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11449
11665
|
} }));
|
|
11450
11666
|
}
|
|
11451
11667
|
else if (selectedTabData.viewType === "chart") {
|
|
11452
|
-
return (react_1.default.createElement(chartView_1.ChartView, { charts: (_61 = selectedTabData.chartSettings) !== null && _61 !== void 0 ? _61 : [], structure: structure, collectionId: props.collectionId, devSettings: props.devSettings, filterQuery: (_62 = renderImpSearchFilterConditions()) !== null && _62 !== void 0 ? _62 : [], editable: isEditor, darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, onChangeCharts: ((_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.onChangeTabs)
|
|
11668
|
+
return (react_1.default.createElement(chartView_1.ChartView, { charts: (_61 = selectedTabData.chartSettings) !== null && _61 !== void 0 ? _61 : [], structure: structure, collectionId: props.collectionId, devSettings: props.devSettings, filterQuery: (_62 = renderImpSearchFilterConditions()) !== null && _62 !== void 0 ? _62 : [], editable: isEditor, multicolourDefault: isDatasheetDefaults, darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, onChangeCharts: ((_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.onChangeTabs)
|
|
11453
11669
|
? function (charts) {
|
|
11454
11670
|
return handleChangeTabCharts(selectedTabData.name, charts);
|
|
11455
11671
|
}
|
|
@@ -11920,14 +12136,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11920
12136
|
};
|
|
11921
12137
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
11922
12138
|
renderNotification("root"),
|
|
11923
|
-
((
|
|
12139
|
+
((_102 = (_101 = props.renderSettings) === null || _101 === void 0 ? void 0 : _101.renderLoadingUI) === null || _102 === void 0 ? void 0 : _102.call(_101)) && loading ? ((_103 = props.renderSettings) === null || _103 === void 0 ? void 0 : _103.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
11924
12140
|
var _a, _b;
|
|
11925
12141
|
if (loading)
|
|
11926
12142
|
return;
|
|
11927
12143
|
handlePopUpModal(false);
|
|
11928
12144
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
11929
12145
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
11930
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12146
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
11931
12147
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
11932
12148
|
if (dataId) {
|
|
11933
12149
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -11943,19 +12159,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11943
12159
|
}, onClose: function () {
|
|
11944
12160
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
11945
12161
|
} }),
|
|
11946
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12162
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
11947
12163
|
setReferenceDeleteTableData({});
|
|
11948
12164
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11949
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12165
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
11950
12166
|
setDeletePasscodeInput("");
|
|
11951
12167
|
setDeleteModal(!deleteModal);
|
|
11952
12168
|
setDeleteFeedId("");
|
|
11953
12169
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11954
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12170
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
11955
12171
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
11956
12172
|
setBatchUpdateModal(false);
|
|
11957
12173
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
11958
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
12174
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkMode, darkModeBg: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
11959
12175
|
var _a, _b;
|
|
11960
12176
|
if (props.space)
|
|
11961
12177
|
return (react_1.default.createElement(authModal_1.AuthModal, { space: props.space, userId: (_a = props.id) !== null && _a !== void 0 ? _a : "", client: (_b = props.lib) === null || _b === void 0 ? void 0 : _b.axios, type: selectedAuthMethod, authMethods: authMethods, onComplete: handleAuthComplete }));
|
|
@@ -11971,13 +12187,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11971
12187
|
(0, react_dom_1.createPortal)(
|
|
11972
12188
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
11973
12189
|
react_1.default.createElement("div", { className: "relative z-50" },
|
|
11974
|
-
react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
12190
|
+
react_1.default.createElement(drawer_1.Drawer, { darkMode: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkMode, darkModeBg: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
|
|
11975
12191
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
11976
12192
|
// would remount the hidden panel collection-wide and fetch again. The
|
|
11977
12193
|
// toolbar's collection-wide button clears it when it opens.
|
|
11978
12194
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
11979
12195
|
? props.title
|
|
11980
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((
|
|
12196
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_118 = props.id) !== null && _118 !== void 0 ? _118 : "") : activityId, activityLog: (_119 = props.edit) === null || _119 === void 0 ? void 0 : _119.activityLog, model: structure }) })), document.body),
|
|
11981
12197
|
renderScrollSentinel()));
|
|
11982
12198
|
});
|
|
11983
12199
|
//# sourceMappingURL=index.js.map
|