blixify-ui-web 1.2.265 → 1.2.266

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.
@@ -235,7 +235,7 @@ var handleCheckEmptyCardValue = function (value) {
235
235
  };
236
236
  exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
237
237
  exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
238
- 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;
238
+ 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;
239
239
  // INFO: every view draws a lookup as its source column's type, read-only, so
240
240
  // no type branch below meets "lookup"; rawProps.model keeps the lookups as
241
241
  // stored for the columns handed back to the host
@@ -254,7 +254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
254
254
  // the list never refetching while the panel is open, which fails silently.
255
255
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
256
256
  // routed straight back into it — so expand-to-full-page is local state.
257
- var _128 = (0, react_1.useState)(false), drawerPageView = _128[0], setDrawerPageView = _128[1];
257
+ var _125 = (0, react_1.useState)(false), drawerPageView = _125[0], setDrawerPageView = _125[1];
258
258
  // INFO: the panel keeps rendering the record it was opened with rather than
259
259
  // live props. Without this, navigating back to the list would re-render the
260
260
  // still-mounted panel as a second list behind the overlay.
@@ -309,7 +309,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
309
309
  drawerFormEditedRef.current = false;
310
310
  }
311
311
  drawerOpenRef.current = isDrawerHost;
312
- var _129 = (0, react_1.useState)(false), drawerDiscardModal = _129[0], setDrawerDiscardModal = _129[1];
312
+ var _126 = (0, react_1.useState)(false), drawerDiscardModal = _126[0], setDrawerDiscardModal = _126[1];
313
313
  // INFO: leaving the record ends the escape, so the next row opened from the
314
314
  // list peeks in the panel again rather than inheriting a full page the user
315
315
  // asked for once. Saving a form on the full page lands on its read view, which
@@ -388,14 +388,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
388
388
  initialFilterReferenceDate: initialFilterReferenceDate,
389
389
  };
390
390
  };
391
- var _130 = intialiseDefaultFilterValues(), initialFilterSearch = _130.initialFilterSearch, initialFilterSearchParams = _130.initialFilterSearchParams, initialFilterSelection = _130.initialFilterSelection, initialFilterReference = _130.initialFilterReference, initialFilterReferenceDate = _130.initialFilterReferenceDate;
391
+ var _127 = intialiseDefaultFilterValues(), initialFilterSearch = _127.initialFilterSearch, initialFilterSearchParams = _127.initialFilterSearchParams, initialFilterSelection = _127.initialFilterSelection, initialFilterReference = _127.initialFilterReference, initialFilterReferenceDate = _127.initialFilterReferenceDate;
392
392
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
393
- var _131 = (0, viewStatePersistence_1.usePersistedViewState)({
393
+ var _128 = (0, viewStatePersistence_1.usePersistedViewState)({
394
394
  mode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.persistViewState,
395
395
  collectionId: props.collectionId,
396
396
  persistKey: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistKey,
397
397
  type: resolvedType,
398
- }), rawPersistedState = _131.persistedState, isPersistEnabled = _131.isEnabled, handleSaveView = _131.handleSaveView, handleRegisterViewSnapshot = _131.handleRegisterViewSnapshot;
398
+ }), rawPersistedState = _128.persistedState, isPersistEnabled = _128.isEnabled, handleSaveView = _128.handleSaveView, handleRegisterViewSnapshot = _128.handleRegisterViewSnapshot;
399
399
  // INFO: drop stored filters/sort on removed columns — they would empty the table
400
400
  var persistedState = (0, react_1.useMemo)(function () {
401
401
  var _a, _b, _c, _d;
@@ -411,8 +411,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
411
411
  (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterListObjects,
412
412
  (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterRelated,
413
413
  ]);
414
- var _132 = (0, react_1.useState)(false), loading = _132[0], setLoading = _132[1];
415
- var _133 = (0, react_1.useState)(), notification = _133[0], setNotification = _133[1];
414
+ var _129 = (0, react_1.useState)(false), loading = _129[0], setLoading = _129[1];
415
+ var _130 = (0, react_1.useState)(), notification = _130[0], setNotification = _130[1];
416
416
  // INFO: a success toast is confirmation, not a decision — it clears itself so
417
417
  // it never sits on the floating step bar; errors stay until dismissed
418
418
  (0, react_1.useEffect)(function () {
@@ -422,67 +422,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
422
422
  return function () { return clearTimeout(timer); };
423
423
  }, [notification]);
424
424
  //INFO : Used by List
425
- var _134 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _q !== void 0 ? _q : initialFilterSearch), filterSearch = _134[0], setFilterSearch = _134[1];
426
- var _135 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _r !== void 0 ? _r : initialFilterSearchParams), filterSearchParams = _135[0], setFilterSearchParams = _135[1];
427
- var _136 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _s !== void 0 ? _s : initialFilterSelection), filterSelection = _136[0], setFilterSelection = _136[1];
428
- var _137 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _t !== void 0 ? _t : initialFilterReference), filterReference = _137[0], setFilterReference = _137[1];
429
- var _138 = (0, react_1.useState)({}), filterReferenceSearch = _138[0], setFilterReferenceSearch = _138[1];
430
- var _139 = (0, react_1.useState)({}), filterReferenceList = _139[0], setFilterReferenceList = _139[1];
431
- var _140 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
425
+ var _131 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _q !== void 0 ? _q : initialFilterSearch), filterSearch = _131[0], setFilterSearch = _131[1];
426
+ var _132 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _r !== void 0 ? _r : initialFilterSearchParams), filterSearchParams = _132[0], setFilterSearchParams = _132[1];
427
+ var _133 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _s !== void 0 ? _s : initialFilterSelection), filterSelection = _133[0], setFilterSelection = _133[1];
428
+ var _134 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _t !== void 0 ? _t : initialFilterReference), filterReference = _134[0], setFilterReference = _134[1];
429
+ var _135 = (0, react_1.useState)({}), filterReferenceSearch = _135[0], setFilterReferenceSearch = _135[1];
430
+ var _136 = (0, react_1.useState)({}), filterReferenceList = _136[0], setFilterReferenceList = _136[1];
431
+ var _137 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
432
432
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
433
- : initialFilterReferenceDate), filterReferenceDate = _140[0], setFilterReferenceDate = _140[1];
434
- var _141 = (0, react_1.useState)(true), tableLoading = _141[0], setTableLoading = _141[1];
435
- var _142 = (0, react_1.useState)(""), cursor = _142[0], setCursor = _142[1];
436
- var _143 = (0, react_1.useState)(""), lastCursor = _143[0], setLastCursor = _143[1];
437
- var _144 = (0, react_1.useState)([]), tableData = _144[0], setTableData = _144[1];
438
- var _145 = (0, react_1.useState)([]), spaceTableData = _145[0], setSpaceTableData = _145[1];
433
+ : initialFilterReferenceDate), filterReferenceDate = _137[0], setFilterReferenceDate = _137[1];
434
+ var _138 = (0, react_1.useState)(true), tableLoading = _138[0], setTableLoading = _138[1];
435
+ var _139 = (0, react_1.useState)(""), cursor = _139[0], setCursor = _139[1];
436
+ var _140 = (0, react_1.useState)(""), lastCursor = _140[0], setLastCursor = _140[1];
437
+ var _141 = (0, react_1.useState)([]), tableData = _141[0], setTableData = _141[1];
438
+ var _142 = (0, react_1.useState)([]), spaceTableData = _142[0], setSpaceTableData = _142[1];
439
439
  // INFO: a save resolves after later renders, so it reads the table from here —
440
440
  // the state it closed over can predate an earlier save on the same row
441
441
  var tableDataRef = (0, react_1.useRef)([]);
442
442
  var spaceTableDataRef = (0, react_1.useRef)([]);
443
443
  tableDataRef.current = tableData;
444
444
  spaceTableDataRef.current = spaceTableData;
445
- var _146 = (0, react_1.useState)(0), size = _146[0], setSize = _146[1];
446
- var _147 = (0, react_1.useState)((_w = (_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _u !== void 0 ? _u : (_v = props.organise) === null || _v === void 0 ? void 0 : _v.pageIndex) !== null && _w !== void 0 ? _w : 0), pageIndex = _147[0], setPageIndex = _147[1];
445
+ var _143 = (0, react_1.useState)(0), size = _143[0], setSize = _143[1];
446
+ var _144 = (0, react_1.useState)((_w = (_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _u !== void 0 ? _u : (_v = props.organise) === null || _v === void 0 ? void 0 : _v.pageIndex) !== null && _w !== void 0 ? _w : 0), pageIndex = _144[0], setPageIndex = _144[1];
447
447
  // INFO: every change of page, including the return to the first page when a
448
448
  // filter or search changes, which onChangePagination does not always report
449
449
  (0, react_1.useEffect)(function () {
450
450
  var _a, _b;
451
451
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
452
452
  }, [pageIndex]);
453
- var _148 = (0, react_1.useState)([]), selectedIds = _148[0], setSelectedIds = _148[1];
454
- var _149 = (0, react_1.useState)(false), selectAll = _149[0], setSelectAll = _149[1];
455
- var _150 = (0, react_1.useState)(""), deletePasscode = _150[0], setDeletePasscode = _150[1];
456
- var _151 = (0, react_1.useState)(""), deletePasscodeInput = _151[0], setDeletePasscodeInput = _151[1];
457
- var _152 = (0, react_1.useState)(""), deleteFeedId = _152[0], setDeleteFeedId = _152[1];
453
+ var _145 = (0, react_1.useState)([]), selectedIds = _145[0], setSelectedIds = _145[1];
454
+ var _146 = (0, react_1.useState)(false), selectAll = _146[0], setSelectAll = _146[1];
455
+ var _147 = (0, react_1.useState)(""), deletePasscode = _147[0], setDeletePasscode = _147[1];
456
+ var _148 = (0, react_1.useState)(""), deletePasscodeInput = _148[0], setDeletePasscodeInput = _148[1];
457
+ var _149 = (0, react_1.useState)(""), deleteFeedId = _149[0], setDeleteFeedId = _149[1];
458
458
  //INFO : Used by List Organise
459
459
  // INFO: Internal sort state that overrides props.organise?.sort when
460
460
  // persistViewState is enabled and a persisted sort exists
461
- var _153 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _x !== void 0 ? _x : undefined), persistedSort = _153[0], setPersistedSort = _153[1];
462
- var _154 = (0, react_1.useState)(false), filterDraft = _154[0], setFilterDraft = _154[1];
463
- var _155 = (0, react_1.useState)(false), addTabModal = _155[0], setAddTabModal = _155[1];
464
- var _156 = (0, react_1.useState)(-1), editTabIndex = _156[0], setEditTabIndex = _156[1];
461
+ var _150 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _x !== void 0 ? _x : undefined), persistedSort = _150[0], setPersistedSort = _150[1];
462
+ var _151 = (0, react_1.useState)(false), filterDraft = _151[0], setFilterDraft = _151[1];
463
+ var _152 = (0, react_1.useState)(false), addTabModal = _152[0], setAddTabModal = _152[1];
464
+ var _153 = (0, react_1.useState)(-1), editTabIndex = _153[0], setEditTabIndex = _153[1];
465
465
  //INFO : resolve the initial tab synchronously so the mount cond is already
466
466
  // tab-scoped — an empty initial tab caused a second wasted list fetch
467
- var _157 = (0, react_1.useState)(function () {
467
+ var _154 = (0, react_1.useState)(function () {
468
468
  var _a;
469
469
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
470
- }), selectedTab = _157[0], setSelectedTab = _157[1];
471
- var _158 = (0, react_1.useState)("dayGridMonth"), calendarView = _158[0], setCalendarView = _158[1];
470
+ }), selectedTab = _154[0], setSelectedTab = _154[1];
471
+ var _155 = (0, react_1.useState)("dayGridMonth"), calendarView = _155[0], setCalendarView = _155[1];
472
472
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
473
473
  // (calendarView above drives the matching range query)
474
- var _159 = (0, react_1.useState)("month"), newCalendarViewMode = _159[0], setNewCalendarViewMode = _159[1];
475
- var _160 = (0, react_1.useState)(new Date()), calendarTabMonth = _160[0], setCalendarTabMonth = _160[1];
474
+ var _156 = (0, react_1.useState)("month"), newCalendarViewMode = _156[0], setNewCalendarViewMode = _156[1];
475
+ var _157 = (0, react_1.useState)(new Date()), calendarTabMonth = _157[0], setCalendarTabMonth = _157[1];
476
476
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
477
477
  // whenever its settings change, and that must not undo the user's switch
478
478
  var calendarViewInitRef = (0, react_1.useRef)(false);
479
- var _161 = (0, react_1.useState)(true), kanbanDroppable = _161[0], setKanbanDroppable = _161[1];
480
- var _162 = (0, react_1.useState)([]), kanbanOptions = _162[0], setKanbanOptions = _162[1];
481
- var _163 = (0, react_1.useState)(false), batchUpdateModal = _163[0], setBatchUpdateModal = _163[1];
482
- var _164 = (0, react_1.useState)({
479
+ var _158 = (0, react_1.useState)(true), kanbanDroppable = _158[0], setKanbanDroppable = _158[1];
480
+ var _159 = (0, react_1.useState)([]), kanbanOptions = _159[0], setKanbanOptions = _159[1];
481
+ var _160 = (0, react_1.useState)(false), batchUpdateModal = _160[0], setBatchUpdateModal = _160[1];
482
+ var _161 = (0, react_1.useState)({
483
483
  columnId: "",
484
484
  columnData: {},
485
- }), batchUpdateData = _164[0], setBatchUpdateData = _164[1];
485
+ }), batchUpdateData = _161[0], setBatchUpdateData = _161[1];
486
486
  // INFO: system columns (created / updated at and by, record id, number)
487
487
  // join the structure hidden; the ones a user shows are kept per view
488
488
  var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
@@ -490,12 +490,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
490
490
  var appendedSystemColumnIds = isSystemColumnsEnabled
491
491
  ? 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; }); })
492
492
  : [];
493
- var _165 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _165[0], setShownSystemColumnIds = _165[1];
493
+ var _162 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _162[0], setShownSystemColumnIds = _162[1];
494
494
  var handleWithSystemColumns = function (model, shownIds) {
495
495
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
496
496
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
497
497
  };
498
- var _166 = (0, react_1.useState)(function () {
498
+ var _163 = (0, react_1.useState)(function () {
499
499
  var _a;
500
500
  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 : []);
501
501
  if (!persistedState)
@@ -522,8 +522,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
522
522
  });
523
523
  }
524
524
  return model;
525
- }), structure = _166[0], setStructure = _166[1];
526
- var _167 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _167[0], setAdditionalQuery = _167[1];
525
+ }), structure = _163[0], setStructure = _163[1];
526
+ var _164 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _164[0], setAdditionalQuery = _164[1];
527
527
  // INFO: State for user-configurable flex filters (Monday.com-style)
528
528
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
529
529
  var defaultFlexFilterRow = [
@@ -541,7 +541,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
541
541
  : (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
542
542
  ? persistedState.flexFilters
543
543
  : defaultFlexFilterRow;
544
- var _168 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _168[0], setFlexFilters = _168[1];
544
+ var _165 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _165[0], setFlexFilters = _165[1];
545
545
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
546
546
  // clear methods so chained calls in one tick aren't stale.
547
547
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -554,91 +554,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
554
554
  }, [flexFilters]);
555
555
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
556
556
  // to prevent API calls on every keystroke when typing in value inputs
557
- var _169 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _169[0], setFlexFiltersDebounced = _169[1];
557
+ var _166 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _166[0], setFlexFiltersDebounced = _166[1];
558
558
  // INFO: the filter rows of the export being set up — started from the
559
559
  // list's own when the export opens, so changing them leaves the list as it is
560
- var _170 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _170[0], setExportFlexFilters = _170[1];
561
- var _171 = (0, react_1.useState)({}), flexFilterReferenceOptions = _171[0], setFlexFilterReferenceOptions = _171[1];
562
- var _172 = (0, react_1.useState)({}), flexFilterReferenceSearch = _172[0], setFlexFilterReferenceSearch = _172[1];
563
- var _173 = (0, react_1.useState)(false), flexFilterModalOpen = _173[0], setFlexFilterModalOpen = _173[1];
564
- var _174 = (0, react_1.useState)(false), viewSettingsModalOpen = _174[0], setViewSettingsModalOpen = _174[1];
560
+ var _167 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _167[0], setExportFlexFilters = _167[1];
561
+ var _168 = (0, react_1.useState)({}), flexFilterReferenceOptions = _168[0], setFlexFilterReferenceOptions = _168[1];
562
+ var _169 = (0, react_1.useState)({}), flexFilterReferenceSearch = _169[0], setFlexFilterReferenceSearch = _169[1];
563
+ var _170 = (0, react_1.useState)(false), flexFilterModalOpen = _170[0], setFlexFilterModalOpen = _170[1];
564
+ var _171 = (0, react_1.useState)(false), viewSettingsModalOpen = _171[0], setViewSettingsModalOpen = _171[1];
565
565
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
566
566
  // Deliberately kept out of `structure`: the props-sync effect below resets
567
567
  // structure to props.model whenever props change, which would wipe the
568
568
  // choice, and the persist effect derives schema-level hiddenColumnIds from
569
569
  // structure — writing user hides there would blur the two concepts.
570
- var _175 = (0, react_1.useState)((_3 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _3 !== void 0 ? _3 : []), userHiddenColumnIds = _175[0], setUserHiddenColumnIds = _175[1];
571
- var _176 = (0, react_1.useState)(""), columnSearch = _176[0], setColumnSearch = _176[1];
572
- var _177 = (0, react_1.useState)([]), savedViews = _177[0], setSavedViews = _177[1];
573
- var _178 = (0, react_1.useState)(null), activeSavedViewId = _178[0], setActiveSavedViewId = _178[1];
570
+ var _172 = (0, react_1.useState)((_3 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _3 !== void 0 ? _3 : []), userHiddenColumnIds = _172[0], setUserHiddenColumnIds = _172[1];
571
+ var _173 = (0, react_1.useState)(""), columnSearch = _173[0], setColumnSearch = _173[1];
572
+ var _174 = (0, react_1.useState)([]), savedViews = _174[0], setSavedViews = _174[1];
573
+ var _175 = (0, react_1.useState)(null), activeSavedViewId = _175[0], setActiveSavedViewId = _175[1];
574
574
  // INFO: the widths of the view on screen, by column id ("180px")
575
- var _179 = (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 = _179[0], setColumnWidths = _179[1];
575
+ var _176 = (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 = _176[0], setColumnWidths = _176[1];
576
576
  // INFO: the columns the view on screen freezes at the left edge
577
- var _180 = (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 = _180[0], setPinnedColumnIds = _180[1];
577
+ var _177 = (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 = _177[0], setPinnedColumnIds = _177[1];
578
578
  // INFO: unsaved changes are kept only once the opening view is on screen,
579
579
  // so the defaults drawn before it never overwrite a person's own
580
- var _181 = (0, react_1.useState)(false), isViewDraftReady = _181[0], setIsViewDraftReady = _181[1];
580
+ var _178 = (0, react_1.useState)(false), isViewDraftReady = _178[0], setIsViewDraftReady = _178[1];
581
581
  // INFO: null while the name box is closed
582
- var _182 = (0, react_1.useState)(null), savedViewName = _182[0], setSavedViewName = _182[1];
583
- var _183 = (0, react_1.useState)(null), deletingSavedViewId = _183[0], setDeletingSavedViewId = _183[1];
584
- var _184 = (0, react_1.useState)(null), renamingSavedView = _184[0], setRenamingSavedView = _184[1];
585
- var _185 = (0, react_1.useState)(false), isSavedViewsExpanded = _185[0], setIsSavedViewsExpanded = _185[1];
586
- var _186 = (0, react_1.useState)(null), draggingColumnId = _186[0], setDraggingColumnId = _186[1];
582
+ var _179 = (0, react_1.useState)(null), savedViewName = _179[0], setSavedViewName = _179[1];
583
+ var _180 = (0, react_1.useState)(null), deletingSavedViewId = _180[0], setDeletingSavedViewId = _180[1];
584
+ var _181 = (0, react_1.useState)(null), renamingSavedView = _181[0], setRenamingSavedView = _181[1];
585
+ var _182 = (0, react_1.useState)(false), isSavedViewsExpanded = _182[0], setIsSavedViewsExpanded = _182[1];
586
+ var _183 = (0, react_1.useState)(null), draggingColumnId = _183[0], setDraggingColumnId = _183[1];
587
587
  var columnRowRefs = (0, react_1.useRef)({});
588
588
  //INFO : Used by Auth
589
- var _187 = (0, react_1.useState)({
589
+ var _184 = (0, react_1.useState)({
590
590
  email: "",
591
591
  google: "",
592
592
  phone: "",
593
593
  disabled: false,
594
594
  create: false,
595
- }), authMethods = _187[0], setAuthMethods = _187[1];
596
- var _188 = (0, react_1.useState)(""), selectedAuthMethod = _188[0], setSelectedAuthMethod = _188[1];
595
+ }), authMethods = _184[0], setAuthMethods = _184[1];
596
+ var _185 = (0, react_1.useState)(""), selectedAuthMethod = _185[0], setSelectedAuthMethod = _185[1];
597
597
  // INFO: the sign-in check of a users datasheet's record is running; the
598
598
  // panel shows a spinner rather than nothing, which read as "no login"
599
- var _189 = (0, react_1.useState)(false), authLoading = _189[0], setAuthLoading = _189[1];
599
+ var _186 = (0, react_1.useState)(false), authLoading = _186[0], setAuthLoading = _186[1];
600
600
  // INFO: a delete is running — the ref answers a second tap at once, before
601
601
  // the state has rendered, and the state disables the confirm button
602
602
  var deletingRef = (0, react_1.useRef)(false);
603
- var _190 = (0, react_1.useState)(false), deleting = _190[0], setDeleting = _190[1];
603
+ var _187 = (0, react_1.useState)(false), deleting = _187[0], setDeleting = _187[1];
604
604
  // INFO: Used by Activity Log
605
- var _191 = (0, react_1.useState)(false), activityModal = _191[0], setActivityModal = _191[1];
606
- var _192 = (0, react_1.useState)(""), activityId = _192[0], setActivityId = _192[1];
605
+ var _188 = (0, react_1.useState)(false), activityModal = _188[0], setActivityModal = _188[1];
606
+ var _189 = (0, react_1.useState)(""), activityId = _189[0], setActivityId = _189[1];
607
607
  //INFO : Used by Export
608
- var _193 = (0, react_1.useState)(null), csvFile = _193[0], setCSVFile = _193[1];
609
- var _194 = (0, react_1.useState)([]), csvFileData = _194[0], setCSVFileData = _194[1];
610
- var _195 = (0, react_1.useState)(0), stepCSVIndex = _195[0], setStepCSVIndex = _195[1];
611
- var _196 = (0, react_1.useState)({}), listCSVMapAttribute = _196[0], setListCSVMapAttribute = _196[1];
612
- var _197 = (0, react_1.useState)({}), listCSVObjAttribute = _197[0], setListCSVObjAttribute = _197[1];
613
- var _198 = (0, react_1.useState)([]), csvAPIAttribute = _198[0], setCSVAPIAttribute = _198[1];
614
- var _199 = (0, react_1.useState)(((_4 = props.devSettings.currentUser) === null || _4 === void 0 ? void 0 : _4.userEmail) || ""), exportCSVEmail = _199[0], setExportCSVEmail = _199[1];
615
- var _200 = (0, react_1.useState)(((_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.defaultExportPDFName) || ""), exportPDFTitle = _200[0], setExportPDFTitle = _200[1];
616
- var _201 = (0, react_1.useState)(false), exportPDFLoading = _201[0], setExportPDFLoading = _201[1];
617
- var _202 = (0, react_1.useState)(false), exportReadPDFLoading = _202[0], setExportReadPDFLoading = _202[1];
618
- var _203 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.sumColumnId) !== null && _9 !== void 0 ? _9 : []), exportSumAttributeIds = _203[0], setExportSumAttributeIds = _203[1];
619
- var _204 = (0, react_1.useState)((_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.exportSettings) === null || _11 === void 0 ? void 0 : _11.hideSubItems) !== null && _12 !== void 0 ? _12 : false), hideSubItems = _204[0], setHideSubItems = _204[1];
620
- var _205 = (0, react_1.useState)([]), importTableData = _205[0], setImportTableData = _205[1];
621
- var _206 = (0, react_1.useState)([]), queryList = _206[0], setQueryList = _206[1];
622
- var _207 = (0, react_1.useState)(undefined), allQueryList = _207[0], setAllQueryList = _207[1];
608
+ var _190 = (0, react_1.useState)(null), csvFile = _190[0], setCSVFile = _190[1];
609
+ var _191 = (0, react_1.useState)([]), csvFileData = _191[0], setCSVFileData = _191[1];
610
+ var _192 = (0, react_1.useState)(0), stepCSVIndex = _192[0], setStepCSVIndex = _192[1];
611
+ var _193 = (0, react_1.useState)({}), listCSVMapAttribute = _193[0], setListCSVMapAttribute = _193[1];
612
+ var _194 = (0, react_1.useState)({}), listCSVObjAttribute = _194[0], setListCSVObjAttribute = _194[1];
613
+ var _195 = (0, react_1.useState)([]), csvAPIAttribute = _195[0], setCSVAPIAttribute = _195[1];
614
+ var _196 = (0, react_1.useState)(((_4 = props.devSettings.currentUser) === null || _4 === void 0 ? void 0 : _4.userEmail) || ""), exportCSVEmail = _196[0], setExportCSVEmail = _196[1];
615
+ var _197 = (0, react_1.useState)(((_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.defaultExportPDFName) || ""), exportPDFTitle = _197[0], setExportPDFTitle = _197[1];
616
+ var _198 = (0, react_1.useState)(false), exportPDFLoading = _198[0], setExportPDFLoading = _198[1];
617
+ var _199 = (0, react_1.useState)(false), exportReadPDFLoading = _199[0], setExportReadPDFLoading = _199[1];
618
+ var _200 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.sumColumnId) !== null && _9 !== void 0 ? _9 : []), exportSumAttributeIds = _200[0], setExportSumAttributeIds = _200[1];
619
+ var _201 = (0, react_1.useState)((_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.exportSettings) === null || _11 === void 0 ? void 0 : _11.hideSubItems) !== null && _12 !== void 0 ? _12 : false), hideSubItems = _201[0], setHideSubItems = _201[1];
620
+ var _202 = (0, react_1.useState)([]), importTableData = _202[0], setImportTableData = _202[1];
621
+ var _203 = (0, react_1.useState)([]), queryList = _203[0], setQueryList = _203[1];
622
+ var _204 = (0, react_1.useState)(undefined), allQueryList = _204[0], setAllQueryList = _204[1];
623
623
  // INFO: a restored state wins over the prop; its "" is a list the user
624
624
  // ungrouped, so it opens ungrouped
625
- var _208 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
625
+ var _205 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
626
626
  ? persistedState.groupBy || undefined
627
- : (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId = _208[0], setGroupId = _208[1];
627
+ : (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId = _205[0], setGroupId = _205[1];
628
628
  // INFO: each group's total per number column, keyed by section id
629
- var _209 = (0, react_1.useState)({}), groupSummaries = _209[0], setGroupSummaries = _209[1];
629
+ var _206 = (0, react_1.useState)({}), groupSummaries = _206[0], setGroupSummaries = _206[1];
630
630
  // INFO: each group's row count over every row the filters match; null until
631
631
  // read. A band paged alone shows it until its own first page lands, and a
632
632
  // band it counts empty is left out instead of waiting to be read
633
- var _210 = (0, react_1.useState)(null), groupTotals = _210[0], setGroupTotals = _210[1];
633
+ var _207 = (0, react_1.useState)(null), groupTotals = _207[0], setGroupTotals = _207[1];
634
634
  var groupSummaryRequestRef = (0, react_1.useRef)(0);
635
- var _211 = (0, react_1.useState)({}), commentCounts = _211[0], setCommentCounts = _211[1];
635
+ var _208 = (0, react_1.useState)({}), commentCounts = _208[0], setCommentCounts = _208[1];
636
636
  // INFO: Monday-board per-group paging. Keyed by the group key that
637
637
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
638
638
  // Each group tracks its own loaded cursor + total so it can lazily load its
639
639
  // next page as the user scrolls inside that band, independent of every other
640
640
  // group. Only used when renderCheckGroupPaging() is true.
641
- var _212 = (0, react_1.useState)({}), groupPageState = _212[0], setGroupPageState = _212[1];
641
+ var _209 = (0, react_1.useState)({}), groupPageState = _209[0], setGroupPageState = _209[1];
642
642
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
643
643
  // in one tick do not re-fetch an already in-flight page.
644
644
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -653,62 +653,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
653
653
  var groupLoadingKeyRef = (0, react_1.useRef)(null);
654
654
  var groupLoadQueueRef = (0, react_1.useRef)([]);
655
655
  var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
656
- var _213 = (0, react_1.useState)(""), readTabSection = _213[0], setReadTabSection = _213[1];
657
- var _214 = (0, react_1.useState)(false), readFloatingNav = _214[0], setReadFloatingNav = _214[1];
656
+ var _210 = (0, react_1.useState)(""), readTabSection = _210[0], setReadTabSection = _210[1];
657
+ var _211 = (0, react_1.useState)(false), readFloatingNav = _211[0], setReadFloatingNav = _211[1];
658
658
  var readTabSectionRefs = (0, react_1.useRef)({});
659
659
  //INFO : Used by Read
660
660
  //INFO : Used by Update
661
- var _215 = (0, react_1.useState)(false), modalVisible = _215[0], setModalVisible = _215[1];
662
- var _216 = (0, react_1.useState)(false), deleteModal = _216[0], setDeleteModal = _216[1];
663
- var _217 = (0, react_1.useState)(false), excelModal = _217[0], setExcelModal = _217[1];
664
- var _218 = (0, react_1.useState)(false), exportExcel = _218[0], setExportExcel = _218[1];
665
- var _219 = (0, react_1.useState)(""), exportType = _219[0], setExportType = _219[1];
666
- var _220 = (0, react_1.useState)(false), exportQR = _220[0], setExportQR = _220[1];
667
- var _221 = (0, react_1.useState)(function () {
661
+ var _212 = (0, react_1.useState)(false), modalVisible = _212[0], setModalVisible = _212[1];
662
+ var _213 = (0, react_1.useState)(false), deleteModal = _213[0], setDeleteModal = _213[1];
663
+ var _214 = (0, react_1.useState)(false), excelModal = _214[0], setExcelModal = _214[1];
664
+ var _215 = (0, react_1.useState)(false), exportExcel = _215[0], setExportExcel = _215[1];
665
+ var _216 = (0, react_1.useState)(""), exportType = _216[0], setExportType = _216[1];
666
+ var _217 = (0, react_1.useState)(false), exportQR = _217[0], setExportQR = _217[1];
667
+ var _218 = (0, react_1.useState)(function () {
668
668
  var _a, _b;
669
669
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
670
670
  return firstTabId;
671
- }), activeTab = _221[0], setActiveTab = _221[1];
672
- var _222 = (0, react_1.useState)(false), signatureSigning = _222[0], setSignatureSigning = _222[1];
673
- var _223 = (0, react_1.useState)({}), selectedData = _223[0], setSelectedData = _223[1];
674
- var _224 = (0, react_1.useState)(""), selectedObjectStructureId = _224[0], setSelectedObjectStructureId = _224[1];
675
- var _225 = (0, react_1.useState)(""), selectedObjectId = _225[0], setSelectedObjectId = _225[1];
676
- var _226 = (0, react_1.useState)(""), selectedListAddressId = _226[0], setSelectedListAddressId = _226[1];
677
- var _227 = (0, react_1.useState)(-1), selectedListAddressIndex = _227[0], setSelectedListAddressIndex = _227[1];
678
- var _228 = (0, react_1.useState)({
671
+ }), activeTab = _218[0], setActiveTab = _218[1];
672
+ var _219 = (0, react_1.useState)(false), signatureSigning = _219[0], setSignatureSigning = _219[1];
673
+ var _220 = (0, react_1.useState)({}), selectedData = _220[0], setSelectedData = _220[1];
674
+ var _221 = (0, react_1.useState)(""), selectedObjectStructureId = _221[0], setSelectedObjectStructureId = _221[1];
675
+ var _222 = (0, react_1.useState)(""), selectedObjectId = _222[0], setSelectedObjectId = _222[1];
676
+ var _223 = (0, react_1.useState)(""), selectedListAddressId = _223[0], setSelectedListAddressId = _223[1];
677
+ var _224 = (0, react_1.useState)(-1), selectedListAddressIndex = _224[0], setSelectedListAddressIndex = _224[1];
678
+ var _225 = (0, react_1.useState)({
679
679
  lat: 0,
680
680
  lng: 0,
681
681
  name: "",
682
- }), selectedListAddress = _228[0], setSelectedListAddress = _228[1];
683
- var _229 = (0, react_1.useState)({}), selectedObjectData = _229[0], setSelectedObjectData = _229[1];
684
- var _230 = (0, react_1.useState)(null), objectCellEdit = _230[0], setObjectCellEdit = _230[1];
685
- var _231 = (0, react_1.useState)(false), referenceLoading = _231[0], setReferenceLoading = _231[1];
686
- var _232 = (0, react_1.useState)({}), referencesOptions = _232[0], setReferencesOptions = _232[1];
687
- var _233 = (0, react_1.useState)({}), referencesDetails = _233[0], setReferencesDetails = _233[1];
688
- var _234 = (0, react_1.useState)({}), listReferencesOptions = _234[0], setListReferencesOptions = _234[1];
682
+ }), selectedListAddress = _225[0], setSelectedListAddress = _225[1];
683
+ var _226 = (0, react_1.useState)({}), selectedObjectData = _226[0], setSelectedObjectData = _226[1];
684
+ var _227 = (0, react_1.useState)(null), objectCellEdit = _227[0], setObjectCellEdit = _227[1];
685
+ var _228 = (0, react_1.useState)(false), referenceLoading = _228[0], setReferenceLoading = _228[1];
686
+ var _229 = (0, react_1.useState)({}), referencesOptions = _229[0], setReferencesOptions = _229[1];
687
+ var _230 = (0, react_1.useState)({}), referencesDetails = _230[0], setReferencesDetails = _230[1];
688
+ var _231 = (0, react_1.useState)({}), listReferencesOptions = _231[0], setListReferencesOptions = _231[1];
689
689
  // INFO: the referenced records themselves, for a table cell that picks from
690
690
  // a list on one (referenceSelection)
691
- var _235 = (0, react_1.useState)({}), listReferencesDetails = _235[0], setListReferencesDetails = _235[1];
692
- var _236 = (0, react_1.useState)({}), referenceDeleteTableData = _236[0], setReferenceDeleteTableData = _236[1];
693
- var _237 = (0, react_1.useState)([]), relatedSections = _237[0], setRelatedSections = _237[1];
694
- var _238 = (0, react_1.useState)(0), referenceDeleteIndex = _238[0], setReferenceDeleteIndex = _238[1];
695
- var _239 = (0, react_1.useState)({
691
+ var _232 = (0, react_1.useState)({}), listReferencesDetails = _232[0], setListReferencesDetails = _232[1];
692
+ var _233 = (0, react_1.useState)({}), referenceDeleteTableData = _233[0], setReferenceDeleteTableData = _233[1];
693
+ var _234 = (0, react_1.useState)([]), relatedSections = _234[0], setRelatedSections = _234[1];
694
+ var _235 = (0, react_1.useState)(0), referenceDeleteIndex = _235[0], setReferenceDeleteIndex = _235[1];
695
+ var _236 = (0, react_1.useState)({
696
696
  id: "",
697
697
  name: "",
698
698
  type: "string",
699
- }), referenceCreationModal = _239[0], setReferenceCreationModal = _239[1];
700
- var _240 = (0, react_1.useState)({}), referenceModelSchema = _240[0], setReferenceSchema = _240[1];
701
- var _241 = (0, react_1.useState)([]), kanbanChecked = _241[0], setKanbanChecked = _241[1];
699
+ }), referenceCreationModal = _236[0], setReferenceCreationModal = _236[1];
700
+ var _237 = (0, react_1.useState)({}), referenceModelSchema = _237[0], setReferenceSchema = _237[1];
701
+ var _238 = (0, react_1.useState)([]), kanbanChecked = _238[0], setKanbanChecked = _238[1];
702
702
  //INFO : Offline
703
- var _242 = (0, react_1.useState)(0), offlineDataLength = _242[0], setOfflineDataLength = _242[1];
704
- var _243 = (0, react_1.useState)(false), offlineModal = _243[0], setOfflineModal = _243[1];
703
+ var _239 = (0, react_1.useState)(0), offlineDataLength = _239[0], setOfflineDataLength = _239[1];
704
+ var _240 = (0, react_1.useState)(false), offlineModal = _240[0], setOfflineModal = _240[1];
705
705
  // INFO: live-stream state — driven by socket connection and navigator.onLine
706
- var _244 = (0, react_1.useState)(false), isLive = _244[0], setIsLive = _244[1];
707
- var _245 = (0, react_1.useState)(false), isLiveOffline = _245[0], setIsLiveOffline = _245[1];
706
+ var _241 = (0, react_1.useState)(false), isLive = _241[0], setIsLive = _241[1];
707
+ var _242 = (0, react_1.useState)(false), isLiveOffline = _242[0], setIsLiveOffline = _242[1];
708
708
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
709
709
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
710
710
  // Independent of SSE status so it works even when bareSocketName is not set.
711
- var _246 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _246[0], setIsNetworkOffline = _246[1];
711
+ var _243 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _243[0], setIsNetworkOffline = _243[1];
712
712
  var previousType = (0, react_1.useRef)(null);
713
713
  var previousSelectedData = (0, react_1.useRef)(null);
714
714
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -890,7 +890,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
890
890
  return;
891
891
  var collectionId = props.collectionId;
892
892
  recordIds.forEach(function (eachId) { return commentCountedIdsRef.current.add(eachId); });
893
- onFetchCommentCounts(recordIds)
893
+ onFetchCommentCounts(recordIds, collectionId)
894
894
  .then(function (counts) {
895
895
  if (collectionId !== commentCollectionRef.current)
896
896
  return;
@@ -1036,7 +1036,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1036
1036
  var isSchemaHideMode = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.onChangeHide) ? true : false;
1037
1037
  // INFO: rows per page is a view setting the user can change, so it starts from
1038
1038
  // the persisted value and falls back to the consumer's limit
1039
- var _247 = (0, react_1.useState)((_27 = (_26 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _26 !== void 0 ? _26 : props.limit) !== null && _27 !== void 0 ? _27 : 10), pageLimit = _247[0], setPageLimit = _247[1];
1039
+ var _244 = (0, react_1.useState)((_27 = (_26 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _26 !== void 0 ? _26 : props.limit) !== null && _27 !== void 0 ? _27 : 10), pageLimit = _244[0], setPageLimit = _244[1];
1040
1040
  var limit = pageLimit;
1041
1041
  var isSavedViewsEnabled = !!((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.savedViews) && resolvedType === "list";
1042
1042
  // INFO: an app that stores views takes over from this browser's storage, so
@@ -1183,7 +1183,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1183
1183
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
1184
1184
  };
1185
1185
  };
1186
- var _248 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _248.canUpdateRecord, canInlineUpdate = _248.canInlineUpdate, canBatchUpdate = _248.canBatchUpdate, canDeleteRecord = _248.canDeleteRecord;
1186
+ var _245 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _245.canUpdateRecord, canInlineUpdate = _245.canInlineUpdate, canBatchUpdate = _245.canBatchUpdate, canDeleteRecord = _245.canDeleteRecord;
1187
1187
  var isEditor = ((_40 = props.edit) === null || _40 === void 0 ? void 0 : _40.allEditable) ? true : false;
1188
1188
  var isOffline = (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareOffline;
1189
1189
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
@@ -1219,12 +1219,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1219
1219
  ((_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.activityLog.commentCollectionId)) ||
1220
1220
  (((_59 = (_58 = props.edit) === null || _58 === void 0 ? void 0 : _58.activityLog) === null || _59 === void 0 ? void 0 : _59.enableLogs) &&
1221
1221
  ((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.activityLog.logsCollectionId));
1222
- var customPaginationSize = ((_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.customPaginationCount)
1222
+ // INFO: a record's comments and logs shown in place of the record rather than
1223
+ // in a drawer of their own — a related tab already sits inside the read
1224
+ // drawer, and a second drawer over it hid the row being discussed. It opens
1225
+ // the row through handleNavigate, so without one it stays off and the
1226
+ // drawer is used, rather than leaving a comment button that does nothing
1227
+ var isInlineActivity = !!isActivityLog &&
1228
+ !!((_61 = props.bareSettings) === null || _61 === void 0 ? void 0 : _61.bareInlineActivity) &&
1229
+ hasNavigation;
1230
+ // INFO: each row button opens what it shows: the comment button the row's
1231
+ // comments and logs alone, the eye (or the row) its details alone, so
1232
+ // neither has to be scrolled past to reach the other
1233
+ var _246 = (0, react_1.useState)(false), inlineActivityOnly = _246[0], setInlineActivityOnly = _246[1];
1234
+ var isActivityOnly = isInlineActivity && inlineActivityOnly;
1235
+ // INFO: the row whose comments were shown; going back to the list asks its
1236
+ // comment count again, as the drawer does when it closes
1237
+ var inlineActivityIdRef = (0, react_1.useRef)("");
1238
+ // INFO: the flag is cleared only on the way back from a row, not while the
1239
+ // list is still on screen — a host may open the row a render after the click
1240
+ var lastInlineTypeRef = (0, react_1.useRef)(resolvedType);
1241
+ (0, react_1.useEffect)(function () {
1242
+ var previousType = lastInlineTypeRef.current;
1243
+ lastInlineTypeRef.current = resolvedType;
1244
+ if (!isInlineActivity)
1245
+ return;
1246
+ if (resolvedType === "read" && props.id) {
1247
+ if (inlineActivityOnly)
1248
+ inlineActivityIdRef.current = props.id;
1249
+ return;
1250
+ }
1251
+ if (resolvedType !== "list" || previousType !== "read")
1252
+ return;
1253
+ setInlineActivityOnly(false);
1254
+ var shownId = inlineActivityIdRef.current;
1255
+ inlineActivityIdRef.current = "";
1256
+ if (shownId)
1257
+ handleFetchCommentCounts([shownId]);
1258
+ /* eslint-disable */
1259
+ }, [resolvedType, props.id, isInlineActivity]);
1260
+ /* eslint-enable */
1261
+ var renderActivityPanel = function (dataId) {
1262
+ var _a, _b, _c, _d;
1263
+ return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
1264
+ ? props.title
1265
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: dataId, activityLog: (_a = props.edit) === null || _a === void 0 ? void 0 : _a.activityLog,
1266
+ // INFO: names the record in the panel's heading; without it the lookup
1267
+ // reads a "title" field most datasheets lack and the heading shows the
1268
+ // record's id. A title or name column comes first, then the first text
1269
+ // column
1270
+ 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 }));
1271
+ };
1272
+ var customPaginationSize = ((_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.customPaginationCount)
1223
1273
  ? props.organise.customPaginationCount(size)
1224
1274
  : undefined;
1225
1275
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1226
1276
  var writeServerQuery = new writeQuery_1.WriteQuery({
1227
- dbModule: (_62 = props.lib) === null || _62 === void 0 ? void 0 : _62.axios,
1277
+ dbModule: (_63 = props.lib) === null || _63 === void 0 ? void 0 : _63.axios,
1228
1278
  dbType: devSettings.server,
1229
1279
  dbCollection: props.collectionId,
1230
1280
  dbEndpoint: devSettings.dbEndpoint,
@@ -1232,7 +1282,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1232
1282
  dbUserToken: devSettings.dbUserToken,
1233
1283
  });
1234
1284
  var readServerQuery = new readQuery_1.ReadQuery({
1235
- dbModule: (_63 = props.lib) === null || _63 === void 0 ? void 0 : _63.axios,
1285
+ dbModule: (_64 = props.lib) === null || _64 === void 0 ? void 0 : _64.axios,
1236
1286
  dbType: devSettings.server,
1237
1287
  dbCollection: props.collectionId,
1238
1288
  dbEndpoint: devSettings.dbEndpoint,
@@ -1240,12 +1290,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1240
1290
  dbUserToken: devSettings.dbUserToken,
1241
1291
  });
1242
1292
  var moreButtonPopUp = [
1243
- ((_64 = props.edit) === null || _64 === void 0 ? void 0 : _64.allEditable) &&
1293
+ ((_65 = props.edit) === null || _65 === void 0 ? void 0 : _65.allEditable) &&
1244
1294
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1245
1295
  // datasheet served through one can import; only the browser-direct
1246
1296
  // Firebase client has no server to import through
1247
1297
  !isFirebaseClient &&
1248
- !((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideImportCSV)
1298
+ !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideImportCSV)
1249
1299
  ? {
1250
1300
  text: "Import Excel",
1251
1301
  onClick: function () {
@@ -1254,7 +1304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1254
1304
  },
1255
1305
  }
1256
1306
  : null,
1257
- !((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportCSV)
1307
+ !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportCSV)
1258
1308
  ? {
1259
1309
  text: "Export CSV",
1260
1310
  onClick: function () {
@@ -1264,7 +1314,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1264
1314
  },
1265
1315
  }
1266
1316
  : null,
1267
- !((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportExcel)
1317
+ !((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportExcel)
1268
1318
  ? {
1269
1319
  text: "Export Excel",
1270
1320
  onClick: function () {
@@ -1274,7 +1324,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1274
1324
  },
1275
1325
  }
1276
1326
  : null,
1277
- !((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportPDF)
1327
+ !((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportPDF)
1278
1328
  ? {
1279
1329
  text: "Export PDF",
1280
1330
  onClick: function () {
@@ -1284,7 +1334,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1284
1334
  },
1285
1335
  }
1286
1336
  : null,
1287
- !((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportQR)
1337
+ !((_75 = (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.exportSettings) === null || _75 === void 0 ? void 0 : _75.hideExportQR)
1288
1338
  ? {
1289
1339
  text: "Export QR",
1290
1340
  onClick: function () {
@@ -1294,7 +1344,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1294
1344
  },
1295
1345
  }
1296
1346
  : null,
1297
- !((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideExportQR)
1347
+ !((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportQR)
1298
1348
  ? {
1299
1349
  text: "Export QR(Data)",
1300
1350
  onClick: function () {
@@ -1304,7 +1354,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1304
1354
  },
1305
1355
  }
1306
1356
  : null,
1307
- !((_78 = (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.exportSettings) === null || _78 === void 0 ? void 0 : _78.hideExportPrint)
1357
+ !((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.exportSettings) === null || _79 === void 0 ? void 0 : _79.hideExportPrint)
1308
1358
  ? {
1309
1359
  text: "Print",
1310
1360
  onClick: function () {
@@ -1316,8 +1366,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1316
1366
  : null,
1317
1367
  // INFO: drafts only exist where the form can save one, so the filter has
1318
1368
  // nothing to find on any other page
1319
- ((_79 = props.edit) === null || _79 === void 0 ? void 0 : _79.enableUpdateDraft) &&
1320
- !((_81 = (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.exportSettings) === null || _81 === void 0 ? void 0 : _81.hideExportDraft)
1369
+ ((_80 = props.edit) === null || _80 === void 0 ? void 0 : _80.enableUpdateDraft) &&
1370
+ !((_82 = (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.exportSettings) === null || _82 === void 0 ? void 0 : _82.hideExportDraft)
1321
1371
  ? {
1322
1372
  text: filterDraft ? "Show All Items" : "Filter Draft",
1323
1373
  onClick: function () {
@@ -1326,7 +1376,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1326
1376
  }
1327
1377
  : null,
1328
1378
  ].filter(Boolean);
1329
- if ((_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.moreSettings)
1379
+ if ((_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.moreSettings)
1330
1380
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1331
1381
  //=====================================================================================
1332
1382
  //SECTION: User Column Visibility Handlers
@@ -1771,14 +1821,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1771
1821
  //=====================================================================================
1772
1822
  //SECTION: Saved Views
1773
1823
  //=====================================================================================
1774
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.persistKey, (_84 = devSettings.currentUser) === null || _84 === void 0 ? void 0 : _84.userEmail);
1824
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.persistKey, (_85 = devSettings.currentUser) === null || _85 === void 0 ? void 0 : _85.userEmail);
1775
1825
  (0, react_1.useEffect)(function () {
1776
1826
  if (isSavedViewsEnabled && !isAppViews)
1777
1827
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1778
1828
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1779
1829
  // INFO: the app keeps All's settings, so every change is kept in this
1780
1830
  // browser until the person updates the view for everyone or resets it
1781
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.allView) !== undefined;
1831
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.allView) !== undefined;
1782
1832
  var handleGetViewDraftKey = function (viewId) {
1783
1833
  var _a, _b;
1784
1834
  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);
@@ -1862,7 +1912,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1862
1912
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1863
1913
  (0, react_1.useEffect)(function () {
1864
1914
  lastSentSharedViewsRef.current = null;
1865
- }, [(_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.sharedViews]);
1915
+ }, [(_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.sharedViews]);
1866
1916
  var handleStoreSharedViews = function (update) {
1867
1917
  var _a, _b, _c;
1868
1918
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1907,13 +1957,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1907
1957
  /* eslint-disable */
1908
1958
  }, [
1909
1959
  isSavedViewsEnabled,
1910
- (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.initialSavedViewId,
1911
- (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.defaultSavedViewId,
1912
- (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.sharedViews,
1960
+ (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.initialSavedViewId,
1961
+ (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.defaultSavedViewId,
1962
+ (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.sharedViews,
1913
1963
  savedViews,
1914
1964
  ]);
1915
1965
  /* eslint-enable */
1916
- var defaultSavedViewIds = ((_91 = (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.defaultSavedViews) !== null && _91 !== void 0 ? _91 : [])
1966
+ var defaultSavedViewIds = ((_92 = (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.defaultSavedViews) !== null && _92 !== void 0 ? _92 : [])
1917
1967
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1918
1968
  .join("|");
1919
1969
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -2243,8 +2293,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2243
2293
  groupId,
2244
2294
  columnWidths,
2245
2295
  pinnedColumnIds,
2246
- (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.allView,
2247
- (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.sharedViews,
2296
+ (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.allView,
2297
+ (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.sharedViews,
2248
2298
  savedViews,
2249
2299
  ]);
2250
2300
  /* eslint-enable */
@@ -2284,7 +2334,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2284
2334
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2285
2335
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2286
2336
  /* eslint-disable */
2287
- }, [props.collectionId, (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.persistKey]);
2337
+ }, [props.collectionId, (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.persistKey]);
2288
2338
  /* eslint-enable */
2289
2339
  // INFO: wait a frame — rows land in state one tick before layout
2290
2340
  (0, react_1.useEffect)(function () {
@@ -2319,7 +2369,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2319
2369
  (0, react_1.useEffect)(function () {
2320
2370
  handleOfflinePrefetch();
2321
2371
  /* eslint-disable */
2322
- }, [props.collectionId, (_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.bareOffline]);
2372
+ }, [props.collectionId, (_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.bareOffline]);
2323
2373
  /* eslint-enable */
2324
2374
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2325
2375
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2339,7 +2389,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2339
2389
  }, interval);
2340
2390
  return function () { return clearInterval(timer); };
2341
2391
  /* eslint-disable */
2342
- }, [(_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.barePollingInterval, isLive, isNetworkOffline]);
2392
+ }, [(_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.barePollingInterval, isLive, isNetworkOffline]);
2343
2393
  /* eslint-enable */
2344
2394
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2345
2395
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2381,7 +2431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2381
2431
  };
2382
2432
  /* eslint-disable */
2383
2433
  }, [
2384
- (_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.bareSocketName,
2434
+ (_98 = props.bareSettings) === null || _98 === void 0 ? void 0 : _98.bareSocketName,
2385
2435
  props.collectionId,
2386
2436
  props.devSettings.sseEndpoint,
2387
2437
  props.devSettings.dbAPIToken,
@@ -2655,10 +2705,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2655
2705
  props.collectionId,
2656
2706
  props.model,
2657
2707
  props.localURLEndpoint,
2658
- (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.extendedTabs,
2708
+ (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.extendedTabs,
2659
2709
  listViewId,
2660
- (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.additionalQuery,
2661
- (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.groupBy,
2710
+ (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.additionalQuery,
2711
+ (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.groupBy,
2662
2712
  resolvedType,
2663
2713
  ]);
2664
2714
  /**
@@ -2810,7 +2860,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2810
2860
  };
2811
2861
  }, 100);
2812
2862
  return function () { return clearTimeout(timeoutId); };
2813
- }, [(_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.showReadFloatingNav, resolvedType, props.id, loading]);
2863
+ }, [(_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.showReadFloatingNav, resolvedType, props.id, loading]);
2814
2864
  (0, react_1.useEffect)(function () {
2815
2865
  if (resolvedType !== "read")
2816
2866
  return;
@@ -5961,7 +6011,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5961
6011
  var columnTypeActions = {
5962
6012
  canUpdate: canUpdateRecord,
5963
6013
  dateWarnings: isDateWarnings,
5964
- onButtonClick: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.onButtonClick,
6014
+ onButtonClick: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.onButtonClick,
5965
6015
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5966
6016
  var _a;
5967
6017
  return __generator(this, function (_b) {
@@ -5978,7 +6028,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5978
6028
  }
5979
6029
  });
5980
6030
  }); },
5981
- onTimeTrackingAction: ((_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.onTimeTrackingAction) && canUpdateRecord
6031
+ onTimeTrackingAction: ((_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.onTimeTrackingAction) && canUpdateRecord
5982
6032
  ? function (rowId, columnId, action) {
5983
6033
  return handleTimeTrackingAction(rowId, columnId, action);
5984
6034
  }
@@ -8224,8 +8274,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8224
8274
  : rows;
8225
8275
  };
8226
8276
  /* eslint-disable */
8227
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_104 = props.bareSettings) === null || _104 === void 0 ? void 0 : _104.bareNewDTW]);
8228
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_105 = props.bareSettings) === null || _105 === void 0 ? void 0 : _105.bareNewDTW]);
8277
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_105 = props.bareSettings) === null || _105 === void 0 ? void 0 : _105.bareNewDTW]);
8278
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_106 = props.bareSettings) === null || _106 === void 0 ? void 0 : _106.bareNewDTW]);
8229
8279
  /* eslint-enable */
8230
8280
  // INFO: beside a record's title, the pencil opens its edit form for whoever
8231
8281
  // may update, and the bubble opens comments and logs for anyone who can see
@@ -8237,15 +8287,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8237
8287
  handleCaptureListScroll(id);
8238
8288
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", id, "general");
8239
8289
  };
8240
- var handleOpenRecordActivity = function (id) {
8241
- setActivityId(id);
8242
- setActivityModal(true);
8243
- };
8244
8290
  var handleOpenRecordRead = function (id) {
8245
8291
  var _a, _b;
8246
8292
  handleCaptureListScroll(id);
8247
8293
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8248
8294
  };
8295
+ // INFO: with the activity shown in place, a row's comment button opens that
8296
+ // row's comments and logs where the list was, rather than stacking a second
8297
+ // drawer
8298
+ var handleOpenRecordActivity = function (id) {
8299
+ if (isInlineActivity) {
8300
+ setInlineActivityOnly(true);
8301
+ handleOpenRecordRead(id);
8302
+ return;
8303
+ }
8304
+ setActivityId(id);
8305
+ setActivityModal(true);
8306
+ };
8249
8307
  var recordEditAction = canUpdateRecord ? handleOpenRecordEdit : undefined;
8250
8308
  // INFO: the chevron only navigates through handleNavigate, so a host that
8251
8309
  // routes by url gets none rather than a button that does nothing
@@ -8340,7 +8398,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8340
8398
  return !utils_1.NON_DETAIL_LIST_DATA_TYPES.includes(eachAttribute.type);
8341
8399
  })
8342
8400
  .map(function (eachAttribute) {
8343
- var _a, _b, _c, _d, _e, _f;
8401
+ var _a, _b, _c, _d, _e;
8344
8402
  var selectedDataKey = Object.keys(selectedData).find(function (eachKey) { return eachKey === eachAttribute.id; });
8345
8403
  if (selectedDataKey) {
8346
8404
  var showIdCondition = showId
@@ -8354,14 +8412,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8354
8412
  var bareReadDescFunc = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadDescription;
8355
8413
  if (bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_c = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _c !== void 0 ? _c : "", selectedData[selectedDataKey]))
8356
8414
  currentValue = bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_d = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _d !== void 0 ? _d : "", selectedData[selectedDataKey]);
8357
- if (eachAttribute.type === "listReference") {
8358
- currentValue = (_e = selectedData[selectedDataKey]) === null || _e === void 0 ? void 0 : _e.map(function (eachData) {
8415
+ // INFO: a failed lookup leaves the read module's anomaly notice
8416
+ // here instead of the list, which is shown as it is
8417
+ if (eachAttribute.type === "listReference" &&
8418
+ Array.isArray(selectedData[selectedDataKey])) {
8419
+ currentValue = selectedData[selectedDataKey].map(function (eachData) {
8359
8420
  var _a, _b;
8360
8421
  return ((_b = eachData === null || eachData === void 0 ? void 0 : eachData[(_a = eachAttribute.referenceLabel) !== null && _a !== void 0 ? _a : ""]) !== null && _b !== void 0 ? _b : (0, moduleUtils_1.renderReferenceStringAttribute)(eachData));
8361
8422
  });
8362
8423
  }
8363
8424
  detailList.push({
8364
- title: (_f = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.name) !== null && _f !== void 0 ? _f : "",
8425
+ title: (_e = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.name) !== null && _e !== void 0 ? _e : "",
8365
8426
  text: currentValue,
8366
8427
  });
8367
8428
  }
@@ -8748,10 +8809,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8748
8809
  var showUpdate = !bareActionComponent && canUpdateRecord;
8749
8810
  var showExport = !!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF);
8750
8811
  var showDelete = canDeleteRecord && props.id !== "new";
8812
+ // INFO: with the activity shown in place there is no Log button, so a
8813
+ // related row with nothing else to act on draws no bar at all
8814
+ var showLog = !!isActivityLog && !isInlineActivity;
8751
8815
  if (!hasCustomActions &&
8752
8816
  !showUpdate &&
8753
8817
  !showExport &&
8754
- !isActivityLog &&
8818
+ !showLog &&
8755
8819
  !showDelete)
8756
8820
  return null;
8757
8821
  return (react_1.default.createElement("div", { "data-testid": "dtw-read-bar", className: handleActionBarClassName(true) },
@@ -8765,7 +8829,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8765
8829
  setDeleteModal(true);
8766
8830
  } })))),
8767
8831
  showExport && (react_1.default.createElement(button_1.Button, { type: "light", text: "Export PDF", size: "small", onClick: handleExportReadPDF })),
8768
- isActivityLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
8832
+ showLog && (react_1.default.createElement(button_1.Button, { type: "light", text: "Log", size: "small", onClick: function () { return setActivityModal(true); } })),
8769
8833
  hasCustomActions && bareActionComponent,
8770
8834
  showUpdate &&
8771
8835
  (hasNavigation ? (react_1.default.createElement(button_1.Button, { id: "dtw-update", text: "Update", type: "normal", size: "small", onClick: function () {
@@ -8780,7 +8844,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8780
8844
  // under the form. Its header row keeps only Delete, a destructive action that
8781
8845
  // should not sit at the end of a "continue, continue" flow.
8782
8846
  var renderActionButtons = function (type, _hasTabAlign, _uniqueTabIds) {
8783
- var _a, _b, _c, _d, _e, _f;
8847
+ var _a, _b, _c, _d, _e, _f, _g;
8784
8848
  var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef, handleResolveRawData())) !== null && _c !== void 0 ? _c : undefined;
8785
8849
  // INFO: every update form carries Save / Submit in the floating bar, so
8786
8850
  // the header keeps only Delete
@@ -8814,8 +8878,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8814
8878
  }
8815
8879
  else if (type === "list") {
8816
8880
  var listActionBtns = [];
8817
- if (isActivityLog) {
8818
- listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () {
8881
+ if (isActivityLog && !((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareHideCollectionActivity)) {
8882
+ listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-collection-activity", icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () {
8819
8883
  setActivityId("");
8820
8884
  setActivityModal(true);
8821
8885
  }, background: "bg-primary-500 hover:bg-primary-600" }));
@@ -8823,7 +8887,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8823
8887
  if (bareActionComponent) {
8824
8888
  listActionBtns.push(bareActionComponent);
8825
8889
  }
8826
- else if (((_e = props.edit) === null || _e === void 0 ? void 0 : _e.allEditable) || ((_f = props.edit) === null || _f === void 0 ? void 0 : _f.createBtn)) {
8890
+ else if (((_f = props.edit) === null || _f === void 0 ? void 0 : _f.allEditable) || ((_g = props.edit) === null || _g === void 0 ? void 0 : _g.createBtn)) {
8827
8891
  listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
8828
8892
  hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-create", icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
8829
8893
  var _a, _b;
@@ -9037,7 +9101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9037
9101
  handleNavigateFromDrawer("list", "");
9038
9102
  } }))); } })); };
9039
9103
  var renderContent = function () {
9040
- 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;
9104
+ 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;
9041
9105
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
9042
9106
  var tabs = renderTabs();
9043
9107
  var pages = [
@@ -9084,16 +9148,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9084
9148
  renderBareReadComp(),
9085
9149
  ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateActionTop) &&
9086
9150
  !selectedRelated &&
9151
+ !isActivityOnly &&
9087
9152
  renderReadBar(),
9088
9153
  (anyAuthMethod ||
9089
9154
  (authLoading && ((_o = props.space) === null || _o === void 0 ? void 0 : _o.authDatabase))) && (react_1.default.createElement("div", { className: "bg-primary-100 text-gray-700 mt-3 px-5 py-3 rounded" }, authLoading ? (react_1.default.createElement("div", { className: "flex justify-center py-1", "data-testid": "dtw-auth-loading" },
9090
9155
  react_1.default.createElement(loading_1.Loading, { sizeClassName: "h-6 w-6" }))) : (renderAuthContent()))),
9091
- react_1.default.createElement("div", { ref: exportReadPDFRef },
9092
- selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (_p = props.id) !== null && _p !== void 0 ? _p : "", renderList: renderRelatedList })) : (!((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType)))),
9093
- ((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareReadComponentPos) !== "top" &&
9094
- renderBareReadComp()),
9095
- !((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareUpdateActionTop) &&
9156
+ isActivityOnly && !selectedRelated ? (react_1.default.createElement("div", { "data-testid": "dt-activity-inline", className: "mt-4" }, renderActivityPanel((_p = props.id) !== null && _p !== void 0 ? _p : ""))) : (react_1.default.createElement("div", { ref: exportReadPDFRef },
9157
+ selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (_q = props.id) !== null && _q !== void 0 ? _q : "", renderList: renderRelatedList })) : (!((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType)))),
9158
+ ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareReadComponentPos) !== "top" &&
9159
+ renderBareReadComp())),
9160
+ !((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareUpdateActionTop) &&
9096
9161
  !selectedRelated &&
9162
+ !isActivityOnly &&
9097
9163
  renderReadBar()))));
9098
9164
  case "update":
9099
9165
  if (props.id !== "new") {
@@ -9104,12 +9170,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9104
9170
  });
9105
9171
  }
9106
9172
  pages.push({
9107
- name: (_v = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_u = (_t = props.organise) === null || _t === void 0 ? void 0 : _t.breadcrumbAttributeId) !== null && _u !== void 0 ? _u : serverId]) !== null && _v !== void 0 ? _v : (props.id ? props.id : "new"),
9173
+ name: (_w = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.breadcrumbAttributeId) !== null && _v !== void 0 ? _v : serverId]) !== null && _w !== void 0 ? _w : (props.id ? props.id : "new"),
9108
9174
  href: "#",
9109
9175
  current: true,
9110
9176
  });
9111
9177
  var filterModel_1 = [];
9112
- var disabledOnEnter_1 = (_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.disabledOnEnter) !== null && _x !== void 0 ? _x : false;
9178
+ var disabledOnEnter_1 = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disabledOnEnter) !== null && _y !== void 0 ? _y : false;
9113
9179
  structure.map(function (eachModel) {
9114
9180
  var _a;
9115
9181
  var present = false;
@@ -9222,12 +9288,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9222
9288
  }
9223
9289
  }
9224
9290
  };
9225
- var hasTabAlign_1 = ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.tabAlign) || ((_z = props.space) === null || _z === void 0 ? void 0 : _z.tabAlign);
9226
- var leftTabAlign = ((_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.tabAlign) === "left" ||
9227
- ((_1 = props.space) === null || _1 === void 0 ? void 0 : _1.tabAlign) === "left";
9228
- var topTabAlign = ((_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.tabAlign) === "top" || ((_3 = props.space) === null || _3 === void 0 ? void 0 : _3.tabAlign) === "top";
9229
- var stepperTabAlign = ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.tabAlign) === "stepper" ||
9230
- ((_5 = props.space) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "stepper";
9291
+ var hasTabAlign_1 = ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.tabAlign) || ((_0 = props.space) === null || _0 === void 0 ? void 0 : _0.tabAlign);
9292
+ var leftTabAlign = ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.tabAlign) === "left" ||
9293
+ ((_2 = props.space) === null || _2 === void 0 ? void 0 : _2.tabAlign) === "left";
9294
+ var topTabAlign = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.tabAlign) === "top" || ((_4 = props.space) === null || _4 === void 0 ? void 0 : _4.tabAlign) === "top";
9295
+ var stepperTabAlign = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "stepper" ||
9296
+ ((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.tabAlign) === "stepper";
9231
9297
  var uniqueTabIds_2 = Array.from(new Set(filterModel_1
9232
9298
  .map(function (item) { return item.tabId; })
9233
9299
  .filter(function (id) { return id !== undefined; })));
@@ -9236,7 +9302,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9236
9302
  if (shouldIncludeOthers) {
9237
9303
  uniqueTabIds_2.push("");
9238
9304
  }
9239
- var customTabComponent_1 = (_8 = (_7 = (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareUpdateTabComponent) === null || _7 === void 0 ? void 0 : _7.call(_6, uniqueTabIds_2)) !== null && _8 !== void 0 ? _8 : [];
9305
+ var customTabComponent_1 = (_9 = (_8 = (_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareUpdateTabComponent) === null || _8 === void 0 ? void 0 : _8.call(_7, uniqueTabIds_2)) !== null && _9 !== void 0 ? _9 : [];
9240
9306
  var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
9241
9307
  var _a, _b;
9242
9308
  var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
@@ -9272,7 +9338,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9272
9338
  props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
9273
9339
  dbModule: dbModule,
9274
9340
  dbType: devSettings.server,
9275
- dbCollection: (_10 = (_9 = props === null || props === void 0 ? void 0 : props.space) === null || _9 === void 0 ? void 0 : _9.pipelineDefaultSpaceId) !== null && _10 !== void 0 ? _10 : props.collectionId,
9341
+ dbCollection: (_11 = (_10 = props === null || props === void 0 ? void 0 : props.space) === null || _10 === void 0 ? void 0 : _10.pipelineDefaultSpaceId) !== null && _11 !== void 0 ? _11 : props.collectionId,
9276
9342
  dbEndpoint: devSettings.dbEndpoint,
9277
9343
  dbAPIToken: devSettings.dbAPIToken,
9278
9344
  dbUserToken: devSettings.dbUserToken,
@@ -9280,11 +9346,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9280
9346
  type: "get",
9281
9347
  id: props.id,
9282
9348
  pipeline: pipeline,
9283
- }, offline: ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
9349
+ }, offline: ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
9284
9350
  renderBreadcrumb(pages),
9285
9351
  react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
9286
9352
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
9287
- props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.darkMode) ? "text-white" : "") }, props.title)),
9353
+ props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.darkMode) ? "text-white" : "") }, props.title)),
9288
9354
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
9289
9355
  (!isBottom || hasTabAlign_1 || resolvedType === "update") &&
9290
9356
  renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)),
@@ -9303,10 +9369,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9303
9369
  var tabId = uniqueTabIds_2[stepIndex];
9304
9370
  handleUpdateTabId(tabId);
9305
9371
  } })),
9306
- ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponentAbove) &&
9307
- ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent) &&
9308
- ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent(selectedData, handleResolveRawData())),
9309
- ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateActionTop) &&
9372
+ ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponentAbove) &&
9373
+ ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent) &&
9374
+ ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponent(selectedData, handleResolveRawData())),
9375
+ ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateActionTop) &&
9310
9376
  renderStepBar(uniqueTabIds_2),
9311
9377
  react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
9312
9378
  uniqueTabIds_2.map(function (tabId) {
@@ -9328,8 +9394,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9328
9394
  ((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.tabDescriptions) === null || _c === void 0 ? void 0 : _c[tabId]) && (react_1.default.createElement("p", { className: "text-sm mt-0.5 ".concat(((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "text-gray-400" : "text-gray-500") }, props.organise.tabDescriptions[tabId])))),
9329
9395
  renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
9330
9396
  }),
9331
- !((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponentAbove) &&
9332
- ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent) && (
9397
+ !((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
9398
+ ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) && (
9333
9399
  // INFO: the form is a grid-cols-12. A child with no column span is one
9334
9400
  // column, and a grid item cannot shrink below its longest word, so on a
9335
9401
  // phone it wraps one word per line. `contents` takes this wrapper out of
@@ -9339,20 +9405,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9339
9405
  react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
9340
9406
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
9341
9407
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
9342
- !((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateActionTop) &&
9408
+ !((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateActionTop) &&
9343
9409
  renderStepBar(uniqueTabIds_2),
9344
9410
  isBottom &&
9345
9411
  resolvedType !== "update" &&
9346
9412
  renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
9347
- ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponentAbove) &&
9348
- ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponent) &&
9349
- ((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateComponent(selectedData, handleResolveRawData())),
9350
- ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateActionTop) &&
9413
+ ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponentAbove) &&
9414
+ ((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateComponent) &&
9415
+ ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateComponent(selectedData, handleResolveRawData())),
9416
+ ((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateActionTop) &&
9351
9417
  renderStepBar(uniqueTabIds_2),
9352
9418
  react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
9353
9419
  renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
9354
- !((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateComponentAbove) &&
9355
- ((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponent) && (
9420
+ !((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponentAbove) &&
9421
+ ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateComponent) && (
9356
9422
  // INFO: the form is a grid-cols-12. A child with no column span is one
9357
9423
  // column, and a grid item cannot shrink below its longest word, so on a
9358
9424
  // phone it wraps one word per line. `contents` takes this wrapper out of
@@ -9362,7 +9428,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9362
9428
  react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
9363
9429
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
9364
9430
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
9365
- !((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateActionTop) &&
9431
+ !((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareUpdateActionTop) &&
9366
9432
  renderStepBar(uniqueTabIds_2)))));
9367
9433
  case "list":
9368
9434
  case "union":
@@ -9373,27 +9439,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9373
9439
  // Counts query output so the badge matches what's actually filtered.
9374
9440
  // INFO: one per filter row that filters — several rows on one related
9375
9441
  // datasheet send one condition, and a list count can send two
9376
- var activeFlexFilterCount_1 = ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
9442
+ var activeFlexFilterCount_1 = ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareFlexFilters)
9377
9443
  ? flexFilters.filter(function (eachFilter) {
9378
9444
  return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
9379
9445
  }).length
9380
9446
  : 0;
9381
9447
  // INFO: without the floating bar these buttons would have nowhere to
9382
9448
  // go, so a hidden search keeps the normal header
9383
- var isMobileToolbar_1 = !!((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareListMobileToolbar) &&
9384
- !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileFloatingSearch) &&
9385
- !((_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.hideSearch);
9449
+ var isMobileToolbar_1 = !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileToolbar) &&
9450
+ !!((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) &&
9451
+ !((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hideSearch);
9386
9452
  var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
9387
9453
  dbModule: dbModule,
9388
9454
  dbType: devSettings.server,
9389
- dbCollection: (_32 = (_31 = props === null || props === void 0 ? void 0 : props.space) === null || _31 === void 0 ? void 0 : _31.pipelineDefaultSpaceId) !== null && _32 !== void 0 ? _32 : props.collectionId,
9455
+ dbCollection: (_33 = (_32 = props === null || props === void 0 ? void 0 : props.space) === null || _32 === void 0 ? void 0 : _32.pipelineDefaultSpaceId) !== null && _33 !== void 0 ? _33 : props.collectionId,
9390
9456
  dbEndpoint: devSettings.dbEndpoint,
9391
9457
  dbAPIToken: devSettings.dbAPIToken,
9392
9458
  dbUserToken: devSettings.dbUserToken,
9393
- }, cond: handleReadQueryHocCond(), offline: ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
9459
+ }, cond: handleReadQueryHocCond(), offline: ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
9394
9460
  handleGetListData(data, "", "", cond);
9395
9461
  }, onError: handleGetItemError }));
9396
- if ((_34 = props.renderSettings) === null || _34 === void 0 ? void 0 : _34.renderListUI) {
9462
+ if ((_35 = props.renderSettings) === null || _35 === void 0 ? void 0 : _35.renderListUI) {
9397
9463
  return (react_1.default.createElement(react_1.default.Fragment, null,
9398
9464
  listReadQueryHOC,
9399
9465
  props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
@@ -9607,47 +9673,47 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9607
9673
  listReadQueryHOC,
9608
9674
  react_1.default.createElement("div", { className: "flex py-2 ".concat(isMobileToolbar_1
9609
9675
  ? "w-full flex-row items-center md:items-end"
9610
- : ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareCompactMode)
9676
+ : ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareCompactMode)
9611
9677
  ? // INFO: the grow spacer is hidden on phones (search lives in
9612
9678
  // the floating bar), so the row itself pushes the actions right
9613
9679
  "w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
9614
9680
  : "flex-col md:items-end md:flex-row") },
9615
9681
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex min-w-0 flex-col" },
9616
9682
  props.title && (react_1.default.createElement("div", { className: "flex min-w-0 items-center gap-2" },
9617
- react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode) ? "text-white" : "") }, props.title),
9618
- ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareSocketName) &&
9683
+ react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkMode) ? "text-white" : "") }, props.title),
9684
+ ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareSocketName) &&
9619
9685
  isLive &&
9620
9686
  !isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700" },
9621
9687
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
9622
9688
  "LIVE")),
9623
- ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
9689
+ ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareSocketName) && isLiveOffline && (react_1.default.createElement("span", { className: "inline-flex items-center gap-1 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-medium text-orange-700" },
9624
9690
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
9625
9691
  "OFFLINE")))),
9626
9692
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500 ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "") }, props.description)))),
9627
- react_1.default.createElement("div", { className: ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareCompactMode)
9693
+ react_1.default.createElement("div", { className: ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareCompactMode)
9628
9694
  ? "hidden sm:block grow"
9629
9695
  : "grow" }),
9630
9696
  react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end ".concat(isMobileToolbar_1 ? "shrink-0" : "") },
9631
9697
  renderListFilterElements(),
9632
9698
  renderListActionElements())),
9633
9699
  renderListNewRowFilterElements(),
9634
- (schemaPresent || ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode })),
9700
+ (schemaPresent || ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.darkMode })),
9635
9701
  renderScopedTabContent(tabs, resolvedType, viewType),
9636
- ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
9637
- ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListMobileFloatingSearch) &&
9702
+ ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
9703
+ ((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareListMobileFloatingSearch) &&
9638
9704
  (0, listModule_1.renderFloatingMobileSearch)({
9639
9705
  filterSearch: filterSearch,
9640
9706
  handleNameSearch: handleNameSearch,
9641
9707
  onFilterClick: function () { return setFlexFilterModalOpen(true); },
9642
- hideSearch: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.hideSearch,
9643
- darkMode: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode,
9644
- floatingOffset: (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareListFloatingActionOffset,
9645
- hideFilter: !((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareFlexFilters),
9646
- activeFilterCount: ((_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareFlexFilters)
9708
+ hideSearch: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.hideSearch,
9709
+ darkMode: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.darkMode,
9710
+ floatingOffset: (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListFloatingActionOffset,
9711
+ hideFilter: !((_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareFlexFilters),
9712
+ activeFilterCount: ((_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareFlexFilters)
9647
9713
  ? activeFlexFilterCount_1
9648
9714
  : undefined,
9649
9715
  // INFO: Hides when items are selected so NewTable's multi-action bar takes over.
9650
- hidden: selectAll || ((_49 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _49 !== void 0 ? _49 : 0) > 0,
9716
+ hidden: selectAll || ((_50 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _50 !== void 0 ? _50 : 0) > 0,
9651
9717
  onRefreshClick: isMobileToolbar_1 && schemaPresent
9652
9718
  ? function () { return handleRefresh(); }
9653
9719
  : undefined,
@@ -10216,20 +10282,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10216
10282
  // of its own, and a picked row opens in place instead of navigating away, so
10217
10283
  // this record's tabs stay put.
10218
10284
  var renderRelatedList = function (source, query, openId, onOpen) {
10219
- var _a, _b, _c, _d;
10220
- return (react_1.default.createElement(exports.DataTemplate, { title: "", description: "", type: openId ? "read" : "list", id: openId, collectionId: source.collectionId, model: source.schema, localURLEndpoint: props.localURLEndpoint, devSettings: __assign(__assign({}, props.devSettings), { schemaEndpoint: "" }), lib: props.lib, organise: {
10221
- darkMode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode,
10222
- darkModeBg: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkModeBg,
10285
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10286
+ return (react_1.default.createElement(exports.DataTemplate, { title: "", description: "", type: openId ? "read" : "list", id: openId, collectionId: source.collectionId, model: source.schema, localURLEndpoint: props.localURLEndpoint, devSettings: __assign(__assign({}, props.devSettings), { schemaEndpoint: "" }), lib: props.lib,
10287
+ // INFO: comments and logs only — the edit, delete and inline-edit
10288
+ // switches are this record's sheet's, not the related sheet's, so they
10289
+ // stay off and the related rows stay read-only
10290
+ edit: ((_a = props.edit) === null || _a === void 0 ? void 0 : _a.activityLog)
10291
+ ? { activityLog: props.edit.activityLog }
10292
+ : undefined, organise: {
10293
+ darkMode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode,
10294
+ darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg,
10223
10295
  breadcrumbType: "hidden",
10224
10296
  handleNavigate: function (type, selectedId) {
10225
10297
  return onOpen(type === "read" && selectedId ? selectedId : "");
10226
10298
  },
10299
+ // INFO: asked with the related collection's id, so a host counts the
10300
+ // comments on these rows rather than on its own sheet's
10301
+ onFetchCommentCounts: ((_d = props.edit) === null || _d === void 0 ? void 0 : _d.activityLog)
10302
+ ? (_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts
10303
+ : undefined,
10227
10304
  }, bareSettings: {
10228
10305
  bareListFilterQuery: query,
10229
- bareNewDTW: (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareNewDTW,
10306
+ bareNewDTW: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareNewDTW,
10230
10307
  // INFO: the related list sits inside this record, so it takes the
10231
10308
  // record's layout rather than the full one
10232
- bareCompactMode: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareCompactMode,
10309
+ bareCompactMode: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareCompactMode,
10310
+ // INFO: drawn like the table it was opened from, so the record's own
10311
+ // list and its related tabs read as one
10312
+ bareListGridLines: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridLines,
10313
+ bareHideCollectionActivity: true,
10314
+ // INFO: a row's comment button opens its comments and logs alone in
10315
+ // this tab, not in a second drawer over the read drawer
10316
+ bareInlineActivity: true,
10233
10317
  } }));
10234
10318
  };
10235
10319
  var renderAddMathColumn = function (id, onClose) {
@@ -12630,14 +12714,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12630
12714
  };
12631
12715
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
12632
12716
  renderNotification("root"),
12633
- ((_107 = (_106 = props.renderSettings) === null || _106 === void 0 ? void 0 : _106.renderLoadingUI) === null || _107 === void 0 ? void 0 : _107.call(_106)) && loading ? ((_108 = props.renderSettings) === null || _108 === void 0 ? void 0 : _108.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12717
+ ((_108 = (_107 = props.renderSettings) === null || _107 === void 0 ? void 0 : _107.renderLoadingUI) === null || _108 === void 0 ? void 0 : _108.call(_107)) && loading ? ((_109 = props.renderSettings) === null || _109 === void 0 ? void 0 : _109.renderLoadingUI()) : (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, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12634
12718
  var _a, _b;
12635
12719
  if (loading)
12636
12720
  return;
12637
12721
  handlePopUpModal(false);
12638
12722
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
12639
12723
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
12640
- react_1.default.createElement(modal_1.Modal, { darkMode: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkMode, darkModeBg: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12724
+ 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, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12641
12725
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
12642
12726
  if (dataId) {
12643
12727
  var currentValue = selectedData[referenceCreationModal.id];
@@ -12653,19 +12737,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12653
12737
  }, onClose: function () {
12654
12738
  setReferenceCreationModal({ id: "", name: "", type: "string" });
12655
12739
  } }),
12656
- react_1.default.createElement(modal_1.Modal, { darkMode: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkMode, darkModeBg: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12740
+ 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, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12657
12741
  setReferenceDeleteTableData({});
12658
12742
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12659
- react_1.default.createElement(modal_1.Modal, { darkMode: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkMode, darkModeBg: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12743
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkMode, darkModeBg: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12660
12744
  setDeletePasscodeInput("");
12661
12745
  setDeleteModal(!deleteModal);
12662
12746
  setDeleteFeedId("");
12663
12747
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12664
- react_1.default.createElement(modal_1.Modal, { darkMode: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkMode, darkModeBg: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12748
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkMode, darkModeBg: (_119 = props.organise) === null || _119 === void 0 ? void 0 : _119.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12665
12749
  setBatchUpdateData({ columnId: "", columnData: {} });
12666
12750
  setBatchUpdateModal(false);
12667
12751
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12668
- react_1.default.createElement(modal_1.Modal, { darkMode: (_119 = props.organise) === null || _119 === void 0 ? void 0 : _119.darkMode, darkModeBg: (_120 = props.organise) === null || _120 === void 0 ? void 0 : _120.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12752
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_120 = props.organise) === null || _120 === void 0 ? void 0 : _120.darkMode, darkModeBg: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12669
12753
  var _a, _b;
12670
12754
  if (props.space)
12671
12755
  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 }));
@@ -12677,22 +12761,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12677
12761
  renderReadDrawer(),
12678
12762
  canHostDrawer && renderDrawerDiscardModal(),
12679
12763
  isActivityLog &&
12764
+ !isInlineActivity &&
12680
12765
  typeof document !== "undefined" &&
12681
12766
  (0, react_dom_1.createPortal)(
12682
12767
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
12683
12768
  react_1.default.createElement("div", { className: "relative z-50" },
12684
- react_1.default.createElement(drawer_1.Drawer, { darkMode: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkMode, darkModeBg: (_122 = props.organise) === null || _122 === void 0 ? void 0 : _122.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12769
+ react_1.default.createElement(drawer_1.Drawer, { darkMode: (_122 = props.organise) === null || _122 === void 0 ? void 0 : _122.darkMode, darkModeBg: (_123 = props.organise) === null || _123 === void 0 ? void 0 : _123.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12685
12770
  // INFO: the record stays set while the drawer slides out — clearing it
12686
12771
  // would remount the hidden panel collection-wide and fetch again. The
12687
12772
  // toolbar's collection-wide button clears it when it opens.
12688
- 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"
12689
- ? props.title
12690
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_123 = props.id) !== null && _123 !== void 0 ? _123 : "") : activityId, activityLog: (_124 = props.edit) === null || _124 === void 0 ? void 0 : _124.activityLog,
12691
- // INFO: names the record in the drawer's heading; without it
12692
- // the lookup reads a "title" field most datasheets lack and
12693
- // the heading shows the record's id. A title or name column
12694
- // comes first, then the first text column
12695
- recordTitleColumn: (_127 = ((_126 = (_125 = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _125 !== void 0 ? _125 : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _126 !== void 0 ? _126 : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _127 === void 0 ? void 0 : _127.id, model: structure }) })), document.body),
12773
+ onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_124 = props.id) !== null && _124 !== void 0 ? _124 : "") : activityId) })), document.body),
12696
12774
  renderScrollSentinel()));
12697
12775
  });
12698
12776
  //# sourceMappingURL=index.js.map