blixify-ui-web 1.3.46 → 1.3.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +261 -255
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/relatedRecords.js +1 -1
- package/lib/components/data/dataTemplate/relatedRecords.js.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts +1 -0
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +5 -0
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +1 -2
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -280,7 +280,7 @@ var DELETE_BLOCKED_ROWS = 50;
|
|
|
280
280
|
var BATCH_UPDATE_QUERY_TYPES = ["=", "!=", ">", "<", "in", "!in"];
|
|
281
281
|
var DELETE_ID_CHUNK = 1000;
|
|
282
282
|
exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
283
|
-
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, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137;
|
|
283
|
+
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, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138;
|
|
284
284
|
// INFO: every view draws a lookup as its source column's type, read-only, so
|
|
285
285
|
// no type branch below meets "lookup"; rawProps.model keeps the lookups as
|
|
286
286
|
// stored for the columns handed back to the host
|
|
@@ -299,7 +299,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
299
299
|
// the list never refetching while the panel is open, which fails silently.
|
|
300
300
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
301
301
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
302
|
-
var
|
|
302
|
+
var _139 = (0, react_1.useState)(false), drawerPageView = _139[0], setDrawerPageView = _139[1];
|
|
303
303
|
// INFO: the panel keeps rendering the record it was opened with rather than
|
|
304
304
|
// live props. Without this, navigating back to the list would re-render the
|
|
305
305
|
// still-mounted panel as a second list behind the overlay.
|
|
@@ -359,7 +359,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
359
359
|
drawerFormEditedRef.current = false;
|
|
360
360
|
}
|
|
361
361
|
drawerOpenRef.current = isDrawerHost;
|
|
362
|
-
var
|
|
362
|
+
var _140 = (0, react_1.useState)(false), drawerDiscardModal = _140[0], setDrawerDiscardModal = _140[1];
|
|
363
363
|
// INFO: leaving the record ends the escape, so the next row opened from the
|
|
364
364
|
// list peeks in the panel again rather than inheriting a full page the user
|
|
365
365
|
// asked for once. Saving a form on the full page lands on its read view, which
|
|
@@ -444,7 +444,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
444
444
|
initialFilterReferenceDate: initialFilterReferenceDate,
|
|
445
445
|
};
|
|
446
446
|
};
|
|
447
|
-
var
|
|
447
|
+
var _141 = intialiseDefaultFilterValues(), initialFilterSearch = _141.initialFilterSearch, initialFilterSearchParams = _141.initialFilterSearchParams, initialFilterSelection = _141.initialFilterSelection, initialFilterReference = _141.initialFilterReference, initialFilterReferenceDate = _141.initialFilterReferenceDate;
|
|
448
448
|
// INFO: organise.initialSearch fills the Quick find box, which sends its
|
|
449
449
|
// value under "search". Without that box (hideSearch, Firebase, or a
|
|
450
450
|
// "search" query taking its place) there is nothing to fill
|
|
@@ -460,11 +460,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
460
460
|
// keyword: All's columns and sort, no stored filters, and nothing this
|
|
461
461
|
// person kept in the browser (view drafts, persistViewState) is read or
|
|
462
462
|
// written — until they pick a view, which is their own choice again
|
|
463
|
-
var
|
|
463
|
+
var _142 = (0, react_1.useState)(function () {
|
|
464
464
|
var _a, _b, _c;
|
|
465
465
|
return handleCanInitialSearch((_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) ||
|
|
466
466
|
!!((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.linkFlexFilters) === null || _c === void 0 ? void 0 : _c.length);
|
|
467
|
-
}), isLinkOpen =
|
|
467
|
+
}), isLinkOpen = _142[0], setIsLinkOpen = _142[1];
|
|
468
468
|
var handleSeedInitialSearch = function (params) {
|
|
469
469
|
var _a;
|
|
470
470
|
return isLinkOpen &&
|
|
@@ -473,12 +473,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
473
473
|
? __assign(__assign({}, params), { search: props.organise.initialSearch }) : params;
|
|
474
474
|
};
|
|
475
475
|
// INFO: Persist view state hook — handles storage read/write for filter/sort/column state
|
|
476
|
-
var
|
|
476
|
+
var _143 = (0, viewStatePersistence_1.usePersistedViewState)({
|
|
477
477
|
mode: isLinkOpen ? undefined : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistViewState,
|
|
478
478
|
collectionId: props.collectionId,
|
|
479
479
|
persistKey: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.persistKey,
|
|
480
480
|
type: resolvedType,
|
|
481
|
-
}), rawPersistedState =
|
|
481
|
+
}), rawPersistedState = _143.persistedState, isPersistEnabled = _143.isEnabled, handleSaveView = _143.handleSaveView, handleRegisterViewSnapshot = _143.handleRegisterViewSnapshot;
|
|
482
482
|
// INFO: drop stored filters/sort on removed columns — they would empty the table
|
|
483
483
|
var persistedState = (0, react_1.useMemo)(function () {
|
|
484
484
|
var _a, _b, _c, _d;
|
|
@@ -494,8 +494,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
494
494
|
(_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterListObjects,
|
|
495
495
|
(_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareFlexFilterRelated,
|
|
496
496
|
]);
|
|
497
|
-
var
|
|
498
|
-
var
|
|
497
|
+
var _144 = (0, react_1.useState)(false), loading = _144[0], setLoading = _144[1];
|
|
498
|
+
var _145 = (0, react_1.useState)(), notification = _145[0], setNotification = _145[1];
|
|
499
499
|
// INFO: a success toast is confirmation, not a decision — it clears itself so
|
|
500
500
|
// it never sits on the floating step bar; errors stay until dismissed
|
|
501
501
|
(0, react_1.useEffect)(function () {
|
|
@@ -505,83 +505,83 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
505
505
|
return function () { return clearTimeout(timer); };
|
|
506
506
|
}, [notification]);
|
|
507
507
|
//INFO : Used by List
|
|
508
|
-
var
|
|
508
|
+
var _146 = (0, react_1.useState)(function () {
|
|
509
509
|
var _a;
|
|
510
510
|
return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearch);
|
|
511
|
-
}), filterSearch =
|
|
512
|
-
var
|
|
511
|
+
}), filterSearch = _146[0], setFilterSearch = _146[1];
|
|
512
|
+
var _147 = (0, react_1.useState)(function () {
|
|
513
513
|
var _a;
|
|
514
514
|
return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearchParams);
|
|
515
|
-
}), filterSearchParams =
|
|
516
|
-
var
|
|
517
|
-
var
|
|
518
|
-
var
|
|
519
|
-
var
|
|
520
|
-
var
|
|
515
|
+
}), filterSearchParams = _147[0], setFilterSearchParams = _147[1];
|
|
516
|
+
var _148 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _r !== void 0 ? _r : initialFilterSelection), filterSelection = _148[0], setFilterSelection = _148[1];
|
|
517
|
+
var _149 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _s !== void 0 ? _s : initialFilterReference), filterReference = _149[0], setFilterReference = _149[1];
|
|
518
|
+
var _150 = (0, react_1.useState)({}), filterReferenceSearch = _150[0], setFilterReferenceSearch = _150[1];
|
|
519
|
+
var _151 = (0, react_1.useState)({}), filterReferenceList = _151[0], setFilterReferenceList = _151[1];
|
|
520
|
+
var _152 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
|
|
521
521
|
? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
|
|
522
|
-
: initialFilterReferenceDate), filterReferenceDate =
|
|
523
|
-
var
|
|
524
|
-
var
|
|
525
|
-
var
|
|
526
|
-
var
|
|
527
|
-
var
|
|
522
|
+
: initialFilterReferenceDate), filterReferenceDate = _152[0], setFilterReferenceDate = _152[1];
|
|
523
|
+
var _153 = (0, react_1.useState)(true), tableLoading = _153[0], setTableLoading = _153[1];
|
|
524
|
+
var _154 = (0, react_1.useState)(""), cursor = _154[0], setCursor = _154[1];
|
|
525
|
+
var _155 = (0, react_1.useState)(""), lastCursor = _155[0], setLastCursor = _155[1];
|
|
526
|
+
var _156 = (0, react_1.useState)([]), tableData = _156[0], setTableData = _156[1];
|
|
527
|
+
var _157 = (0, react_1.useState)([]), spaceTableData = _157[0], setSpaceTableData = _157[1];
|
|
528
528
|
// INFO: a save resolves after later renders, so it reads the table from here —
|
|
529
529
|
// the state it closed over can predate an earlier save on the same row
|
|
530
530
|
var tableDataRef = (0, react_1.useRef)([]);
|
|
531
531
|
var spaceTableDataRef = (0, react_1.useRef)([]);
|
|
532
532
|
tableDataRef.current = tableData;
|
|
533
533
|
spaceTableDataRef.current = spaceTableData;
|
|
534
|
-
var
|
|
535
|
-
var
|
|
534
|
+
var _158 = (0, react_1.useState)(0), size = _158[0], setSize = _158[1];
|
|
535
|
+
var _159 = (0, react_1.useState)((_v = (_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _t !== void 0 ? _t : (_u = props.organise) === null || _u === void 0 ? void 0 : _u.pageIndex) !== null && _v !== void 0 ? _v : 0), pageIndex = _159[0], setPageIndex = _159[1];
|
|
536
536
|
// INFO: every change of page, including the return to the first page when a
|
|
537
537
|
// filter or search changes, which onChangePagination does not always report
|
|
538
538
|
(0, react_1.useEffect)(function () {
|
|
539
539
|
var _a, _b;
|
|
540
540
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
|
|
541
541
|
}, [pageIndex]);
|
|
542
|
-
var
|
|
543
|
-
var
|
|
544
|
-
var
|
|
545
|
-
var
|
|
542
|
+
var _160 = (0, react_1.useState)([]), selectedIds = _160[0], setSelectedIds = _160[1];
|
|
543
|
+
var _161 = (0, react_1.useState)(false), selectAll = _161[0], setSelectAll = _161[1];
|
|
544
|
+
var _162 = (0, react_1.useState)(""), deletePasscode = _162[0], setDeletePasscode = _162[1];
|
|
545
|
+
var _163 = (0, react_1.useState)(""), deletePasscodeInput = _163[0], setDeletePasscodeInput = _163[1];
|
|
546
546
|
// INFO: the up-front Delete anyway — skips the link check for the whole
|
|
547
547
|
// delete, for people trusted with it (canDeleteAnyway)
|
|
548
|
-
var
|
|
549
|
-
var
|
|
548
|
+
var _164 = (0, react_1.useState)(false), isSkipLinkCheck = _164[0], setIsSkipLinkCheck = _164[1];
|
|
549
|
+
var _165 = (0, react_1.useState)(""), deleteFeedId = _165[0], setDeleteFeedId = _165[1];
|
|
550
550
|
//INFO : Used by List Organise
|
|
551
551
|
// INFO: Internal sort state that overrides props.organise?.sort when
|
|
552
552
|
// persistViewState is enabled and a persisted sort exists
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
553
|
+
var _166 = (0, react_1.useState)((_w = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _w !== void 0 ? _w : undefined), persistedSort = _166[0], setPersistedSort = _166[1];
|
|
554
|
+
var _167 = (0, react_1.useState)(false), filterDraft = _167[0], setFilterDraft = _167[1];
|
|
555
|
+
var _168 = (0, react_1.useState)(false), addTabModal = _168[0], setAddTabModal = _168[1];
|
|
556
|
+
var _169 = (0, react_1.useState)(-1), editTabIndex = _169[0], setEditTabIndex = _169[1];
|
|
557
557
|
//INFO : resolve the initial tab synchronously so the mount cond is already
|
|
558
558
|
// tab-scoped — an empty initial tab caused a second wasted list fetch
|
|
559
|
-
var
|
|
559
|
+
var _170 = (0, react_1.useState)(function () {
|
|
560
560
|
var _a;
|
|
561
561
|
return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
|
|
562
|
-
}), selectedTab =
|
|
563
|
-
var
|
|
562
|
+
}), selectedTab = _170[0], setSelectedTab = _170[1];
|
|
563
|
+
var _171 = (0, react_1.useState)("dayGridMonth"), calendarView = _171[0], setCalendarView = _171[1];
|
|
564
564
|
// INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
|
|
565
565
|
// (calendarView above drives the matching range query)
|
|
566
|
-
var
|
|
567
|
-
var
|
|
566
|
+
var _172 = (0, react_1.useState)("month"), newCalendarViewMode = _172[0], setNewCalendarViewMode = _172[1];
|
|
567
|
+
var _173 = (0, react_1.useState)(new Date()), calendarTabMonth = _173[0], setCalendarTabMonth = _173[1];
|
|
568
568
|
// INFO: read once per theme — it asks the browser to resolve a style
|
|
569
569
|
var timelinePrimaryColour = (0, react_1.useMemo)(function () { return (0, timelineBars_1.handleReadPrimaryColour)(); },
|
|
570
570
|
/* eslint-disable-next-line */
|
|
571
571
|
[(_x = props.organise) === null || _x === void 0 ? void 0 : _x.darkMode]);
|
|
572
572
|
// INFO: the period a timeline shows — it reads only the records whose bars
|
|
573
573
|
// overlap it, so a large datasheet loads one month or quarter at a time
|
|
574
|
-
var
|
|
574
|
+
var _174 = (0, react_1.useState)({ unit: "month", anchor: new Date() }), timelineRange = _174[0], setTimelineRange = _174[1];
|
|
575
575
|
// INFO: defaultViewSwitch picks the opening view only — the tab re-inits
|
|
576
576
|
// whenever its settings change, and that must not undo the user's switch
|
|
577
577
|
var calendarViewInitRef = (0, react_1.useRef)(false);
|
|
578
|
-
var
|
|
579
|
-
var
|
|
580
|
-
var
|
|
581
|
-
var
|
|
578
|
+
var _175 = (0, react_1.useState)(true), kanbanDroppable = _175[0], setKanbanDroppable = _175[1];
|
|
579
|
+
var _176 = (0, react_1.useState)([]), kanbanOptions = _176[0], setKanbanOptions = _176[1];
|
|
580
|
+
var _177 = (0, react_1.useState)(false), batchUpdateModal = _177[0], setBatchUpdateModal = _177[1];
|
|
581
|
+
var _178 = (0, react_1.useState)({
|
|
582
582
|
columnId: "",
|
|
583
583
|
columnData: {},
|
|
584
|
-
}), batchUpdateData =
|
|
584
|
+
}), batchUpdateData = _178[0], setBatchUpdateData = _178[1];
|
|
585
585
|
// INFO: system columns (created / updated at and by, record id, number)
|
|
586
586
|
// join the structure hidden; the ones a user shows are kept per view
|
|
587
587
|
var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
|
|
@@ -589,12 +589,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
589
589
|
var appendedSystemColumnIds = isSystemColumnsEnabled
|
|
590
590
|
? 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; }); })
|
|
591
591
|
: [];
|
|
592
|
-
var
|
|
592
|
+
var _179 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _179[0], setShownSystemColumnIds = _179[1];
|
|
593
593
|
var handleWithSystemColumns = function (model, shownIds) {
|
|
594
594
|
if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
|
|
595
595
|
return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
|
|
596
596
|
};
|
|
597
|
-
var
|
|
597
|
+
var _180 = (0, react_1.useState)(function () {
|
|
598
598
|
var _a;
|
|
599
599
|
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 : []);
|
|
600
600
|
if (!persistedState)
|
|
@@ -621,8 +621,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
623
|
return model;
|
|
624
|
-
}), structure =
|
|
625
|
-
var
|
|
624
|
+
}), structure = _180[0], setStructure = _180[1];
|
|
625
|
+
var _181 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _181[0], setAdditionalQuery = _181[1];
|
|
626
626
|
// INFO: State for user-configurable flex filters (Monday.com-style)
|
|
627
627
|
// INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
|
|
628
628
|
var defaultFlexFilterRow = [
|
|
@@ -642,7 +642,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
642
642
|
: (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
|
|
643
643
|
? persistedState.flexFilters
|
|
644
644
|
: defaultFlexFilterRow;
|
|
645
|
-
var
|
|
645
|
+
var _182 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _182[0], setFlexFilters = _182[1];
|
|
646
646
|
// INFO: always-current mirror of flexFilters, read by the imperative apply/
|
|
647
647
|
// clear methods so chained calls in one tick aren't stale.
|
|
648
648
|
var flexFiltersRef = (0, react_1.useRef)(flexFilters);
|
|
@@ -655,101 +655,101 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
655
655
|
}, [flexFilters]);
|
|
656
656
|
// INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
|
|
657
657
|
// to prevent API calls on every keystroke when typing in value inputs
|
|
658
|
-
var
|
|
658
|
+
var _183 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _183[0], setFlexFiltersDebounced = _183[1];
|
|
659
659
|
// INFO: the filter rows of the export being set up — started from the
|
|
660
660
|
// list's own when the export opens, so changing them leaves the list as it is
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
661
|
+
var _184 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _184[0], setExportFlexFilters = _184[1];
|
|
662
|
+
var _185 = (0, react_1.useState)({}), flexFilterReferenceOptions = _185[0], setFlexFilterReferenceOptions = _185[1];
|
|
663
|
+
var _186 = (0, react_1.useState)({}), flexFilterReferenceSearch = _186[0], setFlexFilterReferenceSearch = _186[1];
|
|
664
|
+
var _187 = (0, react_1.useState)(false), flexFilterModalOpen = _187[0], setFlexFilterModalOpen = _187[1];
|
|
665
|
+
var _188 = (0, react_1.useState)(false), viewSettingsModalOpen = _188[0], setViewSettingsModalOpen = _188[1];
|
|
666
666
|
// INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
|
|
667
667
|
// Deliberately kept out of `structure`: the props-sync effect below resets
|
|
668
668
|
// structure to props.model whenever props change, which would wipe the
|
|
669
669
|
// choice, and the persist effect derives schema-level hiddenColumnIds from
|
|
670
670
|
// structure — writing user hides there would blur the two concepts.
|
|
671
|
-
var
|
|
672
|
-
var
|
|
673
|
-
var
|
|
674
|
-
var
|
|
671
|
+
var _189 = (0, react_1.useState)((_5 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _5 !== void 0 ? _5 : []), userHiddenColumnIds = _189[0], setUserHiddenColumnIds = _189[1];
|
|
672
|
+
var _190 = (0, react_1.useState)(""), columnSearch = _190[0], setColumnSearch = _190[1];
|
|
673
|
+
var _191 = (0, react_1.useState)([]), savedViews = _191[0], setSavedViews = _191[1];
|
|
674
|
+
var _192 = (0, react_1.useState)(null), activeSavedViewId = _192[0], setActiveSavedViewId = _192[1];
|
|
675
675
|
// INFO: the widths of the view on screen, by column id ("180px")
|
|
676
|
-
var
|
|
676
|
+
var _193 = (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 = _193[0], setColumnWidths = _193[1];
|
|
677
677
|
// INFO: the kanban lane widths of the view on screen, by lane id ("300px")
|
|
678
|
-
var
|
|
678
|
+
var _194 = (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.laneWidths) !== null && _c !== void 0 ? _c : {}; }), laneWidths = _194[0], setLaneWidths = _194[1];
|
|
679
679
|
// INFO: the read drawer's dragged width ("520px"), kept in the view with the
|
|
680
680
|
// column widths. A restored persistViewState wins over All's, as a saved
|
|
681
681
|
// view or draft applied at opening replaces both
|
|
682
|
-
var
|
|
682
|
+
var _195 = (0, react_1.useState)(function () {
|
|
683
683
|
var _a, _b, _c;
|
|
684
684
|
return (_a = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.drawerWidth : undefined)) !== null && _a !== void 0 ? _a : (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.allView) === null || _c === void 0 ? void 0 : _c.drawerWidth;
|
|
685
|
-
}), drawerWidth =
|
|
685
|
+
}), drawerWidth = _195[0], setDrawerWidth = _195[1];
|
|
686
686
|
// INFO: the columns the view on screen freezes at the left edge
|
|
687
|
-
var
|
|
687
|
+
var _196 = (0, react_1.useState)(function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.pinnedColumnIds; }), pinnedColumnIds = _196[0], setPinnedColumnIds = _196[1];
|
|
688
688
|
// INFO: unsaved changes are kept only once the opening view is on screen,
|
|
689
689
|
// so the defaults drawn before it never overwrite a person's own
|
|
690
|
-
var
|
|
690
|
+
var _197 = (0, react_1.useState)(false), isViewDraftReady = _197[0], setIsViewDraftReady = _197[1];
|
|
691
691
|
// INFO: null while the name box is closed
|
|
692
|
-
var
|
|
693
|
-
var
|
|
692
|
+
var _198 = (0, react_1.useState)(null), savedViewName = _198[0], setSavedViewName = _198[1];
|
|
693
|
+
var _199 = (0, react_1.useState)(null), deletingSavedViewId = _199[0], setDeletingSavedViewId = _199[1];
|
|
694
694
|
// INFO: the view chip being dragged, to drop it in another place
|
|
695
|
-
var
|
|
695
|
+
var _200 = (0, react_1.useState)(null), draggingSavedViewId = _200[0], setDraggingSavedViewId = _200[1];
|
|
696
696
|
// INFO: the tab strip in the order a drag has reached, saved once on drop
|
|
697
|
-
var
|
|
698
|
-
var
|
|
699
|
-
var
|
|
700
|
-
var
|
|
697
|
+
var _201 = (0, react_1.useState)(null), draggedTabs = _201[0], setDraggedTabs = _201[1];
|
|
698
|
+
var _202 = (0, react_1.useState)(null), renamingSavedView = _202[0], setRenamingSavedView = _202[1];
|
|
699
|
+
var _203 = (0, react_1.useState)(false), isSavedViewsExpanded = _203[0], setIsSavedViewsExpanded = _203[1];
|
|
700
|
+
var _204 = (0, react_1.useState)(null), draggingColumnId = _204[0], setDraggingColumnId = _204[1];
|
|
701
701
|
var columnRowRefs = (0, react_1.useRef)({});
|
|
702
702
|
//INFO : Used by Auth
|
|
703
|
-
var
|
|
703
|
+
var _205 = (0, react_1.useState)({
|
|
704
704
|
email: "",
|
|
705
705
|
google: "",
|
|
706
706
|
phone: "",
|
|
707
707
|
disabled: false,
|
|
708
708
|
create: false,
|
|
709
|
-
}), authMethods =
|
|
710
|
-
var
|
|
709
|
+
}), authMethods = _205[0], setAuthMethods = _205[1];
|
|
710
|
+
var _206 = (0, react_1.useState)(""), selectedAuthMethod = _206[0], setSelectedAuthMethod = _206[1];
|
|
711
711
|
// INFO: the sign-in check of a users datasheet's record is running; the
|
|
712
712
|
// panel shows a spinner rather than nothing, which read as "no login"
|
|
713
|
-
var
|
|
713
|
+
var _207 = (0, react_1.useState)(false), authLoading = _207[0], setAuthLoading = _207[1];
|
|
714
714
|
// INFO: a delete is running — the ref answers a second tap at once, before
|
|
715
715
|
// the state has rendered, and the state disables the confirm button
|
|
716
716
|
var deletingRef = (0, react_1.useRef)(false);
|
|
717
|
-
var
|
|
717
|
+
var _208 = (0, react_1.useState)(false), deleting = _208[0], setDeleting = _208[1];
|
|
718
718
|
// INFO: Used by Activity Log
|
|
719
|
-
var
|
|
720
|
-
var
|
|
719
|
+
var _209 = (0, react_1.useState)(false), activityModal = _209[0], setActivityModal = _209[1];
|
|
720
|
+
var _210 = (0, react_1.useState)(""), activityId = _210[0], setActivityId = _210[1];
|
|
721
721
|
//INFO : Used by Export
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
var
|
|
725
|
-
var
|
|
726
|
-
var
|
|
727
|
-
var
|
|
728
|
-
var
|
|
729
|
-
var
|
|
730
|
-
var
|
|
731
|
-
var
|
|
732
|
-
var
|
|
733
|
-
var
|
|
734
|
-
var
|
|
735
|
-
var
|
|
736
|
-
var
|
|
722
|
+
var _211 = (0, react_1.useState)(null), csvFile = _211[0], setCSVFile = _211[1];
|
|
723
|
+
var _212 = (0, react_1.useState)([]), csvFileData = _212[0], setCSVFileData = _212[1];
|
|
724
|
+
var _213 = (0, react_1.useState)(0), stepCSVIndex = _213[0], setStepCSVIndex = _213[1];
|
|
725
|
+
var _214 = (0, react_1.useState)({}), listCSVMapAttribute = _214[0], setListCSVMapAttribute = _214[1];
|
|
726
|
+
var _215 = (0, react_1.useState)({}), listCSVObjAttribute = _215[0], setListCSVObjAttribute = _215[1];
|
|
727
|
+
var _216 = (0, react_1.useState)([]), csvAPIAttribute = _216[0], setCSVAPIAttribute = _216[1];
|
|
728
|
+
var _217 = (0, react_1.useState)(((_6 = props.devSettings.currentUser) === null || _6 === void 0 ? void 0 : _6.userEmail) || ""), exportCSVEmail = _217[0], setExportCSVEmail = _217[1];
|
|
729
|
+
var _218 = (0, react_1.useState)(((_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.defaultExportPDFName) || ""), exportPDFTitle = _218[0], setExportPDFTitle = _218[1];
|
|
730
|
+
var _219 = (0, react_1.useState)(false), exportPDFLoading = _219[0], setExportPDFLoading = _219[1];
|
|
731
|
+
var _220 = (0, react_1.useState)(false), exportReadPDFLoading = _220[0], setExportReadPDFLoading = _220[1];
|
|
732
|
+
var _221 = (0, react_1.useState)((_11 = (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.exportSettings) === null || _10 === void 0 ? void 0 : _10.sumColumnId) !== null && _11 !== void 0 ? _11 : []), exportSumAttributeIds = _221[0], setExportSumAttributeIds = _221[1];
|
|
733
|
+
var _222 = (0, react_1.useState)((_14 = (_13 = (_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.exportSettings) === null || _13 === void 0 ? void 0 : _13.hideSubItems) !== null && _14 !== void 0 ? _14 : false), hideSubItems = _222[0], setHideSubItems = _222[1];
|
|
734
|
+
var _223 = (0, react_1.useState)([]), importTableData = _223[0], setImportTableData = _223[1];
|
|
735
|
+
var _224 = (0, react_1.useState)([]), queryList = _224[0], setQueryList = _224[1];
|
|
736
|
+
var _225 = (0, react_1.useState)(undefined), allQueryList = _225[0], setAllQueryList = _225[1];
|
|
737
737
|
// INFO: a restored state wins over the prop; its "" is a list the user
|
|
738
738
|
// ungrouped, so it opens ungrouped
|
|
739
|
-
var
|
|
739
|
+
var _226 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
|
|
740
740
|
? persistedState.groupBy || undefined
|
|
741
|
-
: (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.groupBy), groupId =
|
|
741
|
+
: (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.groupBy), groupId = _226[0], setGroupId = _226[1];
|
|
742
742
|
// INFO: groups by their record count, or in the column's own order
|
|
743
|
-
var
|
|
743
|
+
var _227 = (0, react_1.useState)((_16 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupOrder) !== null && _16 !== void 0 ? _16 : ""), groupOrder = _227[0], setGroupOrder = _227[1];
|
|
744
744
|
// INFO: each group's total per number column, keyed by section id
|
|
745
|
-
var
|
|
745
|
+
var _228 = (0, react_1.useState)({}), groupSummaries = _228[0], setGroupSummaries = _228[1];
|
|
746
746
|
// INFO: each group's row count over every row the filters match; null until
|
|
747
747
|
// read. A band paged alone shows it until its own first page lands, and a
|
|
748
748
|
// band it counts empty is left out instead of waiting to be read
|
|
749
|
-
var
|
|
749
|
+
var _229 = (0, react_1.useState)(null), groupTotals = _229[0], setGroupTotals = _229[1];
|
|
750
750
|
// INFO: the last read of groupTotals failed, so bands fall back to the rows
|
|
751
751
|
// loaded instead of waiting on a total that is not coming
|
|
752
|
-
var
|
|
752
|
+
var _230 = (0, react_1.useState)(false), groupTotalsFailed = _230[0], setGroupTotalsFailed = _230[1];
|
|
753
753
|
var groupSummaryRequestRef = (0, react_1.useRef)(0);
|
|
754
754
|
// INFO: the grouped count waiting to go out, so a filter change can stop it
|
|
755
755
|
// before it sends the filters it was scheduled with
|
|
@@ -760,20 +760,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
760
760
|
// later refresh, and "keep" lapses, so a refresh that brings no new rows
|
|
761
761
|
// never holds back a later change's count
|
|
762
762
|
var groupSummaryRefreshRef = (0, react_1.useRef)(null);
|
|
763
|
-
var
|
|
764
|
-
var
|
|
763
|
+
var _231 = (0, react_1.useState)({}), commentCounts = _231[0], setCommentCounts = _231[1];
|
|
764
|
+
var _232 = (0, react_1.useState)({}), commentUnread = _232[0], setCommentUnread = _232[1];
|
|
765
765
|
// INFO: Monday-board per-group paging. Keyed by the group key that
|
|
766
766
|
// handleBuildNewTableGroups() produces (an option, Unknown or No Value).
|
|
767
767
|
// Each group tracks its own loaded cursor + total so it can lazily load its
|
|
768
768
|
// next page as the user scrolls inside that band, independent of every other
|
|
769
769
|
// group. Only used when renderCheckGroupPaging() is true.
|
|
770
|
-
var
|
|
770
|
+
var _233 = (0, react_1.useState)({}), groupPageState = _233[0], setGroupPageState = _233[1];
|
|
771
771
|
// INFO: read fresh inside the async per-group fetch so chained scroll fires
|
|
772
772
|
// in one tick do not re-fetch an already in-flight page.
|
|
773
773
|
// INFO: every band of the table, or section of the list or grid tab, is
|
|
774
774
|
// collapsed, so no row is on screen and the scroll sentinel under the view
|
|
775
775
|
// would read page after page; it waits until one is opened again
|
|
776
|
-
var
|
|
776
|
+
var _234 = (0, react_1.useState)(false), isAllGroupsCollapsed = _234[0], setIsAllGroupsCollapsed = _234[1];
|
|
777
777
|
var groupPageStateRef = (0, react_1.useRef)({});
|
|
778
778
|
groupPageStateRef.current = groupPageState;
|
|
779
779
|
// INFO: rows added since the list was read, reported through
|
|
@@ -789,52 +789,52 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
789
789
|
var groupLoadingKeyRef = (0, react_1.useRef)(null);
|
|
790
790
|
var groupLoadQueueRef = (0, react_1.useRef)([]);
|
|
791
791
|
var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
|
|
792
|
-
var
|
|
793
|
-
var
|
|
792
|
+
var _235 = (0, react_1.useState)(""), readTabSection = _235[0], setReadTabSection = _235[1];
|
|
793
|
+
var _236 = (0, react_1.useState)(false), readFloatingNav = _236[0], setReadFloatingNav = _236[1];
|
|
794
794
|
var readTabSectionRefs = (0, react_1.useRef)({});
|
|
795
795
|
//INFO : Used by Read
|
|
796
796
|
//INFO : Used by Update
|
|
797
|
-
var
|
|
798
|
-
var
|
|
799
|
-
var
|
|
800
|
-
var
|
|
801
|
-
var
|
|
802
|
-
var
|
|
803
|
-
var
|
|
797
|
+
var _237 = (0, react_1.useState)(false), modalVisible = _237[0], setModalVisible = _237[1];
|
|
798
|
+
var _238 = (0, react_1.useState)(false), deleteModal = _238[0], setDeleteModal = _238[1];
|
|
799
|
+
var _239 = (0, react_1.useState)(false), excelModal = _239[0], setExcelModal = _239[1];
|
|
800
|
+
var _240 = (0, react_1.useState)(false), exportExcel = _240[0], setExportExcel = _240[1];
|
|
801
|
+
var _241 = (0, react_1.useState)(""), exportType = _241[0], setExportType = _241[1];
|
|
802
|
+
var _242 = (0, react_1.useState)(false), exportQR = _242[0], setExportQR = _242[1];
|
|
803
|
+
var _243 = (0, react_1.useState)(function () {
|
|
804
804
|
var _a, _b;
|
|
805
805
|
var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
|
|
806
806
|
return firstTabId;
|
|
807
|
-
}), activeTab =
|
|
808
|
-
var
|
|
809
|
-
var
|
|
810
|
-
var
|
|
811
|
-
var
|
|
812
|
-
var
|
|
813
|
-
var
|
|
814
|
-
var
|
|
807
|
+
}), activeTab = _243[0], setActiveTab = _243[1];
|
|
808
|
+
var _244 = (0, react_1.useState)(false), signatureSigning = _244[0], setSignatureSigning = _244[1];
|
|
809
|
+
var _245 = (0, react_1.useState)({}), selectedData = _245[0], setSelectedData = _245[1];
|
|
810
|
+
var _246 = (0, react_1.useState)(""), selectedObjectStructureId = _246[0], setSelectedObjectStructureId = _246[1];
|
|
811
|
+
var _247 = (0, react_1.useState)(""), selectedObjectId = _247[0], setSelectedObjectId = _247[1];
|
|
812
|
+
var _248 = (0, react_1.useState)(""), selectedListAddressId = _248[0], setSelectedListAddressId = _248[1];
|
|
813
|
+
var _249 = (0, react_1.useState)(-1), selectedListAddressIndex = _249[0], setSelectedListAddressIndex = _249[1];
|
|
814
|
+
var _250 = (0, react_1.useState)({
|
|
815
815
|
lat: 0,
|
|
816
816
|
lng: 0,
|
|
817
817
|
name: "",
|
|
818
|
-
}), selectedListAddress =
|
|
819
|
-
var
|
|
820
|
-
var
|
|
821
|
-
var
|
|
822
|
-
var
|
|
823
|
-
var
|
|
824
|
-
var
|
|
818
|
+
}), selectedListAddress = _250[0], setSelectedListAddress = _250[1];
|
|
819
|
+
var _251 = (0, react_1.useState)({}), selectedObjectData = _251[0], setSelectedObjectData = _251[1];
|
|
820
|
+
var _252 = (0, react_1.useState)(null), objectCellEdit = _252[0], setObjectCellEdit = _252[1];
|
|
821
|
+
var _253 = (0, react_1.useState)(false), referenceLoading = _253[0], setReferenceLoading = _253[1];
|
|
822
|
+
var _254 = (0, react_1.useState)({}), referencesOptions = _254[0], setReferencesOptions = _254[1];
|
|
823
|
+
var _255 = (0, react_1.useState)({}), referencesDetails = _255[0], setReferencesDetails = _255[1];
|
|
824
|
+
var _256 = (0, react_1.useState)({}), listReferencesOptions = _256[0], setListReferencesOptions = _256[1];
|
|
825
825
|
// INFO: the referenced records themselves, for a table cell that picks from
|
|
826
826
|
// a list on one (referenceSelection)
|
|
827
|
-
var
|
|
827
|
+
var _257 = (0, react_1.useState)({}), listReferencesDetails = _257[0], setListReferencesDetails = _257[1];
|
|
828
828
|
// INFO: each record that could not be deleted, by the datasheet still
|
|
829
829
|
// linking to it
|
|
830
|
-
var
|
|
830
|
+
var _258 = (0, react_1.useState)([]), referenceDeleteTableData = _258[0], setReferenceDeleteTableData = _258[1];
|
|
831
831
|
// INFO: the records a delete left because they are still linked — what
|
|
832
832
|
// "Delete anyway" deletes
|
|
833
833
|
var blockedDeleteIdsRef = (0, react_1.useRef)([]);
|
|
834
834
|
// INFO: "Delete anyway" is for a list's delete; a single record's delete
|
|
835
835
|
// has its own steps around it
|
|
836
836
|
var isBlockedFromListRef = (0, react_1.useRef)(false);
|
|
837
|
-
var
|
|
837
|
+
var _259 = (0, react_1.useState)(false), isDeleteAnywayConfirm = _259[0], setIsDeleteAnywayConfirm = _259[1];
|
|
838
838
|
// INFO: a batched delete stops when the list goes away mid-run
|
|
839
839
|
var isMountedRef = (0, react_1.useRef)(true);
|
|
840
840
|
(0, react_1.useEffect)(function () {
|
|
@@ -854,25 +854,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
854
854
|
}, [deleteModal]);
|
|
855
855
|
// INFO: how far a batched delete has got, shown while it runs
|
|
856
856
|
// INFO: deleted is only known where a pass checks links before deleting
|
|
857
|
-
var
|
|
858
|
-
var
|
|
859
|
-
var
|
|
857
|
+
var _260 = (0, react_1.useState)(null), deleteProgress = _260[0], setDeleteProgress = _260[1];
|
|
858
|
+
var _261 = (0, react_1.useState)([]), relatedSections = _261[0], setRelatedSections = _261[1];
|
|
859
|
+
var _262 = (0, react_1.useState)({
|
|
860
860
|
id: "",
|
|
861
861
|
name: "",
|
|
862
862
|
type: "string",
|
|
863
|
-
}), referenceCreationModal =
|
|
864
|
-
var
|
|
865
|
-
var
|
|
863
|
+
}), referenceCreationModal = _262[0], setReferenceCreationModal = _262[1];
|
|
864
|
+
var _263 = (0, react_1.useState)({}), referenceModelSchema = _263[0], setReferenceSchema = _263[1];
|
|
865
|
+
var _264 = (0, react_1.useState)([]), kanbanChecked = _264[0], setKanbanChecked = _264[1];
|
|
866
866
|
//INFO : Offline
|
|
867
|
-
var
|
|
868
|
-
var
|
|
867
|
+
var _265 = (0, react_1.useState)(0), offlineDataLength = _265[0], setOfflineDataLength = _265[1];
|
|
868
|
+
var _266 = (0, react_1.useState)(false), offlineModal = _266[0], setOfflineModal = _266[1];
|
|
869
869
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
870
|
-
var
|
|
871
|
-
var
|
|
870
|
+
var _267 = (0, react_1.useState)(false), isLive = _267[0], setIsLive = _267[1];
|
|
871
|
+
var _268 = (0, react_1.useState)(false), isLiveOffline = _268[0], setIsLiveOffline = _268[1];
|
|
872
872
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
873
873
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
874
874
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
875
|
-
var
|
|
875
|
+
var _269 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _269[0], setIsNetworkOffline = _269[1];
|
|
876
876
|
var previousType = (0, react_1.useRef)(null);
|
|
877
877
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
878
878
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -1159,6 +1159,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1159
1159
|
recountTimersRef.current.push(timer);
|
|
1160
1160
|
};
|
|
1161
1161
|
(0, react_1.useEffect)(function () { return function () { return recountTimersRef.current.forEach(function (each) { return clearTimeout(each); }); }; }, []);
|
|
1162
|
+
// INFO: a comment written elsewhere (another member, another tab, the MCP)
|
|
1163
|
+
// asks again for just those rows; a row not loaded is skipped, since it is
|
|
1164
|
+
// counted when it loads
|
|
1165
|
+
var handleRecountComments = function (recordIds) {
|
|
1166
|
+
var loadedIds = new Set((tableData !== null && tableData !== void 0 ? tableData : []).map(function (eachRow) { var _a, _b; return String((_b = (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id) !== null && _b !== void 0 ? _b : ""); }));
|
|
1167
|
+
handleFetchCommentCounts(Array.from(new Set(recordIds)).filter(function (eachId) { return !!eachId && loadedIds.has(eachId); }));
|
|
1168
|
+
};
|
|
1162
1169
|
var lastActivityIdRef = (0, react_1.useRef)("");
|
|
1163
1170
|
(0, react_1.useEffect)(function () {
|
|
1164
1171
|
if (activityModal) {
|
|
@@ -1261,22 +1268,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1261
1268
|
var isSchemaHideMode = ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.onChangeHide) ? true : false;
|
|
1262
1269
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1263
1270
|
// the persisted value and falls back to the consumer's limit
|
|
1264
|
-
var
|
|
1271
|
+
var _270 = (0, react_1.useState)((_30 = (_29 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _29 !== void 0 ? _29 : props.limit) !== null && _30 !== void 0 ? _30 : 10), pageLimit = _270[0], setPageLimit = _270[1];
|
|
1265
1272
|
var limit = pageLimit;
|
|
1266
1273
|
var isSavedViewsEnabled = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.savedViews) && resolvedType === "list";
|
|
1267
1274
|
// INFO: a calendar and a chart draw their own way, so columns, sort and
|
|
1268
1275
|
// group have nothing to change there
|
|
1269
|
-
|
|
1276
|
+
// INFO: a list tab drawn by the host's bareListComponent has no columns or
|
|
1277
|
+
// rows per page for the settings to change
|
|
1278
|
+
var isViewSettingsHiddenForTab = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "calendar" ||
|
|
1279
|
+
(selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "chart" ||
|
|
1280
|
+
((selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "list" &&
|
|
1281
|
+
!!((_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareListComponent));
|
|
1270
1282
|
// INFO: Group shapes a table, list or grid into sections, a map into routes
|
|
1271
1283
|
// and a timeline into colours
|
|
1272
|
-
var isGroupPickerShown = !!((
|
|
1284
|
+
var isGroupPickerShown = !!((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.showGroupByFeature) && !isViewSettingsHiddenForTab;
|
|
1273
1285
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
1274
1286
|
// every view is the team's and nothing is kept locally
|
|
1275
|
-
var isAppViews = ((
|
|
1276
|
-
!!((
|
|
1287
|
+
var isAppViews = ((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.sharedViews) !== undefined ||
|
|
1288
|
+
!!((_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.onChangeSharedViews);
|
|
1277
1289
|
// INFO: a saved view carries its sort, so the sort is held here as with persistViewState
|
|
1278
1290
|
var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
|
|
1279
|
-
var activeSortId = (isInternalSort && persistedSort) || ((
|
|
1291
|
+
var activeSortId = (isInternalSort && persistedSort) || ((_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.sort);
|
|
1280
1292
|
var handleSortColumn = function (value) {
|
|
1281
1293
|
var _a, _b, _c, _d;
|
|
1282
1294
|
if (isInternalSort)
|
|
@@ -1306,7 +1318,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1306
1318
|
// INFO: Firebase pages by document cursor and a union by skip, so neither
|
|
1307
1319
|
// can hand over the whole set — there formula columns are not offered for
|
|
1308
1320
|
// sorting or filtering, rather than ordering one page
|
|
1309
|
-
var isFormulaViewSupported = !isFirebase && !((
|
|
1321
|
+
var isFormulaViewSupported = !isFirebase && !((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.unionCollections) === null || _38 === void 0 ? void 0 : _38.length);
|
|
1310
1322
|
var formulaSort = isFormulaViewSupported &&
|
|
1311
1323
|
(activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
|
|
1312
1324
|
formulaColumnIds.includes(activeSortId.sortId)
|
|
@@ -1317,12 +1329,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1317
1329
|
// a union read runs them
|
|
1318
1330
|
// INFO: a people filter's "me" needs only who is signed in, which any
|
|
1319
1331
|
// backend can match
|
|
1320
|
-
var currentUserId = (
|
|
1321
|
-
var flexFilterExtras = !isFirebase && !((
|
|
1332
|
+
var currentUserId = (_39 = props.devSettings.currentUser) === null || _39 === void 0 ? void 0 : _39.userId;
|
|
1333
|
+
var flexFilterExtras = !isFirebase && !((_41 = (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.unionCollections) === null || _41 === void 0 ? void 0 : _41.length)
|
|
1322
1334
|
? {
|
|
1323
|
-
references: (
|
|
1324
|
-
listObjects: (
|
|
1325
|
-
related: (
|
|
1335
|
+
references: (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareFlexFilterReferences,
|
|
1336
|
+
listObjects: (_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareFlexFilterListObjects,
|
|
1337
|
+
related: (_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareFlexFilterRelated,
|
|
1326
1338
|
currentUserId: currentUserId,
|
|
1327
1339
|
}
|
|
1328
1340
|
: isFirebase
|
|
@@ -1465,18 +1477,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1465
1477
|
var handleGetSelectAllText = function () {
|
|
1466
1478
|
return "".concat(size.toLocaleString(), " records ").concat(handleCheckReaderFiltered() ? "matching your filters" : "in this list");
|
|
1467
1479
|
};
|
|
1468
|
-
var
|
|
1469
|
-
var isEditor = ((
|
|
1470
|
-
var isOffline = (
|
|
1480
|
+
var _271 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _271.canUpdateRecord, canInlineUpdate = _271.canInlineUpdate, canBatchUpdate = _271.canBatchUpdate, canDeleteRecord = _271.canDeleteRecord;
|
|
1481
|
+
var isEditor = ((_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.allEditable) ? true : false;
|
|
1482
|
+
var isOffline = (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOffline;
|
|
1471
1483
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
1472
1484
|
// the live network state — online saves go to the server even if bareOffline
|
|
1473
1485
|
// is true, offline saves go to IDB as normal.
|
|
1474
|
-
var isOfflineNetworkListener = isOffline && ((
|
|
1475
|
-
var showId = (
|
|
1486
|
+
var isOfflineNetworkListener = isOffline && ((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareOfflineNetworkListener);
|
|
1487
|
+
var showId = (_48 = props.space) === null || _48 === void 0 ? void 0 : _48.showId;
|
|
1476
1488
|
var remainId = showId || selectedObjectStructureId ? true : false;
|
|
1477
|
-
var idField = ((
|
|
1478
|
-
var pipeline = (
|
|
1479
|
-
if ((
|
|
1489
|
+
var idField = ((_49 = props.space) === null || _49 === void 0 ? void 0 : _49.idField) || ((_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.idField);
|
|
1490
|
+
var pipeline = (_51 = props === null || props === void 0 ? void 0 : props.space) === null || _51 === void 0 ? void 0 : _51.pipeline;
|
|
1491
|
+
if ((_52 = props.bareSettings) === null || _52 === void 0 ? void 0 : _52.bareListPipeline) {
|
|
1480
1492
|
pipeline = pipeline
|
|
1481
1493
|
? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
|
|
1482
1494
|
}
|
|
@@ -1489,38 +1501,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1489
1501
|
* three records came back instead of five files, and each tile received the
|
|
1490
1502
|
* whole array rather than one file, so every one of them read "Attachment".
|
|
1491
1503
|
*/
|
|
1492
|
-
var fileViewColumnId = (
|
|
1504
|
+
var fileViewColumnId = (_56 = (_55 = ((_54 = (_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.extendedTabs) !== null && _54 !== void 0 ? _54 : []).find(function (eachTab) {
|
|
1493
1505
|
return eachTab.viewType === "file" &&
|
|
1494
1506
|
(0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
|
|
1495
|
-
})) === null ||
|
|
1507
|
+
})) === null || _55 === void 0 ? void 0 : _55.fileSettings) === null || _56 === void 0 ? void 0 : _56.columnId;
|
|
1496
1508
|
// INFO: select-all promises "all N records", so it is offered only where N
|
|
1497
1509
|
// is the total a delete reads — not on Firebase (N is the rows loaded so
|
|
1498
1510
|
// far), a union of datasheets (N counts the others too), a file view (N
|
|
1499
1511
|
// counts files, not records) or offline
|
|
1500
1512
|
var isSelectAllUncountable = isFirebase ||
|
|
1501
|
-
!!((
|
|
1513
|
+
!!((_58 = (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.unionCollections) === null || _58 === void 0 ? void 0 : _58.length) ||
|
|
1502
1514
|
!!fileViewColumnId ||
|
|
1503
|
-
!!((
|
|
1504
|
-
var hasNavigation = ((
|
|
1515
|
+
!!((_59 = props.bareSettings) === null || _59 === void 0 ? void 0 : _59.bareOffline);
|
|
1516
|
+
var hasNavigation = ((_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.handleNavigate) ? true : false;
|
|
1505
1517
|
var formColumn = "grid-cols-12";
|
|
1506
|
-
var useMobileView = (
|
|
1518
|
+
var useMobileView = (_62 = (_61 = props.bareSettings) === null || _61 === void 0 ? void 0 : _61.bareUpdateMobileView) !== null && _62 !== void 0 ? _62 : false;
|
|
1507
1519
|
var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
|
|
1508
|
-
var isActivityLog = (((
|
|
1509
|
-
((
|
|
1510
|
-
(((
|
|
1511
|
-
((
|
|
1520
|
+
var isActivityLog = (((_64 = (_63 = props.edit) === null || _63 === void 0 ? void 0 : _63.activityLog) === null || _64 === void 0 ? void 0 : _64.enableComments) &&
|
|
1521
|
+
((_65 = props.edit) === null || _65 === void 0 ? void 0 : _65.activityLog.commentCollectionId)) ||
|
|
1522
|
+
(((_67 = (_66 = props.edit) === null || _66 === void 0 ? void 0 : _66.activityLog) === null || _67 === void 0 ? void 0 : _67.enableLogs) &&
|
|
1523
|
+
((_68 = props.edit) === null || _68 === void 0 ? void 0 : _68.activityLog.logsCollectionId));
|
|
1512
1524
|
// INFO: where a record opens in a drawer — the read drawer, or in place
|
|
1513
1525
|
// inside one (a related tab's row, or the record the read drawer nests,
|
|
1514
1526
|
// both marked bareInlineActivity) — its comments and logs are the read
|
|
1515
1527
|
// view's Activity tab, so the record, its Update button and its activity
|
|
1516
1528
|
// share that one drawer. Elsewhere the read view is a page and stays as it
|
|
1517
1529
|
// was: no Activity tab, and a Log button opening the activity drawer.
|
|
1518
|
-
var hasReadDrawer = !!((
|
|
1519
|
-
!!((
|
|
1530
|
+
var hasReadDrawer = !!((_69 = props.viewSettings) === null || _69 === void 0 ? void 0 : _69.readDrawer) ||
|
|
1531
|
+
!!((_70 = props.bareSettings) === null || _70 === void 0 ? void 0 : _70.bareInlineActivity);
|
|
1520
1532
|
var hasActivityTab = !!isActivityLog && hasReadDrawer;
|
|
1521
1533
|
var isActivityTab = hasActivityTab &&
|
|
1522
1534
|
props.type === "read" &&
|
|
1523
|
-
((
|
|
1535
|
+
((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.viewId) === readViewIds_1.ACTIVITY_VIEW_ID;
|
|
1524
1536
|
// INFO: the record whose activity tab was shown; going back to the list asks
|
|
1525
1537
|
// its comment count again, as the activity drawer does when it closes. Keyed
|
|
1526
1538
|
// on props.type, not resolvedType — a list hosting the read drawer stays a
|
|
@@ -1552,12 +1564,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1552
1564
|
// column
|
|
1553
1565
|
recordTitleColumn: (_d = ((_c = (_b = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _b !== void 0 ? _b : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _c !== void 0 ? _c : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _d === void 0 ? void 0 : _d.id, model: structure }));
|
|
1554
1566
|
};
|
|
1555
|
-
var customPaginationSize = ((
|
|
1567
|
+
var customPaginationSize = ((_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.customPaginationCount)
|
|
1556
1568
|
? props.organise.customPaginationCount(size)
|
|
1557
1569
|
: undefined;
|
|
1558
1570
|
//TODO : Code - Pass ...devSettings, search dbEndpoint:
|
|
1559
1571
|
var writeServerQuery = new writeQuery_1.WriteQuery({
|
|
1560
|
-
dbModule: (
|
|
1572
|
+
dbModule: (_73 = props.lib) === null || _73 === void 0 ? void 0 : _73.axios,
|
|
1561
1573
|
dbType: devSettings.server,
|
|
1562
1574
|
dbCollection: props.collectionId,
|
|
1563
1575
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1565,7 +1577,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1565
1577
|
dbUserToken: devSettings.dbUserToken,
|
|
1566
1578
|
});
|
|
1567
1579
|
var readServerQuery = new readQuery_1.ReadQuery({
|
|
1568
|
-
dbModule: (
|
|
1580
|
+
dbModule: (_74 = props.lib) === null || _74 === void 0 ? void 0 : _74.axios,
|
|
1569
1581
|
dbType: devSettings.server,
|
|
1570
1582
|
dbCollection: props.collectionId,
|
|
1571
1583
|
dbEndpoint: devSettings.dbEndpoint,
|
|
@@ -1573,12 +1585,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1573
1585
|
dbUserToken: devSettings.dbUserToken,
|
|
1574
1586
|
});
|
|
1575
1587
|
var moreButtonPopUp = [
|
|
1576
|
-
((
|
|
1588
|
+
((_75 = props.edit) === null || _75 === void 0 ? void 0 : _75.allEditable) &&
|
|
1577
1589
|
// INFO: the import runs on the server (importEndpoint), so a Firestore
|
|
1578
1590
|
// datasheet served through one can import; only the browser-direct
|
|
1579
1591
|
// Firebase client has no server to import through
|
|
1580
1592
|
!isFirebaseClient &&
|
|
1581
|
-
!((
|
|
1593
|
+
!((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideImportCSV)
|
|
1582
1594
|
? {
|
|
1583
1595
|
text: "Import Excel",
|
|
1584
1596
|
onClick: function () {
|
|
@@ -1587,7 +1599,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1587
1599
|
},
|
|
1588
1600
|
}
|
|
1589
1601
|
: null,
|
|
1590
|
-
!((
|
|
1602
|
+
!((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.exportSettings) === null || _79 === void 0 ? void 0 : _79.hideExportCSV)
|
|
1591
1603
|
? {
|
|
1592
1604
|
text: "Export CSV",
|
|
1593
1605
|
onClick: function () {
|
|
@@ -1597,7 +1609,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1597
1609
|
},
|
|
1598
1610
|
}
|
|
1599
1611
|
: null,
|
|
1600
|
-
!((
|
|
1612
|
+
!((_81 = (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.exportSettings) === null || _81 === void 0 ? void 0 : _81.hideExportExcel)
|
|
1601
1613
|
? {
|
|
1602
1614
|
text: "Export Excel",
|
|
1603
1615
|
onClick: function () {
|
|
@@ -1607,7 +1619,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1607
1619
|
},
|
|
1608
1620
|
}
|
|
1609
1621
|
: null,
|
|
1610
|
-
!((
|
|
1622
|
+
!((_83 = (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.exportSettings) === null || _83 === void 0 ? void 0 : _83.hideExportPDF)
|
|
1611
1623
|
? {
|
|
1612
1624
|
text: "Export PDF",
|
|
1613
1625
|
onClick: function () {
|
|
@@ -1617,7 +1629,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1617
1629
|
},
|
|
1618
1630
|
}
|
|
1619
1631
|
: null,
|
|
1620
|
-
!((
|
|
1632
|
+
!((_85 = (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.exportSettings) === null || _85 === void 0 ? void 0 : _85.hideExportQR)
|
|
1621
1633
|
? {
|
|
1622
1634
|
text: "Export QR",
|
|
1623
1635
|
onClick: function () {
|
|
@@ -1627,7 +1639,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1627
1639
|
},
|
|
1628
1640
|
}
|
|
1629
1641
|
: null,
|
|
1630
|
-
!((
|
|
1642
|
+
!((_87 = (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.exportSettings) === null || _87 === void 0 ? void 0 : _87.hideExportQR)
|
|
1631
1643
|
? {
|
|
1632
1644
|
text: "Export QR(Data)",
|
|
1633
1645
|
onClick: function () {
|
|
@@ -1637,7 +1649,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1637
1649
|
},
|
|
1638
1650
|
}
|
|
1639
1651
|
: null,
|
|
1640
|
-
!((
|
|
1652
|
+
!((_89 = (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.exportSettings) === null || _89 === void 0 ? void 0 : _89.hideExportPrint)
|
|
1641
1653
|
? {
|
|
1642
1654
|
text: "Print",
|
|
1643
1655
|
onClick: function () {
|
|
@@ -1649,8 +1661,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1649
1661
|
: null,
|
|
1650
1662
|
// INFO: drafts only exist where the form can save one, so the filter has
|
|
1651
1663
|
// nothing to find on any other page
|
|
1652
|
-
((
|
|
1653
|
-
!((
|
|
1664
|
+
((_90 = props.edit) === null || _90 === void 0 ? void 0 : _90.enableUpdateDraft) &&
|
|
1665
|
+
!((_92 = (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.exportSettings) === null || _92 === void 0 ? void 0 : _92.hideExportDraft)
|
|
1654
1666
|
? {
|
|
1655
1667
|
text: filterDraft ? "Show All Items" : "Filter Draft",
|
|
1656
1668
|
onClick: function () {
|
|
@@ -1659,7 +1671,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
1659
1671
|
}
|
|
1660
1672
|
: null,
|
|
1661
1673
|
].filter(Boolean);
|
|
1662
|
-
if ((
|
|
1674
|
+
if ((_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.moreSettings)
|
|
1663
1675
|
moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
|
|
1664
1676
|
//=====================================================================================
|
|
1665
1677
|
//SECTION: User Column Visibility Handlers
|
|
@@ -2042,6 +2054,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2042
2054
|
handleRefreshRows: handleRefreshRows,
|
|
2043
2055
|
handleCatchUpRows: handleCatchUpRows,
|
|
2044
2056
|
handleRefreshLoadedRows: handleRefreshLoadedRows,
|
|
2057
|
+
handleRecountComments: handleRecountComments,
|
|
2045
2058
|
handleFormSubmit: handleFormSubmit,
|
|
2046
2059
|
handleFormCheck: handleFormCheck,
|
|
2047
2060
|
handleApplyFlexFilters: handleApplyFlexFilters,
|
|
@@ -2098,14 +2111,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2098
2111
|
//=====================================================================================
|
|
2099
2112
|
//SECTION: Saved Views
|
|
2100
2113
|
//=====================================================================================
|
|
2101
|
-
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (
|
|
2114
|
+
var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.persistKey, (_95 = devSettings.currentUser) === null || _95 === void 0 ? void 0 : _95.userEmail);
|
|
2102
2115
|
(0, react_1.useEffect)(function () {
|
|
2103
2116
|
if (isSavedViewsEnabled && !isAppViews)
|
|
2104
2117
|
setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
|
|
2105
2118
|
}, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
|
|
2106
2119
|
// INFO: the app keeps All's settings, so every change is kept in this
|
|
2107
2120
|
// browser until the person updates the view for everyone or resets it
|
|
2108
|
-
var isViewDraftsEnabled = isSavedViewsEnabled && ((
|
|
2121
|
+
var isViewDraftsEnabled = isSavedViewsEnabled && ((_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.allView) !== undefined;
|
|
2109
2122
|
var handleGetViewDraftKey = function (viewId) {
|
|
2110
2123
|
var _a, _b;
|
|
2111
2124
|
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);
|
|
@@ -2234,7 +2247,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2234
2247
|
var lastSentSharedViewsRef = (0, react_1.useRef)(null);
|
|
2235
2248
|
(0, react_1.useEffect)(function () {
|
|
2236
2249
|
lastSentSharedViewsRef.current = null;
|
|
2237
|
-
}, [(
|
|
2250
|
+
}, [(_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.sharedViews]);
|
|
2238
2251
|
var handleStoreSharedViews = function (update) {
|
|
2239
2252
|
var _a, _b, _c;
|
|
2240
2253
|
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
|
|
@@ -2251,7 +2264,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2251
2264
|
var openingViewSettledRef = (0, react_1.useRef)(false);
|
|
2252
2265
|
// INFO: keyed on the ids, so a list handed in again on every render does
|
|
2253
2266
|
// not re-run the opening
|
|
2254
|
-
var starredViewIdsKey = ((
|
|
2267
|
+
var starredViewIdsKey = ((_99 = (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.defaultSavedViewIds) !== null && _99 !== void 0 ? _99 : []).join("|");
|
|
2255
2268
|
(0, react_1.useEffect)(function () {
|
|
2256
2269
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2257
2270
|
if (!isSavedViewsEnabled || openingViewSettledRef.current)
|
|
@@ -2295,13 +2308,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2295
2308
|
/* eslint-disable */
|
|
2296
2309
|
}, [
|
|
2297
2310
|
isSavedViewsEnabled,
|
|
2298
|
-
(
|
|
2311
|
+
(_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.initialSavedViewId,
|
|
2299
2312
|
starredViewIdsKey,
|
|
2300
|
-
(
|
|
2313
|
+
(_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.sharedViews,
|
|
2301
2314
|
savedViews,
|
|
2302
2315
|
]);
|
|
2303
2316
|
/* eslint-enable */
|
|
2304
|
-
var appDefaultViewIds = ((
|
|
2317
|
+
var appDefaultViewIds = ((_103 = (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.defaultSavedViews) !== null && _103 !== void 0 ? _103 : [])
|
|
2305
2318
|
.map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
|
|
2306
2319
|
.join("|");
|
|
2307
2320
|
// INFO: keyed on the ids, not the array, so an inline literal passed on every
|
|
@@ -2730,8 +2743,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2730
2743
|
laneWidths,
|
|
2731
2744
|
drawerWidth,
|
|
2732
2745
|
pinnedColumnIds,
|
|
2733
|
-
(
|
|
2734
|
-
(
|
|
2746
|
+
(_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.allView,
|
|
2747
|
+
(_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.sharedViews,
|
|
2735
2748
|
savedViews,
|
|
2736
2749
|
]);
|
|
2737
2750
|
/* eslint-enable */
|
|
@@ -2775,7 +2788,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2775
2788
|
if (scrollRestoredRef.current)
|
|
2776
2789
|
scrollCatchUpRef.current = null;
|
|
2777
2790
|
/* eslint-disable */
|
|
2778
|
-
}, [props.collectionId, (
|
|
2791
|
+
}, [props.collectionId, (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.persistKey]);
|
|
2779
2792
|
/* eslint-enable */
|
|
2780
2793
|
// INFO: wait a frame — rows land in state one tick before layout
|
|
2781
2794
|
(0, react_1.useEffect)(function () {
|
|
@@ -2810,7 +2823,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2810
2823
|
(0, react_1.useEffect)(function () {
|
|
2811
2824
|
handleOfflinePrefetch();
|
|
2812
2825
|
/* eslint-disable */
|
|
2813
|
-
}, [props.collectionId, (
|
|
2826
|
+
}, [props.collectionId, (_107 = props.bareSettings) === null || _107 === void 0 ? void 0 : _107.bareOffline]);
|
|
2814
2827
|
/* eslint-enable */
|
|
2815
2828
|
// INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
|
|
2816
2829
|
// Calls through handleRefreshRef so the interval always dispatches the latest
|
|
@@ -2830,7 +2843,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2830
2843
|
}, interval);
|
|
2831
2844
|
return function () { return clearInterval(timer); };
|
|
2832
2845
|
/* eslint-disable */
|
|
2833
|
-
}, [(
|
|
2846
|
+
}, [(_108 = props.bareSettings) === null || _108 === void 0 ? void 0 : _108.barePollingInterval, isLive, isNetworkOffline]);
|
|
2834
2847
|
/* eslint-enable */
|
|
2835
2848
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
2836
2849
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
@@ -2872,7 +2885,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
2872
2885
|
};
|
|
2873
2886
|
/* eslint-disable */
|
|
2874
2887
|
}, [
|
|
2875
|
-
(
|
|
2888
|
+
(_109 = props.bareSettings) === null || _109 === void 0 ? void 0 : _109.bareSocketName,
|
|
2876
2889
|
props.collectionId,
|
|
2877
2890
|
props.devSettings.sseEndpoint,
|
|
2878
2891
|
props.devSettings.dbAPIToken,
|
|
@@ -3149,10 +3162,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3149
3162
|
props.collectionId,
|
|
3150
3163
|
props.model,
|
|
3151
3164
|
props.localURLEndpoint,
|
|
3152
|
-
(
|
|
3165
|
+
(_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.extendedTabs,
|
|
3153
3166
|
listViewId,
|
|
3154
|
-
(
|
|
3155
|
-
(
|
|
3167
|
+
(_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.additionalQuery,
|
|
3168
|
+
(_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.groupBy,
|
|
3156
3169
|
resolvedType,
|
|
3157
3170
|
]);
|
|
3158
3171
|
/**
|
|
@@ -3304,7 +3317,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
3304
3317
|
};
|
|
3305
3318
|
}, 100);
|
|
3306
3319
|
return function () { return clearTimeout(timeoutId); };
|
|
3307
|
-
}, [(
|
|
3320
|
+
}, [(_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.showReadFloatingNav, resolvedType, props.id, loading]);
|
|
3308
3321
|
(0, react_1.useEffect)(function () {
|
|
3309
3322
|
if (resolvedType !== "read")
|
|
3310
3323
|
return;
|
|
@@ -5390,7 +5403,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5390
5403
|
// the link view ends and the list opens as it normally would. A change
|
|
5391
5404
|
// while a record is open (opening one drops the link from the URL) waits
|
|
5392
5405
|
// until the list shows again
|
|
5393
|
-
var lastInitialSearchRef = (0, react_1.useRef)((
|
|
5406
|
+
var lastInitialSearchRef = (0, react_1.useRef)((_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.initialSearch);
|
|
5394
5407
|
// INFO: persistViewState reads its stored state only once the link view
|
|
5395
5408
|
// has ended, a render later
|
|
5396
5409
|
var isNormalOpenPendingRef = (0, react_1.useRef)(false);
|
|
@@ -5417,7 +5430,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
5417
5430
|
setIsLinkOpen(true);
|
|
5418
5431
|
handleApplySavedView(null, true, value);
|
|
5419
5432
|
/* eslint-disable */
|
|
5420
|
-
}, [(
|
|
5433
|
+
}, [(_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.initialSearch, resolvedType]);
|
|
5421
5434
|
(0, react_1.useEffect)(function () {
|
|
5422
5435
|
if (!isNormalOpenPendingRef.current || isLinkOpen)
|
|
5423
5436
|
return;
|
|
@@ -7661,7 +7674,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
7661
7674
|
var columnTypeActions = {
|
|
7662
7675
|
canUpdate: canUpdateRecord,
|
|
7663
7676
|
dateWarnings: isDateWarnings,
|
|
7664
|
-
onButtonClick: (
|
|
7677
|
+
onButtonClick: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.onButtonClick,
|
|
7665
7678
|
onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7666
7679
|
var _a;
|
|
7667
7680
|
return __generator(this, function (_b) {
|
|
@@ -7678,7 +7691,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
7678
7691
|
}
|
|
7679
7692
|
});
|
|
7680
7693
|
}); },
|
|
7681
|
-
onTimeTrackingAction: ((
|
|
7694
|
+
onTimeTrackingAction: ((_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.onTimeTrackingAction) && canUpdateRecord
|
|
7682
7695
|
? function (rowId, columnId, action) {
|
|
7683
7696
|
return handleTimeTrackingAction(rowId, columnId, action);
|
|
7684
7697
|
}
|
|
@@ -9943,21 +9956,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9943
9956
|
: rows;
|
|
9944
9957
|
};
|
|
9945
9958
|
/* eslint-disable */
|
|
9946
|
-
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (
|
|
9947
|
-
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (
|
|
9959
|
+
var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_118 = props.bareSettings) === null || _118 === void 0 ? void 0 : _118.bareNewDTW]);
|
|
9960
|
+
var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_119 = props.bareSettings) === null || _119 === void 0 ? void 0 : _119.bareNewDTW]);
|
|
9948
9961
|
/* eslint-enable */
|
|
9949
|
-
// INFO: a row's buttons beside its title
|
|
9950
|
-
//
|
|
9951
|
-
//
|
|
9952
|
-
//
|
|
9953
|
-
//
|
|
9954
|
-
//
|
|
9955
|
-
//
|
|
9956
|
-
//
|
|
9957
|
-
//
|
|
9958
|
-
//
|
|
9959
|
-
//
|
|
9960
|
-
// their record from the card and carry the bubble alone.
|
|
9962
|
+
// INFO: a row's buttons beside its title each open the record on their own
|
|
9963
|
+
// view — with the read drawer, the same drawer on a different tab:
|
|
9964
|
+
// - the eye opens its read view on Details, for anyone who can see it;
|
|
9965
|
+
// - the pencil opens its edit form, for whoever may update (in the drawer
|
|
9966
|
+
// with bareSettings.bareFormDrawer);
|
|
9967
|
+
// - the bubble opens its comments and logs: the drawer's Activity tab with
|
|
9968
|
+
// the read drawer, and the activity drawer over the table without it, so
|
|
9969
|
+
// the log can be read without leaving the table.
|
|
9970
|
+
// A table needs the eye even though a read-only cell opens the record, since
|
|
9971
|
+
// an editable title cell turns into an input when clicked. Cards open their
|
|
9972
|
+
// record from the card, so they carry the pencil and the bubble.
|
|
9961
9973
|
var handleOpenRecordEdit = function (id) {
|
|
9962
9974
|
var _a, _b;
|
|
9963
9975
|
handleCaptureListScroll(id);
|
|
@@ -9994,20 +10006,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
9994
10006
|
(!hasActivityTab ||
|
|
9995
10007
|
!hasNavigation ||
|
|
9996
10008
|
(resolvedType === "list" &&
|
|
9997
|
-
!((
|
|
9998
|
-
// INFO: in a drawer the bubble opens the record with its details as well
|
|
9999
|
-
var recordActivityLabel = hasNavigation && hasReadDrawer ? "Open activity and details" : undefined;
|
|
10000
|
-
// INFO: kept for the map's info window, which has no read view to defer to
|
|
10009
|
+
!((_120 = props.bareSettings) === null || _120 === void 0 ? void 0 : _120.bareHideCollectionActivity)));
|
|
10001
10010
|
var recordEditAction = canUpdateRecord ? handleOpenRecordEdit : undefined;
|
|
10002
10011
|
var recordActivityAction = isActivityLog
|
|
10003
10012
|
? handleOpenRecordActivity
|
|
10004
10013
|
: undefined;
|
|
10005
|
-
// INFO: the
|
|
10006
|
-
//
|
|
10007
|
-
|
|
10008
|
-
var recordReadAction = hasNavigation && !(hasReadDrawer && recordActivityAction)
|
|
10009
|
-
? handleOpenRecordRead
|
|
10010
|
-
: undefined;
|
|
10014
|
+
// INFO: the eye only navigates through handleNavigate, so a host that routes
|
|
10015
|
+
// by url gets none rather than a button that does nothing
|
|
10016
|
+
var recordOpenAction = hasNavigation ? handleOpenRecordRead : undefined;
|
|
10011
10017
|
// INFO: isNewTable — the new table opens a record from its title, edits in
|
|
10012
10018
|
// the cell and carries the comment bubble beside the title, so its rows
|
|
10013
10019
|
// drop the pencil and bubble column and keep only the host's own actions
|
|
@@ -11927,11 +11933,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
11927
11933
|
});
|
|
11928
11934
|
});
|
|
11929
11935
|
// INFO: the record's comments and logs, in place of the Log button's
|
|
11930
|
-
// second drawer, where the record opens in a drawer.
|
|
11931
|
-
//
|
|
11932
|
-
// can be dragged out of that order
|
|
11936
|
+
// second drawer, where the record opens in a drawer. Right after Details,
|
|
11937
|
+
// before any other tab; without them Details stands alone. Fixed like
|
|
11938
|
+
// Details so neither can be dragged out of that order
|
|
11933
11939
|
if (resolvedType === "read" && hasActivityTab)
|
|
11934
|
-
tabs.
|
|
11940
|
+
tabs.splice(tabs.findIndex(function (each) { return each.id === "general"; }) + 1, 0, {
|
|
11935
11941
|
id: readViewIds_1.ACTIVITY_VIEW_ID,
|
|
11936
11942
|
name: "Activity",
|
|
11937
11943
|
fixed: true,
|
|
@@ -12134,7 +12140,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12134
12140
|
// INFO: a row's comment button opens the row in place on its Activity
|
|
12135
12141
|
// tab, not a second drawer over the read drawer
|
|
12136
12142
|
bareInlineActivity: true,
|
|
12137
|
-
// INFO: the opened row's
|
|
12143
|
+
// INFO: the opened row's Details | Activity switch sits beside Back,
|
|
12138
12144
|
// so its own tab bar would be a second row of tabs under this one
|
|
12139
12145
|
bareHideReadTabs: true,
|
|
12140
12146
|
} }));
|
|
@@ -12811,7 +12817,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
12811
12817
|
else {
|
|
12812
12818
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
12813
12819
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
|
|
12814
|
-
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, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction,
|
|
12820
|
+
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, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction, onRowEdit: recordEditAction, onRowOpen: recordOpenAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, commentUnread: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts) ? commentUnread : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
|
|
12815
12821
|
? handleMoveRowToGroup
|
|
12816
12822
|
: undefined,
|
|
12817
12823
|
// INFO: per-group paging — scroll appends inside a band, page
|
|
@@ -13451,7 +13457,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13451
13457
|
// INFO: each section pages itself, so the list-wide pager would
|
|
13452
13458
|
// only page the read that seeded them
|
|
13453
13459
|
hidePagination: ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.hidePagination) ||
|
|
13454
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip,
|
|
13460
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip, onRowEdit: recordEditAction, onRowActivity: recordActivityAction })));
|
|
13455
13461
|
}
|
|
13456
13462
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13457
13463
|
react_1.default.createElement(list_1.List, { darkModeBg: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: ((_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.disableSelectFullData) === null || _7 === void 0 ? void 0 : _7.list) ||
|
|
@@ -13585,7 +13591,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
13585
13591
|
// INFO: each section pages itself, so the list-wide pager would
|
|
13586
13592
|
// only page the read that seeded them
|
|
13587
13593
|
hidePagination: ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.hidePagination) ||
|
|
13588
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize,
|
|
13594
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, onCardEdit: recordEditAction, onCardActivity: recordActivityAction })));
|
|
13589
13595
|
}
|
|
13590
13596
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13591
13597
|
react_1.default.createElement(grid_1.Grid, { darkMode: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.darkMode, darkModeBg: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
|
|
@@ -14236,7 +14242,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14236
14242
|
var _a, _b;
|
|
14237
14243
|
handleCaptureListScroll(id);
|
|
14238
14244
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
14239
|
-
},
|
|
14245
|
+
}, onCardEdit: recordEditAction, onCardActivity: recordActivityAction, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg })));
|
|
14240
14246
|
}
|
|
14241
14247
|
return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
14242
14248
|
? "Data has exceeded limit, please apply filters"
|
|
@@ -14799,14 +14805,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14799
14805
|
};
|
|
14800
14806
|
return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
|
|
14801
14807
|
renderNotification("root"),
|
|
14802
|
-
((
|
|
14808
|
+
((_122 = (_121 = props.renderSettings) === null || _121 === void 0 ? void 0 : _121.renderLoadingUI) === null || _122 === void 0 ? void 0 : _122.call(_121)) && loading ? ((_123 = props.renderSettings) === null || _123 === void 0 ? void 0 : _123.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_124 = props.organise) === null || _124 === void 0 ? void 0 : _124.darkMode, darkModeBg: (_125 = props.organise) === null || _125 === void 0 ? void 0 : _125.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
|
|
14803
14809
|
var _a, _b;
|
|
14804
14810
|
if (loading)
|
|
14805
14811
|
return;
|
|
14806
14812
|
handlePopUpModal(false);
|
|
14807
14813
|
setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
|
|
14808
14814
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
|
|
14809
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14815
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_126 = props.organise) === null || _126 === void 0 ? void 0 : _126.darkMode, darkModeBg: (_127 = props.organise) === null || _127 === void 0 ? void 0 : _127.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
|
|
14810
14816
|
return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
|
|
14811
14817
|
if (dataId) {
|
|
14812
14818
|
var currentValue = selectedData[referenceCreationModal.id];
|
|
@@ -14822,19 +14828,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14822
14828
|
}, onClose: function () {
|
|
14823
14829
|
setReferenceCreationModal({ id: "", name: "", type: "string" });
|
|
14824
14830
|
} }),
|
|
14825
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14831
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_128 = props.organise) === null || _128 === void 0 ? void 0 : _128.darkMode, darkModeBg: (_129 = props.organise) === null || _129 === void 0 ? void 0 : _129.darkModeBg, maxWidth: "2xl", open: referenceDeleteTableData.length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
|
|
14826
14832
|
setReferenceDeleteTableData([]);
|
|
14827
14833
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14828
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14834
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_130 = props.organise) === null || _130 === void 0 ? void 0 : _130.darkMode, darkModeBg: (_131 = props.organise) === null || _131 === void 0 ? void 0 : _131.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
|
|
14829
14835
|
setDeletePasscodeInput("");
|
|
14830
14836
|
setDeleteModal(!deleteModal);
|
|
14831
14837
|
setDeleteFeedId("");
|
|
14832
14838
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14833
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14839
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_132 = props.organise) === null || _132 === void 0 ? void 0 : _132.darkMode, darkModeBg: (_133 = props.organise) === null || _133 === void 0 ? void 0 : _133.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
|
|
14834
14840
|
setBatchUpdateData({ columnId: "", columnData: {} });
|
|
14835
14841
|
setBatchUpdateModal(false);
|
|
14836
14842
|
}, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
|
|
14837
|
-
react_1.default.createElement(modal_1.Modal, { darkMode: (
|
|
14843
|
+
react_1.default.createElement(modal_1.Modal, { darkMode: (_134 = props.organise) === null || _134 === void 0 ? void 0 : _134.darkMode, darkModeBg: (_135 = props.organise) === null || _135 === void 0 ? void 0 : _135.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
|
|
14838
14844
|
var _a, _b;
|
|
14839
14845
|
if (props.space)
|
|
14840
14846
|
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 }));
|
|
@@ -14845,7 +14851,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14845
14851
|
renderContent(),
|
|
14846
14852
|
renderReadDrawer(),
|
|
14847
14853
|
canHostDrawer && renderDrawerDiscardModal(),
|
|
14848
|
-
canOpenActivityDrawer && (react_1.default.createElement(drawer_1.Drawer, { darkMode: (
|
|
14854
|
+
canOpenActivityDrawer && (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_136 = props.organise) === null || _136 === void 0 ? void 0 : _136.darkMode, darkModeBg: (_137 = props.organise) === null || _137 === void 0 ? void 0 : _137.darkModeBg, testId: "dt-activity-drawer",
|
|
14849
14855
|
// INFO: z-50 lifts it over a Modal the table may sit in (z-40)
|
|
14850
14856
|
zIndex: "z-50", open: activityModal,
|
|
14851
14857
|
// INFO: the record stays set while the drawer slides out — clearing it
|
|
@@ -14854,7 +14860,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
|
14854
14860
|
onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75",
|
|
14855
14861
|
// INFO: dragged like the read drawer; the width sticks across
|
|
14856
14862
|
// opens while the list stays mounted
|
|
14857
|
-
resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((
|
|
14863
|
+
resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_138 = props.id) !== null && _138 !== void 0 ? _138 : "") : activityId) })),
|
|
14858
14864
|
renderScrollSentinel()));
|
|
14859
14865
|
});
|
|
14860
14866
|
//# sourceMappingURL=index.js.map
|