blixify-ui-web 1.2.218 → 1.2.220

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.
@@ -249,10 +249,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
249
249
  // Every read of the view type below uses resolvedType. The distinction matters
250
250
  // most in effect dependency arrays — following props.type there would leave
251
251
  // the list never refetching while the panel is open, which fails silently.
252
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115;
252
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117;
253
253
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
254
254
  // routed straight back into it — so expand-to-full-page is local state.
255
- var _116 = (0, react_1.useState)(false), drawerPageView = _116[0], setDrawerPageView = _116[1];
255
+ var _118 = (0, react_1.useState)(false), drawerPageView = _118[0], setDrawerPageView = _118[1];
256
256
  // INFO: the panel keeps rendering the record it was opened with rather than
257
257
  // live props. Without this, navigating back to the list would re-render the
258
258
  // still-mounted panel as a second list behind the overlay.
@@ -308,7 +308,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
308
308
  drawerFormEditedRef.current = false;
309
309
  }
310
310
  drawerOpenRef.current = isDrawerHost;
311
- var _117 = (0, react_1.useState)(false), drawerDiscardModal = _117[0], setDrawerDiscardModal = _117[1];
311
+ var _119 = (0, react_1.useState)(false), drawerDiscardModal = _119[0], setDrawerDiscardModal = _119[1];
312
312
  // INFO: leaving the record ends the escape, so the next row opened from the
313
313
  // list peeks in the panel again rather than inheriting a full page the user
314
314
  // asked for once. Saving a form on the full page lands on its read view, which
@@ -387,29 +387,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
387
387
  initialFilterReferenceDate: initialFilterReferenceDate,
388
388
  };
389
389
  };
390
- var _118 = intialiseDefaultFilterValues(), initialFilterSearch = _118.initialFilterSearch, initialFilterSearchParams = _118.initialFilterSearchParams, initialFilterSelection = _118.initialFilterSelection, initialFilterReference = _118.initialFilterReference, initialFilterReferenceDate = _118.initialFilterReferenceDate;
390
+ var _120 = intialiseDefaultFilterValues(), initialFilterSearch = _120.initialFilterSearch, initialFilterSearchParams = _120.initialFilterSearchParams, initialFilterSelection = _120.initialFilterSelection, initialFilterReference = _120.initialFilterReference, initialFilterReferenceDate = _120.initialFilterReferenceDate;
391
391
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
392
- var _119 = (0, viewStatePersistence_1.usePersistedViewState)({
392
+ var _121 = (0, viewStatePersistence_1.usePersistedViewState)({
393
393
  mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
394
394
  collectionId: props.collectionId,
395
395
  persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
396
396
  type: resolvedType,
397
- }), rawPersistedState = _119.persistedState, isPersistEnabled = _119.isEnabled, handleSaveView = _119.handleSaveView, handleRegisterViewSnapshot = _119.handleRegisterViewSnapshot;
397
+ }), rawPersistedState = _121.persistedState, isPersistEnabled = _121.isEnabled, handleSaveView = _121.handleSaveView, handleRegisterViewSnapshot = _121.handleRegisterViewSnapshot;
398
398
  // INFO: drop stored filters/sort on removed columns — they would empty the table
399
399
  var persistedState = (0, react_1.useMemo)(function () {
400
- var _a, _b, _c;
400
+ var _a, _b, _c, _d;
401
401
  return (0, viewStatePersistence_1.handlePruneStaleColumns)(rawPersistedState, props.model, (0, flexFilter_1.handleBuildFlexFilterStructure)((_a = props.model) !== null && _a !== void 0 ? _a : [], {
402
402
  references: (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareFlexFilterReferences,
403
403
  listObjects: (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareFlexFilterListObjects,
404
+ related: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilterRelated,
404
405
  }));
405
406
  }, [
406
407
  rawPersistedState,
407
408
  props.model,
408
409
  (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareFlexFilterReferences,
409
410
  (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
411
+ (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
410
412
  ]);
411
- var _120 = (0, react_1.useState)(false), loading = _120[0], setLoading = _120[1];
412
- var _121 = (0, react_1.useState)(), notification = _121[0], setNotification = _121[1];
413
+ var _122 = (0, react_1.useState)(false), loading = _122[0], setLoading = _122[1];
414
+ var _123 = (0, react_1.useState)(), notification = _123[0], setNotification = _123[1];
413
415
  // INFO: a success toast is confirmation, not a decision — it clears itself so
414
416
  // it never sits on the floating step bar; errors stay until dismissed
415
417
  (0, react_1.useEffect)(function () {
@@ -419,80 +421,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
419
421
  return function () { return clearTimeout(timer); };
420
422
  }, [notification]);
421
423
  //INFO : Used by List
422
- var _122 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _l !== void 0 ? _l : initialFilterSearch), filterSearch = _122[0], setFilterSearch = _122[1];
423
- var _123 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearchParams), filterSearchParams = _123[0], setFilterSearchParams = _123[1];
424
- var _124 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _o !== void 0 ? _o : initialFilterSelection), filterSelection = _124[0], setFilterSelection = _124[1];
425
- var _125 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _p !== void 0 ? _p : initialFilterReference), filterReference = _125[0], setFilterReference = _125[1];
426
- var _126 = (0, react_1.useState)({}), filterReferenceSearch = _126[0], setFilterReferenceSearch = _126[1];
427
- var _127 = (0, react_1.useState)({}), filterReferenceList = _127[0], setFilterReferenceList = _127[1];
428
- var _128 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
424
+ var _124 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _124[0], setFilterSearch = _124[1];
425
+ var _125 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _125[0], setFilterSearchParams = _125[1];
426
+ var _126 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _126[0], setFilterSelection = _126[1];
427
+ var _127 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _127[0], setFilterReference = _127[1];
428
+ var _128 = (0, react_1.useState)({}), filterReferenceSearch = _128[0], setFilterReferenceSearch = _128[1];
429
+ var _129 = (0, react_1.useState)({}), filterReferenceList = _129[0], setFilterReferenceList = _129[1];
430
+ var _130 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
429
431
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
430
- : initialFilterReferenceDate), filterReferenceDate = _128[0], setFilterReferenceDate = _128[1];
431
- var _129 = (0, react_1.useState)(true), tableLoading = _129[0], setTableLoading = _129[1];
432
- var _130 = (0, react_1.useState)(""), cursor = _130[0], setCursor = _130[1];
433
- var _131 = (0, react_1.useState)(""), lastCursor = _131[0], setLastCursor = _131[1];
434
- var _132 = (0, react_1.useState)([]), tableData = _132[0], setTableData = _132[1];
435
- var _133 = (0, react_1.useState)([]), spaceTableData = _133[0], setSpaceTableData = _133[1];
432
+ : initialFilterReferenceDate), filterReferenceDate = _130[0], setFilterReferenceDate = _130[1];
433
+ var _131 = (0, react_1.useState)(true), tableLoading = _131[0], setTableLoading = _131[1];
434
+ var _132 = (0, react_1.useState)(""), cursor = _132[0], setCursor = _132[1];
435
+ var _133 = (0, react_1.useState)(""), lastCursor = _133[0], setLastCursor = _133[1];
436
+ var _134 = (0, react_1.useState)([]), tableData = _134[0], setTableData = _134[1];
437
+ var _135 = (0, react_1.useState)([]), spaceTableData = _135[0], setSpaceTableData = _135[1];
436
438
  // INFO: a save resolves after later renders, so it reads the table from here —
437
439
  // the state it closed over can predate an earlier save on the same row
438
440
  var tableDataRef = (0, react_1.useRef)([]);
439
441
  var spaceTableDataRef = (0, react_1.useRef)([]);
440
442
  tableDataRef.current = tableData;
441
443
  spaceTableDataRef.current = spaceTableData;
442
- var _134 = (0, react_1.useState)(0), size = _134[0], setSize = _134[1];
443
- var _135 = (0, react_1.useState)((_s = (_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _q !== void 0 ? _q : (_r = props.organise) === null || _r === void 0 ? void 0 : _r.pageIndex) !== null && _s !== void 0 ? _s : 0), pageIndex = _135[0], setPageIndex = _135[1];
444
+ var _136 = (0, react_1.useState)(0), size = _136[0], setSize = _136[1];
445
+ var _137 = (0, react_1.useState)((_t = (_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _r !== void 0 ? _r : (_s = props.organise) === null || _s === void 0 ? void 0 : _s.pageIndex) !== null && _t !== void 0 ? _t : 0), pageIndex = _137[0], setPageIndex = _137[1];
444
446
  // INFO: every change of page, including the return to the first page when a
445
447
  // filter or search changes, which onChangePagination does not always report
446
448
  (0, react_1.useEffect)(function () {
447
449
  var _a, _b;
448
450
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
449
451
  }, [pageIndex]);
450
- var _136 = (0, react_1.useState)([]), selectedIds = _136[0], setSelectedIds = _136[1];
451
- var _137 = (0, react_1.useState)(false), selectAll = _137[0], setSelectAll = _137[1];
452
- var _138 = (0, react_1.useState)(""), deletePasscode = _138[0], setDeletePasscode = _138[1];
453
- var _139 = (0, react_1.useState)(""), deletePasscodeInput = _139[0], setDeletePasscodeInput = _139[1];
454
- var _140 = (0, react_1.useState)(""), deleteFeedId = _140[0], setDeleteFeedId = _140[1];
452
+ var _138 = (0, react_1.useState)([]), selectedIds = _138[0], setSelectedIds = _138[1];
453
+ var _139 = (0, react_1.useState)(false), selectAll = _139[0], setSelectAll = _139[1];
454
+ var _140 = (0, react_1.useState)(""), deletePasscode = _140[0], setDeletePasscode = _140[1];
455
+ var _141 = (0, react_1.useState)(""), deletePasscodeInput = _141[0], setDeletePasscodeInput = _141[1];
456
+ var _142 = (0, react_1.useState)(""), deleteFeedId = _142[0], setDeleteFeedId = _142[1];
455
457
  //INFO : Used by List Organise
456
458
  // INFO: Internal sort state that overrides props.organise?.sort when
457
459
  // persistViewState is enabled and a persisted sort exists
458
- var _141 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _t !== void 0 ? _t : undefined), persistedSort = _141[0], setPersistedSort = _141[1];
459
- var _142 = (0, react_1.useState)(false), filterDraft = _142[0], setFilterDraft = _142[1];
460
- var _143 = (0, react_1.useState)(false), addTabModal = _143[0], setAddTabModal = _143[1];
461
- var _144 = (0, react_1.useState)(-1), editTabIndex = _144[0], setEditTabIndex = _144[1];
460
+ var _143 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _143[0], setPersistedSort = _143[1];
461
+ var _144 = (0, react_1.useState)(false), filterDraft = _144[0], setFilterDraft = _144[1];
462
+ var _145 = (0, react_1.useState)(false), addTabModal = _145[0], setAddTabModal = _145[1];
463
+ var _146 = (0, react_1.useState)(-1), editTabIndex = _146[0], setEditTabIndex = _146[1];
462
464
  //INFO : resolve the initial tab synchronously so the mount cond is already
463
465
  // tab-scoped — an empty initial tab caused a second wasted list fetch
464
- var _145 = (0, react_1.useState)(function () {
466
+ var _147 = (0, react_1.useState)(function () {
465
467
  var _a;
466
468
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
467
- }), selectedTab = _145[0], setSelectedTab = _145[1];
468
- var _146 = (0, react_1.useState)("dayGridMonth"), calendarView = _146[0], setCalendarView = _146[1];
469
+ }), selectedTab = _147[0], setSelectedTab = _147[1];
470
+ var _148 = (0, react_1.useState)("dayGridMonth"), calendarView = _148[0], setCalendarView = _148[1];
469
471
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
470
472
  // (calendarView above drives the matching range query)
471
- var _147 = (0, react_1.useState)("month"), newCalendarViewMode = _147[0], setNewCalendarViewMode = _147[1];
472
- var _148 = (0, react_1.useState)(new Date()), calendarTabMonth = _148[0], setCalendarTabMonth = _148[1];
473
+ var _149 = (0, react_1.useState)("month"), newCalendarViewMode = _149[0], setNewCalendarViewMode = _149[1];
474
+ var _150 = (0, react_1.useState)(new Date()), calendarTabMonth = _150[0], setCalendarTabMonth = _150[1];
473
475
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
474
476
  // whenever its settings change, and that must not undo the user's switch
475
477
  var calendarViewInitRef = (0, react_1.useRef)(false);
476
- var _149 = (0, react_1.useState)(true), kanbanDroppable = _149[0], setKanbanDroppable = _149[1];
477
- var _150 = (0, react_1.useState)([]), kanbanOptions = _150[0], setKanbanOptions = _150[1];
478
- var _151 = (0, react_1.useState)(false), batchUpdateModal = _151[0], setBatchUpdateModal = _151[1];
479
- var _152 = (0, react_1.useState)({
478
+ var _151 = (0, react_1.useState)(true), kanbanDroppable = _151[0], setKanbanDroppable = _151[1];
479
+ var _152 = (0, react_1.useState)([]), kanbanOptions = _152[0], setKanbanOptions = _152[1];
480
+ var _153 = (0, react_1.useState)(false), batchUpdateModal = _153[0], setBatchUpdateModal = _153[1];
481
+ var _154 = (0, react_1.useState)({
480
482
  columnId: "",
481
483
  columnData: {},
482
- }), batchUpdateData = _152[0], setBatchUpdateData = _152[1];
484
+ }), batchUpdateData = _154[0], setBatchUpdateData = _154[1];
483
485
  // INFO: system columns (created / updated at and by, record id, number)
484
486
  // join the structure hidden; the ones a user shows are kept per view
485
- var isSystemColumnsEnabled = !!((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareSystemColumns);
486
- var isSystemColumnsLocked = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumnsLocked);
487
+ var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
488
+ var isSystemColumnsLocked = !!((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareSystemColumnsLocked);
487
489
  var appendedSystemColumnIds = isSystemColumnsEnabled
488
490
  ? 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; }); })
489
491
  : [];
490
- var _153 = (0, react_1.useState)((_w = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _w !== void 0 ? _w : []), shownSystemColumnIds = _153[0], setShownSystemColumnIds = _153[1];
492
+ var _155 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _155[0], setShownSystemColumnIds = _155[1];
491
493
  var handleWithSystemColumns = function (model, shownIds) {
492
494
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
493
495
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
494
496
  };
495
- var _154 = (0, react_1.useState)(function () {
497
+ var _156 = (0, react_1.useState)(function () {
496
498
  var _a;
497
499
  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 : []);
498
500
  if (!persistedState)
@@ -519,8 +521,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
519
521
  });
520
522
  }
521
523
  return model;
522
- }), structure = _154[0], setStructure = _154[1];
523
- var _155 = (0, react_1.useState)(((_x = props === null || props === void 0 ? void 0 : props.organise) === null || _x === void 0 ? void 0 : _x.additionalQuery) || []), additionalQuery = _155[0], setAdditionalQuery = _155[1];
524
+ }), structure = _156[0], setStructure = _156[1];
525
+ var _157 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _157[0], setAdditionalQuery = _157[1];
524
526
  // INFO: State for user-configurable flex filters (Monday.com-style)
525
527
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
526
528
  var defaultFlexFilterRow = [
@@ -531,9 +533,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
531
533
  value: undefined,
532
534
  },
533
535
  ];
534
- var _156 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
536
+ var _158 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
535
537
  ? persistedState.flexFilters
536
- : defaultFlexFilterRow), flexFilters = _156[0], setFlexFilters = _156[1];
538
+ : defaultFlexFilterRow), flexFilters = _158[0], setFlexFilters = _158[1];
537
539
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
538
540
  // clear methods so chained calls in one tick aren't stale.
539
541
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -546,81 +548,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
546
548
  }, [flexFilters]);
547
549
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
548
550
  // to prevent API calls on every keystroke when typing in value inputs
549
- var _157 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
551
+ var _159 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
550
552
  ? persistedState.flexFilters
551
- : defaultFlexFilterRow), flexFiltersDebounced = _157[0], setFlexFiltersDebounced = _157[1];
553
+ : defaultFlexFilterRow), flexFiltersDebounced = _159[0], setFlexFiltersDebounced = _159[1];
552
554
  // INFO: the filter rows of the export being set up — started from the
553
555
  // list's own when the export opens, so changing them leaves the list as it is
554
- var _158 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _158[0], setExportFlexFilters = _158[1];
555
- var _159 = (0, react_1.useState)({}), flexFilterReferenceOptions = _159[0], setFlexFilterReferenceOptions = _159[1];
556
- var _160 = (0, react_1.useState)({}), flexFilterReferenceSearch = _160[0], setFlexFilterReferenceSearch = _160[1];
557
- var _161 = (0, react_1.useState)(false), flexFilterModalOpen = _161[0], setFlexFilterModalOpen = _161[1];
558
- var _162 = (0, react_1.useState)(false), viewSettingsModalOpen = _162[0], setViewSettingsModalOpen = _162[1];
556
+ var _160 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _160[0], setExportFlexFilters = _160[1];
557
+ var _161 = (0, react_1.useState)({}), flexFilterReferenceOptions = _161[0], setFlexFilterReferenceOptions = _161[1];
558
+ var _162 = (0, react_1.useState)({}), flexFilterReferenceSearch = _162[0], setFlexFilterReferenceSearch = _162[1];
559
+ var _163 = (0, react_1.useState)(false), flexFilterModalOpen = _163[0], setFlexFilterModalOpen = _163[1];
560
+ var _164 = (0, react_1.useState)(false), viewSettingsModalOpen = _164[0], setViewSettingsModalOpen = _164[1];
559
561
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
560
562
  // Deliberately kept out of `structure`: the props-sync effect below resets
561
563
  // structure to props.model whenever props change, which would wipe the
562
564
  // choice, and the persist effect derives schema-level hiddenColumnIds from
563
565
  // structure — writing user hides there would blur the two concepts.
564
- var _163 = (0, react_1.useState)((_y = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _y !== void 0 ? _y : []), userHiddenColumnIds = _163[0], setUserHiddenColumnIds = _163[1];
565
- var _164 = (0, react_1.useState)(""), columnSearch = _164[0], setColumnSearch = _164[1];
566
- var _165 = (0, react_1.useState)([]), savedViews = _165[0], setSavedViews = _165[1];
567
- var _166 = (0, react_1.useState)(null), activeSavedViewId = _166[0], setActiveSavedViewId = _166[1];
566
+ var _165 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _z !== void 0 ? _z : []), userHiddenColumnIds = _165[0], setUserHiddenColumnIds = _165[1];
567
+ var _166 = (0, react_1.useState)(""), columnSearch = _166[0], setColumnSearch = _166[1];
568
+ var _167 = (0, react_1.useState)([]), savedViews = _167[0], setSavedViews = _167[1];
569
+ var _168 = (0, react_1.useState)(null), activeSavedViewId = _168[0], setActiveSavedViewId = _168[1];
568
570
  // INFO: the widths of the view on screen, by column id ("180px")
569
- var _167 = (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 = _167[0], setColumnWidths = _167[1];
571
+ var _169 = (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 = _169[0], setColumnWidths = _169[1];
570
572
  // INFO: unsaved changes are kept only once the opening view is on screen,
571
573
  // so the defaults drawn before it never overwrite a person's own
572
- var _168 = (0, react_1.useState)(false), isViewDraftReady = _168[0], setIsViewDraftReady = _168[1];
574
+ var _170 = (0, react_1.useState)(false), isViewDraftReady = _170[0], setIsViewDraftReady = _170[1];
573
575
  // INFO: null while the name box is closed
574
- var _169 = (0, react_1.useState)(null), savedViewName = _169[0], setSavedViewName = _169[1];
575
- var _170 = (0, react_1.useState)(null), deletingSavedViewId = _170[0], setDeletingSavedViewId = _170[1];
576
- var _171 = (0, react_1.useState)(null), draggingColumnId = _171[0], setDraggingColumnId = _171[1];
576
+ var _171 = (0, react_1.useState)(null), savedViewName = _171[0], setSavedViewName = _171[1];
577
+ var _172 = (0, react_1.useState)(null), deletingSavedViewId = _172[0], setDeletingSavedViewId = _172[1];
578
+ var _173 = (0, react_1.useState)(null), draggingColumnId = _173[0], setDraggingColumnId = _173[1];
577
579
  var columnRowRefs = (0, react_1.useRef)({});
578
580
  //INFO : Used by Auth
579
- var _172 = (0, react_1.useState)({
581
+ var _174 = (0, react_1.useState)({
580
582
  email: "",
581
583
  google: "",
582
584
  phone: "",
583
585
  disabled: false,
584
586
  create: false,
585
- }), authMethods = _172[0], setAuthMethods = _172[1];
586
- var _173 = (0, react_1.useState)(""), selectedAuthMethod = _173[0], setSelectedAuthMethod = _173[1];
587
+ }), authMethods = _174[0], setAuthMethods = _174[1];
588
+ var _175 = (0, react_1.useState)(""), selectedAuthMethod = _175[0], setSelectedAuthMethod = _175[1];
587
589
  // INFO: the sign-in check of a users datasheet's record is running; the
588
590
  // panel shows a spinner rather than nothing, which read as "no login"
589
- var _174 = (0, react_1.useState)(false), authLoading = _174[0], setAuthLoading = _174[1];
591
+ var _176 = (0, react_1.useState)(false), authLoading = _176[0], setAuthLoading = _176[1];
590
592
  // INFO: a delete is running — the ref answers a second tap at once, before
591
593
  // the state has rendered, and the state disables the confirm button
592
594
  var deletingRef = (0, react_1.useRef)(false);
593
- var _175 = (0, react_1.useState)(false), deleting = _175[0], setDeleting = _175[1];
595
+ var _177 = (0, react_1.useState)(false), deleting = _177[0], setDeleting = _177[1];
594
596
  // INFO: Used by Activity Log
595
- var _176 = (0, react_1.useState)(false), activityModal = _176[0], setActivityModal = _176[1];
596
- var _177 = (0, react_1.useState)(""), activityId = _177[0], setActivityId = _177[1];
597
+ var _178 = (0, react_1.useState)(false), activityModal = _178[0], setActivityModal = _178[1];
598
+ var _179 = (0, react_1.useState)(""), activityId = _179[0], setActivityId = _179[1];
597
599
  //INFO : Used by Export
598
- var _178 = (0, react_1.useState)(null), csvFile = _178[0], setCSVFile = _178[1];
599
- var _179 = (0, react_1.useState)([]), csvFileData = _179[0], setCSVFileData = _179[1];
600
- var _180 = (0, react_1.useState)(0), stepCSVIndex = _180[0], setStepCSVIndex = _180[1];
601
- var _181 = (0, react_1.useState)({}), listCSVMapAttribute = _181[0], setListCSVMapAttribute = _181[1];
602
- var _182 = (0, react_1.useState)({}), listCSVObjAttribute = _182[0], setListCSVObjAttribute = _182[1];
603
- var _183 = (0, react_1.useState)([]), csvAPIAttribute = _183[0], setCSVAPIAttribute = _183[1];
604
- var _184 = (0, react_1.useState)(((_z = props.devSettings.currentUser) === null || _z === void 0 ? void 0 : _z.userEmail) || ""), exportCSVEmail = _184[0], setExportCSVEmail = _184[1];
605
- var _185 = (0, react_1.useState)(((_1 = (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.exportSettings) === null || _1 === void 0 ? void 0 : _1.defaultExportPDFName) || ""), exportPDFTitle = _185[0], setExportPDFTitle = _185[1];
606
- var _186 = (0, react_1.useState)(false), exportPDFLoading = _186[0], setExportPDFLoading = _186[1];
607
- var _187 = (0, react_1.useState)(false), exportReadPDFLoading = _187[0], setExportReadPDFLoading = _187[1];
608
- var _188 = (0, react_1.useState)((_4 = (_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.exportSettings) === null || _3 === void 0 ? void 0 : _3.sumColumnId) !== null && _4 !== void 0 ? _4 : []), exportSumAttributeIds = _188[0], setExportSumAttributeIds = _188[1];
609
- var _189 = (0, react_1.useState)((_7 = (_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.hideSubItems) !== null && _7 !== void 0 ? _7 : false), hideSubItems = _189[0], setHideSubItems = _189[1];
610
- var _190 = (0, react_1.useState)([]), importTableData = _190[0], setImportTableData = _190[1];
611
- var _191 = (0, react_1.useState)([]), queryList = _191[0], setQueryList = _191[1];
612
- var _192 = (0, react_1.useState)(undefined), allQueryList = _192[0], setAllQueryList = _192[1];
600
+ var _180 = (0, react_1.useState)(null), csvFile = _180[0], setCSVFile = _180[1];
601
+ var _181 = (0, react_1.useState)([]), csvFileData = _181[0], setCSVFileData = _181[1];
602
+ var _182 = (0, react_1.useState)(0), stepCSVIndex = _182[0], setStepCSVIndex = _182[1];
603
+ var _183 = (0, react_1.useState)({}), listCSVMapAttribute = _183[0], setListCSVMapAttribute = _183[1];
604
+ var _184 = (0, react_1.useState)({}), listCSVObjAttribute = _184[0], setListCSVObjAttribute = _184[1];
605
+ var _185 = (0, react_1.useState)([]), csvAPIAttribute = _185[0], setCSVAPIAttribute = _185[1];
606
+ var _186 = (0, react_1.useState)(((_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) || ""), exportCSVEmail = _186[0], setExportCSVEmail = _186[1];
607
+ var _187 = (0, react_1.useState)(((_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.defaultExportPDFName) || ""), exportPDFTitle = _187[0], setExportPDFTitle = _187[1];
608
+ var _188 = (0, react_1.useState)(false), exportPDFLoading = _188[0], setExportPDFLoading = _188[1];
609
+ var _189 = (0, react_1.useState)(false), exportReadPDFLoading = _189[0], setExportReadPDFLoading = _189[1];
610
+ var _190 = (0, react_1.useState)((_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.exportSettings) === null || _4 === void 0 ? void 0 : _4.sumColumnId) !== null && _5 !== void 0 ? _5 : []), exportSumAttributeIds = _190[0], setExportSumAttributeIds = _190[1];
611
+ var _191 = (0, react_1.useState)((_8 = (_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.exportSettings) === null || _7 === void 0 ? void 0 : _7.hideSubItems) !== null && _8 !== void 0 ? _8 : false), hideSubItems = _191[0], setHideSubItems = _191[1];
612
+ var _192 = (0, react_1.useState)([]), importTableData = _192[0], setImportTableData = _192[1];
613
+ var _193 = (0, react_1.useState)([]), queryList = _193[0], setQueryList = _193[1];
614
+ var _194 = (0, react_1.useState)(undefined), allQueryList = _194[0], setAllQueryList = _194[1];
613
615
  // INFO: a restored state wins over the prop; its "" is a list the user
614
616
  // ungrouped, so it opens ungrouped
615
- var _193 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
617
+ var _195 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
616
618
  ? persistedState.groupBy || undefined
617
- : (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.groupBy), groupId = _193[0], setGroupId = _193[1];
619
+ : (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _195[0], setGroupId = _195[1];
618
620
  // INFO: Monday-board per-group paging. Keyed by the group key that
619
621
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
620
622
  // Each group tracks its own loaded cursor + total so it can lazily load its
621
623
  // next page as the user scrolls inside that band, independent of every other
622
624
  // group. Only used when renderCheckGroupPaging() is true.
623
- var _194 = (0, react_1.useState)({}), groupPageState = _194[0], setGroupPageState = _194[1];
625
+ var _196 = (0, react_1.useState)({}), groupPageState = _196[0], setGroupPageState = _196[1];
624
626
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
625
627
  // in one tick do not re-fetch an already in-flight page.
626
628
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -629,59 +631,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
629
631
  // list was re-read (new search, filter, sort or grouping) is dropped on
630
632
  // arrival instead of appending rows that belong to the old list
631
633
  var groupPagingGenRef = (0, react_1.useRef)(0);
632
- var _195 = (0, react_1.useState)(""), readTabSection = _195[0], setReadTabSection = _195[1];
633
- var _196 = (0, react_1.useState)(false), readFloatingNav = _196[0], setReadFloatingNav = _196[1];
634
+ var _197 = (0, react_1.useState)(""), readTabSection = _197[0], setReadTabSection = _197[1];
635
+ var _198 = (0, react_1.useState)(false), readFloatingNav = _198[0], setReadFloatingNav = _198[1];
634
636
  var readTabSectionRefs = (0, react_1.useRef)({});
635
637
  //INFO : Used by Read
636
638
  //INFO : Used by Update
637
- var _197 = (0, react_1.useState)(false), modalVisible = _197[0], setModalVisible = _197[1];
638
- var _198 = (0, react_1.useState)(false), deleteModal = _198[0], setDeleteModal = _198[1];
639
- var _199 = (0, react_1.useState)(false), excelModal = _199[0], setExcelModal = _199[1];
640
- var _200 = (0, react_1.useState)(false), exportExcel = _200[0], setExportExcel = _200[1];
641
- var _201 = (0, react_1.useState)(""), exportType = _201[0], setExportType = _201[1];
642
- var _202 = (0, react_1.useState)(false), exportQR = _202[0], setExportQR = _202[1];
643
- var _203 = (0, react_1.useState)(function () {
639
+ var _199 = (0, react_1.useState)(false), modalVisible = _199[0], setModalVisible = _199[1];
640
+ var _200 = (0, react_1.useState)(false), deleteModal = _200[0], setDeleteModal = _200[1];
641
+ var _201 = (0, react_1.useState)(false), excelModal = _201[0], setExcelModal = _201[1];
642
+ var _202 = (0, react_1.useState)(false), exportExcel = _202[0], setExportExcel = _202[1];
643
+ var _203 = (0, react_1.useState)(""), exportType = _203[0], setExportType = _203[1];
644
+ var _204 = (0, react_1.useState)(false), exportQR = _204[0], setExportQR = _204[1];
645
+ var _205 = (0, react_1.useState)(function () {
644
646
  var _a, _b;
645
647
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
646
648
  return firstTabId;
647
- }), activeTab = _203[0], setActiveTab = _203[1];
648
- var _204 = (0, react_1.useState)(false), signatureSigning = _204[0], setSignatureSigning = _204[1];
649
- var _205 = (0, react_1.useState)({}), selectedData = _205[0], setSelectedData = _205[1];
650
- var _206 = (0, react_1.useState)(""), selectedObjectStructureId = _206[0], setSelectedObjectStructureId = _206[1];
651
- var _207 = (0, react_1.useState)(""), selectedObjectId = _207[0], setSelectedObjectId = _207[1];
652
- var _208 = (0, react_1.useState)(""), selectedListAddressId = _208[0], setSelectedListAddressId = _208[1];
653
- var _209 = (0, react_1.useState)(-1), selectedListAddressIndex = _209[0], setSelectedListAddressIndex = _209[1];
654
- var _210 = (0, react_1.useState)({
649
+ }), activeTab = _205[0], setActiveTab = _205[1];
650
+ var _206 = (0, react_1.useState)(false), signatureSigning = _206[0], setSignatureSigning = _206[1];
651
+ var _207 = (0, react_1.useState)({}), selectedData = _207[0], setSelectedData = _207[1];
652
+ var _208 = (0, react_1.useState)(""), selectedObjectStructureId = _208[0], setSelectedObjectStructureId = _208[1];
653
+ var _209 = (0, react_1.useState)(""), selectedObjectId = _209[0], setSelectedObjectId = _209[1];
654
+ var _210 = (0, react_1.useState)(""), selectedListAddressId = _210[0], setSelectedListAddressId = _210[1];
655
+ var _211 = (0, react_1.useState)(-1), selectedListAddressIndex = _211[0], setSelectedListAddressIndex = _211[1];
656
+ var _212 = (0, react_1.useState)({
655
657
  lat: 0,
656
658
  lng: 0,
657
659
  name: "",
658
- }), selectedListAddress = _210[0], setSelectedListAddress = _210[1];
659
- var _211 = (0, react_1.useState)({}), selectedObjectData = _211[0], setSelectedObjectData = _211[1];
660
- var _212 = (0, react_1.useState)(null), objectCellEdit = _212[0], setObjectCellEdit = _212[1];
661
- var _213 = (0, react_1.useState)(false), referenceLoading = _213[0], setReferenceLoading = _213[1];
662
- var _214 = (0, react_1.useState)({}), referencesOptions = _214[0], setReferencesOptions = _214[1];
663
- var _215 = (0, react_1.useState)({}), referencesDetails = _215[0], setReferencesDetails = _215[1];
664
- var _216 = (0, react_1.useState)({}), listReferencesOptions = _216[0], setListReferencesOptions = _216[1];
665
- var _217 = (0, react_1.useState)({}), referenceDeleteTableData = _217[0], setReferenceDeleteTableData = _217[1];
666
- var _218 = (0, react_1.useState)([]), relatedSections = _218[0], setRelatedSections = _218[1];
667
- var _219 = (0, react_1.useState)(0), referenceDeleteIndex = _219[0], setReferenceDeleteIndex = _219[1];
668
- var _220 = (0, react_1.useState)({
660
+ }), selectedListAddress = _212[0], setSelectedListAddress = _212[1];
661
+ var _213 = (0, react_1.useState)({}), selectedObjectData = _213[0], setSelectedObjectData = _213[1];
662
+ var _214 = (0, react_1.useState)(null), objectCellEdit = _214[0], setObjectCellEdit = _214[1];
663
+ var _215 = (0, react_1.useState)(false), referenceLoading = _215[0], setReferenceLoading = _215[1];
664
+ var _216 = (0, react_1.useState)({}), referencesOptions = _216[0], setReferencesOptions = _216[1];
665
+ var _217 = (0, react_1.useState)({}), referencesDetails = _217[0], setReferencesDetails = _217[1];
666
+ var _218 = (0, react_1.useState)({}), listReferencesOptions = _218[0], setListReferencesOptions = _218[1];
667
+ var _219 = (0, react_1.useState)({}), referenceDeleteTableData = _219[0], setReferenceDeleteTableData = _219[1];
668
+ var _220 = (0, react_1.useState)([]), relatedSections = _220[0], setRelatedSections = _220[1];
669
+ var _221 = (0, react_1.useState)(0), referenceDeleteIndex = _221[0], setReferenceDeleteIndex = _221[1];
670
+ var _222 = (0, react_1.useState)({
669
671
  id: "",
670
672
  name: "",
671
673
  type: "string",
672
- }), referenceCreationModal = _220[0], setReferenceCreationModal = _220[1];
673
- var _221 = (0, react_1.useState)({}), referenceModelSchema = _221[0], setReferenceSchema = _221[1];
674
- var _222 = (0, react_1.useState)([]), kanbanChecked = _222[0], setKanbanChecked = _222[1];
674
+ }), referenceCreationModal = _222[0], setReferenceCreationModal = _222[1];
675
+ var _223 = (0, react_1.useState)({}), referenceModelSchema = _223[0], setReferenceSchema = _223[1];
676
+ var _224 = (0, react_1.useState)([]), kanbanChecked = _224[0], setKanbanChecked = _224[1];
675
677
  //INFO : Offline
676
- var _223 = (0, react_1.useState)(0), offlineDataLength = _223[0], setOfflineDataLength = _223[1];
677
- var _224 = (0, react_1.useState)(false), offlineModal = _224[0], setOfflineModal = _224[1];
678
+ var _225 = (0, react_1.useState)(0), offlineDataLength = _225[0], setOfflineDataLength = _225[1];
679
+ var _226 = (0, react_1.useState)(false), offlineModal = _226[0], setOfflineModal = _226[1];
678
680
  // INFO: live-stream state — driven by socket connection and navigator.onLine
679
- var _225 = (0, react_1.useState)(false), isLive = _225[0], setIsLive = _225[1];
680
- var _226 = (0, react_1.useState)(false), isLiveOffline = _226[0], setIsLiveOffline = _226[1];
681
+ var _227 = (0, react_1.useState)(false), isLive = _227[0], setIsLive = _227[1];
682
+ var _228 = (0, react_1.useState)(false), isLiveOffline = _228[0], setIsLiveOffline = _228[1];
681
683
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
682
684
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
683
685
  // Independent of SSE status so it works even when bareSocketName is not set.
684
- var _227 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _227[0], setIsNetworkOffline = _227[1];
686
+ var _229 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _229[0], setIsNetworkOffline = _229[1];
685
687
  var previousType = (0, react_1.useRef)(null);
686
688
  var previousSelectedData = (0, react_1.useRef)(null);
687
689
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -798,7 +800,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
798
800
  * viewId still wins when present: it is a deliberate destination, from a
799
801
  * shared link or a back button.
800
802
  */
801
- var defaultTabName = (_11 = (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.extendedTabs) === null || _10 === void 0 ? void 0 : _10.find(function (eachTab) { return eachTab.defaultTab; })) === null || _11 === void 0 ? void 0 : _11.name;
803
+ var defaultTabName = (_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.extendedTabs) === null || _11 === void 0 ? void 0 : _11.find(function (eachTab) { return eachTab.defaultTab; })) === null || _12 === void 0 ? void 0 : _12.name;
802
804
  // INFO: the pinned tab is a LIST destination. Falling back to it while a
803
805
  // record is open resolved the read view to a list tab, which renderTabContent
804
806
  // refuses — so General Details rendered nothing. Only a list falls back.
@@ -807,7 +809,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
807
809
  : "general");
808
810
  var isFirebaseClient = devSettings.server === "firebase";
809
811
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
810
- var dbModule = isFirebaseClient ? (_12 = props.lib) === null || _12 === void 0 ? void 0 : _12.firebase : (_13 = props.lib) === null || _13 === void 0 ? void 0 : _13.axios;
812
+ var dbModule = isFirebaseClient ? (_13 = props.lib) === null || _13 === void 0 ? void 0 : _13.firebase : (_14 = props.lib) === null || _14 === void 0 ? void 0 : _14.axios;
811
813
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
812
814
  var selectedRelated = resolvedType === "read"
813
815
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -889,32 +891,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
889
891
  }, [
890
892
  resolvedType,
891
893
  props.id,
892
- (_14 = props.space) === null || _14 === void 0 ? void 0 : _14._id,
894
+ (_15 = props.space) === null || _15 === void 0 ? void 0 : _15._id,
893
895
  props.devSettings.schemaEndpoint,
894
- (_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.showRelatedTab,
896
+ (_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.showRelatedTab,
895
897
  ]);
896
898
  /* eslint-enable */
897
899
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
898
900
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
899
- var isViewSettingsEnabled = ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareViewSettings) || ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareNewDTW)
901
+ var isViewSettingsEnabled = ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareViewSettings) || ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareNewDTW)
900
902
  ? true
901
903
  : false;
902
904
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
903
905
  // (shared by every user) — toggling writes to the model and calls back. Without it
904
906
  // the hide is this user's own and lives in userHiddenColumnIds.
905
- var isSchemaHideMode = ((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.onChangeHide) ? true : false;
907
+ var isSchemaHideMode = ((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.onChangeHide) ? true : false;
906
908
  // INFO: rows per page is a view setting the user can change, so it starts from
907
909
  // the persisted value and falls back to the consumer's limit
908
- var _228 = (0, react_1.useState)((_20 = (_19 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _19 !== void 0 ? _19 : props.limit) !== null && _20 !== void 0 ? _20 : 10), pageLimit = _228[0], setPageLimit = _228[1];
910
+ var _230 = (0, react_1.useState)((_21 = (_20 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _20 !== void 0 ? _20 : props.limit) !== null && _21 !== void 0 ? _21 : 10), pageLimit = _230[0], setPageLimit = _230[1];
909
911
  var limit = pageLimit;
910
- var isSavedViewsEnabled = !!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.savedViews) && resolvedType === "list";
912
+ var isSavedViewsEnabled = !!((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.savedViews) && resolvedType === "list";
911
913
  // INFO: an app that stores views takes over from this browser's storage, so
912
914
  // every view is the team's and nothing is kept locally
913
- var isAppViews = ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.sharedViews) !== undefined ||
914
- !!((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.onChangeSharedViews);
915
+ var isAppViews = ((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.sharedViews) !== undefined ||
916
+ !!((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.onChangeSharedViews);
915
917
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
916
918
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
917
- var activeSortId = (isInternalSort && persistedSort) || ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.sort);
919
+ var activeSortId = (isInternalSort && persistedSort) || ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.sort);
918
920
  var handleSortColumn = function (value) {
919
921
  var _a, _b, _c, _d;
920
922
  if (isInternalSort)
@@ -944,19 +946,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
944
946
  // INFO: Firebase pages by document cursor and a union by skip, so neither
945
947
  // can hand over the whole set — there formula columns are not offered for
946
948
  // sorting or filtering, rather than ordering one page
947
- var isFormulaViewSupported = !isFirebase && !((_26 = (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.unionCollections) === null || _26 === void 0 ? void 0 : _26.length);
949
+ var isFormulaViewSupported = !isFirebase && !((_27 = (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.unionCollections) === null || _27 === void 0 ? void 0 : _27.length);
948
950
  var formulaSort = isFormulaViewSupported &&
949
951
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
950
952
  formulaColumnIds.includes(activeSortId.sortId)
951
953
  ? activeSortId
952
954
  : undefined;
953
- // INFO: a referenced record is joined by MongoWrapper's lookup and a list
954
- // row is matched by its Mongo path — neither Firebase nor a union read runs
955
- // them
956
- var flexFilterExtras = !isFirebase && !((_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.unionCollections) === null || _28 === void 0 ? void 0 : _28.length)
955
+ // INFO: a referenced record and related rows are joined by MongoWrapper's
956
+ // lookups and a list row is matched by its Mongo path — neither Firebase nor
957
+ // a union read runs them
958
+ var flexFilterExtras = !isFirebase && !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.unionCollections) === null || _29 === void 0 ? void 0 : _29.length)
957
959
  ? {
958
- references: (_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareFlexFilterReferences,
959
- listObjects: (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareFlexFilterListObjects,
960
+ references: (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareFlexFilterReferences,
961
+ listObjects: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareFlexFilterListObjects,
962
+ related: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterRelated,
960
963
  }
961
964
  : undefined;
962
965
  var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
@@ -1017,18 +1020,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1017
1020
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
1018
1021
  };
1019
1022
  };
1020
- var _229 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _229.canUpdateRecord, canInlineUpdate = _229.canInlineUpdate, canBatchUpdate = _229.canBatchUpdate, canDeleteRecord = _229.canDeleteRecord;
1021
- var isEditor = ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.allEditable) ? true : false;
1022
- var isOffline = (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareOffline;
1023
+ var _231 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _231.canUpdateRecord, canInlineUpdate = _231.canInlineUpdate, canBatchUpdate = _231.canBatchUpdate, canDeleteRecord = _231.canDeleteRecord;
1024
+ var isEditor = ((_33 = props.edit) === null || _33 === void 0 ? void 0 : _33.allEditable) ? true : false;
1025
+ var isOffline = (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareOffline;
1023
1026
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
1024
1027
  // the live network state — online saves go to the server even if bareOffline
1025
1028
  // is true, offline saves go to IDB as normal.
1026
- var isOfflineNetworkListener = isOffline && ((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareOfflineNetworkListener);
1027
- var showId = (_34 = props.space) === null || _34 === void 0 ? void 0 : _34.showId;
1029
+ var isOfflineNetworkListener = isOffline && ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareOfflineNetworkListener);
1030
+ var showId = (_36 = props.space) === null || _36 === void 0 ? void 0 : _36.showId;
1028
1031
  var remainId = showId || selectedObjectStructureId ? true : false;
1029
- var idField = ((_35 = props.space) === null || _35 === void 0 ? void 0 : _35.idField) || ((_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.idField);
1030
- var pipeline = (_37 = props === null || props === void 0 ? void 0 : props.space) === null || _37 === void 0 ? void 0 : _37.pipeline;
1031
- if ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareListPipeline) {
1032
+ var idField = ((_37 = props.space) === null || _37 === void 0 ? void 0 : _37.idField) || ((_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.idField);
1033
+ var pipeline = (_39 = props === null || props === void 0 ? void 0 : props.space) === null || _39 === void 0 ? void 0 : _39.pipeline;
1034
+ if ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareListPipeline) {
1032
1035
  pipeline = pipeline
1033
1036
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
1034
1037
  }
@@ -1041,24 +1044,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1041
1044
  * three records came back instead of five files, and each tile received the
1042
1045
  * whole array rather than one file, so every one of them read "Attachment".
1043
1046
  */
1044
- var fileViewColumnId = (_42 = (_41 = ((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.extendedTabs) !== null && _40 !== void 0 ? _40 : []).find(function (eachTab) {
1047
+ var fileViewColumnId = (_44 = (_43 = ((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.extendedTabs) !== null && _42 !== void 0 ? _42 : []).find(function (eachTab) {
1045
1048
  return eachTab.viewType === "file" &&
1046
1049
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
1047
- })) === null || _41 === void 0 ? void 0 : _41.fileSettings) === null || _42 === void 0 ? void 0 : _42.columnId;
1048
- var hasNavigation = ((_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.handleNavigate) ? true : false;
1050
+ })) === null || _43 === void 0 ? void 0 : _43.fileSettings) === null || _44 === void 0 ? void 0 : _44.columnId;
1051
+ var hasNavigation = ((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.handleNavigate) ? true : false;
1049
1052
  var formColumn = "grid-cols-12";
1050
- var useMobileView = (_45 = (_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareUpdateMobileView) !== null && _45 !== void 0 ? _45 : false;
1053
+ var useMobileView = (_47 = (_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareUpdateMobileView) !== null && _47 !== void 0 ? _47 : false;
1051
1054
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
1052
- var isActivityLog = (((_47 = (_46 = props.edit) === null || _46 === void 0 ? void 0 : _46.activityLog) === null || _47 === void 0 ? void 0 : _47.enableComments) &&
1053
- ((_48 = props.edit) === null || _48 === void 0 ? void 0 : _48.activityLog.commentCollectionId)) ||
1054
- (((_50 = (_49 = props.edit) === null || _49 === void 0 ? void 0 : _49.activityLog) === null || _50 === void 0 ? void 0 : _50.enableLogs) &&
1055
- ((_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog.logsCollectionId));
1056
- var customPaginationSize = ((_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.customPaginationCount)
1055
+ var isActivityLog = (((_49 = (_48 = props.edit) === null || _48 === void 0 ? void 0 : _48.activityLog) === null || _49 === void 0 ? void 0 : _49.enableComments) &&
1056
+ ((_50 = props.edit) === null || _50 === void 0 ? void 0 : _50.activityLog.commentCollectionId)) ||
1057
+ (((_52 = (_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog) === null || _52 === void 0 ? void 0 : _52.enableLogs) &&
1058
+ ((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog.logsCollectionId));
1059
+ var customPaginationSize = ((_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.customPaginationCount)
1057
1060
  ? props.organise.customPaginationCount(size)
1058
1061
  : undefined;
1059
1062
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1060
1063
  var writeServerQuery = new writeQuery_1.WriteQuery({
1061
- dbModule: (_53 = props.lib) === null || _53 === void 0 ? void 0 : _53.axios,
1064
+ dbModule: (_55 = props.lib) === null || _55 === void 0 ? void 0 : _55.axios,
1062
1065
  dbType: devSettings.server,
1063
1066
  dbCollection: props.collectionId,
1064
1067
  dbEndpoint: devSettings.dbEndpoint,
@@ -1066,7 +1069,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1066
1069
  dbUserToken: devSettings.dbUserToken,
1067
1070
  });
1068
1071
  var readServerQuery = new readQuery_1.ReadQuery({
1069
- dbModule: (_54 = props.lib) === null || _54 === void 0 ? void 0 : _54.axios,
1072
+ dbModule: (_56 = props.lib) === null || _56 === void 0 ? void 0 : _56.axios,
1070
1073
  dbType: devSettings.server,
1071
1074
  dbCollection: props.collectionId,
1072
1075
  dbEndpoint: devSettings.dbEndpoint,
@@ -1074,12 +1077,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1074
1077
  dbUserToken: devSettings.dbUserToken,
1075
1078
  });
1076
1079
  var moreButtonPopUp = [
1077
- ((_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.allEditable) &&
1080
+ ((_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.allEditable) &&
1078
1081
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1079
1082
  // datasheet served through one can import; only the browser-direct
1080
1083
  // Firebase client has no server to import through
1081
1084
  !isFirebaseClient &&
1082
- !((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideImportCSV)
1085
+ !((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideImportCSV)
1083
1086
  ? {
1084
1087
  text: "Import Excel",
1085
1088
  onClick: function () {
@@ -1088,7 +1091,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1088
1091
  },
1089
1092
  }
1090
1093
  : null,
1091
- !((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideExportCSV)
1094
+ !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportCSV)
1092
1095
  ? {
1093
1096
  text: "Export CSV",
1094
1097
  onClick: function () {
@@ -1098,7 +1101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1098
1101
  },
1099
1102
  }
1100
1103
  : null,
1101
- !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportExcel)
1104
+ !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportExcel)
1102
1105
  ? {
1103
1106
  text: "Export Excel",
1104
1107
  onClick: function () {
@@ -1108,7 +1111,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1108
1111
  },
1109
1112
  }
1110
1113
  : null,
1111
- !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportPDF)
1114
+ !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportPDF)
1112
1115
  ? {
1113
1116
  text: "Export PDF",
1114
1117
  onClick: function () {
@@ -1118,7 +1121,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1118
1121
  },
1119
1122
  }
1120
1123
  : null,
1121
- !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportQR)
1124
+ !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportQR)
1122
1125
  ? {
1123
1126
  text: "Export QR",
1124
1127
  onClick: function () {
@@ -1128,7 +1131,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1128
1131
  },
1129
1132
  }
1130
1133
  : null,
1131
- !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportQR)
1134
+ !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportQR)
1132
1135
  ? {
1133
1136
  text: "Export QR(Data)",
1134
1137
  onClick: function () {
@@ -1138,7 +1141,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1138
1141
  },
1139
1142
  }
1140
1143
  : null,
1141
- !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportPrint)
1144
+ !((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportPrint)
1142
1145
  ? {
1143
1146
  text: "Print",
1144
1147
  onClick: function () {
@@ -1150,8 +1153,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1150
1153
  : null,
1151
1154
  // INFO: drafts only exist where the form can save one, so the filter has
1152
1155
  // nothing to find on any other page
1153
- ((_70 = props.edit) === null || _70 === void 0 ? void 0 : _70.enableUpdateDraft) &&
1154
- !((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportDraft)
1156
+ ((_72 = props.edit) === null || _72 === void 0 ? void 0 : _72.enableUpdateDraft) &&
1157
+ !((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportDraft)
1155
1158
  ? {
1156
1159
  text: filterDraft ? "Show All Items" : "Filter Draft",
1157
1160
  onClick: function () {
@@ -1160,7 +1163,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1160
1163
  }
1161
1164
  : null,
1162
1165
  ].filter(Boolean);
1163
- if ((_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.moreSettings)
1166
+ if ((_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.moreSettings)
1164
1167
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1165
1168
  //=====================================================================================
1166
1169
  //SECTION: User Column Visibility Handlers
@@ -1554,14 +1557,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1554
1557
  //=====================================================================================
1555
1558
  //SECTION: Saved Views
1556
1559
  //=====================================================================================
1557
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.persistKey, (_75 = devSettings.currentUser) === null || _75 === void 0 ? void 0 : _75.userEmail);
1560
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.persistKey, (_77 = devSettings.currentUser) === null || _77 === void 0 ? void 0 : _77.userEmail);
1558
1561
  (0, react_1.useEffect)(function () {
1559
1562
  if (isSavedViewsEnabled && !isAppViews)
1560
1563
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1561
1564
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1562
1565
  // INFO: the app keeps All's settings, so every change is kept in this
1563
1566
  // browser until the person updates the view for everyone or resets it
1564
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.allView) !== undefined;
1567
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.allView) !== undefined;
1565
1568
  var handleGetViewDraftKey = function (viewId) {
1566
1569
  var _a, _b;
1567
1570
  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);
@@ -1638,7 +1641,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1638
1641
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1639
1642
  (0, react_1.useEffect)(function () {
1640
1643
  lastSentSharedViewsRef.current = null;
1641
- }, [(_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.sharedViews]);
1644
+ }, [(_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.sharedViews]);
1642
1645
  var handleStoreSharedViews = function (update) {
1643
1646
  var _a, _b, _c;
1644
1647
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1683,13 +1686,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1683
1686
  /* eslint-disable */
1684
1687
  }, [
1685
1688
  isSavedViewsEnabled,
1686
- (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.initialSavedViewId,
1687
- (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.defaultSavedViewId,
1688
- (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.sharedViews,
1689
+ (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.initialSavedViewId,
1690
+ (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.defaultSavedViewId,
1691
+ (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews,
1689
1692
  savedViews,
1690
1693
  ]);
1691
1694
  /* eslint-enable */
1692
- var defaultSavedViewIds = ((_82 = (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.defaultSavedViews) !== null && _82 !== void 0 ? _82 : [])
1695
+ var defaultSavedViewIds = ((_84 = (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.defaultSavedViews) !== null && _84 !== void 0 ? _84 : [])
1693
1696
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1694
1697
  .join("|");
1695
1698
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -1991,8 +1994,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1991
1994
  pageLimit,
1992
1995
  groupId,
1993
1996
  columnWidths,
1994
- (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.allView,
1995
- (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.sharedViews,
1997
+ (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.allView,
1998
+ (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.sharedViews,
1996
1999
  savedViews,
1997
2000
  ]);
1998
2001
  /* eslint-enable */
@@ -2032,7 +2035,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2032
2035
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2033
2036
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2034
2037
  /* eslint-disable */
2035
- }, [props.collectionId, (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.persistKey]);
2038
+ }, [props.collectionId, (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.persistKey]);
2036
2039
  /* eslint-enable */
2037
2040
  // INFO: wait a frame — rows land in state one tick before layout
2038
2041
  (0, react_1.useEffect)(function () {
@@ -2067,7 +2070,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2067
2070
  (0, react_1.useEffect)(function () {
2068
2071
  handleOfflinePrefetch();
2069
2072
  /* eslint-disable */
2070
- }, [props.collectionId, (_86 = props.bareSettings) === null || _86 === void 0 ? void 0 : _86.bareOffline]);
2073
+ }, [props.collectionId, (_88 = props.bareSettings) === null || _88 === void 0 ? void 0 : _88.bareOffline]);
2071
2074
  /* eslint-enable */
2072
2075
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2073
2076
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2087,7 +2090,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2087
2090
  }, interval);
2088
2091
  return function () { return clearInterval(timer); };
2089
2092
  /* eslint-disable */
2090
- }, [(_87 = props.bareSettings) === null || _87 === void 0 ? void 0 : _87.barePollingInterval, isLive, isNetworkOffline]);
2093
+ }, [(_89 = props.bareSettings) === null || _89 === void 0 ? void 0 : _89.barePollingInterval, isLive, isNetworkOffline]);
2091
2094
  /* eslint-enable */
2092
2095
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2093
2096
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2129,7 +2132,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2129
2132
  };
2130
2133
  /* eslint-disable */
2131
2134
  }, [
2132
- (_88 = props.bareSettings) === null || _88 === void 0 ? void 0 : _88.bareSocketName,
2135
+ (_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.bareSocketName,
2133
2136
  props.collectionId,
2134
2137
  props.devSettings.sseEndpoint,
2135
2138
  props.devSettings.dbAPIToken,
@@ -2403,10 +2406,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2403
2406
  props.collectionId,
2404
2407
  props.model,
2405
2408
  props.localURLEndpoint,
2406
- (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.extendedTabs,
2409
+ (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.extendedTabs,
2407
2410
  listViewId,
2408
- (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.additionalQuery,
2409
- (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.groupBy,
2411
+ (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.additionalQuery,
2412
+ (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.groupBy,
2410
2413
  resolvedType,
2411
2414
  ]);
2412
2415
  /**
@@ -2558,7 +2561,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2558
2561
  };
2559
2562
  }, 100);
2560
2563
  return function () { return clearTimeout(timeoutId); };
2561
- }, [(_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.showReadFloatingNav, resolvedType, props.id, loading]);
2564
+ }, [(_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.showReadFloatingNav, resolvedType, props.id, loading]);
2562
2565
  (0, react_1.useEffect)(function () {
2563
2566
  if (resolvedType !== "read")
2564
2567
  return;
@@ -5634,7 +5637,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5634
5637
  // update an inline cell edit makes, gated on the same update right
5635
5638
  var columnTypeActions = {
5636
5639
  canUpdate: canUpdateRecord,
5637
- onButtonClick: (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.onButtonClick,
5640
+ onButtonClick: (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.onButtonClick,
5638
5641
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5639
5642
  var _a;
5640
5643
  return __generator(this, function (_b) {
@@ -5651,7 +5654,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5651
5654
  }
5652
5655
  });
5653
5656
  }); },
5654
- onTimeTrackingAction: ((_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.onTimeTrackingAction) && canUpdateRecord
5657
+ onTimeTrackingAction: ((_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.onTimeTrackingAction) && canUpdateRecord
5655
5658
  ? function (rowId, columnId, action) {
5656
5659
  return handleTimeTrackingAction(rowId, columnId, action);
5657
5660
  }
@@ -7865,8 +7868,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7865
7868
  : rows;
7866
7869
  };
7867
7870
  /* eslint-disable */
7868
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.bareNewDTW]);
7869
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.bareNewDTW]);
7871
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_97 = props.bareSettings) === null || _97 === void 0 ? void 0 : _97.bareNewDTW]);
7872
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_98 = props.bareSettings) === null || _98 === void 0 ? void 0 : _98.bareNewDTW]);
7870
7873
  /* eslint-enable */
7871
7874
  // INFO: the pencil beside a record's title opens the same form the Update
7872
7875
  // column's pencil did, for whoever may update; the bubble beside it opens
@@ -8980,9 +8983,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8980
8983
  var actionComponent = renderActionButtons(resolvedType);
8981
8984
  // INFO: active flex filter count for the icon badge + floating search.
8982
8985
  // Counts query output so the badge matches what's actually filtered.
8986
+ // INFO: one per filter row that filters — several rows on one related
8987
+ // datasheet send one condition, and a list count can send two
8983
8988
  var activeFlexFilterCount_1 = ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
8984
- ? (0, listModule_1.renderFlexFilterConditions)(flexFilters, structure, flexFilterExtras)
8985
- .length
8989
+ ? flexFilters.filter(function (eachFilter) {
8990
+ return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure, flexFilterExtras);
8991
+ }).length
8986
8992
  : 0;
8987
8993
  // INFO: without the floating bar these buttons would have nowhere to
8988
8994
  // go, so a hidden search keeps the normal header
@@ -11910,14 +11916,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11910
11916
  };
11911
11917
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
11912
11918
  renderNotification("root"),
11913
- ((_98 = (_97 = props.renderSettings) === null || _97 === void 0 ? void 0 : _97.renderLoadingUI) === null || _98 === void 0 ? void 0 : _98.call(_97)) && loading ? ((_99 = props.renderSettings) === null || _99 === void 0 ? void 0 : _99.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkMode, darkModeBg: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
11919
+ ((_100 = (_99 = props.renderSettings) === null || _99 === void 0 ? void 0 : _99.renderLoadingUI) === null || _100 === void 0 ? void 0 : _100.call(_99)) && loading ? ((_101 = props.renderSettings) === null || _101 === void 0 ? void 0 : _101.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
11914
11920
  var _a, _b;
11915
11921
  if (loading)
11916
11922
  return;
11917
11923
  handlePopUpModal(false);
11918
11924
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
11919
11925
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
11920
- react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
11926
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
11921
11927
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
11922
11928
  if (dataId) {
11923
11929
  var currentValue = selectedData[referenceCreationModal.id];
@@ -11933,19 +11939,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11933
11939
  }, onClose: function () {
11934
11940
  setReferenceCreationModal({ id: "", name: "", type: "string" });
11935
11941
  } }),
11936
- react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
11942
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
11937
11943
  setReferenceDeleteTableData({});
11938
11944
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11939
- react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
11945
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
11940
11946
  setDeletePasscodeInput("");
11941
11947
  setDeleteModal(!deleteModal);
11942
11948
  setDeleteFeedId("");
11943
11949
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11944
- react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
11950
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
11945
11951
  setBatchUpdateData({ columnId: "", columnData: {} });
11946
11952
  setBatchUpdateModal(false);
11947
11953
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11948
- react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
11954
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
11949
11955
  var _a, _b;
11950
11956
  if (props.space)
11951
11957
  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 }));
@@ -11961,13 +11967,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11961
11967
  (0, react_dom_1.createPortal)(
11962
11968
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
11963
11969
  react_1.default.createElement("div", { className: "relative z-50" },
11964
- react_1.default.createElement(drawer_1.Drawer, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
11970
+ react_1.default.createElement(drawer_1.Drawer, { darkMode: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkMode, darkModeBg: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
11965
11971
  // INFO: the record stays set while the drawer slides out — clearing it
11966
11972
  // would remount the hidden panel collection-wide and fetch again. The
11967
11973
  // toolbar's collection-wide button clears it when it opens.
11968
11974
  onClose: function () { return setActivityModal(false); }, anchor: "responsive", maxWidth: "2xl", maxHeight: "75", title: "Activity Log", content: react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
11969
11975
  ? props.title
11970
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_114 = props.id) !== null && _114 !== void 0 ? _114 : "") : activityId, activityLog: (_115 = props.edit) === null || _115 === void 0 ? void 0 : _115.activityLog, model: structure }) })), document.body),
11976
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_116 = props.id) !== null && _116 !== void 0 ? _116 : "") : activityId, activityLog: (_117 = props.edit) === null || _117 === void 0 ? void 0 : _117.activityLog, model: structure }) })), document.body),
11971
11977
  renderScrollSentinel()));
11972
11978
  });
11973
11979
  //# sourceMappingURL=index.js.map