blixify-ui-web 1.2.207 → 1.2.209

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.
@@ -240,18 +240,18 @@ var handleCheckEmptyCardValue = function (value) {
240
240
  exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
241
241
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
242
242
  // INFO: props.type is what the caller asked for; resolvedType is what THIS
243
- // instance renders. They differ in exactly one case: readDrawer is on and the
244
- // caller asked for a read, so this instance keeps rendering the LIST while a
245
- // nested instance draws the record in a panel over it. That is what preserves
243
+ // instance renders. They differ when the caller asked for a read with readDrawer
244
+ // on, or a create or edit with bareFormDrawer on: this instance keeps rendering
245
+ // the LIST while a nested instance draws the record in a panel over it. That is what preserves
246
246
  // scroll position, page index and filters across opening a record.
247
247
  //
248
248
  // Every read of the view type below uses resolvedType. The distinction matters
249
249
  // most in effect dependency arrays — following props.type there would leave
250
250
  // the list never refetching while the panel is open, which fails silently.
251
- 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;
251
+ 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;
252
252
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
253
253
  // routed straight back into it — so expand-to-full-page is local state.
254
- var _112 = (0, react_1.useState)(false), drawerPageView = _112[0], setDrawerPageView = _112[1];
254
+ var _114 = (0, react_1.useState)(false), drawerPageView = _114[0], setDrawerPageView = _114[1];
255
255
  // INFO: the panel keeps rendering the record it was opened with rather than
256
256
  // live props. Without this, navigating back to the list would re-render the
257
257
  // still-mounted panel as a second list behind the overlay.
@@ -260,19 +260,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
260
260
  props.type === "read" &&
261
261
  !!props.id &&
262
262
  props.id !== "new";
263
- // INFO: while the escape is active the read takes the page normally and the
263
+ var isDrawerForm = !!((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareFormDrawer) &&
264
+ props.type === "update" &&
265
+ !!props.id;
266
+ var isDrawerRecord = isDrawerRead || isDrawerForm;
267
+ // INFO: while the escape is active the record takes the page normally and the
264
268
  // panel stays closed behind it.
265
- var isDrawerHost = isDrawerRead && !drawerPageView;
269
+ var isDrawerHost = isDrawerRecord && !drawerPageView;
266
270
  var resolvedType = isDrawerHost ? "list" : props.type;
267
- if (isDrawerRead)
271
+ if (isDrawerRecord)
268
272
  drawerReadIdRef.current = props.id;
269
- // INFO: leaving the record or the read view ends the escape, so the next row
270
- // opened from the list peeks in the panel again rather than inheriting a full
271
- // page the user asked for once.
273
+ // INFO: leaving the record ends the escape, so the next row opened from the
274
+ // list peeks in the panel again rather than inheriting a full page the user
275
+ // asked for once. Saving a form on the full page lands on its read view, which
276
+ // stays a page.
272
277
  (0, react_1.useEffect)(function () {
273
- if (drawerPageView && props.type !== "read")
278
+ if (drawerPageView && !isDrawerRecord)
274
279
  setDrawerPageView(false);
275
- }, [props.type, props.id, drawerPageView]);
280
+ }, [props.type, props.id, drawerPageView, isDrawerRecord]);
276
281
  // INFO: the list keeps rendering while the panel is open, so it never refetches
277
282
  // after a record is saved or deleted there. It reloads the current page when
278
283
  // the panel closes — in place, so the page, cursor and filters stay as they were.
@@ -343,14 +348,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
343
348
  initialFilterReferenceDate: initialFilterReferenceDate,
344
349
  };
345
350
  };
346
- var _113 = intialiseDefaultFilterValues(), initialFilterSearch = _113.initialFilterSearch, initialFilterSearchParams = _113.initialFilterSearchParams, initialFilterSelection = _113.initialFilterSelection, initialFilterReference = _113.initialFilterReference, initialFilterReferenceDate = _113.initialFilterReferenceDate;
351
+ var _115 = intialiseDefaultFilterValues(), initialFilterSearch = _115.initialFilterSearch, initialFilterSearchParams = _115.initialFilterSearchParams, initialFilterSelection = _115.initialFilterSelection, initialFilterReference = _115.initialFilterReference, initialFilterReferenceDate = _115.initialFilterReferenceDate;
347
352
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
348
- var _114 = (0, viewStatePersistence_1.usePersistedViewState)({
349
- mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
353
+ var _116 = (0, viewStatePersistence_1.usePersistedViewState)({
354
+ mode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistViewState,
350
355
  collectionId: props.collectionId,
351
- persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
356
+ persistKey: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.persistKey,
352
357
  type: resolvedType,
353
- }), rawPersistedState = _114.persistedState, isPersistEnabled = _114.isEnabled, handleSaveView = _114.handleSaveView, handleRegisterViewSnapshot = _114.handleRegisterViewSnapshot;
358
+ }), rawPersistedState = _116.persistedState, isPersistEnabled = _116.isEnabled, handleSaveView = _116.handleSaveView, handleRegisterViewSnapshot = _116.handleRegisterViewSnapshot;
354
359
  // INFO: drop stored filters/sort on removed columns — they would empty the table
355
360
  var persistedState = (0, react_1.useMemo)(function () {
356
361
  var _a, _b, _c;
@@ -361,11 +366,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
361
366
  }, [
362
367
  rawPersistedState,
363
368
  props.model,
364
- (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilterReferences,
365
- (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterListObjects,
369
+ (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareFlexFilterReferences,
370
+ (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareFlexFilterListObjects,
366
371
  ]);
367
- var _115 = (0, react_1.useState)(false), loading = _115[0], setLoading = _115[1];
368
- var _116 = (0, react_1.useState)(), notification = _116[0], setNotification = _116[1];
372
+ var _117 = (0, react_1.useState)(false), loading = _117[0], setLoading = _117[1];
373
+ var _118 = (0, react_1.useState)(), notification = _118[0], setNotification = _118[1];
369
374
  // INFO: a success toast is confirmation, not a decision — it clears itself so
370
375
  // it never sits on the floating step bar; errors stay until dismissed
371
376
  (0, react_1.useEffect)(function () {
@@ -375,73 +380,80 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
375
380
  return function () { return clearTimeout(timer); };
376
381
  }, [notification]);
377
382
  //INFO : Used by List
378
- var _117 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _f !== void 0 ? _f : initialFilterSearch), filterSearch = _117[0], setFilterSearch = _117[1];
379
- var _118 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearchParams), filterSearchParams = _118[0], setFilterSearchParams = _118[1];
380
- var _119 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _h !== void 0 ? _h : initialFilterSelection), filterSelection = _119[0], setFilterSelection = _119[1];
381
- var _120 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _j !== void 0 ? _j : initialFilterReference), filterReference = _120[0], setFilterReference = _120[1];
382
- var _121 = (0, react_1.useState)({}), filterReferenceSearch = _121[0], setFilterReferenceSearch = _121[1];
383
- var _122 = (0, react_1.useState)({}), filterReferenceList = _122[0], setFilterReferenceList = _122[1];
384
- var _123 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
383
+ var _119 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _g !== void 0 ? _g : initialFilterSearch), filterSearch = _119[0], setFilterSearch = _119[1];
384
+ var _120 = (0, react_1.useState)((_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _h !== void 0 ? _h : initialFilterSearchParams), filterSearchParams = _120[0], setFilterSearchParams = _120[1];
385
+ var _121 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _j !== void 0 ? _j : initialFilterSelection), filterSelection = _121[0], setFilterSelection = _121[1];
386
+ var _122 = (0, react_1.useState)((_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _k !== void 0 ? _k : initialFilterReference), filterReference = _122[0], setFilterReference = _122[1];
387
+ var _123 = (0, react_1.useState)({}), filterReferenceSearch = _123[0], setFilterReferenceSearch = _123[1];
388
+ var _124 = (0, react_1.useState)({}), filterReferenceList = _124[0], setFilterReferenceList = _124[1];
389
+ var _125 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
385
390
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
386
- : initialFilterReferenceDate), filterReferenceDate = _123[0], setFilterReferenceDate = _123[1];
387
- var _124 = (0, react_1.useState)(true), tableLoading = _124[0], setTableLoading = _124[1];
388
- var _125 = (0, react_1.useState)(""), cursor = _125[0], setCursor = _125[1];
389
- var _126 = (0, react_1.useState)(""), lastCursor = _126[0], setLastCursor = _126[1];
390
- var _127 = (0, react_1.useState)([]), tableData = _127[0], setTableData = _127[1];
391
- var _128 = (0, react_1.useState)([]), spaceTableData = _128[0], setSpaceTableData = _128[1];
391
+ : initialFilterReferenceDate), filterReferenceDate = _125[0], setFilterReferenceDate = _125[1];
392
+ var _126 = (0, react_1.useState)(true), tableLoading = _126[0], setTableLoading = _126[1];
393
+ var _127 = (0, react_1.useState)(""), cursor = _127[0], setCursor = _127[1];
394
+ var _128 = (0, react_1.useState)(""), lastCursor = _128[0], setLastCursor = _128[1];
395
+ var _129 = (0, react_1.useState)([]), tableData = _129[0], setTableData = _129[1];
396
+ var _130 = (0, react_1.useState)([]), spaceTableData = _130[0], setSpaceTableData = _130[1];
392
397
  // INFO: a save resolves after later renders, so it reads the table from here —
393
398
  // the state it closed over can predate an earlier save on the same row
394
399
  var tableDataRef = (0, react_1.useRef)([]);
395
400
  var spaceTableDataRef = (0, react_1.useRef)([]);
396
401
  tableDataRef.current = tableData;
397
402
  spaceTableDataRef.current = spaceTableData;
398
- var _129 = (0, react_1.useState)(0), size = _129[0], setSize = _129[1];
399
- var _130 = (0, react_1.useState)((_m = (_k = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _k !== void 0 ? _k : (_l = props.organise) === null || _l === void 0 ? void 0 : _l.pageIndex) !== null && _m !== void 0 ? _m : 0), pageIndex = _130[0], setPageIndex = _130[1];
400
- var _131 = (0, react_1.useState)([]), selectedIds = _131[0], setSelectedIds = _131[1];
401
- var _132 = (0, react_1.useState)(false), selectAll = _132[0], setSelectAll = _132[1];
402
- var _133 = (0, react_1.useState)(""), deletePasscode = _133[0], setDeletePasscode = _133[1];
403
- var _134 = (0, react_1.useState)(""), deletePasscodeInput = _134[0], setDeletePasscodeInput = _134[1];
404
- var _135 = (0, react_1.useState)(""), deleteFeedId = _135[0], setDeleteFeedId = _135[1];
403
+ var _131 = (0, react_1.useState)(0), size = _131[0], setSize = _131[1];
404
+ var _132 = (0, react_1.useState)((_o = (_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _l !== void 0 ? _l : (_m = props.organise) === null || _m === void 0 ? void 0 : _m.pageIndex) !== null && _o !== void 0 ? _o : 0), pageIndex = _132[0], setPageIndex = _132[1];
405
+ // INFO: every change of page, including the return to the first page when a
406
+ // filter or search changes, which onChangePagination does not always report
407
+ (0, react_1.useEffect)(function () {
408
+ var _a, _b;
409
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangePageIndex) === null || _b === void 0 ? void 0 : _b.call(_a, pageIndex);
410
+ }, [pageIndex]);
411
+ var _133 = (0, react_1.useState)([]), selectedIds = _133[0], setSelectedIds = _133[1];
412
+ var _134 = (0, react_1.useState)(false), selectAll = _134[0], setSelectAll = _134[1];
413
+ var _135 = (0, react_1.useState)(""), deletePasscode = _135[0], setDeletePasscode = _135[1];
414
+ var _136 = (0, react_1.useState)(""), deletePasscodeInput = _136[0], setDeletePasscodeInput = _136[1];
415
+ var _137 = (0, react_1.useState)(""), deleteFeedId = _137[0], setDeleteFeedId = _137[1];
405
416
  //INFO : Used by List Organise
406
417
  // INFO: Internal sort state that overrides props.organise?.sort when
407
418
  // persistViewState is enabled and a persisted sort exists
408
- var _136 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _o !== void 0 ? _o : undefined), persistedSort = _136[0], setPersistedSort = _136[1];
409
- var _137 = (0, react_1.useState)(false), filterDraft = _137[0], setFilterDraft = _137[1];
410
- var _138 = (0, react_1.useState)(false), addTabModal = _138[0], setAddTabModal = _138[1];
411
- var _139 = (0, react_1.useState)(-1), editTabIndex = _139[0], setEditTabIndex = _139[1];
419
+ var _138 = (0, react_1.useState)((_p = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _p !== void 0 ? _p : undefined), persistedSort = _138[0], setPersistedSort = _138[1];
420
+ var _139 = (0, react_1.useState)(false), filterDraft = _139[0], setFilterDraft = _139[1];
421
+ var _140 = (0, react_1.useState)(false), addTabModal = _140[0], setAddTabModal = _140[1];
422
+ var _141 = (0, react_1.useState)(-1), editTabIndex = _141[0], setEditTabIndex = _141[1];
412
423
  //INFO : resolve the initial tab synchronously so the mount cond is already
413
424
  // tab-scoped — an empty initial tab caused a second wasted list fetch
414
- var _140 = (0, react_1.useState)(function () {
425
+ var _142 = (0, react_1.useState)(function () {
415
426
  var _a, _b;
416
427
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, resolvedType, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
417
- }), selectedTab = _140[0], setSelectedTab = _140[1];
418
- var _141 = (0, react_1.useState)("dayGridMonth"), calendarView = _141[0], setCalendarView = _141[1];
428
+ }), selectedTab = _142[0], setSelectedTab = _142[1];
429
+ var _143 = (0, react_1.useState)("dayGridMonth"), calendarView = _143[0], setCalendarView = _143[1];
419
430
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
420
431
  // (calendarView above drives the matching range query)
421
- var _142 = (0, react_1.useState)("month"), newCalendarViewMode = _142[0], setNewCalendarViewMode = _142[1];
422
- var _143 = (0, react_1.useState)(new Date()), calendarTabMonth = _143[0], setCalendarTabMonth = _143[1];
432
+ var _144 = (0, react_1.useState)("month"), newCalendarViewMode = _144[0], setNewCalendarViewMode = _144[1];
433
+ var _145 = (0, react_1.useState)(new Date()), calendarTabMonth = _145[0], setCalendarTabMonth = _145[1];
423
434
  // INFO: defaultViewSwitch picks the opening view only — the tab re-inits
424
435
  // whenever its settings change, and that must not undo the user's switch
425
436
  var calendarViewInitRef = (0, react_1.useRef)(false);
426
- var _144 = (0, react_1.useState)(true), kanbanDroppable = _144[0], setKanbanDroppable = _144[1];
427
- var _145 = (0, react_1.useState)([]), kanbanOptions = _145[0], setKanbanOptions = _145[1];
428
- var _146 = (0, react_1.useState)(false), batchUpdateModal = _146[0], setBatchUpdateModal = _146[1];
429
- var _147 = (0, react_1.useState)({
437
+ var _146 = (0, react_1.useState)(true), kanbanDroppable = _146[0], setKanbanDroppable = _146[1];
438
+ var _147 = (0, react_1.useState)([]), kanbanOptions = _147[0], setKanbanOptions = _147[1];
439
+ var _148 = (0, react_1.useState)(false), batchUpdateModal = _148[0], setBatchUpdateModal = _148[1];
440
+ var _149 = (0, react_1.useState)({
430
441
  columnId: "",
431
442
  columnData: {},
432
- }), batchUpdateData = _147[0], setBatchUpdateData = _147[1];
443
+ }), batchUpdateData = _149[0], setBatchUpdateData = _149[1];
433
444
  // INFO: system columns (created / updated at and by, record id, number)
434
445
  // join the structure hidden; the ones a user shows are kept per view
435
- var isSystemColumnsEnabled = !!((_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareSystemColumns);
446
+ var isSystemColumnsEnabled = !!((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareSystemColumns);
447
+ var isSystemColumnsLocked = !!((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareSystemColumnsLocked);
436
448
  var appendedSystemColumnIds = isSystemColumnsEnabled
437
449
  ? 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; }); })
438
450
  : [];
439
- var _148 = (0, react_1.useState)((_q = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _q !== void 0 ? _q : []), shownSystemColumnIds = _148[0], setShownSystemColumnIds = _148[1];
451
+ var _150 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.shownSystemColumnIds) !== null && _s !== void 0 ? _s : []), shownSystemColumnIds = _150[0], setShownSystemColumnIds = _150[1];
440
452
  var handleWithSystemColumns = function (model, shownIds) {
441
453
  if (shownIds === void 0) { shownIds = shownSystemColumnIds; }
442
454
  return isSystemColumnsEnabled ? (0, systemColumns_1.handleAppendSystemColumns)(model, shownIds) : model;
443
455
  };
444
- var _149 = (0, react_1.useState)(function () {
456
+ var _151 = (0, react_1.useState)(function () {
445
457
  var _a;
446
458
  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 : []);
447
459
  if (!persistedState)
@@ -468,8 +480,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
468
480
  });
469
481
  }
470
482
  return model;
471
- }), structure = _149[0], setStructure = _149[1];
472
- var _150 = (0, react_1.useState)(((_r = props === null || props === void 0 ? void 0 : props.organise) === null || _r === void 0 ? void 0 : _r.additionalQuery) || []), additionalQuery = _150[0], setAdditionalQuery = _150[1];
483
+ }), structure = _151[0], setStructure = _151[1];
484
+ var _152 = (0, react_1.useState)(((_t = props === null || props === void 0 ? void 0 : props.organise) === null || _t === void 0 ? void 0 : _t.additionalQuery) || []), additionalQuery = _152[0], setAdditionalQuery = _152[1];
473
485
  // INFO: State for user-configurable flex filters (Monday.com-style)
474
486
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
475
487
  var defaultFlexFilterRow = [
@@ -480,9 +492,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
480
492
  value: undefined,
481
493
  },
482
494
  ];
483
- var _151 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
495
+ var _153 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
484
496
  ? persistedState.flexFilters
485
- : defaultFlexFilterRow), flexFilters = _151[0], setFlexFilters = _151[1];
497
+ : defaultFlexFilterRow), flexFilters = _153[0], setFlexFilters = _153[1];
486
498
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
487
499
  // clear methods so chained calls in one tick aren't stale.
488
500
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -495,81 +507,81 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
495
507
  }, [flexFilters]);
496
508
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
497
509
  // to prevent API calls on every keystroke when typing in value inputs
498
- var _152 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
510
+ var _154 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
499
511
  ? persistedState.flexFilters
500
- : defaultFlexFilterRow), flexFiltersDebounced = _152[0], setFlexFiltersDebounced = _152[1];
512
+ : defaultFlexFilterRow), flexFiltersDebounced = _154[0], setFlexFiltersDebounced = _154[1];
501
513
  // INFO: the filter rows of the export being set up — started from the
502
514
  // list's own when the export opens, so changing them leaves the list as it is
503
- var _153 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _153[0], setExportFlexFilters = _153[1];
504
- var _154 = (0, react_1.useState)({}), flexFilterReferenceOptions = _154[0], setFlexFilterReferenceOptions = _154[1];
505
- var _155 = (0, react_1.useState)({}), flexFilterReferenceSearch = _155[0], setFlexFilterReferenceSearch = _155[1];
506
- var _156 = (0, react_1.useState)(false), flexFilterModalOpen = _156[0], setFlexFilterModalOpen = _156[1];
507
- var _157 = (0, react_1.useState)(false), viewSettingsModalOpen = _157[0], setViewSettingsModalOpen = _157[1];
515
+ var _155 = (0, react_1.useState)(defaultFlexFilterRow), exportFlexFilters = _155[0], setExportFlexFilters = _155[1];
516
+ var _156 = (0, react_1.useState)({}), flexFilterReferenceOptions = _156[0], setFlexFilterReferenceOptions = _156[1];
517
+ var _157 = (0, react_1.useState)({}), flexFilterReferenceSearch = _157[0], setFlexFilterReferenceSearch = _157[1];
518
+ var _158 = (0, react_1.useState)(false), flexFilterModalOpen = _158[0], setFlexFilterModalOpen = _158[1];
519
+ var _159 = (0, react_1.useState)(false), viewSettingsModalOpen = _159[0], setViewSettingsModalOpen = _159[1];
508
520
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
509
521
  // Deliberately kept out of `structure`: the props-sync effect below resets
510
522
  // structure to props.model whenever props change, which would wipe the
511
523
  // choice, and the persist effect derives schema-level hiddenColumnIds from
512
524
  // structure — writing user hides there would blur the two concepts.
513
- var _158 = (0, react_1.useState)((_s = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _s !== void 0 ? _s : []), userHiddenColumnIds = _158[0], setUserHiddenColumnIds = _158[1];
514
- var _159 = (0, react_1.useState)(""), columnSearch = _159[0], setColumnSearch = _159[1];
515
- var _160 = (0, react_1.useState)([]), savedViews = _160[0], setSavedViews = _160[1];
516
- var _161 = (0, react_1.useState)(null), activeSavedViewId = _161[0], setActiveSavedViewId = _161[1];
525
+ var _160 = (0, react_1.useState)((_u = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _u !== void 0 ? _u : []), userHiddenColumnIds = _160[0], setUserHiddenColumnIds = _160[1];
526
+ var _161 = (0, react_1.useState)(""), columnSearch = _161[0], setColumnSearch = _161[1];
527
+ var _162 = (0, react_1.useState)([]), savedViews = _162[0], setSavedViews = _162[1];
528
+ var _163 = (0, react_1.useState)(null), activeSavedViewId = _163[0], setActiveSavedViewId = _163[1];
517
529
  // INFO: the widths of the view on screen, by column id ("180px")
518
- var _162 = (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 = _162[0], setColumnWidths = _162[1];
530
+ var _164 = (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 = _164[0], setColumnWidths = _164[1];
519
531
  // INFO: unsaved changes are kept only once the opening view is on screen,
520
532
  // so the defaults drawn before it never overwrite a person's own
521
- var _163 = (0, react_1.useState)(false), isViewDraftReady = _163[0], setIsViewDraftReady = _163[1];
533
+ var _165 = (0, react_1.useState)(false), isViewDraftReady = _165[0], setIsViewDraftReady = _165[1];
522
534
  // INFO: null while the name box is closed
523
- var _164 = (0, react_1.useState)(null), savedViewName = _164[0], setSavedViewName = _164[1];
524
- var _165 = (0, react_1.useState)(null), deletingSavedViewId = _165[0], setDeletingSavedViewId = _165[1];
525
- var _166 = (0, react_1.useState)(null), draggingColumnId = _166[0], setDraggingColumnId = _166[1];
535
+ var _166 = (0, react_1.useState)(null), savedViewName = _166[0], setSavedViewName = _166[1];
536
+ var _167 = (0, react_1.useState)(null), deletingSavedViewId = _167[0], setDeletingSavedViewId = _167[1];
537
+ var _168 = (0, react_1.useState)(null), draggingColumnId = _168[0], setDraggingColumnId = _168[1];
526
538
  var columnRowRefs = (0, react_1.useRef)({});
527
539
  //INFO : Used by Auth
528
- var _167 = (0, react_1.useState)({
540
+ var _169 = (0, react_1.useState)({
529
541
  email: "",
530
542
  google: "",
531
543
  phone: "",
532
544
  disabled: false,
533
545
  create: false,
534
- }), authMethods = _167[0], setAuthMethods = _167[1];
535
- var _168 = (0, react_1.useState)(""), selectedAuthMethod = _168[0], setSelectedAuthMethod = _168[1];
546
+ }), authMethods = _169[0], setAuthMethods = _169[1];
547
+ var _170 = (0, react_1.useState)(""), selectedAuthMethod = _170[0], setSelectedAuthMethod = _170[1];
536
548
  // INFO: the sign-in check of a users datasheet's record is running; the
537
549
  // panel shows a spinner rather than nothing, which read as "no login"
538
- var _169 = (0, react_1.useState)(false), authLoading = _169[0], setAuthLoading = _169[1];
550
+ var _171 = (0, react_1.useState)(false), authLoading = _171[0], setAuthLoading = _171[1];
539
551
  // INFO: a delete is running — the ref answers a second tap at once, before
540
552
  // the state has rendered, and the state disables the confirm button
541
553
  var deletingRef = (0, react_1.useRef)(false);
542
- var _170 = (0, react_1.useState)(false), deleting = _170[0], setDeleting = _170[1];
554
+ var _172 = (0, react_1.useState)(false), deleting = _172[0], setDeleting = _172[1];
543
555
  // INFO: Used by Activity Log
544
- var _171 = (0, react_1.useState)(false), activityModal = _171[0], setActivityModal = _171[1];
545
- var _172 = (0, react_1.useState)(""), activityId = _172[0], setActivityId = _172[1];
556
+ var _173 = (0, react_1.useState)(false), activityModal = _173[0], setActivityModal = _173[1];
557
+ var _174 = (0, react_1.useState)(""), activityId = _174[0], setActivityId = _174[1];
546
558
  //INFO : Used by Export
547
- var _173 = (0, react_1.useState)(null), csvFile = _173[0], setCSVFile = _173[1];
548
- var _174 = (0, react_1.useState)([]), csvFileData = _174[0], setCSVFileData = _174[1];
549
- var _175 = (0, react_1.useState)(0), stepCSVIndex = _175[0], setStepCSVIndex = _175[1];
550
- var _176 = (0, react_1.useState)({}), listCSVMapAttribute = _176[0], setListCSVMapAttribute = _176[1];
551
- var _177 = (0, react_1.useState)({}), listCSVObjAttribute = _177[0], setListCSVObjAttribute = _177[1];
552
- var _178 = (0, react_1.useState)([]), csvAPIAttribute = _178[0], setCSVAPIAttribute = _178[1];
553
- var _179 = (0, react_1.useState)(((_t = props.devSettings.currentUser) === null || _t === void 0 ? void 0 : _t.userEmail) || ""), exportCSVEmail = _179[0], setExportCSVEmail = _179[1];
554
- var _180 = (0, react_1.useState)(((_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.exportSettings) === null || _v === void 0 ? void 0 : _v.defaultExportPDFName) || ""), exportPDFTitle = _180[0], setExportPDFTitle = _180[1];
555
- var _181 = (0, react_1.useState)(false), exportPDFLoading = _181[0], setExportPDFLoading = _181[1];
556
- var _182 = (0, react_1.useState)(false), exportReadPDFLoading = _182[0], setExportReadPDFLoading = _182[1];
557
- var _183 = (0, react_1.useState)((_y = (_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.exportSettings) === null || _x === void 0 ? void 0 : _x.sumColumnId) !== null && _y !== void 0 ? _y : []), exportSumAttributeIds = _183[0], setExportSumAttributeIds = _183[1];
558
- var _184 = (0, react_1.useState)((_1 = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.exportSettings) === null || _0 === void 0 ? void 0 : _0.hideSubItems) !== null && _1 !== void 0 ? _1 : false), hideSubItems = _184[0], setHideSubItems = _184[1];
559
- var _185 = (0, react_1.useState)([]), importTableData = _185[0], setImportTableData = _185[1];
560
- var _186 = (0, react_1.useState)([]), queryList = _186[0], setQueryList = _186[1];
561
- var _187 = (0, react_1.useState)(undefined), allQueryList = _187[0], setAllQueryList = _187[1];
559
+ var _175 = (0, react_1.useState)(null), csvFile = _175[0], setCSVFile = _175[1];
560
+ var _176 = (0, react_1.useState)([]), csvFileData = _176[0], setCSVFileData = _176[1];
561
+ var _177 = (0, react_1.useState)(0), stepCSVIndex = _177[0], setStepCSVIndex = _177[1];
562
+ var _178 = (0, react_1.useState)({}), listCSVMapAttribute = _178[0], setListCSVMapAttribute = _178[1];
563
+ var _179 = (0, react_1.useState)({}), listCSVObjAttribute = _179[0], setListCSVObjAttribute = _179[1];
564
+ var _180 = (0, react_1.useState)([]), csvAPIAttribute = _180[0], setCSVAPIAttribute = _180[1];
565
+ var _181 = (0, react_1.useState)(((_v = props.devSettings.currentUser) === null || _v === void 0 ? void 0 : _v.userEmail) || ""), exportCSVEmail = _181[0], setExportCSVEmail = _181[1];
566
+ var _182 = (0, react_1.useState)(((_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.exportSettings) === null || _x === void 0 ? void 0 : _x.defaultExportPDFName) || ""), exportPDFTitle = _182[0], setExportPDFTitle = _182[1];
567
+ var _183 = (0, react_1.useState)(false), exportPDFLoading = _183[0], setExportPDFLoading = _183[1];
568
+ var _184 = (0, react_1.useState)(false), exportReadPDFLoading = _184[0], setExportReadPDFLoading = _184[1];
569
+ var _185 = (0, react_1.useState)((_0 = (_z = (_y = props.organise) === null || _y === void 0 ? void 0 : _y.exportSettings) === null || _z === void 0 ? void 0 : _z.sumColumnId) !== null && _0 !== void 0 ? _0 : []), exportSumAttributeIds = _185[0], setExportSumAttributeIds = _185[1];
570
+ var _186 = (0, react_1.useState)((_3 = (_2 = (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.exportSettings) === null || _2 === void 0 ? void 0 : _2.hideSubItems) !== null && _3 !== void 0 ? _3 : false), hideSubItems = _186[0], setHideSubItems = _186[1];
571
+ var _187 = (0, react_1.useState)([]), importTableData = _187[0], setImportTableData = _187[1];
572
+ var _188 = (0, react_1.useState)([]), queryList = _188[0], setQueryList = _188[1];
573
+ var _189 = (0, react_1.useState)(undefined), allQueryList = _189[0], setAllQueryList = _189[1];
562
574
  // INFO: a restored state wins over the prop; its "" is a list the user
563
575
  // ungrouped, so it opens ungrouped
564
- var _188 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
576
+ var _190 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.groupBy) !== undefined
565
577
  ? persistedState.groupBy || undefined
566
- : (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.groupBy), groupId = _188[0], setGroupId = _188[1];
578
+ : (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.groupBy), groupId = _190[0], setGroupId = _190[1];
567
579
  // INFO: Monday-board per-group paging. Keyed by the group key that
568
580
  // handleBuildNewTableGroups() produces (an option, Unknown or No Value).
569
581
  // Each group tracks its own loaded cursor + total so it can lazily load its
570
582
  // next page as the user scrolls inside that band, independent of every other
571
583
  // group. Only used when renderCheckGroupPaging() is true.
572
- var _189 = (0, react_1.useState)({}), groupPageState = _189[0], setGroupPageState = _189[1];
584
+ var _191 = (0, react_1.useState)({}), groupPageState = _191[0], setGroupPageState = _191[1];
573
585
  // INFO: read fresh inside the async per-group fetch so chained scroll fires
574
586
  // in one tick do not re-fetch an already in-flight page.
575
587
  var groupPageStateRef = (0, react_1.useRef)({});
@@ -578,59 +590,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
578
590
  // list was re-read (new search, filter, sort or grouping) is dropped on
579
591
  // arrival instead of appending rows that belong to the old list
580
592
  var groupPagingGenRef = (0, react_1.useRef)(0);
581
- var _190 = (0, react_1.useState)(""), readTabSection = _190[0], setReadTabSection = _190[1];
582
- var _191 = (0, react_1.useState)(false), readFloatingNav = _191[0], setReadFloatingNav = _191[1];
593
+ var _192 = (0, react_1.useState)(""), readTabSection = _192[0], setReadTabSection = _192[1];
594
+ var _193 = (0, react_1.useState)(false), readFloatingNav = _193[0], setReadFloatingNav = _193[1];
583
595
  var readTabSectionRefs = (0, react_1.useRef)({});
584
596
  //INFO : Used by Read
585
597
  //INFO : Used by Update
586
- var _192 = (0, react_1.useState)(false), modalVisible = _192[0], setModalVisible = _192[1];
587
- var _193 = (0, react_1.useState)(false), deleteModal = _193[0], setDeleteModal = _193[1];
588
- var _194 = (0, react_1.useState)(false), excelModal = _194[0], setExcelModal = _194[1];
589
- var _195 = (0, react_1.useState)(false), exportExcel = _195[0], setExportExcel = _195[1];
590
- var _196 = (0, react_1.useState)(""), exportType = _196[0], setExportType = _196[1];
591
- var _197 = (0, react_1.useState)(false), exportQR = _197[0], setExportQR = _197[1];
592
- var _198 = (0, react_1.useState)(function () {
598
+ var _194 = (0, react_1.useState)(false), modalVisible = _194[0], setModalVisible = _194[1];
599
+ var _195 = (0, react_1.useState)(false), deleteModal = _195[0], setDeleteModal = _195[1];
600
+ var _196 = (0, react_1.useState)(false), excelModal = _196[0], setExcelModal = _196[1];
601
+ var _197 = (0, react_1.useState)(false), exportExcel = _197[0], setExportExcel = _197[1];
602
+ var _198 = (0, react_1.useState)(""), exportType = _198[0], setExportType = _198[1];
603
+ var _199 = (0, react_1.useState)(false), exportQR = _199[0], setExportQR = _199[1];
604
+ var _200 = (0, react_1.useState)(function () {
593
605
  var _a, _b;
594
606
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
595
607
  return firstTabId;
596
- }), activeTab = _198[0], setActiveTab = _198[1];
597
- var _199 = (0, react_1.useState)(false), signatureSigning = _199[0], setSignatureSigning = _199[1];
598
- var _200 = (0, react_1.useState)({}), selectedData = _200[0], setSelectedData = _200[1];
599
- var _201 = (0, react_1.useState)(""), selectedObjectStructureId = _201[0], setSelectedObjectStructureId = _201[1];
600
- var _202 = (0, react_1.useState)(""), selectedObjectId = _202[0], setSelectedObjectId = _202[1];
601
- var _203 = (0, react_1.useState)(""), selectedListAddressId = _203[0], setSelectedListAddressId = _203[1];
602
- var _204 = (0, react_1.useState)(-1), selectedListAddressIndex = _204[0], setSelectedListAddressIndex = _204[1];
603
- var _205 = (0, react_1.useState)({
608
+ }), activeTab = _200[0], setActiveTab = _200[1];
609
+ var _201 = (0, react_1.useState)(false), signatureSigning = _201[0], setSignatureSigning = _201[1];
610
+ var _202 = (0, react_1.useState)({}), selectedData = _202[0], setSelectedData = _202[1];
611
+ var _203 = (0, react_1.useState)(""), selectedObjectStructureId = _203[0], setSelectedObjectStructureId = _203[1];
612
+ var _204 = (0, react_1.useState)(""), selectedObjectId = _204[0], setSelectedObjectId = _204[1];
613
+ var _205 = (0, react_1.useState)(""), selectedListAddressId = _205[0], setSelectedListAddressId = _205[1];
614
+ var _206 = (0, react_1.useState)(-1), selectedListAddressIndex = _206[0], setSelectedListAddressIndex = _206[1];
615
+ var _207 = (0, react_1.useState)({
604
616
  lat: 0,
605
617
  lng: 0,
606
618
  name: "",
607
- }), selectedListAddress = _205[0], setSelectedListAddress = _205[1];
608
- var _206 = (0, react_1.useState)({}), selectedObjectData = _206[0], setSelectedObjectData = _206[1];
609
- var _207 = (0, react_1.useState)(null), objectCellEdit = _207[0], setObjectCellEdit = _207[1];
610
- var _208 = (0, react_1.useState)(false), referenceLoading = _208[0], setReferenceLoading = _208[1];
611
- var _209 = (0, react_1.useState)({}), referencesOptions = _209[0], setReferencesOptions = _209[1];
612
- var _210 = (0, react_1.useState)({}), referencesDetails = _210[0], setReferencesDetails = _210[1];
613
- var _211 = (0, react_1.useState)({}), listReferencesOptions = _211[0], setListReferencesOptions = _211[1];
614
- var _212 = (0, react_1.useState)({}), referenceDeleteTableData = _212[0], setReferenceDeleteTableData = _212[1];
615
- var _213 = (0, react_1.useState)([]), relatedSections = _213[0], setRelatedSections = _213[1];
616
- var _214 = (0, react_1.useState)(0), referenceDeleteIndex = _214[0], setReferenceDeleteIndex = _214[1];
617
- var _215 = (0, react_1.useState)({
619
+ }), selectedListAddress = _207[0], setSelectedListAddress = _207[1];
620
+ var _208 = (0, react_1.useState)({}), selectedObjectData = _208[0], setSelectedObjectData = _208[1];
621
+ var _209 = (0, react_1.useState)(null), objectCellEdit = _209[0], setObjectCellEdit = _209[1];
622
+ var _210 = (0, react_1.useState)(false), referenceLoading = _210[0], setReferenceLoading = _210[1];
623
+ var _211 = (0, react_1.useState)({}), referencesOptions = _211[0], setReferencesOptions = _211[1];
624
+ var _212 = (0, react_1.useState)({}), referencesDetails = _212[0], setReferencesDetails = _212[1];
625
+ var _213 = (0, react_1.useState)({}), listReferencesOptions = _213[0], setListReferencesOptions = _213[1];
626
+ var _214 = (0, react_1.useState)({}), referenceDeleteTableData = _214[0], setReferenceDeleteTableData = _214[1];
627
+ var _215 = (0, react_1.useState)([]), relatedSections = _215[0], setRelatedSections = _215[1];
628
+ var _216 = (0, react_1.useState)(0), referenceDeleteIndex = _216[0], setReferenceDeleteIndex = _216[1];
629
+ var _217 = (0, react_1.useState)({
618
630
  id: "",
619
631
  name: "",
620
632
  type: "string",
621
- }), referenceCreationModal = _215[0], setReferenceCreationModal = _215[1];
622
- var _216 = (0, react_1.useState)({}), referenceModelSchema = _216[0], setReferenceSchema = _216[1];
623
- var _217 = (0, react_1.useState)([]), kanbanChecked = _217[0], setKanbanChecked = _217[1];
633
+ }), referenceCreationModal = _217[0], setReferenceCreationModal = _217[1];
634
+ var _218 = (0, react_1.useState)({}), referenceModelSchema = _218[0], setReferenceSchema = _218[1];
635
+ var _219 = (0, react_1.useState)([]), kanbanChecked = _219[0], setKanbanChecked = _219[1];
624
636
  //INFO : Offline
625
- var _218 = (0, react_1.useState)(0), offlineDataLength = _218[0], setOfflineDataLength = _218[1];
626
- var _219 = (0, react_1.useState)(false), offlineModal = _219[0], setOfflineModal = _219[1];
637
+ var _220 = (0, react_1.useState)(0), offlineDataLength = _220[0], setOfflineDataLength = _220[1];
638
+ var _221 = (0, react_1.useState)(false), offlineModal = _221[0], setOfflineModal = _221[1];
627
639
  // INFO: live-stream state — driven by socket connection and navigator.onLine
628
- var _220 = (0, react_1.useState)(false), isLive = _220[0], setIsLive = _220[1];
629
- var _221 = (0, react_1.useState)(false), isLiveOffline = _221[0], setIsLiveOffline = _221[1];
640
+ var _222 = (0, react_1.useState)(false), isLive = _222[0], setIsLive = _222[1];
641
+ var _223 = (0, react_1.useState)(false), isLiveOffline = _223[0], setIsLiveOffline = _223[1];
630
642
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
631
643
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
632
644
  // Independent of SSE status so it works even when bareSocketName is not set.
633
- var _222 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _222[0], setIsNetworkOffline = _222[1];
645
+ var _224 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _224[0], setIsNetworkOffline = _224[1];
634
646
  var previousType = (0, react_1.useRef)(null);
635
647
  var previousSelectedData = (0, react_1.useRef)(null);
636
648
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -747,16 +759,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
747
759
  * viewId still wins when present: it is a deliberate destination, from a
748
760
  * shared link or a back button.
749
761
  */
750
- var defaultTabName = (_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.extendedTabs) === null || _4 === void 0 ? void 0 : _4.find(function (eachTab) { return eachTab.defaultTab; })) === null || _5 === void 0 ? void 0 : _5.name;
762
+ var defaultTabName = (_7 = (_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.extendedTabs) === null || _6 === void 0 ? void 0 : _6.find(function (eachTab) { return eachTab.defaultTab; })) === null || _7 === void 0 ? void 0 : _7.name;
751
763
  // INFO: the pinned tab is a LIST destination. Falling back to it while a
752
764
  // record is open resolved the read view to a list tab, which renderTabContent
753
765
  // refuses — so General Details rendered nothing. Only a list falls back.
754
- var viewType = (_7 = (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.viewId) !== null && _7 !== void 0 ? _7 : (resolvedType === "list" && defaultTabName
766
+ var viewType = (_9 = (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.viewId) !== null && _9 !== void 0 ? _9 : (resolvedType === "list" && defaultTabName
755
767
  ? (0, utils_1.lowercaseTextToId)(defaultTabName)
756
768
  : "general");
757
769
  var isFirebaseClient = devSettings.server === "firebase";
758
770
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
759
- var dbModule = isFirebaseClient ? (_8 = props.lib) === null || _8 === void 0 ? void 0 : _8.firebase : (_9 = props.lib) === null || _9 === void 0 ? void 0 : _9.axios;
771
+ var dbModule = isFirebaseClient ? (_10 = props.lib) === null || _10 === void 0 ? void 0 : _10.firebase : (_11 = props.lib) === null || _11 === void 0 ? void 0 : _11.axios;
760
772
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
761
773
  var selectedRelated = resolvedType === "read"
762
774
  ? relatedSections.find(function (eachSection) { return eachSection.id === viewType; })
@@ -838,32 +850,32 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
838
850
  }, [
839
851
  resolvedType,
840
852
  props.id,
841
- (_10 = props.space) === null || _10 === void 0 ? void 0 : _10._id,
853
+ (_12 = props.space) === null || _12 === void 0 ? void 0 : _12._id,
842
854
  props.devSettings.schemaEndpoint,
843
- (_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.showRelatedTab,
855
+ (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.showRelatedTab,
844
856
  ]);
845
857
  /* eslint-enable */
846
858
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
847
859
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
848
- var isViewSettingsEnabled = ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareViewSettings) || ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareNewDTW)
860
+ var isViewSettingsEnabled = ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareViewSettings) || ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareNewDTW)
849
861
  ? true
850
862
  : false;
851
863
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
852
864
  // (shared by every user) — toggling writes to the model and calls back. Without it
853
865
  // the hide is this user's own and lives in userHiddenColumnIds.
854
- var isSchemaHideMode = ((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.onChangeHide) ? true : false;
866
+ var isSchemaHideMode = ((_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.onChangeHide) ? true : false;
855
867
  // INFO: rows per page is a view setting the user can change, so it starts from
856
868
  // the persisted value and falls back to the consumer's limit
857
- var _223 = (0, react_1.useState)((_16 = (_15 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _15 !== void 0 ? _15 : props.limit) !== null && _16 !== void 0 ? _16 : 10), pageLimit = _223[0], setPageLimit = _223[1];
869
+ var _225 = (0, react_1.useState)((_18 = (_17 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _17 !== void 0 ? _17 : props.limit) !== null && _18 !== void 0 ? _18 : 10), pageLimit = _225[0], setPageLimit = _225[1];
858
870
  var limit = pageLimit;
859
- var isSavedViewsEnabled = !!((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.savedViews) && resolvedType === "list";
871
+ var isSavedViewsEnabled = !!((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.savedViews) && resolvedType === "list";
860
872
  // INFO: an app that stores views takes over from this browser's storage, so
861
873
  // every view is the team's and nothing is kept locally
862
- var isAppViews = ((_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.sharedViews) !== undefined ||
863
- !!((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.onChangeSharedViews);
874
+ var isAppViews = ((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.sharedViews) !== undefined ||
875
+ !!((_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.onChangeSharedViews);
864
876
  // INFO: a saved view carries its sort, so the sort is held here as with persistViewState
865
877
  var isInternalSort = isPersistEnabled || isSavedViewsEnabled;
866
- var activeSortId = (isInternalSort && persistedSort) || ((_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.sort);
878
+ var activeSortId = (isInternalSort && persistedSort) || ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.sort);
867
879
  var handleSortColumn = function (value) {
868
880
  var _a, _b, _c, _d;
869
881
  if (isInternalSort)
@@ -893,7 +905,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
893
905
  // INFO: Firebase pages by document cursor and a union by skip, so neither
894
906
  // can hand over the whole set — there formula columns are not offered for
895
907
  // sorting or filtering, rather than ordering one page
896
- var isFormulaViewSupported = !isFirebase && !((_22 = (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.unionCollections) === null || _22 === void 0 ? void 0 : _22.length);
908
+ var isFormulaViewSupported = !isFirebase && !((_24 = (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.unionCollections) === null || _24 === void 0 ? void 0 : _24.length);
897
909
  var formulaSort = isFormulaViewSupported &&
898
910
  (activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) &&
899
911
  formulaColumnIds.includes(activeSortId.sortId)
@@ -902,10 +914,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
902
914
  // INFO: a referenced record is joined by MongoWrapper's lookup and a list
903
915
  // row is matched by its Mongo path — neither Firebase nor a union read runs
904
916
  // them
905
- var flexFilterExtras = !isFirebase && !((_24 = (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.unionCollections) === null || _24 === void 0 ? void 0 : _24.length)
917
+ var flexFilterExtras = !isFirebase && !((_26 = (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.unionCollections) === null || _26 === void 0 ? void 0 : _26.length)
906
918
  ? {
907
- references: (_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareFlexFilterReferences,
908
- listObjects: (_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareFlexFilterListObjects,
919
+ references: (_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilterReferences,
920
+ listObjects: (_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareFlexFilterListObjects,
909
921
  }
910
922
  : undefined;
911
923
  var formulaFlexQueries = isFormulaViewSupported && formulaColumnIds.length > 0
@@ -917,6 +929,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
917
929
  var flexFilterStructure = (0, flexFilter_1.handleBuildFlexFilterStructure)(isFormulaViewSupported
918
930
  ? structure
919
931
  : structure.filter(function (eachModel) { return eachModel.type !== "formula"; }), flexFilterExtras);
932
+ // INFO: what the filter panel offers. A condition already set, as in a saved
933
+ // view, keeps its column so it still reads and can be removed.
934
+ var flexFilterPanelStructure = isSystemColumnsLocked
935
+ ? flexFilterStructure.filter(function (eachColumn) {
936
+ return !appendedSystemColumnIds.includes(eachColumn.id) ||
937
+ flexFilters.some(function (eachFilter) { return eachFilter.columnId === eachColumn.id; });
938
+ })
939
+ : flexFilterStructure;
920
940
  // INFO: an export's filters run on the export server, which cannot work out
921
941
  // a formula, so its rows leave formula columns out — a formula filter on
922
942
  // the list still narrows the export, by the ids of the rows it kept
@@ -958,18 +978,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
958
978
  displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
959
979
  };
960
980
  };
961
- var _224 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _224.canUpdateRecord, canInlineUpdate = _224.canInlineUpdate, canBatchUpdate = _224.canBatchUpdate, canDeleteRecord = _224.canDeleteRecord;
962
- var isEditor = ((_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.allEditable) ? true : false;
963
- var isOffline = (_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareOffline;
981
+ var _226 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _226.canUpdateRecord, canInlineUpdate = _226.canInlineUpdate, canBatchUpdate = _226.canBatchUpdate, canDeleteRecord = _226.canDeleteRecord;
982
+ var isEditor = ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.allEditable) ? true : false;
983
+ var isOffline = (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareOffline;
964
984
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
965
985
  // the live network state — online saves go to the server even if bareOffline
966
986
  // is true, offline saves go to IDB as normal.
967
- var isOfflineNetworkListener = isOffline && ((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareOfflineNetworkListener);
968
- var showId = (_30 = props.space) === null || _30 === void 0 ? void 0 : _30.showId;
987
+ var isOfflineNetworkListener = isOffline && ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareOfflineNetworkListener);
988
+ var showId = (_32 = props.space) === null || _32 === void 0 ? void 0 : _32.showId;
969
989
  var remainId = showId || selectedObjectStructureId ? true : false;
970
- var idField = ((_31 = props.space) === null || _31 === void 0 ? void 0 : _31.idField) || ((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.idField);
971
- var pipeline = (_33 = props === null || props === void 0 ? void 0 : props.space) === null || _33 === void 0 ? void 0 : _33.pipeline;
972
- if ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareListPipeline) {
990
+ var idField = ((_33 = props.space) === null || _33 === void 0 ? void 0 : _33.idField) || ((_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.idField);
991
+ var pipeline = (_35 = props === null || props === void 0 ? void 0 : props.space) === null || _35 === void 0 ? void 0 : _35.pipeline;
992
+ if ((_36 = props.bareSettings) === null || _36 === void 0 ? void 0 : _36.bareListPipeline) {
973
993
  pipeline = pipeline
974
994
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
975
995
  }
@@ -982,24 +1002,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
982
1002
  * three records came back instead of five files, and each tile received the
983
1003
  * whole array rather than one file, so every one of them read "Attachment".
984
1004
  */
985
- var fileViewColumnId = (_38 = (_37 = ((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.extendedTabs) !== null && _36 !== void 0 ? _36 : []).find(function (eachTab) {
1005
+ var fileViewColumnId = (_40 = (_39 = ((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.extendedTabs) !== null && _38 !== void 0 ? _38 : []).find(function (eachTab) {
986
1006
  return eachTab.viewType === "file" &&
987
1007
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
988
- })) === null || _37 === void 0 ? void 0 : _37.fileSettings) === null || _38 === void 0 ? void 0 : _38.columnId;
989
- var hasNavigation = ((_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.handleNavigate) ? true : false;
1008
+ })) === null || _39 === void 0 ? void 0 : _39.fileSettings) === null || _40 === void 0 ? void 0 : _40.columnId;
1009
+ var hasNavigation = ((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.handleNavigate) ? true : false;
990
1010
  var formColumn = "grid-cols-12";
991
- var useMobileView = (_41 = (_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareUpdateMobileView) !== null && _41 !== void 0 ? _41 : false;
1011
+ var useMobileView = (_43 = (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareUpdateMobileView) !== null && _43 !== void 0 ? _43 : false;
992
1012
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
993
- var isActivityLog = (((_43 = (_42 = props.edit) === null || _42 === void 0 ? void 0 : _42.activityLog) === null || _43 === void 0 ? void 0 : _43.enableComments) &&
994
- ((_44 = props.edit) === null || _44 === void 0 ? void 0 : _44.activityLog.commentCollectionId)) ||
995
- (((_46 = (_45 = props.edit) === null || _45 === void 0 ? void 0 : _45.activityLog) === null || _46 === void 0 ? void 0 : _46.enableLogs) &&
996
- ((_47 = props.edit) === null || _47 === void 0 ? void 0 : _47.activityLog.logsCollectionId));
997
- var customPaginationSize = ((_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.customPaginationCount)
1013
+ var isActivityLog = (((_45 = (_44 = props.edit) === null || _44 === void 0 ? void 0 : _44.activityLog) === null || _45 === void 0 ? void 0 : _45.enableComments) &&
1014
+ ((_46 = props.edit) === null || _46 === void 0 ? void 0 : _46.activityLog.commentCollectionId)) ||
1015
+ (((_48 = (_47 = props.edit) === null || _47 === void 0 ? void 0 : _47.activityLog) === null || _48 === void 0 ? void 0 : _48.enableLogs) &&
1016
+ ((_49 = props.edit) === null || _49 === void 0 ? void 0 : _49.activityLog.logsCollectionId));
1017
+ var customPaginationSize = ((_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.customPaginationCount)
998
1018
  ? props.organise.customPaginationCount(size)
999
1019
  : undefined;
1000
1020
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
1001
1021
  var writeServerQuery = new writeQuery_1.WriteQuery({
1002
- dbModule: (_49 = props.lib) === null || _49 === void 0 ? void 0 : _49.axios,
1022
+ dbModule: (_51 = props.lib) === null || _51 === void 0 ? void 0 : _51.axios,
1003
1023
  dbType: devSettings.server,
1004
1024
  dbCollection: props.collectionId,
1005
1025
  dbEndpoint: devSettings.dbEndpoint,
@@ -1007,7 +1027,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1007
1027
  dbUserToken: devSettings.dbUserToken,
1008
1028
  });
1009
1029
  var readServerQuery = new readQuery_1.ReadQuery({
1010
- dbModule: (_50 = props.lib) === null || _50 === void 0 ? void 0 : _50.axios,
1030
+ dbModule: (_52 = props.lib) === null || _52 === void 0 ? void 0 : _52.axios,
1011
1031
  dbType: devSettings.server,
1012
1032
  dbCollection: props.collectionId,
1013
1033
  dbEndpoint: devSettings.dbEndpoint,
@@ -1015,12 +1035,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1015
1035
  dbUserToken: devSettings.dbUserToken,
1016
1036
  });
1017
1037
  var moreButtonPopUp = [
1018
- ((_51 = props.edit) === null || _51 === void 0 ? void 0 : _51.allEditable) &&
1038
+ ((_53 = props.edit) === null || _53 === void 0 ? void 0 : _53.allEditable) &&
1019
1039
  // INFO: the import runs on the server (importEndpoint), so a Firestore
1020
1040
  // datasheet served through one can import; only the browser-direct
1021
1041
  // Firebase client has no server to import through
1022
1042
  !isFirebaseClient &&
1023
- !((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.exportSettings) === null || _53 === void 0 ? void 0 : _53.hideImportCSV)
1043
+ !((_55 = (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.exportSettings) === null || _55 === void 0 ? void 0 : _55.hideImportCSV)
1024
1044
  ? {
1025
1045
  text: "Import Excel",
1026
1046
  onClick: function () {
@@ -1029,7 +1049,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1029
1049
  },
1030
1050
  }
1031
1051
  : null,
1032
- !((_55 = (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.exportSettings) === null || _55 === void 0 ? void 0 : _55.hideExportCSV)
1052
+ !((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideExportCSV)
1033
1053
  ? {
1034
1054
  text: "Export CSV",
1035
1055
  onClick: function () {
@@ -1039,7 +1059,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1039
1059
  },
1040
1060
  }
1041
1061
  : null,
1042
- !((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideExportExcel)
1062
+ !((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideExportExcel)
1043
1063
  ? {
1044
1064
  text: "Export Excel",
1045
1065
  onClick: function () {
@@ -1049,7 +1069,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1049
1069
  },
1050
1070
  }
1051
1071
  : null,
1052
- !((_59 = (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.exportSettings) === null || _59 === void 0 ? void 0 : _59.hideExportPDF)
1072
+ !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportPDF)
1053
1073
  ? {
1054
1074
  text: "Export PDF",
1055
1075
  onClick: function () {
@@ -1059,7 +1079,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1059
1079
  },
1060
1080
  }
1061
1081
  : null,
1062
- !((_61 = (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.exportSettings) === null || _61 === void 0 ? void 0 : _61.hideExportQR)
1082
+ !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportQR)
1063
1083
  ? {
1064
1084
  text: "Export QR",
1065
1085
  onClick: function () {
@@ -1069,7 +1089,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1069
1089
  },
1070
1090
  }
1071
1091
  : null,
1072
- !((_63 = (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.exportSettings) === null || _63 === void 0 ? void 0 : _63.hideExportQR)
1092
+ !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportQR)
1073
1093
  ? {
1074
1094
  text: "Export QR(Data)",
1075
1095
  onClick: function () {
@@ -1079,7 +1099,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1079
1099
  },
1080
1100
  }
1081
1101
  : null,
1082
- !((_65 = (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.exportSettings) === null || _65 === void 0 ? void 0 : _65.hideExportPrint)
1102
+ !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportPrint)
1083
1103
  ? {
1084
1104
  text: "Print",
1085
1105
  onClick: function () {
@@ -1089,7 +1109,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1089
1109
  },
1090
1110
  }
1091
1111
  : null,
1092
- !((_67 = (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.exportSettings) === null || _67 === void 0 ? void 0 : _67.hideExportDraft)
1112
+ !((_69 = (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.exportSettings) === null || _69 === void 0 ? void 0 : _69.hideExportDraft)
1093
1113
  ? {
1094
1114
  text: filterDraft ? "Show All Items" : "Filter Draft",
1095
1115
  onClick: function () {
@@ -1098,7 +1118,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1098
1118
  }
1099
1119
  : null,
1100
1120
  ].filter(Boolean);
1101
- if ((_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.moreSettings)
1121
+ if ((_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.moreSettings)
1102
1122
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
1103
1123
  //=====================================================================================
1104
1124
  //SECTION: User Column Visibility Handlers
@@ -1155,7 +1175,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1155
1175
  };
1156
1176
  var handleShowAllUserHiddenColumns = function () {
1157
1177
  var _a;
1158
- if (appendedSystemColumnIds.length)
1178
+ if (appendedSystemColumnIds.length && !isSystemColumnsLocked)
1159
1179
  handleSetShownSystemColumns(appendedSystemColumnIds);
1160
1180
  if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeHide) {
1161
1181
  var handleShowAll = function (columns) {
@@ -1492,14 +1512,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1492
1512
  //=====================================================================================
1493
1513
  //SECTION: Saved Views
1494
1514
  //=====================================================================================
1495
- var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.persistKey, (_70 = devSettings.currentUser) === null || _70 === void 0 ? void 0 : _70.userEmail);
1515
+ var savedViewsKey = (0, viewStatePersistence_1.buildSavedViewsKey)(props.collectionId, (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.persistKey, (_72 = devSettings.currentUser) === null || _72 === void 0 ? void 0 : _72.userEmail);
1496
1516
  (0, react_1.useEffect)(function () {
1497
1517
  if (isSavedViewsEnabled && !isAppViews)
1498
1518
  setSavedViews((0, viewStatePersistence_1.handleReadSavedViews)(savedViewsKey));
1499
1519
  }, [isSavedViewsEnabled, isAppViews, savedViewsKey]);
1500
1520
  // INFO: the app keeps All's settings, so every change is kept in this
1501
1521
  // browser until the person updates the view for everyone or resets it
1502
- var isViewDraftsEnabled = isSavedViewsEnabled && ((_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.allView) !== undefined;
1522
+ var isViewDraftsEnabled = isSavedViewsEnabled && ((_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.allView) !== undefined;
1503
1523
  var handleGetViewDraftKey = function (viewId) {
1504
1524
  var _a, _b;
1505
1525
  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);
@@ -1576,7 +1596,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1576
1596
  var lastSentSharedViewsRef = (0, react_1.useRef)(null);
1577
1597
  (0, react_1.useEffect)(function () {
1578
1598
  lastSentSharedViewsRef.current = null;
1579
- }, [(_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.sharedViews]);
1599
+ }, [(_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.sharedViews]);
1580
1600
  var handleStoreSharedViews = function (update) {
1581
1601
  var _a, _b, _c;
1582
1602
  if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSharedViews))
@@ -1621,13 +1641,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1621
1641
  /* eslint-disable */
1622
1642
  }, [
1623
1643
  isSavedViewsEnabled,
1624
- (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.initialSavedViewId,
1625
- (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.defaultSavedViewId,
1626
- (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.sharedViews,
1644
+ (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.initialSavedViewId,
1645
+ (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.defaultSavedViewId,
1646
+ (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.sharedViews,
1627
1647
  savedViews,
1628
1648
  ]);
1629
1649
  /* eslint-enable */
1630
- var defaultSavedViewIds = ((_77 = (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.defaultSavedViews) !== null && _77 !== void 0 ? _77 : [])
1650
+ var defaultSavedViewIds = ((_79 = (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.defaultSavedViews) !== null && _79 !== void 0 ? _79 : [])
1631
1651
  .map(function (eachView) { var _a; return (_a = eachView.id) !== null && _a !== void 0 ? _a : ""; })
1632
1652
  .join("|");
1633
1653
  // INFO: keyed on the ids, not the array, so an inline literal passed on every
@@ -1929,8 +1949,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1929
1949
  pageLimit,
1930
1950
  groupId,
1931
1951
  columnWidths,
1932
- (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.allView,
1933
- (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.sharedViews,
1952
+ (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.allView,
1953
+ (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.sharedViews,
1934
1954
  savedViews,
1935
1955
  ]);
1936
1956
  /* eslint-enable */
@@ -1970,7 +1990,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1970
1990
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
1971
1991
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
1972
1992
  /* eslint-disable */
1973
- }, [props.collectionId, (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.persistKey]);
1993
+ }, [props.collectionId, (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.persistKey]);
1974
1994
  /* eslint-enable */
1975
1995
  // INFO: wait a frame — rows land in state one tick before layout
1976
1996
  (0, react_1.useEffect)(function () {
@@ -2005,7 +2025,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2005
2025
  (0, react_1.useEffect)(function () {
2006
2026
  handleOfflinePrefetch();
2007
2027
  /* eslint-disable */
2008
- }, [props.collectionId, (_81 = props.bareSettings) === null || _81 === void 0 ? void 0 : _81.bareOffline]);
2028
+ }, [props.collectionId, (_83 = props.bareSettings) === null || _83 === void 0 ? void 0 : _83.bareOffline]);
2009
2029
  /* eslint-enable */
2010
2030
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
2011
2031
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -2025,7 +2045,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2025
2045
  }, interval);
2026
2046
  return function () { return clearInterval(timer); };
2027
2047
  /* eslint-disable */
2028
- }, [(_82 = props.bareSettings) === null || _82 === void 0 ? void 0 : _82.barePollingInterval, isLive, isNetworkOffline]);
2048
+ }, [(_84 = props.bareSettings) === null || _84 === void 0 ? void 0 : _84.barePollingInterval, isLive, isNetworkOffline]);
2029
2049
  /* eslint-enable */
2030
2050
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
2031
2051
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -2067,7 +2087,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2067
2087
  };
2068
2088
  /* eslint-disable */
2069
2089
  }, [
2070
- (_83 = props.bareSettings) === null || _83 === void 0 ? void 0 : _83.bareSocketName,
2090
+ (_85 = props.bareSettings) === null || _85 === void 0 ? void 0 : _85.bareSocketName,
2071
2091
  props.collectionId,
2072
2092
  props.devSettings.sseEndpoint,
2073
2093
  props.devSettings.dbAPIToken,
@@ -2341,10 +2361,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2341
2361
  props.collectionId,
2342
2362
  props.model,
2343
2363
  props.localURLEndpoint,
2344
- (_84 = props.organise) === null || _84 === void 0 ? void 0 : _84.extendedTabs,
2345
- (_85 = props.organise) === null || _85 === void 0 ? void 0 : _85.viewId,
2346
- (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.additionalQuery,
2347
- (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.groupBy,
2364
+ (_86 = props.organise) === null || _86 === void 0 ? void 0 : _86.extendedTabs,
2365
+ (_87 = props.organise) === null || _87 === void 0 ? void 0 : _87.viewId,
2366
+ (_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.additionalQuery,
2367
+ (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.groupBy,
2348
2368
  resolvedType,
2349
2369
  ]);
2350
2370
  /**
@@ -2496,7 +2516,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2496
2516
  };
2497
2517
  }, 100);
2498
2518
  return function () { return clearTimeout(timeoutId); };
2499
- }, [(_88 = props.organise) === null || _88 === void 0 ? void 0 : _88.showReadFloatingNav, resolvedType, props.id, loading]);
2519
+ }, [(_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.showReadFloatingNav, resolvedType, props.id, loading]);
2500
2520
  (0, react_1.useEffect)(function () {
2501
2521
  if (resolvedType !== "read")
2502
2522
  return;
@@ -5609,7 +5629,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5609
5629
  // update an inline cell edit makes, gated on the same update right
5610
5630
  var columnTypeActions = {
5611
5631
  canUpdate: canUpdateRecord,
5612
- onButtonClick: (_89 = props.organise) === null || _89 === void 0 ? void 0 : _89.onButtonClick,
5632
+ onButtonClick: (_91 = props.organise) === null || _91 === void 0 ? void 0 : _91.onButtonClick,
5613
5633
  onUpdateCell: function (rowId, columnId, value) { return __awaiter(void 0, void 0, void 0, function () {
5614
5634
  var _a;
5615
5635
  return __generator(this, function (_b) {
@@ -5626,7 +5646,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5626
5646
  }
5627
5647
  });
5628
5648
  }); },
5629
- onTimeTrackingAction: ((_90 = props.organise) === null || _90 === void 0 ? void 0 : _90.onTimeTrackingAction) && canUpdateRecord
5649
+ onTimeTrackingAction: ((_92 = props.organise) === null || _92 === void 0 ? void 0 : _92.onTimeTrackingAction) && canUpdateRecord
5630
5650
  ? function (rowId, columnId, action) {
5631
5651
  return handleTimeTrackingAction(rowId, columnId, action);
5632
5652
  }
@@ -7667,6 +7687,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7667
7687
  if (eachAttribute.id === "_id" ||
7668
7688
  eachAttribute.id === "id" ||
7669
7689
  eachAttribute.id === "baseDraft" ||
7690
+ (isSystemColumnsLocked &&
7691
+ appendedSystemColumnIds.includes(eachAttribute.id)) ||
7670
7692
  // INFO: a system column starts hidden yet is always offered
7671
7693
  (!includeSchemaHidden &&
7672
7694
  eachAttribute.hide &&
@@ -7766,7 +7788,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7766
7788
  : "cursor-pointer hover:text-primary-600"), onClick: function () {
7767
7789
  handleToggleUserHiddenColumn(eachColumn.id);
7768
7790
  } },
7769
- react_1.default.createElement("span", { className: "pr-3 truncate grow ".concat(labelColor) }, eachColumn.name),
7791
+ react_1.default.createElement("span", { className: "pr-3 truncate grow ".concat(labelColor) }, appendedSystemColumnIds.includes(eachColumn.id)
7792
+ ? "".concat(eachColumn.name, " (System)")
7793
+ : eachColumn.name),
7770
7794
  isHidden ? (react_1.default.createElement(outline_1.EyeSlashIcon, { className: "w-4 h-4 text-gray-400 shrink-0" })) : (react_1.default.createElement(outline_1.EyeIcon, { className: "w-4 h-4 text-primary-600 shrink-0" })))));
7771
7795
  };
7772
7796
  return (react_1.default.createElement("div", { "data-testid": "dtw-view-settings", className: "flex flex-col" },
@@ -7836,8 +7860,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7836
7860
  : rows;
7837
7861
  };
7838
7862
  /* eslint-disable */
7839
- var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_91 = props.bareSettings) === null || _91 === void 0 ? void 0 : _91.bareNewDTW]);
7840
- var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_92 = props.bareSettings) === null || _92 === void 0 ? void 0 : _92.bareNewDTW]);
7863
+ var newTableRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(tableData); }, [tableData, (_93 = props.bareSettings) === null || _93 === void 0 ? void 0 : _93.bareNewDTW]);
7864
+ var newTableSpaceRows = (0, react_1.useMemo)(function () { return handleKeepCustomRowActions(spaceTableData); }, [spaceTableData, (_94 = props.bareSettings) === null || _94 === void 0 ? void 0 : _94.bareNewDTW]);
7841
7865
  /* eslint-enable */
7842
7866
  // INFO: the pencil beside a record's title opens the same form the Update
7843
7867
  // column's pencil did, for whoever may update; the bubble beside it opens
@@ -8554,22 +8578,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8554
8578
  // configures the table once and the panel inherits it.
8555
8579
  var renderReadDrawer = function () {
8556
8580
  var _a, _b, _c, _d;
8557
- if (!isDrawerRead)
8581
+ if (!isDrawerRecord)
8558
8582
  return null;
8559
8583
  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, title = _e.title;
8560
- 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: "dt-read-drawer", open: isDrawerHost, onClose: function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", ""); }, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl", maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : "75", title: title !== null && title !== void 0 ? title : (typeof props.title === "string" && props.title
8584
+ 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: isDrawerForm ? "dt-form-drawer" : "dt-read-drawer", open: isDrawerHost, onClose: function () { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "list", ""); }, anchor: anchor !== null && anchor !== void 0 ? anchor : "responsive", maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : "3xl",
8585
+ // INFO: a phone keyboard takes half the screen, which leaves a form in a
8586
+ // three-quarter sheet almost no room for the field being typed in
8587
+ maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : (isDrawerForm ? "100" : "75"),
8588
+ // INFO: nothing typed into a form has been saved yet, so only its close
8589
+ // button leaves it — not a stray tap outside or a stray Escape
8590
+ disableDismiss: isDrawerForm, title: title !== null && title !== void 0 ? title : (typeof props.title === "string" && props.title
8561
8591
  ? props.title
8562
- : "Details"), desc: desc, expandable: !disableExpand, onExpand: function () { return setDrawerPageView(true); }, content: react_1.default.createElement(exports.DataTemplate, __assign({}, props, { id: drawerReadIdRef.current, type: "read",
8592
+ : "Details"), desc: desc, expandable: !disableExpand, onExpand: function () { return setDrawerPageView(true); }, content: react_1.default.createElement(exports.DataTemplate, __assign({}, props, { id: drawerReadIdRef.current, type: isDrawerForm ? "update" : "read",
8563
8593
  // INFO: strips the flag so the nested instance renders the record
8564
8594
  // rather than hosting another drawer
8565
8595
  viewSettings: undefined,
8566
8596
  // INFO: the panel header already names the record, and a
8567
8597
  // list/detail breadcrumb is meaningless while the list is still on
8568
8598
  // screen behind it
8569
- title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign({
8599
+ title: "", description: "", organise: __assign(__assign({}, props.organise), { breadcrumbType: "hidden" }), bareSettings: __assign(__assign(__assign({
8570
8600
  // INFO: DetailList's stacked rows waste a panel this narrow —
8571
8601
  // compact puts label and value on one row. Overridable.
8572
- bareCompactMode: true }, props.bareSettings), (isDrawerHost
8602
+ bareCompactMode: !isDrawerForm }, props.bareSettings), {
8603
+ // INFO: the nested instance draws the form rather than hosting
8604
+ // another panel
8605
+ bareFormDrawer: false }), (isDrawerHost
8573
8606
  ? {}
8574
8607
  : {
8575
8608
  barePollingInterval: undefined,
@@ -9067,7 +9100,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9067
9100
  };
9068
9101
  // INFO: Desktop — PopUp (hidden on mobile)
9069
9102
  actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
9070
- react_1.default.createElement(popUp_1.PopUp, { darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, flexFilterStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterQuery, searchInput, (_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareListFilterAddComponent, undefined, {
9103
+ react_1.default.createElement(popUp_1.PopUp, { darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterQuery, searchInput, (_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareListFilterAddComponent, undefined, {
9071
9104
  darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode,
9072
9105
  darkModeBg: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkModeBg,
9073
9106
  }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_3 = props === null || props === void 0 ? void 0 : props.lib) === null || _3 === void 0 ? void 0 : _3.Transition } })));
@@ -9075,7 +9108,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9075
9108
  actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
9076
9109
  !((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileFloatingSearch) &&
9077
9110
  flexFilterIconBtn(true),
9078
- (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_5 = props.bareSettings) === null || _5 === void 0 ? void 0 : _5.bareListFilterQuery, searchInput, (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareListFilterAddComponent, {
9111
+ (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_5 = props.bareSettings) === null || _5 === void 0 ? void 0 : _5.bareListFilterQuery, searchInput, (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareListFilterAddComponent, {
9079
9112
  darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode,
9080
9113
  darkModeBg: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkModeBg,
9081
9114
  })));
@@ -11818,14 +11851,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11818
11851
  };
11819
11852
  return (react_1.default.createElement(context_1.ColumnTypeContext.Provider, { value: columnTypeActions },
11820
11853
  renderNotification("root"),
11821
- ((_94 = (_93 = props.renderSettings) === null || _93 === void 0 ? void 0 : _93.renderLoadingUI) === null || _94 === void 0 ? void 0 : _94.call(_93)) && loading ? ((_95 = props.renderSettings) === null || _95 === void 0 ? void 0 : _95.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_96 = props.organise) === null || _96 === void 0 ? void 0 : _96.darkMode, darkModeBg: (_97 = props.organise) === null || _97 === void 0 ? void 0 : _97.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
11854
+ ((_96 = (_95 = props.renderSettings) === null || _95 === void 0 ? void 0 : _95.renderLoadingUI) === null || _96 === void 0 ? void 0 : _96.call(_95)) && loading ? ((_97 = props.renderSettings) === null || _97 === void 0 ? void 0 : _97.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.darkMode, darkModeBg: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
11822
11855
  var _a, _b;
11823
11856
  if (loading)
11824
11857
  return;
11825
11858
  handlePopUpModal(false);
11826
11859
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
11827
11860
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
11828
- react_1.default.createElement(modal_1.Modal, { darkMode: (_98 = props.organise) === null || _98 === void 0 ? void 0 : _98.darkMode, darkModeBg: (_99 = props.organise) === null || _99 === void 0 ? void 0 : _99.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
11861
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkMode, darkModeBg: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
11829
11862
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
11830
11863
  if (dataId) {
11831
11864
  var currentValue = selectedData[referenceCreationModal.id];
@@ -11841,19 +11874,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11841
11874
  }, onClose: function () {
11842
11875
  setReferenceCreationModal({ id: "", name: "", type: "string" });
11843
11876
  } }),
11844
- react_1.default.createElement(modal_1.Modal, { darkMode: (_100 = props.organise) === null || _100 === void 0 ? void 0 : _100.darkMode, darkModeBg: (_101 = props.organise) === null || _101 === void 0 ? void 0 : _101.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
11877
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
11845
11878
  setReferenceDeleteTableData({});
11846
11879
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11847
- react_1.default.createElement(modal_1.Modal, { darkMode: (_102 = props.organise) === null || _102 === void 0 ? void 0 : _102.darkMode, darkModeBg: (_103 = props.organise) === null || _103 === void 0 ? void 0 : _103.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
11880
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
11848
11881
  setDeletePasscodeInput("");
11849
11882
  setDeleteModal(!deleteModal);
11850
11883
  setDeleteFeedId("");
11851
11884
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11852
- react_1.default.createElement(modal_1.Modal, { darkMode: (_104 = props.organise) === null || _104 === void 0 ? void 0 : _104.darkMode, darkModeBg: (_105 = props.organise) === null || _105 === void 0 ? void 0 : _105.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
11885
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
11853
11886
  setBatchUpdateData({ columnId: "", columnData: {} });
11854
11887
  setBatchUpdateModal(false);
11855
11888
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
11856
- react_1.default.createElement(modal_1.Modal, { darkMode: (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.darkMode, darkModeBg: (_107 = props.organise) === null || _107 === void 0 ? void 0 : _107.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
11889
+ 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, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
11857
11890
  var _a, _b;
11858
11891
  if (props.space)
11859
11892
  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 }));
@@ -11868,13 +11901,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
11868
11901
  (0, react_dom_1.createPortal)(
11869
11902
  // INFO: z-50 lifts it over a Modal the table may sit in (z-40)
11870
11903
  react_1.default.createElement("div", { className: "relative z-50" },
11871
- react_1.default.createElement(drawer_1.Drawer, { darkMode: (_108 = props.organise) === null || _108 === void 0 ? void 0 : _108.darkMode, darkModeBg: (_109 = props.organise) === null || _109 === void 0 ? void 0 : _109.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
11904
+ react_1.default.createElement(drawer_1.Drawer, { darkMode: (_110 = props.organise) === null || _110 === void 0 ? void 0 : _110.darkMode, darkModeBg: (_111 = props.organise) === null || _111 === void 0 ? void 0 : _111.darkModeBg, testId: "dt-activity-drawer", open: activityModal,
11872
11905
  // INFO: the record stays set while the drawer slides out — clearing it
11873
11906
  // would remount the hidden panel collection-wide and fetch again. The
11874
11907
  // toolbar's collection-wide button clears it when it opens.
11875
11908
  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"
11876
11909
  ? props.title
11877
- : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_110 = props.id) !== null && _110 !== void 0 ? _110 : "") : activityId, activityLog: (_111 = props.edit) === null || _111 === void 0 ? void 0 : _111.activityLog, model: structure }) })), document.body),
11910
+ : "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: resolvedType === "read" ? ((_112 = props.id) !== null && _112 !== void 0 ? _112 : "") : activityId, activityLog: (_113 = props.edit) === null || _113 === void 0 ? void 0 : _113.activityLog, model: structure }) })), document.body),
11878
11911
  renderScrollSentinel()));
11879
11912
  });
11880
11913
  //# sourceMappingURL=index.js.map