blixify-ui-web 1.2.111 → 1.2.112

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