blixify-ui-web 1.2.120 → 1.2.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  3. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  4. package/lib/components/data/dataTemplate/index.js +355 -227
  5. package/lib/components/data/dataTemplate/index.js.map +1 -1
  6. package/lib/components/data/dataTemplate/model.d.ts +13 -13
  7. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  8. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +30 -2
  9. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
  10. package/lib/components/data/dataTemplate/viewStatePersistence.js +289 -15
  11. package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
  12. package/lib/components/design/googleReview/index.d.ts +2 -0
  13. package/lib/components/design/googleReview/index.d.ts.map +1 -1
  14. package/lib/components/design/googleReview/index.js +22 -9
  15. package/lib/components/design/googleReview/index.js.map +1 -1
  16. package/lib/components/display/grid/index.d.ts.map +1 -1
  17. package/lib/components/display/grid/index.js +1 -1
  18. package/lib/components/display/grid/index.js.map +1 -1
  19. package/lib/components/display/kanban/index.d.ts.map +1 -1
  20. package/lib/components/display/kanban/index.js +1 -1
  21. package/lib/components/display/kanban/index.js.map +1 -1
  22. package/lib/components/display/list/index.d.ts.map +1 -1
  23. package/lib/components/display/list/index.js +1 -1
  24. package/lib/components/display/list/index.js.map +1 -1
  25. package/lib/components/display/mapView/index.d.ts +1 -0
  26. package/lib/components/display/mapView/index.d.ts.map +1 -1
  27. package/lib/components/display/mapView/index.js +130 -99
  28. package/lib/components/display/mapView/index.js.map +1 -1
  29. package/lib/components/display/newFeeds/index.d.ts.map +1 -1
  30. package/lib/components/display/newFeeds/index.js +1 -1
  31. package/lib/components/display/newFeeds/index.js.map +1 -1
  32. package/lib/components/display/newGrid/index.d.ts +41 -0
  33. package/lib/components/display/newGrid/index.d.ts.map +1 -0
  34. package/lib/components/display/newGrid/index.js +248 -0
  35. package/lib/components/display/newGrid/index.js.map +1 -0
  36. package/lib/components/display/newKanban/index.d.ts +11 -4
  37. package/lib/components/display/newKanban/index.d.ts.map +1 -1
  38. package/lib/components/display/newKanban/index.js +71 -39
  39. package/lib/components/display/newKanban/index.js.map +1 -1
  40. package/lib/components/display/newList/index.js +1 -1
  41. package/lib/components/display/newList/index.js.map +1 -1
  42. package/lib/components/display/newTable/index.d.ts +3 -3
  43. package/lib/components/display/newTable/index.d.ts.map +1 -1
  44. package/lib/components/display/newTable/index.js +47 -36
  45. package/lib/components/display/newTable/index.js.map +1 -1
  46. package/lib/components/display/stepper/index.d.ts.map +1 -1
  47. package/lib/components/display/stepper/index.js +1 -3
  48. package/lib/components/display/stepper/index.js.map +1 -1
  49. package/lib/components/display/table/index.d.ts.map +1 -1
  50. package/lib/components/display/table/index.js +2 -2
  51. package/lib/components/display/table/index.js.map +1 -1
  52. package/lib/components/display/tag/index.d.ts.map +1 -1
  53. package/lib/components/display/tag/index.js +13 -1
  54. package/lib/components/display/tag/index.js.map +1 -1
  55. package/lib/components/googleMaps.d.ts +8 -0
  56. package/lib/components/googleMaps.d.ts.map +1 -0
  57. package/lib/components/googleMaps.js +139 -0
  58. package/lib/components/googleMaps.js.map +1 -0
  59. package/lib/components/input/address/index.d.ts +2 -0
  60. package/lib/components/input/address/index.d.ts.map +1 -1
  61. package/lib/components/input/address/index.js +219 -156
  62. package/lib/components/input/address/index.js.map +1 -1
  63. package/lib/components/input/signature/index.d.ts +1 -0
  64. package/lib/components/input/signature/index.d.ts.map +1 -1
  65. package/lib/components/input/signature/index.js +8 -1
  66. package/lib/components/input/signature/index.js.map +1 -1
  67. package/lib/components/navigation/bars/index.d.ts +7 -4
  68. package/lib/components/navigation/bars/index.d.ts.map +1 -1
  69. package/lib/components/navigation/bars/index.js +56 -20
  70. package/lib/components/navigation/bars/index.js.map +1 -1
  71. package/lib/components/navigation/leftNav/index.d.ts +12 -2
  72. package/lib/components/navigation/leftNav/index.d.ts.map +1 -1
  73. package/lib/components/navigation/leftNav/index.js +55 -16
  74. package/lib/components/navigation/leftNav/index.js.map +1 -1
  75. package/lib/components/storyUtils.js +1 -1
  76. package/lib/components/storyUtils.js.map +1 -1
  77. package/lib/tail.css +2 -2
  78. package/package.json +1 -1
@@ -125,6 +125,7 @@ var stepper_1 = require("../../display/stepper");
125
125
  var table_1 = require("../../display/table");
126
126
  var newTable_1 = require("../../display/newTable");
127
127
  var newList_1 = require("../../display/newList");
128
+ var newGrid_1 = require("../../display/newGrid");
128
129
  var newKanban_1 = require("../../display/newKanban");
129
130
  var newCalendar_1 = require("../../display/newCalendar");
130
131
  var address_1 = require("../../input/address");
@@ -199,10 +200,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
199
200
  // Every read of the view type below uses resolvedType. The distinction matters
200
201
  // most in effect dependency arrays — following props.type there would leave
201
202
  // the list never refetching while the panel is open, which fails silently.
202
- 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;
203
+ 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;
203
204
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
204
205
  // routed straight back into it — so expand-to-full-page is local state.
205
- var _79 = (0, react_1.useState)(false), drawerPageView = _79[0], setDrawerPageView = _79[1];
206
+ var _80 = (0, react_1.useState)(false), drawerPageView = _80[0], setDrawerPageView = _80[1];
206
207
  // INFO: the panel keeps rendering the record it was opened with rather than
207
208
  // live props. Without this, navigating back to the list would re-render the
208
209
  // still-mounted panel as a second list behind the overlay.
@@ -284,16 +285,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
284
285
  initialFilterReferenceDate: initialFilterReferenceDate,
285
286
  };
286
287
  };
287
- var _80 = intialiseDefaultFilterValues(), initialFilterSearch = _80.initialFilterSearch, initialFilterSearchParams = _80.initialFilterSearchParams, initialFilterSelection = _80.initialFilterSelection, initialFilterReference = _80.initialFilterReference, initialFilterReferenceDate = _80.initialFilterReferenceDate;
288
+ var _81 = intialiseDefaultFilterValues(), initialFilterSearch = _81.initialFilterSearch, initialFilterSearchParams = _81.initialFilterSearchParams, initialFilterSelection = _81.initialFilterSelection, initialFilterReference = _81.initialFilterReference, initialFilterReferenceDate = _81.initialFilterReferenceDate;
288
289
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
289
- var _81 = (0, viewStatePersistence_1.usePersistedViewState)({
290
+ var _82 = (0, viewStatePersistence_1.usePersistedViewState)({
290
291
  mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
291
292
  collectionId: props.collectionId,
292
293
  persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
293
294
  type: resolvedType,
294
- }), persistedState = _81.persistedState, isPersistEnabled = _81.isEnabled, handleSaveView = _81.handleSaveView;
295
- var _82 = (0, react_1.useState)(false), loading = _82[0], setLoading = _82[1];
296
- var _83 = (0, react_1.useState)(), notification = _83[0], setNotification = _83[1];
295
+ }), rawPersistedState = _82.persistedState, isPersistEnabled = _82.isEnabled, handleSaveView = _82.handleSaveView, handleRegisterViewSnapshot = _82.handleRegisterViewSnapshot;
296
+ // INFO: drop stored filters/sort on removed columns — they would empty the table
297
+ var persistedState = (0, react_1.useMemo)(function () { return (0, viewStatePersistence_1.handlePruneStaleColumns)(rawPersistedState, props.model); }, [rawPersistedState, props.model]);
298
+ var _83 = (0, react_1.useState)(false), loading = _83[0], setLoading = _83[1];
299
+ var _84 = (0, react_1.useState)(), notification = _84[0], setNotification = _84[1];
297
300
  // INFO: a success toast is confirmation, not a decision — it clears itself so
298
301
  // it never sits on the floating step bar; errors stay until dismissed
299
302
  (0, react_1.useEffect)(function () {
@@ -303,59 +306,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
303
306
  return function () { return clearTimeout(timer); };
304
307
  }, [notification]);
305
308
  //INFO : Used by List
306
- var _84 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _84[0], setFilterSearch = _84[1];
307
- var _85 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _85[0], setFilterSearchParams = _85[1];
308
- var _86 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _86[0], setFilterSelection = _86[1];
309
- var _87 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _87[0], setFilterReference = _87[1];
310
- var _88 = (0, react_1.useState)({}), filterReferenceSearch = _88[0], setFilterReferenceSearch = _88[1];
311
- var _89 = (0, react_1.useState)({}), filterReferenceList = _89[0], setFilterReferenceList = _89[1];
312
- var _90 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
309
+ var _85 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _85[0], setFilterSearch = _85[1];
310
+ var _86 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _86[0], setFilterSearchParams = _86[1];
311
+ var _87 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _87[0], setFilterSelection = _87[1];
312
+ var _88 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _88[0], setFilterReference = _88[1];
313
+ var _89 = (0, react_1.useState)({}), filterReferenceSearch = _89[0], setFilterReferenceSearch = _89[1];
314
+ var _90 = (0, react_1.useState)({}), filterReferenceList = _90[0], setFilterReferenceList = _90[1];
315
+ var _91 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
313
316
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
314
- : initialFilterReferenceDate), filterReferenceDate = _90[0], setFilterReferenceDate = _90[1];
315
- var _91 = (0, react_1.useState)(true), tableLoading = _91[0], setTableLoading = _91[1];
316
- var _92 = (0, react_1.useState)(""), cursor = _92[0], setCursor = _92[1];
317
- var _93 = (0, react_1.useState)(""), lastCursor = _93[0], setLastCursor = _93[1];
318
- var _94 = (0, react_1.useState)([]), tableData = _94[0], setTableData = _94[1];
319
- var _95 = (0, react_1.useState)([]), spaceTableData = _95[0], setSpaceTableData = _95[1];
317
+ : initialFilterReferenceDate), filterReferenceDate = _91[0], setFilterReferenceDate = _91[1];
318
+ var _92 = (0, react_1.useState)(true), tableLoading = _92[0], setTableLoading = _92[1];
319
+ var _93 = (0, react_1.useState)(""), cursor = _93[0], setCursor = _93[1];
320
+ var _94 = (0, react_1.useState)(""), lastCursor = _94[0], setLastCursor = _94[1];
321
+ var _95 = (0, react_1.useState)([]), tableData = _95[0], setTableData = _95[1];
322
+ var _96 = (0, react_1.useState)([]), spaceTableData = _96[0], setSpaceTableData = _96[1];
320
323
  // INFO: a save resolves after later renders, so it reads the table from here —
321
324
  // the state it closed over can predate an earlier save on the same row
322
325
  var tableDataRef = (0, react_1.useRef)([]);
323
326
  var spaceTableDataRef = (0, react_1.useRef)([]);
324
327
  tableDataRef.current = tableData;
325
328
  spaceTableDataRef.current = spaceTableData;
326
- var _96 = (0, react_1.useState)(0), size = _96[0], setSize = _96[1];
327
- var _97 = (0, react_1.useState)((_k = (_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _h !== void 0 ? _h : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.pageIndex) !== null && _k !== void 0 ? _k : 0), pageIndex = _97[0], setPageIndex = _97[1];
328
- var _98 = (0, react_1.useState)([]), selectedIds = _98[0], setSelectedIds = _98[1];
329
- var _99 = (0, react_1.useState)(false), selectAll = _99[0], setSelectAll = _99[1];
330
- var _100 = (0, react_1.useState)(""), deletePasscode = _100[0], setDeletePasscode = _100[1];
331
- var _101 = (0, react_1.useState)(""), deletePasscodeInput = _101[0], setDeletePasscodeInput = _101[1];
332
- var _102 = (0, react_1.useState)(""), deleteFeedId = _102[0], setDeleteFeedId = _102[1];
329
+ var _97 = (0, react_1.useState)(0), size = _97[0], setSize = _97[1];
330
+ var _98 = (0, react_1.useState)((_k = (_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _h !== void 0 ? _h : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.pageIndex) !== null && _k !== void 0 ? _k : 0), pageIndex = _98[0], setPageIndex = _98[1];
331
+ var _99 = (0, react_1.useState)([]), selectedIds = _99[0], setSelectedIds = _99[1];
332
+ var _100 = (0, react_1.useState)(false), selectAll = _100[0], setSelectAll = _100[1];
333
+ var _101 = (0, react_1.useState)(""), deletePasscode = _101[0], setDeletePasscode = _101[1];
334
+ var _102 = (0, react_1.useState)(""), deletePasscodeInput = _102[0], setDeletePasscodeInput = _102[1];
335
+ var _103 = (0, react_1.useState)(""), deleteFeedId = _103[0], setDeleteFeedId = _103[1];
333
336
  //INFO : Used by List Organise
334
337
  // INFO: Internal sort state that overrides props.organise?.sort when
335
338
  // persistViewState is enabled and a persisted sort exists
336
- var _103 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _103[0], setPersistedSort = _103[1];
337
- var _104 = (0, react_1.useState)(false), filterDraft = _104[0], setFilterDraft = _104[1];
338
- var _105 = (0, react_1.useState)(false), addTabModal = _105[0], setAddTabModal = _105[1];
339
+ var _104 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _104[0], setPersistedSort = _104[1];
340
+ var _105 = (0, react_1.useState)(false), filterDraft = _105[0], setFilterDraft = _105[1];
341
+ var _106 = (0, react_1.useState)(false), addTabModal = _106[0], setAddTabModal = _106[1];
339
342
  //INFO : resolve the initial tab synchronously so the mount cond is already
340
343
  // tab-scoped — an empty initial tab caused a second wasted list fetch
341
- var _106 = (0, react_1.useState)(function () {
344
+ var _107 = (0, react_1.useState)(function () {
342
345
  var _a, _b;
343
346
  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);
344
- }), selectedTab = _106[0], setSelectedTab = _106[1];
345
- var _107 = (0, react_1.useState)("dayGridMonth"), calendarView = _107[0], setCalendarView = _107[1];
347
+ }), selectedTab = _107[0], setSelectedTab = _107[1];
348
+ var _108 = (0, react_1.useState)("dayGridMonth"), calendarView = _108[0], setCalendarView = _108[1];
346
349
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
347
350
  // (calendarView above drives the matching range query)
348
- var _108 = (0, react_1.useState)("month"), newCalendarViewMode = _108[0], setNewCalendarViewMode = _108[1];
349
- var _109 = (0, react_1.useState)(new Date()), calendarTabMonth = _109[0], setCalendarTabMonth = _109[1];
350
- var _110 = (0, react_1.useState)(true), kanbanDroppable = _110[0], setKanbanDroppable = _110[1];
351
- var _111 = (0, react_1.useState)([]), kanbanOptions = _111[0], setKanbanOptions = _111[1];
352
- var _112 = (0, react_1.useState)(false), queryForm = _112[0], setQueryForm = _112[1];
353
- var _113 = (0, react_1.useState)(false), batchUpdateModal = _113[0], setBatchUpdateModal = _113[1];
354
- var _114 = (0, react_1.useState)({
351
+ var _109 = (0, react_1.useState)("month"), newCalendarViewMode = _109[0], setNewCalendarViewMode = _109[1];
352
+ var _110 = (0, react_1.useState)(new Date()), calendarTabMonth = _110[0], setCalendarTabMonth = _110[1];
353
+ var _111 = (0, react_1.useState)(true), kanbanDroppable = _111[0], setKanbanDroppable = _111[1];
354
+ var _112 = (0, react_1.useState)([]), kanbanOptions = _112[0], setKanbanOptions = _112[1];
355
+ var _113 = (0, react_1.useState)(false), queryForm = _113[0], setQueryForm = _113[1];
356
+ var _114 = (0, react_1.useState)(false), batchUpdateModal = _114[0], setBatchUpdateModal = _114[1];
357
+ var _115 = (0, react_1.useState)({
355
358
  columnId: "",
356
359
  columnData: {},
357
- }), batchUpdateData = _114[0], setBatchUpdateData = _114[1];
358
- var _115 = (0, react_1.useState)(function () {
360
+ }), batchUpdateData = _115[0], setBatchUpdateData = _115[1];
361
+ var _116 = (0, react_1.useState)(function () {
359
362
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
360
363
  if (!persistedState)
361
364
  return baseModel;
@@ -381,8 +384,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
381
384
  });
382
385
  }
383
386
  return model;
384
- }), structure = _115[0], setStructure = _115[1];
385
- var _116 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _116[0], setAdditionalQuery = _116[1];
387
+ }), structure = _116[0], setStructure = _116[1];
388
+ var _117 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _117[0], setAdditionalQuery = _117[1];
386
389
  // INFO: State for user-configurable flex filters (Monday.com-style)
387
390
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
388
391
  var defaultFlexFilterRow = [
@@ -393,9 +396,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
393
396
  value: undefined,
394
397
  },
395
398
  ];
396
- var _117 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
399
+ var _118 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
397
400
  ? persistedState.flexFilters
398
- : defaultFlexFilterRow), flexFilters = _117[0], setFlexFilters = _117[1];
401
+ : defaultFlexFilterRow), flexFilters = _118[0], setFlexFilters = _118[1];
399
402
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
400
403
  // clear methods so chained calls in one tick aren't stale.
401
404
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -408,108 +411,119 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
408
411
  }, [flexFilters]);
409
412
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
410
413
  // to prevent API calls on every keystroke when typing in value inputs
411
- var _118 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
414
+ var _119 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
412
415
  ? persistedState.flexFilters
413
- : defaultFlexFilterRow), flexFiltersDebounced = _118[0], setFlexFiltersDebounced = _118[1];
414
- var _119 = (0, react_1.useState)({}), flexFilterReferenceOptions = _119[0], setFlexFilterReferenceOptions = _119[1];
415
- var _120 = (0, react_1.useState)({}), flexFilterReferenceSearch = _120[0], setFlexFilterReferenceSearch = _120[1];
416
- var _121 = (0, react_1.useState)(false), flexFilterModalOpen = _121[0], setFlexFilterModalOpen = _121[1];
417
- var _122 = (0, react_1.useState)(false), viewSettingsModalOpen = _122[0], setViewSettingsModalOpen = _122[1];
416
+ : defaultFlexFilterRow), flexFiltersDebounced = _119[0], setFlexFiltersDebounced = _119[1];
417
+ var _120 = (0, react_1.useState)({}), flexFilterReferenceOptions = _120[0], setFlexFilterReferenceOptions = _120[1];
418
+ var _121 = (0, react_1.useState)({}), flexFilterReferenceSearch = _121[0], setFlexFilterReferenceSearch = _121[1];
419
+ var _122 = (0, react_1.useState)(false), flexFilterModalOpen = _122[0], setFlexFilterModalOpen = _122[1];
420
+ var _123 = (0, react_1.useState)(false), viewSettingsModalOpen = _123[0], setViewSettingsModalOpen = _123[1];
418
421
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
419
422
  // Deliberately kept out of `structure`: the props-sync effect below resets
420
423
  // structure to props.model whenever props change, which would wipe the
421
424
  // choice, and the persist effect derives schema-level hiddenColumnIds from
422
425
  // structure — writing user hides there would blur the two concepts.
423
- var _123 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _123[0], setUserHiddenColumnIds = _123[1];
424
- var _124 = (0, react_1.useState)(""), columnSearch = _124[0], setColumnSearch = _124[1];
425
- var _125 = (0, react_1.useState)(null), draggingColumnId = _125[0], setDraggingColumnId = _125[1];
426
+ var _124 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _124[0], setUserHiddenColumnIds = _124[1];
427
+ var _125 = (0, react_1.useState)(""), columnSearch = _125[0], setColumnSearch = _125[1];
428
+ var _126 = (0, react_1.useState)(null), draggingColumnId = _126[0], setDraggingColumnId = _126[1];
426
429
  var columnRowRefs = (0, react_1.useRef)({});
427
430
  //INFO : Used by Auth
428
- var _126 = (0, react_1.useState)({
431
+ var _127 = (0, react_1.useState)({
429
432
  email: "",
430
433
  google: "",
431
434
  phone: "",
432
435
  disabled: false,
433
436
  create: false,
434
- }), authMethods = _126[0], setAuthMethods = _126[1];
435
- var _127 = (0, react_1.useState)(""), selectedAuthMethod = _127[0], setSelectedAuthMethod = _127[1];
437
+ }), authMethods = _127[0], setAuthMethods = _127[1];
438
+ var _128 = (0, react_1.useState)(""), selectedAuthMethod = _128[0], setSelectedAuthMethod = _128[1];
436
439
  // INFO: Used by Activity Log
437
- var _128 = (0, react_1.useState)(false), activityModal = _128[0], setActivityModal = _128[1];
438
- var _129 = (0, react_1.useState)(""), activityId = _129[0], setActivityId = _129[1];
440
+ var _129 = (0, react_1.useState)(false), activityModal = _129[0], setActivityModal = _129[1];
441
+ var _130 = (0, react_1.useState)(""), activityId = _130[0], setActivityId = _130[1];
439
442
  //INFO : Used by Export
440
- var _130 = (0, react_1.useState)(null), csvFile = _130[0], setCSVFile = _130[1];
441
- var _131 = (0, react_1.useState)([]), csvFileData = _131[0], setCSVFileData = _131[1];
442
- var _132 = (0, react_1.useState)(0), stepCSVIndex = _132[0], setStepCSVIndex = _132[1];
443
- var _133 = (0, react_1.useState)({}), listCSVMapAttribute = _133[0], setListCSVMapAttribute = _133[1];
444
- var _134 = (0, react_1.useState)({}), listCSVObjAttribute = _134[0], setListCSVObjAttribute = _134[1];
445
- var _135 = (0, react_1.useState)([]), csvAPIAttribute = _135[0], setCSVAPIAttribute = _135[1];
446
- var _136 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _136[0], setExportCSVEmail = _136[1];
447
- var _137 = (0, react_1.useState)(((_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.defaultExportPDFName) || ""), exportPDFTitle = _137[0], setExportPDFTitle = _137[1];
448
- var _138 = (0, react_1.useState)(false), exportPDFLoading = _138[0], setExportPDFLoading = _138[1];
449
- var _139 = (0, react_1.useState)(false), exportReadPDFLoading = _139[0], setExportReadPDFLoading = _139[1];
450
- var _140 = (0, react_1.useState)((_u = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.sumColumnId) !== null && _u !== void 0 ? _u : []), exportSumAttributeIds = _140[0], setExportSumAttributeIds = _140[1];
451
- var _141 = (0, react_1.useState)((_x = (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.hideSubItems) !== null && _x !== void 0 ? _x : false), hideSubItems = _141[0], setHideSubItems = _141[1];
452
- var _142 = (0, react_1.useState)([]), importTableData = _142[0], setImportTableData = _142[1];
453
- var _143 = (0, react_1.useState)([]), queryList = _143[0], setQueryList = _143[1];
454
- var _144 = (0, react_1.useState)(undefined), allQueryList = _144[0], setAllQueryList = _144[1];
455
- var _145 = (0, react_1.useState)(-1), queryIndex = _145[0], setQueryIndex = _145[1];
456
- var _146 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _146[0], setGroupId = _146[1];
457
- var _147 = (0, react_1.useState)(""), readTabSection = _147[0], setReadTabSection = _147[1];
458
- var _148 = (0, react_1.useState)(false), readFloatingNav = _148[0], setReadFloatingNav = _148[1];
443
+ var _131 = (0, react_1.useState)(null), csvFile = _131[0], setCSVFile = _131[1];
444
+ var _132 = (0, react_1.useState)([]), csvFileData = _132[0], setCSVFileData = _132[1];
445
+ var _133 = (0, react_1.useState)(0), stepCSVIndex = _133[0], setStepCSVIndex = _133[1];
446
+ var _134 = (0, react_1.useState)({}), listCSVMapAttribute = _134[0], setListCSVMapAttribute = _134[1];
447
+ var _135 = (0, react_1.useState)({}), listCSVObjAttribute = _135[0], setListCSVObjAttribute = _135[1];
448
+ var _136 = (0, react_1.useState)([]), csvAPIAttribute = _136[0], setCSVAPIAttribute = _136[1];
449
+ var _137 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _137[0], setExportCSVEmail = _137[1];
450
+ var _138 = (0, react_1.useState)(((_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.defaultExportPDFName) || ""), exportPDFTitle = _138[0], setExportPDFTitle = _138[1];
451
+ var _139 = (0, react_1.useState)(false), exportPDFLoading = _139[0], setExportPDFLoading = _139[1];
452
+ var _140 = (0, react_1.useState)(false), exportReadPDFLoading = _140[0], setExportReadPDFLoading = _140[1];
453
+ var _141 = (0, react_1.useState)((_u = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.sumColumnId) !== null && _u !== void 0 ? _u : []), exportSumAttributeIds = _141[0], setExportSumAttributeIds = _141[1];
454
+ var _142 = (0, react_1.useState)((_x = (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.hideSubItems) !== null && _x !== void 0 ? _x : false), hideSubItems = _142[0], setHideSubItems = _142[1];
455
+ var _143 = (0, react_1.useState)([]), importTableData = _143[0], setImportTableData = _143[1];
456
+ var _144 = (0, react_1.useState)([]), queryList = _144[0], setQueryList = _144[1];
457
+ var _145 = (0, react_1.useState)(undefined), allQueryList = _145[0], setAllQueryList = _145[1];
458
+ var _146 = (0, react_1.useState)(-1), queryIndex = _146[0], setQueryIndex = _146[1];
459
+ var _147 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _147[0], setGroupId = _147[1];
460
+ var _148 = (0, react_1.useState)(""), readTabSection = _148[0], setReadTabSection = _148[1];
461
+ var _149 = (0, react_1.useState)(false), readFloatingNav = _149[0], setReadFloatingNav = _149[1];
459
462
  var readTabSectionRefs = (0, react_1.useRef)({});
460
463
  //INFO : Used by Read
461
464
  //INFO : Used by Update
462
- var _149 = (0, react_1.useState)(false), modalVisible = _149[0], setModalVisible = _149[1];
463
- var _150 = (0, react_1.useState)(false), deleteModal = _150[0], setDeleteModal = _150[1];
464
- var _151 = (0, react_1.useState)(false), excelModal = _151[0], setExcelModal = _151[1];
465
- var _152 = (0, react_1.useState)(false), exportExcel = _152[0], setExportExcel = _152[1];
466
- var _153 = (0, react_1.useState)(""), exportType = _153[0], setExportType = _153[1];
467
- var _154 = (0, react_1.useState)(false), exportQR = _154[0], setExportQR = _154[1];
468
- var _155 = (0, react_1.useState)(function () {
465
+ var _150 = (0, react_1.useState)(false), modalVisible = _150[0], setModalVisible = _150[1];
466
+ var _151 = (0, react_1.useState)(false), deleteModal = _151[0], setDeleteModal = _151[1];
467
+ var _152 = (0, react_1.useState)(false), excelModal = _152[0], setExcelModal = _152[1];
468
+ var _153 = (0, react_1.useState)(false), exportExcel = _153[0], setExportExcel = _153[1];
469
+ var _154 = (0, react_1.useState)(""), exportType = _154[0], setExportType = _154[1];
470
+ var _155 = (0, react_1.useState)(false), exportQR = _155[0], setExportQR = _155[1];
471
+ var _156 = (0, react_1.useState)(function () {
469
472
  var _a, _b;
470
473
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
471
474
  return firstTabId;
472
- }), activeTab = _155[0], setActiveTab = _155[1];
473
- var _156 = (0, react_1.useState)(false), signatureSigning = _156[0], setSignatureSigning = _156[1];
474
- var _157 = (0, react_1.useState)({}), selectedData = _157[0], setSelectedData = _157[1];
475
- var _158 = (0, react_1.useState)(""), selectedObjectStructureId = _158[0], setSelectedObjectStructureId = _158[1];
476
- var _159 = (0, react_1.useState)(""), selectedObjectId = _159[0], setSelectedObjectId = _159[1];
477
- var _160 = (0, react_1.useState)(""), selectedListAddressId = _160[0], setSelectedListAddressId = _160[1];
478
- var _161 = (0, react_1.useState)(-1), selectedListAddressIndex = _161[0], setSelectedListAddressIndex = _161[1];
479
- var _162 = (0, react_1.useState)({
475
+ }), activeTab = _156[0], setActiveTab = _156[1];
476
+ var _157 = (0, react_1.useState)(false), signatureSigning = _157[0], setSignatureSigning = _157[1];
477
+ var _158 = (0, react_1.useState)({}), selectedData = _158[0], setSelectedData = _158[1];
478
+ var _159 = (0, react_1.useState)(""), selectedObjectStructureId = _159[0], setSelectedObjectStructureId = _159[1];
479
+ var _160 = (0, react_1.useState)(""), selectedObjectId = _160[0], setSelectedObjectId = _160[1];
480
+ var _161 = (0, react_1.useState)(""), selectedListAddressId = _161[0], setSelectedListAddressId = _161[1];
481
+ var _162 = (0, react_1.useState)(-1), selectedListAddressIndex = _162[0], setSelectedListAddressIndex = _162[1];
482
+ var _163 = (0, react_1.useState)({
480
483
  lat: 0,
481
484
  lng: 0,
482
485
  name: "",
483
- }), selectedListAddress = _162[0], setSelectedListAddress = _162[1];
484
- var _163 = (0, react_1.useState)({}), selectedObjectData = _163[0], setSelectedObjectData = _163[1];
485
- var _164 = (0, react_1.useState)(null), objectCellEdit = _164[0], setObjectCellEdit = _164[1];
486
- var _165 = (0, react_1.useState)(false), referenceLoading = _165[0], setReferenceLoading = _165[1];
487
- var _166 = (0, react_1.useState)({}), referencesOptions = _166[0], setReferencesOptions = _166[1];
488
- var _167 = (0, react_1.useState)({}), referencesDetails = _167[0], setReferencesDetails = _167[1];
489
- var _168 = (0, react_1.useState)({}), listReferencesOptions = _168[0], setListReferencesOptions = _168[1];
490
- var _169 = (0, react_1.useState)({}), referenceDeleteTableData = _169[0], setReferenceDeleteTableData = _169[1];
491
- var _170 = (0, react_1.useState)(0), referenceDeleteIndex = _170[0], setReferenceDeleteIndex = _170[1];
492
- var _171 = (0, react_1.useState)({
486
+ }), selectedListAddress = _163[0], setSelectedListAddress = _163[1];
487
+ var _164 = (0, react_1.useState)({}), selectedObjectData = _164[0], setSelectedObjectData = _164[1];
488
+ var _165 = (0, react_1.useState)(null), objectCellEdit = _165[0], setObjectCellEdit = _165[1];
489
+ var _166 = (0, react_1.useState)(false), referenceLoading = _166[0], setReferenceLoading = _166[1];
490
+ var _167 = (0, react_1.useState)({}), referencesOptions = _167[0], setReferencesOptions = _167[1];
491
+ var _168 = (0, react_1.useState)({}), referencesDetails = _168[0], setReferencesDetails = _168[1];
492
+ var _169 = (0, react_1.useState)({}), listReferencesOptions = _169[0], setListReferencesOptions = _169[1];
493
+ var _170 = (0, react_1.useState)({}), referenceDeleteTableData = _170[0], setReferenceDeleteTableData = _170[1];
494
+ var _171 = (0, react_1.useState)(0), referenceDeleteIndex = _171[0], setReferenceDeleteIndex = _171[1];
495
+ var _172 = (0, react_1.useState)({
493
496
  id: "",
494
497
  name: "",
495
498
  type: "string",
496
- }), referenceCreationModal = _171[0], setReferenceCreationModal = _171[1];
497
- var _172 = (0, react_1.useState)({}), referenceModelSchema = _172[0], setReferenceSchema = _172[1];
498
- var _173 = (0, react_1.useState)([]), kanbanChecked = _173[0], setKanbanChecked = _173[1];
499
+ }), referenceCreationModal = _172[0], setReferenceCreationModal = _172[1];
500
+ var _173 = (0, react_1.useState)({}), referenceModelSchema = _173[0], setReferenceSchema = _173[1];
501
+ var _174 = (0, react_1.useState)([]), kanbanChecked = _174[0], setKanbanChecked = _174[1];
499
502
  //INFO : Offline
500
- var _174 = (0, react_1.useState)(0), offlineDataLength = _174[0], setOfflineDataLength = _174[1];
501
- var _175 = (0, react_1.useState)(false), offlineModal = _175[0], setOfflineModal = _175[1];
503
+ var _175 = (0, react_1.useState)(0), offlineDataLength = _175[0], setOfflineDataLength = _175[1];
504
+ var _176 = (0, react_1.useState)(false), offlineModal = _176[0], setOfflineModal = _176[1];
502
505
  // INFO: live-stream state — driven by socket connection and navigator.onLine
503
- var _176 = (0, react_1.useState)(false), isLive = _176[0], setIsLive = _176[1];
504
- var _177 = (0, react_1.useState)(false), isLiveOffline = _177[0], setIsLiveOffline = _177[1];
506
+ var _177 = (0, react_1.useState)(false), isLive = _177[0], setIsLive = _177[1];
507
+ var _178 = (0, react_1.useState)(false), isLiveOffline = _178[0], setIsLiveOffline = _178[1];
505
508
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
506
509
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
507
510
  // Independent of SSE status so it works even when bareSocketName is not set.
508
- var _178 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _178[0], setIsNetworkOffline = _178[1];
511
+ var _179 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _179[0], setIsNetworkOffline = _179[1];
509
512
  var previousType = (0, react_1.useRef)(null);
510
513
  var previousSelectedData = (0, react_1.useRef)(null);
511
514
  var scrollSentinelRef = (0, react_1.useRef)(null);
512
515
  var scrollSentinelDebounce = (0, react_1.useRef)(false);
516
+ // INFO: a ref, filled in the row click before navigating unmounts the list
517
+ var scrollCaptureRef = (0, react_1.useRef)({
518
+ scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
519
+ scrollOffset: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollOffset,
520
+ });
521
+ // INFO: one restore per mount — polling and SSE refetches must not scroll the user back
522
+ var scrollRestoredRef = (0, react_1.useRef)(false);
523
+ // INFO: tells a mount apart from a tab switch on a mounted instance
524
+ var scrollIdentityRef = (0, react_1.useRef)(null);
525
+ var scrollScopeStartRef = (0, react_1.useRef)(null);
526
+ var scrollScopeEndRef = (0, react_1.useRef)(null);
513
527
  // INFO: captures the doc exactly as loaded from the server — used by
514
528
  // bareUpsertPartialUpdate to diff only the fields the user actually changed.
515
529
  // Intentionally separate from previousSelectedData, which advances on every
@@ -620,7 +634,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
620
634
  var isSchemaHideMode = ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.onChangeHide) ? true : false;
621
635
  // INFO: rows per page is a view setting the user can change, so it starts from
622
636
  // the persisted value and falls back to the consumer's limit
623
- var _179 = (0, react_1.useState)((_10 = (_9 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _9 !== void 0 ? _9 : props.limit) !== null && _10 !== void 0 ? _10 : 10), pageLimit = _179[0], setPageLimit = _179[1];
637
+ var _180 = (0, react_1.useState)((_10 = (_9 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _9 !== void 0 ? _9 : props.limit) !== null && _10 !== void 0 ? _10 : 10), pageLimit = _180[0], setPageLimit = _180[1];
624
638
  var limit = pageLimit;
625
639
  var activeSortId = (isPersistEnabled && persistedSort) || ((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.sort);
626
640
  var handleSortColumn = function (value) {
@@ -629,7 +643,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
629
643
  setPersistedSort(value);
630
644
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
631
645
  };
632
- var _180 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _180.canUpdateRecord, canInlineUpdate = _180.canInlineUpdate, canBatchUpdate = _180.canBatchUpdate, canDeleteRecord = _180.canDeleteRecord;
646
+ var _181 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _181.canUpdateRecord, canInlineUpdate = _181.canInlineUpdate, canBatchUpdate = _181.canBatchUpdate, canDeleteRecord = _181.canDeleteRecord;
633
647
  var isEditor = ((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.allEditable) ? true : false;
634
648
  var isOffline = (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareOffline;
635
649
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
@@ -1024,6 +1038,61 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1024
1038
  isLive: isLive,
1025
1039
  isLiveOffline: isLiveOffline,
1026
1040
  }); });
1041
+ // INFO: only a gridScroll grid scrolls horizontally
1042
+ var handleResolveScrollScope = function () { return ({
1043
+ start: scrollScopeStartRef.current,
1044
+ end: scrollScopeEndRef.current,
1045
+ }); };
1046
+ var handleResolveScrollAxis = function () {
1047
+ var isGridTab = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "grid";
1048
+ return isGridTab && renderCheckScrollMode() ? "horizontal" : "vertical";
1049
+ };
1050
+ // INFO: one payload builder for the save effect, the drill-in capture and the flush
1051
+ var handleBuildViewSnapshot = function () {
1052
+ var _a;
1053
+ return (__assign({ filterSearchParams: filterSearchParams, filterSelection: filterSelection, filterReference: filterReference, filterReferenceDate: (0, viewStatePersistence_1.serializeDateFilterState)(filterReferenceDate), flexFilters: flexFiltersDebounced.some(function (eachFilter) {
1054
+ return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure);
1055
+ })
1056
+ ? flexFiltersDebounced.filter(function (eachFilter) {
1057
+ return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure);
1058
+ })
1059
+ : undefined, sort: persistedSort !== null && persistedSort !== void 0 ? persistedSort : (_a = props.organise) === null || _a === void 0 ? void 0 : _a.sort,
1060
+ // INFO: scroll mode reloads from page 0; the anchor restores the position
1061
+ pageIndex: renderCheckScrollMode() ? 0 : pageIndex, hiddenColumnIds: structure.filter(function (col) { return col.hide; }).map(function (col) { return col.id; }),
1062
+ // INFO: raw, so switching bareViewSettings off does not wipe the user's choice
1063
+ userHiddenColumnIds: userHiddenColumnIds, columnOrder: structure.map(function (col) { return col.id; }) }, scrollCaptureRef.current));
1064
+ };
1065
+ handleRegisterViewSnapshot(handleBuildViewSnapshot);
1066
+ // INFO: called in the row click, while the list is still mounted and scrolled
1067
+ var handleCaptureListScroll = function (recordId) {
1068
+ var _a, _b;
1069
+ if (!isPersistEnabled)
1070
+ return;
1071
+ scrollCaptureRef.current = (0, viewStatePersistence_1.handleCaptureScrollPosition)(recordId, handleResolveScrollAxis(), handleResolveScrollScope());
1072
+ handleSaveView(handleBuildViewSnapshot());
1073
+ (0, viewStatePersistence_1.handleMarkLastDrill)((_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistViewState, props.collectionId, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistKey);
1074
+ };
1075
+ // INFO: a filter, sort or page change shows different rows, so the old position is dropped
1076
+ var scrollCaptureResetInitialised = (0, react_1.useRef)(false);
1077
+ (0, react_1.useEffect)(function () {
1078
+ if (!isPersistEnabled)
1079
+ return;
1080
+ if (!scrollCaptureResetInitialised.current) {
1081
+ scrollCaptureResetInitialised.current = true;
1082
+ return;
1083
+ }
1084
+ scrollCaptureRef.current = {};
1085
+ /* eslint-disable */
1086
+ }, [
1087
+ filterSearchParams,
1088
+ filterSelection,
1089
+ filterReference,
1090
+ filterReferenceDate,
1091
+ flexFiltersDebounced,
1092
+ pageIndex,
1093
+ persistedSort,
1094
+ ]);
1095
+ /* eslint-enable */
1027
1096
  // INFO: notify the consumer whenever the applied flex filters change, so a
1028
1097
  // parent can observe live filter state. Uses the debounced state so it fires
1029
1098
  // on committed changes, not every keystroke.
@@ -1035,7 +1104,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1035
1104
  // or column visibility change. Active for both "persistent" and "session" modes.
1036
1105
  var persistSaveInitialised = (0, react_1.useRef)(false);
1037
1106
  (0, react_1.useEffect)(function () {
1038
- var _a;
1039
1107
  if (!isPersistEnabled)
1040
1108
  return;
1041
1109
  // INFO: Skip the first invocation — deps have hydrated initial values from storage,
@@ -1044,26 +1112,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1044
1112
  persistSaveInitialised.current = true;
1045
1113
  return;
1046
1114
  }
1047
- var activeFlexFilters = flexFiltersDebounced.filter(function (eachFilter) {
1048
- return (0, flexFilter_1.isFlexFilterActive)(eachFilter, structure);
1049
- });
1050
- handleSaveView({
1051
- filterSearchParams: filterSearchParams,
1052
- filterSelection: filterSelection,
1053
- filterReference: filterReference,
1054
- filterReferenceDate: (0, viewStatePersistence_1.serializeDateFilterState)(filterReferenceDate),
1055
- flexFilters: activeFlexFilters.length ? activeFlexFilters : undefined,
1056
- sort: persistedSort !== null && persistedSort !== void 0 ? persistedSort : (_a = props.organise) === null || _a === void 0 ? void 0 : _a.sort,
1057
- // INFO: scroll mode always starts from page 0 on reload — persisting
1058
- // a mid-scroll pageIndex would skip rows on next hydration.
1059
- pageIndex: renderCheckScrollMode() ? 0 : pageIndex,
1060
- hiddenColumnIds: structure.filter(function (col) { return col.hide; }).map(function (col) { return col.id; }),
1061
- // INFO: stored raw rather than through getActiveUserHiddenColumnIds so a
1062
- // consumer temporarily switching bareViewSettings off does not wipe the
1063
- // user's saved choice.
1064
- userHiddenColumnIds: userHiddenColumnIds,
1065
- columnOrder: structure.map(function (col) { return col.id; }),
1066
- });
1115
+ handleSaveView(handleBuildViewSnapshot());
1116
+ /* eslint-disable */
1067
1117
  }, [
1068
1118
  filterSearchParams,
1069
1119
  filterSelection,
@@ -1075,6 +1125,51 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1075
1125
  persistedSort,
1076
1126
  userHiddenColumnIds,
1077
1127
  ]);
1128
+ /* eslint-enable */
1129
+ // INFO: re-arm on leaving the list, so each return from a record restores once
1130
+ (0, react_1.useEffect)(function () {
1131
+ if (props.type !== "list")
1132
+ scrollRestoredRef.current = false;
1133
+ }, [props.type]);
1134
+ // INFO: restore only on mount, and only for the list a record was last opened from —
1135
+ // not on a tab switch, and not for the other lists on the page
1136
+ (0, react_1.useEffect)(function () {
1137
+ var _a, _b, _c;
1138
+ var identity = "".concat(props.collectionId, "|").concat((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistKey) !== null && _b !== void 0 ? _b : "");
1139
+ var isSwitch = scrollIdentityRef.current !== null &&
1140
+ scrollIdentityRef.current !== identity;
1141
+ scrollIdentityRef.current = identity;
1142
+ scrollCaptureRef.current = {
1143
+ scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
1144
+ scrollOffset: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollOffset,
1145
+ };
1146
+ var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
1147
+ scrollRestoredRef.current = isSwitch || isOtherListReturn;
1148
+ /* eslint-disable */
1149
+ }, [props.collectionId, (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.persistKey]);
1150
+ /* eslint-enable */
1151
+ // INFO: wait a frame — rows land in state one tick before layout
1152
+ (0, react_1.useEffect)(function () {
1153
+ if (!isPersistEnabled)
1154
+ return;
1155
+ if (scrollRestoredRef.current)
1156
+ return;
1157
+ if (props.type !== "list")
1158
+ return;
1159
+ if (tableLoading || spaceTableData.length === 0)
1160
+ return;
1161
+ var frame = requestAnimationFrame(function () {
1162
+ if (scrollRestoredRef.current)
1163
+ return;
1164
+ // INFO: done even if nothing applied, so later data changes do not scroll
1165
+ scrollRestoredRef.current = true;
1166
+ // INFO: the ref, not persistedState — returning from a record often does not remount
1167
+ (0, viewStatePersistence_1.handleRestoreScrollPosition)(scrollCaptureRef.current, handleResolveScrollAxis(), handleResolveScrollScope());
1168
+ });
1169
+ return function () { return cancelAnimationFrame(frame); };
1170
+ /* eslint-disable */
1171
+ }, [isPersistEnabled, props.type, tableLoading, spaceTableData.length]);
1172
+ /* eslint-enable */
1078
1173
  (0, react_1.useEffect)(function () {
1079
1174
  handleCheckOfflineDataLength();
1080
1175
  /* eslint-disable */
@@ -1086,7 +1181,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1086
1181
  (0, react_1.useEffect)(function () {
1087
1182
  handleOfflinePrefetch();
1088
1183
  /* eslint-disable */
1089
- }, [props.collectionId, (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareOffline]);
1184
+ }, [props.collectionId, (_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.bareOffline]);
1090
1185
  /* eslint-enable */
1091
1186
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
1092
1187
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -1106,7 +1201,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1106
1201
  }, interval);
1107
1202
  return function () { return clearInterval(timer); };
1108
1203
  /* eslint-disable */
1109
- }, [(_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.barePollingInterval, isLive, isNetworkOffline]);
1204
+ }, [(_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.barePollingInterval, isLive, isNetworkOffline]);
1110
1205
  /* eslint-enable */
1111
1206
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
1112
1207
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -1148,7 +1243,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1148
1243
  };
1149
1244
  /* eslint-disable */
1150
1245
  }, [
1151
- (_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.bareSocketName,
1246
+ (_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareSocketName,
1152
1247
  props.collectionId,
1153
1248
  props.devSettings.sseEndpoint,
1154
1249
  props.devSettings.dbAPIToken,
@@ -1393,10 +1488,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1393
1488
  props.collectionId,
1394
1489
  props.model,
1395
1490
  props.localURLEndpoint,
1396
- (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.extendedTabs,
1397
- (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.viewId,
1398
- (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.additionalQuery,
1399
- (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.groupBy,
1491
+ (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.extendedTabs,
1492
+ (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.viewId,
1493
+ (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.additionalQuery,
1494
+ (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.groupBy,
1400
1495
  resolvedType,
1401
1496
  ]);
1402
1497
  /**
@@ -1493,7 +1588,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1493
1588
  changedAttributeIds.forEach(function (id) { return dirtyFieldsRef.current.add(id); });
1494
1589
  }
1495
1590
  }
1496
- props.bareSettings.bareUpdateHandleData(selectedData, changedAttributeIds);
1591
+ props.bareSettings.bareUpdateHandleData(selectedData, changedAttributeIds, handleResolveRawData());
1497
1592
  }
1498
1593
  previousSelectedData.current = selectedData;
1499
1594
  }, [selectedData]);
@@ -1537,7 +1632,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1537
1632
  };
1538
1633
  }, 100);
1539
1634
  return function () { return clearTimeout(timeoutId); };
1540
- }, [(_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.showReadFloatingNav, resolvedType, props.id, loading]);
1635
+ }, [(_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.showReadFloatingNav, resolvedType, props.id, loading]);
1541
1636
  (0, react_1.useEffect)(function () {
1542
1637
  if (resolvedType !== "read")
1543
1638
  return;
@@ -2792,6 +2887,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2792
2887
  handlePopUpModal(false);
2793
2888
  };
2794
2889
  //TODO: Bug - try to solve clicking List Object too fast
2890
+ // INFO: the stored document as loaded, only while it belongs to the current id —
2891
+ // a switch to another record keeps the previous doc until the new fetch lands
2892
+ var handleResolveRawData = function () {
2893
+ var _a;
2894
+ var raw = rawReadData.current;
2895
+ if (!props.id || props.id === "new" || !raw)
2896
+ return undefined;
2897
+ return String((_a = raw._id) !== null && _a !== void 0 ? _a : raw.id) === String(props.id) ? raw : undefined;
2898
+ };
2795
2899
  var handleSelectListObjectData = function (id, structureId, objectIndex) {
2796
2900
  var _a;
2797
2901
  var filterObjectModel = structure.find(function (eachModel) {
@@ -3704,7 +3808,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3704
3808
  if (deleteIds && deleteIds.length <= 0)
3705
3809
  deletable = false;
3706
3810
  if (!(deletable && ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateHandlePreComplete))) return [3 /*break*/, 3];
3707
- return [4 /*yield*/, props.bareSettings.bareUpdateHandlePreComplete({})];
3811
+ return [4 /*yield*/, props.bareSettings.bareUpdateHandlePreComplete({}, handleResolveRawData())];
3708
3812
  case 2:
3709
3813
  deletable = _k.sent();
3710
3814
  _k.label = 3;
@@ -3763,7 +3867,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3763
3867
  case 9:
3764
3868
  if (!res) return [3 /*break*/, 12];
3765
3869
  if (!((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareUpdateHandlePostComplete)) return [3 /*break*/, 11];
3766
- return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete({})];
3870
+ return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete({}, handleResolveRawData())];
3767
3871
  case 10:
3768
3872
  _k.sent();
3769
3873
  _k.label = 11;
@@ -4401,7 +4505,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4401
4505
  });
4402
4506
  uniqueColumnId = uniqueDataStructure.length > 0 ? uniqueDataStructure[0].id : undefined;
4403
4507
  if ((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdatePrefill) {
4404
- props.bareSettings.bareUpdatePrefill(selectedData).map(function (eachField) {
4508
+ props.bareSettings
4509
+ .bareUpdatePrefill(selectedData, handleResolveRawData())
4510
+ .map(function (eachField) {
4405
4511
  var key = eachField.key, value = eachField.value;
4406
4512
  createSelectedData_1[key] = value;
4407
4513
  return null;
@@ -4750,7 +4856,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4750
4856
  !offlineId &&
4751
4857
  (!isOffline || (isOfflineNetworkListener && !isNetworkOffline));
4752
4858
  if (!(wentToServer && ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareUpdateHandlePostComplete))) return [3 /*break*/, 37];
4753
- return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete(__assign((_e = {}, _e[serverId] = id, _e), createSelectedData_1))];
4859
+ return [4 /*yield*/, props.bareSettings.bareUpdateHandlePostComplete(__assign((_e = {}, _e[serverId] = id, _e), createSelectedData_1), handleResolveRawData())];
4754
4860
  case 36:
4755
4861
  _y.sent();
4756
4862
  _y.label = 37;
@@ -4914,16 +5020,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4914
5020
  setModalVisible(true);
4915
5021
  preComplete = true;
4916
5022
  if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateHandlePreComplete)) return [3 /*break*/, 3];
4917
- return [4 /*yield*/, props.bareSettings.bareUpdateHandlePreComplete(selectedData)];
5023
+ return [4 /*yield*/, props.bareSettings.bareUpdateHandlePreComplete(selectedData, handleResolveRawData())];
4918
5024
  case 2:
4919
- preComplete =
4920
- _m.sent();
5025
+ preComplete = _m.sent();
4921
5026
  _m.label = 3;
4922
5027
  case 3:
4923
5028
  if (!preComplete)
4924
5029
  throw "Error";
4925
5030
  if (!((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareUpdateHandleComplete)) return [3 /*break*/, 5];
4926
- return [4 /*yield*/, props.bareSettings.bareUpdateHandleComplete(selectedData)];
5031
+ return [4 /*yield*/, props.bareSettings.bareUpdateHandleComplete(selectedData, handleResolveRawData())];
4927
5032
  case 4:
4928
5033
  _m.sent();
4929
5034
  return [3 /*break*/, 7];
@@ -5679,7 +5784,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5679
5784
  excelFormData.append("data[spaceId]", props.collectionId);
5680
5785
  excelFormData.append("file", csvFile);
5681
5786
  if ((_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareCSVImportSettings) {
5682
- updateFields = (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdatePrefill) === null || _l === void 0 ? void 0 : _l.call(_k, selectedData);
5787
+ updateFields = (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdatePrefill) === null || _l === void 0 ? void 0 : _l.call(_k, selectedData, handleResolveRawData());
5683
5788
  excelFormData.append("prefillValue", JSON.stringify(updateFields));
5684
5789
  }
5685
5790
  return [4 /*yield*/, ((_m = props.lib) === null || _m === void 0 ? void 0 : _m.axios({
@@ -6257,9 +6362,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6257
6362
  };
6258
6363
  var handleDeleteModal = function () {
6259
6364
  if ((selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) !== "feeds") {
6260
- if (resolvedType === "read" &&
6261
- props.id &&
6262
- props.id !== "new") {
6365
+ if (resolvedType === "read" && props.id && props.id !== "new") {
6263
6366
  setDeleteModal(true);
6264
6367
  }
6265
6368
  else if (resolvedType === "update" && props.id) {
@@ -6710,7 +6813,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6710
6813
  if (((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdatePrefill) && type === "update") {
6711
6814
  var present_1 = false;
6712
6815
  props.bareSettings
6713
- .bareUpdatePrefill(selectedData)
6816
+ .bareUpdatePrefill(selectedData, handleResolveRawData())
6714
6817
  .map(function (eachField) {
6715
6818
  if (eachField.key === eachAttribute.id)
6716
6819
  present_1 = true;
@@ -6907,7 +7010,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6907
7010
  }
6908
7011
  });
6909
7012
  }); };
6910
- var bareActionComponent = (_e = (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareUpdateActionComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData, formRef)) !== null && _e !== void 0 ? _e : undefined;
7013
+ var bareActionComponent = (_e = (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareUpdateActionComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData, formRef, handleResolveRawData())) !== null && _e !== void 0 ? _e : undefined;
6911
7014
  var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6912
7015
  var hasActions = bareActionComponent ? hasCustomActions : true;
6913
7016
  var showDelete = canDeleteRecord && props.id !== "new";
@@ -6975,7 +7078,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6975
7078
  var _a, _b, _c, _d, _e;
6976
7079
  if (resolvedType !== "read")
6977
7080
  return null;
6978
- var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef)) !== null && _c !== void 0 ? _c : undefined;
7081
+ var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef, handleResolveRawData())) !== null && _c !== void 0 ? _c : undefined;
6979
7082
  var hasCustomActions = !!bareActionComponent && !handleIsEmptyElement(bareActionComponent);
6980
7083
  var showUpdate = !bareActionComponent && canUpdateRecord;
6981
7084
  var showExport = !!((_e = (_d = props.organise) === null || _d === void 0 ? void 0 : _d.exportSettings) === null || _e === void 0 ? void 0 : _e.enableExportReadPDF);
@@ -7013,7 +7116,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7013
7116
  // should not sit at the end of a "continue, continue" flow.
7014
7117
  var renderActionButtons = function (type, _hasTabAlign, _uniqueTabIds) {
7015
7118
  var _a, _b, _c, _d, _e, _f;
7016
- var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef)) !== null && _c !== void 0 ? _c : undefined;
7119
+ var bareActionComponent = (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData, formRef, handleResolveRawData())) !== null && _c !== void 0 ? _c : undefined;
7017
7120
  // INFO: every update form carries Save / Submit in the floating bar, so
7018
7121
  // the header keeps only Delete
7019
7122
  var isTabbedUpdate = type === "update";
@@ -7290,7 +7393,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7290
7393
  }
7291
7394
  if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdatePrefill) {
7292
7395
  props.bareSettings
7293
- .bareUpdatePrefill(selectedData)
7396
+ .bareUpdatePrefill(selectedData, handleResolveRawData())
7294
7397
  .map(function (eachField) {
7295
7398
  if (eachField.key === eachModel.id)
7296
7399
  present = true;
@@ -7474,7 +7577,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7474
7577
  } })),
7475
7578
  ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateComponentAbove) &&
7476
7579
  ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponent) &&
7477
- ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponent(selectedData)),
7580
+ ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponent(selectedData, handleResolveRawData())),
7478
7581
  ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateActionTop) &&
7479
7582
  renderStepBar(uniqueTabIds_2),
7480
7583
  react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
@@ -7505,7 +7608,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7505
7608
  // the grid, so a consumer's own col-span, a fragment of several cells,
7506
7609
  // or a null return all lay out exactly as before; only children with no
7507
7610
  // col-span of their own are given the full row.
7508
- react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData)))),
7611
+ react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
7509
7612
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
7510
7613
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
7511
7614
  !((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateActionTop) &&
@@ -7515,7 +7618,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7515
7618
  renderActionButtons(resolvedType, hasTabAlign_1, uniqueTabIds_2)))) : (react_1.default.createElement("div", null,
7516
7619
  ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponentAbove) &&
7517
7620
  ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareUpdateComponent) &&
7518
- ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponent(selectedData)),
7621
+ ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareUpdateComponent(selectedData, handleResolveRawData())),
7519
7622
  ((_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareUpdateActionTop) &&
7520
7623
  renderStepBar(uniqueTabIds_2),
7521
7624
  react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
@@ -7528,7 +7631,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7528
7631
  // the grid, so a consumer's own col-span, a fragment of several cells,
7529
7632
  // or a null return all lay out exactly as before; only children with no
7530
7633
  // col-span of their own are given the full row.
7531
- react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData)))),
7634
+ react_1.default.createElement("div", { className: "contents [&>*:not([class*=col-span])]:col-span-12" }, props.bareSettings.bareUpdateComponent(selectedData, handleResolveRawData())))),
7532
7635
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(resolvedType)),
7533
7636
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(resolvedType)),
7534
7637
  !((_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareUpdateActionTop) &&
@@ -7536,7 +7639,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7536
7639
  case "list":
7537
7640
  case "union":
7538
7641
  var filterComponent_1 = renderSearchContent();
7539
- var dataComponent = renderTabContent(tabs, resolvedType, viewType);
7642
+ var dataComponent = renderScopedTabContent(tabs, resolvedType, viewType);
7540
7643
  var actionComponent = renderActionButtons(resolvedType);
7541
7644
  // INFO: active flex filter count for the icon badge + floating search.
7542
7645
  // Counts query output so the badge matches what's actually filtered.
@@ -7787,7 +7890,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7787
7890
  renderListActionElements())),
7788
7891
  renderListNewRowFilterElements(),
7789
7892
  (schemaPresent || ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode })),
7790
- renderTabContent(tabs, resolvedType, viewType),
7893
+ renderScopedTabContent(tabs, resolvedType, viewType),
7791
7894
  ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareListMobileFloatingSearch) && (react_1.default.createElement("div", { className: "h-28 md:hidden", "aria-hidden": "true" })),
7792
7895
  ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareListMobileFloatingSearch) &&
7793
7896
  (0, listModule_1.renderFloatingMobileSearch)({
@@ -7868,7 +7971,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7868
7971
  renderObjectTags: renderObjectTags,
7869
7972
  setSelectedData: setSelectedData,
7870
7973
  flexTableRefs: flexTableRefs,
7871
- }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareOffline, (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdateColumnType) !== null && _l !== void 0 ? _l : "two", (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateIndividualComponent, (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateMobileView);
7974
+ }, { signing: signatureSigning, setSigning: setSignatureSigning }, props.onComplete ? true : false, (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareOffline, (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareUpdateColumnType) !== null && _l !== void 0 ? _l : "two", ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareUpdateIndividualComponent)
7975
+ ? function (columnId, ref, data, setData) {
7976
+ var _a, _b, _c;
7977
+ return (_c = (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateIndividualComponent) === null || _b === void 0 ? void 0 : _b.call(_a, columnId, ref, data, setData, handleResolveRawData())) !== null && _c !== void 0 ? _c : null;
7978
+ }
7979
+ : undefined, (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateMobileView);
7872
7980
  };
7873
7981
  var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName) {
7874
7982
  var gridData = [];
@@ -7891,7 +7999,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7891
7999
  !eachModel.disabled;
7892
8000
  });
7893
8001
  spaceTableData.forEach(function (eachData, index) {
7894
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
8002
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7895
8003
  var clonedEachData = JSON.parse(JSON.stringify(eachData));
7896
8004
  var allValues = Object.values(clonedEachData);
7897
8005
  var title = "";
@@ -7977,9 +8085,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7977
8085
  }
7978
8086
  return null;
7979
8087
  });
7980
- if (booleanModels.length &&
7981
- isKanban &&
7982
- isListEditable) {
8088
+ if (booleanModels.length && isKanban && isListEditable) {
7983
8089
  booleanModels.map(function (eachModel) {
7984
8090
  return listDescArray.push(react_1.default.createElement("div", { className: "flex space-x-1 items-center", key: "kanban-checkbox-".concat(eachModel.id) },
7985
8091
  react_1.default.createElement("p", null,
@@ -8012,12 +8118,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8012
8118
  if (type === "grid" || type === "kanban") {
8013
8119
  if (kanbanGroupId)
8014
8120
  data[kanbanGroupId] = selectedTData[kanbanGroupId];
8015
- if ((_c = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListGridComponent) === null || _c === void 0 ? void 0 : _c.call(_b, eachData)) {
8016
- data[type === "grid" ? "extra" : "action"] =
8017
- (_e = (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListGridComponent) === null || _e === void 0 ? void 0 : _e.call(_d, eachData);
8018
- }
8019
- if ((_g = (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListGridTags) === null || _g === void 0 ? void 0 : _g.call(_f, eachData)) {
8020
- var eachDataTags = (_j = (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridTags) === null || _j === void 0 ? void 0 : _j.call(_h, eachData);
8121
+ var gridComponent = (_c = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListGridComponent) === null || _c === void 0 ? void 0 : _c.call(_b, eachData, selectedTData);
8122
+ if (gridComponent)
8123
+ data[type === "grid" ? "extra" : "action"] = gridComponent;
8124
+ var eachDataTags = (_e = (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListGridTags) === null || _e === void 0 ? void 0 : _e.call(_d, eachData, selectedTData);
8125
+ if (eachDataTags) {
8021
8126
  if (Array.isArray(eachDataTags)) {
8022
8127
  var gridTagList_1 = [];
8023
8128
  eachDataTags.forEach(function (eachTag) {
@@ -8029,14 +8134,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8029
8134
  data["tags"] = gridTagList_1;
8030
8135
  }
8031
8136
  }
8032
- if ((_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListGridRibbonText) === null || _l === void 0 ? void 0 : _l.call(_k, eachData)) {
8033
- data["ribbonText"] =
8034
- props.bareSettings.bareListGridRibbonText(eachData);
8035
- }
8137
+ var ribbonText = (_g = (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListGridRibbonText) === null || _g === void 0 ? void 0 : _g.call(_f, eachData, selectedTData);
8138
+ if (ribbonText)
8139
+ data["ribbonText"] = ribbonText;
8036
8140
  var eachDataGridImage = "";
8037
- var gridFallbackImg = (_o = (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListGridFallbackImg) === null || _o === void 0 ? void 0 : _o.call(_m, eachData);
8141
+ var gridFallbackImg = (_j = (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridFallbackImg) === null || _j === void 0 ? void 0 : _j.call(_h, eachData, selectedTData);
8038
8142
  if (clonedEachData[imageTag] && clonedEachData[imageTag] !== " - ") {
8039
- eachDataGridImage = (_q = (_p = clonedEachData[imageTag]) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.src;
8143
+ eachDataGridImage = (_l = (_k = clonedEachData[imageTag]) === null || _k === void 0 ? void 0 : _k.props) === null || _l === void 0 ? void 0 : _l.src;
8040
8144
  }
8041
8145
  else if (gridFallbackImg) {
8042
8146
  if (typeof gridFallbackImg === "string") {
@@ -8051,7 +8155,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8051
8155
  }
8052
8156
  else {
8053
8157
  data["img"] = clonedEachData[imageTag]
8054
- ? (_s = (_r = clonedEachData[imageTag]) === null || _r === void 0 ? void 0 : _r.props) === null || _s === void 0 ? void 0 : _s.src
8158
+ ? (_o = (_m = clonedEachData[imageTag]) === null || _m === void 0 ? void 0 : _m.props) === null || _o === void 0 ? void 0 : _o.src
8055
8159
  : "";
8056
8160
  }
8057
8161
  gridData.push(data);
@@ -8327,6 +8431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8327
8431
  } }));
8328
8432
  }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), onClickRow: function (id) {
8329
8433
  var _a, _b;
8434
+ handleCaptureListScroll(id);
8330
8435
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8331
8436
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_k = (_j = props.newTabUrl) === null || _j === void 0 ? void 0 : _j.default) !== null && _k !== void 0 ? _k : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_m = (_l = props.newTabUrl) === null || _l === void 0 ? void 0 : _l.addons) !== null && _m !== void 0 ? _m : "&type=read&collection=".concat(props.collectionId, "&view=general"), className: "mt-5", lib: { axios: (_o = props.lib) === null || _o === void 0 ? void 0 : _o.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.fixedPagination, advSettings: {
8332
8437
  addColumnEnabled: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.addColumnEnabled,
@@ -8446,6 +8551,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8446
8551
  }); })
8447
8552
  : []), true), multiActionFloatingOffset: (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
8448
8553
  var _a, _b;
8554
+ handleCaptureListScroll(id);
8449
8555
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8450
8556
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_o = (_m = props.newTabUrl) === null || _m === void 0 ? void 0 : _m.default) !== null && _o !== void 0 ? _o : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_q = (_p = props.newTabUrl) === null || _p === void 0 ? void 0 : _p.addons) !== null && _q !== void 0 ? _q : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8451
8557
  handlePagination(value);
@@ -8559,6 +8665,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8559
8665
  } }));
8560
8666
  }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
8561
8667
  var _a, _b;
8668
+ handleCaptureListScroll(id);
8562
8669
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8563
8670
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_15 = (_14 = props.newTabUrl) === null || _14 === void 0 ? void 0 : _14.default) !== null && _15 !== void 0 ? _15 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.addons) !== null && _17 !== void 0 ? _17 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8564
8671
  handlePagination(value);
@@ -8628,8 +8735,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8628
8735
  }, darkMode: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.darkMode, hidePagination: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.disableEllipsisOnLongWord }));
8629
8736
  }
8630
8737
  };
8738
+ // INFO: `hidden` keeps the markers out of space-y spacing
8739
+ var renderScopedTabContent = function (tabs, dataType, requestedViewType) { return (react_1.default.createElement(react_1.default.Fragment, null,
8740
+ react_1.default.createElement("span", { ref: scrollScopeStartRef, hidden: true, "aria-hidden": "true" }),
8741
+ renderTabContent(tabs, dataType, requestedViewType),
8742
+ react_1.default.createElement("span", { ref: scrollScopeEndRef, hidden: true, "aria-hidden": "true" }))); };
8631
8743
  var renderTabContent = function (tabs, dataType, requestedViewType) {
8632
- 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;
8744
+ 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;
8633
8745
  var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
8634
8746
  /**
8635
8747
  * INFO: a list tab must not supply the content of a read view. The selected
@@ -8836,6 +8948,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8836
8948
  setBatchUpdateModal(true);
8837
8949
  } }))), onClickRow: function (id) {
8838
8950
  var _a, _b;
8951
+ handleCaptureListScroll(id);
8839
8952
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8840
8953
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_z = (_y = props.newTabUrl) === null || _y === void 0 ? void 0 : _y.default) !== null && _z !== void 0 ? _z : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_1 = (_0 = props.newTabUrl) === null || _0 === void 0 ? void 0 : _0.addons) !== null && _1 !== void 0 ? _1 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8841
8954
  handlePagination(value);
@@ -8858,6 +8971,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8858
8971
  setBatchUpdateModal(true);
8859
8972
  } }))), onClickRow: function (id) {
8860
8973
  var _a, _b;
8974
+ handleCaptureListScroll(id);
8861
8975
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8862
8976
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_9 = (_8 = props.newTabUrl) === null || _8 === void 0 ? void 0 : _8.default) !== null && _9 !== void 0 ? _9 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_11 = (_10 = props.newTabUrl) === null || _10 === void 0 ? void 0 : _10.addons) !== null && _11 !== void 0 ? _11 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8863
8977
  handlePagination(value);
@@ -8956,22 +9070,26 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8956
9070
  }
8957
9071
  else if (selectedTabData.viewType === "grid") {
8958
9072
  var isScrollMode = renderCheckScrollMode();
8959
- return (react_1.default.createElement(react_1.default.Fragment, null,
8960
- react_1.default.createElement(grid_1.Grid, { darkMode: (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.darkMode, darkModeBg: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
9073
+ // INFO: when bareNewDTW is enabled, render NewGrid instead of legacy Grid
9074
+ if ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareNewDTW) {
9075
+ return (react_1.default.createElement(newGrid_1.NewGrid, { darkMode: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.darkMode, darkModeBg: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8961
9076
  var _a, _b;
9077
+ // INFO: before handleNavigate, which unmounts the grid
9078
+ handleCaptureListScroll(id);
8962
9079
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8963
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_21 = (_20 = props.newTabUrl) === null || _20 === void 0 ? void 0 : _20.default) !== null && _21 !== void 0 ? _21 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_23 = (_22 = props.newTabUrl) === null || _22 === void 0 ? void 0 : _22.addons) !== null && _23 !== void 0 ? _23 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
9080
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_22 = (_21 = props.newTabUrl) === null || _21 === void 0 ? void 0 : _21.default) !== null && _22 !== void 0 ? _22 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_24 = (_23 = props.newTabUrl) === null || _23 === void 0 ? void 0 : _23.addons) !== null && _24 !== void 0 ? _24 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8964
9081
  handlePagination(value);
8965
- }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareListGridColClassName, className: "mt-5",
8966
- // INFO: under the new DTW the grid keeps the same footer as the
8967
- // table and list views instead of its own legacy page buttons
8968
- hidePagination: ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.hidePagination) ||
8969
- !!((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareNewDTW), customPaginationSize: customPaginationSize }),
8970
- ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareNewDTW) &&
8971
- !((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
8972
- .length, customPaginationSize: customPaginationSize, darkMode: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.darkMode, darkModeBg: (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.darkModeBg, handleUpdatePageIndex: function (value) {
9082
+ }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareListGridColClassName, className: "mt-5", hidePagination: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.hidePagination, customPaginationSize: customPaginationSize }));
9083
+ }
9084
+ return (react_1.default.createElement(react_1.default.Fragment, null,
9085
+ react_1.default.createElement(grid_1.Grid, { darkMode: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.darkMode, darkModeBg: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
9086
+ var _a, _b;
9087
+ // INFO: before handleNavigate, which unmounts the grid
9088
+ handleCaptureListScroll(id);
9089
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9090
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_30 = (_29 = props.newTabUrl) === null || _29 === void 0 ? void 0 : _29.default) !== null && _30 !== void 0 ? _30 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_32 = (_31 = props.newTabUrl) === null || _31 === void 0 ? void 0 : _31.addons) !== null && _32 !== void 0 ? _32 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8973
9091
  handlePagination(value);
8974
- } }))));
9092
+ }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareListGridColClassName, className: "mt-5", hidePagination: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.hidePagination, customPaginationSize: customPaginationSize })));
8975
9093
  }
8976
9094
  else if (selectedTabData.viewType === "calendar") {
8977
9095
  var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
@@ -9071,7 +9189,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9071
9189
  return eventAvailabilities;
9072
9190
  };
9073
9191
  // INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
9074
- if ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareNewDTW) {
9192
+ if ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareNewDTW) {
9075
9193
  var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
9076
9194
  var _a, _b, _c, _d;
9077
9195
  return ({
@@ -9091,13 +9209,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9091
9209
  // INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
9092
9210
  // query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
9093
9211
  // agenda lists the fetched month chronologically.
9094
- var viewSwitchOptions = (_32 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _32 !== void 0 ? _32 : [];
9212
+ var viewSwitchOptions = (_36 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _36 !== void 0 ? _36 : [];
9095
9213
  var VIEW_VARIANT_MAP = {
9096
9214
  month: "fullMonth",
9097
9215
  week: "weekTimeGrid",
9098
9216
  agenda: "agenda",
9099
9217
  };
9100
- var activeVariant = (_33 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _33 !== void 0 ? _33 : "fullMonth";
9218
+ var activeVariant = (_37 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _37 !== void 0 ? _37 : "fullMonth";
9101
9219
  return (react_1.default.createElement("div", { className: "mt-4" },
9102
9220
  viewSwitchOptions.length > 1 && (react_1.default.createElement("div", { className: "mb-2 flex justify-end" },
9103
9221
  react_1.default.createElement("div", { className: "inline-flex rounded-lg border border-gray-200 bg-white p-0.5" }, viewSwitchOptions.map(function (view) { return (react_1.default.createElement("button", { key: view, type: "button", onClick: function () {
@@ -9139,9 +9257,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9139
9257
  var _a, _b;
9140
9258
  if (event.id)
9141
9259
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", event.id, "general");
9142
- }, darkMode: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.darkMode, className: "w-full" }))));
9260
+ }, darkMode: (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.darkMode, className: "w-full" }))));
9143
9261
  }
9144
- return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_35 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _35 !== void 0 ? _35 : calendarView, handleMonthChange: function (date) {
9262
+ return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_39 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _39 !== void 0 ? _39 : calendarView, handleMonthChange: function (date) {
9145
9263
  var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
9146
9264
  var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
9147
9265
  if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
@@ -9159,7 +9277,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9159
9277
  else if (selectedTabData.viewType === "feeds") {
9160
9278
  var contentList_1 = [];
9161
9279
  var feedsSettings_1 = selectedTabData.feedsSettings;
9162
- var customFeedsData = (_36 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _36 === void 0 ? void 0 : _36.call(feedsSettings_1, tableData, spaceTableData);
9280
+ var customFeedsData = (_40 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _40 === void 0 ? void 0 : _40.call(feedsSettings_1, tableData, spaceTableData);
9163
9281
  if (customFeedsData && customFeedsData.length > 0) {
9164
9282
  customFeedsData.map(function (eachData) {
9165
9283
  var _a, _b, _c, _d;
@@ -9204,21 +9322,25 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9204
9322
  return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
9205
9323
  // INFO: NewFeeds is already a card like the table and list, so the new
9206
9324
  // DTW renders it bare; the legacy feed still needs its own surface
9207
- className: ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareNewDTW)
9325
+ className: ((_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.bareNewDTW)
9208
9326
  ? ""
9209
- : "p-4 rounded-lg ".concat(((_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.darkMode) ? "bg-white/5" : "bg-white") },
9210
- ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.darkMode, onClickItem: function (id) { 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, "read", id, "general"); } })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode })),
9327
+ : "p-4 rounded-lg ".concat(((_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.darkMode) ? "bg-white/5" : "bg-white") },
9328
+ ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode, onClickItem: function (id) {
9329
+ var _a, _b;
9330
+ handleCaptureListScroll(id);
9331
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9332
+ } })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode })),
9211
9333
  react_1.default.createElement("div", { className: "my-10" }),
9212
9334
  contentList_1.length > 0 &&
9213
- !((_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.hidePagination) &&
9214
- ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode, darkModeBg: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkModeBg, handleUpdatePageIndex: function (value) {
9335
+ !((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.hidePagination) &&
9336
+ ((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode, darkModeBg: (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.darkModeBg, handleUpdatePageIndex: function (value) {
9215
9337
  handlePagination(value);
9216
9338
  } })),
9217
9339
  contentList_1.length > 0 &&
9218
- !((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.hidePagination) &&
9219
- !((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
9340
+ !((_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.hidePagination) &&
9341
+ !((_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
9220
9342
  handlePagination(value);
9221
- }, darkMode: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode, customPaginationSize: customPaginationSize }))))));
9343
+ }, darkMode: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkMode, customPaginationSize: customPaginationSize }))))));
9222
9344
  }
9223
9345
  else if (selectedTabData.viewType === "map") {
9224
9346
  var mapSettings_1 = selectedTabData.mapSettings;
@@ -9321,7 +9443,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9321
9443
  }
9322
9444
  else if (selectedTabData.viewType === "kanban") {
9323
9445
  var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
9324
- var kanbanTitle_2 = (_49 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _49 !== void 0 ? _49 : "";
9446
+ var kanbanTitle_2 = (_53 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _53 !== void 0 ? _53 : "";
9325
9447
  var nullColumn_1 = false;
9326
9448
  var groupBy_1 = [];
9327
9449
  var groupLabel_1 = [];
@@ -9342,10 +9464,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9342
9464
  });
9343
9465
  var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
9344
9466
  // INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
9345
- if ((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) {
9467
+ if ((_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareNewDTW) {
9346
9468
  return (react_1.default.createElement(newKanban_1.NewKanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
9347
9469
  ? "Data has exceeded limit, please apply filters"
9348
- : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareListMobileView, onUpdateData: canUpdateRecord
9470
+ : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.bareListMobileView, onUpdateData: canUpdateRecord
9349
9471
  ? function (cardId, _fromCol, toCol) { return __awaiter(void 0, void 0, void 0, function () {
9350
9472
  var _a;
9351
9473
  return __generator(this, function (_b) {
@@ -9355,7 +9477,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9355
9477
  _b.label = 1;
9356
9478
  case 1:
9357
9479
  _b.trys.push([1, , 3, 4]);
9358
- return [4 /*yield*/, handleSubmitData("update", cardId, kanbanTitle_2, (_a = {}, _a[kanbanTitle_2] = toCol, _a))];
9480
+ return [4 /*yield*/, handleSubmitData("update", cardId, kanbanTitle_2, (_a = {},
9481
+ _a[kanbanTitle_2] = toCol,
9482
+ _a))];
9359
9483
  case 2:
9360
9484
  _b.sent();
9361
9485
  return [3 /*break*/, 4];
@@ -9368,8 +9492,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9368
9492
  }); }
9369
9493
  : undefined, onClickData: function (id) {
9370
9494
  var _a, _b;
9495
+ handleCaptureListScroll(id);
9371
9496
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9372
- }, darkMode: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkMode }));
9497
+ }, darkMode: (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.darkMode, darkModeBg: (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.darkModeBg }));
9373
9498
  }
9374
9499
  return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
9375
9500
  ? "Data has exceeded limit, please apply filters"
@@ -9398,6 +9523,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9398
9523
  }); }
9399
9524
  : undefined, onClickData: function (id) {
9400
9525
  var _a, _b;
9526
+ handleCaptureListScroll(id);
9401
9527
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9402
9528
  } }));
9403
9529
  }
@@ -9436,7 +9562,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9436
9562
  return null;
9437
9563
  };
9438
9564
  var renderModalContent = function () {
9439
- 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;
9565
+ 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;
9440
9566
  if (loading) {
9441
9567
  return (react_1.default.createElement("div", { className: "mt-5" },
9442
9568
  react_1.default.createElement(loading_1.Loading, null),
@@ -9668,10 +9794,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9668
9794
  : selectedObjectId
9669
9795
  ? "update"
9670
9796
  : "new";
9671
- (_0 = (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListObjectHandleData) === null || _0 === void 0 ? void 0 : _0.call(_z, listObjectViewType, selectedObjectData);
9797
+ (_0 = (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListObjectHandleData) === null || _0 === void 0 ? void 0 : _0.call(_z, listObjectViewType, selectedObjectData, selectedObjectId
9798
+ ? (_3 = (_2 = (_1 = handleResolveRawData()) === null || _1 === void 0 ? void 0 : _1[selectedObjectStructureId]) === null || _2 === void 0 ? void 0 : _2.find) === null || _3 === void 0 ? void 0 : _3.call(_2, function (eachRow) { return (eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) === selectedObjectId; })
9799
+ : undefined);
9672
9800
  }
9673
9801
  return (react_1.default.createElement(react_1.default.Fragment, null,
9674
- react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_1 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _1 !== void 0 ? _1 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
9802
+ react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_4 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _4 !== void 0 ? _4 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
9675
9803
  ? selectedData
9676
9804
  : undefined)),
9677
9805
  react_1.default.createElement("div", { className: "flex justify-end pt-8" },
@@ -9879,7 +10007,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9879
10007
  };
9880
10008
  return (react_1.default.createElement(react_1.default.Fragment, null,
9881
10009
  renderNotification("root"),
9882
- ((_63 = (_62 = props.renderSettings) === null || _62 === void 0 ? void 0 : _62.renderLoadingUI) === null || _63 === void 0 ? void 0 : _63.call(_62)) && loading ? ((_64 = props.renderSettings) === null || _64 === void 0 ? void 0 : _64.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.darkMode, darkModeBg: (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
10010
+ ((_64 = (_63 = props.renderSettings) === null || _63 === void 0 ? void 0 : _63.renderLoadingUI) === null || _64 === void 0 ? void 0 : _64.call(_63)) && loading ? ((_65 = props.renderSettings) === null || _65 === void 0 ? void 0 : _65.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.darkMode, darkModeBg: (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9883
10011
  var _a, _b;
9884
10012
  if (loading)
9885
10013
  return;
@@ -9890,7 +10018,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9890
10018
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9891
10019
  }
9892
10020
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9893
- react_1.default.createElement(modal_1.Modal, { darkMode: (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.darkMode, darkModeBg: (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
10021
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.darkMode, darkModeBg: (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9894
10022
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9895
10023
  if (dataId) {
9896
10024
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9906,19 +10034,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9906
10034
  }, onClose: function () {
9907
10035
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9908
10036
  } }),
9909
- react_1.default.createElement(modal_1.Modal, { darkMode: (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.darkMode, darkModeBg: (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
10037
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.darkMode, darkModeBg: (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9910
10038
  setReferenceDeleteTableData({});
9911
10039
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9912
- react_1.default.createElement(modal_1.Modal, { darkMode: (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.darkMode, darkModeBg: (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
10040
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.darkMode, darkModeBg: (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9913
10041
  setDeletePasscodeInput("");
9914
10042
  setDeleteModal(!deleteModal);
9915
10043
  setDeleteFeedId("");
9916
10044
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9917
- react_1.default.createElement(modal_1.Modal, { darkMode: (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.darkMode, darkModeBg: (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
10045
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.darkMode, darkModeBg: (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9918
10046
  setBatchUpdateData({ columnId: "", columnData: {} });
9919
10047
  setBatchUpdateModal(false);
9920
10048
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9921
- react_1.default.createElement(modal_1.Modal, { darkMode: (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.darkMode, darkModeBg: (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
10049
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.darkMode, darkModeBg: (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9922
10050
  var _a;
9923
10051
  if (props.space)
9924
10052
  return (react_1.default.createElement(authModal_1.AuthModal, { space: props.space, userId: (_a = props.id) !== null && _a !== void 0 ? _a : "", type: selectedAuthMethod, authMethods: authMethods, onComplete: handleAuthComplete }));
@@ -9926,7 +10054,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9926
10054
  }, onClose: function () {
9927
10055
  setSelectedAuthMethod("");
9928
10056
  } }),
9929
- isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.darkMode, darkModeBg: (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
10057
+ isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.darkMode, darkModeBg: (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9930
10058
  var _a, _b;
9931
10059
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9932
10060
  ? props.title