blixify-ui-web 1.2.242 → 1.2.243

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.
@@ -251,10 +251,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
251
251
  // Every read of the view type below uses resolvedType. The distinction matters
252
252
  // most in effect dependency arrays — following props.type there would leave
253
253
  // the list never refetching while the panel is open, which fails silently.
254
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119;
254
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120;
255
255
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
256
256
  // routed straight back into it — so expand-to-full-page is local state.
257
- var _120 = (0, react_1.useState)(false), drawerPageView = _120[0], setDrawerPageView = _120[1];
257
+ var _121 = (0, react_1.useState)(false), drawerPageView = _121[0], setDrawerPageView = _121[1];
258
258
  // INFO: the panel keeps rendering the record it was opened with rather than
259
259
  // live props. Without this, navigating back to the list would re-render the
260
260
  // still-mounted panel as a second list behind the overlay.
@@ -310,7 +310,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
310
310
  drawerFormEditedRef.current = false;
311
311
  }
312
312
  drawerOpenRef.current = isDrawerHost;
313
- var _121 = (0, react_1.useState)(false), drawerDiscardModal = _121[0], setDrawerDiscardModal = _121[1];
313
+ var _122 = (0, react_1.useState)(false), drawerDiscardModal = _122[0], setDrawerDiscardModal = _122[1];
314
314
  // INFO: leaving the record ends the escape, so the next row opened from the
315
315
  // list peeks in the panel again rather than inheriting a full page the user
316
316
  // asked for once. Saving a form on the full page lands on its read view, which
@@ -389,14 +389,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
389
389
  initialFilterReferenceDate: initialFilterReferenceDate,
390
390
  };
391
391
  };
392
- var _122 = intialiseDefaultFilterValues(), initialFilterSearch = _122.initialFilterSearch, initialFilterSearchParams = _122.initialFilterSearchParams, initialFilterSelection = _122.initialFilterSelection, initialFilterReference = _122.initialFilterReference, initialFilterReferenceDate = _122.initialFilterReferenceDate;
392
+ var _123 = intialiseDefaultFilterValues(), initialFilterSearch = _123.initialFilterSearch, initialFilterSearchParams = _123.initialFilterSearchParams, initialFilterSelection = _123.initialFilterSelection, initialFilterReference = _123.initialFilterReference, initialFilterReferenceDate = _123.initialFilterReferenceDate;
393
393
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
394
- var _123 = (0, viewStatePersistence_1.usePersistedViewState)({
394
+ var _124 = (0, viewStatePersistence_1.usePersistedViewState)({
395
395
  mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
396
396
  collectionId: props.collectionId,
397
397
  persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
398
398
  type: resolvedType,
399
- }), rawPersistedState = _123.persistedState, isPersistEnabled = _123.isEnabled, handleSaveView = _123.handleSaveView, handleRegisterViewSnapshot = _123.handleRegisterViewSnapshot;
399
+ }), rawPersistedState = _124.persistedState, isPersistEnabled = _124.isEnabled, handleSaveView = _124.handleSaveView, handleRegisterViewSnapshot = _124.handleRegisterViewSnapshot;
400
400
  // INFO: drop stored filters/sort on removed columns — they would empty the table
401
401
  var persistedState = (0, react_1.useMemo)(function () {
402
402
  var _a, _b, _c, _d;
@@ -412,8 +412,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
412
412
  (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
413
413
  (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
414
414
  ]);
415
- var _124 = (0, react_1.useState)(false), loading = _124[0], setLoading = _124[1];
416
- var _125 = (0, react_1.useState)(), notification = _125[0], setNotification = _125[1];
415
+ var _125 = (0, react_1.useState)(false), loading = _125[0], setLoading = _125[1];
416
+ var _126 = (0, react_1.useState)(), notification = _126[0], setNotification = _126[1];
417
417
  // INFO: a success toast is confirmation, not a decision — it clears itself so
418
418
  // it never sits on the floating step bar; errors stay until dismissed
419
419
  (0, react_1.useEffect)(function () {
@@ -423,67 +423,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
423
423
  return function () { return clearTimeout(timer); };
424
424
  }, [notification]);
425
425
  //INFO : Used by List
426
- var _126 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _126[0], setFilterSearch = _126[1];
427
- var _127 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _127[0], setFilterSearchParams = _127[1];
428
- var _128 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _128[0], setFilterSelection = _128[1];
429
- var _129 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _129[0], setFilterReference = _129[1];
430
- var _130 = (0, react_1.useState)({}), filterReferenceSearch = _130[0], setFilterReferenceSearch = _130[1];
431
- var _131 = (0, react_1.useState)({}), filterReferenceList = _131[0], setFilterReferenceList = _131[1];
432
- var _132 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
426
+ var _127 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _127[0], setFilterSearch = _127[1];
427
+ var _128 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _128[0], setFilterSearchParams = _128[1];
428
+ var _129 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _129[0], setFilterSelection = _129[1];
429
+ var _130 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _130[0], setFilterReference = _130[1];
430
+ var _131 = (0, react_1.useState)({}), filterReferenceSearch = _131[0], setFilterReferenceSearch = _131[1];
431
+ var _132 = (0, react_1.useState)({}), filterReferenceList = _132[0], setFilterReferenceList = _132[1];
432
+ var _133 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
433
433
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
434
- : initialFilterReferenceDate), filterReferenceDate = _132[0], setFilterReferenceDate = _132[1];
435
- var _133 = (0, react_1.useState)(true), tableLoading = _133[0], setTableLoading = _133[1];
436
- var _134 = (0, react_1.useState)(""), cursor = _134[0], setCursor = _134[1];
437
- var _135 = (0, react_1.useState)(""), lastCursor = _135[0], setLastCursor = _135[1];
438
- var _136 = (0, react_1.useState)([]), tableData = _136[0], setTableData = _136[1];
439
- var _137 = (0, react_1.useState)([]), spaceTableData = _137[0], setSpaceTableData = _137[1];
434
+ : initialFilterReferenceDate), filterReferenceDate = _133[0], setFilterReferenceDate = _133[1];
435
+ var _134 = (0, react_1.useState)(true), tableLoading = _134[0], setTableLoading = _134[1];
436
+ var _135 = (0, react_1.useState)(""), cursor = _135[0], setCursor = _135[1];
437
+ var _136 = (0, react_1.useState)(""), lastCursor = _136[0], setLastCursor = _136[1];
438
+ var _137 = (0, react_1.useState)([]), tableData = _137[0], setTableData = _137[1];
439
+ var _138 = (0, react_1.useState)([]), spaceTableData = _138[0], setSpaceTableData = _138[1];
440
440
  // INFO: a save resolves after later renders, so it reads the table from here —
441
441
  // the state it closed over can predate an earlier save on the same row
442
442
  var tableDataRef = (0, react_1.useRef)([]);
443
443
  var spaceTableDataRef = (0, react_1.useRef)([]);
444
444
  tableDataRef.current = tableData;
445
445
  spaceTableDataRef.current = spaceTableData;
446
- var _138 = (0, react_1.useState)(0), size = _138[0], setSize = _138[1];
447
- var _139 = (0, react_1.useState)((_t = (_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _r !== void 0 ? _r : (_s = props.organise) === null || _s === void 0 ? void 0 : _s.pageIndex) !== null && _t !== void 0 ? _t : 0), pageIndex = _139[0], setPageIndex = _139[1];
446
+ var _139 = (0, react_1.useState)(0), size = _139[0], setSize = _139[1];
447
+ var _140 = (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 = _140[0], setPageIndex = _140[1];
448
448
  // INFO: every change of page, including the return to the first page when a
449
449
  // filter or search changes, which onChangePagination does not always report
450
450
  (0, react_1.useEffect)(function () {
451
451
  var _a, _b;
452
452
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
453
453
  }, [pageIndex]);
454
- var _140 = (0, react_1.useState)([]), selectedIds = _140[0], setSelectedIds = _140[1];
455
- var _141 = (0, react_1.useState)(false), selectAll = _141[0], setSelectAll = _141[1];
456
- var _142 = (0, react_1.useState)(""), deletePasscode = _142[0], setDeletePasscode = _142[1];
457
- var _143 = (0, react_1.useState)(""), deletePasscodeInput = _143[0], setDeletePasscodeInput = _143[1];
458
- var _144 = (0, react_1.useState)(""), deleteFeedId = _144[0], setDeleteFeedId = _144[1];
454
+ var _141 = (0, react_1.useState)([]), selectedIds = _141[0], setSelectedIds = _141[1];
455
+ var _142 = (0, react_1.useState)(false), selectAll = _142[0], setSelectAll = _142[1];
456
+ var _143 = (0, react_1.useState)(""), deletePasscode = _143[0], setDeletePasscode = _143[1];
457
+ var _144 = (0, react_1.useState)(""), deletePasscodeInput = _144[0], setDeletePasscodeInput = _144[1];
458
+ var _145 = (0, react_1.useState)(""), deleteFeedId = _145[0], setDeleteFeedId = _145[1];
459
459
  //INFO : Used by List Organise
460
460
  // INFO: Internal sort state that overrides props.organise?.sort when
461
461
  // persistViewState is enabled and a persisted sort exists
462
- var _145 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _145[0], setPersistedSort = _145[1];
463
- var _146 = (0, react_1.useState)(false), filterDraft = _146[0], setFilterDraft = _146[1];
464
- var _147 = (0, react_1.useState)(false), addTabModal = _147[0], setAddTabModal = _147[1];
465
- var _148 = (0, react_1.useState)(-1), editTabIndex = _148[0], setEditTabIndex = _148[1];
462
+ var _146 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _146[0], setPersistedSort = _146[1];
463
+ var _147 = (0, react_1.useState)(false), filterDraft = _147[0], setFilterDraft = _147[1];
464
+ var _148 = (0, react_1.useState)(false), addTabModal = _148[0], setAddTabModal = _148[1];
465
+ var _149 = (0, react_1.useState)(-1), editTabIndex = _149[0], setEditTabIndex = _149[1];
466
466
  //INFO : resolve the initial tab synchronously so the mount cond is already
467
467
  // tab-scoped — an empty initial tab caused a second wasted list fetch
468
- var _149 = (0, react_1.useState)(function () {
468
+ var _150 = (0, react_1.useState)(function () {
469
469
  var _a;
470
470
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
471
- }), selectedTab = _149[0], setSelectedTab = _149[1];
472
- var _150 = (0, react_1.useState)("dayGridMonth"), calendarView = _150[0], setCalendarView = _150[1];
471
+ }), selectedTab = _150[0], setSelectedTab = _150[1];
472
+ var _151 = (0, react_1.useState)("dayGridMonth"), calendarView = _151[0], setCalendarView = _151[1];
473
473
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
474
474
  // (calendarView above drives the matching range query)
475
- var _151 = (0, react_1.useState)("month"), newCalendarViewMode = _151[0], setNewCalendarViewMode = _151[1];
476
- var _152 = (0, react_1.useState)(new Date()), calendarTabMonth = _152[0], setCalendarTabMonth = _152[1];
475
+ var _152 = (0, react_1.useState)("month"), newCalendarViewMode = _152[0], setNewCalendarViewMode = _152[1];
476
+ var _153 = (0, react_1.useState)(new Date()), calendarTabMonth = _153[0], setCalendarTabMonth = _153[1];
477
477
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
478
478
  // whenever its settings change, and that must not undo the user's switch
479
479
  var calendarViewInitRef = (0, react_1.useRef)(false);
480
- var _153 = (0, react_1.useState)(true), kanbanDroppable = _153[0], setKanbanDroppable = _153[1];
481
- var _154 = (0, react_1.useState)([]), kanbanOptions = _154[0], setKanbanOptions = _154[1];
482
- var _155 = (0, react_1.useState)(false), batchUpdateModal = _155[0], setBatchUpdateModal = _155[1];
483
- var _156 = (0, react_1.useState)({
480
+ var _154 = (0, react_1.useState)(true), kanbanDroppable = _154[0], setKanbanDroppable = _154[1];
481
+ var _155 = (0, react_1.useState)([]), kanbanOptions = _155[0], setKanbanOptions = _155[1];
482
+ var _156 = (0, react_1.useState)(false), batchUpdateModal = _156[0], setBatchUpdateModal = _156[1];
483
+ var _157 = (0, react_1.useState)({
484
484
  columnId: "",
485
485
  columnData: {},
486
- }), batchUpdateData = _156[0], setBatchUpdateData = _156[1];
486
+ }), batchUpdateData = _157[0], setBatchUpdateData = _157[1];
487
487
  // INFO: system columns (created / updated at and by, record id, number)
488
488
  // join the structure hidden; the ones a user shows are kept per view
489
489
  var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
@@ -491,12 +491,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
491
491
  var appendedSystemColumnIds = isSystemColumnsEnabled
492
492
  ? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
493
493
  : [];
494
- var _157 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _157[0], setShownSystemColumnIds = _157[1];
494
+ var _158 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _158[0], setShownSystemColumnIds = _158[1];
495
495
  var handleWithSystemColumns = function (model, shownIds) {
496
496
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
497
497
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
498
498
  };
499
- var _158 = (0, react_1.useState)(function () {
499
+ var _159 = (0, react_1.useState)(function () {
500
500
  var _a;
501
501
  var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
502
502
  if (!persistedState)
@@ -523,8 +523,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
523
523
  });
524
524
  }
525
525
  return model;
526
- }), structure = _158[0], setStructure = _158[1];
527
- var _159 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _159[0], setAdditionalQuery = _159[1];
526
+ }), structure = _159[0], setStructure = _159[1];
527
+ var _160 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _160[0], setAdditionalQuery = _160[1];
528
528
  // INFO: State for user-configurable flex filters (Monday.com-style)
529
529
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
530
530
  var defaultFlexFilterRow = [
@@ -535,9 +535,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
535
535
  value: undefined,
536
536
  },
537
537
  ];
538
- var _160 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
539
- ? persistedState.flexFilters
540
- : defaultFlexFilterRow), flexFilters = _160[0], setFlexFilters = _160[1];
538
+ // INFO: rows the host opens the list with come before a saved view's
539
+ var initialFlexFilterRows = ((_z = props.organise) === null || _z === void 0 ? void 0 : _z.initialFlexFilters) &&
540
+ props.organise.initialFlexFilters.length > 0
541
+ ? props.organise.initialFlexFilters
542
+ : (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
543
+ ? persistedState.flexFilters
544
+ : defaultFlexFilterRow;
545
+ var _161 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _161[0], setFlexFilters = _161[1];
541
546
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
542
547
  // clear methods so chained calls in one tick aren't stale.
543
548
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -550,88 +555,86 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
550
555
  }, [flexFilters]);
551
556
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
552
557
  // to prevent API calls on every keystroke when typing in value inputs
553
- var _161 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
554
- ? persistedState.flexFilters
555
- : defaultFlexFilterRow), flexFiltersDebounced = _161[0], setFlexFiltersDebounced = _161[1];
558
+ var _162 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _162[0], setFlexFiltersDebounced = _162[1];
556
559
  // INFO: the filter rows of the export being set up — started from the
557
560
  // list's own when the export opens, so changing them leaves the list as it is
558
- var _162 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _162[0], setExportFlexFilters = _162[1];
559
- var _163 = (0, react_1.useState)({}), flexFilterReferenceOptions = _163[0], setFlexFilterReferenceOptions = _163[1];
560
- var _164 = (0, react_1.useState)({}), flexFilterReferenceSearch = _164[0], setFlexFilterReferenceSearch = _164[1];
561
- var _165 = (0, react_1.useState)(false), flexFilterModalOpen = _165[0], setFlexFilterModalOpen = _165[1];
562
- var _166 = (0, react_1.useState)(false), viewSettingsModalOpen = _166[0], setViewSettingsModalOpen = _166[1];
561
+ var _163 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _163[0], setExportFlexFilters = _163[1];
562
+ var _164 = (0, react_1.useState)({}), flexFilterReferenceOptions = _164[0], setFlexFilterReferenceOptions = _164[1];
563
+ var _165 = (0, react_1.useState)({}), flexFilterReferenceSearch = _165[0], setFlexFilterReferenceSearch = _165[1];
564
+ var _166 = (0, react_1.useState)(false), flexFilterModalOpen = _166[0], setFlexFilterModalOpen = _166[1];
565
+ var _167 = (0, react_1.useState)(false), viewSettingsModalOpen = _167[0], setViewSettingsModalOpen = _167[1];
563
566
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
564
567
  // Deliberately kept out of `structure`: the props-sync effect below resets
565
568
  // structure to props.model whenever props change, which would wipe the
566
569
  // choice, and the persist effect derives schema-level hiddenColumnIds from
567
570
  // structure — writing user hides there would blur the two concepts.
568
- var _167 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _z !== void 0 ? _z : []), userHiddenColumnIds = _167[0], setUserHiddenColumnIds = _167[1];
569
- var _168 = (0, react_1.useState)(""), columnSearch = _168[0], setColumnSearch = _168[1];
570
- var _169 = (0, react_1.useState)([]), savedViews = _169[0], setSavedViews = _169[1];
571
- var _170 = (0, react_1.useState)(null), activeSavedViewId = _170[0], setActiveSavedViewId = _170[1];
571
+ var _168 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _0 !== void 0 ? _0 : []), userHiddenColumnIds = _168[0], setUserHiddenColumnIds = _168[1];
572
+ var _169 = (0, react_1.useState)(""), columnSearch = _169[0], setColumnSearch = _169[1];
573
+ var _170 = (0, react_1.useState)([]), savedViews = _170[0], setSavedViews = _170[1];
574
+ var _171 = (0, react_1.useState)(null), activeSavedViewId = _171[0], setActiveSavedViewId = _171[1];
572
575
  // INFO: the widths of the view on screen, by column id ("180px")
573
- var _171 = (0, react_1.useState)(function () { var _a, _b, _c; return (_c = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.columnWidths) !== null && _c !== void 0 ? _c : {}; }), columnWidths = _171[0], setColumnWidths = _171[1];
576
+ var _172 = (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 = _172[0], setColumnWidths = _172[1];
574
577
  // INFO: unsaved changes are kept only once the opening view is on screen,
575
578
  // so the defaults drawn before it never overwrite a person's own
576
- var _172 = (0, react_1.useState)(false), isViewDraftReady = _172[0], setIsViewDraftReady = _172[1];
579
+ var _173 = (0, react_1.useState)(false), isViewDraftReady = _173[0], setIsViewDraftReady = _173[1];
577
580
  // INFO: null while the name box is closed
578
- var _173 = (0, react_1.useState)(null), savedViewName = _173[0], setSavedViewName = _173[1];
579
- var _174 = (0, react_1.useState)(null), deletingSavedViewId = _174[0], setDeletingSavedViewId = _174[1];
580
- var _175 = (0, react_1.useState)(null), draggingColumnId = _175[0], setDraggingColumnId = _175[1];
581
+ var _174 = (0, react_1.useState)(null), savedViewName = _174[0], setSavedViewName = _174[1];
582
+ var _175 = (0, react_1.useState)(null), deletingSavedViewId = _175[0], setDeletingSavedViewId = _175[1];
583
+ var _176 = (0, react_1.useState)(null), draggingColumnId = _176[0], setDraggingColumnId = _176[1];
581
584
  var columnRowRefs = (0, react_1.useRef)({});
582
585
  //INFO : Used by Auth
583
- var _176 = (0, react_1.useState)({
586
+ var _177 = (0, react_1.useState)({
584
587
  email: "",
585
588
  google: "",
586
589
  phone: "",
587
590
  disabled: false,
588
591
  create: false,
589
- }), authMethods = _176[0], setAuthMethods = _176[1];
590
- var _177 = (0, react_1.useState)(""), selectedAuthMethod = _177[0], setSelectedAuthMethod = _177[1];
592
+ }), authMethods = _177[0], setAuthMethods = _177[1];
593
+ var _178 = (0, react_1.useState)(""), selectedAuthMethod = _178[0], setSelectedAuthMethod = _178[1];
591
594
  // INFO: the sign-in check of a users datasheet's record is running; the
592
595
  // panel shows a spinner rather than nothing, which read as "no login"
593
- var _178 = (0, react_1.useState)(false), authLoading = _178[0], setAuthLoading = _178[1];
596
+ var _179 = (0, react_1.useState)(false), authLoading = _179[0], setAuthLoading = _179[1];
594
597
  // INFO: a delete is running — the ref answers a second tap at once, before
595
598
  // the state has rendered, and the state disables the confirm button
596
599
  var deletingRef = (0, react_1.useRef)(false);
597
- var _179 = (0, react_1.useState)(false), deleting = _179[0], setDeleting = _179[1];
600
+ var _180 = (0, react_1.useState)(false), deleting = _180[0], setDeleting = _180[1];
598
601
  // INFO: Used by Activity Log
599
- var _180 = (0, react_1.useState)(false), activityModal = _180[0], setActivityModal = _180[1];
600
- var _181 = (0, react_1.useState)(""), activityId = _181[0], setActivityId = _181[1];
602
+ var _181 = (0, react_1.useState)(false), activityModal = _181[0], setActivityModal = _181[1];
603
+ var _182 = (0, react_1.useState)(""), activityId = _182[0], setActivityId = _182[1];
601
604
  //INFO : Used by Export
602
- var _182 = (0, react_1.useState)(null), csvFile = _182[0], setCSVFile = _182[1];
603
- var _183 = (0, react_1.useState)([]), csvFileData = _183[0], setCSVFileData = _183[1];
604
- var _184 = (0, react_1.useState)(0), stepCSVIndex = _184[0], setStepCSVIndex = _184[1];
605
- var _185 = (0, react_1.useState)({}), listCSVMapAttribute = _185[0], setListCSVMapAttribute = _185[1];
606
- var _186 = (0, react_1.useState)({}), listCSVObjAttribute = _186[0], setListCSVObjAttribute = _186[1];
607
- var _187 = (0, react_1.useState)([]), csvAPIAttribute = _187[0], setCSVAPIAttribute = _187[1];
608
- var _188 = (0, react_1.useState)(((_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) || ""), exportCSVEmail = _188[0], setExportCSVEmail = _188[1];
609
- var _189 = (0, react_1.useState)(((_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.defaultExportPDFName) || ""), exportPDFTitle = _189[0], setExportPDFTitle = _189[1];
610
- var _190 = (0, react_1.useState)(false), exportPDFLoading = _190[0], setExportPDFLoading = _190[1];
611
- var _191 = (0, react_1.useState)(false), exportReadPDFLoading = _191[0], setExportReadPDFLoading = _191[1];
612
- var _192 = (0, react_1.useState)((_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.exportSettings) === null || _4 === void 0 ? void 0 : _4.sumColumnId) !== null && _5 !== void 0 ? _5 : []), exportSumAttributeIds = _192[0], setExportSumAttributeIds = _192[1];
613
- var _193 = (0, react_1.useState)((_8 = (_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.exportSettings) === null || _7 === void 0 ? void 0 : _7.hideSubItems) !== null && _8 !== void 0 ? _8 : false), hideSubItems = _193[0], setHideSubItems = _193[1];
614
- var _194 = (0, react_1.useState)([]), importTableData = _194[0], setImportTableData = _194[1];
615
- var _195 = (0, react_1.useState)([]), queryList = _195[0], setQueryList = _195[1];
616
- var _196 = (0, react_1.useState)(undefined), allQueryList = _196[0], setAllQueryList = _196[1];
605
+ var _183 = (0, react_1.useState)(null), csvFile = _183[0], setCSVFile = _183[1];
606
+ var _184 = (0, react_1.useState)([]), csvFileData = _184[0], setCSVFileData = _184[1];
607
+ var _185 = (0, react_1.useState)(0), stepCSVIndex = _185[0], setStepCSVIndex = _185[1];
608
+ var _186 = (0, react_1.useState)({}), listCSVMapAttribute = _186[0], setListCSVMapAttribute = _186[1];
609
+ var _187 = (0, react_1.useState)({}), listCSVObjAttribute = _187[0], setListCSVObjAttribute = _187[1];
610
+ var _188 = (0, react_1.useState)([]), csvAPIAttribute = _188[0], setCSVAPIAttribute = _188[1];
611
+ var _189 = (0, react_1.useState)(((_1 = props.devSettings.currentUser) === null || _1 === void 0 ? void 0 : _1.userEmail) || ""), exportCSVEmail = _189[0], setExportCSVEmail = _189[1];
612
+ var _190 = (0, react_1.useState)(((_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.exportSettings) === null || _3 === void 0 ? void 0 : _3.defaultExportPDFName) || ""), exportPDFTitle = _190[0], setExportPDFTitle = _190[1];
613
+ var _191 = (0, react_1.useState)(false), exportPDFLoading = _191[0], setExportPDFLoading = _191[1];
614
+ var _192 = (0, react_1.useState)(false), exportReadPDFLoading = _192[0], setExportReadPDFLoading = _192[1];
615
+ var _193 = (0, react_1.useState)((_6 = (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.exportSettings) === null || _5 === void 0 ? void 0 : _5.sumColumnId) !== null && _6 !== void 0 ? _6 : []), exportSumAttributeIds = _193[0], setExportSumAttributeIds = _193[1];
616
+ var _194 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.hideSubItems) !== null && _9 !== void 0 ? _9 : false), hideSubItems = _194[0], setHideSubItems = _194[1];
617
+ var _195 = (0, react_1.useState)([]), importTableData = _195[0], setImportTableData = _195[1];
618
+ var _196 = (0, react_1.useState)([]), queryList = _196[0], setQueryList = _196[1];
619
+ var _197 = (0, react_1.useState)(undefined), allQueryList = _197[0], setAllQueryList = _197[1];
617
620
  // INFO: a restored state wins over the prop; its "" is a list the user
618
621
  // ungrouped, so it opens ungrouped
619
- var _197 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
622
+ var _198 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
620
623
  ? persistedState.groupBy || undefined
621
- : (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _197[0], setGroupId = _197[1];
624
+ : (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.groupBy), groupId = _198[0], setGroupId = _198[1];
622
625
  // INFO: each group's total per number column, keyed by section id
623
- var _198 = (0, react_1.useState)({}), groupSummaries = _198[0], setGroupSummaries = _198[1];
626
+ var _199 = (0, react_1.useState)({}), groupSummaries = _199[0], setGroupSummaries = _199[1];
624
627
  // INFO: each group's row count over every row the filters match, read when
625
628
  // the groups are built from one page of the list rather than paged alone
626
- var _199 = (0, react_1.useState)({}), groupTotals = _199[0], setGroupTotals = _199[1];
629
+ var _200 = (0, react_1.useState)({}), groupTotals = _200[0], setGroupTotals = _200[1];
627
630
  var groupSummaryRequestRef = (0, react_1.useRef)(0);
628
- var _200 = (0, react_1.useState)({}), commentCounts = _200[0], setCommentCounts = _200[1];
631
+ var _201 = (0, react_1.useState)({}), commentCounts = _201[0], setCommentCounts = _201[1];
629
632
  // INFO: Monday-board per-group paging. Keyed by the group key that
630
633
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
631
634
  // Each group tracks its own loaded cursor + total so it can lazily load its
632
635
  // next page as the user scrolls inside that band, independent of every other
633
636
  // group. Only used when renderCheckGroupPaging() is true.
634
- var _201 = (0, react_1.useState)({}), groupPageState = _201[0], setGroupPageState = _201[1];
637
+ var _202 = (0, react_1.useState)({}), groupPageState = _202[0], setGroupPageState = _202[1];
635
638
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
636
639
  // in one tick do not re-fetch an already in-flight page.
637
640
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -640,59 +643,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
640
643
  // list was re-read (new search, filter, sort or grouping) is dropped on
641
644
  // arrival instead of appending rows that belong to the old list
642
645
  var groupPagingGenRef = (0, react_1.useRef)(0);
643
- var _202 = (0, react_1.useState)(""), readTabSection = _202[0], setReadTabSection = _202[1];
644
- var _203 = (0, react_1.useState)(false), readFloatingNav = _203[0], setReadFloatingNav = _203[1];
646
+ var _203 = (0, react_1.useState)(""), readTabSection = _203[0], setReadTabSection = _203[1];
647
+ var _204 = (0, react_1.useState)(false), readFloatingNav = _204[0], setReadFloatingNav = _204[1];
645
648
  var readTabSectionRefs = (0, react_1.useRef)({});
646
649
  //INFO : Used by Read
647
650
  //INFO : Used by Update
648
- var _204 = (0, react_1.useState)(false), modalVisible = _204[0], setModalVisible = _204[1];
649
- var _205 = (0, react_1.useState)(false), deleteModal = _205[0], setDeleteModal = _205[1];
650
- var _206 = (0, react_1.useState)(false), excelModal = _206[0], setExcelModal = _206[1];
651
- var _207 = (0, react_1.useState)(false), exportExcel = _207[0], setExportExcel = _207[1];
652
- var _208 = (0, react_1.useState)(""), exportType = _208[0], setExportType = _208[1];
653
- var _209 = (0, react_1.useState)(false), exportQR = _209[0], setExportQR = _209[1];
654
- var _210 = (0, react_1.useState)(function () {
651
+ var _205 = (0, react_1.useState)(false), modalVisible = _205[0], setModalVisible = _205[1];
652
+ var _206 = (0, react_1.useState)(false), deleteModal = _206[0], setDeleteModal = _206[1];
653
+ var _207 = (0, react_1.useState)(false), excelModal = _207[0], setExcelModal = _207[1];
654
+ var _208 = (0, react_1.useState)(false), exportExcel = _208[0], setExportExcel = _208[1];
655
+ var _209 = (0, react_1.useState)(""), exportType = _209[0], setExportType = _209[1];
656
+ var _210 = (0, react_1.useState)(false), exportQR = _210[0], setExportQR = _210[1];
657
+ var _211 = (0, react_1.useState)(function () {
655
658
  var _a, _b;
656
659
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
657
660
  return firstTabId;
658
- }), activeTab = _210[0], setActiveTab = _210[1];
659
- var _211 = (0, react_1.useState)(false), signatureSigning = _211[0], setSignatureSigning = _211[1];
660
- var _212 = (0, react_1.useState)({}), selectedData = _212[0], setSelectedData = _212[1];
661
- var _213 = (0, react_1.useState)(""), selectedObjectStructureId = _213[0], setSelectedObjectStructureId = _213[1];
662
- var _214 = (0, react_1.useState)(""), selectedObjectId = _214[0], setSelectedObjectId = _214[1];
663
- var _215 = (0, react_1.useState)(""), selectedListAddressId = _215[0], setSelectedListAddressId = _215[1];
664
- var _216 = (0, react_1.useState)(-1), selectedListAddressIndex = _216[0], setSelectedListAddressIndex = _216[1];
665
- var _217 = (0, react_1.useState)({
661
+ }), activeTab = _211[0], setActiveTab = _211[1];
662
+ var _212 = (0, react_1.useState)(false), signatureSigning = _212[0], setSignatureSigning = _212[1];
663
+ var _213 = (0, react_1.useState)({}), selectedData = _213[0], setSelectedData = _213[1];
664
+ var _214 = (0, react_1.useState)(""), selectedObjectStructureId = _214[0], setSelectedObjectStructureId = _214[1];
665
+ var _215 = (0, react_1.useState)(""), selectedObjectId = _215[0], setSelectedObjectId = _215[1];
666
+ var _216 = (0, react_1.useState)(""), selectedListAddressId = _216[0], setSelectedListAddressId = _216[1];
667
+ var _217 = (0, react_1.useState)(-1), selectedListAddressIndex = _217[0], setSelectedListAddressIndex = _217[1];
668
+ var _218 = (0, react_1.useState)({
666
669
  lat: 0,
667
670
  lng: 0,
668
671
  name: "",
669
- }), selectedListAddress = _217[0], setSelectedListAddress = _217[1];
670
- var _218 = (0, react_1.useState)({}), selectedObjectData = _218[0], setSelectedObjectData = _218[1];
671
- var _219 = (0, react_1.useState)(null), objectCellEdit = _219[0], setObjectCellEdit = _219[1];
672
- var _220 = (0, react_1.useState)(false), referenceLoading = _220[0], setReferenceLoading = _220[1];
673
- var _221 = (0, react_1.useState)({}), referencesOptions = _221[0], setReferencesOptions = _221[1];
674
- var _222 = (0, react_1.useState)({}), referencesDetails = _222[0], setReferencesDetails = _222[1];
675
- var _223 = (0, react_1.useState)({}), listReferencesOptions = _223[0], setListReferencesOptions = _223[1];
676
- var _224 = (0, react_1.useState)({}), referenceDeleteTableData = _224[0], setReferenceDeleteTableData = _224[1];
677
- var _225 = (0, react_1.useState)([]), relatedSections = _225[0], setRelatedSections = _225[1];
678
- var _226 = (0, react_1.useState)(0), referenceDeleteIndex = _226[0], setReferenceDeleteIndex = _226[1];
679
- var _227 = (0, react_1.useState)({
672
+ }), selectedListAddress = _218[0], setSelectedListAddress = _218[1];
673
+ var _219 = (0, react_1.useState)({}), selectedObjectData = _219[0], setSelectedObjectData = _219[1];
674
+ var _220 = (0, react_1.useState)(null), objectCellEdit = _220[0], setObjectCellEdit = _220[1];
675
+ var _221 = (0, react_1.useState)(false), referenceLoading = _221[0], setReferenceLoading = _221[1];
676
+ var _222 = (0, react_1.useState)({}), referencesOptions = _222[0], setReferencesOptions = _222[1];
677
+ var _223 = (0, react_1.useState)({}), referencesDetails = _223[0], setReferencesDetails = _223[1];
678
+ var _224 = (0, react_1.useState)({}), listReferencesOptions = _224[0], setListReferencesOptions = _224[1];
679
+ var _225 = (0, react_1.useState)({}), referenceDeleteTableData = _225[0], setReferenceDeleteTableData = _225[1];
680
+ var _226 = (0, react_1.useState)([]), relatedSections = _226[0], setRelatedSections = _226[1];
681
+ var _227 = (0, react_1.useState)(0), referenceDeleteIndex = _227[0], setReferenceDeleteIndex = _227[1];
682
+ var _228 = (0, react_1.useState)({
680
683
  id: "",
681
684
  name: "",
682
685
  type: "string",
683
- }), referenceCreationModal = _227[0], setReferenceCreationModal = _227[1];
684
- var _228 = (0, react_1.useState)({}), referenceModelSchema = _228[0], setReferenceSchema = _228[1];
685
- var _229 = (0, react_1.useState)([]), kanbanChecked = _229[0], setKanbanChecked = _229[1];
686
+ }), referenceCreationModal = _228[0], setReferenceCreationModal = _228[1];
687
+ var _229 = (0, react_1.useState)({}), referenceModelSchema = _229[0], setReferenceSchema = _229[1];
688
+ var _230 = (0, react_1.useState)([]), kanbanChecked = _230[0], setKanbanChecked = _230[1];
686
689
  //INFO : Offline
687
- var _230 = (0, react_1.useState)(0), offlineDataLength = _230[0], setOfflineDataLength = _230[1];
688
- var _231 = (0, react_1.useState)(false), offlineModal = _231[0], setOfflineModal = _231[1];
690
+ var _231 = (0, react_1.useState)(0), offlineDataLength = _231[0], setOfflineDataLength = _231[1];
691
+ var _232 = (0, react_1.useState)(false), offlineModal = _232[0], setOfflineModal = _232[1];
689
692
  // INFO: live-stream state — driven by socket connection and navigator.onLine
690
- var _232 = (0, react_1.useState)(false), isLive = _232[0], setIsLive = _232[1];
691
- var _233 = (0, react_1.useState)(false), isLiveOffline = _233[0], setIsLiveOffline = _233[1];
693
+ var _233 = (0, react_1.useState)(false), isLive = _233[0], setIsLive = _233[1];
694
+ var _234 = (0, react_1.useState)(false), isLiveOffline = _234[0], setIsLiveOffline = _234[1];
692
695
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
693
696
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
694
697
  // Independent of SSE status so it works even when bareSocketName is not set.
695
- var _234 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _234[0], setIsNetworkOffline = _234[1];
698
+ var _235 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _235[0], setIsNetworkOffline = _235[1];
696
699
  var previousType = (0, react_1.useRef)(null);
697
700
  var previousSelectedData = (0, react_1.useRef)(null);
698
701
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -809,7 +812,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
809
812
  * viewId still wins when present: it is a deliberate destination, from a
810
813
  * shared link or a back button.
811
814
  */
812
- 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;
815
+ var defaultTabName = (_13 = (_12 = (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.extendedTabs) === null || _12 === void 0 ? void 0 : _12.find(function (eachTab) { return eachTab.defaultTab; })) === null || _13 === void 0 ? void 0 : _13.name;
813
816
  // INFO: the pinned tab is a LIST destination. Falling back to it while a
814
817
  // record is open resolved the read view to a list tab, which renderTabContent
815
818
  // refuses — so General Details rendered nothing. Only a list falls back.
@@ -821,14 +824,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
821
824
  // INFO: Firestore reads and the monday wrapper join every condition with AND
822
825
  // (monday flattens all ORs into one), so a flex OR group is offered on Mongo only
823
826
  var isFlexOrSupported = !isFirebase && devSettings.server !== "mondayServer";
824
- var isDateWarnings = !!((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.dateWarnings);
825
- var isDatasheetDefaults = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.datasheetDefaults);
827
+ var isDateWarnings = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.dateWarnings);
828
+ var isDatasheetDefaults = !!((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.datasheetDefaults);
826
829
  // INFO: the columns as the views draw them — with datasheet defaults every
827
830
  // list option without a colour takes the palette colour of its position
828
831
  var displayStructure = isDatasheetDefaults
829
832
  ? (0, defaultColours_1.handleApplyDefaultColours)(structure)
830
833
  : structure;
831
- var dbModule = isFirebaseClient ? (_15 = props.lib) === null || _15 === void 0 ? void 0 : _15.firebase : (_16 = props.lib) === null || _16 === void 0 ? void 0 : _16.axios;
834
+ var dbModule = isFirebaseClient ? (_16 = props.lib) === null || _16 === void 0 ? void 0 : _16.firebase : (_17 = props.lib) === null || _17 === void 0 ? void 0 : _17.axios;
832
835
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
833
836
  var selectedRelated = resolvedType === "read"
834
837
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -953,32 +956,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
953
956
  }, [
954
957
  resolvedType,
955
958
  props.id,
956
- (_17 = props.space) === null || _17 === void 0 ? void 0 : _17._id,
959
+ (_18 = props.space) === null || _18 === void 0 ? void 0 : _18._id,
957
960
  props.devSettings.schemaEndpoint,
958
- (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.showRelatedTab,
961
+ (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.showRelatedTab,
959
962
  ]);
960
963
  /* eslint-enable */
961
964
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
962
965
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
963
- var isViewSettingsEnabled = ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareViewSettings) || ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareNewDTW)
966
+ var isViewSettingsEnabled = ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareViewSettings) || ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareNewDTW)
964
967
  ? true
965
968
  : false;
966
969
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
967
970
  // (shared by every user) — toggling writes to the model and calls back. Without it
968
971
  // the hide is this user's own and lives in userHiddenColumnIds.
969
- var isSchemaHideMode = ((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.onChangeHide) ? true : false;
972
+ var isSchemaHideMode = ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.onChangeHide) ? true : false;
970
973
  // INFO: rows per page is a view setting the user can change, so it starts from
971
974
  // the persisted value and falls back to the consumer's limit
972
- var _235 = (0, react_1.useState)((_23 = (_22 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _22 !== void 0 ? _22 : props.limit) !== null && _23 !== void 0 ? _23 : 10), pageLimit = _235[0], setPageLimit = _235[1];
975
+ var _236 = (0, react_1.useState)((_24 = (_23 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _23 !== void 0 ? _23 : props.limit) !== null && _24 !== void 0 ? _24 : 10), pageLimit = _236[0], setPageLimit = _236[1];
973
976
  var limit = pageLimit;
974
- var isSavedViewsEnabled = !!((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.savedViews) && resolvedType === "list";
977
+ var isSavedViewsEnabled = !!((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.savedViews) && resolvedType === "list";
975
978
  // INFO: an app that stores views takes over from this browser's storage, so
976
979
  // every view is the team's and nothing is kept locally
977
- var isAppViews = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.sharedViews) !== undefined ||
978
- !!((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.onChangeSharedViews);
980
+ var isAppViews = ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.sharedViews) !== undefined ||
981
+ !!((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.onChangeSharedViews);
979
982
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
980
983
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
981
- var activeSortId = (isInternalSort && persistedSort) || ((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.sort);
984
+ var activeSortId = (isInternalSort && persistedSort) || ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.sort);
982
985
  var handleSortColumn = function (value) {
983
986
  var _a, _b, _c, _d;
984
987
  if (isInternalSort)
@@ -1008,7 +1011,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1008
1011
  // INFO: Firebase pages by document cursor and a union by skip, so neither
1009
1012
  // can hand over the whole set — there formula columns are not offered for
1010
1013
  // sorting or filtering, rather than ordering one page
1011
- var isFormulaViewSupported = !isFirebase && !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.unionCollections) === null || _29 === void 0 ? void 0 : _29.length);
1014
+ var isFormulaViewSupported = !isFirebase && !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.unionCollections) === null || _30 === void 0 ? void 0 : _30.length);
1012
1015
  var formulaSort = isFormulaViewSupported &&
1013
1016
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
1014
1017
  formulaColumnIds.includes(activeSortId.sortId)
@@ -1017,11 +1020,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1017
1020
  // INFO: a referenced record and related rows are joined by MongoWrapper's
1018
1021
  // lookups and a list row is matched by its Mongo path — neither Firebase nor
1019
1022
  // a union read runs them
1020
- var flexFilterExtras = !isFirebase && !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.unionCollections) === null || _31 === void 0 ? void 0 : _31.length)
1023
+ var flexFilterExtras = !isFirebase && !((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.unionCollections) === null || _32 === void 0 ? void 0 : _32.length)
1021
1024
  ? {
1022
- references: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterReferences,
1023
- listObjects: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterListObjects,
1024
- related: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterRelated,
1025
+ references: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterReferences,
1026
+ listObjects: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterListObjects,
1027
+ related: (_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareFlexFilterRelated,
1025
1028
  }
1026
1029
  : undefined;
1027
1030
  // INFO: a formula filter is matched in the browser and the rest on the
@@ -1110,18 +1113,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1110
1113
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
1111
1114
  };
1112
1115
  };
1113
- var _236 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _236.canUpdateRecord, canInlineUpdate = _236.canInlineUpdate, canBatchUpdate = _236.canBatchUpdate, canDeleteRecord = _236.canDeleteRecord;
1114
- var isEditor = ((_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.allEditable) ? true : false;
1115
- var isOffline = (_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOffline;
1116
+ var _237 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _237.canUpdateRecord, canInlineUpdate = _237.canInlineUpdate, canBatchUpdate = _237.canBatchUpdate, canDeleteRecord = _237.canDeleteRecord;
1117
+ var isEditor = ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) ? true : false;
1118
+ var isOffline = (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOffline;
1116
1119
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
1117
1120
  // the live network state — online saves go to the server even if bareOffline
1118
1121
  // is true, offline saves go to IDB as normal.
1119
- var isOfflineNetworkListener = isOffline && ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOfflineNetworkListener);
1120
- var showId = (_38 = props.space) === null || _38 === void 0 ? void 0 : _38.showId;
1122
+ var isOfflineNetworkListener = isOffline && ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareOfflineNetworkListener);
1123
+ var showId = (_39 = props.space) === null || _39 === void 0 ? void 0 : _39.showId;
1121
1124
  var remainId = showId || selectedObjectStructureId ? true : false;
1122
- var idField = ((_39 = props.space) === null || _39 === void 0 ? void 0 : _39.idField) || ((_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.idField);
1123
- var pipeline = (_41 = props === null || props === void 0 ? void 0 : props.space) === null || _41 === void 0 ? void 0 : _41.pipeline;
1124
- if ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareListPipeline) {
1125
+ var idField = ((_40 = props.space) === null || _40 === void 0 ? void 0 : _40.idField) || ((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.idField);
1126
+ var pipeline = (_42 = props === null || props === void 0 ? void 0 : props.space) === null || _42 === void 0 ? void 0 : _42.pipeline;
1127
+ if ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListPipeline) {
1125
1128
  pipeline = pipeline
1126
1129
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
1127
1130
  }
@@ -1134,24 +1137,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1134
1137
  * three records came back instead of five files, and each tile received the
1135
1138
  * whole array rather than one file, so every one of them read "Attachment".
1136
1139
  */
1137
- var fileViewColumnId = (_46 = (_45 = ((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.extendedTabs) !== null && _44 !== void 0 ? _44 : []).find(function (eachTab) {
1140
+ var fileViewColumnId = (_47 = (_46 = ((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.extendedTabs) !== null && _45 !== void 0 ? _45 : []).find(function (eachTab) {
1138
1141
  return eachTab.viewType === "file" &&
1139
1142
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
1140
- })) === null || _45 === void 0 ? void 0 : _45.fileSettings) === null || _46 === void 0 ? void 0 : _46.columnId;
1141
- var hasNavigation = ((_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.handleNavigate) ? true : false;
1143
+ })) === null || _46 === void 0 ? void 0 : _46.fileSettings) === null || _47 === void 0 ? void 0 : _47.columnId;
1144
+ var hasNavigation = ((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.handleNavigate) ? true : false;
1142
1145
  var formColumn = "grid-cols-12";
1143
- var useMobileView = (_49 = (_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareUpdateMobileView) !== null && _49 !== void 0 ? _49 : false;
1146
+ var useMobileView = (_50 = (_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareUpdateMobileView) !== null && _50 !== void 0 ? _50 : false;
1144
1147
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
1145
- var isActivityLog = (((_51 = (_50 = props.edit) === null || _50 === void 0 ? void 0 : _50.activityLog) === null || _51 === void 0 ? void 0 : _51.enableComments) &&
1146
- ((_52 = props.edit) === null || _52 === void 0 ? void 0 : _52.activityLog.commentCollectionId)) ||
1147
- (((_54 = (_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog) === null || _54 === void 0 ? void 0 : _54.enableLogs) &&
1148
- ((_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.activityLog.logsCollectionId));
1149
- var customPaginationSize = ((_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.customPaginationCount)
1148
+ var isActivityLog = (((_52 = (_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog) === null || _52 === void 0 ? void 0 : _52.enableComments) &&
1149
+ ((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog.commentCollectionId)) ||
1150
+ (((_55 = (_54 = props.edit) === null || _54 === void 0 ? void 0 : _54.activityLog) === null || _55 === void 0 ? void 0 : _55.enableLogs) &&
1151
+ ((_56 = props.edit) === null || _56 === void 0 ? void 0 : _56.activityLog.logsCollectionId));
1152
+ var customPaginationSize = ((_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.customPaginationCount)
1150
1153
  ? props.organise.customPaginationCount(size)
1151
1154
  : undefined;
1152
1155
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1153
1156
  var writeServerQuery = new writeQuery_1.WriteQuery({
1154
- dbModule: (_57 = props.lib) === null || _57 === void 0 ? void 0 : _57.axios,
1157
+ dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
1155
1158
  dbType: devSettings.server,
1156
1159
  dbCollection: props.collectionId,
1157
1160
  dbEndpoint: devSettings.dbEndpoint,
@@ -1159,7 +1162,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1159
1162
  dbUserToken: devSettings.dbUserToken,
1160
1163
  });
1161
1164
  var readServerQuery = new readQuery_1.ReadQuery({
1162
- dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
1165
+ dbModule: (_59 = props.lib) === null || _59 === void 0 ? void 0 : _59.axios,
1163
1166
  dbType: devSettings.server,
1164
1167
  dbCollection: props.collectionId,
1165
1168
  dbEndpoint: devSettings.dbEndpoint,
@@ -1167,12 +1170,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1167
1170
  dbUserToken: devSettings.dbUserToken,
1168
1171
  });
1169
1172
  var moreButtonPopUp = [
1170
- ((_59 = props.edit) === null || _59 === void 0 ? void 0 : _59.allEditable) &&
1173
+ ((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.allEditable) &&
1171
1174
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1172
1175
  // datasheet served through one can import; only the browser-direct
1173
1176
  // Firebase client has no server to import through
1174
1177
  !isFirebaseClient &&
1175
- !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideImportCSV)
1178
+ !((_62 = (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.exportSettings) === null || _62 === void 0 ? void 0 : _62.hideImportCSV)
1176
1179
  ? {
1177
1180
  text: "Import Excel",
1178
1181
  onClick: function () {
@@ -1181,7 +1184,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1181
1184
  },
1182
1185
  }
1183
1186
  : null,
1184
- !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportCSV)
1187
+ !((_64 = (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.exportSettings) === null || _64 === void 0 ? void 0 : _64.hideExportCSV)
1185
1188
  ? {
1186
1189
  text: "Export CSV",
1187
1190
  onClick: function () {
@@ -1191,7 +1194,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1191
1194
  },
1192
1195
  }
1193
1196
  : null,
1194
- !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportExcel)
1197
+ !((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideExportExcel)
1195
1198
  ? {
1196
1199
  text: "Export Excel",
1197
1200
  onClick: function () {
@@ -1201,7 +1204,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1201
1204
  },
1202
1205
  }
1203
1206
  : null,
1204
- !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportPDF)
1207
+ !((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportPDF)
1205
1208
  ? {
1206
1209
  text: "Export PDF",
1207
1210
  onClick: function () {
@@ -1211,7 +1214,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1211
1214
  },
1212
1215
  }
1213
1216
  : null,
1214
- !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportQR)
1217
+ !((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportQR)
1215
1218
  ? {
1216
1219
  text: "Export QR",
1217
1220
  onClick: function () {
@@ -1221,7 +1224,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1221
1224
  },
1222
1225
  }
1223
1226
  : null,
1224
- !((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportQR)
1227
+ !((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportQR)
1225
1228
  ? {
1226
1229
  text: "Export QR(Data)",
1227
1230
  onClick: function () {
@@ -1231,7 +1234,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1231
1234
  },
1232
1235
  }
1233
1236
  : null,
1234
- !((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportPrint)
1237
+ !((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportPrint)
1235
1238
  ? {
1236
1239
  text: "Print",
1237
1240
  onClick: function () {
@@ -1243,8 +1246,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1243
1246
  : null,
1244
1247
  // INFO: drafts only exist where the form can save one, so the filter has
1245
1248
  // nothing to find on any other page
1246
- ((_74 = props.edit) === null || _74 === void 0 ? void 0 : _74.enableUpdateDraft) &&
1247
- !((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideExportDraft)
1249
+ ((_75 = props.edit) === null || _75 === void 0 ? void 0 : _75.enableUpdateDraft) &&
1250
+ !((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportDraft)
1248
1251
  ? {
1249
1252
  text: filterDraft ? "Show All Items" : "Filter Draft",
1250
1253
  onClick: function () {
@@ -1253,7 +1256,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1253
1256
  }
1254
1257
  : null,
1255
1258
  ].filter(Boolean);
1256
- if ((_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.moreSettings)
1259
+ if ((_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.moreSettings)
1257
1260
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1258
1261
  //=====================================================================================
1259
1262
  //SECTION: User Column Visibility Handlers
@@ -1693,14 +1696,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1693
1696
  //=====================================================================================
1694
1697
  //SECTION: Saved Views
1695
1698
  //=====================================================================================
1696
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.persistKey, (_79 = devSettings.currentUser) === null || _79 === void 0 ? void 0 : _79.userEmail);
1699
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.persistKey, (_80 = devSettings.currentUser) === null || _80 === void 0 ? void 0 : _80.userEmail);
1697
1700
  (0, react_1.useEffect)(function () {
1698
1701
  if (isSavedViewsEnabled && !isAppViews)
1699
1702
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1700
1703
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1701
1704
  // INFO: the app keeps All's settings, so every change is kept in this
1702
1705
  // browser until the person updates the view for everyone or resets it
1703
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.allView) !== undefined;
1706
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.allView) !== undefined;
1704
1707
  var handleGetViewDraftKey = function (viewId) {
1705
1708
  var _a, _b;
1706
1709
  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);
@@ -1777,7 +1780,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1777
1780
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1778
1781
  (0, react_1.useEffect)(function () {
1779
1782
  lastSentSharedViewsRef.current = null;
1780
- }, [(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.sharedViews]);
1783
+ }, [(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews]);
1781
1784
  var handleStoreSharedViews = function (update) {
1782
1785
  var _a, _b, _c;
1783
1786
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1822,13 +1825,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1822
1825
  /* eslint-disable */
1823
1826
  }, [
1824
1827
  isSavedViewsEnabled,
1825
- (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.initialSavedViewId,
1826
- (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.defaultSavedViewId,
1827
- (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.sharedViews,
1828
+ (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.initialSavedViewId,
1829
+ (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.defaultSavedViewId,
1830
+ (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.sharedViews,
1828
1831
  savedViews,
1829
1832
  ]);
1830
1833
  /* eslint-enable */
1831
- var defaultSavedViewIds = ((_86 = (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.defaultSavedViews) !== null && _86 !== void 0 ? _86 : [])
1834
+ var defaultSavedViewIds = ((_87 = (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.defaultSavedViews) !== null && _87 !== void 0 ? _87 : [])
1832
1835
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1833
1836
  .join("|");
1834
1837
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -2130,8 +2133,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2130
2133
  pageLimit,
2131
2134
  groupId,
2132
2135
  columnWidths,
2133
- (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.allView,
2134
- (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.sharedViews,
2136
+ (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.allView,
2137
+ (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.sharedViews,
2135
2138
  savedViews,
2136
2139
  ]);
2137
2140
  /* eslint-enable */
@@ -2171,7 +2174,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2171
2174
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2172
2175
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2173
2176
  /* eslint-disable */
2174
- }, [props.collectionId, (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.persistKey]);
2177
+ }, [props.collectionId, (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.persistKey]);
2175
2178
  /* eslint-enable */
2176
2179
  // INFO: wait a frame — rows land in state one tick before layout
2177
2180
  (0, react_1.useEffect)(function () {
@@ -2206,7 +2209,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2206
2209
  (0, react_1.useEffect)(function () {
2207
2210
  handleOfflinePrefetch();
2208
2211
  /* eslint-disable */
2209
- }, [props.collectionId, (_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.bareOffline]);
2212
+ }, [props.collectionId, (_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.bareOffline]);
2210
2213
  /* eslint-enable */
2211
2214
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2212
2215
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2226,7 +2229,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2226
2229
  }, interval);
2227
2230
  return function () { return clearInterval(timer); };
2228
2231
  /* eslint-disable */
2229
- }, [(_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.barePollingInterval, isLive, isNetworkOffline]);
2232
+ }, [(_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.barePollingInterval, isLive, isNetworkOffline]);
2230
2233
  /* eslint-enable */
2231
2234
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2232
2235
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2268,7 +2271,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2268
2271
  };
2269
2272
  /* eslint-disable */
2270
2273
  }, [
2271
- (_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.bareSocketName,
2274
+ (_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareSocketName,
2272
2275
  props.collectionId,
2273
2276
  props.devSettings.sseEndpoint,
2274
2277
  props.devSettings.dbAPIToken,
@@ -2542,10 +2545,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2542
2545
  props.collectionId,
2543
2546
  props.model,
2544
2547
  props.localURLEndpoint,
2545
- (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.extendedTabs,
2548
+ (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.extendedTabs,
2546
2549
  listViewId,
2547
- (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.additionalQuery,
2548
- (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.groupBy,
2550
+ (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.additionalQuery,
2551
+ (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.groupBy,
2549
2552
  resolvedType,
2550
2553
  ]);
2551
2554
  /**
@@ -2697,7 +2700,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2697
2700
  };
2698
2701
  }, 100);
2699
2702
  return function () { return clearTimeout(timeoutId); };
2700
- }, [(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.showReadFloatingNav, resolvedType, props.id, loading]);
2703
+ }, [(_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.showReadFloatingNav, resolvedType, props.id, loading]);
2701
2704
  (0, react_1.useEffect)(function () {
2702
2705
  if (resolvedType !== "read")
2703
2706
  return;
@@ -5812,7 +5815,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5812
5815
  var columnTypeActions = {
5813
5816
  canUpdate: canUpdateRecord,
5814
5817
  dateWarnings: isDateWarnings,
5815
- onButtonClick: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.onButtonClick,
5818
+ onButtonClick: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onButtonClick,
5816
5819
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5817
5820
  var _a;
5818
5821
  return __generator(this, function (_b) {
@@ -5829,7 +5832,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5829
5832
  }
5830
5833
  });
5831
5834
  }); },
5832
- onTimeTrackingAction: ((_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onTimeTrackingAction) && canUpdateRecord
5835
+ onTimeTrackingAction: ((_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.onTimeTrackingAction) && canUpdateRecord
5833
5836
  ? function (rowId, columnId, action) {
5834
5837
  return handleTimeTrackingAction(rowId, columnId, action);
5835
5838
  }
@@ -8050,8 +8053,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8050
8053
  : rows;
8051
8054
  };
8052
8055
  /* eslint-disable */
8053
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_99 = props.bareSettings) === null || _99 === void 0 ? void 0 : _99.bareNewDTW]);
8054
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
8056
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
8057
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_101 = props.bareSettings) === null || _101 === void 0 ? void 0 : _101.bareNewDTW]);
8055
8058
  /* eslint-enable */
8056
8059
  // INFO: the pencil beside a record's title opens the same form the Update
8057
8060
  // column's pencil did, for whoever may update; the bubble beside it opens
@@ -10253,7 +10256,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
10253
10256
  // same prettifier so its rows carry the shape of every other row. Returns
10254
10257
  // undefined when the list was re-read while the page was in flight.
10255
10258
  var handleReadGroupPage = function (groupKey, cursor) { return __awaiter(void 0, void 0, void 0, function () {
10256
- var generation, groupAttributeDS, groupQuery, mainCond, responseData, rawRows, count, prettierRows;
10259
+ var generation, groupAttributeDS, groupQuery, mainCond, sectionQuery, responseData, rawRows, count, prettierRows;
10257
10260
  var _a, _b, _c, _d, _e, _f, _g, _h;
10258
10261
  return __generator(this, function (_j) {
10259
10262
  switch (_j.label) {
@@ -10264,7 +10267,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
10264
10267
  return [2 /*return*/, undefined];
10265
10268
  groupQuery = (0, groupSections_1.handleGetGroupSectionQuery)(groupAttributeDS, groupKey, (_a = handleGetGroupColumnOptions()) !== null && _a !== void 0 ? _a : []);
10266
10269
  mainCond = handleReadQueryHocCond();
10267
- return [4 /*yield*/, readServerQuery.call(__assign(__assign({}, mainCond), { query: __spreadArray(__spreadArray([], ((_b = mainCond.query) !== null && _b !== void 0 ? _b : []), true), groupQuery, true), cursor: cursor, limit: limit, stopLimit: undefined, skip: 0 }))];
10270
+ sectionQuery = (0, groupSections_1.handleScopeSectionQuery)(groupQuery, (_b = mainCond.query) !== null && _b !== void 0 ? _b : []);
10271
+ // INFO: the list's own filters leave this section no rows
10272
+ if (!sectionQuery)
10273
+ return [2 /*return*/, { rawRows: [], prettierRows: [], count: 0 }];
10274
+ return [4 /*yield*/, readServerQuery.call(__assign(__assign({}, mainCond), { query: sectionQuery, cursor: cursor, limit: limit, stopLimit: undefined, skip: 0 }))];
10268
10275
  case 1:
10269
10276
  responseData = _j.sent();
10270
10277
  if (generation !== groupPagingGenRef.current)
@@ -12293,14 +12300,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12293
12300
  };
12294
12301
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
12295
12302
  renderNotification("root"),
12296
- ((_102 = (_101 = props.renderSettings) === null || _101 === void 0 ? void 0 : _101.renderLoadingUI) === null || _102 === void 0 ? void 0 : _102.call(_101)) && loading ? ((_103 = props.renderSettings) === null || _103 === void 0 ? void 0 : _103.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12303
+ ((_103 = (_102 = props.renderSettings) === null || _102 === void 0 ? void 0 : _102.renderLoadingUI) === null || _103 === void 0 ? void 0 : _103.call(_102)) && loading ? ((_104 = props.renderSettings) === null || _104 === void 0 ? void 0 : _104.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkMode, darkModeBg: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12297
12304
  var _a, _b;
12298
12305
  if (loading)
12299
12306
  return;
12300
12307
  handlePopUpModal(false);
12301
12308
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
12302
12309
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
12303
- react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12310
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkMode, darkModeBg: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12304
12311
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
12305
12312
  if (dataId) {
12306
12313
  var currentValue = selectedData[referenceCreationModal.id];
@@ -12316,19 +12323,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12316
12323
  }, onClose: function () {
12317
12324
  setReferenceCreationModal({ id: "", name: "", type: "string" });
12318
12325
  } }),
12319
- react_1.default.createElement(modal_1.Modal, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12326
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkMode, darkModeBg: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12320
12327
  setReferenceDeleteTableData({});
12321
12328
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12322
- react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12329
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkMode, darkModeBg: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12323
12330
  setDeletePasscodeInput("");
12324
12331
  setDeleteModal(!deleteModal);
12325
12332
  setDeleteFeedId("");
12326
12333
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12327
- react_1.default.createElement(modal_1.Modal, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12334
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkMode, darkModeBg: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12328
12335
  setBatchUpdateData({ columnId: "", columnData: {} });
12329
12336
  setBatchUpdateModal(false);
12330
12337
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12331
- react_1.default.createElement(modal_1.Modal, { darkMode: (_114 = props.organise) === null || _114 === void 0 ? void 0 : _114.darkMode, darkModeBg: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12338
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkMode, darkModeBg: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12332
12339
  var _a, _b;
12333
12340
  if (props.space)
12334
12341
  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 }));
@@ -12344,13 +12351,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12344
12351
  (0, react_dom_1.createPortal)(
12345
12352
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
12346
12353
  react_1.default.createElement("div", { className: "relative z-50" },
12347
- react_1.default.createElement(drawer_1.Drawer, { darkMode: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkMode, darkModeBg: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12354
+ react_1.default.createElement(drawer_1.Drawer, { darkMode: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkMode, darkModeBg: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12348
12355
  // INFO: the record stays set while the drawer slides out — clearing it
12349
12356
  // would remount the hidden panel collection-wide and fetch again. The
12350
12357
  // toolbar's collection-wide button clears it when it opens.
12351
12358
  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"
12352
12359
  ? props.title
12353
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_118 = props.id) !== null && _118 !== void 0 ? _118 : "") : activityId, activityLog: (_119 = props.edit) === null || _119 === void 0 ? void 0 : _119.activityLog, model: structure }) })), document.body),
12360
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_119 = props.id) !== null && _119 !== void 0 ? _119 : "") : activityId, activityLog: (_120 = props.edit) === null || _120 === void 0 ? void 0 : _120.activityLog, model: structure }) })), document.body),
12354
12361
  renderScrollSentinel()));
12355
12362
  });
12356
12363
  //# sourceMappingURL=index.js.map