blixify-ui-web 1.2.91 → 1.2.92

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 (40) hide show
  1. package/lib/components/data/dataTemplate/dataStateModel.d.ts +2 -0
  2. package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
  3. package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
  4. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  5. package/lib/components/data/dataTemplate/index.js +299 -197
  6. package/lib/components/data/dataTemplate/index.js.map +1 -1
  7. package/lib/components/data/dataTemplate/settingsModal.d.ts +8 -1
  8. package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
  9. package/lib/components/data/dataTemplate/settingsModal.js +41 -3
  10. package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
  11. package/lib/components/data/dataTemplate/spaceModel.d.ts +23 -1
  12. package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
  13. package/lib/components/data/listModule.d.ts.map +1 -1
  14. package/lib/components/data/listModule.js +13 -0
  15. package/lib/components/data/listModule.js.map +1 -1
  16. package/lib/components/data/readQuery/index.d.ts +12 -0
  17. package/lib/components/data/readQuery/index.d.ts.map +1 -1
  18. package/lib/components/data/readQuery/index.js +2 -0
  19. package/lib/components/data/readQuery/index.js.map +1 -1
  20. package/lib/components/data/readQueryHoc/index.d.ts.map +1 -1
  21. package/lib/components/data/readQueryHoc/index.js +7 -0
  22. package/lib/components/data/readQueryHoc/index.js.map +1 -1
  23. package/lib/components/display/filePreview/index.d.ts +54 -0
  24. package/lib/components/display/filePreview/index.d.ts.map +1 -0
  25. package/lib/components/display/filePreview/index.js +120 -0
  26. package/lib/components/display/filePreview/index.js.map +1 -0
  27. package/lib/components/index.d.ts +2 -0
  28. package/lib/components/index.d.ts.map +1 -1
  29. package/lib/components/index.js +7 -2
  30. package/lib/components/index.js.map +1 -1
  31. package/lib/components/input/markdown/index.d.ts +9 -0
  32. package/lib/components/input/markdown/index.d.ts.map +1 -1
  33. package/lib/components/input/markdown/index.js +198 -3
  34. package/lib/components/input/markdown/index.js.map +1 -1
  35. package/lib/components/navigation/tabs/index.d.ts +2 -0
  36. package/lib/components/navigation/tabs/index.d.ts.map +1 -1
  37. package/lib/components/navigation/tabs/index.js +11 -2
  38. package/lib/components/navigation/tabs/index.js.map +1 -1
  39. package/lib/tail.css +1 -1
  40. package/package.json +1 -1
@@ -92,6 +92,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
92
92
  exports.DataTemplate = void 0;
93
93
  var outline_1 = require("@heroicons/react/24/outline");
94
94
  var HeroIcons = __importStar(require("@heroicons/react/24/solid"));
95
+ // INFO: the outline bookmark, for a tab that is not the default one. HeroIcons
96
+ // above is the solid set.
97
+ var BookmarkIcon_1 = __importDefault(require("@heroicons/react/24/outline/BookmarkIcon"));
95
98
  var solid_1 = require("@heroicons/react/24/solid");
96
99
  var html2canvas_1 = __importDefault(require("html2canvas"));
97
100
  var jspdf_1 = __importDefault(require("jspdf"));
@@ -132,6 +135,7 @@ var textInput_1 = require("../../input/textInput");
132
135
  var uploadInput_1 = require("../../input/uploadInput");
133
136
  var bars_1 = require("../../navigation/bars");
134
137
  var breadcrumb_1 = require("../../navigation/breadcrumb");
138
+ var filePreview_1 = require("../../display/filePreview");
135
139
  var tabs_1 = require("../../navigation/tabs");
136
140
  var link_1 = require("../../structure/link");
137
141
  var authModule_1 = require("../authModule");
@@ -194,10 +198,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
194
198
  // Every read of the view type below uses resolvedType. The distinction matters
195
199
  // most in effect dependency arrays — following props.type there would leave
196
200
  // the list never refetching while the panel is open, which fails silently.
197
- 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;
201
+ 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;
198
202
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
199
203
  // routed straight back into it — so expand-to-full-page is local state.
200
- var _72 = (0, react_1.useState)(false), drawerPageView = _72[0], setDrawerPageView = _72[1];
204
+ var _79 = (0, react_1.useState)(false), drawerPageView = _79[0], setDrawerPageView = _79[1];
201
205
  // INFO: the panel keeps rendering the record it was opened with rather than
202
206
  // live props. Without this, navigating back to the list would re-render the
203
207
  // still-mounted panel as a second list behind the overlay.
@@ -279,16 +283,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
279
283
  initialFilterReferenceDate: initialFilterReferenceDate,
280
284
  };
281
285
  };
282
- var _73 = intialiseDefaultFilterValues(), initialFilterSearch = _73.initialFilterSearch, initialFilterSearchParams = _73.initialFilterSearchParams, initialFilterSelection = _73.initialFilterSelection, initialFilterReference = _73.initialFilterReference, initialFilterReferenceDate = _73.initialFilterReferenceDate;
286
+ var _80 = intialiseDefaultFilterValues(), initialFilterSearch = _80.initialFilterSearch, initialFilterSearchParams = _80.initialFilterSearchParams, initialFilterSelection = _80.initialFilterSelection, initialFilterReference = _80.initialFilterReference, initialFilterReferenceDate = _80.initialFilterReferenceDate;
283
287
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
284
- var _74 = (0, viewStatePersistence_1.usePersistedViewState)({
288
+ var _81 = (0, viewStatePersistence_1.usePersistedViewState)({
285
289
  mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
286
290
  collectionId: props.collectionId,
287
291
  persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
288
292
  type: resolvedType,
289
- }), persistedState = _74.persistedState, isPersistEnabled = _74.isEnabled, handleSaveView = _74.handleSaveView;
290
- var _75 = (0, react_1.useState)(false), loading = _75[0], setLoading = _75[1];
291
- var _76 = (0, react_1.useState)(), notification = _76[0], setNotification = _76[1];
293
+ }), persistedState = _81.persistedState, isPersistEnabled = _81.isEnabled, handleSaveView = _81.handleSaveView;
294
+ var _82 = (0, react_1.useState)(false), loading = _82[0], setLoading = _82[1];
295
+ var _83 = (0, react_1.useState)(), notification = _83[0], setNotification = _83[1];
292
296
  // INFO: a success toast is confirmation, not a decision — it clears itself so
293
297
  // it never sits on the floating step bar; errors stay until dismissed
294
298
  (0, react_1.useEffect)(function () {
@@ -298,53 +302,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
298
302
  return function () { return clearTimeout(timer); };
299
303
  }, [notification]);
300
304
  //INFO : Used by List
301
- var _77 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _77[0], setFilterSearch = _77[1];
302
- var _78 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _78[0], setFilterSearchParams = _78[1];
303
- var _79 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _79[0], setFilterSelection = _79[1];
304
- var _80 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _80[0], setFilterReference = _80[1];
305
- var _81 = (0, react_1.useState)({}), filterReferenceSearch = _81[0], setFilterReferenceSearch = _81[1];
306
- var _82 = (0, react_1.useState)({}), filterReferenceList = _82[0], setFilterReferenceList = _82[1];
307
- var _83 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
305
+ 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];
306
+ 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];
307
+ 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];
308
+ 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];
309
+ var _88 = (0, react_1.useState)({}), filterReferenceSearch = _88[0], setFilterReferenceSearch = _88[1];
310
+ var _89 = (0, react_1.useState)({}), filterReferenceList = _89[0], setFilterReferenceList = _89[1];
311
+ var _90 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
308
312
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
309
- : initialFilterReferenceDate), filterReferenceDate = _83[0], setFilterReferenceDate = _83[1];
310
- var _84 = (0, react_1.useState)(true), tableLoading = _84[0], setTableLoading = _84[1];
311
- var _85 = (0, react_1.useState)(""), cursor = _85[0], setCursor = _85[1];
312
- var _86 = (0, react_1.useState)(""), lastCursor = _86[0], setLastCursor = _86[1];
313
- var _87 = (0, react_1.useState)([]), tableData = _87[0], setTableData = _87[1];
314
- var _88 = (0, react_1.useState)([]), spaceTableData = _88[0], setSpaceTableData = _88[1];
315
- var _89 = (0, react_1.useState)(0), size = _89[0], setSize = _89[1];
316
- var _90 = (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 = _90[0], setPageIndex = _90[1];
317
- var _91 = (0, react_1.useState)([]), selectedIds = _91[0], setSelectedIds = _91[1];
318
- var _92 = (0, react_1.useState)(false), selectAll = _92[0], setSelectAll = _92[1];
319
- var _93 = (0, react_1.useState)(""), deletePasscode = _93[0], setDeletePasscode = _93[1];
320
- var _94 = (0, react_1.useState)(""), deletePasscodeInput = _94[0], setDeletePasscodeInput = _94[1];
321
- var _95 = (0, react_1.useState)(""), deleteFeedId = _95[0], setDeleteFeedId = _95[1];
313
+ : initialFilterReferenceDate), filterReferenceDate = _90[0], setFilterReferenceDate = _90[1];
314
+ var _91 = (0, react_1.useState)(true), tableLoading = _91[0], setTableLoading = _91[1];
315
+ var _92 = (0, react_1.useState)(""), cursor = _92[0], setCursor = _92[1];
316
+ var _93 = (0, react_1.useState)(""), lastCursor = _93[0], setLastCursor = _93[1];
317
+ var _94 = (0, react_1.useState)([]), tableData = _94[0], setTableData = _94[1];
318
+ var _95 = (0, react_1.useState)([]), spaceTableData = _95[0], setSpaceTableData = _95[1];
319
+ var _96 = (0, react_1.useState)(0), size = _96[0], setSize = _96[1];
320
+ 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];
321
+ var _98 = (0, react_1.useState)([]), selectedIds = _98[0], setSelectedIds = _98[1];
322
+ var _99 = (0, react_1.useState)(false), selectAll = _99[0], setSelectAll = _99[1];
323
+ var _100 = (0, react_1.useState)(""), deletePasscode = _100[0], setDeletePasscode = _100[1];
324
+ var _101 = (0, react_1.useState)(""), deletePasscodeInput = _101[0], setDeletePasscodeInput = _101[1];
325
+ var _102 = (0, react_1.useState)(""), deleteFeedId = _102[0], setDeleteFeedId = _102[1];
322
326
  //INFO : Used by List Organise
323
327
  // INFO: Internal sort state that overrides props.organise?.sort when
324
328
  // persistViewState is enabled and a persisted sort exists
325
- var _96 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _96[0], setPersistedSort = _96[1];
326
- var _97 = (0, react_1.useState)(false), filterDraft = _97[0], setFilterDraft = _97[1];
327
- var _98 = (0, react_1.useState)(false), addTabModal = _98[0], setAddTabModal = _98[1];
329
+ 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];
330
+ var _104 = (0, react_1.useState)(false), filterDraft = _104[0], setFilterDraft = _104[1];
331
+ var _105 = (0, react_1.useState)(false), addTabModal = _105[0], setAddTabModal = _105[1];
328
332
  //INFO : resolve the initial tab synchronously so the mount cond is already
329
333
  // tab-scoped — an empty initial tab caused a second wasted list fetch
330
- var _99 = (0, react_1.useState)(function () {
334
+ var _106 = (0, react_1.useState)(function () {
331
335
  var _a, _b;
332
336
  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);
333
- }), selectedTab = _99[0], setSelectedTab = _99[1];
334
- var _100 = (0, react_1.useState)("dayGridMonth"), calendarView = _100[0], setCalendarView = _100[1];
337
+ }), selectedTab = _106[0], setSelectedTab = _106[1];
338
+ var _107 = (0, react_1.useState)("dayGridMonth"), calendarView = _107[0], setCalendarView = _107[1];
335
339
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
336
340
  // (calendarView above drives the matching range query)
337
- var _101 = (0, react_1.useState)("month"), newCalendarViewMode = _101[0], setNewCalendarViewMode = _101[1];
338
- var _102 = (0, react_1.useState)(new Date()), calendarTabMonth = _102[0], setCalendarTabMonth = _102[1];
339
- var _103 = (0, react_1.useState)(true), kanbanDroppable = _103[0], setKanbanDroppable = _103[1];
340
- var _104 = (0, react_1.useState)([]), kanbanOptions = _104[0], setKanbanOptions = _104[1];
341
- var _105 = (0, react_1.useState)(false), queryForm = _105[0], setQueryForm = _105[1];
342
- var _106 = (0, react_1.useState)(false), batchUpdateModal = _106[0], setBatchUpdateModal = _106[1];
343
- var _107 = (0, react_1.useState)({
341
+ var _108 = (0, react_1.useState)("month"), newCalendarViewMode = _108[0], setNewCalendarViewMode = _108[1];
342
+ var _109 = (0, react_1.useState)(new Date()), calendarTabMonth = _109[0], setCalendarTabMonth = _109[1];
343
+ var _110 = (0, react_1.useState)(true), kanbanDroppable = _110[0], setKanbanDroppable = _110[1];
344
+ var _111 = (0, react_1.useState)([]), kanbanOptions = _111[0], setKanbanOptions = _111[1];
345
+ var _112 = (0, react_1.useState)(false), queryForm = _112[0], setQueryForm = _112[1];
346
+ var _113 = (0, react_1.useState)(false), batchUpdateModal = _113[0], setBatchUpdateModal = _113[1];
347
+ var _114 = (0, react_1.useState)({
344
348
  columnId: "",
345
349
  columnData: {},
346
- }), batchUpdateData = _107[0], setBatchUpdateData = _107[1];
347
- var _108 = (0, react_1.useState)(function () {
350
+ }), batchUpdateData = _114[0], setBatchUpdateData = _114[1];
351
+ var _115 = (0, react_1.useState)(function () {
348
352
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
349
353
  if (!persistedState)
350
354
  return baseModel;
@@ -370,8 +374,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
370
374
  });
371
375
  }
372
376
  return model;
373
- }), structure = _108[0], setStructure = _108[1];
374
- var _109 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _109[0], setAdditionalQuery = _109[1];
377
+ }), structure = _115[0], setStructure = _115[1];
378
+ 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];
375
379
  // INFO: State for user-configurable flex filters (Monday.com-style)
376
380
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
377
381
  var defaultFlexFilterRow = [
@@ -382,109 +386,109 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
382
386
  value: undefined,
383
387
  },
384
388
  ];
385
- var _110 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
389
+ var _117 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
386
390
  ? persistedState.flexFilters
387
- : defaultFlexFilterRow), flexFilters = _110[0], setFlexFilters = _110[1];
391
+ : defaultFlexFilterRow), flexFilters = _117[0], setFlexFilters = _117[1];
388
392
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
389
393
  // to prevent API calls on every keystroke when typing in value inputs
390
- var _111 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
394
+ var _118 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
391
395
  ? persistedState.flexFilters
392
- : defaultFlexFilterRow), flexFiltersDebounced = _111[0], setFlexFiltersDebounced = _111[1];
393
- var _112 = (0, react_1.useState)({}), flexFilterReferenceOptions = _112[0], setFlexFilterReferenceOptions = _112[1];
394
- var _113 = (0, react_1.useState)({}), flexFilterReferenceSearch = _113[0], setFlexFilterReferenceSearch = _113[1];
395
- var _114 = (0, react_1.useState)(false), flexFilterModalOpen = _114[0], setFlexFilterModalOpen = _114[1];
396
- var _115 = (0, react_1.useState)(false), viewSettingsModalOpen = _115[0], setViewSettingsModalOpen = _115[1];
396
+ : defaultFlexFilterRow), flexFiltersDebounced = _118[0], setFlexFiltersDebounced = _118[1];
397
+ var _119 = (0, react_1.useState)({}), flexFilterReferenceOptions = _119[0], setFlexFilterReferenceOptions = _119[1];
398
+ var _120 = (0, react_1.useState)({}), flexFilterReferenceSearch = _120[0], setFlexFilterReferenceSearch = _120[1];
399
+ var _121 = (0, react_1.useState)(false), flexFilterModalOpen = _121[0], setFlexFilterModalOpen = _121[1];
400
+ var _122 = (0, react_1.useState)(false), viewSettingsModalOpen = _122[0], setViewSettingsModalOpen = _122[1];
397
401
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
398
402
  // Deliberately kept out of `structure`: the props-sync effect below resets
399
403
  // structure to props.model whenever props change, which would wipe the
400
404
  // choice, and the persist effect derives schema-level hiddenColumnIds from
401
405
  // structure — writing user hides there would blur the two concepts.
402
- var _116 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _116[0], setUserHiddenColumnIds = _116[1];
403
- var _117 = (0, react_1.useState)(""), columnSearch = _117[0], setColumnSearch = _117[1];
404
- var _118 = (0, react_1.useState)(null), draggingColumnId = _118[0], setDraggingColumnId = _118[1];
406
+ 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];
407
+ var _124 = (0, react_1.useState)(""), columnSearch = _124[0], setColumnSearch = _124[1];
408
+ var _125 = (0, react_1.useState)(null), draggingColumnId = _125[0], setDraggingColumnId = _125[1];
405
409
  var columnRowRefs = (0, react_1.useRef)({});
406
410
  //INFO : Used by Auth
407
- var _119 = (0, react_1.useState)({
411
+ var _126 = (0, react_1.useState)({
408
412
  email: "",
409
413
  google: "",
410
414
  phone: "",
411
415
  disabled: false,
412
416
  create: false,
413
- }), authMethods = _119[0], setAuthMethods = _119[1];
414
- var _120 = (0, react_1.useState)(""), selectedAuthMethod = _120[0], setSelectedAuthMethod = _120[1];
417
+ }), authMethods = _126[0], setAuthMethods = _126[1];
418
+ var _127 = (0, react_1.useState)(""), selectedAuthMethod = _127[0], setSelectedAuthMethod = _127[1];
415
419
  // INFO: Used by Activity Log
416
- var _121 = (0, react_1.useState)(false), activityModal = _121[0], setActivityModal = _121[1];
417
- var _122 = (0, react_1.useState)(""), activityId = _122[0], setActivityId = _122[1];
420
+ var _128 = (0, react_1.useState)(false), activityModal = _128[0], setActivityModal = _128[1];
421
+ var _129 = (0, react_1.useState)(""), activityId = _129[0], setActivityId = _129[1];
418
422
  //INFO : Used by Export
419
- var _123 = (0, react_1.useState)(null), csvFile = _123[0], setCSVFile = _123[1];
420
- var _124 = (0, react_1.useState)([]), csvFileData = _124[0], setCSVFileData = _124[1];
421
- var _125 = (0, react_1.useState)(0), stepCSVIndex = _125[0], setStepCSVIndex = _125[1];
422
- var _126 = (0, react_1.useState)({}), listCSVMapAttribute = _126[0], setListCSVMapAttribute = _126[1];
423
- var _127 = (0, react_1.useState)({}), listCSVObjAttribute = _127[0], setListCSVObjAttribute = _127[1];
424
- var _128 = (0, react_1.useState)([]), csvAPIAttribute = _128[0], setCSVAPIAttribute = _128[1];
425
- var _129 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _129[0], setExportCSVEmail = _129[1];
426
- var _130 = (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 = _130[0], setExportPDFTitle = _130[1];
427
- var _131 = (0, react_1.useState)(false), exportPDFLoading = _131[0], setExportPDFLoading = _131[1];
428
- var _132 = (0, react_1.useState)(false), exportReadPDFLoading = _132[0], setExportReadPDFLoading = _132[1];
429
- var _133 = (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 = _133[0], setExportSumAttributeIds = _133[1];
430
- var _134 = (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 = _134[0], setHideSubItems = _134[1];
431
- var _135 = (0, react_1.useState)([]), importTableData = _135[0], setImportTableData = _135[1];
432
- var _136 = (0, react_1.useState)([]), queryList = _136[0], setQueryList = _136[1];
433
- var _137 = (0, react_1.useState)(undefined), allQueryList = _137[0], setAllQueryList = _137[1];
434
- var _138 = (0, react_1.useState)(-1), queryIndex = _138[0], setQueryIndex = _138[1];
435
- var _139 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _139[0], setGroupId = _139[1];
436
- var _140 = (0, react_1.useState)(""), readTabSection = _140[0], setReadTabSection = _140[1];
437
- var _141 = (0, react_1.useState)(false), readFloatingNav = _141[0], setReadFloatingNav = _141[1];
423
+ var _130 = (0, react_1.useState)(null), csvFile = _130[0], setCSVFile = _130[1];
424
+ var _131 = (0, react_1.useState)([]), csvFileData = _131[0], setCSVFileData = _131[1];
425
+ var _132 = (0, react_1.useState)(0), stepCSVIndex = _132[0], setStepCSVIndex = _132[1];
426
+ var _133 = (0, react_1.useState)({}), listCSVMapAttribute = _133[0], setListCSVMapAttribute = _133[1];
427
+ var _134 = (0, react_1.useState)({}), listCSVObjAttribute = _134[0], setListCSVObjAttribute = _134[1];
428
+ var _135 = (0, react_1.useState)([]), csvAPIAttribute = _135[0], setCSVAPIAttribute = _135[1];
429
+ var _136 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _136[0], setExportCSVEmail = _136[1];
430
+ 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];
431
+ var _138 = (0, react_1.useState)(false), exportPDFLoading = _138[0], setExportPDFLoading = _138[1];
432
+ var _139 = (0, react_1.useState)(false), exportReadPDFLoading = _139[0], setExportReadPDFLoading = _139[1];
433
+ 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];
434
+ 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];
435
+ var _142 = (0, react_1.useState)([]), importTableData = _142[0], setImportTableData = _142[1];
436
+ var _143 = (0, react_1.useState)([]), queryList = _143[0], setQueryList = _143[1];
437
+ var _144 = (0, react_1.useState)(undefined), allQueryList = _144[0], setAllQueryList = _144[1];
438
+ var _145 = (0, react_1.useState)(-1), queryIndex = _145[0], setQueryIndex = _145[1];
439
+ var _146 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _146[0], setGroupId = _146[1];
440
+ var _147 = (0, react_1.useState)(""), readTabSection = _147[0], setReadTabSection = _147[1];
441
+ var _148 = (0, react_1.useState)(false), readFloatingNav = _148[0], setReadFloatingNav = _148[1];
438
442
  var readTabSectionRefs = (0, react_1.useRef)({});
439
443
  //INFO : Used by Read
440
444
  //INFO : Used by Update
441
- var _142 = (0, react_1.useState)(false), modalVisible = _142[0], setModalVisible = _142[1];
442
- var _143 = (0, react_1.useState)(false), deleteModal = _143[0], setDeleteModal = _143[1];
443
- var _144 = (0, react_1.useState)(false), excelModal = _144[0], setExcelModal = _144[1];
444
- var _145 = (0, react_1.useState)(false), exportExcel = _145[0], setExportExcel = _145[1];
445
- var _146 = (0, react_1.useState)(""), exportType = _146[0], setExportType = _146[1];
446
- var _147 = (0, react_1.useState)(false), exportQR = _147[0], setExportQR = _147[1];
447
- var _148 = (0, react_1.useState)(function () {
445
+ var _149 = (0, react_1.useState)(false), modalVisible = _149[0], setModalVisible = _149[1];
446
+ var _150 = (0, react_1.useState)(false), deleteModal = _150[0], setDeleteModal = _150[1];
447
+ var _151 = (0, react_1.useState)(false), excelModal = _151[0], setExcelModal = _151[1];
448
+ var _152 = (0, react_1.useState)(false), exportExcel = _152[0], setExportExcel = _152[1];
449
+ var _153 = (0, react_1.useState)(""), exportType = _153[0], setExportType = _153[1];
450
+ var _154 = (0, react_1.useState)(false), exportQR = _154[0], setExportQR = _154[1];
451
+ var _155 = (0, react_1.useState)(function () {
448
452
  var _a, _b;
449
453
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
450
454
  return firstTabId;
451
- }), activeTab = _148[0], setActiveTab = _148[1];
452
- var _149 = (0, react_1.useState)(false), signatureSigning = _149[0], setSignatureSigning = _149[1];
453
- var _150 = (0, react_1.useState)({}), selectedData = _150[0], setSelectedData = _150[1];
454
- var _151 = (0, react_1.useState)(""), selectedObjectStructureId = _151[0], setSelectedObjectStructureId = _151[1];
455
- var _152 = (0, react_1.useState)(""), selectedObjectId = _152[0], setSelectedObjectId = _152[1];
456
- var _153 = (0, react_1.useState)(""), selectedListAddressId = _153[0], setSelectedListAddressId = _153[1];
457
- var _154 = (0, react_1.useState)(-1), selectedListAddressIndex = _154[0], setSelectedListAddressIndex = _154[1];
458
- var _155 = (0, react_1.useState)({
455
+ }), activeTab = _155[0], setActiveTab = _155[1];
456
+ var _156 = (0, react_1.useState)(false), signatureSigning = _156[0], setSignatureSigning = _156[1];
457
+ var _157 = (0, react_1.useState)({}), selectedData = _157[0], setSelectedData = _157[1];
458
+ var _158 = (0, react_1.useState)(""), selectedObjectStructureId = _158[0], setSelectedObjectStructureId = _158[1];
459
+ var _159 = (0, react_1.useState)(""), selectedObjectId = _159[0], setSelectedObjectId = _159[1];
460
+ var _160 = (0, react_1.useState)(""), selectedListAddressId = _160[0], setSelectedListAddressId = _160[1];
461
+ var _161 = (0, react_1.useState)(-1), selectedListAddressIndex = _161[0], setSelectedListAddressIndex = _161[1];
462
+ var _162 = (0, react_1.useState)({
459
463
  lat: 0,
460
464
  lng: 0,
461
465
  name: "",
462
- }), selectedListAddress = _155[0], setSelectedListAddress = _155[1];
463
- var _156 = (0, react_1.useState)({}), selectedObjectData = _156[0], setSelectedObjectData = _156[1];
464
- var _157 = (0, react_1.useState)(null), objectCellEdit = _157[0], setObjectCellEdit = _157[1];
465
- var _158 = (0, react_1.useState)(false), referenceLoading = _158[0], setReferenceLoading = _158[1];
466
- var _159 = (0, react_1.useState)({}), referencesOptions = _159[0], setReferencesOptions = _159[1];
467
- var _160 = (0, react_1.useState)({}), referencesDetails = _160[0], setReferencesDetails = _160[1];
468
- var _161 = (0, react_1.useState)({}), listReferencesOptions = _161[0], setListReferencesOptions = _161[1];
469
- var _162 = (0, react_1.useState)({}), referenceDeleteTableData = _162[0], setReferenceDeleteTableData = _162[1];
470
- var _163 = (0, react_1.useState)(0), referenceDeleteIndex = _163[0], setReferenceDeleteIndex = _163[1];
471
- var _164 = (0, react_1.useState)({
466
+ }), selectedListAddress = _162[0], setSelectedListAddress = _162[1];
467
+ var _163 = (0, react_1.useState)({}), selectedObjectData = _163[0], setSelectedObjectData = _163[1];
468
+ var _164 = (0, react_1.useState)(null), objectCellEdit = _164[0], setObjectCellEdit = _164[1];
469
+ var _165 = (0, react_1.useState)(false), referenceLoading = _165[0], setReferenceLoading = _165[1];
470
+ var _166 = (0, react_1.useState)({}), referencesOptions = _166[0], setReferencesOptions = _166[1];
471
+ var _167 = (0, react_1.useState)({}), referencesDetails = _167[0], setReferencesDetails = _167[1];
472
+ var _168 = (0, react_1.useState)({}), listReferencesOptions = _168[0], setListReferencesOptions = _168[1];
473
+ var _169 = (0, react_1.useState)({}), referenceDeleteTableData = _169[0], setReferenceDeleteTableData = _169[1];
474
+ var _170 = (0, react_1.useState)(0), referenceDeleteIndex = _170[0], setReferenceDeleteIndex = _170[1];
475
+ var _171 = (0, react_1.useState)({
472
476
  id: "",
473
477
  name: "",
474
478
  type: "string",
475
- }), referenceCreationModal = _164[0], setReferenceCreationModal = _164[1];
476
- var _165 = (0, react_1.useState)({}), referenceModelSchema = _165[0], setReferenceSchema = _165[1];
477
- var _166 = (0, react_1.useState)([]), kanbanChecked = _166[0], setKanbanChecked = _166[1];
479
+ }), referenceCreationModal = _171[0], setReferenceCreationModal = _171[1];
480
+ var _172 = (0, react_1.useState)({}), referenceModelSchema = _172[0], setReferenceSchema = _172[1];
481
+ var _173 = (0, react_1.useState)([]), kanbanChecked = _173[0], setKanbanChecked = _173[1];
478
482
  //INFO : Offline
479
- var _167 = (0, react_1.useState)(0), offlineDataLength = _167[0], setOfflineDataLength = _167[1];
480
- var _168 = (0, react_1.useState)(false), offlineModal = _168[0], setOfflineModal = _168[1];
483
+ var _174 = (0, react_1.useState)(0), offlineDataLength = _174[0], setOfflineDataLength = _174[1];
484
+ var _175 = (0, react_1.useState)(false), offlineModal = _175[0], setOfflineModal = _175[1];
481
485
  // INFO: live-stream state — driven by socket connection and navigator.onLine
482
- var _169 = (0, react_1.useState)(false), isLive = _169[0], setIsLive = _169[1];
483
- var _170 = (0, react_1.useState)(false), isLiveOffline = _170[0], setIsLiveOffline = _170[1];
486
+ var _176 = (0, react_1.useState)(false), isLive = _176[0], setIsLive = _176[1];
487
+ var _177 = (0, react_1.useState)(false), isLiveOffline = _177[0], setIsLiveOffline = _177[1];
484
488
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
485
489
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
486
490
  // Independent of SSE status so it works even when bareSocketName is not set.
487
- var _171 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _171[0], setIsNetworkOffline = _171[1];
491
+ var _178 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _178[0], setIsNetworkOffline = _178[1];
488
492
  var previousType = (0, react_1.useRef)(null);
489
493
  var previousSelectedData = (0, react_1.useRef)(null);
490
494
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -566,59 +570,86 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
566
570
  var isSubmittingRef = (0, react_1.useRef)(false);
567
571
  var devSettings = props.devSettings;
568
572
  var serverId = (0, utils_1.parseServerId)(devSettings.server);
569
- var viewType = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.viewId) !== null && _0 !== void 0 ? _0 : "general";
573
+ /**
574
+ * INFO: which CONTENT renders — the tab highlight is selectedTab, and these
575
+ * are resolved separately. So a pinned tab has to be honoured here too, or
576
+ * the tab bar opens on Documents while the table renders underneath it.
577
+ *
578
+ * viewId still wins when present: it is a deliberate destination, from a
579
+ * shared link or a back button.
580
+ */
581
+ var defaultTabName = (_1 = (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.extendedTabs) === null || _0 === void 0 ? void 0 : _0.find(function (eachTab) { return eachTab.defaultTab; })) === null || _1 === void 0 ? void 0 : _1.name;
582
+ // INFO: the pinned tab is a LIST destination. Falling back to it while a
583
+ // record is open resolved the read view to a list tab, which renderTabContent
584
+ // refuses — so General Details rendered nothing. Only a list falls back.
585
+ var viewType = (_3 = (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.viewId) !== null && _3 !== void 0 ? _3 : (resolvedType === "list" && defaultTabName
586
+ ? (0, utils_1.lowercaseTextToId)(defaultTabName)
587
+ : "general");
570
588
  var isFirebaseClient = devSettings.server === "firebase";
571
589
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
572
- var dbModule = isFirebaseClient ? (_1 = props.lib) === null || _1 === void 0 ? void 0 : _1.firebase : (_2 = props.lib) === null || _2 === void 0 ? void 0 : _2.axios;
590
+ var dbModule = isFirebaseClient ? (_4 = props.lib) === null || _4 === void 0 ? void 0 : _4.firebase : (_5 = props.lib) === null || _5 === void 0 ? void 0 : _5.axios;
573
591
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
574
592
  // INFO: the view settings panel (columns, sort, rows per page) is standard on
575
593
  // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
576
- var isViewSettingsEnabled = ((_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareViewSettings) || ((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareNewDTW)
594
+ var isViewSettingsEnabled = ((_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareViewSettings) || ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareNewDTW)
577
595
  ? true
578
596
  : false;
579
597
  // INFO: a consumer that wires onChangeHide owns the hide at schema level
580
598
  // (Space, Sun Luan) — toggling writes to the model and calls back. Without it
581
599
  // the hide is this user's own and lives in userHiddenColumnIds.
582
- var isSchemaHideMode = ((_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.onChangeHide) ? true : false;
600
+ var isSchemaHideMode = ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.onChangeHide) ? true : false;
583
601
  // INFO: rows per page is a view setting the user can change, so it starts from
584
602
  // the persisted value and falls back to the consumer's limit
585
- var _172 = (0, react_1.useState)((_7 = (_6 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _6 !== void 0 ? _6 : props.limit) !== null && _7 !== void 0 ? _7 : 10), pageLimit = _172[0], setPageLimit = _172[1];
603
+ 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];
586
604
  var limit = pageLimit;
587
- var activeSortId = (isPersistEnabled && persistedSort) || ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.sort);
605
+ var activeSortId = (isPersistEnabled && persistedSort) || ((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.sort);
588
606
  var handleSortColumn = function (value) {
589
607
  var _a, _b;
590
608
  if (isPersistEnabled)
591
609
  setPersistedSort(value);
592
610
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
593
611
  };
594
- var isEditor = ((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.allEditable) ? true : false;
595
- var isOffline = (_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareOffline;
612
+ var isEditor = ((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.allEditable) ? true : false;
613
+ var isOffline = (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareOffline;
596
614
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
597
615
  // the live network state — online saves go to the server even if bareOffline
598
616
  // is true, offline saves go to IDB as normal.
599
- var isOfflineNetworkListener = isOffline && ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareOfflineNetworkListener);
600
- var showId = (_12 = props.space) === null || _12 === void 0 ? void 0 : _12.showId;
617
+ var isOfflineNetworkListener = isOffline && ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareOfflineNetworkListener);
618
+ var showId = (_15 = props.space) === null || _15 === void 0 ? void 0 : _15.showId;
601
619
  var remainId = showId || selectedObjectStructureId ? true : false;
602
- var idField = ((_13 = props.space) === null || _13 === void 0 ? void 0 : _13.idField) || ((_14 = props.organise) === null || _14 === void 0 ? void 0 : _14.idField);
603
- var pipeline = (_15 = props === null || props === void 0 ? void 0 : props.space) === null || _15 === void 0 ? void 0 : _15.pipeline;
604
- if ((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareListPipeline) {
620
+ var idField = ((_16 = props.space) === null || _16 === void 0 ? void 0 : _16.idField) || ((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.idField);
621
+ var pipeline = (_18 = props === null || props === void 0 ? void 0 : props.space) === null || _18 === void 0 ? void 0 : _18.pipeline;
622
+ if ((_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareListPipeline) {
605
623
  pipeline = pipeline
606
624
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
607
625
  }
608
- var hasNavigation = ((_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.handleNavigate) ? true : false;
626
+ /**
627
+ * INFO: the column a file tab lists, or undefined for every other view.
628
+ *
629
+ * Resolved from viewType — the SAME selector the content uses — and not from
630
+ * selectedTab. The two are separate pieces of state and can disagree, and
631
+ * when they did the query lost its unwind while the file grid still rendered:
632
+ * three records came back instead of five files, and each tile received the
633
+ * whole array rather than one file, so every one of them read "Attachment".
634
+ */
635
+ var fileViewColumnId = (_23 = (_22 = ((_21 = (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.extendedTabs) !== null && _21 !== void 0 ? _21 : []).find(function (eachTab) {
636
+ return eachTab.viewType === "file" &&
637
+ (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
638
+ })) === null || _22 === void 0 ? void 0 : _22.fileSettings) === null || _23 === void 0 ? void 0 : _23.columnId;
639
+ var hasNavigation = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.handleNavigate) ? true : false;
609
640
  var formColumn = "grid-cols-12";
610
- var useMobileView = (_19 = (_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateMobileView) !== null && _19 !== void 0 ? _19 : false;
641
+ var useMobileView = (_26 = (_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateMobileView) !== null && _26 !== void 0 ? _26 : false;
611
642
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
612
- var isActivityLog = (((_21 = (_20 = props.edit) === null || _20 === void 0 ? void 0 : _20.activityLog) === null || _21 === void 0 ? void 0 : _21.enableComments) &&
613
- ((_22 = props.edit) === null || _22 === void 0 ? void 0 : _22.activityLog.commentCollectionId)) ||
614
- (((_24 = (_23 = props.edit) === null || _23 === void 0 ? void 0 : _23.activityLog) === null || _24 === void 0 ? void 0 : _24.enableLogs) &&
615
- ((_25 = props.edit) === null || _25 === void 0 ? void 0 : _25.activityLog.logsCollectionId));
616
- var customPaginationSize = ((_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.customPaginationCount)
643
+ var isActivityLog = (((_28 = (_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.activityLog) === null || _28 === void 0 ? void 0 : _28.enableComments) &&
644
+ ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.activityLog.commentCollectionId)) ||
645
+ (((_31 = (_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.activityLog) === null || _31 === void 0 ? void 0 : _31.enableLogs) &&
646
+ ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.activityLog.logsCollectionId));
647
+ var customPaginationSize = ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.customPaginationCount)
617
648
  ? props.organise.customPaginationCount(size)
618
649
  : undefined;
619
650
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
620
651
  var writeServerQuery = new writeQuery_1.WriteQuery({
621
- dbModule: (_27 = props.lib) === null || _27 === void 0 ? void 0 : _27.axios,
652
+ dbModule: (_34 = props.lib) === null || _34 === void 0 ? void 0 : _34.axios,
622
653
  dbType: devSettings.server,
623
654
  dbCollection: props.collectionId,
624
655
  dbEndpoint: devSettings.dbEndpoint,
@@ -626,7 +657,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
626
657
  dbUserToken: devSettings.dbUserToken,
627
658
  });
628
659
  var readServerQuery = new readQuery_1.ReadQuery({
629
- dbModule: (_28 = props.lib) === null || _28 === void 0 ? void 0 : _28.axios,
660
+ dbModule: (_35 = props.lib) === null || _35 === void 0 ? void 0 : _35.axios,
630
661
  dbType: devSettings.server,
631
662
  dbCollection: props.collectionId,
632
663
  dbEndpoint: devSettings.dbEndpoint,
@@ -634,9 +665,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
634
665
  dbUserToken: devSettings.dbUserToken,
635
666
  });
636
667
  var moreButtonPopUp = [
637
- ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.allEditable) &&
668
+ ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) &&
638
669
  !isFirebase &&
639
- !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.exportSettings) === null || _31 === void 0 ? void 0 : _31.hideImportCSV)
670
+ !((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.exportSettings) === null || _38 === void 0 ? void 0 : _38.hideImportCSV)
640
671
  ? {
641
672
  text: "Import Excel",
642
673
  onClick: function () {
@@ -645,7 +676,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
645
676
  },
646
677
  }
647
678
  : null,
648
- !((_33 = (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.exportSettings) === null || _33 === void 0 ? void 0 : _33.hideExportCSV)
679
+ !((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.exportSettings) === null || _40 === void 0 ? void 0 : _40.hideExportCSV)
649
680
  ? {
650
681
  text: "Export CSV",
651
682
  onClick: function () {
@@ -655,7 +686,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
655
686
  },
656
687
  }
657
688
  : null,
658
- !((_35 = (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.exportSettings) === null || _35 === void 0 ? void 0 : _35.hideExportExcel)
689
+ !((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.exportSettings) === null || _42 === void 0 ? void 0 : _42.hideExportExcel)
659
690
  ? {
660
691
  text: "Export Excel",
661
692
  onClick: function () {
@@ -665,7 +696,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
665
696
  },
666
697
  }
667
698
  : null,
668
- !((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.exportSettings) === null || _37 === void 0 ? void 0 : _37.hideExportPDF)
699
+ !((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.exportSettings) === null || _44 === void 0 ? void 0 : _44.hideExportPDF)
669
700
  ? {
670
701
  text: "Export PDF",
671
702
  onClick: function () {
@@ -675,7 +706,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
675
706
  },
676
707
  }
677
708
  : null,
678
- !((_39 = (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.exportSettings) === null || _39 === void 0 ? void 0 : _39.hideExportQR)
709
+ !((_46 = (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.exportSettings) === null || _46 === void 0 ? void 0 : _46.hideExportQR)
679
710
  ? {
680
711
  text: "Export QR",
681
712
  onClick: function () {
@@ -685,7 +716,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
685
716
  },
686
717
  }
687
718
  : null,
688
- !((_41 = (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.exportSettings) === null || _41 === void 0 ? void 0 : _41.hideExportQR)
719
+ !((_48 = (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.exportSettings) === null || _48 === void 0 ? void 0 : _48.hideExportQR)
689
720
  ? {
690
721
  text: "Export QR(Data)",
691
722
  onClick: function () {
@@ -695,7 +726,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
695
726
  },
696
727
  }
697
728
  : null,
698
- !((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.exportSettings) === null || _43 === void 0 ? void 0 : _43.hideExportPrint)
729
+ !((_50 = (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.exportSettings) === null || _50 === void 0 ? void 0 : _50.hideExportPrint)
699
730
  ? {
700
731
  text: "Print",
701
732
  onClick: function () {
@@ -705,7 +736,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
705
736
  },
706
737
  }
707
738
  : null,
708
- !((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.exportSettings) === null || _45 === void 0 ? void 0 : _45.hideExportDraft)
739
+ !((_52 = (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.exportSettings) === null || _52 === void 0 ? void 0 : _52.hideExportDraft)
709
740
  ? {
710
741
  text: filterDraft ? "Show All Items" : "Filter Draft",
711
742
  onClick: function () {
@@ -714,7 +745,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
714
745
  }
715
746
  : null,
716
747
  ].filter(Boolean);
717
- if ((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.moreSettings)
748
+ if ((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.moreSettings)
718
749
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
719
750
  //=====================================================================================
720
751
  //SECTION: User Column Visibility Handlers
@@ -1000,7 +1031,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1000
1031
  (0, react_1.useEffect)(function () {
1001
1032
  handleOfflinePrefetch();
1002
1033
  /* eslint-disable */
1003
- }, [props.collectionId, (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareOffline]);
1034
+ }, [props.collectionId, (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareOffline]);
1004
1035
  /* eslint-enable */
1005
1036
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
1006
1037
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -1020,7 +1051,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1020
1051
  }, interval);
1021
1052
  return function () { return clearInterval(timer); };
1022
1053
  /* eslint-disable */
1023
- }, [(_48 = props.bareSettings) === null || _48 === void 0 ? void 0 : _48.barePollingInterval, isLive, isNetworkOffline]);
1054
+ }, [(_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.barePollingInterval, isLive, isNetworkOffline]);
1024
1055
  /* eslint-enable */
1025
1056
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
1026
1057
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -1062,7 +1093,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1062
1093
  };
1063
1094
  /* eslint-disable */
1064
1095
  }, [
1065
- (_49 = props.bareSettings) === null || _49 === void 0 ? void 0 : _49.bareSocketName,
1096
+ (_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.bareSocketName,
1066
1097
  props.collectionId,
1067
1098
  props.devSettings.sseEndpoint,
1068
1099
  props.devSettings.dbAPIToken,
@@ -1307,10 +1338,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1307
1338
  props.collectionId,
1308
1339
  props.model,
1309
1340
  props.localURLEndpoint,
1310
- (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.extendedTabs,
1311
- (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.viewId,
1312
- (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.additionalQuery,
1313
- (_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.groupBy,
1341
+ (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.extendedTabs,
1342
+ (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.viewId,
1343
+ (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.additionalQuery,
1344
+ (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.groupBy,
1314
1345
  resolvedType,
1315
1346
  ]);
1316
1347
  (0, react_1.useEffect)(function () {
@@ -1400,7 +1431,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1400
1431
  };
1401
1432
  }, 100);
1402
1433
  return function () { return clearTimeout(timeoutId); };
1403
- }, [(_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.showReadFloatingNav, resolvedType, props.id, loading]);
1434
+ }, [(_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.showReadFloatingNav, resolvedType, props.id, loading]);
1404
1435
  (0, react_1.useEffect)(function () {
1405
1436
  if (resolvedType !== "read")
1406
1437
  return;
@@ -2006,6 +2037,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2006
2037
  uniqueLabel: props.uniqueLabel,
2007
2038
  groupId: props.groupId,
2008
2039
  unionCollections: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.unionCollections,
2040
+ // INFO: a file view lists FILES, so the row has to become one. The server
2041
+ // places this before the match, the sort and the skip/limit, which is
2042
+ // what makes filters still apply and pagination count files rather than
2043
+ // records — and it builds its count from the same pipeline, so the total
2044
+ // is the file count with nothing else to configure.
2045
+ unwind: fileViewColumnId,
2009
2046
  skip: 0,
2010
2047
  };
2011
2048
  if (calendarSettings ||
@@ -7920,7 +7957,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7920
7957
  if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) &&
7921
7958
  ((_b = props.organise.extendedTabs) === null || _b === void 0 ? void 0 : _b.length) > 0) {
7922
7959
  (_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs.map(function (eachTab) {
7923
- var _a, _b, _c, _d, _e;
7960
+ var _a, _b, _c, _d, _e, _f;
7924
7961
  var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(resolvedType, "&collection=").concat(props.collectionId);
7925
7962
  if (props.id)
7926
7963
  hrefPoint += "&data=".concat(props.id);
@@ -7949,7 +7986,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7949
7986
  tabData["viewImage"] = eachTab.viewImage;
7950
7987
  }
7951
7988
  if (eachTab.type === resolvedType) {
7952
- tabs.push(__assign(__assign({}, tabData), (!((_e = props.edit) === null || _e === void 0 ? void 0 : _e.disabledTabsDeleteBtn) && {
7989
+ tabs.push(__assign(__assign(__assign({}, tabData), (isEditor &&
7990
+ ((_e = props.organise) === null || _e === void 0 ? void 0 : _e.onChangeTabs) && {
7991
+ action: (react_1.default.createElement("span", { role: "button", "data-testid": "tab-default-".concat(tabData.id), "aria-label": eachTab.defaultTab
7992
+ ? "Opens by default"
7993
+ : "Open this tab by default", className: "ml-2 self-center ".concat(eachTab.defaultTab
7994
+ ? "text-primary-500"
7995
+ : "text-gray-400 opacity-0 group-hover:opacity-100"), onClick: function (e) {
7996
+ e.stopPropagation();
7997
+ e.preventDefault();
7998
+ handleToggleDefaultTab(eachTab.name);
7999
+ } }, eachTab.defaultTab ? (react_1.default.createElement(HeroIcons.BookmarkIcon, { className: "h-4 w-4" })) : (react_1.default.createElement(BookmarkIcon_1.default, { className: "h-4 w-4" })))),
8000
+ })), (!((_f = props.edit) === null || _f === void 0 ? void 0 : _f.disabledTabsDeleteBtn) && {
7953
8001
  del: (react_1.default.createElement(outline_1.XMarkIcon, { className: "h-4 w-4 ml-2 self-center text-red-600 hover:text-red-400 ", onClick: function (e) {
7954
8002
  e.stopPropagation();
7955
8003
  e.preventDefault();
@@ -7994,6 +8042,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7994
8042
  var _a, _b;
7995
8043
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, structure.filter(function (eachColumn) { return eachColumn.id !== columnId; }));
7996
8044
  };
8045
+ /**
8046
+ * INFO: only one tab can be the one that opens, so setting one clears the
8047
+ * rest rather than leaving two marked and letting the first found win.
8048
+ * Clicking the current default unsets it, which falls back to Table View.
8049
+ */
8050
+ var handleToggleDefaultTab = function (name) {
8051
+ var _a, _b, _c, _d;
8052
+ var nextTabs = ((_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) !== null && _b !== void 0 ? _b : []).map(function (eachTab) { return (__assign(__assign({}, eachTab), { defaultTab: eachTab.name === name ? !eachTab.defaultTab : false })); });
8053
+ (_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onChangeTabs) === null || _d === void 0 ? void 0 : _d.call(_c, nextTabs);
8054
+ };
7997
8055
  var renderAddMathColumn = function (id, onClose) {
7998
8056
  var _a, _b, _c;
7999
8057
  return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: structure, renderReferenceLabelOptions: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.renderReferenceSpaceOptions, onAddModelSchema: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onAddColumns, onClose: onClose }));
@@ -8404,16 +8462,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8404
8462
  }, darkMode: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkMode, hidePagination: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.disableEllipsisOnLongWord }));
8405
8463
  }
8406
8464
  };
8407
- var renderTabContent = function (tabs, dataType, viewType) {
8408
- 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;
8409
- var selectedTabData = tabs.find(function (eachTab) {
8410
- if (eachTab.id === viewType) {
8411
- return eachTab;
8412
- }
8413
- else {
8414
- return null;
8415
- }
8416
- });
8465
+ var renderTabContent = function (tabs, dataType, requestedViewType) {
8466
+ 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;
8467
+ var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
8468
+ /**
8469
+ * INFO: a list tab must not supply the content of a read view. The selected
8470
+ * tab survives the navigation into a record — setSelectedTab only runs
8471
+ * while the type is list — so without this a list view renders over the
8472
+ * detail list and the record looks empty.
8473
+ *
8474
+ * Refusing the tab is not enough on its own: the branches below key on the
8475
+ * view type STRING, and a refused tab left it naming a view that no branch
8476
+ * renders, so the record was still empty. A refused list tab reads as
8477
+ * "general" all the way down.
8478
+ */
8479
+ var isRefusedListTab = dataType === "read" && (matchedTab === null || matchedTab === void 0 ? void 0 : matchedTab.type) === "list";
8480
+ var viewType = isRefusedListTab ? "general" : requestedViewType;
8481
+ var selectedTabData = isRefusedListTab ? undefined : matchedTab;
8417
8482
  var multipleSelect = false;
8418
8483
  if (!((_a = props.edit) === null || _a === void 0 ? void 0 : _a.disableBatchUpdate))
8419
8484
  multipleSelect = true;
@@ -8636,22 +8701,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8636
8701
  handlePagination(value);
8637
8702
  }, className: "mt-5", hidePagination: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.hidePagination, customPaginationSize: customPaginationSize })));
8638
8703
  }
8704
+ else if (selectedTabData.viewType === "file" && resolvedType === "list") {
8705
+ /**
8706
+ * INFO: the rows are already files — the server unwound the column, so
8707
+ * each row is one element with its record's fields alongside it. The
8708
+ * tile only has to render what it was handed.
8709
+ *
8710
+ * Clicking goes to the RECORD, not the file. Someone browsing files is
8711
+ * looking for the thing a file belongs to, with its status and owner
8712
+ * and everything else around it; landing on a bare download strips
8713
+ * exactly the context they came for. The filename inside the tile is
8714
+ * still a direct link for when the file itself is the point.
8715
+ */
8716
+ var columnId_2 = (_22 = (_21 = selectedTabData.fileSettings) === null || _21 === void 0 ? void 0 : _21.columnId) !== null && _22 !== void 0 ? _22 : "";
8717
+ return (react_1.default.createElement("div", { className: "mt-4" },
8718
+ tableLoading ? (react_1.default.createElement("div", { className: "flex flex-col items-center py-10" },
8719
+ react_1.default.createElement(loading_1.Loading, null))) : tableData.length === 0 ? (react_1.default.createElement(emptyState_1.EmptyState, { text: "No files here yet", icon: react_1.default.createElement(HeroIcons.PaperClipIcon, { className: "h-10 w-10 text-gray-400" }) })) : (
8720
+ // INFO: the same surface the other list views sit on, so
8721
+ // switching tabs does not change the shape of the page around
8722
+ // the content.
8723
+ react_1.default.createElement("div", { className: "grid grid-cols-2 gap-4 rounded-lg p-4 sm:grid-cols-3 lg:grid-cols-4 ".concat(((_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.darkMode) ? "bg-white/5" : "bg-white") }, tableData.map(function (eachRow, eachIndex) {
8724
+ var _a, _b, _c;
8725
+ return (react_1.default.createElement(filePreview_1.FilePreview, { key: "".concat((_b = (_a = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _a !== void 0 ? _a : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id) !== null && _b !== void 0 ? _b : eachIndex, "-").concat(eachIndex), variant: "tile", file: typeof (eachRow === null || eachRow === void 0 ? void 0 : eachRow[columnId_2]) === "string"
8726
+ ? { fileName: eachRow[columnId_2] }
8727
+ : ((_c = eachRow === null || eachRow === void 0 ? void 0 : eachRow[columnId_2]) !== null && _c !== void 0 ? _c : { fileName: "" }), onClick: function () {
8728
+ var _a, _b, _c;
8729
+ // INFO: `id`, not `_id`. handleGetListData renames
8730
+ // every row's _id to id on the way in, the same as the
8731
+ // other views navigate with — reading _id here handed
8732
+ // the read view no id at all, so General Details was
8733
+ // empty.
8734
+ return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", (_c = eachRow === null || eachRow === void 0 ? void 0 : eachRow.id) !== null && _c !== void 0 ? _c : eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, "general");
8735
+ } }));
8736
+ }))),
8737
+ react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8738
+ handlePagination(value);
8739
+ }, darkMode: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.darkMode, customPaginationSize: customPaginationSize })));
8740
+ }
8639
8741
  else if (selectedTabData.viewType === "grid") {
8640
8742
  var isScrollMode = renderCheckScrollMode();
8641
8743
  return (react_1.default.createElement(react_1.default.Fragment, null,
8642
- react_1.default.createElement(grid_1.Grid, { darkMode: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.darkMode, darkModeBg: (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8744
+ react_1.default.createElement(grid_1.Grid, { darkMode: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.darkMode, darkModeBg: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8643
8745
  var _a, _b;
8644
8746
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8645
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_24 = (_23 = props.newTabUrl) === null || _23 === void 0 ? void 0 : _23.default) !== null && _24 !== void 0 ? _24 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_26 = (_25 = props.newTabUrl) === null || _25 === void 0 ? void 0 : _25.addons) !== null && _26 !== void 0 ? _26 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8747
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_28 = (_27 = props.newTabUrl) === null || _27 === void 0 ? void 0 : _27.default) !== null && _28 !== void 0 ? _28 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_30 = (_29 = props.newTabUrl) === null || _29 === void 0 ? void 0 : _29.addons) !== null && _30 !== void 0 ? _30 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8646
8748
  handlePagination(value);
8647
- }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareListGridColClassName, className: "mt-5",
8749
+ }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareListGridColClassName, className: "mt-5",
8648
8750
  // INFO: under the new DTW the grid keeps the same footer as the
8649
8751
  // table and list views instead of its own legacy page buttons
8650
- hidePagination: ((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.hidePagination) ||
8651
- !!((_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareNewDTW), customPaginationSize: customPaginationSize }),
8652
- ((_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareNewDTW) &&
8653
- !((_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
8654
- .length, customPaginationSize: customPaginationSize, darkMode: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.darkMode, darkModeBg: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkModeBg, handleUpdatePageIndex: function (value) {
8752
+ hidePagination: ((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.hidePagination) ||
8753
+ !!((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareNewDTW), customPaginationSize: customPaginationSize }),
8754
+ ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareNewDTW) &&
8755
+ !((_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
8756
+ .length, customPaginationSize: customPaginationSize, darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode, darkModeBg: (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkModeBg, handleUpdatePageIndex: function (value) {
8655
8757
  handlePagination(value);
8656
8758
  } }))));
8657
8759
  }
@@ -8753,7 +8855,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8753
8855
  return eventAvailabilities;
8754
8856
  };
8755
8857
  // INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
8756
- if ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareNewDTW) {
8858
+ if ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareNewDTW) {
8757
8859
  var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
8758
8860
  var _a, _b, _c, _d;
8759
8861
  return ({
@@ -8773,13 +8875,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8773
8875
  // INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
8774
8876
  // query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
8775
8877
  // agenda lists the fetched month chronologically.
8776
- var viewSwitchOptions = (_35 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _35 !== void 0 ? _35 : [];
8878
+ var viewSwitchOptions = (_39 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _39 !== void 0 ? _39 : [];
8777
8879
  var VIEW_VARIANT_MAP = {
8778
8880
  month: "fullMonth",
8779
8881
  week: "weekTimeGrid",
8780
8882
  agenda: "agenda",
8781
8883
  };
8782
- var activeVariant = (_36 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _36 !== void 0 ? _36 : "fullMonth";
8884
+ var activeVariant = (_40 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _40 !== void 0 ? _40 : "fullMonth";
8783
8885
  return (react_1.default.createElement("div", { className: "mt-4" },
8784
8886
  viewSwitchOptions.length > 1 && (react_1.default.createElement("div", { className: "mb-2 flex justify-end" },
8785
8887
  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 () {
@@ -8821,9 +8923,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8821
8923
  var _a, _b;
8822
8924
  if (event.id)
8823
8925
  (_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");
8824
- }, darkMode: (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.darkMode, className: "w-full" }))));
8926
+ }, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, className: "w-full" }))));
8825
8927
  }
8826
- 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: (_38 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _38 !== void 0 ? _38 : calendarView, handleMonthChange: function (date) {
8928
+ 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: (_42 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _42 !== void 0 ? _42 : calendarView, handleMonthChange: function (date) {
8827
8929
  var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
8828
8930
  var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
8829
8931
  if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
@@ -8841,7 +8943,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8841
8943
  else if (selectedTabData.viewType === "feeds") {
8842
8944
  var contentList_1 = [];
8843
8945
  var feedsSettings_1 = selectedTabData.feedsSettings;
8844
- var customFeedsData = (_39 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _39 === void 0 ? void 0 : _39.call(feedsSettings_1, tableData, spaceTableData);
8946
+ var customFeedsData = (_43 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _43 === void 0 ? void 0 : _43.call(feedsSettings_1, tableData, spaceTableData);
8845
8947
  if (customFeedsData && customFeedsData.length > 0) {
8846
8948
  customFeedsData.map(function (eachData) {
8847
8949
  var _a, _b, _c, _d;
@@ -8886,21 +8988,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8886
8988
  return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
8887
8989
  // INFO: NewFeeds is already a card like the table and list, so the new
8888
8990
  // DTW renders it bare; the legacy feed still needs its own surface
8889
- className: ((_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareNewDTW)
8991
+ className: ((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareNewDTW)
8890
8992
  ? ""
8891
- : "p-4 rounded-lg ".concat(((_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode) ? "bg-white/5" : "bg-white") },
8892
- ((_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.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: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode })),
8993
+ : "p-4 rounded-lg ".concat(((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode) ? "bg-white/5" : "bg-white") },
8994
+ ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.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: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode })),
8893
8995
  react_1.default.createElement("div", { className: "my-10" }),
8894
8996
  contentList_1.length > 0 &&
8895
- !((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.hidePagination) &&
8896
- ((_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.darkMode, darkModeBg: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkModeBg, handleUpdatePageIndex: function (value) {
8997
+ !((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
8998
+ ((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, darkModeBg: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkModeBg, handleUpdatePageIndex: function (value) {
8897
8999
  handlePagination(value);
8898
9000
  } })),
8899
9001
  contentList_1.length > 0 &&
8900
- !((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
8901
- !((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
9002
+ !((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.hidePagination) &&
9003
+ !((_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
8902
9004
  handlePagination(value);
8903
- }, darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, customPaginationSize: customPaginationSize }))))));
9005
+ }, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, customPaginationSize: customPaginationSize }))))));
8904
9006
  }
8905
9007
  else if (selectedTabData.viewType === "map") {
8906
9008
  var mapSettings_1 = selectedTabData.mapSettings;
@@ -8999,7 +9101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8999
9101
  }
9000
9102
  else if (selectedTabData.viewType === "kanban") {
9001
9103
  var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
9002
- var kanbanTitle_2 = (_52 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _52 !== void 0 ? _52 : "";
9104
+ var kanbanTitle_2 = (_56 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _56 !== void 0 ? _56 : "";
9003
9105
  var nullColumn_1 = false;
9004
9106
  var groupBy_1 = [];
9005
9107
  var groupLabel_1 = [];
@@ -9020,10 +9122,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9020
9122
  });
9021
9123
  var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
9022
9124
  // INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
9023
- if ((_53 = props.bareSettings) === null || _53 === void 0 ? void 0 : _53.bareNewDTW) {
9125
+ if ((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareNewDTW) {
9024
9126
  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
9025
9127
  ? "Data has exceeded limit, please apply filters"
9026
- : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
9128
+ : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
9027
9129
  var _a;
9028
9130
  setKanbanDroppable(false);
9029
9131
  handleSubmitData("update", cardId, kanbanTitle_2, (_a = {},
@@ -9032,7 +9134,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9032
9134
  }, onClickData: function (id) {
9033
9135
  var _a, _b;
9034
9136
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9035
- }, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode }));
9137
+ }, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode }));
9036
9138
  }
9037
9139
  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
9038
9140
  ? "Data has exceeded limit, please apply filters"
@@ -9533,7 +9635,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9533
9635
  };
9534
9636
  return (react_1.default.createElement(react_1.default.Fragment, null,
9535
9637
  renderNotification("root"),
9536
- ((_56 = (_55 = props.renderSettings) === null || _55 === void 0 ? void 0 : _55.renderLoadingUI) === null || _56 === void 0 ? void 0 : _56.call(_55)) && loading ? ((_57 = props.renderSettings) === null || _57 === void 0 ? void 0 : _57.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkMode, darkModeBg: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9638
+ ((_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 () {
9537
9639
  var _a, _b;
9538
9640
  if (loading)
9539
9641
  return;
@@ -9544,7 +9646,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9544
9646
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9545
9647
  }
9546
9648
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9547
- react_1.default.createElement(modal_1.Modal, { darkMode: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkMode, darkModeBg: (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9649
+ 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 () {
9548
9650
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9549
9651
  if (dataId) {
9550
9652
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9560,19 +9662,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9560
9662
  }, onClose: function () {
9561
9663
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9562
9664
  } }),
9563
- react_1.default.createElement(modal_1.Modal, { darkMode: (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.darkMode, darkModeBg: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9665
+ 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 () {
9564
9666
  setReferenceDeleteTableData({});
9565
9667
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9566
- react_1.default.createElement(modal_1.Modal, { darkMode: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkMode, darkModeBg: (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9668
+ 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 () {
9567
9669
  setDeletePasscodeInput("");
9568
9670
  setDeleteModal(!deleteModal);
9569
9671
  setDeleteFeedId("");
9570
9672
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9571
- 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, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9673
+ 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 () {
9572
9674
  setBatchUpdateData({ columnId: "", columnData: {} });
9573
9675
  setBatchUpdateModal(false);
9574
9676
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9575
- 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, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9677
+ 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 () {
9576
9678
  var _a;
9577
9679
  if (props.space)
9578
9680
  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 }));
@@ -9580,7 +9682,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9580
9682
  }, onClose: function () {
9581
9683
  setSelectedAuthMethod("");
9582
9684
  } }),
9583
- isActivityLog && (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, open: activityModal, title: "Activity Log", renderContent: function () {
9685
+ 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 () {
9584
9686
  var _a, _b;
9585
9687
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9586
9688
  ? props.title