blixify-ui-web 1.2.229 → 1.2.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/lib/components/data/dataGraph/index.d.ts +1 -0
  2. package/lib/components/data/dataGraph/index.d.ts.map +1 -1
  3. package/lib/components/data/dataGraph/index.js +73 -25
  4. package/lib/components/data/dataGraph/index.js.map +1 -1
  5. package/lib/components/data/dataTemplate/activityChanges.d.ts.map +1 -1
  6. package/lib/components/data/dataTemplate/activityChanges.js +10 -1
  7. package/lib/components/data/dataTemplate/activityChanges.js.map +1 -1
  8. package/lib/components/data/dataTemplate/activityImported.d.ts +6 -0
  9. package/lib/components/data/dataTemplate/activityImported.d.ts.map +1 -1
  10. package/lib/components/data/dataTemplate/activityImported.js +22 -3
  11. package/lib/components/data/dataTemplate/activityImported.js.map +1 -1
  12. package/lib/components/data/dataTemplate/activityModal.d.ts.map +1 -1
  13. package/lib/components/data/dataTemplate/activityModal.js +2 -2
  14. package/lib/components/data/dataTemplate/activityModal.js.map +1 -1
  15. package/lib/components/data/dataTemplate/chartBuilder.d.ts +1 -1
  16. package/lib/components/data/dataTemplate/chartBuilder.d.ts.map +1 -1
  17. package/lib/components/data/dataTemplate/chartBuilder.js +5 -4
  18. package/lib/components/data/dataTemplate/chartBuilder.js.map +1 -1
  19. package/lib/components/data/dataTemplate/chartView.d.ts +2 -0
  20. package/lib/components/data/dataTemplate/chartView.d.ts.map +1 -1
  21. package/lib/components/data/dataTemplate/chartView.js +5 -5
  22. package/lib/components/data/dataTemplate/chartView.js.map +1 -1
  23. package/lib/components/data/dataTemplate/dataStateModel.d.ts +6 -0
  24. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  25. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  26. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  27. package/lib/components/data/dataTemplate/index.js +216 -208
  28. package/lib/components/data/dataTemplate/index.js.map +1 -1
  29. package/lib/components/display/newTable/index.d.ts.map +1 -1
  30. package/lib/components/display/newTable/index.js +39 -15
  31. package/lib/components/display/newTable/index.js.map +1 -1
  32. package/lib/components/input/select/index.d.ts.map +1 -1
  33. package/lib/components/input/select/index.js +13 -4
  34. package/lib/components/input/select/index.js.map +1 -1
  35. package/lib/tail.css +1 -1
  36. package/package.json +1 -1
@@ -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;
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;
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 _119 = (0, react_1.useState)(false), drawerPageView = _119[0], setDrawerPageView = _119[1];
257
+ var _120 = (0, react_1.useState)(false), drawerPageView = _120[0], setDrawerPageView = _120[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 _120 = (0, react_1.useState)(false), drawerDiscardModal = _120[0], setDrawerDiscardModal = _120[1];
313
+ var _121 = (0, react_1.useState)(false), drawerDiscardModal = _121[0], setDrawerDiscardModal = _121[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 _121 = intialiseDefaultFilterValues(), initialFilterSearch = _121.initialFilterSearch, initialFilterSearchParams = _121.initialFilterSearchParams, initialFilterSelection = _121.initialFilterSelection, initialFilterReference = _121.initialFilterReference, initialFilterReferenceDate = _121.initialFilterReferenceDate;
392
+ var _122 = intialiseDefaultFilterValues(), initialFilterSearch = _122.initialFilterSearch, initialFilterSearchParams = _122.initialFilterSearchParams, initialFilterSelection = _122.initialFilterSelection, initialFilterReference = _122.initialFilterReference, initialFilterReferenceDate = _122.initialFilterReferenceDate;
393
393
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
394
- var _122 = (0, viewStatePersistence_1.usePersistedViewState)({
394
+ var _123 = (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 = _122.persistedState, isPersistEnabled = _122.isEnabled, handleSaveView = _122.handleSaveView, handleRegisterViewSnapshot = _122.handleRegisterViewSnapshot;
399
+ }), rawPersistedState = _123.persistedState, isPersistEnabled = _123.isEnabled, handleSaveView = _123.handleSaveView, handleRegisterViewSnapshot = _123.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 _123 = (0, react_1.useState)(false), loading = _123[0], setLoading = _123[1];
416
- var _124 = (0, react_1.useState)(), notification = _124[0], setNotification = _124[1];
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];
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 _125 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _125[0], setFilterSearch = _125[1];
427
- var _126 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _126[0], setFilterSearchParams = _126[1];
428
- var _127 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _127[0], setFilterSelection = _127[1];
429
- var _128 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _128[0], setFilterReference = _128[1];
430
- var _129 = (0, react_1.useState)({}), filterReferenceSearch = _129[0], setFilterReferenceSearch = _129[1];
431
- var _130 = (0, react_1.useState)({}), filterReferenceList = _130[0], setFilterReferenceList = _130[1];
432
- var _131 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
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)
433
433
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
434
- : initialFilterReferenceDate), filterReferenceDate = _131[0], setFilterReferenceDate = _131[1];
435
- var _132 = (0, react_1.useState)(true), tableLoading = _132[0], setTableLoading = _132[1];
436
- var _133 = (0, react_1.useState)(""), cursor = _133[0], setCursor = _133[1];
437
- var _134 = (0, react_1.useState)(""), lastCursor = _134[0], setLastCursor = _134[1];
438
- var _135 = (0, react_1.useState)([]), tableData = _135[0], setTableData = _135[1];
439
- var _136 = (0, react_1.useState)([]), spaceTableData = _136[0], setSpaceTableData = _136[1];
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];
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 _137 = (0, react_1.useState)(0), size = _137[0], setSize = _137[1];
447
- var _138 = (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 = _138[0], setPageIndex = _138[1];
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];
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 _139 = (0, react_1.useState)([]), selectedIds = _139[0], setSelectedIds = _139[1];
455
- var _140 = (0, react_1.useState)(false), selectAll = _140[0], setSelectAll = _140[1];
456
- var _141 = (0, react_1.useState)(""), deletePasscode = _141[0], setDeletePasscode = _141[1];
457
- var _142 = (0, react_1.useState)(""), deletePasscodeInput = _142[0], setDeletePasscodeInput = _142[1];
458
- var _143 = (0, react_1.useState)(""), deleteFeedId = _143[0], setDeleteFeedId = _143[1];
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];
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 _144 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _144[0], setPersistedSort = _144[1];
463
- var _145 = (0, react_1.useState)(false), filterDraft = _145[0], setFilterDraft = _145[1];
464
- var _146 = (0, react_1.useState)(false), addTabModal = _146[0], setAddTabModal = _146[1];
465
- var _147 = (0, react_1.useState)(-1), editTabIndex = _147[0], setEditTabIndex = _147[1];
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];
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 _148 = (0, react_1.useState)(function () {
468
+ var _149 = (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 = _148[0], setSelectedTab = _148[1];
472
- var _149 = (0, react_1.useState)("dayGridMonth"), calendarView = _149[0], setCalendarView = _149[1];
471
+ }), selectedTab = _149[0], setSelectedTab = _149[1];
472
+ var _150 = (0, react_1.useState)("dayGridMonth"), calendarView = _150[0], setCalendarView = _150[1];
473
473
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
474
474
  // (calendarView above drives the matching range query)
475
- var _150 = (0, react_1.useState)("month"), newCalendarViewMode = _150[0], setNewCalendarViewMode = _150[1];
476
- var _151 = (0, react_1.useState)(new Date()), calendarTabMonth = _151[0], setCalendarTabMonth = _151[1];
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];
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 _152 = (0, react_1.useState)(true), kanbanDroppable = _152[0], setKanbanDroppable = _152[1];
481
- var _153 = (0, react_1.useState)([]), kanbanOptions = _153[0], setKanbanOptions = _153[1];
482
- var _154 = (0, react_1.useState)(false), batchUpdateModal = _154[0], setBatchUpdateModal = _154[1];
483
- var _155 = (0, react_1.useState)({
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)({
484
484
  columnId: "",
485
485
  columnData: {},
486
- }), batchUpdateData = _155[0], setBatchUpdateData = _155[1];
486
+ }), batchUpdateData = _156[0], setBatchUpdateData = _156[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 _156 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _156[0], setShownSystemColumnIds = _156[1];
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];
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 _157 = (0, react_1.useState)(function () {
499
+ var _158 = (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 = _157[0], setStructure = _157[1];
527
- var _158 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _158[0], setAdditionalQuery = _158[1];
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];
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,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
535
535
  value: undefined,
536
536
  },
537
537
  ];
538
- var _159 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
538
+ var _160 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
539
539
  ? persistedState.flexFilters
540
- : defaultFlexFilterRow), flexFilters = _159[0], setFlexFilters = _159[1];
540
+ : defaultFlexFilterRow), flexFilters = _160[0], setFlexFilters = _160[1];
541
541
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
542
542
  // clear methods so chained calls in one tick aren't stale.
543
543
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -550,85 +550,85 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
550
550
  }, [flexFilters]);
551
551
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
552
552
  // to prevent API calls on every keystroke when typing in value inputs
553
- var _160 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
553
+ var _161 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
554
554
  ? persistedState.flexFilters
555
- : defaultFlexFilterRow), flexFiltersDebounced = _160[0], setFlexFiltersDebounced = _160[1];
555
+ : defaultFlexFilterRow), flexFiltersDebounced = _161[0], setFlexFiltersDebounced = _161[1];
556
556
  // INFO: the filter rows of the export being set up — started from the
557
557
  // list's own when the export opens, so changing them leaves the list as it is
558
- var _161 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _161[0], setExportFlexFilters = _161[1];
559
- var _162 = (0, react_1.useState)({}), flexFilterReferenceOptions = _162[0], setFlexFilterReferenceOptions = _162[1];
560
- var _163 = (0, react_1.useState)({}), flexFilterReferenceSearch = _163[0], setFlexFilterReferenceSearch = _163[1];
561
- var _164 = (0, react_1.useState)(false), flexFilterModalOpen = _164[0], setFlexFilterModalOpen = _164[1];
562
- var _165 = (0, react_1.useState)(false), viewSettingsModalOpen = _165[0], setViewSettingsModalOpen = _165[1];
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];
563
563
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
564
564
  // Deliberately kept out of `structure`: the props-sync effect below resets
565
565
  // structure to props.model whenever props change, which would wipe the
566
566
  // choice, and the persist effect derives schema-level hiddenColumnIds from
567
567
  // structure — writing user hides there would blur the two concepts.
568
- var _166 = (0, react_1.useState)((_z = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _z !== void 0 ? _z : []), userHiddenColumnIds = _166[0], setUserHiddenColumnIds = _166[1];
569
- var _167 = (0, react_1.useState)(""), columnSearch = _167[0], setColumnSearch = _167[1];
570
- var _168 = (0, react_1.useState)([]), savedViews = _168[0], setSavedViews = _168[1];
571
- var _169 = (0, react_1.useState)(null), activeSavedViewId = _169[0], setActiveSavedViewId = _169[1];
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];
572
572
  // INFO: the widths of the view on screen, by column id ("180px")
573
- var _170 = (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 = _170[0], setColumnWidths = _170[1];
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];
574
574
  // INFO: unsaved changes are kept only once the opening view is on screen,
575
575
  // so the defaults drawn before it never overwrite a person's own
576
- var _171 = (0, react_1.useState)(false), isViewDraftReady = _171[0], setIsViewDraftReady = _171[1];
576
+ var _172 = (0, react_1.useState)(false), isViewDraftReady = _172[0], setIsViewDraftReady = _172[1];
577
577
  // INFO: null while the name box is closed
578
- var _172 = (0, react_1.useState)(null), savedViewName = _172[0], setSavedViewName = _172[1];
579
- var _173 = (0, react_1.useState)(null), deletingSavedViewId = _173[0], setDeletingSavedViewId = _173[1];
580
- var _174 = (0, react_1.useState)(null), draggingColumnId = _174[0], setDraggingColumnId = _174[1];
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
581
  var columnRowRefs = (0, react_1.useRef)({});
582
582
  //INFO : Used by Auth
583
- var _175 = (0, react_1.useState)({
583
+ var _176 = (0, react_1.useState)({
584
584
  email: "",
585
585
  google: "",
586
586
  phone: "",
587
587
  disabled: false,
588
588
  create: false,
589
- }), authMethods = _175[0], setAuthMethods = _175[1];
590
- var _176 = (0, react_1.useState)(""), selectedAuthMethod = _176[0], setSelectedAuthMethod = _176[1];
589
+ }), authMethods = _176[0], setAuthMethods = _176[1];
590
+ var _177 = (0, react_1.useState)(""), selectedAuthMethod = _177[0], setSelectedAuthMethod = _177[1];
591
591
  // INFO: the sign-in check of a users datasheet's record is running; the
592
592
  // panel shows a spinner rather than nothing, which read as "no login"
593
- var _177 = (0, react_1.useState)(false), authLoading = _177[0], setAuthLoading = _177[1];
593
+ var _178 = (0, react_1.useState)(false), authLoading = _178[0], setAuthLoading = _178[1];
594
594
  // INFO: a delete is running — the ref answers a second tap at once, before
595
595
  // the state has rendered, and the state disables the confirm button
596
596
  var deletingRef = (0, react_1.useRef)(false);
597
- var _178 = (0, react_1.useState)(false), deleting = _178[0], setDeleting = _178[1];
597
+ var _179 = (0, react_1.useState)(false), deleting = _179[0], setDeleting = _179[1];
598
598
  // INFO: Used by Activity Log
599
- var _179 = (0, react_1.useState)(false), activityModal = _179[0], setActivityModal = _179[1];
600
- var _180 = (0, react_1.useState)(""), activityId = _180[0], setActivityId = _180[1];
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];
601
601
  //INFO : Used by Export
602
- var _181 = (0, react_1.useState)(null), csvFile = _181[0], setCSVFile = _181[1];
603
- var _182 = (0, react_1.useState)([]), csvFileData = _182[0], setCSVFileData = _182[1];
604
- var _183 = (0, react_1.useState)(0), stepCSVIndex = _183[0], setStepCSVIndex = _183[1];
605
- var _184 = (0, react_1.useState)({}), listCSVMapAttribute = _184[0], setListCSVMapAttribute = _184[1];
606
- var _185 = (0, react_1.useState)({}), listCSVObjAttribute = _185[0], setListCSVObjAttribute = _185[1];
607
- var _186 = (0, react_1.useState)([]), csvAPIAttribute = _186[0], setCSVAPIAttribute = _186[1];
608
- var _187 = (0, react_1.useState)(((_0 = props.devSettings.currentUser) === null || _0 === void 0 ? void 0 : _0.userEmail) || ""), exportCSVEmail = _187[0], setExportCSVEmail = _187[1];
609
- var _188 = (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 = _188[0], setExportPDFTitle = _188[1];
610
- var _189 = (0, react_1.useState)(false), exportPDFLoading = _189[0], setExportPDFLoading = _189[1];
611
- var _190 = (0, react_1.useState)(false), exportReadPDFLoading = _190[0], setExportReadPDFLoading = _190[1];
612
- var _191 = (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 = _191[0], setExportSumAttributeIds = _191[1];
613
- var _192 = (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 = _192[0], setHideSubItems = _192[1];
614
- var _193 = (0, react_1.useState)([]), importTableData = _193[0], setImportTableData = _193[1];
615
- var _194 = (0, react_1.useState)([]), queryList = _194[0], setQueryList = _194[1];
616
- var _195 = (0, react_1.useState)(undefined), allQueryList = _195[0], setAllQueryList = _195[1];
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];
617
617
  // INFO: a restored state wins over the prop; its "" is a list the user
618
618
  // ungrouped, so it opens ungrouped
619
- var _196 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
619
+ var _197 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
620
620
  ? persistedState.groupBy || undefined
621
- : (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _196[0], setGroupId = _196[1];
621
+ : (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.groupBy), groupId = _197[0], setGroupId = _197[1];
622
622
  // INFO: each group's total per number column, keyed by section id
623
- var _197 = (0, react_1.useState)({}), groupSummaries = _197[0], setGroupSummaries = _197[1];
623
+ var _198 = (0, react_1.useState)({}), groupSummaries = _198[0], setGroupSummaries = _198[1];
624
624
  var groupSummaryRequestRef = (0, react_1.useRef)(0);
625
- var _198 = (0, react_1.useState)({}), commentCounts = _198[0], setCommentCounts = _198[1];
625
+ var _199 = (0, react_1.useState)({}), commentCounts = _199[0], setCommentCounts = _199[1];
626
626
  // INFO: Monday-board per-group paging. Keyed by the group key that
627
627
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
628
628
  // Each group tracks its own loaded cursor + total so it can lazily load its
629
629
  // next page as the user scrolls inside that band, independent of every other
630
630
  // group. Only used when renderCheckGroupPaging() is true.
631
- var _199 = (0, react_1.useState)({}), groupPageState = _199[0], setGroupPageState = _199[1];
631
+ var _200 = (0, react_1.useState)({}), groupPageState = _200[0], setGroupPageState = _200[1];
632
632
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
633
633
  // in one tick do not re-fetch an already in-flight page.
634
634
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -637,59 +637,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
637
637
  // list was re-read (new search, filter, sort or grouping) is dropped on
638
638
  // arrival instead of appending rows that belong to the old list
639
639
  var groupPagingGenRef = (0, react_1.useRef)(0);
640
- var _200 = (0, react_1.useState)(""), readTabSection = _200[0], setReadTabSection = _200[1];
641
- var _201 = (0, react_1.useState)(false), readFloatingNav = _201[0], setReadFloatingNav = _201[1];
640
+ var _201 = (0, react_1.useState)(""), readTabSection = _201[0], setReadTabSection = _201[1];
641
+ var _202 = (0, react_1.useState)(false), readFloatingNav = _202[0], setReadFloatingNav = _202[1];
642
642
  var readTabSectionRefs = (0, react_1.useRef)({});
643
643
  //INFO : Used by Read
644
644
  //INFO : Used by Update
645
- var _202 = (0, react_1.useState)(false), modalVisible = _202[0], setModalVisible = _202[1];
646
- var _203 = (0, react_1.useState)(false), deleteModal = _203[0], setDeleteModal = _203[1];
647
- var _204 = (0, react_1.useState)(false), excelModal = _204[0], setExcelModal = _204[1];
648
- var _205 = (0, react_1.useState)(false), exportExcel = _205[0], setExportExcel = _205[1];
649
- var _206 = (0, react_1.useState)(""), exportType = _206[0], setExportType = _206[1];
650
- var _207 = (0, react_1.useState)(false), exportQR = _207[0], setExportQR = _207[1];
651
- var _208 = (0, react_1.useState)(function () {
645
+ var _203 = (0, react_1.useState)(false), modalVisible = _203[0], setModalVisible = _203[1];
646
+ var _204 = (0, react_1.useState)(false), deleteModal = _204[0], setDeleteModal = _204[1];
647
+ var _205 = (0, react_1.useState)(false), excelModal = _205[0], setExcelModal = _205[1];
648
+ var _206 = (0, react_1.useState)(false), exportExcel = _206[0], setExportExcel = _206[1];
649
+ var _207 = (0, react_1.useState)(""), exportType = _207[0], setExportType = _207[1];
650
+ var _208 = (0, react_1.useState)(false), exportQR = _208[0], setExportQR = _208[1];
651
+ var _209 = (0, react_1.useState)(function () {
652
652
  var _a, _b;
653
653
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
654
654
  return firstTabId;
655
- }), activeTab = _208[0], setActiveTab = _208[1];
656
- var _209 = (0, react_1.useState)(false), signatureSigning = _209[0], setSignatureSigning = _209[1];
657
- var _210 = (0, react_1.useState)({}), selectedData = _210[0], setSelectedData = _210[1];
658
- var _211 = (0, react_1.useState)(""), selectedObjectStructureId = _211[0], setSelectedObjectStructureId = _211[1];
659
- var _212 = (0, react_1.useState)(""), selectedObjectId = _212[0], setSelectedObjectId = _212[1];
660
- var _213 = (0, react_1.useState)(""), selectedListAddressId = _213[0], setSelectedListAddressId = _213[1];
661
- var _214 = (0, react_1.useState)(-1), selectedListAddressIndex = _214[0], setSelectedListAddressIndex = _214[1];
662
- var _215 = (0, react_1.useState)({
655
+ }), activeTab = _209[0], setActiveTab = _209[1];
656
+ var _210 = (0, react_1.useState)(false), signatureSigning = _210[0], setSignatureSigning = _210[1];
657
+ var _211 = (0, react_1.useState)({}), selectedData = _211[0], setSelectedData = _211[1];
658
+ var _212 = (0, react_1.useState)(""), selectedObjectStructureId = _212[0], setSelectedObjectStructureId = _212[1];
659
+ var _213 = (0, react_1.useState)(""), selectedObjectId = _213[0], setSelectedObjectId = _213[1];
660
+ var _214 = (0, react_1.useState)(""), selectedListAddressId = _214[0], setSelectedListAddressId = _214[1];
661
+ var _215 = (0, react_1.useState)(-1), selectedListAddressIndex = _215[0], setSelectedListAddressIndex = _215[1];
662
+ var _216 = (0, react_1.useState)({
663
663
  lat: 0,
664
664
  lng: 0,
665
665
  name: "",
666
- }), selectedListAddress = _215[0], setSelectedListAddress = _215[1];
667
- var _216 = (0, react_1.useState)({}), selectedObjectData = _216[0], setSelectedObjectData = _216[1];
668
- var _217 = (0, react_1.useState)(null), objectCellEdit = _217[0], setObjectCellEdit = _217[1];
669
- var _218 = (0, react_1.useState)(false), referenceLoading = _218[0], setReferenceLoading = _218[1];
670
- var _219 = (0, react_1.useState)({}), referencesOptions = _219[0], setReferencesOptions = _219[1];
671
- var _220 = (0, react_1.useState)({}), referencesDetails = _220[0], setReferencesDetails = _220[1];
672
- var _221 = (0, react_1.useState)({}), listReferencesOptions = _221[0], setListReferencesOptions = _221[1];
673
- var _222 = (0, react_1.useState)({}), referenceDeleteTableData = _222[0], setReferenceDeleteTableData = _222[1];
674
- var _223 = (0, react_1.useState)([]), relatedSections = _223[0], setRelatedSections = _223[1];
675
- var _224 = (0, react_1.useState)(0), referenceDeleteIndex = _224[0], setReferenceDeleteIndex = _224[1];
676
- var _225 = (0, react_1.useState)({
666
+ }), selectedListAddress = _216[0], setSelectedListAddress = _216[1];
667
+ var _217 = (0, react_1.useState)({}), selectedObjectData = _217[0], setSelectedObjectData = _217[1];
668
+ var _218 = (0, react_1.useState)(null), objectCellEdit = _218[0], setObjectCellEdit = _218[1];
669
+ var _219 = (0, react_1.useState)(false), referenceLoading = _219[0], setReferenceLoading = _219[1];
670
+ var _220 = (0, react_1.useState)({}), referencesOptions = _220[0], setReferencesOptions = _220[1];
671
+ var _221 = (0, react_1.useState)({}), referencesDetails = _221[0], setReferencesDetails = _221[1];
672
+ var _222 = (0, react_1.useState)({}), listReferencesOptions = _222[0], setListReferencesOptions = _222[1];
673
+ var _223 = (0, react_1.useState)({}), referenceDeleteTableData = _223[0], setReferenceDeleteTableData = _223[1];
674
+ var _224 = (0, react_1.useState)([]), relatedSections = _224[0], setRelatedSections = _224[1];
675
+ var _225 = (0, react_1.useState)(0), referenceDeleteIndex = _225[0], setReferenceDeleteIndex = _225[1];
676
+ var _226 = (0, react_1.useState)({
677
677
  id: "",
678
678
  name: "",
679
679
  type: "string",
680
- }), referenceCreationModal = _225[0], setReferenceCreationModal = _225[1];
681
- var _226 = (0, react_1.useState)({}), referenceModelSchema = _226[0], setReferenceSchema = _226[1];
682
- var _227 = (0, react_1.useState)([]), kanbanChecked = _227[0], setKanbanChecked = _227[1];
680
+ }), referenceCreationModal = _226[0], setReferenceCreationModal = _226[1];
681
+ var _227 = (0, react_1.useState)({}), referenceModelSchema = _227[0], setReferenceSchema = _227[1];
682
+ var _228 = (0, react_1.useState)([]), kanbanChecked = _228[0], setKanbanChecked = _228[1];
683
683
  //INFO : Offline
684
- var _228 = (0, react_1.useState)(0), offlineDataLength = _228[0], setOfflineDataLength = _228[1];
685
- var _229 = (0, react_1.useState)(false), offlineModal = _229[0], setOfflineModal = _229[1];
684
+ var _229 = (0, react_1.useState)(0), offlineDataLength = _229[0], setOfflineDataLength = _229[1];
685
+ var _230 = (0, react_1.useState)(false), offlineModal = _230[0], setOfflineModal = _230[1];
686
686
  // INFO: live-stream state — driven by socket connection and navigator.onLine
687
- var _230 = (0, react_1.useState)(false), isLive = _230[0], setIsLive = _230[1];
688
- var _231 = (0, react_1.useState)(false), isLiveOffline = _231[0], setIsLiveOffline = _231[1];
687
+ var _231 = (0, react_1.useState)(false), isLive = _231[0], setIsLive = _231[1];
688
+ var _232 = (0, react_1.useState)(false), isLiveOffline = _232[0], setIsLiveOffline = _232[1];
689
689
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
690
690
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
691
691
  // Independent of SSE status so it works even when bareSocketName is not set.
692
- var _232 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _232[0], setIsNetworkOffline = _232[1];
692
+ var _233 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _233[0], setIsNetworkOffline = _233[1];
693
693
  var previousType = (0, react_1.useRef)(null);
694
694
  var previousSelectedData = (0, react_1.useRef)(null);
695
695
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -816,10 +816,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
816
816
  var isFirebaseClient = devSettings.server === "firebase";
817
817
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
818
818
  var isDateWarnings = !!((_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.dateWarnings);
819
- // INFO: the columns as the views draw them — every list option without a
820
- // colour takes the palette colour of its position
821
- var displayStructure = (0, defaultColours_1.handleApplyDefaultColours)(structure);
822
- var dbModule = isFirebaseClient ? (_14 = props.lib) === null || _14 === void 0 ? void 0 : _14.firebase : (_15 = props.lib) === null || _15 === void 0 ? void 0 : _15.axios;
819
+ var isDatasheetDefaults = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.datasheetDefaults);
820
+ // INFO: the columns as the views draw them — with datasheet defaults every
821
+ // list option without a colour takes the palette colour of its position
822
+ var displayStructure = isDatasheetDefaults
823
+ ? (0, defaultColours_1.handleApplyDefaultColours)(structure)
824
+ : structure;
825
+ 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;
823
826
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
824
827
  var selectedRelated = resolvedType === "read"
825
828
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -944,32 +947,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
944
947
  }, [
945
948
  resolvedType,
946
949
  props.id,
947
- (_16 = props.space) === null || _16 === void 0 ? void 0 : _16._id,
950
+ (_17 = props.space) === null || _17 === void 0 ? void 0 : _17._id,
948
951
  props.devSettings.schemaEndpoint,
949
- (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.showRelatedTab,
952
+ (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.showRelatedTab,
950
953
  ]);
951
954
  /* eslint-enable */
952
955
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
953
956
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
954
- var isViewSettingsEnabled = ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareViewSettings) || ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareNewDTW)
957
+ var isViewSettingsEnabled = ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareViewSettings) || ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareNewDTW)
955
958
  ? true
956
959
  : false;
957
960
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
958
961
  // (shared by every user) — toggling writes to the model and calls back. Without it
959
962
  // the hide is this user's own and lives in userHiddenColumnIds.
960
- var isSchemaHideMode = ((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.onChangeHide) ? true : false;
963
+ var isSchemaHideMode = ((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.onChangeHide) ? true : false;
961
964
  // INFO: rows per page is a view setting the user can change, so it starts from
962
965
  // the persisted value and falls back to the consumer's limit
963
- var _233 = (0, react_1.useState)((_22 = (_21 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _21 !== void 0 ? _21 : props.limit) !== null && _22 !== void 0 ? _22 : 10), pageLimit = _233[0], setPageLimit = _233[1];
966
+ var _234 = (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 = _234[0], setPageLimit = _234[1];
964
967
  var limit = pageLimit;
965
- var isSavedViewsEnabled = !!((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.savedViews) && resolvedType === "list";
968
+ var isSavedViewsEnabled = !!((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.savedViews) && resolvedType === "list";
966
969
  // INFO: an app that stores views takes over from this browser's storage, so
967
970
  // every view is the team's and nothing is kept locally
968
- var isAppViews = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.sharedViews) !== undefined ||
969
- !!((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.onChangeSharedViews);
971
+ var isAppViews = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.sharedViews) !== undefined ||
972
+ !!((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.onChangeSharedViews);
970
973
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
971
974
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
972
- var activeSortId = (isInternalSort && persistedSort) || ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.sort);
975
+ var activeSortId = (isInternalSort && persistedSort) || ((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.sort);
973
976
  var handleSortColumn = function (value) {
974
977
  var _a, _b, _c, _d;
975
978
  if (isInternalSort)
@@ -999,7 +1002,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
999
1002
  // INFO: Firebase pages by document cursor and a union by skip, so neither
1000
1003
  // can hand over the whole set — there formula columns are not offered for
1001
1004
  // sorting or filtering, rather than ordering one page
1002
- var isFormulaViewSupported = !isFirebase && !((_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.unionCollections) === null || _28 === void 0 ? void 0 : _28.length);
1005
+ var isFormulaViewSupported = !isFirebase && !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.unionCollections) === null || _29 === void 0 ? void 0 : _29.length);
1003
1006
  var formulaSort = isFormulaViewSupported &&
1004
1007
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
1005
1008
  formulaColumnIds.includes(activeSortId.sortId)
@@ -1008,11 +1011,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1008
1011
  // INFO: a referenced record and related rows are joined by MongoWrapper's
1009
1012
  // lookups and a list row is matched by its Mongo path — neither Firebase nor
1010
1013
  // a union read runs them
1011
- var flexFilterExtras = !isFirebase && !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.unionCollections) === null || _30 === void 0 ? void 0 : _30.length)
1014
+ var flexFilterExtras = !isFirebase && !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.unionCollections) === null || _31 === void 0 ? void 0 : _31.length)
1012
1015
  ? {
1013
- references: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareFlexFilterReferences,
1014
- listObjects: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterListObjects,
1015
- related: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterRelated,
1016
+ references: (_32 = props.bareSettings) === null || _32 === void 0 ? void 0 : _32.bareFlexFilterReferences,
1017
+ listObjects: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterListObjects,
1018
+ related: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterRelated,
1016
1019
  }
1017
1020
  : undefined;
1018
1021
  var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
@@ -1073,18 +1076,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1073
1076
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
1074
1077
  };
1075
1078
  };
1076
- var _234 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _234.canUpdateRecord, canInlineUpdate = _234.canInlineUpdate, canBatchUpdate = _234.canBatchUpdate, canDeleteRecord = _234.canDeleteRecord;
1077
- var isEditor = ((_34 = props.edit) === null || _34 === void 0 ? void 0 : _34.allEditable) ? true : false;
1078
- var isOffline = (_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareOffline;
1079
+ var _235 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _235.canUpdateRecord, canInlineUpdate = _235.canInlineUpdate, canBatchUpdate = _235.canBatchUpdate, canDeleteRecord = _235.canDeleteRecord;
1080
+ var isEditor = ((_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.allEditable) ? true : false;
1081
+ var isOffline = (_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOffline;
1079
1082
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
1080
1083
  // the live network state — online saves go to the server even if bareOffline
1081
1084
  // is true, offline saves go to IDB as normal.
1082
- var isOfflineNetworkListener = isOffline && ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareOfflineNetworkListener);
1083
- var showId = (_37 = props.space) === null || _37 === void 0 ? void 0 : _37.showId;
1085
+ var isOfflineNetworkListener = isOffline && ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOfflineNetworkListener);
1086
+ var showId = (_38 = props.space) === null || _38 === void 0 ? void 0 : _38.showId;
1084
1087
  var remainId = showId || selectedObjectStructureId ? true : false;
1085
- var idField = ((_38 = props.space) === null || _38 === void 0 ? void 0 : _38.idField) || ((_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.idField);
1086
- var pipeline = (_40 = props === null || props === void 0 ? void 0 : props.space) === null || _40 === void 0 ? void 0 : _40.pipeline;
1087
- if ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareListPipeline) {
1088
+ var idField = ((_39 = props.space) === null || _39 === void 0 ? void 0 : _39.idField) || ((_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.idField);
1089
+ var pipeline = (_41 = props === null || props === void 0 ? void 0 : props.space) === null || _41 === void 0 ? void 0 : _41.pipeline;
1090
+ if ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareListPipeline) {
1088
1091
  pipeline = pipeline
1089
1092
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
1090
1093
  }
@@ -1097,24 +1100,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1097
1100
  * three records came back instead of five files, and each tile received the
1098
1101
  * whole array rather than one file, so every one of them read "Attachment".
1099
1102
  */
1100
- var fileViewColumnId = (_45 = (_44 = ((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.extendedTabs) !== null && _43 !== void 0 ? _43 : []).find(function (eachTab) {
1103
+ var fileViewColumnId = (_46 = (_45 = ((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.extendedTabs) !== null && _44 !== void 0 ? _44 : []).find(function (eachTab) {
1101
1104
  return eachTab.viewType === "file" &&
1102
1105
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
1103
- })) === null || _44 === void 0 ? void 0 : _44.fileSettings) === null || _45 === void 0 ? void 0 : _45.columnId;
1104
- var hasNavigation = ((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.handleNavigate) ? true : false;
1106
+ })) === null || _45 === void 0 ? void 0 : _45.fileSettings) === null || _46 === void 0 ? void 0 : _46.columnId;
1107
+ var hasNavigation = ((_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.handleNavigate) ? true : false;
1105
1108
  var formColumn = "grid-cols-12";
1106
- var useMobileView = (_48 = (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareUpdateMobileView) !== null && _48 !== void 0 ? _48 : false;
1109
+ var useMobileView = (_49 = (_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.bareUpdateMobileView) !== null && _49 !== void 0 ? _49 : false;
1107
1110
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
1108
- var isActivityLog = (((_50 = (_49 = props.edit) === null || _49 === void 0 ? void 0 : _49.activityLog) === null || _50 === void 0 ? void 0 : _50.enableComments) &&
1109
- ((_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog.commentCollectionId)) ||
1110
- (((_53 = (_52 = props.edit) === null || _52 === void 0 ? void 0 : _52.activityLog) === null || _53 === void 0 ? void 0 : _53.enableLogs) &&
1111
- ((_54 = props.edit) === null || _54 === void 0 ? void 0 : _54.activityLog.logsCollectionId));
1112
- var customPaginationSize = ((_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.customPaginationCount)
1111
+ var isActivityLog = (((_51 = (_50 = props.edit) === null || _50 === void 0 ? void 0 : _50.activityLog) === null || _51 === void 0 ? void 0 : _51.enableComments) &&
1112
+ ((_52 = props.edit) === null || _52 === void 0 ? void 0 : _52.activityLog.commentCollectionId)) ||
1113
+ (((_54 = (_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog) === null || _54 === void 0 ? void 0 : _54.enableLogs) &&
1114
+ ((_55 = props.edit) === null || _55 === void 0 ? void 0 : _55.activityLog.logsCollectionId));
1115
+ var customPaginationSize = ((_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.customPaginationCount)
1113
1116
  ? props.organise.customPaginationCount(size)
1114
1117
  : undefined;
1115
1118
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1116
1119
  var writeServerQuery = new writeQuery_1.WriteQuery({
1117
- dbModule: (_56 = props.lib) === null || _56 === void 0 ? void 0 : _56.axios,
1120
+ dbModule: (_57 = props.lib) === null || _57 === void 0 ? void 0 : _57.axios,
1118
1121
  dbType: devSettings.server,
1119
1122
  dbCollection: props.collectionId,
1120
1123
  dbEndpoint: devSettings.dbEndpoint,
@@ -1122,7 +1125,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1122
1125
  dbUserToken: devSettings.dbUserToken,
1123
1126
  });
1124
1127
  var readServerQuery = new readQuery_1.ReadQuery({
1125
- dbModule: (_57 = props.lib) === null || _57 === void 0 ? void 0 : _57.axios,
1128
+ dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
1126
1129
  dbType: devSettings.server,
1127
1130
  dbCollection: props.collectionId,
1128
1131
  dbEndpoint: devSettings.dbEndpoint,
@@ -1130,12 +1133,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1130
1133
  dbUserToken: devSettings.dbUserToken,
1131
1134
  });
1132
1135
  var moreButtonPopUp = [
1133
- ((_58 = props.edit) === null || _58 === void 0 ? void 0 : _58.allEditable) &&
1136
+ ((_59 = props.edit) === null || _59 === void 0 ? void 0 : _59.allEditable) &&
1134
1137
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1135
1138
  // datasheet served through one can import; only the browser-direct
1136
1139
  // Firebase client has no server to import through
1137
1140
  !isFirebaseClient &&
1138
- !((_60 = (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.exportSettings) === null || _60 === void 0 ? void 0 : _60.hideImportCSV)
1141
+ !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideImportCSV)
1139
1142
  ? {
1140
1143
  text: "Import Excel",
1141
1144
  onClick: function () {
@@ -1144,7 +1147,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1144
1147
  },
1145
1148
  }
1146
1149
  : null,
1147
- !((_62 = (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.exportSettings) === null || _62 === void 0 ? void 0 : _62.hideExportCSV)
1150
+ !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportCSV)
1148
1151
  ? {
1149
1152
  text: "Export CSV",
1150
1153
  onClick: function () {
@@ -1154,7 +1157,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1154
1157
  },
1155
1158
  }
1156
1159
  : null,
1157
- !((_64 = (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.exportSettings) === null || _64 === void 0 ? void 0 : _64.hideExportExcel)
1160
+ !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportExcel)
1158
1161
  ? {
1159
1162
  text: "Export Excel",
1160
1163
  onClick: function () {
@@ -1164,7 +1167,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1164
1167
  },
1165
1168
  }
1166
1169
  : null,
1167
- !((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideExportPDF)
1170
+ !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportPDF)
1168
1171
  ? {
1169
1172
  text: "Export PDF",
1170
1173
  onClick: function () {
@@ -1174,7 +1177,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1174
1177
  },
1175
1178
  }
1176
1179
  : null,
1177
- !((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportQR)
1180
+ !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportQR)
1178
1181
  ? {
1179
1182
  text: "Export QR",
1180
1183
  onClick: function () {
@@ -1184,7 +1187,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1184
1187
  },
1185
1188
  }
1186
1189
  : null,
1187
- !((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportQR)
1190
+ !((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportQR)
1188
1191
  ? {
1189
1192
  text: "Export QR(Data)",
1190
1193
  onClick: function () {
@@ -1194,7 +1197,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1194
1197
  },
1195
1198
  }
1196
1199
  : null,
1197
- !((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportPrint)
1200
+ !((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportPrint)
1198
1201
  ? {
1199
1202
  text: "Print",
1200
1203
  onClick: function () {
@@ -1206,8 +1209,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1206
1209
  : null,
1207
1210
  // INFO: drafts only exist where the form can save one, so the filter has
1208
1211
  // nothing to find on any other page
1209
- ((_73 = props.edit) === null || _73 === void 0 ? void 0 : _73.enableUpdateDraft) &&
1210
- !((_75 = (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.exportSettings) === null || _75 === void 0 ? void 0 : _75.hideExportDraft)
1212
+ ((_74 = props.edit) === null || _74 === void 0 ? void 0 : _74.enableUpdateDraft) &&
1213
+ !((_76 = (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.exportSettings) === null || _76 === void 0 ? void 0 : _76.hideExportDraft)
1211
1214
  ? {
1212
1215
  text: filterDraft ? "Show All Items" : "Filter Draft",
1213
1216
  onClick: function () {
@@ -1216,7 +1219,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1216
1219
  }
1217
1220
  : null,
1218
1221
  ].filter(Boolean);
1219
- if ((_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.moreSettings)
1222
+ if ((_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.moreSettings)
1220
1223
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1221
1224
  //=====================================================================================
1222
1225
  //SECTION: User Column Visibility Handlers
@@ -1610,14 +1613,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1610
1613
  //=====================================================================================
1611
1614
  //SECTION: Saved Views
1612
1615
  //=====================================================================================
1613
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.persistKey, (_78 = devSettings.currentUser) === null || _78 === void 0 ? void 0 : _78.userEmail);
1616
+ 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);
1614
1617
  (0, react_1.useEffect)(function () {
1615
1618
  if (isSavedViewsEnabled && !isAppViews)
1616
1619
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1617
1620
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1618
1621
  // INFO: the app keeps All's settings, so every change is kept in this
1619
1622
  // browser until the person updates the view for everyone or resets it
1620
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.allView) !== undefined;
1623
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.allView) !== undefined;
1621
1624
  var handleGetViewDraftKey = function (viewId) {
1622
1625
  var _a, _b;
1623
1626
  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);
@@ -1694,7 +1697,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1694
1697
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1695
1698
  (0, react_1.useEffect)(function () {
1696
1699
  lastSentSharedViewsRef.current = null;
1697
- }, [(_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.sharedViews]);
1700
+ }, [(_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.sharedViews]);
1698
1701
  var handleStoreSharedViews = function (update) {
1699
1702
  var _a, _b, _c;
1700
1703
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1739,13 +1742,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1739
1742
  /* eslint-disable */
1740
1743
  }, [
1741
1744
  isSavedViewsEnabled,
1742
- (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.initialSavedViewId,
1743
- (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.defaultSavedViewId,
1744
- (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.sharedViews,
1745
+ (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.initialSavedViewId,
1746
+ (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.defaultSavedViewId,
1747
+ (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.sharedViews,
1745
1748
  savedViews,
1746
1749
  ]);
1747
1750
  /* eslint-enable */
1748
- var defaultSavedViewIds = ((_85 = (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.defaultSavedViews) !== null && _85 !== void 0 ? _85 : [])
1751
+ var defaultSavedViewIds = ((_86 = (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.defaultSavedViews) !== null && _86 !== void 0 ? _86 : [])
1749
1752
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1750
1753
  .join("|");
1751
1754
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -2047,8 +2050,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2047
2050
  pageLimit,
2048
2051
  groupId,
2049
2052
  columnWidths,
2050
- (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.allView,
2051
- (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.sharedViews,
2053
+ (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.allView,
2054
+ (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.sharedViews,
2052
2055
  savedViews,
2053
2056
  ]);
2054
2057
  /* eslint-enable */
@@ -2088,7 +2091,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2088
2091
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2089
2092
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2090
2093
  /* eslint-disable */
2091
- }, [props.collectionId, (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.persistKey]);
2094
+ }, [props.collectionId, (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.persistKey]);
2092
2095
  /* eslint-enable */
2093
2096
  // INFO: wait a frame — rows land in state one tick before layout
2094
2097
  (0, react_1.useEffect)(function () {
@@ -2123,7 +2126,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2123
2126
  (0, react_1.useEffect)(function () {
2124
2127
  handleOfflinePrefetch();
2125
2128
  /* eslint-disable */
2126
- }, [props.collectionId, (_89 = props.bareSettings) === null || _89 === void 0 ? void 0 : _89.bareOffline]);
2129
+ }, [props.collectionId, (_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.bareOffline]);
2127
2130
  /* eslint-enable */
2128
2131
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2129
2132
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2143,7 +2146,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2143
2146
  }, interval);
2144
2147
  return function () { return clearInterval(timer); };
2145
2148
  /* eslint-disable */
2146
- }, [(_90 = props.bareSettings) === null || _90 === void 0 ? void 0 : _90.barePollingInterval, isLive, isNetworkOffline]);
2149
+ }, [(_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.barePollingInterval, isLive, isNetworkOffline]);
2147
2150
  /* eslint-enable */
2148
2151
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2149
2152
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2185,7 +2188,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2185
2188
  };
2186
2189
  /* eslint-disable */
2187
2190
  }, [
2188
- (_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.bareSocketName,
2191
+ (_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.bareSocketName,
2189
2192
  props.collectionId,
2190
2193
  props.devSettings.sseEndpoint,
2191
2194
  props.devSettings.dbAPIToken,
@@ -2459,10 +2462,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2459
2462
  props.collectionId,
2460
2463
  props.model,
2461
2464
  props.localURLEndpoint,
2462
- (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.extendedTabs,
2465
+ (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.extendedTabs,
2463
2466
  listViewId,
2464
- (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.additionalQuery,
2465
- (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.groupBy,
2467
+ (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.additionalQuery,
2468
+ (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.groupBy,
2466
2469
  resolvedType,
2467
2470
  ]);
2468
2471
  /**
@@ -2614,7 +2617,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2614
2617
  };
2615
2618
  }, 100);
2616
2619
  return function () { return clearTimeout(timeoutId); };
2617
- }, [(_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.showReadFloatingNav, resolvedType, props.id, loading]);
2620
+ }, [(_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.showReadFloatingNav, resolvedType, props.id, loading]);
2618
2621
  (0, react_1.useEffect)(function () {
2619
2622
  if (resolvedType !== "read")
2620
2623
  return;
@@ -5691,7 +5694,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5691
5694
  var columnTypeActions = {
5692
5695
  canUpdate: canUpdateRecord,
5693
5696
  dateWarnings: isDateWarnings,
5694
- onButtonClick: (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.onButtonClick,
5697
+ onButtonClick: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.onButtonClick,
5695
5698
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5696
5699
  var _a;
5697
5700
  return __generator(this, function (_b) {
@@ -5708,7 +5711,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5708
5711
  }
5709
5712
  });
5710
5713
  }); },
5711
- onTimeTrackingAction: ((_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.onTimeTrackingAction) && canUpdateRecord
5714
+ onTimeTrackingAction: ((_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onTimeTrackingAction) && canUpdateRecord
5712
5715
  ? function (rowId, columnId, action) {
5713
5716
  return handleTimeTrackingAction(rowId, columnId, action);
5714
5717
  }
@@ -7926,8 +7929,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7926
7929
  : rows;
7927
7930
  };
7928
7931
  /* eslint-disable */
7929
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_98 = props.bareSettings) === null || _98 === void 0 ? void 0 : _98.bareNewDTW]);
7930
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_99 = props.bareSettings) === null || _99 === void 0 ? void 0 : _99.bareNewDTW]);
7932
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_99 = props.bareSettings) === null || _99 === void 0 ? void 0 : _99.bareNewDTW]);
7933
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
7931
7934
  /* eslint-enable */
7932
7935
  // INFO: the pencil beside a record's title opens the same form the Update
7933
7936
  // column's pencil did, for whoever may update; the bubble beside it opens
@@ -9901,8 +9904,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9901
9904
  isFirebase: isFirebase,
9902
9905
  }).map(function (eachSection) {
9903
9906
  var _a;
9904
- return (__assign(__assign({}, eachSection), { count: isGroupPaging && ((_a = groupPageState[eachSection.id]) === null || _a === void 0 ? void 0 : _a.fetched)
9905
- ? groupPageState[eachSection.id].size
9907
+ return (__assign(__assign({}, eachSection), {
9908
+ // INFO: a row added in the group since its read is counted at once
9909
+ count: isGroupPaging && ((_a = groupPageState[eachSection.id]) === null || _a === void 0 ? void 0 : _a.fetched)
9910
+ ? Math.max(groupPageState[eachSection.id].size, eachSection.rowIds.length)
9906
9911
  : undefined }));
9907
9912
  });
9908
9913
  // INFO: a section whose own query came back empty has nothing to show
@@ -9922,6 +9927,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9922
9927
  // joined by adding a row in it or dragging one onto it
9923
9928
  var handleApplyGroupDefaults = function (sections) {
9924
9929
  var _a, _b;
9930
+ if (!isDatasheetDefaults)
9931
+ return sections;
9925
9932
  var column = handleGetGroupColumn();
9926
9933
  var options = (_a = handleGetGroupColumnOptions()) !== null && _a !== void 0 ? _a : [];
9927
9934
  var members = (_b = props.devSettings.organisationMembers) !== null && _b !== void 0 ? _b : [];
@@ -9980,6 +9987,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9980
9987
  requestId = ++groupSummaryRequestRef.current;
9981
9988
  sumIds = handleGetGroupSumIds();
9982
9989
  if (!column ||
9990
+ !isDatasheetDefaults ||
9983
9991
  !((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) ||
9984
9992
  isFirebase ||
9985
9993
  // INFO: a formula filter is applied here, not on the server, so the
@@ -10404,7 +10412,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
10404
10412
  else {
10405
10413
  // INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
10406
10414
  if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
10407
- return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), onRowActivity: recordActivityAction, onRowEdit: recordEditAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, onMoveRowToGroup: canUpdateRecord && groupId
10415
+ return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), onRowActivity: recordActivityAction, onRowEdit: recordEditAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
10408
10416
  ? handleMoveRowToGroup
10409
10417
  : undefined,
10410
10418
  // INFO: per-group paging — scroll appends inside a band, page
@@ -11657,7 +11665,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11657
11665
  } }));
11658
11666
  }
11659
11667
  else if (selectedTabData.viewType === "chart") {
11660
- return (react_1.default.createElement(chartView_1.ChartView, { charts: (_61 = selectedTabData.chartSettings) !== null && _61 !== void 0 ? _61 : [], structure: structure, collectionId: props.collectionId, devSettings: props.devSettings, filterQuery: (_62 = renderImpSearchFilterConditions()) !== null && _62 !== void 0 ? _62 : [], editable: isEditor, darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, onChangeCharts: ((_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.onChangeTabs)
11668
+ return (react_1.default.createElement(chartView_1.ChartView, { charts: (_61 = selectedTabData.chartSettings) !== null && _61 !== void 0 ? _61 : [], structure: structure, collectionId: props.collectionId, devSettings: props.devSettings, filterQuery: (_62 = renderImpSearchFilterConditions()) !== null && _62 !== void 0 ? _62 : [], editable: isEditor, multicolourDefault: isDatasheetDefaults, darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, onChangeCharts: ((_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.onChangeTabs)
11661
11669
  ? function (charts) {
11662
11670
  return handleChangeTabCharts(selectedTabData.name, charts);
11663
11671
  }
@@ -12128,14 +12136,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12128
12136
  };
12129
12137
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
12130
12138
  renderNotification("root"),
12131
- ((_101 = (_100 = props.renderSettings) === null || _100 === void 0 ? void 0 : _100.renderLoadingUI) === null || _101 === void 0 ? void 0 : _101.call(_100)) && loading ? ((_102 = props.renderSettings) === null || _102 === void 0 ? void 0 : _102.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkMode, darkModeBg: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12139
+ ((_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 () {
12132
12140
  var _a, _b;
12133
12141
  if (loading)
12134
12142
  return;
12135
12143
  handlePopUpModal(false);
12136
12144
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
12137
12145
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
12138
- 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: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12146
+ 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 () {
12139
12147
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
12140
12148
  if (dataId) {
12141
12149
  var currentValue = selectedData[referenceCreationModal.id];
@@ -12151,19 +12159,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12151
12159
  }, onClose: function () {
12152
12160
  setReferenceCreationModal({ id: "", name: "", type: "string" });
12153
12161
  } }),
12154
- 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: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12162
+ 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 () {
12155
12163
  setReferenceDeleteTableData({});
12156
12164
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12157
- 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, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12165
+ 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 () {
12158
12166
  setDeletePasscodeInput("");
12159
12167
  setDeleteModal(!deleteModal);
12160
12168
  setDeleteFeedId("");
12161
12169
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12162
- 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: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12170
+ 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 () {
12163
12171
  setBatchUpdateData({ columnId: "", columnData: {} });
12164
12172
  setBatchUpdateModal(false);
12165
12173
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12166
- 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, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12174
+ 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 () {
12167
12175
  var _a, _b;
12168
12176
  if (props.space)
12169
12177
  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 }));
@@ -12179,13 +12187,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
12179
12187
  (0, react_dom_1.createPortal)(
12180
12188
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
12181
12189
  react_1.default.createElement("div", { className: "relative z-50" },
12182
- react_1.default.createElement(drawer_1.Drawer, { darkMode: (_115 = props.organise) === null || _115 === void 0 ? void 0 : _115.darkMode, darkModeBg: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12190
+ 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,
12183
12191
  // INFO: the record stays set while the drawer slides out — clearing it
12184
12192
  // would remount the hidden panel collection-wide and fetch again. The
12185
12193
  // toolbar's collection-wide button clears it when it opens.
12186
12194
  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"
12187
12195
  ? props.title
12188
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_117 = props.id) !== null && _117 !== void 0 ? _117 : "") : activityId, activityLog: (_118 = props.edit) === null || _118 === void 0 ? void 0 : _118.activityLog, model: structure }) })), document.body),
12196
+ : "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),
12189
12197
  renderScrollSentinel()));
12190
12198
  });
12191
12199
  //# sourceMappingURL=index.js.map