blixify-ui-web 1.2.262 → 1.2.264

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -235,7 +235,7 @@ var handleCheckEmptyCardValue = function (value) {
235
235
  };
236
236
  exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
237
237
  exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
238
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123;
238
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126;
239
239
  // INFO: every view draws a lookup as its source column's type, read-only, so
240
240
  // no type branch below meets "lookup"; rawProps.model keeps the lookups as
241
241
  // stored for the columns handed back to the host
@@ -254,7 +254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
254
254
  // the list never refetching while the panel is open, which fails silently.
255
255
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
256
256
  // routed straight back into it — so expand-to-full-page is local state.
257
- var _124 = (0, react_1.useState)(false), drawerPageView = _124[0], setDrawerPageView = _124[1];
257
+ var _127 = (0, react_1.useState)(false), drawerPageView = _127[0], setDrawerPageView = _127[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.
@@ -279,18 +279,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
279
279
  // INFO: the view in the url belongs to the record while its panel is open. A
280
280
  // list following it through the record's tabs cleared its rows and page and
281
281
  // read them again behind the panel, so it keeps the view it was opened on.
282
- var handleResolveListViewId = function () {
283
- var _a, _b, _c;
284
- return ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId) === null || _b === void 0 ? void 0 : _b.startsWith(RELATED_VIEW_PREFIX))
285
- ? undefined
286
- : (_c = props.organise) === null || _c === void 0 ? void 0 : _c.viewId;
287
- };
288
- var hostedListViewIdRef = (0, react_1.useRef)(handleResolveListViewId());
289
- if (!isDrawerHost)
290
- hostedListViewIdRef.current = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId;
291
- var listViewId = isDrawerHost
282
+ // INFO: a related tab is a view of one record, never of the list. A host
283
+ // that keeps the last view it was handed when the panel closes would leave
284
+ // the list on that tab, where it draws nothing, so the list stays on the
285
+ // view it was last on until the host names a list view again.
286
+ var isRelatedViewId = !!((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.viewId) === null || _f === void 0 ? void 0 : _f.startsWith(RELATED_VIEW_PREFIX));
287
+ var hostedListViewIdRef = (0, react_1.useRef)(isRelatedViewId ? undefined : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.viewId);
288
+ if (!isDrawerHost && !isRelatedViewId)
289
+ hostedListViewIdRef.current = (_h = props.organise) === null || _h === void 0 ? void 0 : _h.viewId;
290
+ var listViewId = isDrawerHost || (resolvedType === "list" && isRelatedViewId)
292
291
  ? hostedListViewIdRef.current
293
- : (_f = props.organise) === null || _f === void 0 ? void 0 : _f.viewId;
292
+ : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.viewId;
294
293
  // INFO: the route has already gone back to the list while the panel slides out,
295
294
  // so it keeps drawing what it was opened as until it is gone
296
295
  var drawerFormRef = (0, react_1.useRef)(false);
@@ -310,7 +309,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
310
309
  drawerFormEditedRef.current = false;
311
310
  }
312
311
  drawerOpenRef.current = isDrawerHost;
313
- var _125 = (0, react_1.useState)(false), drawerDiscardModal = _125[0], setDrawerDiscardModal = _125[1];
312
+ var _128 = (0, react_1.useState)(false), drawerDiscardModal = _128[0], setDrawerDiscardModal = _128[1];
314
313
  // INFO: leaving the record ends the escape, so the next row opened from the
315
314
  // list peeks in the panel again rather than inheriting a full page the user
316
315
  // asked for once. Saving a form on the full page lands on its read view, which
@@ -389,14 +388,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
389
388
  initialFilterReferenceDate: initialFilterReferenceDate,
390
389
  };
391
390
  };
392
- var _126 = intialiseDefaultFilterValues(), initialFilterSearch = _126.initialFilterSearch, initialFilterSearchParams = _126.initialFilterSearchParams, initialFilterSelection = _126.initialFilterSelection, initialFilterReference = _126.initialFilterReference, initialFilterReferenceDate = _126.initialFilterReferenceDate;
391
+ var _129 = intialiseDefaultFilterValues(), initialFilterSearch = _129.initialFilterSearch, initialFilterSearchParams = _129.initialFilterSearchParams, initialFilterSelection = _129.initialFilterSelection, initialFilterReference = _129.initialFilterReference, initialFilterReferenceDate = _129.initialFilterReferenceDate;
393
392
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
394
- var _127 = (0, viewStatePersistence_1.usePersistedViewState)({
395
- mode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.persistViewState,
393
+ var _130 = (0, viewStatePersistence_1.usePersistedViewState)({
394
+ mode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.persistViewState,
396
395
  collectionId: props.collectionId,
397
- persistKey: (_h = props.organise) === null || _h === void 0 ? void 0 : _h.persistKey,
396
+ persistKey: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.persistKey,
398
397
  type: resolvedType,
399
- }), rawPersistedState = _127.persistedState, isPersistEnabled = _127.isEnabled, handleSaveView = _127.handleSaveView, handleRegisterViewSnapshot = _127.handleRegisterViewSnapshot;
398
+ }), rawPersistedState = _130.persistedState, isPersistEnabled = _130.isEnabled, handleSaveView = _130.handleSaveView, handleRegisterViewSnapshot = _130.handleRegisterViewSnapshot;
400
399
  // INFO: drop stored filters/sort on removed columns — they would empty the table
401
400
  var persistedState = (0, react_1.useMemo)(function () {
402
401
  var _a, _b, _c, _d;
@@ -408,12 +407,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
408
407
  }, [
409
408
  rawPersistedState,
410
409
  props.model,
411
- (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareFlexFilterReferences,
412
- (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareFlexFilterListObjects,
413
- (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareFlexFilterRelated,
410
+ (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareFlexFilterReferences,
411
+ (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareFlexFilterListObjects,
412
+ (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareFlexFilterRelated,
414
413
  ]);
415
- var _128 = (0, react_1.useState)(false), loading = _128[0], setLoading = _128[1];
416
- var _129 = (0, react_1.useState)(), notification = _129[0], setNotification = _129[1];
414
+ var _131 = (0, react_1.useState)(false), loading = _131[0], setLoading = _131[1];
415
+ var _132 = (0, react_1.useState)(), notification = _132[0], setNotification = _132[1];
417
416
  // INFO: a success toast is confirmation, not a decision — it clears itself so
418
417
  // it never sits on the floating step bar; errors stay until dismissed
419
418
  (0, react_1.useEffect)(function () {
@@ -423,80 +422,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
423
422
  return function () { return clearTimeout(timer); };
424
423
  }, [notification]);
425
424
  //INFO : Used by List
426
- var _130 = (0, react_1.useState)((_m = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _m !== void 0 ? _m : initialFilterSearch), filterSearch = _130[0], setFilterSearch = _130[1];
427
- var _131 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _o !== void 0 ? _o : initialFilterSearchParams), filterSearchParams = _131[0], setFilterSearchParams = _131[1];
428
- var _132 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _p !== void 0 ? _p : initialFilterSelection), filterSelection = _132[0], setFilterSelection = _132[1];
429
- var _133 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _q !== void 0 ? _q : initialFilterReference), filterReference = _133[0], setFilterReference = _133[1];
430
- var _134 = (0, react_1.useState)({}), filterReferenceSearch = _134[0], setFilterReferenceSearch = _134[1];
431
- var _135 = (0, react_1.useState)({}), filterReferenceList = _135[0], setFilterReferenceList = _135[1];
432
- var _136 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
425
+ var _133 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _q !== void 0 ? _q : initialFilterSearch), filterSearch = _133[0], setFilterSearch = _133[1];
426
+ var _134 = (0, react_1.useState)((_r = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _r !== void 0 ? _r : initialFilterSearchParams), filterSearchParams = _134[0], setFilterSearchParams = _134[1];
427
+ var _135 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _s !== void 0 ? _s : initialFilterSelection), filterSelection = _135[0], setFilterSelection = _135[1];
428
+ var _136 = (0, react_1.useState)((_t = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _t !== void 0 ? _t : initialFilterReference), filterReference = _136[0], setFilterReference = _136[1];
429
+ var _137 = (0, react_1.useState)({}), filterReferenceSearch = _137[0], setFilterReferenceSearch = _137[1];
430
+ var _138 = (0, react_1.useState)({}), filterReferenceList = _138[0], setFilterReferenceList = _138[1];
431
+ var _139 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
433
432
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
434
- : initialFilterReferenceDate), filterReferenceDate = _136[0], setFilterReferenceDate = _136[1];
435
- var _137 = (0, react_1.useState)(true), tableLoading = _137[0], setTableLoading = _137[1];
436
- var _138 = (0, react_1.useState)(""), cursor = _138[0], setCursor = _138[1];
437
- var _139 = (0, react_1.useState)(""), lastCursor = _139[0], setLastCursor = _139[1];
438
- var _140 = (0, react_1.useState)([]), tableData = _140[0], setTableData = _140[1];
439
- var _141 = (0, react_1.useState)([]), spaceTableData = _141[0], setSpaceTableData = _141[1];
433
+ : initialFilterReferenceDate), filterReferenceDate = _139[0], setFilterReferenceDate = _139[1];
434
+ var _140 = (0, react_1.useState)(true), tableLoading = _140[0], setTableLoading = _140[1];
435
+ var _141 = (0, react_1.useState)(""), cursor = _141[0], setCursor = _141[1];
436
+ var _142 = (0, react_1.useState)(""), lastCursor = _142[0], setLastCursor = _142[1];
437
+ var _143 = (0, react_1.useState)([]), tableData = _143[0], setTableData = _143[1];
438
+ var _144 = (0, react_1.useState)([]), spaceTableData = _144[0], setSpaceTableData = _144[1];
440
439
  // INFO: a save resolves after later renders, so it reads the table from here —
441
440
  // the state it closed over can predate an earlier save on the same row
442
441
  var tableDataRef = (0, react_1.useRef)([]);
443
442
  var spaceTableDataRef = (0, react_1.useRef)([]);
444
443
  tableDataRef.current = tableData;
445
444
  spaceTableDataRef.current = spaceTableData;
446
- var _142 = (0, react_1.useState)(0), size = _142[0], setSize = _142[1];
447
- var _143 = (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 = _143[0], setPageIndex = _143[1];
445
+ var _145 = (0, react_1.useState)(0), size = _145[0], setSize = _145[1];
446
+ var _146 = (0, react_1.useState)((_w = (_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _u !== void 0 ? _u : (_v = props.organise) === null || _v === void 0 ? void 0 : _v.pageIndex) !== null && _w !== void 0 ? _w : 0), pageIndex = _146[0], setPageIndex = _146[1];
448
447
  // INFO: every change of page, including the return to the first page when a
449
448
  // filter or search changes, which onChangePagination does not always report
450
449
  (0, react_1.useEffect)(function () {
451
450
  var _a, _b;
452
451
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
453
452
  }, [pageIndex]);
454
- var _144 = (0, react_1.useState)([]), selectedIds = _144[0], setSelectedIds = _144[1];
455
- var _145 = (0, react_1.useState)(false), selectAll = _145[0], setSelectAll = _145[1];
456
- var _146 = (0, react_1.useState)(""), deletePasscode = _146[0], setDeletePasscode = _146[1];
457
- var _147 = (0, react_1.useState)(""), deletePasscodeInput = _147[0], setDeletePasscodeInput = _147[1];
458
- var _148 = (0, react_1.useState)(""), deleteFeedId = _148[0], setDeleteFeedId = _148[1];
453
+ var _147 = (0, react_1.useState)([]), selectedIds = _147[0], setSelectedIds = _147[1];
454
+ var _148 = (0, react_1.useState)(false), selectAll = _148[0], setSelectAll = _148[1];
455
+ var _149 = (0, react_1.useState)(""), deletePasscode = _149[0], setDeletePasscode = _149[1];
456
+ var _150 = (0, react_1.useState)(""), deletePasscodeInput = _150[0], setDeletePasscodeInput = _150[1];
457
+ var _151 = (0, react_1.useState)(""), deleteFeedId = _151[0], setDeleteFeedId = _151[1];
459
458
  //INFO : Used by List Organise
460
459
  // INFO: Internal sort state that overrides props.organise?.sort when
461
460
  // persistViewState is enabled and a persisted sort exists
462
- var _149 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _u !== void 0 ? _u : undefined), persistedSort = _149[0], setPersistedSort = _149[1];
463
- var _150 = (0, react_1.useState)(false), filterDraft = _150[0], setFilterDraft = _150[1];
464
- var _151 = (0, react_1.useState)(false), addTabModal = _151[0], setAddTabModal = _151[1];
465
- var _152 = (0, react_1.useState)(-1), editTabIndex = _152[0], setEditTabIndex = _152[1];
461
+ var _152 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _x !== void 0 ? _x : undefined), persistedSort = _152[0], setPersistedSort = _152[1];
462
+ var _153 = (0, react_1.useState)(false), filterDraft = _153[0], setFilterDraft = _153[1];
463
+ var _154 = (0, react_1.useState)(false), addTabModal = _154[0], setAddTabModal = _154[1];
464
+ var _155 = (0, react_1.useState)(-1), editTabIndex = _155[0], setEditTabIndex = _155[1];
466
465
  //INFO : resolve the initial tab synchronously so the mount cond is already
467
466
  // tab-scoped — an empty initial tab caused a second wasted list fetch
468
- var _153 = (0, react_1.useState)(function () {
467
+ var _156 = (0, react_1.useState)(function () {
469
468
  var _a;
470
469
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, listViewId);
471
- }), selectedTab = _153[0], setSelectedTab = _153[1];
472
- var _154 = (0, react_1.useState)("dayGridMonth"), calendarView = _154[0], setCalendarView = _154[1];
470
+ }), selectedTab = _156[0], setSelectedTab = _156[1];
471
+ var _157 = (0, react_1.useState)("dayGridMonth"), calendarView = _157[0], setCalendarView = _157[1];
473
472
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
474
473
  // (calendarView above drives the matching range query)
475
- var _155 = (0, react_1.useState)("month"), newCalendarViewMode = _155[0], setNewCalendarViewMode = _155[1];
476
- var _156 = (0, react_1.useState)(new Date()), calendarTabMonth = _156[0], setCalendarTabMonth = _156[1];
474
+ var _158 = (0, react_1.useState)("month"), newCalendarViewMode = _158[0], setNewCalendarViewMode = _158[1];
475
+ var _159 = (0, react_1.useState)(new Date()), calendarTabMonth = _159[0], setCalendarTabMonth = _159[1];
477
476
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
478
477
  // whenever its settings change, and that must not undo the user's switch
479
478
  var calendarViewInitRef = (0, react_1.useRef)(false);
480
- var _157 = (0, react_1.useState)(true), kanbanDroppable = _157[0], setKanbanDroppable = _157[1];
481
- var _158 = (0, react_1.useState)([]), kanbanOptions = _158[0], setKanbanOptions = _158[1];
482
- var _159 = (0, react_1.useState)(false), batchUpdateModal = _159[0], setBatchUpdateModal = _159[1];
483
- var _160 = (0, react_1.useState)({
479
+ var _160 = (0, react_1.useState)(true), kanbanDroppable = _160[0], setKanbanDroppable = _160[1];
480
+ var _161 = (0, react_1.useState)([]), kanbanOptions = _161[0], setKanbanOptions = _161[1];
481
+ var _162 = (0, react_1.useState)(false), batchUpdateModal = _162[0], setBatchUpdateModal = _162[1];
482
+ var _163 = (0, react_1.useState)({
484
483
  columnId: "",
485
484
  columnData: {},
486
- }), batchUpdateData = _160[0], setBatchUpdateData = _160[1];
485
+ }), batchUpdateData = _163[0], setBatchUpdateData = _163[1];
487
486
  // INFO: system columns (created / updated at and by, record id, number)
488
487
  // join the structure hidden; the ones a user shows are kept per view
489
- var isSystemColumnsEnabled = !!((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareSystemColumns);
490
- var isSystemColumnsLocked = !!((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareSystemColumnsLocked);
488
+ var isSystemColumnsEnabled = !!((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareSystemColumns);
489
+ var isSystemColumnsLocked = !!((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareSystemColumnsLocked);
491
490
  var appendedSystemColumnIds = isSystemColumnsEnabled
492
491
  ? systemColumns_1.SYSTEM_COLUMN_IDS.filter(function (eachId) { var _a; return !((_a = props.model) !== null && _a !== void 0 ? _a : []).some(function (each) { return each.id === eachId; }); })
493
492
  : [];
494
- var _161 = (0, react_1.useState)((_x = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _x !== void 0 ? _x : []), shownSystemColumnIds = _161[0], setShownSystemColumnIds = _161[1];
493
+ var _164 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _0 !== void 0 ? _0 : []), shownSystemColumnIds = _164[0], setShownSystemColumnIds = _164[1];
495
494
  var handleWithSystemColumns = function (model, shownIds) {
496
495
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
497
496
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
498
497
  };
499
- var _162 = (0, react_1.useState)(function () {
498
+ var _165 = (0, react_1.useState)(function () {
500
499
  var _a;
501
500
  var baseModel = handleWithSystemColumns((props === null || props === void 0 ? void 0 : props.model) || [], (_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _a !== void 0 ? _a : []);
502
501
  if (!persistedState)
@@ -523,8 +522,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
523
522
  });
524
523
  }
525
524
  return model;
526
- }), structure = _162[0], setStructure = _162[1];
527
- var _163 = (0, react_1.useState)(((_y = props === null || props === void 0 ? void 0 : props.organise) === null || _y === void 0 ? void 0 : _y.additionalQuery) || []), additionalQuery = _163[0], setAdditionalQuery = _163[1];
525
+ }), structure = _165[0], setStructure = _165[1];
526
+ var _166 = (0, react_1.useState)(((_1 = props === null || props === void 0 ? void 0 : props.organise) === null || _1 === void 0 ? void 0 : _1.additionalQuery) || []), additionalQuery = _166[0], setAdditionalQuery = _166[1];
528
527
  // INFO: State for user-configurable flex filters (Monday.com-style)
529
528
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
530
529
  var defaultFlexFilterRow = [
@@ -536,13 +535,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
536
535
  },
537
536
  ];
538
537
  // 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) &&
538
+ var initialFlexFilterRows = ((_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.initialFlexFilters) &&
540
539
  props.organise.initialFlexFilters.length > 0
541
540
  ? props.organise.initialFlexFilters
542
541
  : (persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
543
542
  ? persistedState.flexFilters
544
543
  : defaultFlexFilterRow;
545
- var _164 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _164[0], setFlexFilters = _164[1];
544
+ var _167 = (0, react_1.useState)(initialFlexFilterRows), flexFilters = _167[0], setFlexFilters = _167[1];
546
545
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
547
546
  // clear methods so chained calls in one tick aren't stale.
548
547
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -555,91 +554,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
555
554
  }, [flexFilters]);
556
555
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
557
556
  // to prevent API calls on every keystroke when typing in value inputs
558
- var _165 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _165[0], setFlexFiltersDebounced = _165[1];
557
+ var _168 = (0, react_1.useState)(initialFlexFilterRows), flexFiltersDebounced = _168[0], setFlexFiltersDebounced = _168[1];
559
558
  // INFO: the filter rows of the export being set up — started from the
560
559
  // list's own when the export opens, so changing them leaves the list as it is
561
- var _166 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _166[0], setExportFlexFilters = _166[1];
562
- var _167 = (0, react_1.useState)({}), flexFilterReferenceOptions = _167[0], setFlexFilterReferenceOptions = _167[1];
563
- var _168 = (0, react_1.useState)({}), flexFilterReferenceSearch = _168[0], setFlexFilterReferenceSearch = _168[1];
564
- var _169 = (0, react_1.useState)(false), flexFilterModalOpen = _169[0], setFlexFilterModalOpen = _169[1];
565
- var _170 = (0, react_1.useState)(false), viewSettingsModalOpen = _170[0], setViewSettingsModalOpen = _170[1];
560
+ var _169 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _169[0], setExportFlexFilters = _169[1];
561
+ var _170 = (0, react_1.useState)({}), flexFilterReferenceOptions = _170[0], setFlexFilterReferenceOptions = _170[1];
562
+ var _171 = (0, react_1.useState)({}), flexFilterReferenceSearch = _171[0], setFlexFilterReferenceSearch = _171[1];
563
+ var _172 = (0, react_1.useState)(false), flexFilterModalOpen = _172[0], setFlexFilterModalOpen = _172[1];
564
+ var _173 = (0, react_1.useState)(false), viewSettingsModalOpen = _173[0], setViewSettingsModalOpen = _173[1];
566
565
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
567
566
  // Deliberately kept out of `structure`: the props-sync effect below resets
568
567
  // structure to props.model whenever props change, which would wipe the
569
568
  // choice, and the persist effect derives schema-level hiddenColumnIds from
570
569
  // structure — writing user hides there would blur the two concepts.
571
- var _171 = (0, react_1.useState)((_0 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _0 !== void 0 ? _0 : []), userHiddenColumnIds = _171[0], setUserHiddenColumnIds = _171[1];
572
- var _172 = (0, react_1.useState)(""), columnSearch = _172[0], setColumnSearch = _172[1];
573
- var _173 = (0, react_1.useState)([]), savedViews = _173[0], setSavedViews = _173[1];
574
- var _174 = (0, react_1.useState)(null), activeSavedViewId = _174[0], setActiveSavedViewId = _174[1];
570
+ var _174 = (0, react_1.useState)((_3 = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _3 !== void 0 ? _3 : []), userHiddenColumnIds = _174[0], setUserHiddenColumnIds = _174[1];
571
+ var _175 = (0, react_1.useState)(""), columnSearch = _175[0], setColumnSearch = _175[1];
572
+ var _176 = (0, react_1.useState)([]), savedViews = _176[0], setSavedViews = _176[1];
573
+ var _177 = (0, react_1.useState)(null), activeSavedViewId = _177[0], setActiveSavedViewId = _177[1];
575
574
  // INFO: the widths of the view on screen, by column id ("180px")
576
- var _175 = (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 = _175[0], setColumnWidths = _175[1];
575
+ var _178 = (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 = _178[0], setColumnWidths = _178[1];
577
576
  // INFO: the columns the view on screen freezes at the left edge
578
- var _176 = (0, react_1.useState)(function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.pinnedColumnIds; }), pinnedColumnIds = _176[0], setPinnedColumnIds = _176[1];
577
+ var _179 = (0, react_1.useState)(function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.allView) === null || _b === void 0 ? void 0 : _b.pinnedColumnIds; }), pinnedColumnIds = _179[0], setPinnedColumnIds = _179[1];
579
578
  // INFO: unsaved changes are kept only once the opening view is on screen,
580
579
  // so the defaults drawn before it never overwrite a person's own
581
- var _177 = (0, react_1.useState)(false), isViewDraftReady = _177[0], setIsViewDraftReady = _177[1];
580
+ var _180 = (0, react_1.useState)(false), isViewDraftReady = _180[0], setIsViewDraftReady = _180[1];
582
581
  // INFO: null while the name box is closed
583
- var _178 = (0, react_1.useState)(null), savedViewName = _178[0], setSavedViewName = _178[1];
584
- var _179 = (0, react_1.useState)(null), deletingSavedViewId = _179[0], setDeletingSavedViewId = _179[1];
585
- var _180 = (0, react_1.useState)(null), renamingSavedView = _180[0], setRenamingSavedView = _180[1];
586
- var _181 = (0, react_1.useState)(false), isSavedViewsExpanded = _181[0], setIsSavedViewsExpanded = _181[1];
587
- var _182 = (0, react_1.useState)(null), draggingColumnId = _182[0], setDraggingColumnId = _182[1];
582
+ var _181 = (0, react_1.useState)(null), savedViewName = _181[0], setSavedViewName = _181[1];
583
+ var _182 = (0, react_1.useState)(null), deletingSavedViewId = _182[0], setDeletingSavedViewId = _182[1];
584
+ var _183 = (0, react_1.useState)(null), renamingSavedView = _183[0], setRenamingSavedView = _183[1];
585
+ var _184 = (0, react_1.useState)(false), isSavedViewsExpanded = _184[0], setIsSavedViewsExpanded = _184[1];
586
+ var _185 = (0, react_1.useState)(null), draggingColumnId = _185[0], setDraggingColumnId = _185[1];
588
587
  var columnRowRefs = (0, react_1.useRef)({});
589
588
  //INFO : Used by Auth
590
- var _183 = (0, react_1.useState)({
589
+ var _186 = (0, react_1.useState)({
591
590
  email: "",
592
591
  google: "",
593
592
  phone: "",
594
593
  disabled: false,
595
594
  create: false,
596
- }), authMethods = _183[0], setAuthMethods = _183[1];
597
- var _184 = (0, react_1.useState)(""), selectedAuthMethod = _184[0], setSelectedAuthMethod = _184[1];
595
+ }), authMethods = _186[0], setAuthMethods = _186[1];
596
+ var _187 = (0, react_1.useState)(""), selectedAuthMethod = _187[0], setSelectedAuthMethod = _187[1];
598
597
  // INFO: the sign-in check of a users datasheet's record is running; the
599
598
  // panel shows a spinner rather than nothing, which read as "no login"
600
- var _185 = (0, react_1.useState)(false), authLoading = _185[0], setAuthLoading = _185[1];
599
+ var _188 = (0, react_1.useState)(false), authLoading = _188[0], setAuthLoading = _188[1];
601
600
  // INFO: a delete is running — the ref answers a second tap at once, before
602
601
  // the state has rendered, and the state disables the confirm button
603
602
  var deletingRef = (0, react_1.useRef)(false);
604
- var _186 = (0, react_1.useState)(false), deleting = _186[0], setDeleting = _186[1];
603
+ var _189 = (0, react_1.useState)(false), deleting = _189[0], setDeleting = _189[1];
605
604
  // INFO: Used by Activity Log
606
- var _187 = (0, react_1.useState)(false), activityModal = _187[0], setActivityModal = _187[1];
607
- var _188 = (0, react_1.useState)(""), activityId = _188[0], setActivityId = _188[1];
605
+ var _190 = (0, react_1.useState)(false), activityModal = _190[0], setActivityModal = _190[1];
606
+ var _191 = (0, react_1.useState)(""), activityId = _191[0], setActivityId = _191[1];
608
607
  //INFO : Used by Export
609
- var _189 = (0, react_1.useState)(null), csvFile = _189[0], setCSVFile = _189[1];
610
- var _190 = (0, react_1.useState)([]), csvFileData = _190[0], setCSVFileData = _190[1];
611
- var _191 = (0, react_1.useState)(0), stepCSVIndex = _191[0], setStepCSVIndex = _191[1];
612
- var _192 = (0, react_1.useState)({}), listCSVMapAttribute = _192[0], setListCSVMapAttribute = _192[1];
613
- var _193 = (0, react_1.useState)({}), listCSVObjAttribute = _193[0], setListCSVObjAttribute = _193[1];
614
- var _194 = (0, react_1.useState)([]), csvAPIAttribute = _194[0], setCSVAPIAttribute = _194[1];
615
- var _195 = (0, react_1.useState)(((_1 = props.devSettings.currentUser) === null || _1 === void 0 ? void 0 : _1.userEmail) || ""), exportCSVEmail = _195[0], setExportCSVEmail = _195[1];
616
- var _196 = (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 = _196[0], setExportPDFTitle = _196[1];
617
- var _197 = (0, react_1.useState)(false), exportPDFLoading = _197[0], setExportPDFLoading = _197[1];
618
- var _198 = (0, react_1.useState)(false), exportReadPDFLoading = _198[0], setExportReadPDFLoading = _198[1];
619
- var _199 = (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 = _199[0], setExportSumAttributeIds = _199[1];
620
- var _200 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.hideSubItems) !== null && _9 !== void 0 ? _9 : false), hideSubItems = _200[0], setHideSubItems = _200[1];
621
- var _201 = (0, react_1.useState)([]), importTableData = _201[0], setImportTableData = _201[1];
622
- var _202 = (0, react_1.useState)([]), queryList = _202[0], setQueryList = _202[1];
623
- var _203 = (0, react_1.useState)(undefined), allQueryList = _203[0], setAllQueryList = _203[1];
608
+ var _192 = (0, react_1.useState)(null), csvFile = _192[0], setCSVFile = _192[1];
609
+ var _193 = (0, react_1.useState)([]), csvFileData = _193[0], setCSVFileData = _193[1];
610
+ var _194 = (0, react_1.useState)(0), stepCSVIndex = _194[0], setStepCSVIndex = _194[1];
611
+ var _195 = (0, react_1.useState)({}), listCSVMapAttribute = _195[0], setListCSVMapAttribute = _195[1];
612
+ var _196 = (0, react_1.useState)({}), listCSVObjAttribute = _196[0], setListCSVObjAttribute = _196[1];
613
+ var _197 = (0, react_1.useState)([]), csvAPIAttribute = _197[0], setCSVAPIAttribute = _197[1];
614
+ var _198 = (0, react_1.useState)(((_4 = props.devSettings.currentUser) === null || _4 === void 0 ? void 0 : _4.userEmail) || ""), exportCSVEmail = _198[0], setExportCSVEmail = _198[1];
615
+ var _199 = (0, react_1.useState)(((_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.exportSettings) === null || _6 === void 0 ? void 0 : _6.defaultExportPDFName) || ""), exportPDFTitle = _199[0], setExportPDFTitle = _199[1];
616
+ var _200 = (0, react_1.useState)(false), exportPDFLoading = _200[0], setExportPDFLoading = _200[1];
617
+ var _201 = (0, react_1.useState)(false), exportReadPDFLoading = _201[0], setExportReadPDFLoading = _201[1];
618
+ var _202 = (0, react_1.useState)((_9 = (_8 = (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.exportSettings) === null || _8 === void 0 ? void 0 : _8.sumColumnId) !== null && _9 !== void 0 ? _9 : []), exportSumAttributeIds = _202[0], setExportSumAttributeIds = _202[1];
619
+ var _203 = (0, react_1.useState)((_12 = (_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.exportSettings) === null || _11 === void 0 ? void 0 : _11.hideSubItems) !== null && _12 !== void 0 ? _12 : false), hideSubItems = _203[0], setHideSubItems = _203[1];
620
+ var _204 = (0, react_1.useState)([]), importTableData = _204[0], setImportTableData = _204[1];
621
+ var _205 = (0, react_1.useState)([]), queryList = _205[0], setQueryList = _205[1];
622
+ var _206 = (0, react_1.useState)(undefined), allQueryList = _206[0], setAllQueryList = _206[1];
624
623
  // INFO: a restored state wins over the prop; its "" is a list the user
625
624
  // ungrouped, so it opens ungrouped
626
- var _204 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
625
+ var _207 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
627
626
  ? persistedState.groupBy || undefined
628
- : (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.groupBy), groupId = _204[0], setGroupId = _204[1];
627
+ : (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.groupBy), groupId = _207[0], setGroupId = _207[1];
629
628
  // INFO: each group's total per number column, keyed by section id
630
- var _205 = (0, react_1.useState)({}), groupSummaries = _205[0], setGroupSummaries = _205[1];
629
+ var _208 = (0, react_1.useState)({}), groupSummaries = _208[0], setGroupSummaries = _208[1];
631
630
  // INFO: each group's row count over every row the filters match; null until
632
631
  // read. A band paged alone shows it until its own first page lands, and a
633
632
  // band it counts empty is left out instead of waiting to be read
634
- var _206 = (0, react_1.useState)(null), groupTotals = _206[0], setGroupTotals = _206[1];
633
+ var _209 = (0, react_1.useState)(null), groupTotals = _209[0], setGroupTotals = _209[1];
635
634
  var groupSummaryRequestRef = (0, react_1.useRef)(0);
636
- var _207 = (0, react_1.useState)({}), commentCounts = _207[0], setCommentCounts = _207[1];
635
+ var _210 = (0, react_1.useState)({}), commentCounts = _210[0], setCommentCounts = _210[1];
637
636
  // INFO: Monday-board per-group paging. Keyed by the group key that
638
637
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
639
638
  // Each group tracks its own loaded cursor + total so it can lazily load its
640
639
  // next page as the user scrolls inside that band, independent of every other
641
640
  // group. Only used when renderCheckGroupPaging() is true.
642
- var _208 = (0, react_1.useState)({}), groupPageState = _208[0], setGroupPageState = _208[1];
641
+ var _211 = (0, react_1.useState)({}), groupPageState = _211[0], setGroupPageState = _211[1];
643
642
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
644
643
  // in one tick do not re-fetch an already in-flight page.
645
644
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -654,62 +653,62 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
654
653
  var groupLoadingKeyRef = (0, react_1.useRef)(null);
655
654
  var groupLoadQueueRef = (0, react_1.useRef)([]);
656
655
  var handleFetchGroupNextPageRef = (0, react_1.useRef)(function () { });
657
- var _209 = (0, react_1.useState)(""), readTabSection = _209[0], setReadTabSection = _209[1];
658
- var _210 = (0, react_1.useState)(false), readFloatingNav = _210[0], setReadFloatingNav = _210[1];
656
+ var _212 = (0, react_1.useState)(""), readTabSection = _212[0], setReadTabSection = _212[1];
657
+ var _213 = (0, react_1.useState)(false), readFloatingNav = _213[0], setReadFloatingNav = _213[1];
659
658
  var readTabSectionRefs = (0, react_1.useRef)({});
660
659
  //INFO : Used by Read
661
660
  //INFO : Used by Update
662
- var _211 = (0, react_1.useState)(false), modalVisible = _211[0], setModalVisible = _211[1];
663
- var _212 = (0, react_1.useState)(false), deleteModal = _212[0], setDeleteModal = _212[1];
664
- var _213 = (0, react_1.useState)(false), excelModal = _213[0], setExcelModal = _213[1];
665
- var _214 = (0, react_1.useState)(false), exportExcel = _214[0], setExportExcel = _214[1];
666
- var _215 = (0, react_1.useState)(""), exportType = _215[0], setExportType = _215[1];
667
- var _216 = (0, react_1.useState)(false), exportQR = _216[0], setExportQR = _216[1];
668
- var _217 = (0, react_1.useState)(function () {
661
+ var _214 = (0, react_1.useState)(false), modalVisible = _214[0], setModalVisible = _214[1];
662
+ var _215 = (0, react_1.useState)(false), deleteModal = _215[0], setDeleteModal = _215[1];
663
+ var _216 = (0, react_1.useState)(false), excelModal = _216[0], setExcelModal = _216[1];
664
+ var _217 = (0, react_1.useState)(false), exportExcel = _217[0], setExportExcel = _217[1];
665
+ var _218 = (0, react_1.useState)(""), exportType = _218[0], setExportType = _218[1];
666
+ var _219 = (0, react_1.useState)(false), exportQR = _219[0], setExportQR = _219[1];
667
+ var _220 = (0, react_1.useState)(function () {
669
668
  var _a, _b;
670
669
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
671
670
  return firstTabId;
672
- }), activeTab = _217[0], setActiveTab = _217[1];
673
- var _218 = (0, react_1.useState)(false), signatureSigning = _218[0], setSignatureSigning = _218[1];
674
- var _219 = (0, react_1.useState)({}), selectedData = _219[0], setSelectedData = _219[1];
675
- var _220 = (0, react_1.useState)(""), selectedObjectStructureId = _220[0], setSelectedObjectStructureId = _220[1];
676
- var _221 = (0, react_1.useState)(""), selectedObjectId = _221[0], setSelectedObjectId = _221[1];
677
- var _222 = (0, react_1.useState)(""), selectedListAddressId = _222[0], setSelectedListAddressId = _222[1];
678
- var _223 = (0, react_1.useState)(-1), selectedListAddressIndex = _223[0], setSelectedListAddressIndex = _223[1];
679
- var _224 = (0, react_1.useState)({
671
+ }), activeTab = _220[0], setActiveTab = _220[1];
672
+ var _221 = (0, react_1.useState)(false), signatureSigning = _221[0], setSignatureSigning = _221[1];
673
+ var _222 = (0, react_1.useState)({}), selectedData = _222[0], setSelectedData = _222[1];
674
+ var _223 = (0, react_1.useState)(""), selectedObjectStructureId = _223[0], setSelectedObjectStructureId = _223[1];
675
+ var _224 = (0, react_1.useState)(""), selectedObjectId = _224[0], setSelectedObjectId = _224[1];
676
+ var _225 = (0, react_1.useState)(""), selectedListAddressId = _225[0], setSelectedListAddressId = _225[1];
677
+ var _226 = (0, react_1.useState)(-1), selectedListAddressIndex = _226[0], setSelectedListAddressIndex = _226[1];
678
+ var _227 = (0, react_1.useState)({
680
679
  lat: 0,
681
680
  lng: 0,
682
681
  name: "",
683
- }), selectedListAddress = _224[0], setSelectedListAddress = _224[1];
684
- var _225 = (0, react_1.useState)({}), selectedObjectData = _225[0], setSelectedObjectData = _225[1];
685
- var _226 = (0, react_1.useState)(null), objectCellEdit = _226[0], setObjectCellEdit = _226[1];
686
- var _227 = (0, react_1.useState)(false), referenceLoading = _227[0], setReferenceLoading = _227[1];
687
- var _228 = (0, react_1.useState)({}), referencesOptions = _228[0], setReferencesOptions = _228[1];
688
- var _229 = (0, react_1.useState)({}), referencesDetails = _229[0], setReferencesDetails = _229[1];
689
- var _230 = (0, react_1.useState)({}), listReferencesOptions = _230[0], setListReferencesOptions = _230[1];
682
+ }), selectedListAddress = _227[0], setSelectedListAddress = _227[1];
683
+ var _228 = (0, react_1.useState)({}), selectedObjectData = _228[0], setSelectedObjectData = _228[1];
684
+ var _229 = (0, react_1.useState)(null), objectCellEdit = _229[0], setObjectCellEdit = _229[1];
685
+ var _230 = (0, react_1.useState)(false), referenceLoading = _230[0], setReferenceLoading = _230[1];
686
+ var _231 = (0, react_1.useState)({}), referencesOptions = _231[0], setReferencesOptions = _231[1];
687
+ var _232 = (0, react_1.useState)({}), referencesDetails = _232[0], setReferencesDetails = _232[1];
688
+ var _233 = (0, react_1.useState)({}), listReferencesOptions = _233[0], setListReferencesOptions = _233[1];
690
689
  // INFO: the referenced records themselves, for a table cell that picks from
691
690
  // a list on one (referenceSelection)
692
- var _231 = (0, react_1.useState)({}), listReferencesDetails = _231[0], setListReferencesDetails = _231[1];
693
- var _232 = (0, react_1.useState)({}), referenceDeleteTableData = _232[0], setReferenceDeleteTableData = _232[1];
694
- var _233 = (0, react_1.useState)([]), relatedSections = _233[0], setRelatedSections = _233[1];
695
- var _234 = (0, react_1.useState)(0), referenceDeleteIndex = _234[0], setReferenceDeleteIndex = _234[1];
696
- var _235 = (0, react_1.useState)({
691
+ var _234 = (0, react_1.useState)({}), listReferencesDetails = _234[0], setListReferencesDetails = _234[1];
692
+ var _235 = (0, react_1.useState)({}), referenceDeleteTableData = _235[0], setReferenceDeleteTableData = _235[1];
693
+ var _236 = (0, react_1.useState)([]), relatedSections = _236[0], setRelatedSections = _236[1];
694
+ var _237 = (0, react_1.useState)(0), referenceDeleteIndex = _237[0], setReferenceDeleteIndex = _237[1];
695
+ var _238 = (0, react_1.useState)({
697
696
  id: "",
698
697
  name: "",
699
698
  type: "string",
700
- }), referenceCreationModal = _235[0], setReferenceCreationModal = _235[1];
701
- var _236 = (0, react_1.useState)({}), referenceModelSchema = _236[0], setReferenceSchema = _236[1];
702
- var _237 = (0, react_1.useState)([]), kanbanChecked = _237[0], setKanbanChecked = _237[1];
699
+ }), referenceCreationModal = _238[0], setReferenceCreationModal = _238[1];
700
+ var _239 = (0, react_1.useState)({}), referenceModelSchema = _239[0], setReferenceSchema = _239[1];
701
+ var _240 = (0, react_1.useState)([]), kanbanChecked = _240[0], setKanbanChecked = _240[1];
703
702
  //INFO : Offline
704
- var _238 = (0, react_1.useState)(0), offlineDataLength = _238[0], setOfflineDataLength = _238[1];
705
- var _239 = (0, react_1.useState)(false), offlineModal = _239[0], setOfflineModal = _239[1];
703
+ var _241 = (0, react_1.useState)(0), offlineDataLength = _241[0], setOfflineDataLength = _241[1];
704
+ var _242 = (0, react_1.useState)(false), offlineModal = _242[0], setOfflineModal = _242[1];
706
705
  // INFO: live-stream state — driven by socket connection and navigator.onLine
707
- var _240 = (0, react_1.useState)(false), isLive = _240[0], setIsLive = _240[1];
708
- var _241 = (0, react_1.useState)(false), isLiveOffline = _241[0], setIsLiveOffline = _241[1];
706
+ var _243 = (0, react_1.useState)(false), isLive = _243[0], setIsLive = _243[1];
707
+ var _244 = (0, react_1.useState)(false), isLiveOffline = _244[0], setIsLiveOffline = _244[1];
709
708
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
710
709
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
711
710
  // Independent of SSE status so it works even when bareSocketName is not set.
712
- var _242 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _242[0], setIsNetworkOffline = _242[1];
711
+ var _245 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _245[0], setIsNetworkOffline = _245[1];
713
712
  var previousType = (0, react_1.useRef)(null);
714
713
  var previousSelectedData = (0, react_1.useRef)(null);
715
714
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -837,7 +836,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
837
836
  * viewId still wins when present: it is a deliberate destination, from a
838
837
  * shared link or a back button.
839
838
  */
840
- 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;
839
+ var defaultTabName = (_16 = (_15 = (_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.extendedTabs) === null || _15 === void 0 ? void 0 : _15.find(function (eachTab) { return eachTab.defaultTab; })) === null || _16 === void 0 ? void 0 : _16.name;
841
840
  // INFO: the pinned tab is a LIST destination. Falling back to it while a
842
841
  // record is open resolved the read view to a list tab, which renderTabContent
843
842
  // refuses — so General Details rendered nothing. Only a list falls back.
@@ -849,14 +848,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
849
848
  // INFO: Firestore reads and the monday wrapper join every condition with AND
850
849
  // (monday flattens all ORs into one), so a flex OR group is offered on Mongo only
851
850
  var isFlexOrSupported = !isFirebase && devSettings.server !== "mondayServer";
852
- var isDateWarnings = !!((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.dateWarnings);
853
- var isDatasheetDefaults = !!((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.datasheetDefaults);
851
+ var isDateWarnings = !!((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.dateWarnings);
852
+ var isDatasheetDefaults = !!((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.datasheetDefaults);
854
853
  // INFO: the columns as the views draw them — with datasheet defaults every
855
854
  // list option without a colour takes the palette colour of its position
856
855
  var displayStructure = isDatasheetDefaults
857
856
  ? (0, defaultColours_1.handleApplyDefaultColours)(structure)
858
857
  : structure;
859
- 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;
858
+ var dbModule = isFirebaseClient ? (_19 = props.lib) === null || _19 === void 0 ? void 0 : _19.firebase : (_20 = props.lib) === null || _20 === void 0 ? void 0 : _20.axios;
860
859
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
861
860
  var selectedRelated = resolvedType === "read"
862
861
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -1021,32 +1020,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1021
1020
  }, [
1022
1021
  resolvedType,
1023
1022
  props.id,
1024
- (_18 = props.space) === null || _18 === void 0 ? void 0 : _18._id,
1023
+ (_21 = props.space) === null || _21 === void 0 ? void 0 : _21._id,
1025
1024
  props.devSettings.schemaEndpoint,
1026
- (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.showRelatedTab,
1025
+ (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.showRelatedTab,
1027
1026
  ]);
1028
1027
  /* eslint-enable */
1029
1028
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
1030
1029
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
1031
- var isViewSettingsEnabled = ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareViewSettings) || ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareNewDTW)
1030
+ var isViewSettingsEnabled = ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareViewSettings) || ((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareNewDTW)
1032
1031
  ? true
1033
1032
  : false;
1034
1033
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
1035
1034
  // (shared by every user) — toggling writes to the model and calls back. Without it
1036
1035
  // the hide is this user's own and lives in userHiddenColumnIds.
1037
- var isSchemaHideMode = ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.onChangeHide) ? true : false;
1036
+ var isSchemaHideMode = ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.onChangeHide) ? true : false;
1038
1037
  // INFO: rows per page is a view setting the user can change, so it starts from
1039
1038
  // the persisted value and falls back to the consumer's limit
1040
- var _243 = (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 = _243[0], setPageLimit = _243[1];
1039
+ var _246 = (0, react_1.useState)((_27 = (_26 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _26 !== void 0 ? _26 : props.limit) !== null && _27 !== void 0 ? _27 : 10), pageLimit = _246[0], setPageLimit = _246[1];
1041
1040
  var limit = pageLimit;
1042
- var isSavedViewsEnabled = !!((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.savedViews) && resolvedType === "list";
1041
+ var isSavedViewsEnabled = !!((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.savedViews) && resolvedType === "list";
1043
1042
  // INFO: an app that stores views takes over from this browser's storage, so
1044
1043
  // every view is the team's and nothing is kept locally
1045
- var isAppViews = ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.sharedViews) !== undefined ||
1046
- !!((_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.onChangeSharedViews);
1044
+ var isAppViews = ((_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.sharedViews) !== undefined ||
1045
+ !!((_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.onChangeSharedViews);
1047
1046
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
1048
1047
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
1049
- var activeSortId = (isInternalSort && persistedSort) || ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.sort);
1048
+ var activeSortId = (isInternalSort && persistedSort) || ((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.sort);
1050
1049
  var handleSortColumn = function (value) {
1051
1050
  var _a, _b, _c, _d;
1052
1051
  if (isInternalSort)
@@ -1076,7 +1075,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1076
1075
  // INFO: Firebase pages by document cursor and a union by skip, so neither
1077
1076
  // can hand over the whole set — there formula columns are not offered for
1078
1077
  // sorting or filtering, rather than ordering one page
1079
- var isFormulaViewSupported = !isFirebase && !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.unionCollections) === null || _30 === void 0 ? void 0 : _30.length);
1078
+ var isFormulaViewSupported = !isFirebase && !((_33 = (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.unionCollections) === null || _33 === void 0 ? void 0 : _33.length);
1080
1079
  var formulaSort = isFormulaViewSupported &&
1081
1080
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
1082
1081
  formulaColumnIds.includes(activeSortId.sortId)
@@ -1085,11 +1084,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1085
1084
  // INFO: a referenced record and related rows are joined by MongoWrapper's
1086
1085
  // lookups and a list row is matched by its Mongo path — neither Firebase nor
1087
1086
  // a union read runs them
1088
- var flexFilterExtras = !isFirebase && !((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.unionCollections) === null || _32 === void 0 ? void 0 : _32.length)
1087
+ var flexFilterExtras = !isFirebase && !((_35 = (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.unionCollections) === null || _35 === void 0 ? void 0 : _35.length)
1089
1088
  ? {
1090
- references: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareFlexFilterReferences,
1091
- listObjects: (_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareFlexFilterListObjects,
1092
- related: (_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareFlexFilterRelated,
1089
+ references: (_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareFlexFilterReferences,
1090
+ listObjects: (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareFlexFilterListObjects,
1091
+ related: (_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareFlexFilterRelated,
1093
1092
  }
1094
1093
  : undefined;
1095
1094
  // INFO: a formula filter is matched in the browser and the rest on the
@@ -1178,18 +1177,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1178
1177
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
1179
1178
  };
1180
1179
  };
1181
- var _244 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _244.canUpdateRecord, canInlineUpdate = _244.canInlineUpdate, canBatchUpdate = _244.canBatchUpdate, canDeleteRecord = _244.canDeleteRecord;
1182
- var isEditor = ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) ? true : false;
1183
- var isOffline = (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOffline;
1180
+ var _247 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _247.canUpdateRecord, canInlineUpdate = _247.canInlineUpdate, canBatchUpdate = _247.canBatchUpdate, canDeleteRecord = _247.canDeleteRecord;
1181
+ var isEditor = ((_39 = props.edit) === null || _39 === void 0 ? void 0 : _39.allEditable) ? true : false;
1182
+ var isOffline = (_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareOffline;
1184
1183
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
1185
1184
  // the live network state — online saves go to the server even if bareOffline
1186
1185
  // is true, offline saves go to IDB as normal.
1187
- var isOfflineNetworkListener = isOffline && ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareOfflineNetworkListener);
1188
- var showId = (_39 = props.space) === null || _39 === void 0 ? void 0 : _39.showId;
1186
+ var isOfflineNetworkListener = isOffline && ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareOfflineNetworkListener);
1187
+ var showId = (_42 = props.space) === null || _42 === void 0 ? void 0 : _42.showId;
1189
1188
  var remainId = showId || selectedObjectStructureId ? true : false;
1190
- var idField = ((_40 = props.space) === null || _40 === void 0 ? void 0 : _40.idField) || ((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.idField);
1191
- var pipeline = (_42 = props === null || props === void 0 ? void 0 : props.space) === null || _42 === void 0 ? void 0 : _42.pipeline;
1192
- if ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareListPipeline) {
1189
+ var idField = ((_43 = props.space) === null || _43 === void 0 ? void 0 : _43.idField) || ((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.idField);
1190
+ var pipeline = (_45 = props === null || props === void 0 ? void 0 : props.space) === null || _45 === void 0 ? void 0 : _45.pipeline;
1191
+ if ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareListPipeline) {
1193
1192
  pipeline = pipeline
1194
1193
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
1195
1194
  }
@@ -1202,24 +1201,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1202
1201
  * three records came back instead of five files, and each tile received the
1203
1202
  * whole array rather than one file, so every one of them read "Attachment".
1204
1203
  */
1205
- var fileViewColumnId = (_47 = (_46 = ((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.extendedTabs) !== null && _45 !== void 0 ? _45 : []).find(function (eachTab) {
1204
+ var fileViewColumnId = (_50 = (_49 = ((_48 = (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.extendedTabs) !== null && _48 !== void 0 ? _48 : []).find(function (eachTab) {
1206
1205
  return eachTab.viewType === "file" &&
1207
1206
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
1208
- })) === null || _46 === void 0 ? void 0 : _46.fileSettings) === null || _47 === void 0 ? void 0 : _47.columnId;
1209
- var hasNavigation = ((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.handleNavigate) ? true : false;
1207
+ })) === null || _49 === void 0 ? void 0 : _49.fileSettings) === null || _50 === void 0 ? void 0 : _50.columnId;
1208
+ var hasNavigation = ((_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.handleNavigate) ? true : false;
1210
1209
  var formColumn = "grid-cols-12";
1211
- var useMobileView = (_50 = (_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareUpdateMobileView) !== null && _50 !== void 0 ? _50 : false;
1210
+ var useMobileView = (_53 = (_52 = props.bareSettings) === null || _52 === void 0 ? void 0 : _52.bareUpdateMobileView) !== null && _53 !== void 0 ? _53 : false;
1212
1211
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
1213
- var isActivityLog = (((_52 = (_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.activityLog) === null || _52 === void 0 ? void 0 : _52.enableComments) &&
1214
- ((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.activityLog.commentCollectionId)) ||
1215
- (((_55 = (_54 = props.edit) === null || _54 === void 0 ? void 0 : _54.activityLog) === null || _55 === void 0 ? void 0 : _55.enableLogs) &&
1216
- ((_56 = props.edit) === null || _56 === void 0 ? void 0 : _56.activityLog.logsCollectionId));
1217
- var customPaginationSize = ((_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.customPaginationCount)
1212
+ var isActivityLog = (((_55 = (_54 = props.edit) === null || _54 === void 0 ? void 0 : _54.activityLog) === null || _55 === void 0 ? void 0 : _55.enableComments) &&
1213
+ ((_56 = props.edit) === null || _56 === void 0 ? void 0 : _56.activityLog.commentCollectionId)) ||
1214
+ (((_58 = (_57 = props.edit) === null || _57 === void 0 ? void 0 : _57.activityLog) === null || _58 === void 0 ? void 0 : _58.enableLogs) &&
1215
+ ((_59 = props.edit) === null || _59 === void 0 ? void 0 : _59.activityLog.logsCollectionId));
1216
+ var customPaginationSize = ((_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.customPaginationCount)
1218
1217
  ? props.organise.customPaginationCount(size)
1219
1218
  : undefined;
1220
1219
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1221
1220
  var writeServerQuery = new writeQuery_1.WriteQuery({
1222
- dbModule: (_58 = props.lib) === null || _58 === void 0 ? void 0 : _58.axios,
1221
+ dbModule: (_61 = props.lib) === null || _61 === void 0 ? void 0 : _61.axios,
1223
1222
  dbType: devSettings.server,
1224
1223
  dbCollection: props.collectionId,
1225
1224
  dbEndpoint: devSettings.dbEndpoint,
@@ -1227,7 +1226,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1227
1226
  dbUserToken: devSettings.dbUserToken,
1228
1227
  });
1229
1228
  var readServerQuery = new readQuery_1.ReadQuery({
1230
- dbModule: (_59 = props.lib) === null || _59 === void 0 ? void 0 : _59.axios,
1229
+ dbModule: (_62 = props.lib) === null || _62 === void 0 ? void 0 : _62.axios,
1231
1230
  dbType: devSettings.server,
1232
1231
  dbCollection: props.collectionId,
1233
1232
  dbEndpoint: devSettings.dbEndpoint,
@@ -1235,12 +1234,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1235
1234
  dbUserToken: devSettings.dbUserToken,
1236
1235
  });
1237
1236
  var moreButtonPopUp = [
1238
- ((_60 = props.edit) === null || _60 === void 0 ? void 0 : _60.allEditable) &&
1237
+ ((_63 = props.edit) === null || _63 === void 0 ? void 0 : _63.allEditable) &&
1239
1238
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1240
1239
  // datasheet served through one can import; only the browser-direct
1241
1240
  // Firebase client has no server to import through
1242
1241
  !isFirebaseClient &&
1243
- !((_62 = (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.exportSettings) === null || _62 === void 0 ? void 0 : _62.hideImportCSV)
1242
+ !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideImportCSV)
1244
1243
  ? {
1245
1244
  text: "Import Excel",
1246
1245
  onClick: function () {
@@ -1249,7 +1248,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1249
1248
  },
1250
1249
  }
1251
1250
  : null,
1252
- !((_64 = (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.exportSettings) === null || _64 === void 0 ? void 0 : _64.hideExportCSV)
1251
+ !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportCSV)
1253
1252
  ? {
1254
1253
  text: "Export CSV",
1255
1254
  onClick: function () {
@@ -1259,7 +1258,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1259
1258
  },
1260
1259
  }
1261
1260
  : null,
1262
- !((_66 = (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.exportSettings) === null || _66 === void 0 ? void 0 : _66.hideExportExcel)
1261
+ !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportExcel)
1263
1262
  ? {
1264
1263
  text: "Export Excel",
1265
1264
  onClick: function () {
@@ -1269,7 +1268,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1269
1268
  },
1270
1269
  }
1271
1270
  : null,
1272
- !((_68 = (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.exportSettings) === null || _68 === void 0 ? void 0 : _68.hideExportPDF)
1271
+ !((_71 = (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.exportSettings) === null || _71 === void 0 ? void 0 : _71.hideExportPDF)
1273
1272
  ? {
1274
1273
  text: "Export PDF",
1275
1274
  onClick: function () {
@@ -1279,7 +1278,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1279
1278
  },
1280
1279
  }
1281
1280
  : null,
1282
- !((_70 = (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.exportSettings) === null || _70 === void 0 ? void 0 : _70.hideExportQR)
1281
+ !((_73 = (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.exportSettings) === null || _73 === void 0 ? void 0 : _73.hideExportQR)
1283
1282
  ? {
1284
1283
  text: "Export QR",
1285
1284
  onClick: function () {
@@ -1289,7 +1288,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1289
1288
  },
1290
1289
  }
1291
1290
  : null,
1292
- !((_72 = (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.exportSettings) === null || _72 === void 0 ? void 0 : _72.hideExportQR)
1291
+ !((_75 = (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.exportSettings) === null || _75 === void 0 ? void 0 : _75.hideExportQR)
1293
1292
  ? {
1294
1293
  text: "Export QR(Data)",
1295
1294
  onClick: function () {
@@ -1299,7 +1298,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1299
1298
  },
1300
1299
  }
1301
1300
  : null,
1302
- !((_74 = (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.exportSettings) === null || _74 === void 0 ? void 0 : _74.hideExportPrint)
1301
+ !((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportPrint)
1303
1302
  ? {
1304
1303
  text: "Print",
1305
1304
  onClick: function () {
@@ -1311,8 +1310,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1311
1310
  : null,
1312
1311
  // INFO: drafts only exist where the form can save one, so the filter has
1313
1312
  // nothing to find on any other page
1314
- ((_75 = props.edit) === null || _75 === void 0 ? void 0 : _75.enableUpdateDraft) &&
1315
- !((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.exportSettings) === null || _77 === void 0 ? void 0 : _77.hideExportDraft)
1313
+ ((_78 = props.edit) === null || _78 === void 0 ? void 0 : _78.enableUpdateDraft) &&
1314
+ !((_80 = (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.exportSettings) === null || _80 === void 0 ? void 0 : _80.hideExportDraft)
1316
1315
  ? {
1317
1316
  text: filterDraft ? "Show All Items" : "Filter Draft",
1318
1317
  onClick: function () {
@@ -1321,7 +1320,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1321
1320
  }
1322
1321
  : null,
1323
1322
  ].filter(Boolean);
1324
- if ((_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.moreSettings)
1323
+ if ((_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.moreSettings)
1325
1324
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1326
1325
  //=====================================================================================
1327
1326
  //SECTION: User Column Visibility Handlers
@@ -1761,14 +1760,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1761
1760
  //=====================================================================================
1762
1761
  //SECTION: Saved Views
1763
1762
  //=====================================================================================
1764
- 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);
1763
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.persistKey, (_83 = devSettings.currentUser) === null || _83 === void 0 ? void 0 : _83.userEmail);
1765
1764
  (0, react_1.useEffect)(function () {
1766
1765
  if (isSavedViewsEnabled && !isAppViews)
1767
1766
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1768
1767
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1769
1768
  // INFO: the app keeps All's settings, so every change is kept in this
1770
1769
  // browser until the person updates the view for everyone or resets it
1771
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.allView) !== undefined;
1770
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.allView) !== undefined;
1772
1771
  var handleGetViewDraftKey = function (viewId) {
1773
1772
  var _a, _b;
1774
1773
  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);
@@ -1852,7 +1851,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1852
1851
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1853
1852
  (0, react_1.useEffect)(function () {
1854
1853
  lastSentSharedViewsRef.current = null;
1855
- }, [(_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.sharedViews]);
1854
+ }, [(_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.sharedViews]);
1856
1855
  var handleStoreSharedViews = function (update) {
1857
1856
  var _a, _b, _c;
1858
1857
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1897,13 +1896,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
1897
1896
  /* eslint-disable */
1898
1897
  }, [
1899
1898
  isSavedViewsEnabled,
1900
- (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.initialSavedViewId,
1901
- (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.defaultSavedViewId,
1902
- (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.sharedViews,
1899
+ (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.initialSavedViewId,
1900
+ (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.defaultSavedViewId,
1901
+ (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.sharedViews,
1903
1902
  savedViews,
1904
1903
  ]);
1905
1904
  /* eslint-enable */
1906
- var defaultSavedViewIds = ((_87 = (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.defaultSavedViews) !== null && _87 !== void 0 ? _87 : [])
1905
+ var defaultSavedViewIds = ((_90 = (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.defaultSavedViews) !== null && _90 !== void 0 ? _90 : [])
1907
1906
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1908
1907
  .join("|");
1909
1908
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -2233,8 +2232,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2233
2232
  groupId,
2234
2233
  columnWidths,
2235
2234
  pinnedColumnIds,
2236
- (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.allView,
2237
- (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.sharedViews,
2235
+ (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.allView,
2236
+ (_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.sharedViews,
2238
2237
  savedViews,
2239
2238
  ]);
2240
2239
  /* eslint-enable */
@@ -2274,7 +2273,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2274
2273
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2275
2274
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2276
2275
  /* eslint-disable */
2277
- }, [props.collectionId, (_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.persistKey]);
2276
+ }, [props.collectionId, (_93 = props.organise) === null || _93 === void 0 ? void 0 : _93.persistKey]);
2278
2277
  /* eslint-enable */
2279
2278
  // INFO: wait a frame — rows land in state one tick before layout
2280
2279
  (0, react_1.useEffect)(function () {
@@ -2309,7 +2308,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2309
2308
  (0, react_1.useEffect)(function () {
2310
2309
  handleOfflinePrefetch();
2311
2310
  /* eslint-disable */
2312
- }, [props.collectionId, (_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.bareOffline]);
2311
+ }, [props.collectionId, (_94 = props.bareSettings) === null || _94 === void 0 ? void 0 : _94.bareOffline]);
2313
2312
  /* eslint-enable */
2314
2313
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2315
2314
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2329,7 +2328,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2329
2328
  }, interval);
2330
2329
  return function () { return clearInterval(timer); };
2331
2330
  /* eslint-disable */
2332
- }, [(_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.barePollingInterval, isLive, isNetworkOffline]);
2331
+ }, [(_95 = props.bareSettings) === null || _95 === void 0 ? void 0 : _95.barePollingInterval, isLive, isNetworkOffline]);
2333
2332
  /* eslint-enable */
2334
2333
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2335
2334
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2371,7 +2370,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2371
2370
  };
2372
2371
  /* eslint-disable */
2373
2372
  }, [
2374
- (_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareSocketName,
2373
+ (_96 = props.bareSettings) === null || _96 === void 0 ? void 0 : _96.bareSocketName,
2375
2374
  props.collectionId,
2376
2375
  props.devSettings.sseEndpoint,
2377
2376
  props.devSettings.dbAPIToken,
@@ -2645,10 +2644,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2645
2644
  props.collectionId,
2646
2645
  props.model,
2647
2646
  props.localURLEndpoint,
2648
- (_94 = props.organise) === null || _94 === void 0 ? void 0 : _94.extendedTabs,
2647
+ (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.extendedTabs,
2649
2648
  listViewId,
2650
- (_95 = props.organise) === null || _95 === void 0 ? void 0 : _95.additionalQuery,
2651
- (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.groupBy,
2649
+ (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.additionalQuery,
2650
+ (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.groupBy,
2652
2651
  resolvedType,
2653
2652
  ]);
2654
2653
  /**
@@ -2800,7 +2799,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2800
2799
  };
2801
2800
  }, 100);
2802
2801
  return function () { return clearTimeout(timeoutId); };
2803
- }, [(_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.showReadFloatingNav, resolvedType, props.id, loading]);
2802
+ }, [(_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.showReadFloatingNav, resolvedType, props.id, loading]);
2804
2803
  (0, react_1.useEffect)(function () {
2805
2804
  if (resolvedType !== "read")
2806
2805
  return;
@@ -5946,7 +5945,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5946
5945
  var columnTypeActions = {
5947
5946
  canUpdate: canUpdateRecord,
5948
5947
  dateWarnings: isDateWarnings,
5949
- onButtonClick: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.onButtonClick,
5948
+ onButtonClick: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.onButtonClick,
5950
5949
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5951
5950
  var _a;
5952
5951
  return __generator(this, function (_b) {
@@ -5963,7 +5962,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
5963
5962
  }
5964
5963
  });
5965
5964
  }); },
5966
- onTimeTrackingAction: ((_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.onTimeTrackingAction) && canUpdateRecord
5965
+ onTimeTrackingAction: ((_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.onTimeTrackingAction) && canUpdateRecord
5967
5966
  ? function (rowId, columnId, action) {
5968
5967
  return handleTimeTrackingAction(rowId, columnId, action);
5969
5968
  }
@@ -8206,8 +8205,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8206
8205
  : rows;
8207
8206
  };
8208
8207
  /* eslint-disable */
8209
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_100 = props.bareSettings) === null || _100 === void 0 ? void 0 : _100.bareNewDTW]);
8210
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_101 = props.bareSettings) === null || _101 === void 0 ? void 0 : _101.bareNewDTW]);
8208
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_103 = props.bareSettings) === null || _103 === void 0 ? void 0 : _103.bareNewDTW]);
8209
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_104 = props.bareSettings) === null || _104 === void 0 ? void 0 : _104.bareNewDTW]);
8211
8210
  /* eslint-enable */
8212
8211
  // INFO: beside a record's title, the pencil opens its edit form for whoever
8213
8212
  // may update, and the bubble opens comments and logs for anyone who can see
@@ -8955,17 +8954,26 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8955
8954
  if ((_a = target.closest) === null || _a === void 0 ? void 0 : _a.call(target, 'button, [role="option"], [role="menuitem"], li'))
8956
8955
  handleMarkDrawerFormEdited();
8957
8956
  };
8957
+ // INFO: the panel goes back to the list it was opened over, on the tab it
8958
+ // was opened from. Opening a record names "general" as its view, and closing
8959
+ // named none, so a list opened on List, Kanban or Grid came back on Table
8960
+ // View. The record inside the panel is a nested instance that cannot see the
8961
+ // list's tab, so its own way back (delete, a failed load) goes through here
8962
+ // too.
8963
+ var handleNavigateFromDrawer = function (type, selectedId, viewId) {
8964
+ var _a, _b, _c;
8965
+ return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, type, selectedId, type === "list" ? ((_c = hostedListViewIdRef.current) !== null && _c !== void 0 ? _c : viewId) : viewId);
8966
+ };
8958
8967
  var renderReadDrawer = function () {
8959
- var _a, _b, _c, _d;
8968
+ var _a, _b, _c, _d, _e;
8960
8969
  if (!canHostDrawer)
8961
8970
  return null;
8962
8971
  var isForm = drawerFormRef.current;
8963
8972
  var handleCloseDrawer = function () {
8964
- var _a, _b;
8965
8973
  setDrawerDiscardModal(false);
8966
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", "");
8974
+ handleNavigateFromDrawer("list", "");
8967
8975
  };
8968
- var _e = (_b = (_a = props.viewSettings) === null || _a === void 0 ? void 0 : _a.readDrawer) !== null && _b !== void 0 ? _b : {}, anchor = _e.anchor, maxWidth = _e.maxWidth, maxHeight = _e.maxHeight, desc = _e.desc, disableExpand = _e.disableExpand, disableResize = _e.disableResize, title = _e.title;
8976
+ var _f = (_b = (_a = props.viewSettings) === null || _a === void 0 ? void 0 : _a.readDrawer) !== null && _b !== void 0 ? _b : {}, anchor = _f.anchor, maxWidth = _f.maxWidth, maxHeight = _f.maxHeight, desc = _f.desc, disableExpand = _f.disableExpand, disableResize = _f.disableResize, title = _f.title;
8969
8977
  return (react_1.default.createElement(drawer_1.Drawer, { darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg, testId: isForm ? "dt-form-drawer" : "dt-read-drawer", open: isDrawerHost, onClose: handleCloseDrawer, unmountOnClose: true, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl",
8970
8978
  // INFO: a phone keyboard takes half the screen, which leaves a form in a
8971
8979
  // three-quarter sheet almost no room for the field being typed in. It
@@ -8988,7 +8996,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
8988
8996
  // INFO: the panel header already names the record, and a
8989
8997
  // list/detail breadcrumb is meaningless while the list is still on
8990
8998
  // screen behind it
8991
- title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign(__assign({
8999
+ title: "", description: "", organise: __assign(__assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), (((_e = props.organise) === null || _e === void 0 ? void 0 : _e.handleNavigate) && {
9000
+ handleNavigate: handleNavigateFromDrawer,
9001
+ })), bareSettings: __assign(__assign(__assign({
8992
9002
  // INFO: DetailList's stacked rows waste a panel this narrow —
8993
9003
  // compact puts label and value on one row. Overridable.
8994
9004
  bareCompactMode: !isForm }, props.bareSettings), {
@@ -9004,9 +9014,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
9004
9014
  var renderDrawerDiscardModal = function () { return (react_1.default.createElement(modal_1.Modal, { open: drawerDiscardModal, onClose: function () { return setDrawerDiscardModal(false); }, title: "Discard changes?", renderContent: function () { return (react_1.default.createElement("div", { className: "flex flex-row justify-end pt-5 space-x-2" },
9005
9015
  react_1.default.createElement(button_1.Button, { id: "dtw-form-keep", text: "Keep Editing", size: "small", type: "light", onClick: function () { return setDrawerDiscardModal(false); } }),
9006
9016
  react_1.default.createElement(button_1.Button, { id: "dtw-form-discard", text: "Discard", size: "small", type: "danger", onClick: function () {
9007
- var _a, _b;
9008
9017
  setDrawerDiscardModal(false);
9009
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", "");
9018
+ handleNavigateFromDrawer("list", "");
9010
9019
  } }))); } })); };
9011
9020
  var renderContent = function () {
9012
9021
  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;
@@ -12602,14 +12611,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12602
12611
  };
12603
12612
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
12604
12613
  renderNotification("root"),
12605
- ((_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 () {
12614
+ ((_106 = (_105 = props.renderSettings) === null || _105 === void 0 ? void 0 : _105.renderLoadingUI) === null || _106 === void 0 ? void 0 : _106.call(_105)) && loading ? ((_107 = props.renderSettings) === null || _107 === void 0 ? void 0 : _107.renderLoadingUI()) : (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: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
12606
12615
  var _a, _b;
12607
12616
  if (loading)
12608
12617
  return;
12609
12618
  handlePopUpModal(false);
12610
12619
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
12611
12620
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
12612
- 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 () {
12621
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
12613
12622
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
12614
12623
  if (dataId) {
12615
12624
  var currentValue = selectedData[referenceCreationModal.id];
@@ -12625,19 +12634,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12625
12634
  }, onClose: function () {
12626
12635
  setReferenceCreationModal({ id: "", name: "", type: "string" });
12627
12636
  } }),
12628
- 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 () {
12637
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_112 = props.organise) === null || _112 === void 0 ? void 0 : _112.darkMode, darkModeBg: (_113 = props.organise) === null || _113 === void 0 ? void 0 : _113.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
12629
12638
  setReferenceDeleteTableData({});
12630
12639
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12631
- 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 () {
12640
+ 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, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
12632
12641
  setDeletePasscodeInput("");
12633
12642
  setDeleteModal(!deleteModal);
12634
12643
  setDeleteFeedId("");
12635
12644
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12636
- 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 () {
12645
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_116 = props.organise) === null || _116 === void 0 ? void 0 : _116.darkMode, darkModeBg: (_117 = props.organise) === null || _117 === void 0 ? void 0 : _117.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
12637
12646
  setBatchUpdateData({ columnId: "", columnData: {} });
12638
12647
  setBatchUpdateModal(false);
12639
12648
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
12640
- 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 () {
12649
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_118 = props.organise) === null || _118 === void 0 ? void 0 : _118.darkMode, darkModeBg: (_119 = props.organise) === null || _119 === void 0 ? void 0 : _119.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
12641
12650
  var _a, _b;
12642
12651
  if (props.space)
12643
12652
  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 }));
@@ -12653,18 +12662,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12653
12662
  (0, react_dom_1.createPortal)(
12654
12663
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
12655
12664
  react_1.default.createElement("div", { className: "relative z-50" },
12656
- 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,
12665
+ react_1.default.createElement(drawer_1.Drawer, { darkMode: (_120 = props.organise) === null || _120 === void 0 ? void 0 : _120.darkMode, darkModeBg: (_121 = props.organise) === null || _121 === void 0 ? void 0 : _121.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
12657
12666
  // INFO: the record stays set while the drawer slides out — clearing it
12658
12667
  // would remount the hidden panel collection-wide and fetch again. The
12659
12668
  // toolbar's collection-wide button clears it when it opens.
12660
12669
  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"
12661
12670
  ? props.title
12662
- : "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,
12671
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_122 = props.id) !== null && _122 !== void 0 ? _122 : "") : activityId, activityLog: (_123 = props.edit) === null || _123 === void 0 ? void 0 : _123.activityLog,
12663
12672
  // INFO: names the record in the drawer's heading; without it
12664
12673
  // the lookup reads a "title" field most datasheets lack and
12665
12674
  // the heading shows the record's id. A title or name column
12666
12675
  // comes first, then the first text column
12667
- recordTitleColumn: (_123 = ((_122 = (_121 = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _121 !== void 0 ? _121 : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _122 !== void 0 ? _122 : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _123 === void 0 ? void 0 : _123.id, model: structure }) })), document.body),
12676
+ recordTitleColumn: (_126 = ((_125 = (_124 = structure.find(function (eachDS) { return eachDS.id === "title"; })) !== null && _124 !== void 0 ? _124 : structure.find(function (eachDS) { return eachDS.id === "name"; })) !== null && _125 !== void 0 ? _125 : structure.find(function (eachDS) { return eachDS.type === "string"; }))) === null || _126 === void 0 ? void 0 : _126.id, model: structure }) })), document.body),
12668
12677
  renderScrollSentinel()));
12669
12678
  });
12670
12679
  //# sourceMappingURL=index.js.map