blixify-ui-web 1.2.112 → 1.2.113

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 (35) hide show
  1. package/lib/components/data/dataTemplate/dataStateModel.d.ts +0 -7
  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 +179 -216
  6. package/lib/components/data/dataTemplate/index.js.map +1 -1
  7. package/lib/components/data/dataTemplate/settingsModal.d.ts +1 -9
  8. package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
  9. package/lib/components/data/dataTemplate/settingsModal.js +1 -60
  10. package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
  11. package/lib/components/data/dataTemplate/spaceModel.d.ts +2 -25
  12. package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
  13. package/lib/components/data/{dataTemplate → driveTemplate}/driveUtils.d.ts +30 -6
  14. package/lib/components/data/driveTemplate/driveUtils.d.ts.map +1 -0
  15. package/lib/components/data/{dataTemplate → driveTemplate}/driveUtils.js +87 -28
  16. package/lib/components/data/driveTemplate/driveUtils.js.map +1 -0
  17. package/lib/components/data/driveTemplate/index.d.ts +36 -0
  18. package/lib/components/data/driveTemplate/index.d.ts.map +1 -0
  19. package/lib/components/data/{dataTemplate/driveView.js → driveTemplate/index.js} +527 -241
  20. package/lib/components/data/driveTemplate/index.js.map +1 -0
  21. package/lib/components/display/filePreview/index.d.ts +1 -0
  22. package/lib/components/display/filePreview/index.d.ts.map +1 -1
  23. package/lib/components/display/filePreview/index.js +6 -4
  24. package/lib/components/display/filePreview/index.js.map +1 -1
  25. package/lib/components/index.d.ts +2 -0
  26. package/lib/components/index.d.ts.map +1 -1
  27. package/lib/components/index.js +9 -3
  28. package/lib/components/index.js.map +1 -1
  29. package/lib/tail.css +2 -2
  30. package/package.json +1 -1
  31. package/lib/components/data/dataTemplate/driveUtils.d.ts.map +0 -1
  32. package/lib/components/data/dataTemplate/driveUtils.js.map +0 -1
  33. package/lib/components/data/dataTemplate/driveView.d.ts +0 -43
  34. package/lib/components/data/dataTemplate/driveView.d.ts.map +0 -1
  35. package/lib/components/data/dataTemplate/driveView.js.map +0 -1
@@ -136,8 +136,6 @@ var uploadInput_1 = require("../../input/uploadInput");
136
136
  var bars_1 = require("../../navigation/bars");
137
137
  var breadcrumb_1 = require("../../navigation/breadcrumb");
138
138
  var filePreview_1 = require("../../display/filePreview");
139
- var driveView_1 = require("./driveView");
140
- var driveUtils_1 = require("./driveUtils");
141
139
  var tabs_1 = require("../../navigation/tabs");
142
140
  var link_1 = require("../../structure/link");
143
141
  var authModule_1 = require("../authModule");
@@ -201,10 +199,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
201
199
  // Every read of the view type below uses resolvedType. The distinction matters
202
200
  // most in effect dependency arrays — following props.type there would leave
203
201
  // the list never refetching while the panel is open, which fails silently.
204
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83;
202
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78;
205
203
  // INFO: the panel cannot navigate its way out — handleNavigate("read") is
206
204
  // routed straight back into it — so expand-to-full-page is local state.
207
- var _84 = (0, react_1.useState)(false), drawerPageView = _84[0], setDrawerPageView = _84[1];
205
+ var _79 = (0, react_1.useState)(false), drawerPageView = _79[0], setDrawerPageView = _79[1];
208
206
  // INFO: the panel keeps rendering the record it was opened with rather than
209
207
  // live props. Without this, navigating back to the list would re-render the
210
208
  // still-mounted panel as a second list behind the overlay.
@@ -286,16 +284,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
286
284
  initialFilterReferenceDate: initialFilterReferenceDate,
287
285
  };
288
286
  };
289
- var _85 = intialiseDefaultFilterValues(), initialFilterSearch = _85.initialFilterSearch, initialFilterSearchParams = _85.initialFilterSearchParams, initialFilterSelection = _85.initialFilterSelection, initialFilterReference = _85.initialFilterReference, initialFilterReferenceDate = _85.initialFilterReferenceDate;
287
+ var _80 = intialiseDefaultFilterValues(), initialFilterSearch = _80.initialFilterSearch, initialFilterSearchParams = _80.initialFilterSearchParams, initialFilterSelection = _80.initialFilterSelection, initialFilterReference = _80.initialFilterReference, initialFilterReferenceDate = _80.initialFilterReferenceDate;
290
288
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
291
- var _86 = (0, viewStatePersistence_1.usePersistedViewState)({
289
+ var _81 = (0, viewStatePersistence_1.usePersistedViewState)({
292
290
  mode: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistViewState,
293
291
  collectionId: props.collectionId,
294
292
  persistKey: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey,
295
293
  type: resolvedType,
296
- }), persistedState = _86.persistedState, isPersistEnabled = _86.isEnabled, handleSaveView = _86.handleSaveView;
297
- var _87 = (0, react_1.useState)(false), loading = _87[0], setLoading = _87[1];
298
- var _88 = (0, react_1.useState)(), notification = _88[0], setNotification = _88[1];
294
+ }), persistedState = _81.persistedState, isPersistEnabled = _81.isEnabled, handleSaveView = _81.handleSaveView;
295
+ var _82 = (0, react_1.useState)(false), loading = _82[0], setLoading = _82[1];
296
+ var _83 = (0, react_1.useState)(), notification = _83[0], setNotification = _83[1];
299
297
  // INFO: a success toast is confirmation, not a decision — it clears itself so
300
298
  // it never sits on the floating step bar; errors stay until dismissed
301
299
  (0, react_1.useEffect)(function () {
@@ -305,61 +303,59 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
305
303
  return function () { return clearTimeout(timer); };
306
304
  }, [notification]);
307
305
  //INFO : Used by List
308
- var _89 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _89[0], setFilterSearch = _89[1];
309
- var _90 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _90[0], setFilterSearchParams = _90[1];
310
- var _91 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _91[0], setFilterSelection = _91[1];
311
- var _92 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _92[0], setFilterReference = _92[1];
312
- var _93 = (0, react_1.useState)({}), filterReferenceSearch = _93[0], setFilterReferenceSearch = _93[1];
313
- var _94 = (0, react_1.useState)({}), filterReferenceList = _94[0], setFilterReferenceList = _94[1];
314
- var _95 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
306
+ var _84 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _d !== void 0 ? _d : initialFilterSearch), filterSearch = _84[0], setFilterSearch = _84[1];
307
+ var _85 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _e !== void 0 ? _e : initialFilterSearchParams), filterSearchParams = _85[0], setFilterSearchParams = _85[1];
308
+ var _86 = (0, react_1.useState)((_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _f !== void 0 ? _f : initialFilterSelection), filterSelection = _86[0], setFilterSelection = _86[1];
309
+ var _87 = (0, react_1.useState)((_g = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _g !== void 0 ? _g : initialFilterReference), filterReference = _87[0], setFilterReference = _87[1];
310
+ var _88 = (0, react_1.useState)({}), filterReferenceSearch = _88[0], setFilterReferenceSearch = _88[1];
311
+ var _89 = (0, react_1.useState)({}), filterReferenceList = _89[0], setFilterReferenceList = _89[1];
312
+ var _90 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
315
313
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
316
- : initialFilterReferenceDate), filterReferenceDate = _95[0], setFilterReferenceDate = _95[1];
317
- var _96 = (0, react_1.useState)(true), tableLoading = _96[0], setTableLoading = _96[1];
318
- // INFO: the drive's open folder when the consumer does not control it
319
- var _97 = (0, react_1.useState)(""), driveFolderState = _97[0], setDriveFolderState = _97[1];
320
- var _98 = (0, react_1.useState)(""), cursor = _98[0], setCursor = _98[1];
321
- var _99 = (0, react_1.useState)(""), lastCursor = _99[0], setLastCursor = _99[1];
322
- var _100 = (0, react_1.useState)([]), tableData = _100[0], setTableData = _100[1];
323
- var _101 = (0, react_1.useState)([]), spaceTableData = _101[0], setSpaceTableData = _101[1];
314
+ : initialFilterReferenceDate), filterReferenceDate = _90[0], setFilterReferenceDate = _90[1];
315
+ var _91 = (0, react_1.useState)(true), tableLoading = _91[0], setTableLoading = _91[1];
316
+ var _92 = (0, react_1.useState)(""), cursor = _92[0], setCursor = _92[1];
317
+ var _93 = (0, react_1.useState)(""), lastCursor = _93[0], setLastCursor = _93[1];
318
+ var _94 = (0, react_1.useState)([]), tableData = _94[0], setTableData = _94[1];
319
+ var _95 = (0, react_1.useState)([]), spaceTableData = _95[0], setSpaceTableData = _95[1];
324
320
  // INFO: a save resolves after later renders, so it reads the table from here —
325
321
  // the state it closed over can predate an earlier save on the same row
326
322
  var tableDataRef = (0, react_1.useRef)([]);
327
323
  var spaceTableDataRef = (0, react_1.useRef)([]);
328
324
  tableDataRef.current = tableData;
329
325
  spaceTableDataRef.current = spaceTableData;
330
- var _102 = (0, react_1.useState)(0), size = _102[0], setSize = _102[1];
331
- var _103 = (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 = _103[0], setPageIndex = _103[1];
332
- var _104 = (0, react_1.useState)([]), selectedIds = _104[0], setSelectedIds = _104[1];
333
- var _105 = (0, react_1.useState)(false), selectAll = _105[0], setSelectAll = _105[1];
334
- var _106 = (0, react_1.useState)(""), deletePasscode = _106[0], setDeletePasscode = _106[1];
335
- var _107 = (0, react_1.useState)(""), deletePasscodeInput = _107[0], setDeletePasscodeInput = _107[1];
336
- var _108 = (0, react_1.useState)(""), deleteFeedId = _108[0], setDeleteFeedId = _108[1];
326
+ var _96 = (0, react_1.useState)(0), size = _96[0], setSize = _96[1];
327
+ var _97 = (0, react_1.useState)((_k = (_h = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _h !== void 0 ? _h : (_j = props.organise) === null || _j === void 0 ? void 0 : _j.pageIndex) !== null && _k !== void 0 ? _k : 0), pageIndex = _97[0], setPageIndex = _97[1];
328
+ var _98 = (0, react_1.useState)([]), selectedIds = _98[0], setSelectedIds = _98[1];
329
+ var _99 = (0, react_1.useState)(false), selectAll = _99[0], setSelectAll = _99[1];
330
+ var _100 = (0, react_1.useState)(""), deletePasscode = _100[0], setDeletePasscode = _100[1];
331
+ var _101 = (0, react_1.useState)(""), deletePasscodeInput = _101[0], setDeletePasscodeInput = _101[1];
332
+ var _102 = (0, react_1.useState)(""), deleteFeedId = _102[0], setDeleteFeedId = _102[1];
337
333
  //INFO : Used by List Organise
338
334
  // INFO: Internal sort state that overrides props.organise?.sort when
339
335
  // persistViewState is enabled and a persisted sort exists
340
- var _109 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _109[0], setPersistedSort = _109[1];
341
- var _110 = (0, react_1.useState)(false), filterDraft = _110[0], setFilterDraft = _110[1];
342
- var _111 = (0, react_1.useState)(false), addTabModal = _111[0], setAddTabModal = _111[1];
336
+ var _103 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _l !== void 0 ? _l : undefined), persistedSort = _103[0], setPersistedSort = _103[1];
337
+ var _104 = (0, react_1.useState)(false), filterDraft = _104[0], setFilterDraft = _104[1];
338
+ var _105 = (0, react_1.useState)(false), addTabModal = _105[0], setAddTabModal = _105[1];
343
339
  //INFO : resolve the initial tab synchronously so the mount cond is already
344
340
  // tab-scoped — an empty initial tab caused a second wasted list fetch
345
- var _112 = (0, react_1.useState)(function () {
341
+ var _106 = (0, react_1.useState)(function () {
346
342
  var _a, _b;
347
343
  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);
348
- }), selectedTab = _112[0], setSelectedTab = _112[1];
349
- var _113 = (0, react_1.useState)("dayGridMonth"), calendarView = _113[0], setCalendarView = _113[1];
344
+ }), selectedTab = _106[0], setSelectedTab = _106[1];
345
+ var _107 = (0, react_1.useState)("dayGridMonth"), calendarView = _107[0], setCalendarView = _107[1];
350
346
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
351
347
  // (calendarView above drives the matching range query)
352
- var _114 = (0, react_1.useState)("month"), newCalendarViewMode = _114[0], setNewCalendarViewMode = _114[1];
353
- var _115 = (0, react_1.useState)(new Date()), calendarTabMonth = _115[0], setCalendarTabMonth = _115[1];
354
- var _116 = (0, react_1.useState)(true), kanbanDroppable = _116[0], setKanbanDroppable = _116[1];
355
- var _117 = (0, react_1.useState)([]), kanbanOptions = _117[0], setKanbanOptions = _117[1];
356
- var _118 = (0, react_1.useState)(false), queryForm = _118[0], setQueryForm = _118[1];
357
- var _119 = (0, react_1.useState)(false), batchUpdateModal = _119[0], setBatchUpdateModal = _119[1];
358
- var _120 = (0, react_1.useState)({
348
+ var _108 = (0, react_1.useState)("month"), newCalendarViewMode = _108[0], setNewCalendarViewMode = _108[1];
349
+ var _109 = (0, react_1.useState)(new Date()), calendarTabMonth = _109[0], setCalendarTabMonth = _109[1];
350
+ var _110 = (0, react_1.useState)(true), kanbanDroppable = _110[0], setKanbanDroppable = _110[1];
351
+ var _111 = (0, react_1.useState)([]), kanbanOptions = _111[0], setKanbanOptions = _111[1];
352
+ var _112 = (0, react_1.useState)(false), queryForm = _112[0], setQueryForm = _112[1];
353
+ var _113 = (0, react_1.useState)(false), batchUpdateModal = _113[0], setBatchUpdateModal = _113[1];
354
+ var _114 = (0, react_1.useState)({
359
355
  columnId: "",
360
356
  columnData: {},
361
- }), batchUpdateData = _120[0], setBatchUpdateData = _120[1];
362
- var _121 = (0, react_1.useState)(function () {
357
+ }), batchUpdateData = _114[0], setBatchUpdateData = _114[1];
358
+ var _115 = (0, react_1.useState)(function () {
363
359
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
364
360
  if (!persistedState)
365
361
  return baseModel;
@@ -385,8 +381,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
385
381
  });
386
382
  }
387
383
  return model;
388
- }), structure = _121[0], setStructure = _121[1];
389
- var _122 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _122[0], setAdditionalQuery = _122[1];
384
+ }), structure = _115[0], setStructure = _115[1];
385
+ var _116 = (0, react_1.useState)(((_m = props === null || props === void 0 ? void 0 : props.organise) === null || _m === void 0 ? void 0 : _m.additionalQuery) || []), additionalQuery = _116[0], setAdditionalQuery = _116[1];
390
386
  // INFO: State for user-configurable flex filters (Monday.com-style)
391
387
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
392
388
  var defaultFlexFilterRow = [
@@ -397,9 +393,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
397
393
  value: undefined,
398
394
  },
399
395
  ];
400
- var _123 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
396
+ var _117 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
401
397
  ? persistedState.flexFilters
402
- : defaultFlexFilterRow), flexFilters = _123[0], setFlexFilters = _123[1];
398
+ : defaultFlexFilterRow), flexFilters = _117[0], setFlexFilters = _117[1];
403
399
  // INFO: always-current mirror of flexFilters, read by the imperative apply/
404
400
  // clear methods so chained calls in one tick aren't stale.
405
401
  var flexFiltersRef = (0, react_1.useRef)(flexFilters);
@@ -412,104 +408,104 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
412
408
  }, [flexFilters]);
413
409
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
414
410
  // to prevent API calls on every keystroke when typing in value inputs
415
- var _124 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
411
+ var _118 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
416
412
  ? persistedState.flexFilters
417
- : defaultFlexFilterRow), flexFiltersDebounced = _124[0], setFlexFiltersDebounced = _124[1];
418
- var _125 = (0, react_1.useState)({}), flexFilterReferenceOptions = _125[0], setFlexFilterReferenceOptions = _125[1];
419
- var _126 = (0, react_1.useState)({}), flexFilterReferenceSearch = _126[0], setFlexFilterReferenceSearch = _126[1];
420
- var _127 = (0, react_1.useState)(false), flexFilterModalOpen = _127[0], setFlexFilterModalOpen = _127[1];
421
- var _128 = (0, react_1.useState)(false), viewSettingsModalOpen = _128[0], setViewSettingsModalOpen = _128[1];
413
+ : defaultFlexFilterRow), flexFiltersDebounced = _118[0], setFlexFiltersDebounced = _118[1];
414
+ var _119 = (0, react_1.useState)({}), flexFilterReferenceOptions = _119[0], setFlexFilterReferenceOptions = _119[1];
415
+ var _120 = (0, react_1.useState)({}), flexFilterReferenceSearch = _120[0], setFlexFilterReferenceSearch = _120[1];
416
+ var _121 = (0, react_1.useState)(false), flexFilterModalOpen = _121[0], setFlexFilterModalOpen = _121[1];
417
+ var _122 = (0, react_1.useState)(false), viewSettingsModalOpen = _122[0], setViewSettingsModalOpen = _122[1];
422
418
  // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
423
419
  // Deliberately kept out of `structure`: the props-sync effect below resets
424
420
  // structure to props.model whenever props change, which would wipe the
425
421
  // choice, and the persist effect derives schema-level hiddenColumnIds from
426
422
  // structure — writing user hides there would blur the two concepts.
427
- var _129 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _129[0], setUserHiddenColumnIds = _129[1];
428
- var _130 = (0, react_1.useState)(""), columnSearch = _130[0], setColumnSearch = _130[1];
429
- var _131 = (0, react_1.useState)(null), draggingColumnId = _131[0], setDraggingColumnId = _131[1];
423
+ var _123 = (0, react_1.useState)((_o = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _o !== void 0 ? _o : []), userHiddenColumnIds = _123[0], setUserHiddenColumnIds = _123[1];
424
+ var _124 = (0, react_1.useState)(""), columnSearch = _124[0], setColumnSearch = _124[1];
425
+ var _125 = (0, react_1.useState)(null), draggingColumnId = _125[0], setDraggingColumnId = _125[1];
430
426
  var columnRowRefs = (0, react_1.useRef)({});
431
427
  //INFO : Used by Auth
432
- var _132 = (0, react_1.useState)({
428
+ var _126 = (0, react_1.useState)({
433
429
  email: "",
434
430
  google: "",
435
431
  phone: "",
436
432
  disabled: false,
437
433
  create: false,
438
- }), authMethods = _132[0], setAuthMethods = _132[1];
439
- var _133 = (0, react_1.useState)(""), selectedAuthMethod = _133[0], setSelectedAuthMethod = _133[1];
434
+ }), authMethods = _126[0], setAuthMethods = _126[1];
435
+ var _127 = (0, react_1.useState)(""), selectedAuthMethod = _127[0], setSelectedAuthMethod = _127[1];
440
436
  // INFO: Used by Activity Log
441
- var _134 = (0, react_1.useState)(false), activityModal = _134[0], setActivityModal = _134[1];
442
- var _135 = (0, react_1.useState)(""), activityId = _135[0], setActivityId = _135[1];
437
+ var _128 = (0, react_1.useState)(false), activityModal = _128[0], setActivityModal = _128[1];
438
+ var _129 = (0, react_1.useState)(""), activityId = _129[0], setActivityId = _129[1];
443
439
  //INFO : Used by Export
444
- var _136 = (0, react_1.useState)(null), csvFile = _136[0], setCSVFile = _136[1];
445
- var _137 = (0, react_1.useState)([]), csvFileData = _137[0], setCSVFileData = _137[1];
446
- var _138 = (0, react_1.useState)(0), stepCSVIndex = _138[0], setStepCSVIndex = _138[1];
447
- var _139 = (0, react_1.useState)({}), listCSVMapAttribute = _139[0], setListCSVMapAttribute = _139[1];
448
- var _140 = (0, react_1.useState)({}), listCSVObjAttribute = _140[0], setListCSVObjAttribute = _140[1];
449
- var _141 = (0, react_1.useState)([]), csvAPIAttribute = _141[0], setCSVAPIAttribute = _141[1];
450
- var _142 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _142[0], setExportCSVEmail = _142[1];
451
- var _143 = (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 = _143[0], setExportPDFTitle = _143[1];
452
- var _144 = (0, react_1.useState)(false), exportPDFLoading = _144[0], setExportPDFLoading = _144[1];
453
- var _145 = (0, react_1.useState)(false), exportReadPDFLoading = _145[0], setExportReadPDFLoading = _145[1];
454
- var _146 = (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 = _146[0], setExportSumAttributeIds = _146[1];
455
- var _147 = (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 = _147[0], setHideSubItems = _147[1];
456
- var _148 = (0, react_1.useState)([]), importTableData = _148[0], setImportTableData = _148[1];
457
- var _149 = (0, react_1.useState)([]), queryList = _149[0], setQueryList = _149[1];
458
- var _150 = (0, react_1.useState)(undefined), allQueryList = _150[0], setAllQueryList = _150[1];
459
- var _151 = (0, react_1.useState)(-1), queryIndex = _151[0], setQueryIndex = _151[1];
460
- var _152 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _152[0], setGroupId = _152[1];
461
- var _153 = (0, react_1.useState)(""), readTabSection = _153[0], setReadTabSection = _153[1];
462
- var _154 = (0, react_1.useState)(false), readFloatingNav = _154[0], setReadFloatingNav = _154[1];
440
+ var _130 = (0, react_1.useState)(null), csvFile = _130[0], setCSVFile = _130[1];
441
+ var _131 = (0, react_1.useState)([]), csvFileData = _131[0], setCSVFileData = _131[1];
442
+ var _132 = (0, react_1.useState)(0), stepCSVIndex = _132[0], setStepCSVIndex = _132[1];
443
+ var _133 = (0, react_1.useState)({}), listCSVMapAttribute = _133[0], setListCSVMapAttribute = _133[1];
444
+ var _134 = (0, react_1.useState)({}), listCSVObjAttribute = _134[0], setListCSVObjAttribute = _134[1];
445
+ var _135 = (0, react_1.useState)([]), csvAPIAttribute = _135[0], setCSVAPIAttribute = _135[1];
446
+ var _136 = (0, react_1.useState)(((_p = props.devSettings.currentUser) === null || _p === void 0 ? void 0 : _p.userEmail) || ""), exportCSVEmail = _136[0], setExportCSVEmail = _136[1];
447
+ var _137 = (0, react_1.useState)(((_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.defaultExportPDFName) || ""), exportPDFTitle = _137[0], setExportPDFTitle = _137[1];
448
+ var _138 = (0, react_1.useState)(false), exportPDFLoading = _138[0], setExportPDFLoading = _138[1];
449
+ var _139 = (0, react_1.useState)(false), exportReadPDFLoading = _139[0], setExportReadPDFLoading = _139[1];
450
+ var _140 = (0, react_1.useState)((_u = (_t = (_s = props.organise) === null || _s === void 0 ? void 0 : _s.exportSettings) === null || _t === void 0 ? void 0 : _t.sumColumnId) !== null && _u !== void 0 ? _u : []), exportSumAttributeIds = _140[0], setExportSumAttributeIds = _140[1];
451
+ var _141 = (0, react_1.useState)((_x = (_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.exportSettings) === null || _w === void 0 ? void 0 : _w.hideSubItems) !== null && _x !== void 0 ? _x : false), hideSubItems = _141[0], setHideSubItems = _141[1];
452
+ var _142 = (0, react_1.useState)([]), importTableData = _142[0], setImportTableData = _142[1];
453
+ var _143 = (0, react_1.useState)([]), queryList = _143[0], setQueryList = _143[1];
454
+ var _144 = (0, react_1.useState)(undefined), allQueryList = _144[0], setAllQueryList = _144[1];
455
+ var _145 = (0, react_1.useState)(-1), queryIndex = _145[0], setQueryIndex = _145[1];
456
+ var _146 = (0, react_1.useState)((_y = props.organise) === null || _y === void 0 ? void 0 : _y.groupBy), groupId = _146[0], setGroupId = _146[1];
457
+ var _147 = (0, react_1.useState)(""), readTabSection = _147[0], setReadTabSection = _147[1];
458
+ var _148 = (0, react_1.useState)(false), readFloatingNav = _148[0], setReadFloatingNav = _148[1];
463
459
  var readTabSectionRefs = (0, react_1.useRef)({});
464
460
  //INFO : Used by Read
465
461
  //INFO : Used by Update
466
- var _155 = (0, react_1.useState)(false), modalVisible = _155[0], setModalVisible = _155[1];
467
- var _156 = (0, react_1.useState)(false), deleteModal = _156[0], setDeleteModal = _156[1];
468
- var _157 = (0, react_1.useState)(false), excelModal = _157[0], setExcelModal = _157[1];
469
- var _158 = (0, react_1.useState)(false), exportExcel = _158[0], setExportExcel = _158[1];
470
- var _159 = (0, react_1.useState)(""), exportType = _159[0], setExportType = _159[1];
471
- var _160 = (0, react_1.useState)(false), exportQR = _160[0], setExportQR = _160[1];
472
- var _161 = (0, react_1.useState)(function () {
462
+ var _149 = (0, react_1.useState)(false), modalVisible = _149[0], setModalVisible = _149[1];
463
+ var _150 = (0, react_1.useState)(false), deleteModal = _150[0], setDeleteModal = _150[1];
464
+ var _151 = (0, react_1.useState)(false), excelModal = _151[0], setExcelModal = _151[1];
465
+ var _152 = (0, react_1.useState)(false), exportExcel = _152[0], setExportExcel = _152[1];
466
+ var _153 = (0, react_1.useState)(""), exportType = _153[0], setExportType = _153[1];
467
+ var _154 = (0, react_1.useState)(false), exportQR = _154[0], setExportQR = _154[1];
468
+ var _155 = (0, react_1.useState)(function () {
473
469
  var _a, _b;
474
470
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
475
471
  return firstTabId;
476
- }), activeTab = _161[0], setActiveTab = _161[1];
477
- var _162 = (0, react_1.useState)(false), signatureSigning = _162[0], setSignatureSigning = _162[1];
478
- var _163 = (0, react_1.useState)({}), selectedData = _163[0], setSelectedData = _163[1];
479
- var _164 = (0, react_1.useState)(""), selectedObjectStructureId = _164[0], setSelectedObjectStructureId = _164[1];
480
- var _165 = (0, react_1.useState)(""), selectedObjectId = _165[0], setSelectedObjectId = _165[1];
481
- var _166 = (0, react_1.useState)(""), selectedListAddressId = _166[0], setSelectedListAddressId = _166[1];
482
- var _167 = (0, react_1.useState)(-1), selectedListAddressIndex = _167[0], setSelectedListAddressIndex = _167[1];
483
- var _168 = (0, react_1.useState)({
472
+ }), activeTab = _155[0], setActiveTab = _155[1];
473
+ var _156 = (0, react_1.useState)(false), signatureSigning = _156[0], setSignatureSigning = _156[1];
474
+ var _157 = (0, react_1.useState)({}), selectedData = _157[0], setSelectedData = _157[1];
475
+ var _158 = (0, react_1.useState)(""), selectedObjectStructureId = _158[0], setSelectedObjectStructureId = _158[1];
476
+ var _159 = (0, react_1.useState)(""), selectedObjectId = _159[0], setSelectedObjectId = _159[1];
477
+ var _160 = (0, react_1.useState)(""), selectedListAddressId = _160[0], setSelectedListAddressId = _160[1];
478
+ var _161 = (0, react_1.useState)(-1), selectedListAddressIndex = _161[0], setSelectedListAddressIndex = _161[1];
479
+ var _162 = (0, react_1.useState)({
484
480
  lat: 0,
485
481
  lng: 0,
486
482
  name: "",
487
- }), selectedListAddress = _168[0], setSelectedListAddress = _168[1];
488
- var _169 = (0, react_1.useState)({}), selectedObjectData = _169[0], setSelectedObjectData = _169[1];
489
- var _170 = (0, react_1.useState)(null), objectCellEdit = _170[0], setObjectCellEdit = _170[1];
490
- var _171 = (0, react_1.useState)(false), referenceLoading = _171[0], setReferenceLoading = _171[1];
491
- var _172 = (0, react_1.useState)({}), referencesOptions = _172[0], setReferencesOptions = _172[1];
492
- var _173 = (0, react_1.useState)({}), referencesDetails = _173[0], setReferencesDetails = _173[1];
493
- var _174 = (0, react_1.useState)({}), listReferencesOptions = _174[0], setListReferencesOptions = _174[1];
494
- var _175 = (0, react_1.useState)({}), referenceDeleteTableData = _175[0], setReferenceDeleteTableData = _175[1];
495
- var _176 = (0, react_1.useState)(0), referenceDeleteIndex = _176[0], setReferenceDeleteIndex = _176[1];
496
- var _177 = (0, react_1.useState)({
483
+ }), selectedListAddress = _162[0], setSelectedListAddress = _162[1];
484
+ var _163 = (0, react_1.useState)({}), selectedObjectData = _163[0], setSelectedObjectData = _163[1];
485
+ var _164 = (0, react_1.useState)(null), objectCellEdit = _164[0], setObjectCellEdit = _164[1];
486
+ var _165 = (0, react_1.useState)(false), referenceLoading = _165[0], setReferenceLoading = _165[1];
487
+ var _166 = (0, react_1.useState)({}), referencesOptions = _166[0], setReferencesOptions = _166[1];
488
+ var _167 = (0, react_1.useState)({}), referencesDetails = _167[0], setReferencesDetails = _167[1];
489
+ var _168 = (0, react_1.useState)({}), listReferencesOptions = _168[0], setListReferencesOptions = _168[1];
490
+ var _169 = (0, react_1.useState)({}), referenceDeleteTableData = _169[0], setReferenceDeleteTableData = _169[1];
491
+ var _170 = (0, react_1.useState)(0), referenceDeleteIndex = _170[0], setReferenceDeleteIndex = _170[1];
492
+ var _171 = (0, react_1.useState)({
497
493
  id: "",
498
494
  name: "",
499
495
  type: "string",
500
- }), referenceCreationModal = _177[0], setReferenceCreationModal = _177[1];
501
- var _178 = (0, react_1.useState)({}), referenceModelSchema = _178[0], setReferenceSchema = _178[1];
502
- var _179 = (0, react_1.useState)([]), kanbanChecked = _179[0], setKanbanChecked = _179[1];
496
+ }), referenceCreationModal = _171[0], setReferenceCreationModal = _171[1];
497
+ var _172 = (0, react_1.useState)({}), referenceModelSchema = _172[0], setReferenceSchema = _172[1];
498
+ var _173 = (0, react_1.useState)([]), kanbanChecked = _173[0], setKanbanChecked = _173[1];
503
499
  //INFO : Offline
504
- var _180 = (0, react_1.useState)(0), offlineDataLength = _180[0], setOfflineDataLength = _180[1];
505
- var _181 = (0, react_1.useState)(false), offlineModal = _181[0], setOfflineModal = _181[1];
500
+ var _174 = (0, react_1.useState)(0), offlineDataLength = _174[0], setOfflineDataLength = _174[1];
501
+ var _175 = (0, react_1.useState)(false), offlineModal = _175[0], setOfflineModal = _175[1];
506
502
  // INFO: live-stream state — driven by socket connection and navigator.onLine
507
- var _182 = (0, react_1.useState)(false), isLive = _182[0], setIsLive = _182[1];
508
- var _183 = (0, react_1.useState)(false), isLiveOffline = _183[0], setIsLiveOffline = _183[1];
503
+ var _176 = (0, react_1.useState)(false), isLive = _176[0], setIsLive = _176[1];
504
+ var _177 = (0, react_1.useState)(false), isLiveOffline = _177[0], setIsLiveOffline = _177[1];
509
505
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
510
506
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
511
507
  // Independent of SSE status so it works even when bareSocketName is not set.
512
- var _184 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _184[0], setIsNetworkOffline = _184[1];
508
+ var _178 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _178[0], setIsNetworkOffline = _178[1];
513
509
  var previousType = (0, react_1.useRef)(null);
514
510
  var previousSelectedData = (0, react_1.useRef)(null);
515
511
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -621,7 +617,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
621
617
  var isSchemaHideMode = ((_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.onChangeHide) ? true : false;
622
618
  // INFO: rows per page is a view setting the user can change, so it starts from
623
619
  // the persisted value and falls back to the consumer's limit
624
- var _185 = (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 = _185[0], setPageLimit = _185[1];
620
+ 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];
625
621
  var limit = pageLimit;
626
622
  var activeSortId = (isPersistEnabled && persistedSort) || ((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.sort);
627
623
  var handleSortColumn = function (value) {
@@ -630,7 +626,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
630
626
  setPersistedSort(value);
631
627
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
632
628
  };
633
- var _186 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _186.canUpdateRecord, canInlineUpdate = _186.canInlineUpdate, canBatchUpdate = _186.canBatchUpdate, canDeleteRecord = _186.canDeleteRecord;
629
+ var _180 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _180.canUpdateRecord, canInlineUpdate = _180.canInlineUpdate, canBatchUpdate = _180.canBatchUpdate, canDeleteRecord = _180.canDeleteRecord;
634
630
  var isEditor = ((_12 = props.edit) === null || _12 === void 0 ? void 0 : _12.allEditable) ? true : false;
635
631
  var isOffline = (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareOffline;
636
632
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
@@ -658,27 +654,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
658
654
  return eachTab.viewType === "file" &&
659
655
  (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
660
656
  })) === null || _22 === void 0 ? void 0 : _22.fileSettings) === null || _23 === void 0 ? void 0 : _23.columnId;
661
- // INFO: resolved from the raw tabs by the view id, the same way the file view
662
- // resolves its column — selectedTab can lag the view on a switch
663
- var driveSettings = (_26 = ((_25 = (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.extendedTabs) !== null && _25 !== void 0 ? _25 : []).find(function (eachTab) {
664
- return eachTab.viewType === "drive" &&
665
- (0, utils_1.lowercaseTextToId)(eachTab.name) === viewType;
666
- })) === null || _26 === void 0 ? void 0 : _26.driveSettings;
667
- var driveFolderId = (_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.folderId) !== null && _28 !== void 0 ? _28 : driveFolderState;
668
- var hasNavigation = ((_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.handleNavigate) ? true : false;
657
+ var hasNavigation = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.handleNavigate) ? true : false;
669
658
  var formColumn = "grid-cols-12";
670
- var useMobileView = (_31 = (_30 = props.bareSettings) === null || _30 === void 0 ? void 0 : _30.bareUpdateMobileView) !== null && _31 !== void 0 ? _31 : false;
659
+ var useMobileView = (_26 = (_25 = props.bareSettings) === null || _25 === void 0 ? void 0 : _25.bareUpdateMobileView) !== null && _26 !== void 0 ? _26 : false;
671
660
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
672
- var isActivityLog = (((_33 = (_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.activityLog) === null || _33 === void 0 ? void 0 : _33.enableComments) &&
673
- ((_34 = props.edit) === null || _34 === void 0 ? void 0 : _34.activityLog.commentCollectionId)) ||
674
- (((_36 = (_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.activityLog) === null || _36 === void 0 ? void 0 : _36.enableLogs) &&
675
- ((_37 = props.edit) === null || _37 === void 0 ? void 0 : _37.activityLog.logsCollectionId));
676
- var customPaginationSize = ((_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.customPaginationCount)
661
+ var isActivityLog = (((_28 = (_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.activityLog) === null || _28 === void 0 ? void 0 : _28.enableComments) &&
662
+ ((_29 = props.edit) === null || _29 === void 0 ? void 0 : _29.activityLog.commentCollectionId)) ||
663
+ (((_31 = (_30 = props.edit) === null || _30 === void 0 ? void 0 : _30.activityLog) === null || _31 === void 0 ? void 0 : _31.enableLogs) &&
664
+ ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.activityLog.logsCollectionId));
665
+ var customPaginationSize = ((_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.customPaginationCount)
677
666
  ? props.organise.customPaginationCount(size)
678
667
  : undefined;
679
668
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
680
669
  var writeServerQuery = new writeQuery_1.WriteQuery({
681
- dbModule: (_39 = props.lib) === null || _39 === void 0 ? void 0 : _39.axios,
670
+ dbModule: (_34 = props.lib) === null || _34 === void 0 ? void 0 : _34.axios,
682
671
  dbType: devSettings.server,
683
672
  dbCollection: props.collectionId,
684
673
  dbEndpoint: devSettings.dbEndpoint,
@@ -686,7 +675,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
686
675
  dbUserToken: devSettings.dbUserToken,
687
676
  });
688
677
  var readServerQuery = new readQuery_1.ReadQuery({
689
- dbModule: (_40 = props.lib) === null || _40 === void 0 ? void 0 : _40.axios,
678
+ dbModule: (_35 = props.lib) === null || _35 === void 0 ? void 0 : _35.axios,
690
679
  dbType: devSettings.server,
691
680
  dbCollection: props.collectionId,
692
681
  dbEndpoint: devSettings.dbEndpoint,
@@ -694,9 +683,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
694
683
  dbUserToken: devSettings.dbUserToken,
695
684
  });
696
685
  var moreButtonPopUp = [
697
- ((_41 = props.edit) === null || _41 === void 0 ? void 0 : _41.allEditable) &&
686
+ ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) &&
698
687
  !isFirebase &&
699
- !((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.exportSettings) === null || _43 === void 0 ? void 0 : _43.hideImportCSV)
688
+ !((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.exportSettings) === null || _38 === void 0 ? void 0 : _38.hideImportCSV)
700
689
  ? {
701
690
  text: "Import Excel",
702
691
  onClick: function () {
@@ -705,7 +694,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
705
694
  },
706
695
  }
707
696
  : null,
708
- !((_45 = (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.exportSettings) === null || _45 === void 0 ? void 0 : _45.hideExportCSV)
697
+ !((_40 = (_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.exportSettings) === null || _40 === void 0 ? void 0 : _40.hideExportCSV)
709
698
  ? {
710
699
  text: "Export CSV",
711
700
  onClick: function () {
@@ -715,7 +704,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
715
704
  },
716
705
  }
717
706
  : null,
718
- !((_47 = (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.exportSettings) === null || _47 === void 0 ? void 0 : _47.hideExportExcel)
707
+ !((_42 = (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.exportSettings) === null || _42 === void 0 ? void 0 : _42.hideExportExcel)
719
708
  ? {
720
709
  text: "Export Excel",
721
710
  onClick: function () {
@@ -725,7 +714,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
725
714
  },
726
715
  }
727
716
  : null,
728
- !((_49 = (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.exportSettings) === null || _49 === void 0 ? void 0 : _49.hideExportPDF)
717
+ !((_44 = (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.exportSettings) === null || _44 === void 0 ? void 0 : _44.hideExportPDF)
729
718
  ? {
730
719
  text: "Export PDF",
731
720
  onClick: function () {
@@ -735,7 +724,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
735
724
  },
736
725
  }
737
726
  : null,
738
- !((_51 = (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.exportSettings) === null || _51 === void 0 ? void 0 : _51.hideExportQR)
727
+ !((_46 = (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.exportSettings) === null || _46 === void 0 ? void 0 : _46.hideExportQR)
739
728
  ? {
740
729
  text: "Export QR",
741
730
  onClick: function () {
@@ -745,7 +734,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
745
734
  },
746
735
  }
747
736
  : null,
748
- !((_53 = (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.exportSettings) === null || _53 === void 0 ? void 0 : _53.hideExportQR)
737
+ !((_48 = (_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.exportSettings) === null || _48 === void 0 ? void 0 : _48.hideExportQR)
749
738
  ? {
750
739
  text: "Export QR(Data)",
751
740
  onClick: function () {
@@ -755,7 +744,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
755
744
  },
756
745
  }
757
746
  : null,
758
- !((_55 = (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.exportSettings) === null || _55 === void 0 ? void 0 : _55.hideExportPrint)
747
+ !((_50 = (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.exportSettings) === null || _50 === void 0 ? void 0 : _50.hideExportPrint)
759
748
  ? {
760
749
  text: "Print",
761
750
  onClick: function () {
@@ -765,7 +754,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
765
754
  },
766
755
  }
767
756
  : null,
768
- !((_57 = (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.exportSettings) === null || _57 === void 0 ? void 0 : _57.hideExportDraft)
757
+ !((_52 = (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.exportSettings) === null || _52 === void 0 ? void 0 : _52.hideExportDraft)
769
758
  ? {
770
759
  text: filterDraft ? "Show All Items" : "Filter Draft",
771
760
  onClick: function () {
@@ -774,7 +763,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
774
763
  }
775
764
  : null,
776
765
  ].filter(Boolean);
777
- if ((_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.moreSettings)
766
+ if ((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.moreSettings)
778
767
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
779
768
  //=====================================================================================
780
769
  //SECTION: User Column Visibility Handlers
@@ -1094,7 +1083,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1094
1083
  (0, react_1.useEffect)(function () {
1095
1084
  handleOfflinePrefetch();
1096
1085
  /* eslint-disable */
1097
- }, [props.collectionId, (_59 = props.bareSettings) === null || _59 === void 0 ? void 0 : _59.bareOffline]);
1086
+ }, [props.collectionId, (_54 = props.bareSettings) === null || _54 === void 0 ? void 0 : _54.bareOffline]);
1098
1087
  /* eslint-enable */
1099
1088
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
1100
1089
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -1114,7 +1103,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1114
1103
  }, interval);
1115
1104
  return function () { return clearInterval(timer); };
1116
1105
  /* eslint-disable */
1117
- }, [(_60 = props.bareSettings) === null || _60 === void 0 ? void 0 : _60.barePollingInterval, isLive, isNetworkOffline]);
1106
+ }, [(_55 = props.bareSettings) === null || _55 === void 0 ? void 0 : _55.barePollingInterval, isLive, isNetworkOffline]);
1118
1107
  /* eslint-enable */
1119
1108
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
1120
1109
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -1156,7 +1145,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1156
1145
  };
1157
1146
  /* eslint-disable */
1158
1147
  }, [
1159
- (_61 = props.bareSettings) === null || _61 === void 0 ? void 0 : _61.bareSocketName,
1148
+ (_56 = props.bareSettings) === null || _56 === void 0 ? void 0 : _56.bareSocketName,
1160
1149
  props.collectionId,
1161
1150
  props.devSettings.sseEndpoint,
1162
1151
  props.devSettings.dbAPIToken,
@@ -1401,10 +1390,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1401
1390
  props.collectionId,
1402
1391
  props.model,
1403
1392
  props.localURLEndpoint,
1404
- (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.extendedTabs,
1405
- (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.viewId,
1406
- (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.additionalQuery,
1407
- (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.groupBy,
1393
+ (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.extendedTabs,
1394
+ (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.viewId,
1395
+ (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.additionalQuery,
1396
+ (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.groupBy,
1408
1397
  resolvedType,
1409
1398
  ]);
1410
1399
  /**
@@ -1545,7 +1534,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1545
1534
  };
1546
1535
  }, 100);
1547
1536
  return function () { return clearTimeout(timeoutId); };
1548
- }, [(_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.showReadFloatingNav, resolvedType, props.id, loading]);
1537
+ }, [(_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.showReadFloatingNav, resolvedType, props.id, loading]);
1549
1538
  (0, react_1.useEffect)(function () {
1550
1539
  if (resolvedType !== "read")
1551
1540
  return;
@@ -2141,14 +2130,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2141
2130
  });
2142
2131
  }
2143
2132
  }
2144
- // INFO: a drive lists the open folder — unless a search is running, which
2145
- // looks across the whole drive the way a file browser's search does
2146
- var isDriveTab = !!(driveSettings === null || driveSettings === void 0 ? void 0 : driveSettings.parentColumnId);
2147
- if (isDriveTab &&
2148
- driveSettings &&
2149
- !query.some(function (eachQuery) { return eachQuery.type === "search"; })) {
2150
- query.push((0, driveUtils_1.handleBuildDriveFolderQuery)(driveSettings, driveFolderId));
2151
- }
2152
2133
  var cond = {
2153
2134
  type: "list",
2154
2135
  query: query,
@@ -2167,11 +2148,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2167
2148
  unwind: fileViewColumnId,
2168
2149
  skip: 0,
2169
2150
  };
2170
- // INFO: a folder is sorted folders-first on the client, which only holds
2171
- // if the whole folder arrives at once
2172
2151
  if (calendarSettings ||
2173
2152
  (selectedTab && selectedTab.viewType === "map") ||
2174
- isDriveTab ||
2175
2153
  groupId) {
2176
2154
  cond.limit = undefined;
2177
2155
  cond.stopLimit = true;
@@ -7067,7 +7045,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7067
7045
  }
7068
7046
  else if (((_e = props.edit) === null || _e === void 0 ? void 0 : _e.allEditable) || ((_f = props.edit) === null || _f === void 0 ? void 0 : _f.createBtn)) {
7069
7047
  listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
7070
- driveSettings ? null : hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-create", icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
7048
+ hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-create", icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
7071
7049
  var _a, _b;
7072
7050
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", "new");
7073
7051
  } })) : (react_1.default.createElement(link_1.Link, { href: "".concat(props.localURLEndpoint, "?data=new&type=update&collection=").concat(props.collectionId), linkType: props.linkType, custom: props.custom },
@@ -8126,7 +8104,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8126
8104
  if (((_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) &&
8127
8105
  ((_b = props.organise.extendedTabs) === null || _b === void 0 ? void 0 : _b.length) > 0) {
8128
8106
  (_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs.map(function (eachTab) {
8129
- var _a, _b, _c, _d, _e, _f, _g, _h;
8107
+ var _a, _b, _c, _d, _e, _f, _g;
8130
8108
  var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(resolvedType, "&collection=").concat(props.collectionId);
8131
8109
  if (props.id)
8132
8110
  hrefPoint += "&data=".concat(props.id);
@@ -8147,7 +8125,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8147
8125
  // still unwound the column (it reads the raw extendedTabs) while
8148
8126
  // the tile had no column to read and every file said "Attachment".
8149
8127
  fileSettings: (_e = eachTab.fileSettings) !== null && _e !== void 0 ? _e : undefined,
8150
- driveSettings: (_f = eachTab.driveSettings) !== null && _f !== void 0 ? _f : undefined,
8151
8128
  };
8152
8129
  if (eachTab.viewType === "iframe") {
8153
8130
  if (typeof eachTab.src === "string") {
@@ -8162,7 +8139,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8162
8139
  }
8163
8140
  if (eachTab.type === resolvedType) {
8164
8141
  tabs.push(__assign(__assign(__assign({}, tabData), (isEditor &&
8165
- ((_g = props.organise) === null || _g === void 0 ? void 0 : _g.onChangeTabs) && {
8142
+ ((_f = props.organise) === null || _f === void 0 ? void 0 : _f.onChangeTabs) && {
8166
8143
  action: (react_1.default.createElement("span", { role: "button", "data-testid": "tab-default-".concat(tabData.id), "aria-label": eachTab.defaultTab
8167
8144
  ? "Opens by default"
8168
8145
  : "Open this tab by default", className: "ml-2 self-center ".concat(eachTab.defaultTab
@@ -8172,7 +8149,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8172
8149
  e.preventDefault();
8173
8150
  handleToggleDefaultTab(eachTab.name);
8174
8151
  } }, 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" })))),
8175
- })), (!((_h = props.edit) === null || _h === void 0 ? void 0 : _h.disabledTabsDeleteBtn) && {
8152
+ })), (!((_g = props.edit) === null || _g === void 0 ? void 0 : _g.disabledTabsDeleteBtn) && {
8176
8153
  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) {
8177
8154
  e.stopPropagation();
8178
8155
  e.preventDefault();
@@ -8643,7 +8620,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8643
8620
  }
8644
8621
  };
8645
8622
  var renderTabContent = function (tabs, dataType, requestedViewType) {
8646
- 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;
8623
+ 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;
8647
8624
  var matchedTab = tabs.find(function (eachTab) { return eachTab.id === requestedViewType; });
8648
8625
  /**
8649
8626
  * INFO: a list tab must not supply the content of a read view. The selected
@@ -8968,36 +8945,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8968
8945
  handlePagination(value);
8969
8946
  }, darkMode: (_17 = props.organise) === null || _17 === void 0 ? void 0 : _17.darkMode, customPaginationSize: customPaginationSize })));
8970
8947
  }
8971
- else if (selectedTabData.viewType === "drive" &&
8972
- resolvedType === "list" &&
8973
- driveSettings) {
8974
- return (react_1.default.createElement(driveView_1.DriveView, { rows: tableData, loading: tableLoading, searching: ((_18 = renderImpSearchFilterConditions()) !== null && _18 !== void 0 ? _18 : []).some(function (eachQuery) { return eachQuery.type === "search"; }), settings: driveSettings, structure: structure, collectionId: props.collectionId, serverId: serverId, folderId: driveFolderId, baseQuery: ((_19 = renderImpSearchFilterConditions()) !== null && _19 !== void 0 ? _19 : []).filter(function (eachQuery) { return eachQuery.type !== "search"; }), imageEndpoint: ((_20 = props.devSettings) === null || _20 === void 0 ? void 0 : _20.imageEndpoint) || devSettings.imageEndpoint, uploadEndpoint: devSettings.uploadEndpoint || "/api/asset", bucketName: devSettings.bucketName, canCreate: !!(((_21 = props.edit) === null || _21 === void 0 ? void 0 : _21.allEditable) || ((_22 = props.edit) === null || _22 === void 0 ? void 0 : _22.createBtn)), canUpdate: canUpdateRecord || canInlineUpdate, canDelete: canDeleteRecord, darkMode: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.darkMode, lib: { axios: (_24 = props.lib) === null || _24 === void 0 ? void 0 : _24.axios }, readQuery: readServerQuery, writeQuery: writeServerQuery, handleUpload: handleUploadAxios, handleChangeFolder: function (folderId) {
8975
- var _a;
8976
- if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeFolder)
8977
- props.organise.onChangeFolder(folderId);
8978
- else
8979
- setDriveFolderState(folderId);
8980
- }, handleClearSearch: function () {
8981
- setFilterSearch({});
8982
- setFilterSearchParams({});
8983
- }, handleRefresh: function () { var _a; return (_a = listRQueryHocRef.current) === null || _a === void 0 ? void 0 : _a.handleRefresh(); }, handleOpenDetails: function (rowId) { 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", rowId, "general"); } }));
8984
- }
8985
8948
  else if (selectedTabData.viewType === "grid") {
8986
8949
  var isScrollMode = renderCheckScrollMode();
8987
8950
  return (react_1.default.createElement(react_1.default.Fragment, null,
8988
- 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) {
8951
+ react_1.default.createElement(grid_1.Grid, { darkMode: (_18 = props.organise) === null || _18 === void 0 ? void 0 : _18.darkMode, darkModeBg: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.darkModeBg, paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
8989
8952
  var _a, _b;
8990
8953
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8991
- }, 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) {
8954
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_21 = (_20 = props.newTabUrl) === null || _20 === void 0 ? void 0 : _20.default) !== null && _21 !== void 0 ? _21 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_23 = (_22 = props.newTabUrl) === null || _22 === void 0 ? void 0 : _22.addons) !== null && _23 !== void 0 ? _23 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8992
8955
  handlePagination(value);
8993
- }, 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",
8956
+ }, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_24 = props.bareSettings) === null || _24 === void 0 ? void 0 : _24.bareListGridColClassName, className: "mt-5",
8994
8957
  // INFO: under the new DTW the grid keeps the same footer as the
8995
8958
  // table and list views instead of its own legacy page buttons
8996
- hidePagination: ((_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.hidePagination) ||
8997
- !!((_33 = props.bareSettings) === null || _33 === void 0 ? void 0 : _33.bareNewDTW), customPaginationSize: customPaginationSize }),
8998
- ((_34 = props.bareSettings) === null || _34 === void 0 ? void 0 : _34.bareNewDTW) &&
8999
- !((_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")
9000
- .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) {
8959
+ hidePagination: ((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.hidePagination) ||
8960
+ !!((_26 = props.bareSettings) === null || _26 === void 0 ? void 0 : _26.bareNewDTW), customPaginationSize: customPaginationSize }),
8961
+ ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareNewDTW) &&
8962
+ !((_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.hidePagination) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: renderGridAndListData(selectedTabData.viewImage, "grid")
8963
+ .length, customPaginationSize: customPaginationSize, darkMode: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.darkMode, darkModeBg: (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.darkModeBg, handleUpdatePageIndex: function (value) {
9001
8964
  handlePagination(value);
9002
8965
  } }))));
9003
8966
  }
@@ -9099,7 +9062,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9099
9062
  return eventAvailabilities;
9100
9063
  };
9101
9064
  // INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
9102
- if ((_38 = props.bareSettings) === null || _38 === void 0 ? void 0 : _38.bareNewDTW) {
9065
+ if ((_31 = props.bareSettings) === null || _31 === void 0 ? void 0 : _31.bareNewDTW) {
9103
9066
  var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
9104
9067
  var _a, _b, _c, _d;
9105
9068
  return ({
@@ -9119,13 +9082,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9119
9082
  // INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
9120
9083
  // query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
9121
9084
  // agenda lists the fetched month chronologically.
9122
- var viewSwitchOptions = (_39 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _39 !== void 0 ? _39 : [];
9085
+ var viewSwitchOptions = (_32 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.viewSwitch) !== null && _32 !== void 0 ? _32 : [];
9123
9086
  var VIEW_VARIANT_MAP = {
9124
9087
  month: "fullMonth",
9125
9088
  week: "weekTimeGrid",
9126
9089
  agenda: "agenda",
9127
9090
  };
9128
- var activeVariant = (_40 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _40 !== void 0 ? _40 : "fullMonth";
9091
+ var activeVariant = (_33 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _33 !== void 0 ? _33 : "fullMonth";
9129
9092
  return (react_1.default.createElement("div", { className: "mt-4" },
9130
9093
  viewSwitchOptions.length > 1 && (react_1.default.createElement("div", { className: "mb-2 flex justify-end" },
9131
9094
  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 () {
@@ -9167,9 +9130,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9167
9130
  var _a, _b;
9168
9131
  if (event.id)
9169
9132
  (_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");
9170
- }, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, className: "w-full" }))));
9133
+ }, darkMode: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.darkMode, className: "w-full" }))));
9171
9134
  }
9172
- 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) {
9135
+ return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_35 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _35 !== void 0 ? _35 : calendarView, handleMonthChange: function (date) {
9173
9136
  var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
9174
9137
  var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
9175
9138
  if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
@@ -9187,7 +9150,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9187
9150
  else if (selectedTabData.viewType === "feeds") {
9188
9151
  var contentList_1 = [];
9189
9152
  var feedsSettings_1 = selectedTabData.feedsSettings;
9190
- 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);
9153
+ var customFeedsData = (_36 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _36 === void 0 ? void 0 : _36.call(feedsSettings_1, tableData, spaceTableData);
9191
9154
  if (customFeedsData && customFeedsData.length > 0) {
9192
9155
  customFeedsData.map(function (eachData) {
9193
9156
  var _a, _b, _c, _d;
@@ -9232,21 +9195,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9232
9195
  return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", {
9233
9196
  // INFO: NewFeeds is already a card like the table and list, so the new
9234
9197
  // DTW renders it bare; the legacy feed still needs its own surface
9235
- className: ((_44 = props.bareSettings) === null || _44 === void 0 ? void 0 : _44.bareNewDTW)
9198
+ className: ((_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareNewDTW)
9236
9199
  ? ""
9237
- : "p-4 rounded-lg ".concat(((_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkMode) ? "bg-white/5" : "bg-white") },
9238
- ((_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 })),
9200
+ : "p-4 rounded-lg ".concat(((_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.darkMode) ? "bg-white/5" : "bg-white") },
9201
+ ((_39 = props.bareSettings) === null || _39 === void 0 ? void 0 : _39.bareNewDTW) ? (react_1.default.createElement(newFeeds_1.NewFeeds, { bold: true, content: contentList_1, darkMode: (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.darkMode, onClickItem: function (id) { var _a, _b; return (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general"); } })) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode })),
9239
9202
  react_1.default.createElement("div", { className: "my-10" }),
9240
9203
  contentList_1.length > 0 &&
9241
- !((_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.hidePagination) &&
9242
- ((_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) {
9204
+ !((_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.hidePagination) &&
9205
+ ((_43 = props.bareSettings) === null || _43 === void 0 ? void 0 : _43.bareNewDTW) && (react_1.default.createElement(newPagination_1.NewPagination, { paginationType: renderResolvedPaginationType(), pageIndex: pageIndex, limit: limit, size: size, cursor: cursor, resultCount: tableData.length, customPaginationSize: customPaginationSize, darkMode: (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.darkMode, darkModeBg: (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.darkModeBg, handleUpdatePageIndex: function (value) {
9243
9206
  handlePagination(value);
9244
9207
  } })),
9245
9208
  contentList_1.length > 0 &&
9246
- !((_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.hidePagination) &&
9247
- !((_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) {
9209
+ !((_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.hidePagination) &&
9210
+ !((_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareNewDTW) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
9248
9211
  handlePagination(value);
9249
- }, darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, customPaginationSize: customPaginationSize }))))));
9212
+ }, darkMode: (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.darkMode, customPaginationSize: customPaginationSize }))))));
9250
9213
  }
9251
9214
  else if (selectedTabData.viewType === "map") {
9252
9215
  var mapSettings_1 = selectedTabData.mapSettings;
@@ -9349,7 +9312,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9349
9312
  }
9350
9313
  else if (selectedTabData.viewType === "kanban") {
9351
9314
  var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
9352
- var kanbanTitle_2 = (_56 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _56 !== void 0 ? _56 : "";
9315
+ var kanbanTitle_2 = (_49 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _49 !== void 0 ? _49 : "";
9353
9316
  var nullColumn_1 = false;
9354
9317
  var groupBy_1 = [];
9355
9318
  var groupLabel_1 = [];
@@ -9370,10 +9333,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9370
9333
  });
9371
9334
  var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
9372
9335
  // INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
9373
- if ((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareNewDTW) {
9336
+ if ((_50 = props.bareSettings) === null || _50 === void 0 ? void 0 : _50.bareNewDTW) {
9374
9337
  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
9375
9338
  ? "Data has exceeded limit, please apply filters"
9376
- : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_58 = props.bareSettings) === null || _58 === void 0 ? void 0 : _58.bareListMobileView, onUpdateData: canUpdateRecord
9339
+ : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: canUpdateRecord, droppable: canUpdateRecord && kanbanDroppable, mobileView: (_51 = props.bareSettings) === null || _51 === void 0 ? void 0 : _51.bareListMobileView, onUpdateData: canUpdateRecord
9377
9340
  ? function (cardId, _fromCol, toCol) { return __awaiter(void 0, void 0, void 0, function () {
9378
9341
  var _a;
9379
9342
  return __generator(this, function (_b) {
@@ -9397,7 +9360,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9397
9360
  : undefined, onClickData: function (id) {
9398
9361
  var _a, _b;
9399
9362
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
9400
- }, darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode }));
9363
+ }, darkMode: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkMode }));
9401
9364
  }
9402
9365
  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
9403
9366
  ? "Data has exceeded limit, please apply filters"
@@ -9905,7 +9868,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9905
9868
  };
9906
9869
  return (react_1.default.createElement(react_1.default.Fragment, null,
9907
9870
  renderNotification("root"),
9908
- ((_68 = (_67 = props.renderSettings) === null || _67 === void 0 ? void 0 : _67.renderLoadingUI) === null || _68 === void 0 ? void 0 : _68.call(_67)) && loading ? ((_69 = props.renderSettings) === null || _69 === void 0 ? void 0 : _69.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_70 = props.organise) === null || _70 === void 0 ? void 0 : _70.darkMode, darkModeBg: (_71 = props.organise) === null || _71 === void 0 ? void 0 : _71.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9871
+ ((_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 () {
9909
9872
  var _a, _b;
9910
9873
  if (loading)
9911
9874
  return;
@@ -9916,7 +9879,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9916
9879
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9917
9880
  }
9918
9881
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9919
- react_1.default.createElement(modal_1.Modal, { darkMode: (_72 = props.organise) === null || _72 === void 0 ? void 0 : _72.darkMode, darkModeBg: (_73 = props.organise) === null || _73 === void 0 ? void 0 : _73.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9882
+ 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 () {
9920
9883
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9921
9884
  if (dataId) {
9922
9885
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9932,19 +9895,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9932
9895
  }, onClose: function () {
9933
9896
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9934
9897
  } }),
9935
- react_1.default.createElement(modal_1.Modal, { darkMode: (_74 = props.organise) === null || _74 === void 0 ? void 0 : _74.darkMode, darkModeBg: (_75 = props.organise) === null || _75 === void 0 ? void 0 : _75.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9898
+ 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 () {
9936
9899
  setReferenceDeleteTableData({});
9937
9900
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9938
- react_1.default.createElement(modal_1.Modal, { darkMode: (_76 = props.organise) === null || _76 === void 0 ? void 0 : _76.darkMode, darkModeBg: (_77 = props.organise) === null || _77 === void 0 ? void 0 : _77.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9901
+ 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 () {
9939
9902
  setDeletePasscodeInput("");
9940
9903
  setDeleteModal(!deleteModal);
9941
9904
  setDeleteFeedId("");
9942
9905
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9943
- react_1.default.createElement(modal_1.Modal, { darkMode: (_78 = props.organise) === null || _78 === void 0 ? void 0 : _78.darkMode, darkModeBg: (_79 = props.organise) === null || _79 === void 0 ? void 0 : _79.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9906
+ 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 () {
9944
9907
  setBatchUpdateData({ columnId: "", columnData: {} });
9945
9908
  setBatchUpdateModal(false);
9946
9909
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9947
- react_1.default.createElement(modal_1.Modal, { darkMode: (_80 = props.organise) === null || _80 === void 0 ? void 0 : _80.darkMode, darkModeBg: (_81 = props.organise) === null || _81 === void 0 ? void 0 : _81.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9910
+ 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 () {
9948
9911
  var _a;
9949
9912
  if (props.space)
9950
9913
  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 }));
@@ -9952,7 +9915,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9952
9915
  }, onClose: function () {
9953
9916
  setSelectedAuthMethod("");
9954
9917
  } }),
9955
- isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_82 = props.organise) === null || _82 === void 0 ? void 0 : _82.darkMode, darkModeBg: (_83 = props.organise) === null || _83 === void 0 ? void 0 : _83.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9918
+ 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 () {
9956
9919
  var _a, _b;
9957
9920
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9958
9921
  ? props.title