blixify-ui-web 1.3.44 → 1.3.46

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.
Files changed (46) hide show
  1. package/lib/components/data/dataTemplate/activityModal.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/activityModal.js +6 -13
  3. package/lib/components/data/dataTemplate/activityModal.js.map +1 -1
  4. package/lib/components/data/dataTemplate/commentMarkdown.d.ts +14 -0
  5. package/lib/components/data/dataTemplate/commentMarkdown.d.ts.map +1 -0
  6. package/lib/components/data/dataTemplate/commentMarkdown.js +181 -0
  7. package/lib/components/data/dataTemplate/commentMarkdown.js.map +1 -0
  8. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  9. package/lib/components/data/dataTemplate/index.js +413 -366
  10. package/lib/components/data/dataTemplate/index.js.map +1 -1
  11. package/lib/components/data/dataTemplate/model.d.ts +1 -0
  12. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  13. package/lib/components/data/dataTemplate/readViewIds.d.ts +2 -0
  14. package/lib/components/data/dataTemplate/readViewIds.d.ts.map +1 -0
  15. package/lib/components/data/dataTemplate/readViewIds.js +8 -0
  16. package/lib/components/data/dataTemplate/readViewIds.js.map +1 -0
  17. package/lib/components/data/dataTemplate/relatedRecords.d.ts +3 -1
  18. package/lib/components/data/dataTemplate/relatedRecords.d.ts.map +1 -1
  19. package/lib/components/data/dataTemplate/relatedRecords.js +20 -2
  20. package/lib/components/data/dataTemplate/relatedRecords.js.map +1 -1
  21. package/lib/components/display/newGrid/index.d.ts +1 -0
  22. package/lib/components/display/newGrid/index.d.ts.map +1 -1
  23. package/lib/components/display/newGrid/index.js +1 -1
  24. package/lib/components/display/newGrid/index.js.map +1 -1
  25. package/lib/components/display/newKanban/index.d.ts +1 -0
  26. package/lib/components/display/newKanban/index.d.ts.map +1 -1
  27. package/lib/components/display/newKanban/index.js +1 -1
  28. package/lib/components/display/newKanban/index.js.map +1 -1
  29. package/lib/components/display/newList/index.d.ts +1 -0
  30. package/lib/components/display/newList/index.d.ts.map +1 -1
  31. package/lib/components/display/newList/index.js +2 -2
  32. package/lib/components/display/newList/index.js.map +1 -1
  33. package/lib/components/display/newTable/index.d.ts +4 -1
  34. package/lib/components/display/newTable/index.d.ts.map +1 -1
  35. package/lib/components/display/newTable/index.js +3 -3
  36. package/lib/components/display/newTable/index.js.map +1 -1
  37. package/lib/components/display/recordActions/index.d.ts +2 -0
  38. package/lib/components/display/recordActions/index.d.ts.map +1 -1
  39. package/lib/components/display/recordActions/index.js +6 -4
  40. package/lib/components/display/recordActions/index.js.map +1 -1
  41. package/lib/components/input/markdown/index.d.ts +5 -0
  42. package/lib/components/input/markdown/index.d.ts.map +1 -1
  43. package/lib/components/input/markdown/index.js +39 -1
  44. package/lib/components/input/markdown/index.js.map +1 -1
  45. package/lib/tail.css +2 -2
  46. package/package.json +1 -1
@@ -177,6 +177,7 @@ var settingsModal_1 = require("./settingsModal");
177
177
  var chartView_1 = require("./chartView");
178
178
  var referenceScan_1 = require("./referenceScan");
179
179
  var relatedRecords_1 = require("./relatedRecords");
180
+ var readViewIds_1 = require("./readViewIds");
180
181
  var flexFilter_1 = require("../flexFilter");
181
182
  var timelineBars_1 = require("./timelineBars");
182
183
  var viewStatePersistence_1 = require("./viewStatePersistence");
@@ -279,7 +280,7 @@ var DELETE_BLOCKED_ROWS = 50;
279
280
  var BATCH_UPDATE_QUERY_TYPES = ["=", "!=", ">", "<", "in", "!in"];
280
281
  var DELETE_ID_CHUNK = 1000;
281
282
  exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
282
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133;
283
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137;
283
284
  // INFO: every view draws a lookup as its source column's type, read-only, so
284
285
  // no type branch below meets "lookup"; rawProps.model keeps the lookups as
285
286
  // stored for the columns handed back to the host
@@ -298,7 +299,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
298
299
  // the list never refetching while the panel is open, which fails silently.
299
300
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
300
301
  // routed straight back into it — so expand-to-full-page is local state.
301
- var _134 = (0, react_1.useState)(false), drawerPageView = _134[0], setDrawerPageView = _134[1];
302
+ var _138 = (0, react_1.useState)(false), drawerPageView = _138[0], setDrawerPageView = _138[1];
302
303
  // INFO: the panel keeps rendering the record it was opened with rather than
303
304
  // live props. Without this, navigating back to the list would re-render the
304
305
  // still-mounted panel as a second list behind the overlay.
@@ -323,17 +324,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
323
324
  // INFO: the view in the url belongs to the record while its panel is open. A
324
325
  // list following it through the record's tabs cleared its rows and page and
325
326
  // read them again behind the panel, so it keeps the view it was opened on.
326
- // INFO: a related tab is a view of one record, never of the list. A host
327
- // that keeps the last view it was handed when the panel closes would leave
328
- // the list on that tab, where it draws nothing, so the list stays on the
329
- // view it was last on until the host names a list view again.
330
- var isRelatedViewId = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) === null || _f === void 0 ? void 0 : _f.startsWith(RELATED_VIEW_PREFIX));
331
- var hostedListViewIdRef = (0, react_1.useRef)(isRelatedViewId ? undefined : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.viewId);
327
+ // INFO: a related tab is a view of one record, never of the list, and so is
328
+ // the activity tab. A host that keeps the last view it was handed when the
329
+ // panel closes would leave the list on that tab, where it draws nothing, so
330
+ // the list stays on the view it was last on until the host names a list view
331
+ // again.
332
+ var isRelatedViewId = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) === null || _f === void 0 ? void 0 : _f.startsWith(RELATED_VIEW_PREFIX)) ||
333
+ ((_g = props.organise) === null || _g === void 0 ? void 0 : _g.viewId) === readViewIds_1.ACTIVITY_VIEW_ID;
334
+ var hostedListViewIdRef = (0, react_1.useRef)(isRelatedViewId ? undefined : (_h = props.organise) === null || _h === void 0 ? void 0 : _h.viewId);
332
335
  if (!isDrawerHost && !isRelatedViewId)
333
- hostedListViewIdRef.current = (_h = props.organise) === null || _h === void 0 ? void 0 : _h.viewId;
336
+ hostedListViewIdRef.current = (_j = props.organise) === null || _j === void 0 ? void 0 : _j.viewId;
334
337
  var listViewId = isDrawerHost || (resolvedType === "list" && isRelatedViewId)
335
338
  ? hostedListViewIdRef.current
336
- : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.viewId;
339
+ : (_k = props.organise) === null || _k === void 0 ? void 0 : _k.viewId;
337
340
  // INFO: the route has already gone back to the list while the panel slides out,
338
341
  // so it keeps drawing what it was opened as until it is gone
339
342
  var drawerFormRef = (0, react_1.useRef)(false);
@@ -356,7 +359,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
356
359
  drawerFormEditedRef.current = false;
357
360
  }
358
361
  drawerOpenRef.current = isDrawerHost;
359
- var _135 = (0, react_1.useState)(false), drawerDiscardModal = _135[0], setDrawerDiscardModal = _135[1];
362
+ var _139 = (0, react_1.useState)(false), drawerDiscardModal = _139[0], setDrawerDiscardModal = _139[1];
360
363
  // INFO: leaving the record ends the escape, so the next row opened from the
361
364
  // list peeks in the panel again rather than inheriting a full page the user
362
365
  // asked for once. Saving a form on the full page lands on its read view, which
@@ -441,7 +444,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
441
444
  initialFilterReferenceDate: initialFilterReferenceDate,
442
445
  };
443
446
  };
444
- var _136 = intialiseDefaultFilterValues(), initialFilterSearch = _136.initialFilterSearch, initialFilterSearchParams = _136.initialFilterSearchParams, initialFilterSelection = _136.initialFilterSelection, initialFilterReference = _136.initialFilterReference, initialFilterReferenceDate = _136.initialFilterReferenceDate;
447
+ var _140 = intialiseDefaultFilterValues(), initialFilterSearch = _140.initialFilterSearch, initialFilterSearchParams = _140.initialFilterSearchParams, initialFilterSelection = _140.initialFilterSelection, initialFilterReference = _140.initialFilterReference, initialFilterReferenceDate = _140.initialFilterReferenceDate;
445
448
  // INFO: organise.initialSearch fills the Quick find box, which sends its
446
449
  // value under "search". Without that box (hideSearch, Firebase, or a
447
450
  // "search" query taking its place) there is nothing to fill
@@ -457,11 +460,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
457
460
  // keyword: All's columns and sort, no stored filters, and nothing this
458
461
  // person kept in the browser (view drafts, persistViewState) is read or
459
462
  // written — until they pick a view, which is their own choice again
460
- var _137 = (0, react_1.useState)(function () {
463
+ var _141 = (0, react_1.useState)(function () {
461
464
  var _a, _b, _c;
462
465
  return handleCanInitialSearch((_a = props.organise) === null || _a === void 0 ? void 0 : _a.additionalQuery) ||
463
466
  !!((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.linkFlexFilters) === null || _c === void 0 ? void 0 : _c.length);
464
- }), isLinkOpen = _137[0], setIsLinkOpen = _137[1];
467
+ }), isLinkOpen = _141[0], setIsLinkOpen = _141[1];
465
468
  var handleSeedInitialSearch = function (params) {
466
469
  var _a;
467
470
  return isLinkOpen &&
@@ -470,12 +473,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
470
473
  ? __assign(__assign({}, params), { search: props.organise.initialSearch }) : params;
471
474
  };
472
475
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
473
- var _138 = (0, viewStatePersistence_1.usePersistedViewState)({
474
- mode: isLinkOpen ? undefined : (_k = props.organise) === null || _k === void 0 ? void 0 : _k.persistViewState,
476
+ var _142 = (0, viewStatePersistence_1.usePersistedViewState)({
477
+ mode: isLinkOpen ? undefined : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistViewState,
475
478
  collectionId: props.collectionId,
476
- persistKey: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistKey,
479
+ persistKey: (_m = props.organise) === null || _m === void 0 ? void 0 : _m.persistKey,
477
480
  type: resolvedType,
478
- }), rawPersistedState = _138.persistedState, isPersistEnabled = _138.isEnabled, handleSaveView = _138.handleSaveView, handleRegisterViewSnapshot = _138.handleRegisterViewSnapshot;
481
+ }), rawPersistedState = _142.persistedState, isPersistEnabled = _142.isEnabled, handleSaveView = _142.handleSaveView, handleRegisterViewSnapshot = _142.handleRegisterViewSnapshot;
479
482
  // INFO: drop stored filters/sort on removed columns — they would empty the table
480
483
  var persistedState = (0, react_1.useMemo)(function () {
481
484
  var _a, _b, _c, _d;
@@ -487,12 +490,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
487
490
  }, [
488
491
  rawPersistedState,
489
492
  props.model,
490
- (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareFlexFilterReferences,
491
- (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterListObjects,
492
- (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterRelated,
493
+ (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterReferences,
494
+ (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterListObjects,
495
+ (_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareFlexFilterRelated,
493
496
  ]);
494
- var _139 = (0, react_1.useState)(false), loading = _139[0], setLoading = _139[1];
495
- var _140 = (0, react_1.useState)(), notification = _140[0], setNotification = _140[1];
497
+ var _143 = (0, react_1.useState)(false), loading = _143[0], setLoading = _143[1];
498
+ var _144 = (0, react_1.useState)(), notification = _144[0], setNotification = _144[1];
496
499
  // INFO: a success toast is confirmation, not a decision — it clears itself so
497
500
  // it never sits on the floating step bar; errors stay until dismissed
498
501
  (0, react_1.useEffect)(function () {
@@ -502,96 +505,96 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
502
505
  return function () { return clearTimeout(timer); };
503
506
  }, [notification]);
504
507
  //INFO : Used by List
505
- var _141 = (0, react_1.useState)(function () {
508
+ var _145 = (0, react_1.useState)(function () {
506
509
  var _a;
507
510
  return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearch);
508
- }), filterSearch = _141[0], setFilterSearch = _141[1];
509
- var _142 = (0, react_1.useState)(function () {
511
+ }), filterSearch = _145[0], setFilterSearch = _145[1];
512
+ var _146 = (0, react_1.useState)(function () {
510
513
  var _a;
511
514
  return handleSeedInitialSearch((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _a !== void 0 ? _a : initialFilterSearchParams);
512
- }), filterSearchParams = _142[0], setFilterSearchParams = _142[1];
513
- var _143 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _q !== void 0 ? _q : initialFilterSelection), filterSelection = _143[0], setFilterSelection = _143[1];
514
- var _144 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _r !== void 0 ? _r : initialFilterReference), filterReference = _144[0], setFilterReference = _144[1];
515
- var _145 = (0, react_1.useState)({}), filterReferenceSearch = _145[0], setFilterReferenceSearch = _145[1];
516
- var _146 = (0, react_1.useState)({}), filterReferenceList = _146[0], setFilterReferenceList = _146[1];
517
- var _147 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
515
+ }), filterSearchParams = _146[0], setFilterSearchParams = _146[1];
516
+ var _147 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _r !== void 0 ? _r : initialFilterSelection), filterSelection = _147[0], setFilterSelection = _147[1];
517
+ var _148 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _s !== void 0 ? _s : initialFilterReference), filterReference = _148[0], setFilterReference = _148[1];
518
+ var _149 = (0, react_1.useState)({}), filterReferenceSearch = _149[0], setFilterReferenceSearch = _149[1];
519
+ var _150 = (0, react_1.useState)({}), filterReferenceList = _150[0], setFilterReferenceList = _150[1];
520
+ var _151 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
518
521
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
519
- : initialFilterReferenceDate), filterReferenceDate = _147[0], setFilterReferenceDate = _147[1];
520
- var _148 = (0, react_1.useState)(true), tableLoading = _148[0], setTableLoading = _148[1];
521
- var _149 = (0, react_1.useState)(""), cursor = _149[0], setCursor = _149[1];
522
- var _150 = (0, react_1.useState)(""), lastCursor = _150[0], setLastCursor = _150[1];
523
- var _151 = (0, react_1.useState)([]), tableData = _151[0], setTableData = _151[1];
524
- var _152 = (0, react_1.useState)([]), spaceTableData = _152[0], setSpaceTableData = _152[1];
522
+ : initialFilterReferenceDate), filterReferenceDate = _151[0], setFilterReferenceDate = _151[1];
523
+ var _152 = (0, react_1.useState)(true), tableLoading = _152[0], setTableLoading = _152[1];
524
+ var _153 = (0, react_1.useState)(""), cursor = _153[0], setCursor = _153[1];
525
+ var _154 = (0, react_1.useState)(""), lastCursor = _154[0], setLastCursor = _154[1];
526
+ var _155 = (0, react_1.useState)([]), tableData = _155[0], setTableData = _155[1];
527
+ var _156 = (0, react_1.useState)([]), spaceTableData = _156[0], setSpaceTableData = _156[1];
525
528
  // INFO: a save resolves after later renders, so it reads the table from here —
526
529
  // the state it closed over can predate an earlier save on the same row
527
530
  var tableDataRef = (0, react_1.useRef)([]);
528
531
  var spaceTableDataRef = (0, react_1.useRef)([]);
529
532
  tableDataRef.current = tableData;
530
533
  spaceTableDataRef.current = spaceTableData;
531
- var _153 = (0, react_1.useState)(0), size = _153[0], setSize = _153[1];
532
- var _154 = (0, react_1.useState)((_u = (_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _s !== void 0 ? _s : (_t = props.organise) === null || _t === void 0 ? void 0 : _t.pageIndex) !== null && _u !== void 0 ? _u : 0), pageIndex = _154[0], setPageIndex = _154[1];
534
+ var _157 = (0, react_1.useState)(0), size = _157[0], setSize = _157[1];
535
+ var _158 = (0, react_1.useState)((_v = (_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _t !== void 0 ? _t : (_u = props.organise) === null || _u === void 0 ? void 0 : _u.pageIndex) !== null && _v !== void 0 ? _v : 0), pageIndex = _158[0], setPageIndex = _158[1];
533
536
  // INFO: every change of page, including the return to the first page when a
534
537
  // filter or search changes, which onChangePagination does not always report
535
538
  (0, react_1.useEffect)(function () {
536
539
  var _a, _b;
537
540
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
538
541
  }, [pageIndex]);
539
- var _155 = (0, react_1.useState)([]), selectedIds = _155[0], setSelectedIds = _155[1];
540
- var _156 = (0, react_1.useState)(false), selectAll = _156[0], setSelectAll = _156[1];
541
- var _157 = (0, react_1.useState)(""), deletePasscode = _157[0], setDeletePasscode = _157[1];
542
- var _158 = (0, react_1.useState)(""), deletePasscodeInput = _158[0], setDeletePasscodeInput = _158[1];
542
+ var _159 = (0, react_1.useState)([]), selectedIds = _159[0], setSelectedIds = _159[1];
543
+ var _160 = (0, react_1.useState)(false), selectAll = _160[0], setSelectAll = _160[1];
544
+ var _161 = (0, react_1.useState)(""), deletePasscode = _161[0], setDeletePasscode = _161[1];
545
+ var _162 = (0, react_1.useState)(""), deletePasscodeInput = _162[0], setDeletePasscodeInput = _162[1];
543
546
  // INFO: the up-front Delete anyway — skips the link check for the whole
544
547
  // delete, for people trusted with it (canDeleteAnyway)
545
- var _159 = (0, react_1.useState)(false), isSkipLinkCheck = _159[0], setIsSkipLinkCheck = _159[1];
546
- var _160 = (0, react_1.useState)(""), deleteFeedId = _160[0], setDeleteFeedId = _160[1];
548
+ var _163 = (0, react_1.useState)(false), isSkipLinkCheck = _163[0], setIsSkipLinkCheck = _163[1];
549
+ var _164 = (0, react_1.useState)(""), deleteFeedId = _164[0], setDeleteFeedId = _164[1];
547
550
  //INFO : Used by List Organise
548
551
  // INFO: Internal sort state that overrides props.organise?.sort when
549
552
  // persistViewState is enabled and a persisted sort exists
550
- var _161 = (0, react_1.useState)((_v = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _v !== void 0 ? _v : undefined), persistedSort = _161[0], setPersistedSort = _161[1];
551
- var _162 = (0, react_1.useState)(false), filterDraft = _162[0], setFilterDraft = _162[1];
552
- var _163 = (0, react_1.useState)(false), addTabModal = _163[0], setAddTabModal = _163[1];
553
- var _164 = (0, react_1.useState)(-1), editTabIndex = _164[0], setEditTabIndex = _164[1];
553
+ var _165 = (0, react_1.useState)((_w = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _w !== void 0 ? _w : undefined), persistedSort = _165[0], setPersistedSort = _165[1];
554
+ var _166 = (0, react_1.useState)(false), filterDraft = _166[0], setFilterDraft = _166[1];
555
+ var _167 = (0, react_1.useState)(false), addTabModal = _167[0], setAddTabModal = _167[1];
556
+ var _168 = (0, react_1.useState)(-1), editTabIndex = _168[0], setEditTabIndex = _168[1];
554
557
  //INFO : resolve the initial tab synchronously so the mount cond is already
555
558
  // tab-scoped — an empty initial tab caused a second wasted list fetch
556
- var _165 = (0, react_1.useState)(function () {
559
+ var _169 = (0, react_1.useState)(function () {
557
560
  var _a;
558
561
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
559
- }), selectedTab = _165[0], setSelectedTab = _165[1];
560
- var _166 = (0, react_1.useState)("dayGridMonth"), calendarView = _166[0], setCalendarView = _166[1];
562
+ }), selectedTab = _169[0], setSelectedTab = _169[1];
563
+ var _170 = (0, react_1.useState)("dayGridMonth"), calendarView = _170[0], setCalendarView = _170[1];
561
564
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
562
565
  // (calendarView above drives the matching range query)
563
- var _167 = (0, react_1.useState)("month"), newCalendarViewMode = _167[0], setNewCalendarViewMode = _167[1];
564
- var _168 = (0, react_1.useState)(new Date()), calendarTabMonth = _168[0], setCalendarTabMonth = _168[1];
566
+ var _171 = (0, react_1.useState)("month"), newCalendarViewMode = _171[0], setNewCalendarViewMode = _171[1];
567
+ var _172 = (0, react_1.useState)(new Date()), calendarTabMonth = _172[0], setCalendarTabMonth = _172[1];
565
568
  // INFO: read once per theme — it asks the browser to resolve a style
566
569
  var timelinePrimaryColour = (0, react_1.useMemo)(function () { return (0, timelineBars_1.handleReadPrimaryColour)(); },
567
570
  /* eslint-disable-next-line */
568
- [(_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkMode]);
571
+ [(_x = props.organise) === null || _x === void 0 ? void 0 : _x.darkMode]);
569
572
  // INFO: the period a timeline shows — it reads only the records whose bars
570
573
  // overlap it, so a large datasheet loads one month or quarter at a time
571
- var _169 = (0, react_1.useState)({ unit: "month", anchor: new Date() }), timelineRange = _169[0], setTimelineRange = _169[1];
574
+ var _173 = (0, react_1.useState)({ unit: "month", anchor: new Date() }), timelineRange = _173[0], setTimelineRange = _173[1];
572
575
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
573
576
  // whenever its settings change, and that must not undo the user's switch
574
577
  var calendarViewInitRef = (0, react_1.useRef)(false);
575
- var _170 = (0, react_1.useState)(true), kanbanDroppable = _170[0], setKanbanDroppable = _170[1];
576
- var _171 = (0, react_1.useState)([]), kanbanOptions = _171[0], setKanbanOptions = _171[1];
577
- var _172 = (0, react_1.useState)(false), batchUpdateModal = _172[0], setBatchUpdateModal = _172[1];
578
- var _173 = (0, react_1.useState)({
578
+ var _174 = (0, react_1.useState)(true), kanbanDroppable = _174[0], setKanbanDroppable = _174[1];
579
+ var _175 = (0, react_1.useState)([]), kanbanOptions = _175[0], setKanbanOptions = _175[1];
580
+ var _176 = (0, react_1.useState)(false), batchUpdateModal = _176[0], setBatchUpdateModal = _176[1];
581
+ var _177 = (0, react_1.useState)({
579
582
  columnId: "",
580
583
  columnData: {},
581
- }), batchUpdateData = _173[0], setBatchUpdateData = _173[1];
584
+ }), batchUpdateData = _177[0], setBatchUpdateData = _177[1];
582
585
  // INFO: system columns (created / updated at and by, record id, number)
583
586
  // join the structure hidden; the ones a user shows are kept per view
584
- var isSystemColumnsEnabled = !!((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareSystemColumns);
585
- var isSystemColumnsLocked = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumnsLocked);
587
+ var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
588
+ var isSystemColumnsLocked = !!((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareSystemColumnsLocked);
586
589
  var appendedSystemColumnIds = isSystemColumnsEnabled
587
590
  ? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
588
591
  : [];
589
- var _174 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _z !== void 0 ? _z : []), shownSystemColumnIds = _174[0], setShownSystemColumnIds = _174[1];
592
+ var _178 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _178[0], setShownSystemColumnIds = _178[1];
590
593
  var handleWithSystemColumns = function (model, shownIds) {
591
594
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
592
595
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
593
596
  };
594
- var _175 = (0, react_1.useState)(function () {
597
+ var _179 = (0, react_1.useState)(function () {
595
598
  var _a;
596
599
  var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
597
600
  if (!persistedState)
@@ -618,8 +621,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
618
621
  });
619
622
  }
620
623
  return model;
621
- }), structure = _175[0], setStructure = _175[1];
622
- var _176 = (0, react_1.useState)(((_0 = props === null || props === void 0 ? void 0 : props.organise) === null || _0 === void 0 ? void 0 : _0.additionalQuery) || []), additionalQuery = _176[0], setAdditionalQuery = _176[1];
624
+ }), structure = _179[0], setStructure = _179[1];
625
+ var _180 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _180[0], setAdditionalQuery = _180[1];
623
626
  // INFO: State for user-configurable flex filters (Monday.com-style)
624
627
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
625
628
  var defaultFlexFilterRow = [
@@ -631,15 +634,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
631
634
  },
632
635
  ];
633
636
  // INFO: rows the host opens the list with come before a saved view's
634
- var initialFlexFilterRows = ((_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.linkFlexFilters) === null || _2 === void 0 ? void 0 : _2.length)
637
+ var initialFlexFilterRows = ((_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.linkFlexFilters) === null || _3 === void 0 ? void 0 : _3.length)
635
638
  ? props.organise.linkFlexFilters
636
- : ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.initialFlexFilters) &&
639
+ : ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.initialFlexFilters) &&
637
640
  props.organise.initialFlexFilters.length > 0
638
641
  ? props.organise.initialFlexFilters
639
642
  : (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
640
643
  ? persistedState.flexFilters
641
644
  : defaultFlexFilterRow;
642
- var _177 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _177[0], setFlexFilters = _177[1];
645
+ var _181 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _181[0], setFlexFilters = _181[1];
643
646
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
644
647
  // clear methods so chained calls in one tick aren't stale.
645
648
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -652,101 +655,101 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
652
655
  }, [flexFilters]);
653
656
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
654
657
  // to prevent API calls on every keystroke when typing in value inputs
655
- var _178 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _178[0], setFlexFiltersDebounced = _178[1];
658
+ var _182 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _182[0], setFlexFiltersDebounced = _182[1];
656
659
  // INFO: the filter rows of the export being set up — started from the
657
660
  // list's own when the export opens, so changing them leaves the list as it is
658
- var _179 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _179[0], setExportFlexFilters = _179[1];
659
- var _180 = (0, react_1.useState)({}), flexFilterReferenceOptions = _180[0], setFlexFilterReferenceOptions = _180[1];
660
- var _181 = (0, react_1.useState)({}), flexFilterReferenceSearch = _181[0], setFlexFilterReferenceSearch = _181[1];
661
- var _182 = (0, react_1.useState)(false), flexFilterModalOpen = _182[0], setFlexFilterModalOpen = _182[1];
662
- var _183 = (0, react_1.useState)(false), viewSettingsModalOpen = _183[0], setViewSettingsModalOpen = _183[1];
661
+ var _183 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _183[0], setExportFlexFilters = _183[1];
662
+ var _184 = (0, react_1.useState)({}), flexFilterReferenceOptions = _184[0], setFlexFilterReferenceOptions = _184[1];
663
+ var _185 = (0, react_1.useState)({}), flexFilterReferenceSearch = _185[0], setFlexFilterReferenceSearch = _185[1];
664
+ var _186 = (0, react_1.useState)(false), flexFilterModalOpen = _186[0], setFlexFilterModalOpen = _186[1];
665
+ var _187 = (0, react_1.useState)(false), viewSettingsModalOpen = _187[0], setViewSettingsModalOpen = _187[1];
663
666
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
664
667
  // Deliberately kept out of `structure`: the props-sync effect below resets
665
668
  // structure to props.model whenever props change, which would wipe the
666
669
  // choice, and the persist effect derives schema-level hiddenColumnIds from
667
670
  // structure — writing user hides there would blur the two concepts.
668
- var _184 = (0, react_1.useState)((_4 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _4 !== void 0 ? _4 : []), userHiddenColumnIds = _184[0], setUserHiddenColumnIds = _184[1];
669
- var _185 = (0, react_1.useState)(""), columnSearch = _185[0], setColumnSearch = _185[1];
670
- var _186 = (0, react_1.useState)([]), savedViews = _186[0], setSavedViews = _186[1];
671
- var _187 = (0, react_1.useState)(null), activeSavedViewId = _187[0], setActiveSavedViewId = _187[1];
671
+ var _188 = (0, react_1.useState)((_5 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _5 !== void 0 ? _5 : []), userHiddenColumnIds = _188[0], setUserHiddenColumnIds = _188[1];
672
+ var _189 = (0, react_1.useState)(""), columnSearch = _189[0], setColumnSearch = _189[1];
673
+ var _190 = (0, react_1.useState)([]), savedViews = _190[0], setSavedViews = _190[1];
674
+ var _191 = (0, react_1.useState)(null), activeSavedViewId = _191[0], setActiveSavedViewId = _191[1];
672
675
  // INFO: the widths of the view on screen, by column id ("180px")
673
- var _188 = (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 = _188[0], setColumnWidths = _188[1];
676
+ var _192 = (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 = _192[0], setColumnWidths = _192[1];
674
677
  // INFO: the kanban lane widths of the view on screen, by lane id ("300px")
675
- var _189 = (0, react_1.useState)(function () { var _a, _b, _c; return (_c = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.laneWidths) !== null && _c !== void 0 ? _c : {}; }), laneWidths = _189[0], setLaneWidths = _189[1];
678
+ var _193 = (0, react_1.useState)(function () { var _a, _b, _c; return (_c = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.laneWidths) !== null && _c !== void 0 ? _c : {}; }), laneWidths = _193[0], setLaneWidths = _193[1];
676
679
  // INFO: the read drawer's dragged width ("520px"), kept in the view with the
677
680
  // column widths. A restored persistViewState wins over All's, as a saved
678
681
  // view or draft applied at opening replaces both
679
- var _190 = (0, react_1.useState)(function () {
682
+ var _194 = (0, react_1.useState)(function () {
680
683
  var _a, _b, _c;
681
684
  return (_a = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.drawerWidth : undefined)) !== null && _a !== void 0 ? _a : (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.allView) === null || _c === void 0 ? void 0 : _c.drawerWidth;
682
- }), drawerWidth = _190[0], setDrawerWidth = _190[1];
685
+ }), drawerWidth = _194[0], setDrawerWidth = _194[1];
683
686
  // INFO: the columns the view on screen freezes at the left edge
684
- var _191 = (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 = _191[0], setPinnedColumnIds = _191[1];
687
+ var _195 = (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 = _195[0], setPinnedColumnIds = _195[1];
685
688
  // INFO: unsaved changes are kept only once the opening view is on screen,
686
689
  // so the defaults drawn before it never overwrite a person's own
687
- var _192 = (0, react_1.useState)(false), isViewDraftReady = _192[0], setIsViewDraftReady = _192[1];
690
+ var _196 = (0, react_1.useState)(false), isViewDraftReady = _196[0], setIsViewDraftReady = _196[1];
688
691
  // INFO: null while the name box is closed
689
- var _193 = (0, react_1.useState)(null), savedViewName = _193[0], setSavedViewName = _193[1];
690
- var _194 = (0, react_1.useState)(null), deletingSavedViewId = _194[0], setDeletingSavedViewId = _194[1];
692
+ var _197 = (0, react_1.useState)(null), savedViewName = _197[0], setSavedViewName = _197[1];
693
+ var _198 = (0, react_1.useState)(null), deletingSavedViewId = _198[0], setDeletingSavedViewId = _198[1];
691
694
  // INFO: the view chip being dragged, to drop it in another place
692
- var _195 = (0, react_1.useState)(null), draggingSavedViewId = _195[0], setDraggingSavedViewId = _195[1];
695
+ var _199 = (0, react_1.useState)(null), draggingSavedViewId = _199[0], setDraggingSavedViewId = _199[1];
693
696
  // INFO: the tab strip in the order a drag has reached, saved once on drop
694
- var _196 = (0, react_1.useState)(null), draggedTabs = _196[0], setDraggedTabs = _196[1];
695
- var _197 = (0, react_1.useState)(null), renamingSavedView = _197[0], setRenamingSavedView = _197[1];
696
- var _198 = (0, react_1.useState)(false), isSavedViewsExpanded = _198[0], setIsSavedViewsExpanded = _198[1];
697
- var _199 = (0, react_1.useState)(null), draggingColumnId = _199[0], setDraggingColumnId = _199[1];
697
+ var _200 = (0, react_1.useState)(null), draggedTabs = _200[0], setDraggedTabs = _200[1];
698
+ var _201 = (0, react_1.useState)(null), renamingSavedView = _201[0], setRenamingSavedView = _201[1];
699
+ var _202 = (0, react_1.useState)(false), isSavedViewsExpanded = _202[0], setIsSavedViewsExpanded = _202[1];
700
+ var _203 = (0, react_1.useState)(null), draggingColumnId = _203[0], setDraggingColumnId = _203[1];
698
701
  var columnRowRefs = (0, react_1.useRef)({});
699
702
  //INFO : Used by Auth
700
- var _200 = (0, react_1.useState)({
703
+ var _204 = (0, react_1.useState)({
701
704
  email: "",
702
705
  google: "",
703
706
  phone: "",
704
707
  disabled: false,
705
708
  create: false,
706
- }), authMethods = _200[0], setAuthMethods = _200[1];
707
- var _201 = (0, react_1.useState)(""), selectedAuthMethod = _201[0], setSelectedAuthMethod = _201[1];
709
+ }), authMethods = _204[0], setAuthMethods = _204[1];
710
+ var _205 = (0, react_1.useState)(""), selectedAuthMethod = _205[0], setSelectedAuthMethod = _205[1];
708
711
  // INFO: the sign-in check of a users datasheet's record is running; the
709
712
  // panel shows a spinner rather than nothing, which read as "no login"
710
- var _202 = (0, react_1.useState)(false), authLoading = _202[0], setAuthLoading = _202[1];
713
+ var _206 = (0, react_1.useState)(false), authLoading = _206[0], setAuthLoading = _206[1];
711
714
  // INFO: a delete is running — the ref answers a second tap at once, before
712
715
  // the state has rendered, and the state disables the confirm button
713
716
  var deletingRef = (0, react_1.useRef)(false);
714
- var _203 = (0, react_1.useState)(false), deleting = _203[0], setDeleting = _203[1];
717
+ var _207 = (0, react_1.useState)(false), deleting = _207[0], setDeleting = _207[1];
715
718
  // INFO: Used by Activity Log
716
- var _204 = (0, react_1.useState)(false), activityModal = _204[0], setActivityModal = _204[1];
717
- var _205 = (0, react_1.useState)(""), activityId = _205[0], setActivityId = _205[1];
719
+ var _208 = (0, react_1.useState)(false), activityModal = _208[0], setActivityModal = _208[1];
720
+ var _209 = (0, react_1.useState)(""), activityId = _209[0], setActivityId = _209[1];
718
721
  //INFO : Used by Export
719
- var _206 = (0, react_1.useState)(null), csvFile = _206[0], setCSVFile = _206[1];
720
- var _207 = (0, react_1.useState)([]), csvFileData = _207[0], setCSVFileData = _207[1];
721
- var _208 = (0, react_1.useState)(0), stepCSVIndex = _208[0], setStepCSVIndex = _208[1];
722
- var _209 = (0, react_1.useState)({}), listCSVMapAttribute = _209[0], setListCSVMapAttribute = _209[1];
723
- var _210 = (0, react_1.useState)({}), listCSVObjAttribute = _210[0], setListCSVObjAttribute = _210[1];
724
- var _211 = (0, react_1.useState)([]), csvAPIAttribute = _211[0], setCSVAPIAttribute = _211[1];
725
- var _212 = (0, react_1.useState)(((_5 = props.devSettings.currentUser) === null || _5 === void 0 ? void 0 : _5.userEmail) || ""), exportCSVEmail = _212[0], setExportCSVEmail = _212[1];
726
- var _213 = (0, react_1.useState)(((_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.exportSettings) === null || _7 === void 0 ? void 0 : _7.defaultExportPDFName) || ""), exportPDFTitle = _213[0], setExportPDFTitle = _213[1];
727
- var _214 = (0, react_1.useState)(false), exportPDFLoading = _214[0], setExportPDFLoading = _214[1];
728
- var _215 = (0, react_1.useState)(false), exportReadPDFLoading = _215[0], setExportReadPDFLoading = _215[1];
729
- var _216 = (0, react_1.useState)((_10 = (_9 = (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.exportSettings) === null || _9 === void 0 ? void 0 : _9.sumColumnId) !== null && _10 !== void 0 ? _10 : []), exportSumAttributeIds = _216[0], setExportSumAttributeIds = _216[1];
730
- var _217 = (0, react_1.useState)((_13 = (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.exportSettings) === null || _12 === void 0 ? void 0 : _12.hideSubItems) !== null && _13 !== void 0 ? _13 : false), hideSubItems = _217[0], setHideSubItems = _217[1];
731
- var _218 = (0, react_1.useState)([]), importTableData = _218[0], setImportTableData = _218[1];
732
- var _219 = (0, react_1.useState)([]), queryList = _219[0], setQueryList = _219[1];
733
- var _220 = (0, react_1.useState)(undefined), allQueryList = _220[0], setAllQueryList = _220[1];
722
+ var _210 = (0, react_1.useState)(null), csvFile = _210[0], setCSVFile = _210[1];
723
+ var _211 = (0, react_1.useState)([]), csvFileData = _211[0], setCSVFileData = _211[1];
724
+ var _212 = (0, react_1.useState)(0), stepCSVIndex = _212[0], setStepCSVIndex = _212[1];
725
+ var _213 = (0, react_1.useState)({}), listCSVMapAttribute = _213[0], setListCSVMapAttribute = _213[1];
726
+ var _214 = (0, react_1.useState)({}), listCSVObjAttribute = _214[0], setListCSVObjAttribute = _214[1];
727
+ var _215 = (0, react_1.useState)([]), csvAPIAttribute = _215[0], setCSVAPIAttribute = _215[1];
728
+ var _216 = (0, react_1.useState)(((_6 = props.devSettings.currentUser) === null || _6 === void 0 ? void 0 : _6.userEmail) || ""), exportCSVEmail = _216[0], setExportCSVEmail = _216[1];
729
+ var _217 = (0, react_1.useState)(((_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.defaultExportPDFName) || ""), exportPDFTitle = _217[0], setExportPDFTitle = _217[1];
730
+ var _218 = (0, react_1.useState)(false), exportPDFLoading = _218[0], setExportPDFLoading = _218[1];
731
+ var _219 = (0, react_1.useState)(false), exportReadPDFLoading = _219[0], setExportReadPDFLoading = _219[1];
732
+ var _220 = (0, react_1.useState)((_11 = (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.exportSettings) === null || _10 === void 0 ? void 0 : _10.sumColumnId) !== null && _11 !== void 0 ? _11 : []), exportSumAttributeIds = _220[0], setExportSumAttributeIds = _220[1];
733
+ var _221 = (0, react_1.useState)((_14 = (_13 = (_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.exportSettings) === null || _13 === void 0 ? void 0 : _13.hideSubItems) !== null && _14 !== void 0 ? _14 : false), hideSubItems = _221[0], setHideSubItems = _221[1];
734
+ var _222 = (0, react_1.useState)([]), importTableData = _222[0], setImportTableData = _222[1];
735
+ var _223 = (0, react_1.useState)([]), queryList = _223[0], setQueryList = _223[1];
736
+ var _224 = (0, react_1.useState)(undefined), allQueryList = _224[0], setAllQueryList = _224[1];
734
737
  // INFO: a restored state wins over the prop; its "" is a list the user
735
738
  // ungrouped, so it opens ungrouped
736
- var _221 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
739
+ var _225 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
737
740
  ? persistedState.groupBy || undefined
738
- : (_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.groupBy), groupId = _221[0], setGroupId = _221[1];
741
+ : (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.groupBy), groupId = _225[0], setGroupId = _225[1];
739
742
  // INFO: groups by their record count, or in the column's own order
740
- var _222 = (0, react_1.useState)((_15 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupOrder) !== null && _15 !== void 0 ? _15 : ""), groupOrder = _222[0], setGroupOrder = _222[1];
743
+ var _226 = (0, react_1.useState)((_16 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupOrder) !== null && _16 !== void 0 ? _16 : ""), groupOrder = _226[0], setGroupOrder = _226[1];
741
744
  // INFO: each group's total per number column, keyed by section id
742
- var _223 = (0, react_1.useState)({}), groupSummaries = _223[0], setGroupSummaries = _223[1];
745
+ var _227 = (0, react_1.useState)({}), groupSummaries = _227[0], setGroupSummaries = _227[1];
743
746
  // INFO: each group's row count over every row the filters match; null until
744
747
  // read. A band paged alone shows it until its own first page lands, and a
745
748
  // band it counts empty is left out instead of waiting to be read
746
- var _224 = (0, react_1.useState)(null), groupTotals = _224[0], setGroupTotals = _224[1];
749
+ var _228 = (0, react_1.useState)(null), groupTotals = _228[0], setGroupTotals = _228[1];
747
750
  // INFO: the last read of groupTotals failed, so bands fall back to the rows
748
751
  // loaded instead of waiting on a total that is not coming
749
- var _225 = (0, react_1.useState)(false), groupTotalsFailed = _225[0], setGroupTotalsFailed = _225[1];
752
+ var _229 = (0, react_1.useState)(false), groupTotalsFailed = _229[0], setGroupTotalsFailed = _229[1];
750
753
  var groupSummaryRequestRef = (0, react_1.useRef)(0);
751
754
  // INFO: the grouped count waiting to go out, so a filter change can stop it
752
755
  // before it sends the filters it was scheduled with
@@ -757,20 +760,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
757
760
  // later refresh, and "keep" lapses, so a refresh that brings no new rows
758
761
  // never holds back a later change's count
759
762
  var groupSummaryRefreshRef = (0, react_1.useRef)(null);
760
- var _226 = (0, react_1.useState)({}), commentCounts = _226[0], setCommentCounts = _226[1];
761
- var _227 = (0, react_1.useState)({}), commentUnread = _227[0], setCommentUnread = _227[1];
763
+ var _230 = (0, react_1.useState)({}), commentCounts = _230[0], setCommentCounts = _230[1];
764
+ var _231 = (0, react_1.useState)({}), commentUnread = _231[0], setCommentUnread = _231[1];
762
765
  // INFO: Monday-board per-group paging. Keyed by the group key that
763
766
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
764
767
  // Each group tracks its own loaded cursor + total so it can lazily load its
765
768
  // next page as the user scrolls inside that band, independent of every other
766
769
  // group. Only used when renderCheckGroupPaging() is true.
767
- var _228 = (0, react_1.useState)({}), groupPageState = _228[0], setGroupPageState = _228[1];
770
+ var _232 = (0, react_1.useState)({}), groupPageState = _232[0], setGroupPageState = _232[1];
768
771
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
769
772
  // in one tick do not re-fetch an already in-flight page.
770
773
  // INFO: every band of the table, or section of the list or grid tab, is
771
774
  // collapsed, so no row is on screen and the scroll sentinel under the view
772
775
  // would read page after page; it waits until one is opened again
773
- var _229 = (0, react_1.useState)(false), isAllGroupsCollapsed = _229[0], setIsAllGroupsCollapsed = _229[1];
776
+ var _233 = (0, react_1.useState)(false), isAllGroupsCollapsed = _233[0], setIsAllGroupsCollapsed = _233[1];
774
777
  var groupPageStateRef = (0, react_1.useRef)({});
775
778
  groupPageStateRef.current = groupPageState;
776
779
  // INFO: rows added since the list was read, reported through
@@ -786,52 +789,52 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
786
789
  var groupLoadingKeyRef = (0, react_1.useRef)(null);
787
790
  var groupLoadQueueRef = (0, react_1.useRef)([]);
788
791
  var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
789
- var _230 = (0, react_1.useState)(""), readTabSection = _230[0], setReadTabSection = _230[1];
790
- var _231 = (0, react_1.useState)(false), readFloatingNav = _231[0], setReadFloatingNav = _231[1];
792
+ var _234 = (0, react_1.useState)(""), readTabSection = _234[0], setReadTabSection = _234[1];
793
+ var _235 = (0, react_1.useState)(false), readFloatingNav = _235[0], setReadFloatingNav = _235[1];
791
794
  var readTabSectionRefs = (0, react_1.useRef)({});
792
795
  //INFO : Used by Read
793
796
  //INFO : Used by Update
794
- var _232 = (0, react_1.useState)(false), modalVisible = _232[0], setModalVisible = _232[1];
795
- var _233 = (0, react_1.useState)(false), deleteModal = _233[0], setDeleteModal = _233[1];
796
- var _234 = (0, react_1.useState)(false), excelModal = _234[0], setExcelModal = _234[1];
797
- var _235 = (0, react_1.useState)(false), exportExcel = _235[0], setExportExcel = _235[1];
798
- var _236 = (0, react_1.useState)(""), exportType = _236[0], setExportType = _236[1];
799
- var _237 = (0, react_1.useState)(false), exportQR = _237[0], setExportQR = _237[1];
800
- var _238 = (0, react_1.useState)(function () {
797
+ var _236 = (0, react_1.useState)(false), modalVisible = _236[0], setModalVisible = _236[1];
798
+ var _237 = (0, react_1.useState)(false), deleteModal = _237[0], setDeleteModal = _237[1];
799
+ var _238 = (0, react_1.useState)(false), excelModal = _238[0], setExcelModal = _238[1];
800
+ var _239 = (0, react_1.useState)(false), exportExcel = _239[0], setExportExcel = _239[1];
801
+ var _240 = (0, react_1.useState)(""), exportType = _240[0], setExportType = _240[1];
802
+ var _241 = (0, react_1.useState)(false), exportQR = _241[0], setExportQR = _241[1];
803
+ var _242 = (0, react_1.useState)(function () {
801
804
  var _a, _b;
802
805
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
803
806
  return firstTabId;
804
- }), activeTab = _238[0], setActiveTab = _238[1];
805
- var _239 = (0, react_1.useState)(false), signatureSigning = _239[0], setSignatureSigning = _239[1];
806
- var _240 = (0, react_1.useState)({}), selectedData = _240[0], setSelectedData = _240[1];
807
- var _241 = (0, react_1.useState)(""), selectedObjectStructureId = _241[0], setSelectedObjectStructureId = _241[1];
808
- var _242 = (0, react_1.useState)(""), selectedObjectId = _242[0], setSelectedObjectId = _242[1];
809
- var _243 = (0, react_1.useState)(""), selectedListAddressId = _243[0], setSelectedListAddressId = _243[1];
810
- var _244 = (0, react_1.useState)(-1), selectedListAddressIndex = _244[0], setSelectedListAddressIndex = _244[1];
811
- var _245 = (0, react_1.useState)({
807
+ }), activeTab = _242[0], setActiveTab = _242[1];
808
+ var _243 = (0, react_1.useState)(false), signatureSigning = _243[0], setSignatureSigning = _243[1];
809
+ var _244 = (0, react_1.useState)({}), selectedData = _244[0], setSelectedData = _244[1];
810
+ var _245 = (0, react_1.useState)(""), selectedObjectStructureId = _245[0], setSelectedObjectStructureId = _245[1];
811
+ var _246 = (0, react_1.useState)(""), selectedObjectId = _246[0], setSelectedObjectId = _246[1];
812
+ var _247 = (0, react_1.useState)(""), selectedListAddressId = _247[0], setSelectedListAddressId = _247[1];
813
+ var _248 = (0, react_1.useState)(-1), selectedListAddressIndex = _248[0], setSelectedListAddressIndex = _248[1];
814
+ var _249 = (0, react_1.useState)({
812
815
  lat: 0,
813
816
  lng: 0,
814
817
  name: "",
815
- }), selectedListAddress = _245[0], setSelectedListAddress = _245[1];
816
- var _246 = (0, react_1.useState)({}), selectedObjectData = _246[0], setSelectedObjectData = _246[1];
817
- var _247 = (0, react_1.useState)(null), objectCellEdit = _247[0], setObjectCellEdit = _247[1];
818
- var _248 = (0, react_1.useState)(false), referenceLoading = _248[0], setReferenceLoading = _248[1];
819
- var _249 = (0, react_1.useState)({}), referencesOptions = _249[0], setReferencesOptions = _249[1];
820
- var _250 = (0, react_1.useState)({}), referencesDetails = _250[0], setReferencesDetails = _250[1];
821
- var _251 = (0, react_1.useState)({}), listReferencesOptions = _251[0], setListReferencesOptions = _251[1];
818
+ }), selectedListAddress = _249[0], setSelectedListAddress = _249[1];
819
+ var _250 = (0, react_1.useState)({}), selectedObjectData = _250[0], setSelectedObjectData = _250[1];
820
+ var _251 = (0, react_1.useState)(null), objectCellEdit = _251[0], setObjectCellEdit = _251[1];
821
+ var _252 = (0, react_1.useState)(false), referenceLoading = _252[0], setReferenceLoading = _252[1];
822
+ var _253 = (0, react_1.useState)({}), referencesOptions = _253[0], setReferencesOptions = _253[1];
823
+ var _254 = (0, react_1.useState)({}), referencesDetails = _254[0], setReferencesDetails = _254[1];
824
+ var _255 = (0, react_1.useState)({}), listReferencesOptions = _255[0], setListReferencesOptions = _255[1];
822
825
  // INFO: the referenced records themselves, for a table cell that picks from
823
826
  // a list on one (referenceSelection)
824
- var _252 = (0, react_1.useState)({}), listReferencesDetails = _252[0], setListReferencesDetails = _252[1];
827
+ var _256 = (0, react_1.useState)({}), listReferencesDetails = _256[0], setListReferencesDetails = _256[1];
825
828
  // INFO: each record that could not be deleted, by the datasheet still
826
829
  // linking to it
827
- var _253 = (0, react_1.useState)([]), referenceDeleteTableData = _253[0], setReferenceDeleteTableData = _253[1];
830
+ var _257 = (0, react_1.useState)([]), referenceDeleteTableData = _257[0], setReferenceDeleteTableData = _257[1];
828
831
  // INFO: the records a delete left because they are still linked — what
829
832
  // "Delete anyway" deletes
830
833
  var blockedDeleteIdsRef = (0, react_1.useRef)([]);
831
834
  // INFO: "Delete anyway" is for a list's delete; a single record's delete
832
835
  // has its own steps around it
833
836
  var isBlockedFromListRef = (0, react_1.useRef)(false);
834
- var _254 = (0, react_1.useState)(false), isDeleteAnywayConfirm = _254[0], setIsDeleteAnywayConfirm = _254[1];
837
+ var _258 = (0, react_1.useState)(false), isDeleteAnywayConfirm = _258[0], setIsDeleteAnywayConfirm = _258[1];
835
838
  // INFO: a batched delete stops when the list goes away mid-run
836
839
  var isMountedRef = (0, react_1.useRef)(true);
837
840
  (0, react_1.useEffect)(function () {
@@ -851,25 +854,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
851
854
  }, [deleteModal]);
852
855
  // INFO: how far a batched delete has got, shown while it runs
853
856
  // INFO: deleted is only known where a pass checks links before deleting
854
- var _255 = (0, react_1.useState)(null), deleteProgress = _255[0], setDeleteProgress = _255[1];
855
- var _256 = (0, react_1.useState)([]), relatedSections = _256[0], setRelatedSections = _256[1];
856
- var _257 = (0, react_1.useState)({
857
+ var _259 = (0, react_1.useState)(null), deleteProgress = _259[0], setDeleteProgress = _259[1];
858
+ var _260 = (0, react_1.useState)([]), relatedSections = _260[0], setRelatedSections = _260[1];
859
+ var _261 = (0, react_1.useState)({
857
860
  id: "",
858
861
  name: "",
859
862
  type: "string",
860
- }), referenceCreationModal = _257[0], setReferenceCreationModal = _257[1];
861
- var _258 = (0, react_1.useState)({}), referenceModelSchema = _258[0], setReferenceSchema = _258[1];
862
- var _259 = (0, react_1.useState)([]), kanbanChecked = _259[0], setKanbanChecked = _259[1];
863
+ }), referenceCreationModal = _261[0], setReferenceCreationModal = _261[1];
864
+ var _262 = (0, react_1.useState)({}), referenceModelSchema = _262[0], setReferenceSchema = _262[1];
865
+ var _263 = (0, react_1.useState)([]), kanbanChecked = _263[0], setKanbanChecked = _263[1];
863
866
  //INFO : Offline
864
- var _260 = (0, react_1.useState)(0), offlineDataLength = _260[0], setOfflineDataLength = _260[1];
865
- var _261 = (0, react_1.useState)(false), offlineModal = _261[0], setOfflineModal = _261[1];
867
+ var _264 = (0, react_1.useState)(0), offlineDataLength = _264[0], setOfflineDataLength = _264[1];
868
+ var _265 = (0, react_1.useState)(false), offlineModal = _265[0], setOfflineModal = _265[1];
866
869
  // INFO: live-stream state — driven by socket connection and navigator.onLine
867
- var _262 = (0, react_1.useState)(false), isLive = _262[0], setIsLive = _262[1];
868
- var _263 = (0, react_1.useState)(false), isLiveOffline = _263[0], setIsLiveOffline = _263[1];
870
+ var _266 = (0, react_1.useState)(false), isLive = _266[0], setIsLive = _266[1];
871
+ var _267 = (0, react_1.useState)(false), isLiveOffline = _267[0], setIsLiveOffline = _267[1];
869
872
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
870
873
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
871
874
  // Independent of SSE status so it works even when bareSocketName is not set.
872
- var _264 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _264[0], setIsNetworkOffline = _264[1];
875
+ var _268 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _268[0], setIsNetworkOffline = _268[1];
873
876
  var previousType = (0, react_1.useRef)(null);
874
877
  var previousSelectedData = (0, react_1.useRef)(null);
875
878
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -1019,7 +1022,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1019
1022
  * viewId still wins when present: it is a deliberate destination, from a
1020
1023
  * shared link or a back button.
1021
1024
  */
1022
- var defaultTabName = (_18 = (_17 = (_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.extendedTabs) === null || _17 === void 0 ? void 0 : _17.find(function (eachTab) { return eachTab.defaultTab; })) === null || _18 === void 0 ? void 0 : _18.name;
1025
+ var defaultTabName = (_19 = (_18 = (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.extendedTabs) === null || _18 === void 0 ? void 0 : _18.find(function (eachTab) { return eachTab.defaultTab; })) === null || _19 === void 0 ? void 0 : _19.name;
1023
1026
  // INFO: the pinned tab is a LIST destination. Falling back to it while a
1024
1027
  // record is open resolved the read view to a list tab, which renderTabContent
1025
1028
  // refuses — so General Details rendered nothing. Only a list falls back.
@@ -1031,14 +1034,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1031
1034
  // INFO: Firestore reads and the monday wrapper join every condition with AND
1032
1035
  // (monday flattens all ORs into one), so a flex OR group is offered on Mongo only
1033
1036
  var isFlexOrSupported = !isFirebase && devSettings.server !== "mondayServer";
1034
- var isDateWarnings = !!((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.dateWarnings);
1035
- var isDatasheetDefaults = !!((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.datasheetDefaults);
1037
+ var isDateWarnings = !!((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.dateWarnings);
1038
+ var isDatasheetDefaults = !!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.datasheetDefaults);
1036
1039
  // INFO: the columns as the views draw them — with datasheet defaults every
1037
1040
  // list option without a colour takes the palette colour of its position
1038
1041
  var displayStructure = isDatasheetDefaults
1039
1042
  ? (0, defaultColours_1.handleApplyDefaultColours)(structure)
1040
1043
  : structure;
1041
- var dbModule = isFirebaseClient ? (_21 = props.lib) === null || _21 === void 0 ? void 0 : _21.firebase : (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.axios;
1044
+ var dbModule = isFirebaseClient ? (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.firebase : (_23 = props.lib) === null || _23 === void 0 ? void 0 : _23.axios;
1042
1045
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
1043
1046
  var selectedRelated = resolvedType === "read"
1044
1047
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -1242,38 +1245,38 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1242
1245
  }, [
1243
1246
  resolvedType,
1244
1247
  props.id,
1245
- (_23 = props.space) === null || _23 === void 0 ? void 0 : _23._id,
1248
+ (_24 = props.space) === null || _24 === void 0 ? void 0 : _24._id,
1246
1249
  props.devSettings.schemaEndpoint,
1247
- (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.showRelatedTab,
1250
+ (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.showRelatedTab,
1248
1251
  ]);
1249
1252
  /* eslint-enable */
1250
1253
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
1251
1254
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
1252
- var isViewSettingsEnabled = ((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareViewSettings) || ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareNewDTW)
1255
+ var isViewSettingsEnabled = ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareViewSettings) || ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareNewDTW)
1253
1256
  ? true
1254
1257
  : false;
1255
1258
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
1256
1259
  // (shared by every user) — toggling writes to the model and calls back. Without it
1257
1260
  // the hide is this user's own and lives in userHiddenColumnIds.
1258
- var isSchemaHideMode = ((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.onChangeHide) ? true : false;
1261
+ var isSchemaHideMode = ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.onChangeHide) ? true : false;
1259
1262
  // INFO: rows per page is a view setting the user can change, so it starts from
1260
1263
  // the persisted value and falls back to the consumer's limit
1261
- var _265 = (0, react_1.useState)((_29 = (_28 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _28 !== void 0 ? _28 : props.limit) !== null && _29 !== void 0 ? _29 : 10), pageLimit = _265[0], setPageLimit = _265[1];
1264
+ var _269 = (0, react_1.useState)((_30 = (_29 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _29 !== void 0 ? _29 : props.limit) !== null && _30 !== void 0 ? _30 : 10), pageLimit = _269[0], setPageLimit = _269[1];
1262
1265
  var limit = pageLimit;
1263
- var isSavedViewsEnabled = !!((_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.savedViews) && resolvedType === "list";
1266
+ var isSavedViewsEnabled = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.savedViews) && resolvedType === "list";
1264
1267
  // INFO: a calendar and a chart draw their own way, so columns, sort and
1265
1268
  // group have nothing to change there
1266
1269
  var isViewSettingsHiddenForTab = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "calendar" || (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "chart";
1267
1270
  // INFO: Group shapes a table, list or grid into sections, a map into routes
1268
1271
  // and a timeline into colours
1269
- var isGroupPickerShown = !!((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.showGroupByFeature) && !isViewSettingsHiddenForTab;
1272
+ var isGroupPickerShown = !!((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.showGroupByFeature) && !isViewSettingsHiddenForTab;
1270
1273
  // INFO: an app that stores views takes over from this browser's storage, so
1271
1274
  // every view is the team's and nothing is kept locally
1272
- var isAppViews = ((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.sharedViews) !== undefined ||
1273
- !!((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.onChangeSharedViews);
1275
+ var isAppViews = ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.sharedViews) !== undefined ||
1276
+ !!((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.onChangeSharedViews);
1274
1277
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
1275
1278
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
1276
- var activeSortId = (isInternalSort && persistedSort) || ((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.sort);
1279
+ var activeSortId = (isInternalSort && persistedSort) || ((_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.sort);
1277
1280
  var handleSortColumn = function (value) {
1278
1281
  var _a, _b, _c, _d;
1279
1282
  if (isInternalSort)
@@ -1303,7 +1306,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1303
1306
  // INFO: Firebase pages by document cursor and a union by skip, so neither
1304
1307
  // can hand over the whole set — there formula columns are not offered for
1305
1308
  // sorting or filtering, rather than ordering one page
1306
- var isFormulaViewSupported = !isFirebase && !((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.unionCollections) === null || _36 === void 0 ? void 0 : _36.length);
1309
+ var isFormulaViewSupported = !isFirebase && !((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.unionCollections) === null || _37 === void 0 ? void 0 : _37.length);
1307
1310
  var formulaSort = isFormulaViewSupported &&
1308
1311
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
1309
1312
  formulaColumnIds.includes(activeSortId.sortId)
@@ -1314,12 +1317,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1314
1317
  // a union read runs them
1315
1318
  // INFO: a people filter's "me" needs only who is signed in, which any
1316
1319
  // backend can match
1317
- var currentUserId = (_37 = props.devSettings.currentUser) === null || _37 === void 0 ? void 0 : _37.userId;
1318
- var flexFilterExtras = !isFirebase && !((_39 = (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.unionCollections) === null || _39 === void 0 ? void 0 : _39.length)
1320
+ var currentUserId = (_38 = props.devSettings.currentUser) === null || _38 === void 0 ? void 0 : _38.userId;
1321
+ var flexFilterExtras = !isFirebase && !((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.unionCollections) === null || _40 === void 0 ? void 0 : _40.length)
1319
1322
  ? {
1320
- references: (_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareFlexFilterReferences,
1321
- listObjects: (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareFlexFilterListObjects,
1322
- related: (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareFlexFilterRelated,
1323
+ references: (_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareFlexFilterReferences,
1324
+ listObjects: (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareFlexFilterListObjects,
1325
+ related: (_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareFlexFilterRelated,
1323
1326
  currentUserId: currentUserId,
1324
1327
  }
1325
1328
  : isFirebase
@@ -1462,18 +1465,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1462
1465
  var handleGetSelectAllText = function () {
1463
1466
  return "".concat(size.toLocaleString(), " records ").concat(handleCheckReaderFiltered() ? "matching your filters" : "in this list");
1464
1467
  };
1465
- var _266 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _266.canUpdateRecord, canInlineUpdate = _266.canInlineUpdate, canBatchUpdate = _266.canBatchUpdate, canDeleteRecord = _266.canDeleteRecord;
1466
- var isEditor = ((_43 = props.edit) === null || _43 === void 0 ? void 0 : _43.allEditable) ? true : false;
1467
- var isOffline = (_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareOffline;
1468
+ var _270 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _270.canUpdateRecord, canInlineUpdate = _270.canInlineUpdate, canBatchUpdate = _270.canBatchUpdate, canDeleteRecord = _270.canDeleteRecord;
1469
+ var isEditor = ((_44 = props.edit) === null || _44 === void 0 ? void 0 : _44.allEditable) ? true : false;
1470
+ var isOffline = (_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareOffline;
1468
1471
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
1469
1472
  // the live network state — online saves go to the server even if bareOffline
1470
1473
  // is true, offline saves go to IDB as normal.
1471
- var isOfflineNetworkListener = isOffline && ((_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareOfflineNetworkListener);
1472
- var showId = (_46 = props.space) === null || _46 === void 0 ? void 0 : _46.showId;
1474
+ var isOfflineNetworkListener = isOffline && ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareOfflineNetworkListener);
1475
+ var showId = (_47 = props.space) === null || _47 === void 0 ? void 0 : _47.showId;
1473
1476
  var remainId = showId || selectedObjectStructureId ? true : false;
1474
- var idField = ((_47 = props.space) === null || _47 === void 0 ? void 0 : _47.idField) || ((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.idField);
1475
- var pipeline = (_49 = props === null || props === void 0 ? void 0 : props.space) === null || _49 === void 0 ? void 0 : _49.pipeline;
1476
- if ((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareListPipeline) {
1477
+ var idField = ((_48 = props.space) === null || _48 === void 0 ? void 0 : _48.idField) || ((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.idField);
1478
+ var pipeline = (_50 = props === null || props === void 0 ? void 0 : props.space) === null || _50 === void 0 ? void 0 : _50.pipeline;
1479
+ if ((_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareListPipeline) {
1477
1480
  pipeline = pipeline
1478
1481
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
1479
1482
  }
@@ -1486,64 +1489,57 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1486
1489
  * three records came back instead of five files, and each tile received the
1487
1490
  * whole array rather than one file, so every one of them read "Attachment".
1488
1491
  */
1489
- var fileViewColumnId = (_54 = (_53 = ((_52 = (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.extendedTabs) !== null && _52 !== void 0 ? _52 : []).find(function (eachTab) {
1492
+ var fileViewColumnId = (_55 = (_54 = ((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.extendedTabs) !== null && _53 !== void 0 ? _53 : []).find(function (eachTab) {
1490
1493
  return eachTab.viewType === "file" &&
1491
1494
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
1492
- })) === null || _53 === void 0 ? void 0 : _53.fileSettings) === null || _54 === void 0 ? void 0 : _54.columnId;
1495
+ })) === null || _54 === void 0 ? void 0 : _54.fileSettings) === null || _55 === void 0 ? void 0 : _55.columnId;
1493
1496
  // INFO: select-all promises "all N records", so it is offered only where N
1494
1497
  // is the total a delete reads — not on Firebase (N is the rows loaded so
1495
1498
  // far), a union of datasheets (N counts the others too), a file view (N
1496
1499
  // counts files, not records) or offline
1497
1500
  var isSelectAllUncountable = isFirebase ||
1498
- !!((_56 = (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.unionCollections) === null || _56 === void 0 ? void 0 : _56.length) ||
1501
+ !!((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.unionCollections) === null || _57 === void 0 ? void 0 : _57.length) ||
1499
1502
  !!fileViewColumnId ||
1500
- !!((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareOffline);
1501
- var hasNavigation = ((_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.handleNavigate) ? true : false;
1503
+ !!((_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareOffline);
1504
+ var hasNavigation = ((_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.handleNavigate) ? true : false;
1502
1505
  var formColumn = "grid-cols-12";
1503
- var useMobileView = (_60 = (_59 = props.bareSettings) === null || _59 === void 0 ? void 0 : _59.bareUpdateMobileView) !== null && _60 !== void 0 ? _60 : false;
1506
+ var useMobileView = (_61 = (_60 = props.bareSettings) === null || _60 === void 0 ? void 0 : _60.bareUpdateMobileView) !== null && _61 !== void 0 ? _61 : false;
1504
1507
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
1505
- var isActivityLog = (((_62 = (_61 = props.edit) === null || _61 === void 0 ? void 0 : _61.activityLog) === null || _62 === void 0 ? void 0 : _62.enableComments) &&
1506
- ((_63 = props.edit) === null || _63 === void 0 ? void 0 : _63.activityLog.commentCollectionId)) ||
1507
- (((_65 = (_64 = props.edit) === null || _64 === void 0 ? void 0 : _64.activityLog) === null || _65 === void 0 ? void 0 : _65.enableLogs) &&
1508
- ((_66 = props.edit) === null || _66 === void 0 ? void 0 : _66.activityLog.logsCollectionId));
1509
- // INFO: a record's comments and logs shown in place of the record rather than
1510
- // in a drawer of their own — a related tab already sits inside the read
1511
- // drawer, and a second drawer over it hid the row being discussed. It opens
1512
- // the row through handleNavigate, so without one it stays off and the
1513
- // drawer is used, rather than leaving a comment button that does nothing
1514
- var isInlineActivity = !!isActivityLog &&
1515
- !!((_67 = props.bareSettings) === null || _67 === void 0 ? void 0 : _67.bareInlineActivity) &&
1516
- hasNavigation;
1517
- // INFO: each row button opens what it shows: the comment button the row's
1518
- // comments and logs alone, the eye (or the row) its details alone, so
1519
- // neither has to be scrolled past to reach the other
1520
- var _267 = (0, react_1.useState)(false), inlineActivityOnly = _267[0], setInlineActivityOnly = _267[1];
1521
- var isActivityOnly = isInlineActivity && inlineActivityOnly;
1522
- // INFO: the row whose comments were shown; going back to the list asks its
1523
- // comment count again, as the drawer does when it closes
1524
- var inlineActivityIdRef = (0, react_1.useRef)("");
1525
- // INFO: the flag is cleared only on the way back from a row, not while the
1526
- // list is still on screen — a host may open the row a render after the click
1527
- var lastInlineTypeRef = (0, react_1.useRef)(resolvedType);
1508
+ var isActivityLog = (((_63 = (_62 = props.edit) === null || _62 === void 0 ? void 0 : _62.activityLog) === null || _63 === void 0 ? void 0 : _63.enableComments) &&
1509
+ ((_64 = props.edit) === null || _64 === void 0 ? void 0 : _64.activityLog.commentCollectionId)) ||
1510
+ (((_66 = (_65 = props.edit) === null || _65 === void 0 ? void 0 : _65.activityLog) === null || _66 === void 0 ? void 0 : _66.enableLogs) &&
1511
+ ((_67 = props.edit) === null || _67 === void 0 ? void 0 : _67.activityLog.logsCollectionId));
1512
+ // INFO: where a record opens in a drawer — the read drawer, or in place
1513
+ // inside one (a related tab's row, or the record the read drawer nests,
1514
+ // both marked bareInlineActivity) — its comments and logs are the read
1515
+ // view's Activity tab, so the record, its Update button and its activity
1516
+ // share that one drawer. Elsewhere the read view is a page and stays as it
1517
+ // was: no Activity tab, and a Log button opening the activity drawer.
1518
+ var hasReadDrawer = !!((_68 = props.viewSettings) === null || _68 === void 0 ? void 0 : _68.readDrawer) ||
1519
+ !!((_69 = props.bareSettings) === null || _69 === void 0 ? void 0 : _69.bareInlineActivity);
1520
+ var hasActivityTab = !!isActivityLog && hasReadDrawer;
1521
+ var isActivityTab = hasActivityTab &&
1522
+ props.type === "read" &&
1523
+ ((_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.viewId) === readViewIds_1.ACTIVITY_VIEW_ID;
1524
+ // INFO: the record whose activity tab was shown; going back to the list asks
1525
+ // its comment count again, as the activity drawer does when it closes. Keyed
1526
+ // on props.type, not resolvedType — a list hosting the read drawer stays a
1527
+ // list while the record is open in it.
1528
+ var activityTabIdRef = (0, react_1.useRef)("");
1528
1529
  (0, react_1.useEffect)(function () {
1529
- var previousType = lastInlineTypeRef.current;
1530
- lastInlineTypeRef.current = resolvedType;
1531
- if (!isInlineActivity)
1530
+ if (!hasActivityTab)
1532
1531
  return;
1533
- if (resolvedType === "read" && props.id) {
1534
- if (inlineActivityOnly)
1535
- inlineActivityIdRef.current = props.id;
1532
+ if (props.type === "read") {
1533
+ if (isActivityTab && props.id)
1534
+ activityTabIdRef.current = props.id;
1536
1535
  return;
1537
1536
  }
1538
- if (resolvedType !== "list" || previousType !== "read")
1539
- return;
1540
- setInlineActivityOnly(false);
1541
- var shownId = inlineActivityIdRef.current;
1542
- inlineActivityIdRef.current = "";
1537
+ var shownId = activityTabIdRef.current;
1538
+ activityTabIdRef.current = "";
1543
1539
  if (shownId)
1544
1540
  handleRecountClosedRow(shownId);
1545
1541
  /* eslint-disable */
1546
- }, [resolvedType, props.id, isInlineActivity]);
1542
+ }, [props.type, props.id, isActivityTab]);
1547
1543
  /* eslint-enable */
1548
1544
  var renderActivityPanel = function (dataId) {
1549
1545
  var _a, _b, _c, _d;
@@ -1556,12 +1552,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1556
1552
  // column
1557
1553
  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 }));
1558
1554
  };
1559
- var customPaginationSize = ((_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.customPaginationCount)
1555
+ var customPaginationSize = ((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.customPaginationCount)
1560
1556
  ? props.organise.customPaginationCount(size)
1561
1557
  : undefined;
1562
1558
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1563
1559
  var writeServerQuery = new writeQuery_1.WriteQuery({
1564
- dbModule: (_69 = props.lib) === null || _69 === void 0 ? void 0 : _69.axios,
1560
+ dbModule: (_72 = props.lib) === null || _72 === void 0 ? void 0 : _72.axios,
1565
1561
  dbType: devSettings.server,
1566
1562
  dbCollection: props.collectionId,
1567
1563
  dbEndpoint: devSettings.dbEndpoint,
@@ -1569,7 +1565,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1569
1565
  dbUserToken: devSettings.dbUserToken,
1570
1566
  });
1571
1567
  var readServerQuery = new readQuery_1.ReadQuery({
1572
- dbModule: (_70 = props.lib) === null || _70 === void 0 ? void 0 : _70.axios,
1568
+ dbModule: (_73 = props.lib) === null || _73 === void 0 ? void 0 : _73.axios,
1573
1569
  dbType: devSettings.server,
1574
1570
  dbCollection: props.collectionId,
1575
1571
  dbEndpoint: devSettings.dbEndpoint,
@@ -1577,12 +1573,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1577
1573
  dbUserToken: devSettings.dbUserToken,
1578
1574
  });
1579
1575
  var moreButtonPopUp = [
1580
- ((_71 = props.edit) === null || _71 === void 0 ? void 0 : _71.allEditable) &&
1576
+ ((_74 = props.edit) === null || _74 === void 0 ? void 0 : _74.allEditable) &&
1581
1577
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1582
1578
  // datasheet served through one can import; only the browser-direct
1583
1579
  // Firebase client has no server to import through
1584
1580
  !isFirebaseClient &&
1585
- !((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideImportCSV)
1581
+ !((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideImportCSV)
1586
1582
  ? {
1587
1583
  text: "Import Excel",
1588
1584
  onClick: function () {
@@ -1591,7 +1587,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1591
1587
  },
1592
1588
  }
1593
1589
  : null,
1594
- !((_75 = (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.exportSettings) === null || _75 === void 0 ? void 0 : _75.hideExportCSV)
1590
+ !((_78 = (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.exportSettings) === null || _78 === void 0 ? void 0 : _78.hideExportCSV)
1595
1591
  ? {
1596
1592
  text: "Export CSV",
1597
1593
  onClick: function () {
@@ -1601,7 +1597,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1601
1597
  },
1602
1598
  }
1603
1599
  : null,
1604
- !((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportExcel)
1600
+ !((_80 = (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.exportSettings) === null || _80 === void 0 ? void 0 : _80.hideExportExcel)
1605
1601
  ? {
1606
1602
  text: "Export Excel",
1607
1603
  onClick: function () {
@@ -1611,7 +1607,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1611
1607
  },
1612
1608
  }
1613
1609
  : null,
1614
- !((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.exportSettings) === null || _79 === void 0 ? void 0 : _79.hideExportPDF)
1610
+ !((_82 = (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.exportSettings) === null || _82 === void 0 ? void 0 : _82.hideExportPDF)
1615
1611
  ? {
1616
1612
  text: "Export PDF",
1617
1613
  onClick: function () {
@@ -1621,7 +1617,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1621
1617
  },
1622
1618
  }
1623
1619
  : null,
1624
- !((_81 = (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.exportSettings) === null || _81 === void 0 ? void 0 : _81.hideExportQR)
1620
+ !((_84 = (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.exportSettings) === null || _84 === void 0 ? void 0 : _84.hideExportQR)
1625
1621
  ? {
1626
1622
  text: "Export QR",
1627
1623
  onClick: function () {
@@ -1631,7 +1627,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1631
1627
  },
1632
1628
  }
1633
1629
  : null,
1634
- !((_83 = (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.exportSettings) === null || _83 === void 0 ? void 0 : _83.hideExportQR)
1630
+ !((_86 = (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.exportSettings) === null || _86 === void 0 ? void 0 : _86.hideExportQR)
1635
1631
  ? {
1636
1632
  text: "Export QR(Data)",
1637
1633
  onClick: function () {
@@ -1641,7 +1637,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1641
1637
  },
1642
1638
  }
1643
1639
  : null,
1644
- !((_85 = (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.exportSettings) === null || _85 === void 0 ? void 0 : _85.hideExportPrint)
1640
+ !((_88 = (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.exportSettings) === null || _88 === void 0 ? void 0 : _88.hideExportPrint)
1645
1641
  ? {
1646
1642
  text: "Print",
1647
1643
  onClick: function () {
@@ -1653,8 +1649,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1653
1649
  : null,
1654
1650
  // INFO: drafts only exist where the form can save one, so the filter has
1655
1651
  // nothing to find on any other page
1656
- ((_86 = props.edit) === null || _86 === void 0 ? void 0 : _86.enableUpdateDraft) &&
1657
- !((_88 = (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.exportSettings) === null || _88 === void 0 ? void 0 : _88.hideExportDraft)
1652
+ ((_89 = props.edit) === null || _89 === void 0 ? void 0 : _89.enableUpdateDraft) &&
1653
+ !((_91 = (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.exportSettings) === null || _91 === void 0 ? void 0 : _91.hideExportDraft)
1658
1654
  ? {
1659
1655
  text: filterDraft ? "Show All Items" : "Filter Draft",
1660
1656
  onClick: function () {
@@ -1663,7 +1659,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1663
1659
  }
1664
1660
  : null,
1665
1661
  ].filter(Boolean);
1666
- if ((_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.moreSettings)
1662
+ if ((_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.moreSettings)
1667
1663
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1668
1664
  //=====================================================================================
1669
1665
  //SECTION: User Column Visibility Handlers
@@ -2102,14 +2098,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2102
2098
  //=====================================================================================
2103
2099
  //SECTION: Saved Views
2104
2100
  //=====================================================================================
2105
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.persistKey, (_91 = devSettings.currentUser) === null || _91 === void 0 ? void 0 : _91.userEmail);
2101
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.persistKey, (_94 = devSettings.currentUser) === null || _94 === void 0 ? void 0 : _94.userEmail);
2106
2102
  (0, react_1.useEffect)(function () {
2107
2103
  if (isSavedViewsEnabled && !isAppViews)
2108
2104
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
2109
2105
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
2110
2106
  // INFO: the app keeps All's settings, so every change is kept in this
2111
2107
  // browser until the person updates the view for everyone or resets it
2112
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.allView) !== undefined;
2108
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.allView) !== undefined;
2113
2109
  var handleGetViewDraftKey = function (viewId) {
2114
2110
  var _a, _b;
2115
2111
  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);
@@ -2238,7 +2234,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2238
2234
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
2239
2235
  (0, react_1.useEffect)(function () {
2240
2236
  lastSentSharedViewsRef.current = null;
2241
- }, [(_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.sharedViews]);
2237
+ }, [(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.sharedViews]);
2242
2238
  var handleStoreSharedViews = function (update) {
2243
2239
  var _a, _b, _c;
2244
2240
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -2255,7 +2251,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2255
2251
  var openingViewSettledRef = (0, react_1.useRef)(false);
2256
2252
  // INFO: keyed on the ids, so a list handed in again on every render does
2257
2253
  // not re-run the opening
2258
- var starredViewIdsKey = ((_95 = (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.defaultSavedViewIds) !== null && _95 !== void 0 ? _95 : []).join("|");
2254
+ var starredViewIdsKey = ((_98 = (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.defaultSavedViewIds) !== null && _98 !== void 0 ? _98 : []).join("|");
2259
2255
  (0, react_1.useEffect)(function () {
2260
2256
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2261
2257
  if (!isSavedViewsEnabled || openingViewSettledRef.current)
@@ -2299,13 +2295,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2299
2295
  /* eslint-disable */
2300
2296
  }, [
2301
2297
  isSavedViewsEnabled,
2302
- (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.initialSavedViewId,
2298
+ (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.initialSavedViewId,
2303
2299
  starredViewIdsKey,
2304
- (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.sharedViews,
2300
+ (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.sharedViews,
2305
2301
  savedViews,
2306
2302
  ]);
2307
2303
  /* eslint-enable */
2308
- var appDefaultViewIds = ((_99 = (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.defaultSavedViews) !== null && _99 !== void 0 ? _99 : [])
2304
+ var appDefaultViewIds = ((_102 = (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.defaultSavedViews) !== null && _102 !== void 0 ? _102 : [])
2309
2305
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
2310
2306
  .join("|");
2311
2307
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -2734,8 +2730,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2734
2730
  laneWidths,
2735
2731
  drawerWidth,
2736
2732
  pinnedColumnIds,
2737
- (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.allView,
2738
- (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.sharedViews,
2733
+ (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.allView,
2734
+ (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.sharedViews,
2739
2735
  savedViews,
2740
2736
  ]);
2741
2737
  /* eslint-enable */
@@ -2779,7 +2775,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2779
2775
  if (scrollRestoredRef.current)
2780
2776
  scrollCatchUpRef.current = null;
2781
2777
  /* eslint-disable */
2782
- }, [props.collectionId, (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.persistKey]);
2778
+ }, [props.collectionId, (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.persistKey]);
2783
2779
  /* eslint-enable */
2784
2780
  // INFO: wait a frame — rows land in state one tick before layout
2785
2781
  (0, react_1.useEffect)(function () {
@@ -2814,7 +2810,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2814
2810
  (0, react_1.useEffect)(function () {
2815
2811
  handleOfflinePrefetch();
2816
2812
  /* eslint-disable */
2817
- }, [props.collectionId, (_103 = props.bareSettings) === null || _103 === void 0 ? void 0 : _103.bareOffline]);
2813
+ }, [props.collectionId, (_106 = props.bareSettings) === null || _106 === void 0 ? void 0 : _106.bareOffline]);
2818
2814
  /* eslint-enable */
2819
2815
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2820
2816
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2834,7 +2830,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2834
2830
  }, interval);
2835
2831
  return function () { return clearInterval(timer); };
2836
2832
  /* eslint-disable */
2837
- }, [(_104 = props.bareSettings) === null || _104 === void 0 ? void 0 : _104.barePollingInterval, isLive, isNetworkOffline]);
2833
+ }, [(_107 = props.bareSettings) === null || _107 === void 0 ? void 0 : _107.barePollingInterval, isLive, isNetworkOffline]);
2838
2834
  /* eslint-enable */
2839
2835
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2840
2836
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2876,7 +2872,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2876
2872
  };
2877
2873
  /* eslint-disable */
2878
2874
  }, [
2879
- (_105 = props.bareSettings) === null || _105 === void 0 ? void 0 : _105.bareSocketName,
2875
+ (_108 = props.bareSettings) === null || _108 === void 0 ? void 0 : _108.bareSocketName,
2880
2876
  props.collectionId,
2881
2877
  props.devSettings.sseEndpoint,
2882
2878
  props.devSettings.dbAPIToken,
@@ -3153,10 +3149,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
3153
3149
  props.collectionId,
3154
3150
  props.model,
3155
3151
  props.localURLEndpoint,
3156
- (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.extendedTabs,
3152
+ (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.extendedTabs,
3157
3153
  listViewId,
3158
- (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.additionalQuery,
3159
- (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.groupBy,
3154
+ (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.additionalQuery,
3155
+ (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.groupBy,
3160
3156
  resolvedType,
3161
3157
  ]);
3162
3158
  /**
@@ -3308,7 +3304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
3308
3304
  };
3309
3305
  }, 100);
3310
3306
  return function () { return clearTimeout(timeoutId); };
3311
- }, [(_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.showReadFloatingNav, resolvedType, props.id, loading]);
3307
+ }, [(_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.showReadFloatingNav, resolvedType, props.id, loading]);
3312
3308
  (0, react_1.useEffect)(function () {
3313
3309
  if (resolvedType !== "read")
3314
3310
  return;
@@ -5394,7 +5390,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5394
5390
  // the link view ends and the list opens as it normally would. A change
5395
5391
  // while a record is open (opening one drops the link from the URL) waits
5396
5392
  // until the list shows again
5397
- var lastInitialSearchRef = (0, react_1.useRef)((_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.initialSearch);
5393
+ var lastInitialSearchRef = (0, react_1.useRef)((_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.initialSearch);
5398
5394
  // INFO: persistViewState reads its stored state only once the link view
5399
5395
  // has ended, a render later
5400
5396
  var isNormalOpenPendingRef = (0, react_1.useRef)(false);
@@ -5421,7 +5417,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5421
5417
  setIsLinkOpen(true);
5422
5418
  handleApplySavedView(null, true, value);
5423
5419
  /* eslint-disable */
5424
- }, [(_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.initialSearch, resolvedType]);
5420
+ }, [(_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.initialSearch, resolvedType]);
5425
5421
  (0, react_1.useEffect)(function () {
5426
5422
  if (!isNormalOpenPendingRef.current || isLinkOpen)
5427
5423
  return;
@@ -7665,7 +7661,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
7665
7661
  var columnTypeActions = {
7666
7662
  canUpdate: canUpdateRecord,
7667
7663
  dateWarnings: isDateWarnings,
7668
- onButtonClick: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.onButtonClick,
7664
+ onButtonClick: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.onButtonClick,
7669
7665
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
7670
7666
  var _a;
7671
7667
  return __generator(this, function (_b) {
@@ -7682,7 +7678,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
7682
7678
  }
7683
7679
  });
7684
7680
  }); },
7685
- onTimeTrackingAction: ((_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.onTimeTrackingAction) && canUpdateRecord
7681
+ onTimeTrackingAction: ((_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.onTimeTrackingAction) && canUpdateRecord
7686
7682
  ? function (rowId, columnId, action) {
7687
7683
  return handleTimeTrackingAction(rowId, columnId, action);
7688
7684
  }
@@ -9947,14 +9943,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9947
9943
  : rows;
9948
9944
  };
9949
9945
  /* eslint-disable */
9950
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_114 = props.bareSettings) === null || _114 === void 0 ? void 0 : _114.bareNewDTW]);
9951
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_115 = props.bareSettings) === null || _115 === void 0 ? void 0 : _115.bareNewDTW]);
9946
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_117 = props.bareSettings) === null || _117 === void 0 ? void 0 : _117.bareNewDTW]);
9947
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_118 = props.bareSettings) === null || _118 === void 0 ? void 0 : _118.bareNewDTW]);
9952
9948
  /* eslint-enable */
9953
- // INFO: beside a record's title, the pencil opens its edit form for whoever
9954
- // may update, and the bubble opens comments and logs for anyone who can see
9955
- // it. The table adds a chevron that opens the read view: an editable title
9956
- // cell is hard to click open, so the chevron is the sure way in. Cards open
9957
- // their record from the card, so they carry no chevron.
9949
+ // INFO: a row's buttons beside its title, decided by where its record opens.
9950
+ // - With the read drawer, the record, its Update button and its Activity tab
9951
+ // share that one drawer, so a row with activity carries only the comment
9952
+ // bubble, opening the drawer on its Activity tab.
9953
+ // - Without it, the read view is a page (the built-in one or the host's own
9954
+ // path through handleNavigate), so the bubble opens the activity drawer
9955
+ // over the table for a quick look, and the pencil goes to the read view.
9956
+ // The pencil opens the READ view, not the edit form — the read view holds
9957
+ // Update for whoever may update — so it is shown to anyone who can see the
9958
+ // record. A table needs it even though a read-only cell opens the record,
9959
+ // since an editable title cell turns into an input when clicked. Cards open
9960
+ // their record from the card and carry the bubble alone.
9958
9961
  var handleOpenRecordEdit = function (id) {
9959
9962
  var _a, _b;
9960
9963
  handleCaptureListScroll(id);
@@ -9965,10 +9968,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9965
9968
  handleCaptureListScroll(id);
9966
9969
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9967
9970
  };
9968
- // INFO: with the activity shown in place, a row's comment button opens that
9969
- // row's comments and logs where the list was, rather than stacking a second
9970
- // drawer
9971
9971
  var handleOpenRecordActivity = function (id) {
9972
+ var _a, _b;
9972
9973
  // INFO: the panel records each comment as seen while it is on screen, and
9973
9974
  // the count asked when it closes may run before those views are saved, so
9974
9975
  // the bubble greys as it opens
@@ -9976,21 +9977,37 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9976
9977
  var _a;
9977
9978
  return previous[id] ? __assign(__assign({}, previous), (_a = {}, _a[id] = false, _a)) : previous;
9978
9979
  });
9979
- if (isInlineActivity) {
9980
- setInlineActivityOnly(true);
9981
- handleOpenRecordRead(id);
9980
+ if (hasNavigation && hasReadDrawer) {
9981
+ handleCaptureListScroll(id);
9982
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, readViewIds_1.ACTIVITY_VIEW_ID);
9982
9983
  return;
9983
9984
  }
9985
+ // INFO: without the read drawer the table stays on screen beside the log
9984
9986
  setActivityId(id);
9985
9987
  setActivityModal(true);
9986
9988
  };
9989
+ // INFO: the activity drawer is mounted only where something opens it: the
9990
+ // Log button on a read page, the row bubble when it does not open the
9991
+ // record, or the collection-wide clock on a list. A related tab's list and
9992
+ // the record the read drawer nests have none of these, so they mount none
9993
+ var canOpenActivityDrawer = !!isActivityLog &&
9994
+ (!hasActivityTab ||
9995
+ !hasNavigation ||
9996
+ (resolvedType === "list" &&
9997
+ !((_119 = props.bareSettings) === null || _119 === void 0 ? void 0 : _119.bareHideCollectionActivity)));
9998
+ // INFO: in a drawer the bubble opens the record with its details as well
9999
+ var recordActivityLabel = hasNavigation && hasReadDrawer ? "Open activity and details" : undefined;
10000
+ // INFO: kept for the map's info window, which has no read view to defer to
9987
10001
  var recordEditAction = canUpdateRecord ? handleOpenRecordEdit : undefined;
9988
- // INFO: the chevron only navigates through handleNavigate, so a host that
9989
- // routes by url gets none rather than a button that does nothing
9990
- var recordOpenAction = hasNavigation ? handleOpenRecordRead : undefined;
9991
10002
  var recordActivityAction = isActivityLog
9992
10003
  ? handleOpenRecordActivity
9993
10004
  : undefined;
10005
+ // INFO: the pencil only navigates through handleNavigate, so a host that
10006
+ // routes by url gets none rather than a button that does nothing. With the
10007
+ // read drawer and activity, the bubble opens the record instead.
10008
+ var recordReadAction = hasNavigation && !(hasReadDrawer && recordActivityAction)
10009
+ ? handleOpenRecordRead
10010
+ : undefined;
9994
10011
  // INFO: isNewTable — the new table opens a record from its title, edits in
9995
10012
  // the cell and carries the comment bubble beside the title, so its rows
9996
10013
  // drop the pencil and bubble column and keep only the host's own actions
@@ -10489,9 +10506,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10489
10506
  var showUpdate = !bareActionComponent && canUpdateRecord;
10490
10507
  var showExport = !!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF);
10491
10508
  var showDelete = canDeleteRecord && props.id !== "new";
10492
- // INFO: with the activity shown in place there is no Log button, so a
10493
- // related row with nothing else to act on draws no bar at all
10494
- var showLog = !!isActivityLog && !isInlineActivity;
10509
+ // INFO: in a drawer the record's comments and logs are its Activity tab,
10510
+ // so there is no Log button and a related row with nothing else to act on
10511
+ // draws no bar at all. On a page the Log button opens the activity drawer
10512
+ var showLog = !!isActivityLog && !hasActivityTab;
10495
10513
  if (!hasCustomActions &&
10496
10514
  !showUpdate &&
10497
10515
  !showExport &&
@@ -10776,7 +10794,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10776
10794
  bareCompactMode: !isForm }, props.bareSettings), {
10777
10795
  // INFO: the nested instance draws the form rather than hosting
10778
10796
  // another panel
10779
- bareFormDrawer: false }), (isDrawerHost
10797
+ bareFormDrawer: false,
10798
+ // INFO: marks the record as opened in a drawer, so it carries
10799
+ // its Activity tab instead of a Log button opening a second one
10800
+ bareInlineActivity: true }), (isDrawerHost
10780
10801
  ? {}
10781
10802
  : {
10782
10803
  barePollingInterval: undefined,
@@ -10790,7 +10811,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10790
10811
  handleNavigateFromDrawer("list", "");
10791
10812
  } }))); } })); };
10792
10813
  var renderContent = function () {
10793
- 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;
10814
+ 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;
10794
10815
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
10795
10816
  var tabs = renderTabs();
10796
10817
  var pages = [
@@ -10830,25 +10851,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10830
10851
  props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_h = props.organise) === null || _h === void 0 ? void 0 : _h.darkMode) ? "text-white" : "") }, props.title)),
10831
10852
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
10832
10853
  renderActionButtons(resolvedType))),
10833
- (schemaPresent ||
10834
- ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareReadListTabs) ||
10835
- relatedSections.length > 0) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode })),
10836
- ((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentPos) === "top" &&
10854
+ !((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareHideReadTabs) &&
10855
+ (schemaPresent ||
10856
+ ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadListTabs) ||
10857
+ relatedSections.length > 0 ||
10858
+ hasActivityTab) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode })),
10859
+ ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) === "top" &&
10837
10860
  renderBareReadComp(),
10838
- ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateActionTop) &&
10861
+ ((_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateActionTop) &&
10839
10862
  !selectedRelated &&
10840
- !isActivityOnly &&
10863
+ !isActivityTab &&
10841
10864
  renderReadBar(),
10842
10865
  (anyAuthMethod ||
10843
- (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" },
10866
+ (authLoading && ((_p = props.space) === null || _p === void 0 ? void 0 : _p.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" },
10844
10867
  react_1.default.createElement(loading_1.Loading, { sizeClassName: "h-6 w-6" }))) : (renderAuthContent()))),
10845
- 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 },
10846
- 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)))),
10847
- ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareReadComponentPos) !== "top" &&
10868
+ isActivityTab ? (react_1.default.createElement("div", { "data-testid": "dt-activity-tab", className: "mt-4" }, renderActivityPanel((_q = props.id) !== null && _q !== void 0 ? _q : ""))) : (react_1.default.createElement("div", { ref: exportReadPDFRef },
10869
+ selectedRelated ? (react_1.default.createElement(relatedRecords_1.RelatedRecords, { key: "".concat(props.id, "-").concat(selectedRelated.id), source: selectedRelated.source, recordId: (_r = props.id) !== null && _r !== void 0 ? _r : "", renderList: renderRelatedList, hasActivity: !!isActivityLog, darkMode: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkMode })) : (!((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareReadComponentHide) && (react_1.default.createElement("div", null, renderTabContent(tabs, resolvedType, viewType)))),
10870
+ ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareReadComponentPos) !== "top" &&
10848
10871
  renderBareReadComp())),
10849
- !((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareUpdateActionTop) &&
10872
+ !((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareUpdateActionTop) &&
10850
10873
  !selectedRelated &&
10851
- !isActivityOnly &&
10874
+ !isActivityTab &&
10852
10875
  renderReadBar()))));
10853
10876
  case "update":
10854
10877
  if (props.id !== "new") {
@@ -10859,12 +10882,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10859
10882
  });
10860
10883
  }
10861
10884
  pages.push({
10862
- 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"),
10885
+ name: (_y = selectedData === null || selectedData === void 0 ? void 0 : selectedData[(_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.breadcrumbAttributeId) !== null && _x !== void 0 ? _x : serverId]) !== null && _y !== void 0 ? _y : (props.id ? props.id : "new"),
10863
10886
  href: "#",
10864
10887
  current: true,
10865
10888
  });
10866
10889
  var filterModel_1 = [];
10867
- var disabledOnEnter_1 = (_y = (_x = props.organise) === null || _x === void 0 ? void 0 : _x.disabledOnEnter) !== null && _y !== void 0 ? _y : false;
10890
+ var disabledOnEnter_1 = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.disabledOnEnter) !== null && _0 !== void 0 ? _0 : false;
10868
10891
  structure.map(function (eachModel) {
10869
10892
  var _a;
10870
10893
  var present = false;
@@ -10977,12 +11000,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10977
11000
  }
10978
11001
  }
10979
11002
  };
10980
- 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);
10981
- var leftTabAlign = ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.tabAlign) === "left" ||
10982
- ((_2 = props.space) === null || _2 === void 0 ? void 0 : _2.tabAlign) === "left";
10983
- 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";
10984
- var stepperTabAlign = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "stepper" ||
10985
- ((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.tabAlign) === "stepper";
11003
+ var hasTabAlign_1 = ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.tabAlign) || ((_2 = props.space) === null || _2 === void 0 ? void 0 : _2.tabAlign);
11004
+ var leftTabAlign = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.tabAlign) === "left" ||
11005
+ ((_4 = props.space) === null || _4 === void 0 ? void 0 : _4.tabAlign) === "left";
11006
+ var topTabAlign = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.tabAlign) === "top" || ((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.tabAlign) === "top";
11007
+ var stepperTabAlign = ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.tabAlign) === "stepper" ||
11008
+ ((_8 = props.space) === null || _8 === void 0 ? void 0 : _8.tabAlign) === "stepper";
10986
11009
  var uniqueTabIds_2 = Array.from(new Set(filterModel_1
10987
11010
  .map(function (item) { return item.tabId; })
10988
11011
  .filter(function (id) { return id !== undefined; })));
@@ -10991,7 +11014,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
10991
11014
  if (shouldIncludeOthers) {
10992
11015
  uniqueTabIds_2.push("");
10993
11016
  }
10994
- 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 : [];
11017
+ var customTabComponent_1 = (_11 = (_10 = (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateTabComponent) === null || _10 === void 0 ? void 0 : _10.call(_9, uniqueTabIds_2)) !== null && _11 !== void 0 ? _11 : [];
10995
11018
  var stepperSteps = uniqueTabIds_2.map(function (eachTabId) {
10996
11019
  var _a, _b;
10997
11020
  var customTabMatch = customTabComponent_1.find(function (eachTab) { return eachTab.tabId === eachTabId; });
@@ -11027,7 +11050,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11027
11050
  props.id && props.id !== "new" && structure.length >= 1 && (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: readQueryHocRef, database: {
11028
11051
  dbModule: dbModule,
11029
11052
  dbType: devSettings.server,
11030
- 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,
11053
+ dbCollection: (_13 = (_12 = props === null || props === void 0 ? void 0 : props.space) === null || _12 === void 0 ? void 0 : _12.pipelineDefaultSpaceId) !== null && _13 !== void 0 ? _13 : props.collectionId,
11031
11054
  dbEndpoint: devSettings.dbEndpoint,
11032
11055
  dbAPIToken: devSettings.dbAPIToken,
11033
11056
  dbUserToken: devSettings.dbUserToken,
@@ -11035,11 +11058,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11035
11058
  type: "get",
11036
11059
  id: props.id,
11037
11060
  pipeline: pipeline,
11038
- }, offline: ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
11061
+ }, offline: ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareOffline) && isNetworkOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
11039
11062
  renderBreadcrumb(pages),
11040
11063
  react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
11041
11064
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex flex-col w-full" },
11042
- 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)),
11065
+ props.title && (react_1.default.createElement("p", { className: "text-xl font-medium ".concat(((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.darkMode) ? "text-white" : "") }, props.title)),
11043
11066
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)))),
11044
11067
  (!isBottom || hasTabAlign_1 || resolvedType === "update") &&
11045
11068
  renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)),
@@ -11058,10 +11081,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11058
11081
  var tabId = uniqueTabIds_2[stepIndex];
11059
11082
  handleUpdateTabId(tabId);
11060
11083
  } })),
11061
- ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponentAbove) &&
11062
- ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent) &&
11063
- ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponent(selectedData, handleResolveRawData())),
11064
- ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateActionTop) &&
11084
+ ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponentAbove) &&
11085
+ ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent) &&
11086
+ ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent(selectedData, handleResolveRawData())),
11087
+ ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateActionTop) &&
11065
11088
  renderStepBar(uniqueTabIds_2),
11066
11089
  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 },
11067
11090
  uniqueTabIds_2.map(function (tabId) {
@@ -11083,8 +11106,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11083
11106
  ((_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])))),
11084
11107
  renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined)));
11085
11108
  }),
11086
- !((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
11087
- ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) && (
11109
+ !((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponentAbove) &&
11110
+ ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponent) && (
11088
11111
  // INFO: the form is a grid-cols-12. A child with no column span is one
11089
11112
  // column, and a grid item cannot shrink below its longest word, so on a
11090
11113
  // phone it wraps one word per line. `contents` takes this wrapper out of
@@ -11094,20 +11117,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11094
11117
  react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
11095
11118
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
11096
11119
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
11097
- !((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateActionTop) &&
11120
+ !((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateActionTop) &&
11098
11121
  renderStepBar(uniqueTabIds_2),
11099
11122
  isBottom &&
11100
11123
  resolvedType !== "update" &&
11101
11124
  renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
11102
- ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateComponentAbove) &&
11103
- ((_22 = props.bareSettings) === null || _22 === void 0 ? void 0 : _22.bareUpdateComponent) &&
11104
- ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateComponent(selectedData, handleResolveRawData())),
11105
- ((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateActionTop) &&
11125
+ ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareUpdateComponentAbove) &&
11126
+ ((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateComponent) &&
11127
+ ((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponent(selectedData, handleResolveRawData())),
11128
+ ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateActionTop) &&
11106
11129
  renderStepBar(uniqueTabIds_2),
11107
11130
  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 },
11108
11131
  renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
11109
- !((_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateComponentAbove) &&
11110
- ((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareUpdateComponent) && (
11132
+ !((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareUpdateComponentAbove) &&
11133
+ ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareUpdateComponent) && (
11111
11134
  // INFO: the form is a grid-cols-12. A child with no column span is one
11112
11135
  // column, and a grid item cannot shrink below its longest word, so on a
11113
11136
  // phone it wraps one word per line. `contents` takes this wrapper out of
@@ -11117,7 +11140,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11117
11140
  react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
11118
11141
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
11119
11142
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
11120
- !((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareUpdateActionTop) &&
11143
+ !((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareUpdateActionTop) &&
11121
11144
  renderStepBar(uniqueTabIds_2)))));
11122
11145
  case "list":
11123
11146
  case "union":
@@ -11128,27 +11151,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11128
11151
  // Counts query output so the badge matches what's actually filtered.
11129
11152
  // INFO: one per filter row that filters — several rows on one related
11130
11153
  // datasheet send one condition, and a list count can send two
11131
- var activeFlexFilterCount_1 = ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareFlexFilters)
11154
+ var activeFlexFilterCount_1 = ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareFlexFilters)
11132
11155
  ? flexFilters.filter(function (eachFilter) {
11133
11156
  return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
11134
11157
  }).length
11135
11158
  : 0;
11136
11159
  // INFO: without the floating bar these buttons would have nowhere to
11137
11160
  // go, so a hidden search keeps the normal header
11138
- var isMobileToolbar_1 = !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileToolbar) &&
11139
- !!((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareListMobileFloatingSearch) &&
11140
- !((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hideSearch);
11161
+ var isMobileToolbar_1 = !!((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListMobileToolbar) &&
11162
+ !!((_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareListMobileFloatingSearch) &&
11163
+ !((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.hideSearch);
11141
11164
  var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
11142
11165
  dbModule: dbModule,
11143
11166
  dbType: devSettings.server,
11144
- 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,
11167
+ dbCollection: (_35 = (_34 = props === null || props === void 0 ? void 0 : props.space) === null || _34 === void 0 ? void 0 : _34.pipelineDefaultSpaceId) !== null && _35 !== void 0 ? _35 : props.collectionId,
11145
11168
  dbEndpoint: devSettings.dbEndpoint,
11146
11169
  dbAPIToken: devSettings.dbAPIToken,
11147
11170
  dbUserToken: devSettings.dbUserToken,
11148
- }, cond: handleReadQueryHocCond(), offline: ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
11171
+ }, cond: handleReadQueryHocCond(), offline: ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOffline) && isNetworkOffline, onChangeData: function (data, cond) {
11149
11172
  handleGetListData(data, "", "", cond);
11150
11173
  }, onError: handleGetItemError }));
11151
- if ((_35 = props.renderSettings) === null || _35 === void 0 ? void 0 : _35.renderListUI) {
11174
+ if ((_37 = props.renderSettings) === null || _37 === void 0 ? void 0 : _37.renderListUI) {
11152
11175
  return (react_1.default.createElement(react_1.default.Fragment, null,
11153
11176
  listReadQueryHOC,
11154
11177
  props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
@@ -11362,47 +11385,47 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11362
11385
  listReadQueryHOC,
11363
11386
  react_1.default.createElement("div", { className: "flex py-2 ".concat(isMobileToolbar_1
11364
11387
  ? "w-full flex-row items-center md:items-end"
11365
- : ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareCompactMode)
11388
+ : ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareCompactMode)
11366
11389
  ? // INFO: the grow spacer is hidden on phones (search lives in
11367
11390
  // the floating bar), so the row itself pushes the actions right
11368
11391
  "w-full flex-row flex-wrap sm:flex-nowrap items-end justify-between sm:justify-start"
11369
11392
  : "flex-col md:items-end md:flex-row") },
11370
11393
  (props.title || props.description) && (react_1.default.createElement("div", { className: "flex min-w-0 flex-col" },
11371
11394
  props.title && (react_1.default.createElement("div", { className: "flex min-w-0 items-center gap-2" },
11372
- 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),
11373
- ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareSocketName) &&
11395
+ react_1.default.createElement("p", { className: "text-xl font-medium ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "", " ").concat(((_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.darkMode) ? "text-white" : "") }, props.title),
11396
+ ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareSocketName) &&
11374
11397
  isLive &&
11375
11398
  !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" },
11376
11399
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" }),
11377
11400
  "LIVE")),
11378
- ((_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" },
11401
+ ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.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" },
11379
11402
  react_1.default.createElement("span", { className: "h-1.5 w-1.5 rounded-full bg-orange-400" }),
11380
11403
  "OFFLINE")))),
11381
11404
  props.description && (react_1.default.createElement("span", { className: "text-sm text-gray-500 ".concat(isMobileToolbar_1 ? "truncate md:whitespace-normal" : "") }, props.description)))),
11382
- react_1.default.createElement("div", { className: ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareCompactMode)
11405
+ react_1.default.createElement("div", { className: ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareCompactMode)
11383
11406
  ? "hidden sm:block grow"
11384
11407
  : "grow" }),
11385
11408
  react_1.default.createElement("div", { className: "ml-auto flex flex-row items-end ".concat(isMobileToolbar_1 ? "shrink-0" : "") },
11386
11409
  renderListFilterElements(),
11387
11410
  renderListActionElements())),
11388
11411
  renderListNewRowFilterElements(),
11389
- (schemaPresent || ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: draggedTabs !== null && draggedTabs !== void 0 ? draggedTabs : tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, draggable: isEditor && !!((_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.onChangeTabs), handleChangeTabs: handleDragTabs, handleDropEnd: handleDropTabs, darkMode: (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.darkMode })),
11412
+ (schemaPresent || ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: draggedTabs !== null && draggedTabs !== void 0 ? draggedTabs : tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, draggable: isEditor && !!((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.onChangeTabs), handleChangeTabs: handleDragTabs, handleDropEnd: handleDropTabs, darkMode: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode })),
11390
11413
  renderScopedTabContent(tabs, resolvedType, viewType),
11391
- ((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
11392
- ((_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareListMobileFloatingSearch) &&
11414
+ ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
11415
+ ((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareListMobileFloatingSearch) &&
11393
11416
  (0, listModule_1.renderFloatingMobileSearch)({
11394
11417
  filterSearch: filterSearch,
11395
11418
  handleNameSearch: handleNameSearch,
11396
11419
  onFilterClick: function () { return setFlexFilterModalOpen(true); },
11397
- hideSearch: (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.hideSearch,
11398
- darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.darkMode,
11399
- floatingOffset: (_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareListFloatingActionOffset,
11400
- hideFilter: !((_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareFlexFilters),
11401
- activeFilterCount: ((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareFlexFilters)
11420
+ hideSearch: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.hideSearch,
11421
+ darkMode: (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.darkMode,
11422
+ floatingOffset: (_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareListFloatingActionOffset,
11423
+ hideFilter: !((_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareFlexFilters),
11424
+ activeFilterCount: ((_52 = props.bareSettings) === null || _52 === void 0 ? void 0 : _52.bareFlexFilters)
11402
11425
  ? activeFlexFilterCount_1
11403
11426
  : undefined,
11404
11427
  // INFO: Hides when items are selected so NewTable's multi-action bar takes over.
11405
- hidden: selectAll || ((_51 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _51 !== void 0 ? _51 : 0) > 0,
11428
+ hidden: selectAll || ((_53 = selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) !== null && _53 !== void 0 ? _53 : 0) > 0,
11406
11429
  onRefreshClick: isMobileToolbar_1 && schemaPresent
11407
11430
  ? function () { return handleRefresh(); }
11408
11431
  : undefined,
@@ -11807,7 +11830,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11807
11830
  var tabs = [
11808
11831
  {
11809
11832
  id: "general",
11810
- name: resolvedType === "list" ? "Table View" : "Card View",
11833
+ // INFO: beside the Activity tab it is the record's Details
11834
+ name: resolvedType === "list"
11835
+ ? "Table View"
11836
+ : hasActivityTab
11837
+ ? "Details"
11838
+ : "Card View",
11811
11839
  fixed: true,
11812
11840
  href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=").concat(resolvedType, "&collection=").concat(props.collectionId, "&view=general"),
11813
11841
  },
@@ -11898,6 +11926,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11898
11926
  href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=read&collection=").concat(props.collectionId, "&view=").concat(eachSection.id),
11899
11927
  });
11900
11928
  });
11929
+ // INFO: the record's comments and logs, in place of the Log button's
11930
+ // second drawer, where the record opens in a drawer. First, before
11931
+ // Details; without them Details is the first tab. Fixed like Details so neither
11932
+ // can be dragged out of that order
11933
+ if (resolvedType === "read" && hasActivityTab)
11934
+ tabs.unshift({
11935
+ id: readViewIds_1.ACTIVITY_VIEW_ID,
11936
+ name: "Activity",
11937
+ fixed: true,
11938
+ href: "".concat(props.localURLEndpoint, "?data=").concat(props.id, "&type=read&collection=").concat(props.collectionId, "&view=").concat(readViewIds_1.ACTIVITY_VIEW_ID),
11939
+ });
11901
11940
  if (isEditor)
11902
11941
  if (!((_d = props.organise) === null || _d === void 0 ? void 0 : _d.hideNewTabs) && !((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareReadListTabs))
11903
11942
  tabs.push({
@@ -12057,7 +12096,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12057
12096
  // at this record and read-only. Without a schema endpoint it carries no tabs
12058
12097
  // of its own, and a picked row opens in place instead of navigating away, so
12059
12098
  // this record's tabs stay put.
12060
- var renderRelatedList = function (source, query, openId, onOpen) {
12099
+ var renderRelatedList = function (source, query, openId, onOpen, openViewId) {
12061
12100
  var _a, _b, _c, _d, _e, _f, _g, _h;
12062
12101
  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,
12063
12102
  // INFO: comments and logs only — the edit, delete and inline-edit
@@ -12069,8 +12108,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12069
12108
  darkMode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode,
12070
12109
  darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg,
12071
12110
  breadcrumbType: "hidden",
12072
- handleNavigate: function (type, selectedId) {
12073
- return onOpen(type === "read" && selectedId ? selectedId : "");
12111
+ // INFO: the opened row keeps its tab, so its bubble lands on its
12112
+ // Activity tab and its tabs switch in place inside this one
12113
+ viewId: openId ? openViewId : undefined,
12114
+ handleNavigate: function (type, selectedId, viewId) {
12115
+ return type === "read" && selectedId
12116
+ ? onOpen(selectedId, viewId)
12117
+ : onOpen("");
12074
12118
  },
12075
12119
  // INFO: asked with the related collection's id, so a host counts the
12076
12120
  // comments on these rows rather than on its own sheet's
@@ -12087,9 +12131,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12087
12131
  // list and its related tabs read as one
12088
12132
  bareListGridLines: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridLines,
12089
12133
  bareHideCollectionActivity: true,
12090
- // INFO: a row's comment button opens its comments and logs alone in
12091
- // this tab, not in a second drawer over the read drawer
12134
+ // INFO: a row's comment button opens the row in place on its Activity
12135
+ // tab, not a second drawer over the read drawer
12092
12136
  bareInlineActivity: true,
12137
+ // INFO: the opened row's Activity | Details switch sits beside Back,
12138
+ // so its own tab bar would be a second row of tabs under this one
12139
+ bareHideReadTabs: true,
12093
12140
  } }));
12094
12141
  };
12095
12142
  var renderAddMathColumn = function (id, onClose) {
@@ -12764,7 +12811,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12764
12811
  else {
12765
12812
  // INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
12766
12813
  if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
12767
- return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction, onRowEdit: recordEditAction, onRowOpen: recordOpenAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, commentUnread: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts) ? commentUnread : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
12814
+ return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(true), groupColumnKey: groupId || undefined, onAllGroupsCollapsedChange: setIsAllGroupsCollapsed, onRowActivity: recordActivityAction, rowActivityLabel: recordActivityLabel, onRowEdit: recordReadAction, rowEditLabel: "Open details", commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, commentUnread: ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onFetchCommentCounts) ? commentUnread : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
12768
12815
  ? handleMoveRowToGroup
12769
12816
  : undefined,
12770
12817
  // INFO: per-group paging — scroll appends inside a band, page
@@ -13404,7 +13451,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13404
13451
  // INFO: each section pages itself, so the list-wide pager would
13405
13452
  // only page the read that seeded them
13406
13453
  hidePagination: ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.hidePagination) ||
13407
- (renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip, onRowEdit: recordEditAction, onRowActivity: recordActivityAction })));
13454
+ (renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, mobileTooltip: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileTooltip, onRowActivity: recordActivityAction, rowActivityLabel: recordActivityLabel })));
13408
13455
  }
13409
13456
  return (react_1.default.createElement(react_1.default.Fragment, null,
13410
13457
  react_1.default.createElement(list_1.List, { darkModeBg: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: ((_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.disableSelectFullData) === null || _7 === void 0 ? void 0 : _7.list) ||
@@ -13538,7 +13585,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13538
13585
  // INFO: each section pages itself, so the list-wide pager would
13539
13586
  // only page the read that seeded them
13540
13587
  hidePagination: ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.hidePagination) ||
13541
- (renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, onCardEdit: recordEditAction, onCardActivity: recordActivityAction })));
13588
+ (renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, onCardActivity: recordActivityAction, cardActivityLabel: recordActivityLabel })));
13542
13589
  }
13543
13590
  return (react_1.default.createElement(react_1.default.Fragment, null,
13544
13591
  react_1.default.createElement(grid_1.Grid, { darkMode: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.darkMode, darkModeBg: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
@@ -14189,7 +14236,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14189
14236
  var _a, _b;
14190
14237
  handleCaptureListScroll(id);
14191
14238
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
14192
- }, onCardEdit: recordEditAction, onCardActivity: recordActivityAction, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg })));
14239
+ }, onCardActivity: recordActivityAction, cardActivityLabel: recordActivityLabel, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg })));
14193
14240
  }
14194
14241
  return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
14195
14242
  ? "Data has exceeded limit, please apply filters"
@@ -14752,14 +14799,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14752
14799
  };
14753
14800
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
14754
14801
  renderNotification("root"),
14755
- ((_117 = (_116 = props.renderSettings) === null || _116 === void 0 ? void 0 : _116.renderLoadingUI) === null || _117 === void 0 ? void 0 : _117.call(_116)) && loading ? ((_118 = props.renderSettings) === null || _118 === void 0 ? void 0 : _118.renderLoadingUI()) : (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, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
14802
+ ((_121 = (_120 = props.renderSettings) === null || _120 === void 0 ? void 0 : _120.renderLoadingUI) === null || _121 === void 0 ? void 0 : _121.call(_120)) && loading ? ((_122 = props.renderSettings) === null || _122 === void 0 ? void 0 : _122.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_123 = props.organise) === null || _123 === void 0 ? void 0 : _123.darkMode, darkModeBg: (_124 = props.organise) === null || _124 === void 0 ? void 0 : _124.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
14756
14803
  var _a, _b;
14757
14804
  if (loading)
14758
14805
  return;
14759
14806
  handlePopUpModal(false);
14760
14807
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
14761
14808
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
14762
- react_1.default.createElement(modal_1.Modal, { darkMode: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkMode, darkModeBg: (_122 = props.organise) === null || _122 === void 0 ? void 0 : _122.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
14809
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_125 = props.organise) === null || _125 === void 0 ? void 0 : _125.darkMode, darkModeBg: (_126 = props.organise) === null || _126 === void 0 ? void 0 : _126.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
14763
14810
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
14764
14811
  if (dataId) {
14765
14812
  var currentValue = selectedData[referenceCreationModal.id];
@@ -14775,19 +14822,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14775
14822
  }, onClose: function () {
14776
14823
  setReferenceCreationModal({ id: "", name: "", type: "string" });
14777
14824
  } }),
14778
- react_1.default.createElement(modal_1.Modal, { darkMode: (_123 = props.organise) === null || _123 === void 0 ? void 0 : _123.darkMode, darkModeBg: (_124 = props.organise) === null || _124 === void 0 ? void 0 : _124.darkModeBg, maxWidth: "2xl", open: referenceDeleteTableData.length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
14825
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_127 = props.organise) === null || _127 === void 0 ? void 0 : _127.darkMode, darkModeBg: (_128 = props.organise) === null || _128 === void 0 ? void 0 : _128.darkModeBg, maxWidth: "2xl", open: referenceDeleteTableData.length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
14779
14826
  setReferenceDeleteTableData([]);
14780
14827
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
14781
- react_1.default.createElement(modal_1.Modal, { darkMode: (_125 = props.organise) === null || _125 === void 0 ? void 0 : _125.darkMode, darkModeBg: (_126 = props.organise) === null || _126 === void 0 ? void 0 : _126.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
14828
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_129 = props.organise) === null || _129 === void 0 ? void 0 : _129.darkMode, darkModeBg: (_130 = props.organise) === null || _130 === void 0 ? void 0 : _130.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
14782
14829
  setDeletePasscodeInput("");
14783
14830
  setDeleteModal(!deleteModal);
14784
14831
  setDeleteFeedId("");
14785
14832
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
14786
- react_1.default.createElement(modal_1.Modal, { darkMode: (_127 = props.organise) === null || _127 === void 0 ? void 0 : _127.darkMode, darkModeBg: (_128 = props.organise) === null || _128 === void 0 ? void 0 : _128.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
14833
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_131 = props.organise) === null || _131 === void 0 ? void 0 : _131.darkMode, darkModeBg: (_132 = props.organise) === null || _132 === void 0 ? void 0 : _132.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
14787
14834
  setBatchUpdateData({ columnId: "", columnData: {} });
14788
14835
  setBatchUpdateModal(false);
14789
14836
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
14790
- react_1.default.createElement(modal_1.Modal, { darkMode: (_129 = props.organise) === null || _129 === void 0 ? void 0 : _129.darkMode, darkModeBg: (_130 = props.organise) === null || _130 === void 0 ? void 0 : _130.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
14837
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_133 = props.organise) === null || _133 === void 0 ? void 0 : _133.darkMode, darkModeBg: (_134 = props.organise) === null || _134 === void 0 ? void 0 : _134.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
14791
14838
  var _a, _b;
14792
14839
  if (props.space)
14793
14840
  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 }));
@@ -14798,7 +14845,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14798
14845
  renderContent(),
14799
14846
  renderReadDrawer(),
14800
14847
  canHostDrawer && renderDrawerDiscardModal(),
14801
- isActivityLog && !isInlineActivity && (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_131 = props.organise) === null || _131 === void 0 ? void 0 : _131.darkMode, darkModeBg: (_132 = props.organise) === null || _132 === void 0 ? void 0 : _132.darkModeBg, testId: "dt-activity-drawer",
14848
+ canOpenActivityDrawer && (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_135 = props.organise) === null || _135 === void 0 ? void 0 : _135.darkMode, darkModeBg: (_136 = props.organise) === null || _136 === void 0 ? void 0 : _136.darkModeBg, testId: "dt-activity-drawer",
14802
14849
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
14803
14850
  zIndex: "z-50", open: activityModal,
14804
14851
  // INFO: the record stays set while the drawer slides out — clearing it
@@ -14807,7 +14854,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14807
14854
  onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75",
14808
14855
  // INFO: dragged like the read drawer; the width sticks across
14809
14856
  // opens while the list stays mounted
14810
- resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_133 = props.id) !== null && _133 !== void 0 ? _133 : "") : activityId) })),
14857
+ resizable: true, title: "Activity Log", content: renderActivityPanel(resolvedType === "read" ? ((_137 = props.id) !== null && _137 !== void 0 ? _137 : "") : activityId) })),
14811
14858
  renderScrollSentinel()));
14812
14859
  });
14813
14860
  //# sourceMappingURL=index.js.map