blixify-ui-web 1.2.67 → 1.2.69

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 -5
  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 +460 -332
  6. package/lib/components/data/dataTemplate/index.js.map +1 -1
  7. package/lib/components/data/dataTemplate/model.d.ts +6 -0
  8. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  9. package/lib/components/data/dataTemplate/settingsModal.d.ts +0 -39
  10. package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
  11. package/lib/components/data/dataTemplate/settingsModal.js +24 -385
  12. package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
  13. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +1 -0
  14. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
  15. package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
  16. package/lib/components/data/flexFilter/index.d.ts.map +1 -1
  17. package/lib/components/data/flexFilter/index.js +2 -2
  18. package/lib/components/data/flexFilter/index.js.map +1 -1
  19. package/lib/components/data/listModule.d.ts.map +1 -1
  20. package/lib/components/data/listModule.js +3 -5
  21. package/lib/components/data/listModule.js.map +1 -1
  22. package/lib/components/display/flexTable/index.js +1 -1
  23. package/lib/components/display/flexTable/index.js.map +1 -1
  24. package/lib/components/display/newTable/index.d.ts +1 -0
  25. package/lib/components/display/newTable/index.d.ts.map +1 -1
  26. package/lib/components/display/newTable/index.js +17 -4
  27. package/lib/components/display/newTable/index.js.map +1 -1
  28. package/lib/components/display/scrollShadow/index.d.ts +2 -1
  29. package/lib/components/display/scrollShadow/index.d.ts.map +1 -1
  30. package/lib/components/display/scrollShadow/index.js +28 -14
  31. package/lib/components/display/scrollShadow/index.js.map +1 -1
  32. package/lib/components/display/table/index.js +1 -1
  33. package/lib/components/display/table/index.js.map +1 -1
  34. package/lib/tail.css +2 -2
  35. package/package.json +1 -1
@@ -108,6 +108,7 @@ var calendar_1 = require("../../display/calendar");
108
108
  var detailList_1 = require("../../display/detailList");
109
109
  var emptyState_1 = require("../../display/emptyState");
110
110
  var feeds_1 = require("../../display/feeds");
111
+ var scrollShadow_1 = require("../../display/scrollShadow");
111
112
  var newFeeds_1 = require("../../display/newFeeds");
112
113
  var grid_1 = require("../../display/grid");
113
114
  var kanban_1 = require("../../display/kanban");
@@ -180,8 +181,10 @@ var handleIsEmptyElement = function (element) {
180
181
  element.type === react_1.default.Fragment &&
181
182
  !((_a = element.props) === null || _a === void 0 ? void 0 : _a.children));
182
183
  };
184
+ // INFO: rows-per-page choices offered in the view settings panel
185
+ var PAGE_LIMIT_OPTIONS = [10, 25, 50, 100];
183
186
  exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
184
- 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;
187
+ 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;
185
188
  var intialiseDefaultFilterValues = function () {
186
189
  var _a;
187
190
  var initialFilterSearch = {};
@@ -242,16 +245,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
242
245
  initialFilterReferenceDate: initialFilterReferenceDate,
243
246
  };
244
247
  };
245
- var _65 = intialiseDefaultFilterValues(), initialFilterSearch = _65.initialFilterSearch, initialFilterSearchParams = _65.initialFilterSearchParams, initialFilterSelection = _65.initialFilterSelection, initialFilterReference = _65.initialFilterReference, initialFilterReferenceDate = _65.initialFilterReferenceDate;
248
+ var _70 = intialiseDefaultFilterValues(), initialFilterSearch = _70.initialFilterSearch, initialFilterSearchParams = _70.initialFilterSearchParams, initialFilterSelection = _70.initialFilterSelection, initialFilterReference = _70.initialFilterReference, initialFilterReferenceDate = _70.initialFilterReferenceDate;
246
249
  // INFO: Persist view state hook — handles storage read/write for filter/sort/column state
247
- var _66 = (0, viewStatePersistence_1.usePersistedViewState)({
250
+ var _71 = (0, viewStatePersistence_1.usePersistedViewState)({
248
251
  mode: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistViewState,
249
252
  collectionId: props.collectionId,
250
253
  uniqueLabel: props.uniqueLabel,
251
254
  type: props.type,
252
- }), persistedState = _66.persistedState, isPersistEnabled = _66.isEnabled, handleSaveView = _66.handleSaveView;
253
- var _67 = (0, react_1.useState)(false), loading = _67[0], setLoading = _67[1];
254
- var _68 = (0, react_1.useState)(), notification = _68[0], setNotification = _68[1];
255
+ }), persistedState = _71.persistedState, isPersistEnabled = _71.isEnabled, handleSaveView = _71.handleSaveView;
256
+ var _72 = (0, react_1.useState)(false), loading = _72[0], setLoading = _72[1];
257
+ var _73 = (0, react_1.useState)(), notification = _73[0], setNotification = _73[1];
255
258
  // INFO: a success toast is confirmation, not a decision — it clears itself so
256
259
  // it never sits on the floating step bar; errors stay until dismissed
257
260
  (0, react_1.useEffect)(function () {
@@ -261,56 +264,53 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
261
264
  return function () { return clearTimeout(timer); };
262
265
  }, [notification]);
263
266
  //INFO : Used by List
264
- var _69 = (0, react_1.useState)((_b = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _b !== void 0 ? _b : initialFilterSearch), filterSearch = _69[0], setFilterSearch = _69[1];
265
- var _70 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearchParams), filterSearchParams = _70[0], setFilterSearchParams = _70[1];
266
- var _71 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _d !== void 0 ? _d : initialFilterSelection), filterSelection = _71[0], setFilterSelection = _71[1];
267
- var _72 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _e !== void 0 ? _e : initialFilterReference), filterReference = _72[0], setFilterReference = _72[1];
268
- var _73 = (0, react_1.useState)({}), filterReferenceSearch = _73[0], setFilterReferenceSearch = _73[1];
269
- var _74 = (0, react_1.useState)({}), filterReferenceList = _74[0], setFilterReferenceList = _74[1];
270
- var _75 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
267
+ var _74 = (0, react_1.useState)((_b = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _b !== void 0 ? _b : initialFilterSearch), filterSearch = _74[0], setFilterSearch = _74[1];
268
+ var _75 = (0, react_1.useState)((_c = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSearchParams) !== null && _c !== void 0 ? _c : initialFilterSearchParams), filterSearchParams = _75[0], setFilterSearchParams = _75[1];
269
+ var _76 = (0, react_1.useState)((_d = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterSelection) !== null && _d !== void 0 ? _d : initialFilterSelection), filterSelection = _76[0], setFilterSelection = _76[1];
270
+ var _77 = (0, react_1.useState)((_e = persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReference) !== null && _e !== void 0 ? _e : initialFilterReference), filterReference = _77[0], setFilterReference = _77[1];
271
+ var _78 = (0, react_1.useState)({}), filterReferenceSearch = _78[0], setFilterReferenceSearch = _78[1];
272
+ var _79 = (0, react_1.useState)({}), filterReferenceList = _79[0], setFilterReferenceList = _79[1];
273
+ var _80 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.filterReferenceDate)
271
274
  ? (0, viewStatePersistence_1.parseDateFilterState)(persistedState.filterReferenceDate)
272
- : initialFilterReferenceDate), filterReferenceDate = _75[0], setFilterReferenceDate = _75[1];
273
- var _76 = (0, react_1.useState)(true), tableLoading = _76[0], setTableLoading = _76[1];
274
- var _77 = (0, react_1.useState)(""), cursor = _77[0], setCursor = _77[1];
275
- var _78 = (0, react_1.useState)(""), lastCursor = _78[0], setLastCursor = _78[1];
276
- var _79 = (0, react_1.useState)([]), tableData = _79[0], setTableData = _79[1];
277
- var _80 = (0, react_1.useState)([]), spaceTableData = _80[0], setSpaceTableData = _80[1];
278
- var _81 = (0, react_1.useState)(0), size = _81[0], setSize = _81[1];
279
- var _82 = (0, react_1.useState)((_h = (_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _f !== void 0 ? _f : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.pageIndex) !== null && _h !== void 0 ? _h : 0), pageIndex = _82[0], setPageIndex = _82[1];
280
- var _83 = (0, react_1.useState)([]), selectedIds = _83[0], setSelectedIds = _83[1];
281
- var _84 = (0, react_1.useState)(false), selectAll = _84[0], setSelectAll = _84[1];
282
- var _85 = (0, react_1.useState)(""), deletePasscode = _85[0], setDeletePasscode = _85[1];
283
- var _86 = (0, react_1.useState)(""), deletePasscodeInput = _86[0], setDeletePasscodeInput = _86[1];
284
- var _87 = (0, react_1.useState)(""), deleteFeedId = _87[0], setDeleteFeedId = _87[1];
275
+ : initialFilterReferenceDate), filterReferenceDate = _80[0], setFilterReferenceDate = _80[1];
276
+ var _81 = (0, react_1.useState)(true), tableLoading = _81[0], setTableLoading = _81[1];
277
+ var _82 = (0, react_1.useState)(""), cursor = _82[0], setCursor = _82[1];
278
+ var _83 = (0, react_1.useState)(""), lastCursor = _83[0], setLastCursor = _83[1];
279
+ var _84 = (0, react_1.useState)([]), tableData = _84[0], setTableData = _84[1];
280
+ var _85 = (0, react_1.useState)([]), spaceTableData = _85[0], setSpaceTableData = _85[1];
281
+ var _86 = (0, react_1.useState)(0), size = _86[0], setSize = _86[1];
282
+ var _87 = (0, react_1.useState)((_h = (_f = persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageIndex) !== null && _f !== void 0 ? _f : (_g = props.organise) === null || _g === void 0 ? void 0 : _g.pageIndex) !== null && _h !== void 0 ? _h : 0), pageIndex = _87[0], setPageIndex = _87[1];
283
+ var _88 = (0, react_1.useState)([]), selectedIds = _88[0], setSelectedIds = _88[1];
284
+ var _89 = (0, react_1.useState)(false), selectAll = _89[0], setSelectAll = _89[1];
285
+ var _90 = (0, react_1.useState)(""), deletePasscode = _90[0], setDeletePasscode = _90[1];
286
+ var _91 = (0, react_1.useState)(""), deletePasscodeInput = _91[0], setDeletePasscodeInput = _91[1];
287
+ var _92 = (0, react_1.useState)(""), deleteFeedId = _92[0], setDeleteFeedId = _92[1];
285
288
  //INFO : Used by List Organise
286
- var _88 = (0, react_1.useState)(false), sortModal = _88[0], setSortModal = _88[1];
287
- var _89 = (0, react_1.useState)(false), filterModal = _89[0], setFilterModal = _89[1];
288
289
  // INFO: Internal sort state that overrides props.organise?.sort when
289
290
  // persistViewState is enabled and a persisted sort exists
290
- var _90 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _j !== void 0 ? _j : undefined), persistedSort = _90[0], setPersistedSort = _90[1];
291
- var _91 = (0, react_1.useState)(false), filterDraft = _91[0], setFilterDraft = _91[1];
292
- var _92 = (0, react_1.useState)(false), addTabModal = _92[0], setAddTabModal = _92[1];
293
- var _93 = (0, react_1.useState)(false), overviewModal = _93[0], setOverviewModal = _93[1];
291
+ var _93 = (0, react_1.useState)((_j = persistedState === null || persistedState === void 0 ? void 0 : persistedState.sort) !== null && _j !== void 0 ? _j : undefined), persistedSort = _93[0], setPersistedSort = _93[1];
292
+ var _94 = (0, react_1.useState)(false), filterDraft = _94[0], setFilterDraft = _94[1];
293
+ var _95 = (0, react_1.useState)(false), addTabModal = _95[0], setAddTabModal = _95[1];
294
294
  //INFO : resolve the initial tab synchronously so the mount cond is already
295
295
  // tab-scoped — an empty initial tab caused a second wasted list fetch
296
- var _94 = (0, react_1.useState)(function () {
296
+ var _96 = (0, react_1.useState)(function () {
297
297
  var _a, _b;
298
298
  return (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, 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);
299
- }), selectedTab = _94[0], setSelectedTab = _94[1];
300
- var _95 = (0, react_1.useState)("dayGridMonth"), calendarView = _95[0], setCalendarView = _95[1];
299
+ }), selectedTab = _96[0], setSelectedTab = _96[1];
300
+ var _97 = (0, react_1.useState)("dayGridMonth"), calendarView = _97[0], setCalendarView = _97[1];
301
301
  // INFO: bareNewDTW calendar viewSwitch mode — drives the NewCalendar variant
302
302
  // (calendarView above drives the matching range query)
303
- var _96 = (0, react_1.useState)("month"), newCalendarViewMode = _96[0], setNewCalendarViewMode = _96[1];
304
- var _97 = (0, react_1.useState)(new Date()), calendarTabMonth = _97[0], setCalendarTabMonth = _97[1];
305
- var _98 = (0, react_1.useState)(true), kanbanDroppable = _98[0], setKanbanDroppable = _98[1];
306
- var _99 = (0, react_1.useState)([]), kanbanOptions = _99[0], setKanbanOptions = _99[1];
307
- var _100 = (0, react_1.useState)(false), queryForm = _100[0], setQueryForm = _100[1];
308
- var _101 = (0, react_1.useState)(false), batchUpdateModal = _101[0], setBatchUpdateModal = _101[1];
309
- var _102 = (0, react_1.useState)({
303
+ var _98 = (0, react_1.useState)("month"), newCalendarViewMode = _98[0], setNewCalendarViewMode = _98[1];
304
+ var _99 = (0, react_1.useState)(new Date()), calendarTabMonth = _99[0], setCalendarTabMonth = _99[1];
305
+ var _100 = (0, react_1.useState)(true), kanbanDroppable = _100[0], setKanbanDroppable = _100[1];
306
+ var _101 = (0, react_1.useState)([]), kanbanOptions = _101[0], setKanbanOptions = _101[1];
307
+ var _102 = (0, react_1.useState)(false), queryForm = _102[0], setQueryForm = _102[1];
308
+ var _103 = (0, react_1.useState)(false), batchUpdateModal = _103[0], setBatchUpdateModal = _103[1];
309
+ var _104 = (0, react_1.useState)({
310
310
  columnId: "",
311
311
  columnData: {},
312
- }), batchUpdateData = _102[0], setBatchUpdateData = _102[1];
313
- var _103 = (0, react_1.useState)(function () {
312
+ }), batchUpdateData = _104[0], setBatchUpdateData = _104[1];
313
+ var _105 = (0, react_1.useState)(function () {
314
314
  var baseModel = (props === null || props === void 0 ? void 0 : props.model) || [];
315
315
  if (!persistedState)
316
316
  return baseModel;
@@ -336,8 +336,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
336
336
  });
337
337
  }
338
338
  return model;
339
- }), structure = _103[0], setStructure = _103[1];
340
- var _104 = (0, react_1.useState)(((_k = props === null || props === void 0 ? void 0 : props.organise) === null || _k === void 0 ? void 0 : _k.additionalQuery) || []), additionalQuery = _104[0], setAdditionalQuery = _104[1];
339
+ }), structure = _105[0], setStructure = _105[1];
340
+ var _106 = (0, react_1.useState)(((_k = props === null || props === void 0 ? void 0 : props.organise) === null || _k === void 0 ? void 0 : _k.additionalQuery) || []), additionalQuery = _106[0], setAdditionalQuery = _106[1];
341
341
  // INFO: State for user-configurable flex filters (Monday.com-style)
342
342
  // INFO: Initialize with one empty row so users see inputs immediately without clicking "Add Filter"
343
343
  var defaultFlexFilterRow = [
@@ -348,105 +348,109 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
348
348
  value: undefined,
349
349
  },
350
350
  ];
351
- var _105 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
351
+ var _107 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
352
352
  ? persistedState.flexFilters
353
- : defaultFlexFilterRow), flexFilters = _105[0], setFlexFilters = _105[1];
353
+ : defaultFlexFilterRow), flexFilters = _107[0], setFlexFilters = _107[1];
354
354
  // INFO: Debounced version of flexFilters used by renderImpSearchFilterConditions
355
355
  // to prevent API calls on every keystroke when typing in value inputs
356
- var _106 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
356
+ var _108 = (0, react_1.useState)((persistedState === null || persistedState === void 0 ? void 0 : persistedState.flexFilters) && persistedState.flexFilters.length > 0
357
357
  ? persistedState.flexFilters
358
- : defaultFlexFilterRow), flexFiltersDebounced = _106[0], setFlexFiltersDebounced = _106[1];
359
- var _107 = (0, react_1.useState)({}), flexFilterReferenceOptions = _107[0], setFlexFilterReferenceOptions = _107[1];
360
- var _108 = (0, react_1.useState)({}), flexFilterReferenceSearch = _108[0], setFlexFilterReferenceSearch = _108[1];
361
- var _109 = (0, react_1.useState)(false), flexFilterModalOpen = _109[0], setFlexFilterModalOpen = _109[1];
362
- // INFO: Columns the end user chose to hide (organise.hideColumnEnabled).
358
+ : defaultFlexFilterRow), flexFiltersDebounced = _108[0], setFlexFiltersDebounced = _108[1];
359
+ var _109 = (0, react_1.useState)({}), flexFilterReferenceOptions = _109[0], setFlexFilterReferenceOptions = _109[1];
360
+ var _110 = (0, react_1.useState)({}), flexFilterReferenceSearch = _110[0], setFlexFilterReferenceSearch = _110[1];
361
+ var _111 = (0, react_1.useState)(false), flexFilterModalOpen = _111[0], setFlexFilterModalOpen = _111[1];
362
+ var _112 = (0, react_1.useState)(false), viewSettingsModalOpen = _112[0], setViewSettingsModalOpen = _112[1];
363
+ // INFO: Columns the end user chose to hide (bareSettings.bareViewSettings).
363
364
  // Deliberately kept out of `structure`: the props-sync effect below resets
364
365
  // structure to props.model whenever props change, which would wipe the
365
366
  // choice, and the persist effect derives schema-level hiddenColumnIds from
366
367
  // structure — writing user hides there would blur the two concepts.
367
- var _110 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _l !== void 0 ? _l : []), userHiddenColumnIds = _110[0], setUserHiddenColumnIds = _110[1];
368
+ var _113 = (0, react_1.useState)((_l = persistedState === null || persistedState === void 0 ? void 0 : persistedState.userHiddenColumnIds) !== null && _l !== void 0 ? _l : []), userHiddenColumnIds = _113[0], setUserHiddenColumnIds = _113[1];
369
+ var _114 = (0, react_1.useState)(""), columnSearch = _114[0], setColumnSearch = _114[1];
370
+ var _115 = (0, react_1.useState)(null), draggingColumnId = _115[0], setDraggingColumnId = _115[1];
371
+ var columnRowRefs = (0, react_1.useRef)({});
368
372
  //INFO : Used by Auth
369
- var _111 = (0, react_1.useState)({
373
+ var _116 = (0, react_1.useState)({
370
374
  email: "",
371
375
  google: "",
372
376
  phone: "",
373
377
  disabled: false,
374
378
  create: false,
375
- }), authMethods = _111[0], setAuthMethods = _111[1];
376
- var _112 = (0, react_1.useState)(""), selectedAuthMethod = _112[0], setSelectedAuthMethod = _112[1];
379
+ }), authMethods = _116[0], setAuthMethods = _116[1];
380
+ var _117 = (0, react_1.useState)(""), selectedAuthMethod = _117[0], setSelectedAuthMethod = _117[1];
377
381
  // INFO: Used by Activity Log
378
- var _113 = (0, react_1.useState)(false), activityModal = _113[0], setActivityModal = _113[1];
379
- var _114 = (0, react_1.useState)(""), activityId = _114[0], setActivityId = _114[1];
382
+ var _118 = (0, react_1.useState)(false), activityModal = _118[0], setActivityModal = _118[1];
383
+ var _119 = (0, react_1.useState)(""), activityId = _119[0], setActivityId = _119[1];
380
384
  //INFO : Used by Export
381
- var _115 = (0, react_1.useState)(null), csvFile = _115[0], setCSVFile = _115[1];
382
- var _116 = (0, react_1.useState)([]), csvFileData = _116[0], setCSVFileData = _116[1];
383
- var _117 = (0, react_1.useState)(0), stepCSVIndex = _117[0], setStepCSVIndex = _117[1];
384
- var _118 = (0, react_1.useState)({}), listCSVMapAttribute = _118[0], setListCSVMapAttribute = _118[1];
385
- var _119 = (0, react_1.useState)({}), listCSVObjAttribute = _119[0], setListCSVObjAttribute = _119[1];
386
- var _120 = (0, react_1.useState)([]), csvAPIAttribute = _120[0], setCSVAPIAttribute = _120[1];
387
- var _121 = (0, react_1.useState)(((_m = props.devSettings.currentUser) === null || _m === void 0 ? void 0 : _m.userEmail) || ""), exportCSVEmail = _121[0], setExportCSVEmail = _121[1];
388
- var _122 = (0, react_1.useState)(((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.exportSettings) === null || _p === void 0 ? void 0 : _p.defaultExportPDFName) || ""), exportPDFTitle = _122[0], setExportPDFTitle = _122[1];
389
- var _123 = (0, react_1.useState)(false), exportPDFLoading = _123[0], setExportPDFLoading = _123[1];
390
- var _124 = (0, react_1.useState)(false), exportReadPDFLoading = _124[0], setExportReadPDFLoading = _124[1];
391
- var _125 = (0, react_1.useState)((_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.sumColumnId) !== null && _s !== void 0 ? _s : []), exportSumAttributeIds = _125[0], setExportSumAttributeIds = _125[1];
392
- var _126 = (0, react_1.useState)((_v = (_u = (_t = props.organise) === null || _t === void 0 ? void 0 : _t.exportSettings) === null || _u === void 0 ? void 0 : _u.hideSubItems) !== null && _v !== void 0 ? _v : false), hideSubItems = _126[0], setHideSubItems = _126[1];
393
- var _127 = (0, react_1.useState)([]), importTableData = _127[0], setImportTableData = _127[1];
394
- var _128 = (0, react_1.useState)([]), queryList = _128[0], setQueryList = _128[1];
395
- var _129 = (0, react_1.useState)(undefined), allQueryList = _129[0], setAllQueryList = _129[1];
396
- var _130 = (0, react_1.useState)(-1), queryIndex = _130[0], setQueryIndex = _130[1];
397
- var _131 = (0, react_1.useState)((_w = props.organise) === null || _w === void 0 ? void 0 : _w.groupBy), groupId = _131[0], setGroupId = _131[1];
398
- var _132 = (0, react_1.useState)(""), readTabSection = _132[0], setReadTabSection = _132[1];
399
- var _133 = (0, react_1.useState)(false), readFloatingNav = _133[0], setReadFloatingNav = _133[1];
385
+ var _120 = (0, react_1.useState)(null), csvFile = _120[0], setCSVFile = _120[1];
386
+ var _121 = (0, react_1.useState)([]), csvFileData = _121[0], setCSVFileData = _121[1];
387
+ var _122 = (0, react_1.useState)(0), stepCSVIndex = _122[0], setStepCSVIndex = _122[1];
388
+ var _123 = (0, react_1.useState)({}), listCSVMapAttribute = _123[0], setListCSVMapAttribute = _123[1];
389
+ var _124 = (0, react_1.useState)({}), listCSVObjAttribute = _124[0], setListCSVObjAttribute = _124[1];
390
+ var _125 = (0, react_1.useState)([]), csvAPIAttribute = _125[0], setCSVAPIAttribute = _125[1];
391
+ var _126 = (0, react_1.useState)(((_m = props.devSettings.currentUser) === null || _m === void 0 ? void 0 : _m.userEmail) || ""), exportCSVEmail = _126[0], setExportCSVEmail = _126[1];
392
+ var _127 = (0, react_1.useState)(((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.exportSettings) === null || _p === void 0 ? void 0 : _p.defaultExportPDFName) || ""), exportPDFTitle = _127[0], setExportPDFTitle = _127[1];
393
+ var _128 = (0, react_1.useState)(false), exportPDFLoading = _128[0], setExportPDFLoading = _128[1];
394
+ var _129 = (0, react_1.useState)(false), exportReadPDFLoading = _129[0], setExportReadPDFLoading = _129[1];
395
+ var _130 = (0, react_1.useState)((_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.exportSettings) === null || _r === void 0 ? void 0 : _r.sumColumnId) !== null && _s !== void 0 ? _s : []), exportSumAttributeIds = _130[0], setExportSumAttributeIds = _130[1];
396
+ var _131 = (0, react_1.useState)((_v = (_u = (_t = props.organise) === null || _t === void 0 ? void 0 : _t.exportSettings) === null || _u === void 0 ? void 0 : _u.hideSubItems) !== null && _v !== void 0 ? _v : false), hideSubItems = _131[0], setHideSubItems = _131[1];
397
+ var _132 = (0, react_1.useState)([]), importTableData = _132[0], setImportTableData = _132[1];
398
+ var _133 = (0, react_1.useState)([]), queryList = _133[0], setQueryList = _133[1];
399
+ var _134 = (0, react_1.useState)(undefined), allQueryList = _134[0], setAllQueryList = _134[1];
400
+ var _135 = (0, react_1.useState)(-1), queryIndex = _135[0], setQueryIndex = _135[1];
401
+ var _136 = (0, react_1.useState)((_w = props.organise) === null || _w === void 0 ? void 0 : _w.groupBy), groupId = _136[0], setGroupId = _136[1];
402
+ var _137 = (0, react_1.useState)(""), readTabSection = _137[0], setReadTabSection = _137[1];
403
+ var _138 = (0, react_1.useState)(false), readFloatingNav = _138[0], setReadFloatingNav = _138[1];
400
404
  var readTabSectionRefs = (0, react_1.useRef)({});
401
405
  //INFO : Used by Read
402
406
  //INFO : Used by Update
403
- var _134 = (0, react_1.useState)(false), modalVisible = _134[0], setModalVisible = _134[1];
404
- var _135 = (0, react_1.useState)(false), deleteModal = _135[0], setDeleteModal = _135[1];
405
- var _136 = (0, react_1.useState)(false), excelModal = _136[0], setExcelModal = _136[1];
406
- var _137 = (0, react_1.useState)(false), exportExcel = _137[0], setExportExcel = _137[1];
407
- var _138 = (0, react_1.useState)(""), exportType = _138[0], setExportType = _138[1];
408
- var _139 = (0, react_1.useState)(false), exportQR = _139[0], setExportQR = _139[1];
409
- var _140 = (0, react_1.useState)(function () {
407
+ var _139 = (0, react_1.useState)(false), modalVisible = _139[0], setModalVisible = _139[1];
408
+ var _140 = (0, react_1.useState)(false), deleteModal = _140[0], setDeleteModal = _140[1];
409
+ var _141 = (0, react_1.useState)(false), excelModal = _141[0], setExcelModal = _141[1];
410
+ var _142 = (0, react_1.useState)(false), exportExcel = _142[0], setExportExcel = _142[1];
411
+ var _143 = (0, react_1.useState)(""), exportType = _143[0], setExportType = _143[1];
412
+ var _144 = (0, react_1.useState)(false), exportQR = _144[0], setExportQR = _144[1];
413
+ var _145 = (0, react_1.useState)(function () {
410
414
  var _a, _b;
411
415
  var firstTabId = (_b = (_a = structure.find(function (item) { return item.tabId; })) === null || _a === void 0 ? void 0 : _a.tabId) !== null && _b !== void 0 ? _b : "";
412
416
  return firstTabId;
413
- }), activeTab = _140[0], setActiveTab = _140[1];
414
- var _141 = (0, react_1.useState)(false), signatureSigning = _141[0], setSignatureSigning = _141[1];
415
- var _142 = (0, react_1.useState)({}), selectedData = _142[0], setSelectedData = _142[1];
416
- var _143 = (0, react_1.useState)(""), selectedObjectStructureId = _143[0], setSelectedObjectStructureId = _143[1];
417
- var _144 = (0, react_1.useState)(""), selectedObjectId = _144[0], setSelectedObjectId = _144[1];
418
- var _145 = (0, react_1.useState)(""), selectedListAddressId = _145[0], setSelectedListAddressId = _145[1];
419
- var _146 = (0, react_1.useState)(-1), selectedListAddressIndex = _146[0], setSelectedListAddressIndex = _146[1];
420
- var _147 = (0, react_1.useState)({
417
+ }), activeTab = _145[0], setActiveTab = _145[1];
418
+ var _146 = (0, react_1.useState)(false), signatureSigning = _146[0], setSignatureSigning = _146[1];
419
+ var _147 = (0, react_1.useState)({}), selectedData = _147[0], setSelectedData = _147[1];
420
+ var _148 = (0, react_1.useState)(""), selectedObjectStructureId = _148[0], setSelectedObjectStructureId = _148[1];
421
+ var _149 = (0, react_1.useState)(""), selectedObjectId = _149[0], setSelectedObjectId = _149[1];
422
+ var _150 = (0, react_1.useState)(""), selectedListAddressId = _150[0], setSelectedListAddressId = _150[1];
423
+ var _151 = (0, react_1.useState)(-1), selectedListAddressIndex = _151[0], setSelectedListAddressIndex = _151[1];
424
+ var _152 = (0, react_1.useState)({
421
425
  lat: 0,
422
426
  lng: 0,
423
427
  name: "",
424
- }), selectedListAddress = _147[0], setSelectedListAddress = _147[1];
425
- var _148 = (0, react_1.useState)({}), selectedObjectData = _148[0], setSelectedObjectData = _148[1];
426
- var _149 = (0, react_1.useState)(null), objectCellEdit = _149[0], setObjectCellEdit = _149[1];
427
- var _150 = (0, react_1.useState)(false), referenceLoading = _150[0], setReferenceLoading = _150[1];
428
- var _151 = (0, react_1.useState)({}), referencesOptions = _151[0], setReferencesOptions = _151[1];
429
- var _152 = (0, react_1.useState)({}), referencesDetails = _152[0], setReferencesDetails = _152[1];
430
- var _153 = (0, react_1.useState)({}), listReferencesOptions = _153[0], setListReferencesOptions = _153[1];
431
- var _154 = (0, react_1.useState)({}), referenceDeleteTableData = _154[0], setReferenceDeleteTableData = _154[1];
432
- var _155 = (0, react_1.useState)(0), referenceDeleteIndex = _155[0], setReferenceDeleteIndex = _155[1];
433
- var _156 = (0, react_1.useState)({
428
+ }), selectedListAddress = _152[0], setSelectedListAddress = _152[1];
429
+ var _153 = (0, react_1.useState)({}), selectedObjectData = _153[0], setSelectedObjectData = _153[1];
430
+ var _154 = (0, react_1.useState)(null), objectCellEdit = _154[0], setObjectCellEdit = _154[1];
431
+ var _155 = (0, react_1.useState)(false), referenceLoading = _155[0], setReferenceLoading = _155[1];
432
+ var _156 = (0, react_1.useState)({}), referencesOptions = _156[0], setReferencesOptions = _156[1];
433
+ var _157 = (0, react_1.useState)({}), referencesDetails = _157[0], setReferencesDetails = _157[1];
434
+ var _158 = (0, react_1.useState)({}), listReferencesOptions = _158[0], setListReferencesOptions = _158[1];
435
+ var _159 = (0, react_1.useState)({}), referenceDeleteTableData = _159[0], setReferenceDeleteTableData = _159[1];
436
+ var _160 = (0, react_1.useState)(0), referenceDeleteIndex = _160[0], setReferenceDeleteIndex = _160[1];
437
+ var _161 = (0, react_1.useState)({
434
438
  id: "",
435
439
  name: "",
436
440
  type: "string",
437
- }), referenceCreationModal = _156[0], setReferenceCreationModal = _156[1];
438
- var _157 = (0, react_1.useState)({}), referenceModelSchema = _157[0], setReferenceSchema = _157[1];
439
- var _158 = (0, react_1.useState)([]), kanbanChecked = _158[0], setKanbanChecked = _158[1];
441
+ }), referenceCreationModal = _161[0], setReferenceCreationModal = _161[1];
442
+ var _162 = (0, react_1.useState)({}), referenceModelSchema = _162[0], setReferenceSchema = _162[1];
443
+ var _163 = (0, react_1.useState)([]), kanbanChecked = _163[0], setKanbanChecked = _163[1];
440
444
  //INFO : Offline
441
- var _159 = (0, react_1.useState)(0), offlineDataLength = _159[0], setOfflineDataLength = _159[1];
442
- var _160 = (0, react_1.useState)(false), offlineModal = _160[0], setOfflineModal = _160[1];
445
+ var _164 = (0, react_1.useState)(0), offlineDataLength = _164[0], setOfflineDataLength = _164[1];
446
+ var _165 = (0, react_1.useState)(false), offlineModal = _165[0], setOfflineModal = _165[1];
443
447
  // INFO: live-stream state — driven by socket connection and navigator.onLine
444
- var _161 = (0, react_1.useState)(false), isLive = _161[0], setIsLive = _161[1];
445
- var _162 = (0, react_1.useState)(false), isLiveOffline = _162[0], setIsLiveOffline = _162[1];
448
+ var _166 = (0, react_1.useState)(false), isLive = _166[0], setIsLive = _166[1];
449
+ var _167 = (0, react_1.useState)(false), isLiveOffline = _167[0], setIsLiveOffline = _167[1];
446
450
  // INFO: true when navigator is offline — used to switch ReadQueryHoc between
447
451
  // server reads (online, full pagination) and IndexedDB reads (offline, cached data).
448
452
  // Independent of SSE status so it works even when bareSocketName is not set.
449
- var _163 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _163[0], setIsNetworkOffline = _163[1];
453
+ var _168 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _168[0], setIsNetworkOffline = _168[1];
450
454
  var previousType = (0, react_1.useRef)(null);
451
455
  var previousSelectedData = (0, react_1.useRef)(null);
452
456
  var scrollSentinelRef = (0, react_1.useRef)(null);
@@ -531,42 +535,54 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
531
535
  var isFirebase = isFirebaseClient || devSettings.server === "fbServer";
532
536
  var dbModule = isFirebaseClient ? (_z = props.lib) === null || _z === void 0 ? void 0 : _z.firebase : (_0 = props.lib) === null || _0 === void 0 ? void 0 : _0.axios;
533
537
  var schemaPresent = props.devSettings.schemaEndpoint ? true : false;
534
- var limit = props.limit ? props.limit : 10;
535
- var activeSortId = (isPersistEnabled && persistedSort) || ((_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.sort);
538
+ // INFO: the view settings panel (columns, sort, rows per page) is standard on
539
+ // the new DTW; bareViewSettings stays the opt-in for legacy and bare DTWs
540
+ var isViewSettingsEnabled = ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareViewSettings) || ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareNewDTW)
541
+ ? true
542
+ : false;
543
+ // INFO: a consumer that wires onChangeHide owns the hide at schema level
544
+ // (Space, Sun Luan) — toggling writes to the model and calls back. Without it
545
+ // the hide is this user's own and lives in userHiddenColumnIds.
546
+ var isSchemaHideMode = ((_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.onChangeHide) ? true : false;
547
+ // INFO: rows per page is a view setting the user can change, so it starts from
548
+ // the persisted value and falls back to the consumer's limit
549
+ var _169 = (0, react_1.useState)((_5 = (_4 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _4 !== void 0 ? _4 : props.limit) !== null && _5 !== void 0 ? _5 : 10), pageLimit = _169[0], setPageLimit = _169[1];
550
+ var limit = pageLimit;
551
+ var activeSortId = (isPersistEnabled && persistedSort) || ((_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.sort);
536
552
  var handleSortColumn = function (value) {
537
553
  var _a, _b;
538
554
  if (isPersistEnabled)
539
555
  setPersistedSort(value);
540
556
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeSort) === null || _b === void 0 ? void 0 : _b.call(_a, value);
541
557
  };
542
- var isEditor = ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.allEditable) ? true : false;
543
- var isOffline = (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareOffline;
558
+ var isEditor = ((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.allEditable) ? true : false;
559
+ var isOffline = (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareOffline;
544
560
  // INFO: when bareOfflineNetworkAware is true, the save path is also gated on
545
561
  // the live network state — online saves go to the server even if bareOffline
546
562
  // is true, offline saves go to IDB as normal.
547
- var isOfflineNetworkListener = isOffline && ((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareOfflineNetworkListener);
548
- var showId = (_5 = props.space) === null || _5 === void 0 ? void 0 : _5.showId;
563
+ var isOfflineNetworkListener = isOffline && ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareOfflineNetworkListener);
564
+ var showId = (_10 = props.space) === null || _10 === void 0 ? void 0 : _10.showId;
549
565
  var remainId = showId || selectedObjectStructureId ? true : false;
550
- var idField = ((_6 = props.space) === null || _6 === void 0 ? void 0 : _6.idField) || ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.idField);
551
- var pipeline = (_8 = props === null || props === void 0 ? void 0 : props.space) === null || _8 === void 0 ? void 0 : _8.pipeline;
552
- if ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareListPipeline) {
566
+ var idField = ((_11 = props.space) === null || _11 === void 0 ? void 0 : _11.idField) || ((_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.idField);
567
+ var pipeline = (_13 = props === null || props === void 0 ? void 0 : props.space) === null || _13 === void 0 ? void 0 : _13.pipeline;
568
+ if ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareListPipeline) {
553
569
  pipeline = pipeline
554
570
  ? __spreadArray(__spreadArray([], pipeline, true), props.bareSettings.bareListPipeline, true) : props.bareSettings.bareListPipeline;
555
571
  }
556
- var hasNavigation = ((_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.handleNavigate) ? true : false;
572
+ var hasNavigation = ((_15 = props.organise) === null || _15 === void 0 ? void 0 : _15.handleNavigate) ? true : false;
557
573
  var formColumn = "grid-cols-12";
558
- var useMobileView = (_12 = (_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateMobileView) !== null && _12 !== void 0 ? _12 : false;
574
+ var useMobileView = (_17 = (_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateMobileView) !== null && _17 !== void 0 ? _17 : false;
559
575
  var gridGap = useMobileView ? "gap-x-6 gap-y-2 md:gap-y-6" : "gap-6";
560
- var isActivityLog = (((_14 = (_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.activityLog) === null || _14 === void 0 ? void 0 : _14.enableComments) &&
561
- ((_15 = props.edit) === null || _15 === void 0 ? void 0 : _15.activityLog.commentCollectionId)) ||
562
- (((_17 = (_16 = props.edit) === null || _16 === void 0 ? void 0 : _16.activityLog) === null || _17 === void 0 ? void 0 : _17.enableLogs) &&
563
- ((_18 = props.edit) === null || _18 === void 0 ? void 0 : _18.activityLog.logsCollectionId));
564
- var customPaginationSize = ((_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.customPaginationCount)
576
+ var isActivityLog = (((_19 = (_18 = props.edit) === null || _18 === void 0 ? void 0 : _18.activityLog) === null || _19 === void 0 ? void 0 : _19.enableComments) &&
577
+ ((_20 = props.edit) === null || _20 === void 0 ? void 0 : _20.activityLog.commentCollectionId)) ||
578
+ (((_22 = (_21 = props.edit) === null || _21 === void 0 ? void 0 : _21.activityLog) === null || _22 === void 0 ? void 0 : _22.enableLogs) &&
579
+ ((_23 = props.edit) === null || _23 === void 0 ? void 0 : _23.activityLog.logsCollectionId));
580
+ var customPaginationSize = ((_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.customPaginationCount)
565
581
  ? props.organise.customPaginationCount(size)
566
582
  : undefined;
567
583
  //TODO : Code - Pass ...devSettings, search dbEndpoint:
568
584
  var writeServerQuery = new writeQuery_1.WriteQuery({
569
- dbModule: (_20 = props.lib) === null || _20 === void 0 ? void 0 : _20.axios,
585
+ dbModule: (_25 = props.lib) === null || _25 === void 0 ? void 0 : _25.axios,
570
586
  dbType: devSettings.server,
571
587
  dbCollection: props.collectionId,
572
588
  dbEndpoint: devSettings.dbEndpoint,
@@ -574,7 +590,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
574
590
  dbUserToken: devSettings.dbUserToken,
575
591
  });
576
592
  var readServerQuery = new readQuery_1.ReadQuery({
577
- dbModule: (_21 = props.lib) === null || _21 === void 0 ? void 0 : _21.axios,
593
+ dbModule: (_26 = props.lib) === null || _26 === void 0 ? void 0 : _26.axios,
578
594
  dbType: devSettings.server,
579
595
  dbCollection: props.collectionId,
580
596
  dbEndpoint: devSettings.dbEndpoint,
@@ -582,9 +598,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
582
598
  dbUserToken: devSettings.dbUserToken,
583
599
  });
584
600
  var moreButtonPopUp = [
585
- ((_22 = props.edit) === null || _22 === void 0 ? void 0 : _22.allEditable) &&
601
+ ((_27 = props.edit) === null || _27 === void 0 ? void 0 : _27.allEditable) &&
586
602
  !isFirebase &&
587
- !((_24 = (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.exportSettings) === null || _24 === void 0 ? void 0 : _24.hideImportCSV)
603
+ !((_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.exportSettings) === null || _29 === void 0 ? void 0 : _29.hideImportCSV)
588
604
  ? {
589
605
  text: "Import Excel",
590
606
  onClick: function () {
@@ -593,7 +609,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
593
609
  },
594
610
  }
595
611
  : null,
596
- !((_26 = (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.exportSettings) === null || _26 === void 0 ? void 0 : _26.hideExportCSV)
612
+ !((_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.exportSettings) === null || _31 === void 0 ? void 0 : _31.hideExportCSV)
597
613
  ? {
598
614
  text: "Export CSV",
599
615
  onClick: function () {
@@ -603,7 +619,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
603
619
  },
604
620
  }
605
621
  : null,
606
- !((_28 = (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.exportSettings) === null || _28 === void 0 ? void 0 : _28.hideExportExcel)
622
+ !((_33 = (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.exportSettings) === null || _33 === void 0 ? void 0 : _33.hideExportExcel)
607
623
  ? {
608
624
  text: "Export Excel",
609
625
  onClick: function () {
@@ -613,7 +629,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
613
629
  },
614
630
  }
615
631
  : null,
616
- !((_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.exportSettings) === null || _30 === void 0 ? void 0 : _30.hideExportPDF)
632
+ !((_35 = (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.exportSettings) === null || _35 === void 0 ? void 0 : _35.hideExportPDF)
617
633
  ? {
618
634
  text: "Export PDF",
619
635
  onClick: function () {
@@ -623,7 +639,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
623
639
  },
624
640
  }
625
641
  : null,
626
- !((_32 = (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.exportSettings) === null || _32 === void 0 ? void 0 : _32.hideExportQR)
642
+ !((_37 = (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.exportSettings) === null || _37 === void 0 ? void 0 : _37.hideExportQR)
627
643
  ? {
628
644
  text: "Export QR",
629
645
  onClick: function () {
@@ -633,7 +649,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
633
649
  },
634
650
  }
635
651
  : null,
636
- !((_34 = (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.exportSettings) === null || _34 === void 0 ? void 0 : _34.hideExportQR)
652
+ !((_39 = (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.exportSettings) === null || _39 === void 0 ? void 0 : _39.hideExportQR)
637
653
  ? {
638
654
  text: "Export QR(Data)",
639
655
  onClick: function () {
@@ -643,7 +659,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
643
659
  },
644
660
  }
645
661
  : null,
646
- !((_36 = (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.exportSettings) === null || _36 === void 0 ? void 0 : _36.hideExportPrint)
662
+ !((_41 = (_40 = props.organise) === null || _40 === void 0 ? void 0 : _40.exportSettings) === null || _41 === void 0 ? void 0 : _41.hideExportPrint)
647
663
  ? {
648
664
  text: "Print",
649
665
  onClick: function () {
@@ -653,7 +669,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
653
669
  },
654
670
  }
655
671
  : null,
656
- !((_38 = (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.exportSettings) === null || _38 === void 0 ? void 0 : _38.hideExportDraft)
672
+ !((_43 = (_42 = props.organise) === null || _42 === void 0 ? void 0 : _42.exportSettings) === null || _43 === void 0 ? void 0 : _43.hideExportDraft)
657
673
  ? {
658
674
  text: filterDraft ? "Show All Items" : "Filter Draft",
659
675
  onClick: function () {
@@ -662,12 +678,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
662
678
  }
663
679
  : null,
664
680
  ].filter(Boolean);
665
- if ((_39 = props.organise) === null || _39 === void 0 ? void 0 : _39.moreSettings)
681
+ if ((_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.moreSettings)
666
682
  moreButtonPopUp = moreButtonPopUp.concat(props.organise.moreSettings);
667
683
  //=====================================================================================
668
684
  //SECTION: User Column Visibility Handlers
669
685
  //=====================================================================================
670
686
  var handleToggleUserHiddenColumn = function (columnId) {
687
+ var _a;
688
+ if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeHide) {
689
+ var updatedModel = structure.map(function (eachColumn) {
690
+ return eachColumn.id === columnId
691
+ ? __assign(__assign({}, eachColumn), { hide: !eachColumn.hide }) : eachColumn;
692
+ });
693
+ setStructure(updatedModel);
694
+ props.organise.onChangeHide(updatedModel);
695
+ return;
696
+ }
671
697
  setUserHiddenColumnIds(function (prevIds) {
672
698
  return prevIds.includes(columnId)
673
699
  ? prevIds.filter(function (eachId) { return eachId !== columnId; })
@@ -675,8 +701,55 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
675
701
  });
676
702
  };
677
703
  var handleShowAllUserHiddenColumns = function () {
704
+ var _a;
705
+ if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeHide) {
706
+ var updatedModel = structure.map(function (eachColumn) { return (__assign(__assign({}, eachColumn), { hide: false })); });
707
+ setStructure(updatedModel);
708
+ props.organise.onChangeHide(updatedModel);
709
+ return;
710
+ }
678
711
  setUserHiddenColumnIds([]);
679
712
  };
713
+ // INFO: reorder from the view settings panel — the same move the old header
714
+ // drag made, so consumers keep persisting through onChangeDrag
715
+ var handleReorderColumn = function (dragId, dropId) {
716
+ var _a, _b;
717
+ if (dragId === dropId)
718
+ return;
719
+ var dragIndex = structure.findIndex(function (eachCol) { return eachCol.id === dragId; });
720
+ var dropIndex = structure.findIndex(function (eachCol) { return eachCol.id === dropId; });
721
+ if (dragIndex < 0 || dropIndex < 0)
722
+ return;
723
+ var updatedModel = __spreadArray([], structure, true);
724
+ var moved = updatedModel.splice(dragIndex, 1)[0];
725
+ updatedModel.splice(dropIndex, 0, moved);
726
+ setStructure(updatedModel);
727
+ (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeDrag) === null || _b === void 0 ? void 0 : _b.call(_a, dragId, dropId, updatedModel.map(function (eachCol) { return ({
728
+ key: eachCol.id,
729
+ title: eachCol.name,
730
+ }); }));
731
+ };
732
+ // INFO: pointer based so the handle works with both a mouse and a finger —
733
+ // the row under the pointer becomes the drop target as it moves
734
+ var handleColumnDragMove = function (event) {
735
+ if (!draggingColumnId)
736
+ return;
737
+ var pointerY = event.clientY;
738
+ var hovered = Object.entries(columnRowRefs.current).find(function (_a) {
739
+ var eachId = _a[0], eachElement = _a[1];
740
+ if (!eachElement || eachId === draggingColumnId)
741
+ return false;
742
+ var bounds = eachElement.getBoundingClientRect();
743
+ return pointerY >= bounds.top && pointerY <= bounds.bottom;
744
+ });
745
+ if (hovered)
746
+ handleReorderColumn(draggingColumnId, hovered[0]);
747
+ };
748
+ var handleChangePageLimit = function (nextLimit) {
749
+ setPageLimit(nextLimit);
750
+ // INFO: the current page index is meaningless against a new page size
751
+ setPageIndex(0);
752
+ };
680
753
  //=====================================================================================
681
754
  //SECTION: Flex Filter Handlers
682
755
  //=====================================================================================
@@ -864,7 +937,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
864
937
  pageIndex: renderCheckScrollMode() ? 0 : pageIndex,
865
938
  hiddenColumnIds: structure.filter(function (col) { return col.hide; }).map(function (col) { return col.id; }),
866
939
  // INFO: stored raw rather than through getActiveUserHiddenColumnIds so a
867
- // consumer temporarily switching hideColumnEnabled off does not wipe the
940
+ // consumer temporarily switching bareViewSettings off does not wipe the
868
941
  // user's saved choice.
869
942
  userHiddenColumnIds: userHiddenColumnIds,
870
943
  columnOrder: structure.map(function (col) { return col.id; }),
@@ -891,7 +964,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
891
964
  (0, react_1.useEffect)(function () {
892
965
  handleOfflinePrefetch();
893
966
  /* eslint-disable */
894
- }, [props.collectionId, (_40 = props.bareSettings) === null || _40 === void 0 ? void 0 : _40.bareOffline]);
967
+ }, [props.collectionId, (_45 = props.bareSettings) === null || _45 === void 0 ? void 0 : _45.bareOffline]);
895
968
  /* eslint-enable */
896
969
  // INFO: MRQ polling — calls handleRefresh every N ms (e.g. 1500) as a fallback.
897
970
  // Calls through handleRefreshRef so the interval always dispatches the latest
@@ -911,7 +984,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
911
984
  }, interval);
912
985
  return function () { return clearInterval(timer); };
913
986
  /* eslint-disable */
914
- }, [(_41 = props.bareSettings) === null || _41 === void 0 ? void 0 : _41.barePollingInterval, isLive, isNetworkOffline]);
987
+ }, [(_46 = props.bareSettings) === null || _46 === void 0 ? void 0 : _46.barePollingInterval, isLive, isNetworkOffline]);
915
988
  /* eslint-enable */
916
989
  // INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
917
990
  // EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
@@ -953,7 +1026,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
953
1026
  };
954
1027
  /* eslint-disable */
955
1028
  }, [
956
- (_42 = props.bareSettings) === null || _42 === void 0 ? void 0 : _42.bareSocketName,
1029
+ (_47 = props.bareSettings) === null || _47 === void 0 ? void 0 : _47.bareSocketName,
957
1030
  props.collectionId,
958
1031
  props.devSettings.sseEndpoint,
959
1032
  props.devSettings.dbAPIToken,
@@ -1192,10 +1265,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1192
1265
  props.collectionId,
1193
1266
  props.model,
1194
1267
  props.localURLEndpoint,
1195
- (_43 = props.organise) === null || _43 === void 0 ? void 0 : _43.extendedTabs,
1196
- (_44 = props.organise) === null || _44 === void 0 ? void 0 : _44.viewId,
1197
- (_45 = props.organise) === null || _45 === void 0 ? void 0 : _45.additionalQuery,
1198
- (_46 = props.organise) === null || _46 === void 0 ? void 0 : _46.groupBy,
1268
+ (_48 = props.organise) === null || _48 === void 0 ? void 0 : _48.extendedTabs,
1269
+ (_49 = props.organise) === null || _49 === void 0 ? void 0 : _49.viewId,
1270
+ (_50 = props.organise) === null || _50 === void 0 ? void 0 : _50.additionalQuery,
1271
+ (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.groupBy,
1199
1272
  props.type,
1200
1273
  ]);
1201
1274
  (0, react_1.useEffect)(function () {
@@ -1285,7 +1358,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
1285
1358
  };
1286
1359
  }, 100);
1287
1360
  return function () { return clearTimeout(timeoutId); };
1288
- }, [(_47 = props.organise) === null || _47 === void 0 ? void 0 : _47.showReadFloatingNav, props.type, props.id, loading]);
1361
+ }, [(_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.showReadFloatingNav, props.type, props.id, loading]);
1289
1362
  (0, react_1.useEffect)(function () {
1290
1363
  if (props.type !== "read")
1291
1364
  return;
@@ -5909,18 +5982,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5909
5982
  //=====================================================================================
5910
5983
  var handlePopUpModal = function (modalVisible, type) {
5911
5984
  switch (type) {
5912
- case "sort":
5913
- setSortModal(modalVisible);
5914
- break;
5915
- case "filter":
5916
- setFilterModal(modalVisible);
5917
- break;
5918
5985
  case "offline":
5919
5986
  setOfflineModal(modalVisible);
5920
5987
  break;
5921
- case "overview":
5922
- setOverviewModal(modalVisible);
5923
- break;
5924
5988
  case "blixify_new_tab":
5925
5989
  setAddTabModal(modalVisible);
5926
5990
  break;
@@ -5941,9 +6005,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
5941
6005
  setSelectedObjectData({});
5942
6006
  setStepCSVIndex(0);
5943
6007
  setCSVFile(null);
5944
- setSortModal(false);
5945
- setFilterModal(false);
5946
- setOverviewModal(false);
5947
6008
  setAddTabModal(false);
5948
6009
  setCSVFileData([]);
5949
6010
  setListCSVMapAttribute({});
@@ -6018,12 +6079,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6018
6079
  return (react_1.default.createElement(react_1.default.Fragment, null,
6019
6080
  react_1.default.createElement("div", { className: "grid items-center grid-cols-3 mt-6" },
6020
6081
  eachKey,
6021
- react_1.default.createElement(select_1.Select, { containerClassName: selectedObjectModel ? "ml-2" : "ml-2 col-span-2", label: "", options: filterOptions_1, value: clonedListValue[index], onChange: function (value) {
6082
+ react_1.default.createElement(select_1.Select, { portalDropdown: true, containerClassName: selectedObjectModel ? "ml-2" : "ml-2 col-span-2", label: "", options: filterOptions_1, value: clonedListValue[index], onChange: function (value) {
6022
6083
  var clonedListValueAttribute = JSON.parse(JSON.stringify(listCSVMapAttribute));
6023
6084
  clonedListValueAttribute[index] = value;
6024
6085
  setListCSVMapAttribute(clonedListValueAttribute);
6025
6086
  } }),
6026
- selectedObjectModel && (react_1.default.createElement(select_1.Select, { containerClassName: "ml-4", label: "", options: (0, readModule_1.renderObjectOptions)(selectedObjectModel.objectData), value: listCSVObjAttribute[index], onChange: function (value) {
6087
+ selectedObjectModel && (react_1.default.createElement(select_1.Select, { portalDropdown: true, containerClassName: "ml-4", label: "", options: (0, readModule_1.renderObjectOptions)(selectedObjectModel.objectData), value: listCSVObjAttribute[index], onChange: function (value) {
6027
6088
  var clonedListObjectValueAttribute = JSON.parse(JSON.stringify(listCSVObjAttribute));
6028
6089
  clonedListObjectValueAttribute[index] = value;
6029
6090
  setListCSVObjAttribute(clonedListObjectValueAttribute);
@@ -6084,17 +6145,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6084
6145
  //=====================================================================================
6085
6146
  //SECTION: Render CRUD
6086
6147
  //=====================================================================================
6087
- // INFO: columns the end user is allowed to toggle via organise.hideColumnEnabled.
6148
+ // INFO: columns the end user is allowed to toggle via bareSettings.bareViewSettings.
6088
6149
  // Developer-hidden columns (DataStructure.hide) are excluded on purpose —
6089
6150
  // a developer hiding a column is not a preference the user may override — as
6090
6151
  // are the id fields and anything that never becomes a column anyway.
6091
- var getTogglableColumns = function () {
6152
+ var getTogglableColumns = function (includeSchemaHidden) {
6092
6153
  return structure.filter(function (eachAttribute) {
6093
6154
  var _a;
6094
6155
  if (eachAttribute.id === "_id" ||
6095
6156
  eachAttribute.id === "id" ||
6096
6157
  eachAttribute.id === "baseDraft" ||
6097
- eachAttribute.hide ||
6158
+ (!includeSchemaHidden && eachAttribute.hide) ||
6098
6159
  utils_1.NON_TABLE_COLUMN_DATA_TYPES.includes(eachAttribute.type)) {
6099
6160
  return false;
6100
6161
  }
@@ -6108,41 +6169,98 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
6108
6169
  // INFO: user hides are only honoured while the feature is switched on, so
6109
6170
  // turning the prop off restores every column without clearing stored state.
6110
6171
  var getActiveUserHiddenColumnIds = function () {
6111
- var _a;
6112
- if (schemaPresent || !((_a = props.organise) === null || _a === void 0 ? void 0 : _a.hideColumnEnabled))
6172
+ if (!isViewSettingsEnabled || isSchemaHideMode)
6113
6173
  return [];
6114
6174
  return userHiddenColumnIds;
6115
6175
  };
6116
- // INFO: counted off the togglable list rather than the raw array so ids left
6117
- // over from an older schema can never inflate the badge.
6118
- var getUserHiddenColumnCount = function () {
6119
- var activeUserHiddenColumnIds = getActiveUserHiddenColumnIds();
6120
- return getTogglableColumns().filter(function (eachColumn) {
6121
- return activeUserHiddenColumnIds.includes(eachColumn.id);
6122
- }).length;
6176
+ // INFO: in schema-hide mode a hidden column must stay listed so it can be
6177
+ // shown again; in per-user mode a developer-hidden column is never togglable
6178
+ var getViewSettingsColumns = function () { return getTogglableColumns(isSchemaHideMode); };
6179
+ var getIsColumnHidden = function (column) {
6180
+ return isSchemaHideMode
6181
+ ? !!column.hide
6182
+ : getActiveUserHiddenColumnIds().includes(column.id);
6123
6183
  };
6124
- var renderHideColumnPopupContent = function () {
6125
- var activeUserHiddenColumnIds = getActiveUserHiddenColumnIds();
6126
- var togglableColumns = getTogglableColumns();
6127
- var visibleCount = togglableColumns.filter(function (eachColumn) { return !activeUserHiddenColumnIds.includes(eachColumn.id); }).length;
6128
- return (react_1.default.createElement("div", { className: "shadow-lg bg-white rounded-md p-4 flex flex-col w-[calc(100vw-2rem)] max-w-[280px]" },
6129
- react_1.default.createElement("div", { className: "flex flex-row items-center" },
6130
- react_1.default.createElement("p", { className: "text-sm font-medium text-gray-700" }, "Columns"),
6131
- react_1.default.createElement("div", { className: "grow" }),
6132
- activeUserHiddenColumnIds.length > 0 && (react_1.default.createElement(textButton_1.TextButton, { text: "Show all", onClick: handleShowAllUserHiddenColumns }))),
6133
- react_1.default.createElement("div", { className: "flex flex-col mt-2 overflow-y-auto max-h-72" }, togglableColumns.map(function (eachColumn) {
6134
- var isHidden = activeUserHiddenColumnIds.includes(eachColumn.id);
6135
- // INFO: an empty table header breaks both table renderers, so the
6136
- // last visible column stays locked until another one is shown.
6137
- var isLocked = !isHidden && visibleCount <= 1;
6138
- return (react_1.default.createElement("button", { key: eachColumn.id, type: "button", disabled: isLocked, "aria-pressed": !isHidden, "data-testid": "dtw-hide-column-".concat(eachColumn.id), className: "flex flex-row items-center py-2 text-sm text-left ".concat(isLocked
6184
+ var renderViewSettingsContent = function () {
6185
+ var _a, _b, _c, _d, _e;
6186
+ var viewColumns = getViewSettingsColumns();
6187
+ var hiddenCount = viewColumns.filter(getIsColumnHidden).length;
6188
+ var visibleCount = viewColumns.length - hiddenCount;
6189
+ var searchedColumns = columnSearch
6190
+ ? viewColumns.filter(function (eachColumn) {
6191
+ var _a;
6192
+ return ((_a = eachColumn.name) !== null && _a !== void 0 ? _a : eachColumn.id)
6193
+ .toLowerCase()
6194
+ .includes(columnSearch.toLowerCase());
6195
+ })
6196
+ : viewColumns;
6197
+ var darkMode = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode;
6198
+ var labelColor = darkMode ? "text-gray-200" : "text-gray-700";
6199
+ var dividerColor = darkMode ? "border-gray-700" : "border-gray-200";
6200
+ var renderColumnRow = function (eachColumn) {
6201
+ var isHidden = getIsColumnHidden(eachColumn);
6202
+ // INFO: an empty table header breaks both table renderers, so the last
6203
+ // visible column stays locked until another one is shown.
6204
+ var isLocked = !isHidden && visibleCount <= 1;
6205
+ var isDragging = draggingColumnId === eachColumn.id;
6206
+ return (react_1.default.createElement("div", { key: eachColumn.id, ref: function (el) {
6207
+ columnRowRefs.current[eachColumn.id] = el;
6208
+ }, className: "flex flex-row items-center gap-x-2 py-2 ".concat(isDragging ? "opacity-50" : "") },
6209
+ react_1.default.createElement(outline_1.Bars3Icon, { "data-testid": "dtw-column-drag-".concat(eachColumn.id), className: "h-4 w-4 shrink-0 cursor-grab touch-none ".concat(darkMode ? "text-gray-500" : "text-gray-400"), onPointerDown: function (event) {
6210
+ var _a, _b;
6211
+ event.preventDefault();
6212
+ (_b = (_a = event.target).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, event.pointerId);
6213
+ setDraggingColumnId(eachColumn.id);
6214
+ }, onPointerMove: handleColumnDragMove, onPointerUp: function () { return setDraggingColumnId(null); }, onPointerCancel: function () { return setDraggingColumnId(null); } }),
6215
+ react_1.default.createElement("button", { type: "button", disabled: isLocked, "aria-pressed": !isHidden, "data-testid": "dtw-hide-column-".concat(eachColumn.id), className: "flex grow flex-row items-center text-sm text-left ".concat(isLocked
6139
6216
  ? "opacity-50 cursor-not-allowed"
6140
6217
  : "cursor-pointer hover:text-primary-600"), onClick: function () {
6141
6218
  handleToggleUserHiddenColumn(eachColumn.id);
6142
6219
  } },
6143
- react_1.default.createElement("span", { className: "pr-3 truncate grow" }, eachColumn.name),
6144
- isHidden ? (react_1.default.createElement(outline_1.EyeSlashIcon, { className: "w-4 h-4 text-gray-400 shrink-0" })) : (react_1.default.createElement(outline_1.EyeIcon, { className: "w-4 h-4 text-primary-600 shrink-0" }))));
6145
- }))));
6220
+ react_1.default.createElement("span", { className: "pr-3 truncate grow ".concat(labelColor) }, eachColumn.name),
6221
+ isHidden ? (react_1.default.createElement(outline_1.EyeSlashIcon, { className: "w-4 h-4 text-gray-400 shrink-0" })) : (react_1.default.createElement(outline_1.EyeIcon, { className: "w-4 h-4 text-primary-600 shrink-0" })))));
6222
+ };
6223
+ return (react_1.default.createElement("div", { "data-testid": "dtw-view-settings", className: "flex flex-col" },
6224
+ react_1.default.createElement("div", { className: "flex flex-row items-center" },
6225
+ react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Columns"),
6226
+ react_1.default.createElement("div", { className: "grow" }),
6227
+ hiddenCount > 0 && (react_1.default.createElement(textButton_1.TextButton, { text: "Show all", onClick: handleShowAllUserHiddenColumns }))),
6228
+ react_1.default.createElement(textInput_1.TextInput, { id: "dtw-column-search", label: "", type: "text", containerClassName: "mt-2", value: columnSearch, placeholder: "Search columns", darkMode: darkMode, onChange: function (e) { return setColumnSearch(e.target.value); } }),
6229
+ react_1.default.createElement(scrollShadow_1.ScrollShadow, { axis: "y", className: "mt-1 max-h-56 overflow-y-auto", darkMode: darkMode },
6230
+ react_1.default.createElement("div", { className: "flex flex-col", onPointerMove: handleColumnDragMove, onPointerUp: function () { return setDraggingColumnId(null); } }, searchedColumns.length > 0 ? (searchedColumns.map(renderColumnRow)) : (react_1.default.createElement("p", { className: "py-3 text-sm text-gray-400" }, "No columns found")))),
6231
+ react_1.default.createElement("div", { className: "mt-3 border-t pt-3 ".concat(dividerColor) },
6232
+ react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Sort"),
6233
+ react_1.default.createElement("div", { className: "mt-1 flex flex-row items-center gap-x-2" },
6234
+ react_1.default.createElement("div", { className: "grow min-w-0" },
6235
+ react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-column", portalDropdown: true, label: "", containerClassName: "min-w-0", value: (_b = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _b !== void 0 ? _b : "", placeholder: "Column", darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode, options: viewColumns.map(function (eachColumn) {
6236
+ var _a;
6237
+ return ({
6238
+ key: eachColumn.id,
6239
+ label: (_a = eachColumn.name) !== null && _a !== void 0 ? _a : eachColumn.id,
6240
+ });
6241
+ }), onChange: function (value) {
6242
+ var _a;
6243
+ return handleSortColumn({
6244
+ sortId: value,
6245
+ type: (_a = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.type) !== null && _a !== void 0 ? _a : "desc",
6246
+ });
6247
+ } })),
6248
+ react_1.default.createElement("div", { className: "w-28 shrink-0" },
6249
+ react_1.default.createElement(select_1.Select, { id: "dtw-view-sort-type", portalDropdown: true, label: "", containerClassName: "", value: (_d = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.type) !== null && _d !== void 0 ? _d : "desc", darkMode: (_e = props.organise) === null || _e === void 0 ? void 0 : _e.darkMode, options: [
6250
+ { key: "asc", label: "Asc" },
6251
+ { key: "desc", label: "Desc" },
6252
+ ], onChange: function (value) {
6253
+ var _a;
6254
+ return handleSortColumn({
6255
+ sortId: (_a = activeSortId === null || activeSortId === void 0 ? void 0 : activeSortId.sortId) !== null && _a !== void 0 ? _a : "",
6256
+ type: value,
6257
+ });
6258
+ } })))),
6259
+ react_1.default.createElement("div", { className: "mt-3 border-t pt-3 ".concat(dividerColor) },
6260
+ react_1.default.createElement("p", { className: "text-sm font-medium ".concat(labelColor) }, "Rows per page"),
6261
+ react_1.default.createElement("div", { className: "mt-2 flex flex-row flex-wrap gap-2" }, PAGE_LIMIT_OPTIONS.map(function (eachOption) { return (react_1.default.createElement("button", { key: eachOption, type: "button", "data-testid": "dtw-page-limit-".concat(eachOption), className: "rounded-md border px-3 py-1 text-sm ".concat(pageLimit === eachOption
6262
+ ? "border-primary-500 text-primary-600"
6263
+ : "".concat(dividerColor, " ").concat(labelColor)), onClick: function () { return handleChangePageLimit(eachOption); } }, eachOption)); })))));
6146
6264
  };
6147
6265
  var renderTableHeader = function () {
6148
6266
  var _a, _b;
@@ -7165,7 +7283,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7165
7283
  var filterElementList = [];
7166
7284
  if (!((_f = props.organise) === null || _f === void 0 ? void 0 : _f.filterComponentNewRow)) {
7167
7285
  if ((_g = props.organise) === null || _g === void 0 ? void 0 : _g.showGroupByFeature) {
7168
- filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_o = (_k = (_j = (_h = props === null || props === void 0 ? void 0 : props.organise) === null || _h === void 0 ? void 0 : _h.renderGroupByOptions) === null || _j === void 0 ? void 0 : _j.call(_h)) !== null && _k !== void 0 ? _k : (_m = (_l = props === null || props === void 0 ? void 0 : props.organise) === null || _l === void 0 ? void 0 : _l.renderReferenceLabelOptions) === null || _m === void 0 ? void 0 : _m.call(_l, props.collectionId, true)) !== null && _o !== void 0 ? _o : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
7286
+ filterElementList.push(react_1.default.createElement(select_1.Select, { portalDropdown: true, label: "Group", options: (_o = (_k = (_j = (_h = props === null || props === void 0 ? void 0 : props.organise) === null || _h === void 0 ? void 0 : _h.renderGroupByOptions) === null || _j === void 0 ? void 0 : _j.call(_h)) !== null && _k !== void 0 ? _k : (_m = (_l = props === null || props === void 0 ? void 0 : props.organise) === null || _l === void 0 ? void 0 : _l.renderReferenceLabelOptions) === null || _m === void 0 ? void 0 : _m.call(_l, props.collectionId, true)) !== null && _o !== void 0 ? _o : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
7169
7287
  }
7170
7288
  if (filterComponent_1 &&
7171
7289
  Array.isArray(filterComponent_1) &&
@@ -7180,53 +7298,67 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7180
7298
  return null;
7181
7299
  };
7182
7300
  var renderListActionElements = function () {
7183
- 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;
7301
+ 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;
7184
7302
  var actionElementList = [];
7303
+ // INFO: sort, Slice Data and Model Overview all moved into the view
7304
+ // settings panel and the flex filters, so the Space row keeps only
7305
+ // refresh here
7185
7306
  if (schemaPresent) {
7186
- actionElementList.push(react_1.default.createElement(react_1.default.Fragment, null,
7187
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/10" : "bg-white", onClick: function () {
7188
- handlePopUpModal(true, "sort");
7189
- } }),
7190
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7191
- handlePopUpModal(true, "filter");
7192
- }, bgColor: ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkMode) ? "bg-white/10" : "bg-white" }),
7193
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7194
- handlePopUpModal(true, "overview");
7195
- }, bgColor: ((_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode) ? "bg-white/10" : "bg-white" }),
7196
- react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7197
- // INFO - When Refresh Don't Clear Filter
7198
- handleRefresh();
7199
- }, bgColor: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkMode) ? "bg-white/10" : "bg-white" })));
7307
+ actionElementList.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
7308
+ // INFO - When Refresh Don't Clear Filter
7309
+ handleRefresh();
7310
+ }, bgColor: ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode) ? "bg-white/10" : "bg-white" }));
7200
7311
  }
7201
- if ((((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListFilterAsPopup) ||
7202
- ((_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareCompactMode)) &&
7203
- !((_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareFlexFilters) &&
7312
+ if ((((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListFilterAsPopup) ||
7313
+ ((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareCompactMode)) &&
7314
+ !((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareFlexFilters) &&
7204
7315
  filterComponent_1 &&
7205
7316
  Array.isArray(filterComponent_1) &&
7206
7317
  filterComponent_1.length > 0) {
7207
7318
  // INFO: in compact mode, the search input is rendered inline by
7208
7319
  // renderListFilterElements, so drop the trailing search element
7209
7320
  // from the popup to avoid duplication.
7210
- var popupFilters = ((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareCompactMode) && !((_j = props.organise) === null || _j === void 0 ? void 0 : _j.hideSearch)
7321
+ var popupFilters = ((_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareCompactMode) && !((_f = props.organise) === null || _f === void 0 ? void 0 : _f.hideSearch)
7211
7322
  ? filterComponent_1.slice(0, -1)
7212
7323
  : filterComponent_1;
7213
7324
  if (popupFilters.length > 0) {
7214
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg p-4 flex flex-col space-y-3 w-[calc(100vw-2rem)] max-w-[320px]" }, popupFilters.map(function (filterEl, index) { return (react_1.default.createElement("div", { key: index }, filterEl)); })), anchor: "right", excludePortalIds: ["datepicker-portal"], lib: { Transition: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Transition } }));
7325
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_g = props.organise) === null || _g === void 0 ? void 0 : _g.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_h = props.organise) === null || _h === void 0 ? void 0 : _h.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg p-4 flex flex-col space-y-3 w-[calc(100vw-2rem)] max-w-[320px]" }, popupFilters.map(function (filterEl, index) { return (react_1.default.createElement("div", { key: index }, filterEl)); })), anchor: "right", excludePortalIds: ["datepicker-portal"], lib: { Transition: (_j = props === null || props === void 0 ? void 0 : props.lib) === null || _j === void 0 ? void 0 : _j.Transition } }));
7215
7326
  }
7216
7327
  }
7217
- // INFO: User column hiding the schemaPresent path already exposes
7218
- // OverviewModal, which writes hide back to the schema in the database.
7219
- // This one is the client-only counterpart for bare DTWs.
7220
- if (!schemaPresent && ((_o = props.organise) === null || _o === void 0 ? void 0 : _o.hideColumnEnabled)) {
7221
- var hiddenColumnCount = getUserHiddenColumnCount();
7222
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.darkMode, ctaComp: react_1.default.createElement("div", { className: "relative w-fit h-fit" },
7223
- hiddenColumnCount > 0 && (react_1.default.createElement("div", { "data-testid": "dtw-hide-columns-count", className: "absolute top-0 right-0 translate-x-1/4 -translate-y-1/4 z-[1] rounded-full bg-primary-500 text-white flex items-center justify-center w-5 h-5 text-[10px]" }, hiddenColumnCount)),
7224
- react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-hide-columns-btn", icon: react_1.default.createElement(outline_1.EyeSlashIcon, { className: "h-7 w-7 ".concat(hiddenColumnCount > 0
7328
+ // INFO: View settingscolumns (hide, reorder, search), sort and rows
7329
+ // per page in one panel. Standard on the new DTW; videColumnEnabled
7330
+ // keeps it available to legacy and bare DTWs.
7331
+ if (isViewSettingsEnabled) {
7332
+ var hiddenColumnCount_1 = getViewSettingsColumns().filter(getIsColumnHidden).length;
7333
+ // INFO: desktop and mobile both render, CSS decides which is shown
7334
+ // distinct test ids keep the two unambiguous for e2e
7335
+ var viewSettingsIcon = function (testIdSuffix, onClick) {
7336
+ var _a;
7337
+ return (react_1.default.createElement("div", { className: "relative w-fit h-fit" },
7338
+ hiddenColumnCount_1 > 0 && (react_1.default.createElement("div", { "data-testid": "dtw-hide-columns-count".concat(testIdSuffix), className: "absolute top-0 right-0 translate-x-1/4 -translate-y-1/4 z-[1] rounded-full bg-primary-500 text-white flex items-center justify-center w-5 h-5 text-[10px]" }, hiddenColumnCount_1)),
7339
+ react_1.default.createElement(iconButton_1.IconButton, { testId: "dtw-hide-columns-btn".concat(testIdSuffix), icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 ".concat(hiddenColumnCount_1 > 0
7225
7340
  ? "text-white"
7226
- : "text-primary-500") }), bgColor: hiddenColumnCount > 0 ? "bg-primary-500" : "bg-white" })), renderComp: renderHideColumnPopupContent(), anchor: "right", lib: { Transition: (_q = props === null || props === void 0 ? void 0 : props.lib) === null || _q === void 0 ? void 0 : _q.Transition } }));
7341
+ : "text-primary-500") }), bgColor: hiddenColumnCount_1 > 0
7342
+ ? "bg-primary-500"
7343
+ : ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode)
7344
+ ? "bg-white/10"
7345
+ : "bg-white", onClick: onClick })));
7346
+ };
7347
+ // INFO: Desktop — PopUp (hidden on mobile)
7348
+ actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
7349
+ react_1.default.createElement(popUp_1.PopUp, { darkMode: (_k = props.organise) === null || _k === void 0 ? void 0 : _k.darkMode, darkModeBg: (_l = props.organise) === null || _l === void 0 ? void 0 : _l.darkModeBg, ctaComp: viewSettingsIcon(""), renderComp: react_1.default.createElement("div", { className: "w-[calc(100vw-2rem)] max-w-[320px] rounded-md p-4 shadow-lg ".concat(((_m = props.organise) === null || _m === void 0 ? void 0 : _m.darkMode)
7350
+ ? "".concat((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.darkModeBg) !== null && _p !== void 0 ? _p : "bg-gray-900", " text-white")
7351
+ : "bg-white") }, renderViewSettingsContent()), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_q = props === null || props === void 0 ? void 0 : props.lib) === null || _q === void 0 ? void 0 : _q.Transition } })));
7352
+ // INFO: Mobile — the popover cannot fit the panel and overflows the
7353
+ // viewport, so a Modal takes over (same split as the flex filter)
7354
+ actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
7355
+ viewSettingsIcon("-mobile", function () {
7356
+ return setViewSettingsModalOpen(true);
7357
+ }),
7358
+ react_1.default.createElement(modal_1.Modal, { open: viewSettingsModalOpen, maxWidth: "lg", title: "View", darkMode: (_r = props.organise) === null || _r === void 0 ? void 0 : _r.darkMode, darkModeBg: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.darkModeBg, onClose: function () { return setViewSettingsModalOpen(false); }, renderContent: function () { return renderViewSettingsContent(); } })));
7227
7359
  }
7228
7360
  // INFO: Flex filter — desktop uses PopUp, mobile uses Modal
7229
- if ((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareFlexFilters) {
7361
+ if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareFlexFilters) {
7230
7362
  var flexActions = {
7231
7363
  handleAddFilter: handleFlexFilterAdd,
7232
7364
  handleRemoveFilter: handleFlexFilterRemove,
@@ -7239,16 +7371,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7239
7371
  };
7240
7372
  // INFO: Search input will only render above flex filters if bareListFilterAsPopup is true
7241
7373
  var searchInput = !isFirebase &&
7242
- ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareListFilterAsPopup) &&
7243
- !((_t = props.organise) === null || _t === void 0 ? void 0 : _t.hideSearch) &&
7374
+ ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareListFilterAsPopup) &&
7375
+ !((_v = props.organise) === null || _v === void 0 ? void 0 : _v.hideSearch) &&
7244
7376
  filterComponent_1 &&
7245
7377
  Array.isArray(filterComponent_1) &&
7246
7378
  filterComponent_1.length > 0
7247
7379
  ? filterComponent_1[filterComponent_1.length - 1]
7248
7380
  : undefined;
7249
7381
  var flexFilterLength_1 = activeFlexFilterCount_1;
7250
- if (!((_u = props.organise) === null || _u === void 0 ? void 0 : _u.hideSearch) &&
7251
- ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareListFilterAsPopup) &&
7382
+ if (!((_w = props.organise) === null || _w === void 0 ? void 0 : _w.hideSearch) &&
7383
+ ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListFilterAsPopup) &&
7252
7384
  (filterSearchParams === null || filterSearchParams === void 0 ? void 0 : filterSearchParams["search"]))
7253
7385
  flexFilterLength_1 += 1;
7254
7386
  var flexFilterIconBtn = function (mobile) {
@@ -7259,17 +7391,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7259
7391
  };
7260
7392
  // INFO: Desktop — PopUp (hidden on mobile)
7261
7393
  actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
7262
- react_1.default.createElement(popUp_1.PopUp, { darkMode: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListFilterQuery, searchInput, (_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListFilterAddComponent, undefined, {
7263
- darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode,
7264
- darkModeBg: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkModeBg,
7265
- }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_1 = props === null || props === void 0 ? void 0 : props.lib) === null || _1 === void 0 ? void 0 : _1.Transition } })));
7394
+ react_1.default.createElement(popUp_1.PopUp, { darkMode: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.darkMode, ctaComp: flexFilterIconBtn(), renderComp: (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterQuery, searchInput, (_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareListFilterAddComponent, undefined, {
7395
+ darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode,
7396
+ darkModeBg: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkModeBg,
7397
+ }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_3 = props === null || props === void 0 ? void 0 : props.lib) === null || _3 === void 0 ? void 0 : _3.Transition } })));
7266
7398
  // INFO: Mobile — IconButton that opens a Modal (hidden on desktop)
7267
7399
  actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
7268
- !((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareListMobileFloatingSearch) &&
7400
+ !((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileFloatingSearch) &&
7269
7401
  flexFilterIconBtn(true),
7270
- (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListFilterQuery, searchInput, (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListFilterAddComponent, {
7271
- darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode,
7272
- darkModeBg: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.darkModeBg,
7402
+ (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, structure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions, function () { return setFlexFilterModalOpen(false); }, (_5 = props.bareSettings) === null || _5 === void 0 ? void 0 : _5.bareListFilterQuery, searchInput, (_6 = props.bareSettings) === null || _6 === void 0 ? void 0 : _6.bareListFilterAddComponent, {
7403
+ darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode,
7404
+ darkModeBg: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkModeBg,
7273
7405
  })));
7274
7406
  }
7275
7407
  // INFO: bareUpdateActionBottom positions the read/update action bar. The list's own
@@ -7278,14 +7410,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7278
7410
  var actionBtns = renderActionButtons(props.type);
7279
7411
  if (actionBtns)
7280
7412
  actionElementList.push(actionBtns);
7281
- if (schemaPresent || ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.showExport)) {
7282
- actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
7413
+ if (schemaPresent || ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.showExport)) {
7414
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.darkMode, ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: ((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
7283
7415
  //TODO: Bug - Crash on Next Js
7284
7416
  // <Menu.Item>
7285
7417
  react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
7286
7418
  // </Menu.Item>
7287
7419
  ); })), lib: {
7288
- Transition: (_10 = props === null || props === void 0 ? void 0 : props.lib) === null || _10 === void 0 ? void 0 : _10.Transition,
7420
+ Transition: (_12 = props === null || props === void 0 ? void 0 : props.lib) === null || _12 === void 0 ? void 0 : _12.Transition,
7289
7421
  } }));
7290
7422
  }
7291
7423
  if (actionElementList.length > 0) {
@@ -7307,7 +7439,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7307
7439
  }
7308
7440
  if ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.filterComponentNewRow) {
7309
7441
  if (props.organise.showGroupByFeature) {
7310
- filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_k = (_g = (_f = (_e = props === null || props === void 0 ? void 0 : props.organise) === null || _e === void 0 ? void 0 : _e.renderGroupByOptions) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : (_j = (_h = props === null || props === void 0 ? void 0 : props.organise) === null || _h === void 0 ? void 0 : _h.renderReferenceLabelOptions) === null || _j === void 0 ? void 0 : _j.call(_h, props.collectionId, true)) !== null && _k !== void 0 ? _k : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
7442
+ filterElementList.push(react_1.default.createElement(select_1.Select, { portalDropdown: true, label: "Group", options: (_k = (_g = (_f = (_e = props === null || props === void 0 ? void 0 : props.organise) === null || _e === void 0 ? void 0 : _e.renderGroupByOptions) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : (_j = (_h = props === null || props === void 0 ? void 0 : props.organise) === null || _h === void 0 ? void 0 : _h.renderReferenceLabelOptions) === null || _j === void 0 ? void 0 : _j.call(_h, props.collectionId, true)) !== null && _k !== void 0 ? _k : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
7311
7443
  }
7312
7444
  if (filterComponent_1 &&
7313
7445
  Array.isArray(filterComponent_1) &&
@@ -7359,15 +7491,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7359
7491
  (0, listModule_1.renderFloatingMobileSearch)({
7360
7492
  filterSearch: filterSearch,
7361
7493
  handleNameSearch: handleNameSearch,
7362
- onFilterClick: function () {
7363
- var _a;
7364
- if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareFlexFilters) {
7365
- setFlexFilterModalOpen(true);
7366
- }
7367
- else {
7368
- handlePopUpModal(true, "filter");
7369
- }
7370
- },
7494
+ onFilterClick: function () { return setFlexFilterModalOpen(true); },
7371
7495
  hideSearch: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hideSearch,
7372
7496
  darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode,
7373
7497
  floatingOffset: (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareListFloatingActionOffset,
@@ -7790,7 +7914,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7790
7914
  return groups;
7791
7915
  };
7792
7916
  var renderGroupTable = function (multipleSelect) {
7793
- 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;
7917
+ 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;
7794
7918
  if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
7795
7919
  var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
7796
7920
  var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
@@ -7818,7 +7942,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7818
7942
  }
7819
7943
  else {
7820
7944
  return Object.entries(groupedSpaceTableData).map(function (_a) {
7821
- var _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;
7945
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
7822
7946
  var eachKey = _a[0], eachValue = _a[1];
7823
7947
  var dataList = eachValue;
7824
7948
  var ids = (dataList === null || dataList === void 0 ? void 0 : dataList.map(function (eachData) { return eachData._id; })) || [];
@@ -7858,15 +7982,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7858
7982
  }, linkType: props.linkType, custom: props.custom, newTabUrl: (_o = (_m = props.newTabUrl) === null || _m === void 0 ? void 0 : _m.default) !== null && _o !== void 0 ? _o : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_q = (_p = props.newTabUrl) === null || _p === void 0 ? void 0 : _p.addons) !== null && _q !== void 0 ? _q : "&type=read&collection=".concat(props.collectionId, "&view=general"), className: "mt-5", lib: { axios: (_r = props.lib) === null || _r === void 0 ? void 0 : _r.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.fixedPagination, advSettings: {
7859
7983
  addColumnEnabled: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.addColumnEnabled,
7860
7984
  renderAddColumnElements: renderAddMathColumn,
7861
- dragEnabled: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.advDragEnabled,
7862
- sortEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.advSortEnabled,
7863
- filterEnabled: ((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareFlexFilters)
7864
- ? false
7865
- : (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advFilterEnabled,
7985
+ dragEnabled: isViewSettingsEnabled,
7986
+ sortEnabled: isViewSettingsEnabled,
7987
+ // INFO: per-column header filter is replaced by the flex filters
7988
+ filterEnabled: false,
7866
7989
  sortId: activeSortId,
7867
- sortOptions: (_z = (_y = props.organise) === null || _y === void 0 ? void 0 : _y.renderReferenceLabelOptions) === null || _z === void 0 ? void 0 : _z.call(_y),
7990
+ sortOptions: (_w = (_v = (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions) === null || _v === void 0 ? void 0 : _v.call(_u)) !== null && _w !== void 0 ? _w : (isViewSettingsEnabled
7991
+ ? getViewSettingsColumns().map(function (eachColumn) {
7992
+ var _a;
7993
+ return ({
7994
+ key: eachColumn.id,
7995
+ label: (_a = eachColumn.name) !== null && _a !== void 0 ? _a : eachColumn.id,
7996
+ });
7997
+ })
7998
+ : undefined),
7868
7999
  onSortColumn: handleSortColumn,
7869
- onDragColumn: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.onChangeDrag,
8000
+ // INFO: header drag and the panel handle run the same reorder, so the
8001
+ // order persists identically whichever one the user grabs
8002
+ onDragColumn: handleReorderColumn,
7870
8003
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7871
8004
  var _a;
7872
8005
  return {
@@ -7883,7 +8016,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7883
8016
  return renderSearchContent(newQuery);
7884
8017
  },
7885
8018
  }, editable: {
7886
- active: ((_1 = props.edit) === null || _1 === void 0 ? void 0 : _1.listEditable) && !props.edit.disabledUpdate
8019
+ active: ((_x = props.edit) === null || _x === void 0 ? void 0 : _x.listEditable) && !props.edit.disabledUpdate
7887
8020
  ? true
7888
8021
  : false,
7889
8022
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -7897,7 +8030,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7897
8030
  });
7898
8031
  }); },
7899
8032
  }, onObjectEdit: handleObjectCellEdit, addable: {
7900
- active: ((_2 = props.edit) === null || _2 === void 0 ? void 0 : _2.listAddable) ? true : false,
8033
+ active: ((_y = props.edit) === null || _y === void 0 ? void 0 : _y.listAddable) ? true : false,
7901
8034
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
7902
8035
  return __generator(this, function (_a) {
7903
8036
  switch (_a.label) {
@@ -7908,7 +8041,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7908
8041
  }
7909
8042
  });
7910
8043
  }); },
7911
- }, darkMode: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.darkMode, hidePagination: true, disableEllipsisOnLongWord: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.disableEllipsisOnLongWord })));
8044
+ }, darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode, hidePagination: true, disableEllipsisOnLongWord: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.disableEllipsisOnLongWord })));
7912
8045
  });
7913
8046
  }
7914
8047
  }
@@ -7967,15 +8100,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7967
8100
  }, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.fixedPagination, advSettings: {
7968
8101
  addColumnEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.addColumnEnabled,
7969
8102
  renderAddColumnElements: renderAddMathColumn,
7970
- dragEnabled: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.advDragEnabled,
7971
- sortEnabled: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advSortEnabled,
7972
- filterEnabled: ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareFlexFilters)
7973
- ? false
7974
- : (_z = props.organise) === null || _z === void 0 ? void 0 : _z.advFilterEnabled,
8103
+ dragEnabled: isViewSettingsEnabled,
8104
+ sortEnabled: isViewSettingsEnabled,
8105
+ // INFO: per-column header filter is replaced by the flex filters
8106
+ filterEnabled: false,
7975
8107
  sortId: activeSortId,
7976
- sortOptions: (_1 = (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.renderReferenceLabelOptions) === null || _1 === void 0 ? void 0 : _1.call(_0),
8108
+ sortOptions: (_y = (_x = (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions) === null || _x === void 0 ? void 0 : _x.call(_w)) !== null && _y !== void 0 ? _y : (isViewSettingsEnabled
8109
+ ? getViewSettingsColumns().map(function (eachColumn) {
8110
+ var _a;
8111
+ return ({
8112
+ key: eachColumn.id,
8113
+ label: (_a = eachColumn.name) !== null && _a !== void 0 ? _a : eachColumn.id,
8114
+ });
8115
+ })
8116
+ : undefined),
7977
8117
  onSortColumn: handleSortColumn,
7978
- onDragColumn: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.onChangeDrag,
8118
+ // INFO: header drag and the panel handle run the same reorder, so the
8119
+ // order persists identically whichever one the user grabs
8120
+ onDragColumn: handleReorderColumn,
8121
+ onHideColumn: isViewSettingsEnabled
8122
+ ? handleToggleUserHiddenColumn
8123
+ : undefined,
7979
8124
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
7980
8125
  var _a;
7981
8126
  return {
@@ -7992,7 +8137,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
7992
8137
  return renderSearchContent(newQuery);
7993
8138
  },
7994
8139
  }, editable: {
7995
- active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listEditable) && !props.edit.disabledUpdate
8140
+ active: ((_z = props.edit) === null || _z === void 0 ? void 0 : _z.listEditable) && !props.edit.disabledUpdate
7996
8141
  ? true
7997
8142
  : false,
7998
8143
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -8006,7 +8151,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8006
8151
  });
8007
8152
  }); },
8008
8153
  }, onObjectEdit: handleObjectCellEdit, addable: {
8009
- active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
8154
+ active: ((_0 = props.edit) === null || _0 === void 0 ? void 0 : _0.listAddable) ? true : false,
8010
8155
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
8011
8156
  return __generator(this, function (_a) {
8012
8157
  switch (_a.label) {
@@ -8017,27 +8162,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8017
8162
  }
8018
8163
  });
8019
8164
  }); },
8020
- }, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode, hidePagination: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.disableEllipsisOnLongWord, pinColumns: (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareListTablePinColumns }));
8165
+ }, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode, hidePagination: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.disableEllipsisOnLongWord, pinColumns: (_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListTablePinColumns }));
8021
8166
  }
8022
- return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.disableSelectFullData) === null || _10 === void 0 ? void 0 : _10.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8167
+ return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_6 = (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.disableSelectFullData) === null || _6 === void 0 ? void 0 : _6.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
8023
8168
  selectedIds.length > 0 &&
8024
- !((_11 = props.edit) === null || _11 === void 0 ? void 0 : _11.disabledUpdate) &&
8025
- !((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
8169
+ !((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.disabledUpdate) &&
8170
+ !((_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
8026
8171
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
8027
8172
  handleBatchDraftData();
8028
8173
  } }),
8029
8174
  react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
8030
8175
  handleCloneSelectedData();
8031
8176
  } }))),
8032
- ((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8177
+ ((_9 = props.edit) === null || _9 === void 0 ? void 0 : _9.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
8033
8178
  handleGenerateDeletePasscode();
8034
8179
  setDeleteModal(true);
8035
8180
  } })),
8036
- !isFirebase && !((_14 = props.edit) === null || _14 === void 0 ? void 0 : _14.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8181
+ !isFirebase && !((_10 = props.edit) === null || _10 === void 0 ? void 0 : _10.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
8037
8182
  setBatchUpdateModal(true);
8038
8183
  } })),
8039
- ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareListMultipleSelectAddtionalActions) &&
8040
- ((_17 = (_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareListMultipleSelectAddtionalActions) === null || _17 === void 0 ? void 0 : _17.map(function (eachButton) {
8184
+ ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareListMultipleSelectAddtionalActions) &&
8185
+ ((_13 = (_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareListMultipleSelectAddtionalActions) === null || _13 === void 0 ? void 0 : _13.map(function (eachButton) {
8041
8186
  return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
8042
8187
  var _a, _b;
8043
8188
  (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
@@ -8045,20 +8190,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8045
8190
  }))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
8046
8191
  var _a, _b;
8047
8192
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
8048
- }, linkType: props.linkType, custom: props.custom, newTabUrl: (_19 = (_18 = props.newTabUrl) === null || _18 === void 0 ? void 0 : _18.default) !== null && _19 !== void 0 ? _19 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_21 = (_20 = props.newTabUrl) === null || _20 === void 0 ? void 0 : _20.addons) !== null && _21 !== void 0 ? _21 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8193
+ }, linkType: props.linkType, custom: props.custom, newTabUrl: (_15 = (_14 = props.newTabUrl) === null || _14 === void 0 ? void 0 : _14.default) !== null && _15 !== void 0 ? _15 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.addons) !== null && _17 !== void 0 ? _17 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
8049
8194
  handlePagination(value);
8050
- }, className: "mt-5", lib: { axios: (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.fixedPagination, advSettings: {
8051
- addColumnEnabled: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.addColumnEnabled,
8195
+ }, className: "mt-5", lib: { axios: (_18 = props.lib) === null || _18 === void 0 ? void 0 : _18.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.fixedPagination, advSettings: {
8196
+ addColumnEnabled: (_20 = props.organise) === null || _20 === void 0 ? void 0 : _20.addColumnEnabled,
8052
8197
  renderAddColumnElements: renderAddMathColumn,
8053
- dragEnabled: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.advDragEnabled,
8054
- sortEnabled: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.advSortEnabled,
8055
- filterEnabled: ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
8056
- ? false
8057
- : (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.advFilterEnabled,
8198
+ dragEnabled: isViewSettingsEnabled,
8199
+ sortEnabled: isViewSettingsEnabled,
8200
+ // INFO: per-column header filter is replaced by the flex filters
8201
+ filterEnabled: false,
8058
8202
  sortId: activeSortId,
8059
- sortOptions: (_30 = (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.renderReferenceLabelOptions) === null || _30 === void 0 ? void 0 : _30.call(_29),
8203
+ sortOptions: (_23 = (_22 = (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.renderReferenceLabelOptions) === null || _22 === void 0 ? void 0 : _22.call(_21)) !== null && _23 !== void 0 ? _23 : (isViewSettingsEnabled
8204
+ ? getViewSettingsColumns().map(function (eachColumn) {
8205
+ var _a;
8206
+ return ({
8207
+ key: eachColumn.id,
8208
+ label: (_a = eachColumn.name) !== null && _a !== void 0 ? _a : eachColumn.id,
8209
+ });
8210
+ })
8211
+ : undefined),
8060
8212
  onSortColumn: handleSortColumn,
8061
- onDragColumn: (_31 = props.organise) === null || _31 === void 0 ? void 0 : _31.onChangeDrag,
8213
+ // INFO: header drag and the panel handle run the same reorder, so the
8214
+ // order persists identically whichever one the user grabs
8215
+ onDragColumn: handleReorderColumn,
8062
8216
  filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
8063
8217
  var _a;
8064
8218
  return {
@@ -8075,7 +8229,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8075
8229
  return renderSearchContent(newQuery);
8076
8230
  },
8077
8231
  }, editable: {
8078
- active: ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.listEditable) && !props.edit.disabledUpdate
8232
+ active: ((_24 = props.edit) === null || _24 === void 0 ? void 0 : _24.listEditable) && !props.edit.disabledUpdate
8079
8233
  ? true
8080
8234
  : false,
8081
8235
  onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
@@ -8089,7 +8243,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8089
8243
  });
8090
8244
  }); },
8091
8245
  }, onObjectEdit: handleObjectCellEdit, addable: {
8092
- active: ((_33 = props.edit) === null || _33 === void 0 ? void 0 : _33.listAddable) ? true : false,
8246
+ active: ((_25 = props.edit) === null || _25 === void 0 ? void 0 : _25.listAddable) ? true : false,
8093
8247
  onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
8094
8248
  return __generator(this, function (_a) {
8095
8249
  switch (_a.label) {
@@ -8100,7 +8254,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8100
8254
  }
8101
8255
  });
8102
8256
  }); },
8103
- }, darkMode: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.darkMode, hidePagination: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.disableEllipsisOnLongWord }));
8257
+ }, darkMode: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.darkMode, hidePagination: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.disableEllipsisOnLongWord }));
8104
8258
  }
8105
8259
  };
8106
8260
  var renderTabContent = function (tabs, dataType, viewType) {
@@ -8790,7 +8944,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8790
8944
  return null;
8791
8945
  };
8792
8946
  var renderModalContent = function () {
8793
- 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;
8947
+ 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;
8794
8948
  if (loading) {
8795
8949
  return (react_1.default.createElement("div", { className: "mt-5" },
8796
8950
  react_1.default.createElement(loading_1.Loading, null),
@@ -8856,7 +9010,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8856
9010
  react_1.default.createElement(table_1.Table, { className: "mt-5", header: dataStateModel_1.queryTableHeader, data: renderQueryData(), loading: false }))) : (react_1.default.createElement(react_1.default.Fragment, null,
8857
9011
  react_1.default.createElement("p", null, "Click the button below to download."),
8858
9012
  (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(textInput_1.TextInput, { containerClassName: "mt-5", value: exportPDFTitle, type: "text", label: "Title (Optional)", placeholder: (_p = (_o = (_m = props.organise) === null || _m === void 0 ? void 0 : _m.exportSettings) === null || _o === void 0 ? void 0 : _o.defaultExportPDFName) !== null && _p !== void 0 ? _p : "Enter your report title", onChange: function (e) { return setExportPDFTitle(e.target.value); } })),
8859
- (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(select_1.Select, { label: "Sum Attribute", containerClassName: "mt-5", value: exportSumAttributeIds, options: (_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.renderReferenceLabelOptions) === null || _r === void 0 ? void 0 : _r.call(_q, "", false, "number")) !== null && _s !== void 0 ? _s : [], staticDropdown: true, onChange: function (value) {
9013
+ (exportType === "pdf" || exportType === "print") && (react_1.default.createElement(select_1.Select, { portalDropdown: true, label: "Sum Attribute", containerClassName: "mt-5", value: exportSumAttributeIds, options: (_s = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.renderReferenceLabelOptions) === null || _r === void 0 ? void 0 : _r.call(_q, "", false, "number")) !== null && _s !== void 0 ? _s : [], staticDropdown: true, onChange: function (value) {
8860
9014
  setExportSumAttributeIds(value);
8861
9015
  } })))),
8862
9016
  react_1.default.createElement("div", { className: "mt-5 flex items-center justify-between" },
@@ -8879,28 +9033,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8879
9033
  return handleExportCSVData(true, exportType === "print");
8880
9034
  } }))))));
8881
9035
  }
8882
- else if (sortModal) {
8883
- return (react_1.default.createElement(settingsModal_1.SortModal, { sort: activeSortId, onChangeSort: handleSortColumn, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, onClose: function () {
8884
- handlePopUpModal(false);
8885
- } }));
8886
- }
8887
- else if (overviewModal) {
8888
- return (react_1.default.createElement(settingsModal_1.OverviewModal, { model: structure, referenceSchema: referenceModelSchema, setReferenceSchema: setReferenceSchema, onChangeHide: function (updatedModel) {
8889
- var _a, _b;
8890
- // INFO: Update internal structure state so persistence captures the change
8891
- setStructure(updatedModel);
8892
- (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onChangeHide) === null || _b === void 0 ? void 0 : _b.call(_a, updatedModel);
8893
- }, onClose: function () {
8894
- handlePopUpModal(false);
8895
- } }));
8896
- }
8897
- else if (filterModal) {
8898
- return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, model: props.model, onChangeFilter: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeFilter, renderReferenceLabelOptions: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
8899
- handlePopUpModal(false);
8900
- } }));
8901
- }
8902
9036
  else if (addTabModal) {
8903
- return (react_1.default.createElement(settingsModal_1.TabModal, { type: props.type, tabs: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.extendedTabs, onChangeTabs: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.onChangeTabs, model: structure, renderReferenceLabelOptions: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.renderReferenceLabelOptions, onClose: function () {
9037
+ return (react_1.default.createElement(settingsModal_1.TabModal, { type: props.type, tabs: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.extendedTabs, onChangeTabs: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.onChangeTabs, model: structure, renderReferenceLabelOptions: (_w = props.organise) === null || _w === void 0 ? void 0 : _w.renderReferenceLabelOptions, onClose: function () {
8904
9038
  handlePopUpModal(false);
8905
9039
  } }));
8906
9040
  }
@@ -8962,7 +9096,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
8962
9096
  return eachModel.id === selectedObjectStructureId;
8963
9097
  });
8964
9098
  if (filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) {
8965
- var modalModel_1 = (_1 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _1 !== void 0 ? _1 : [];
9099
+ var modalModel_1 = (_x = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _x !== void 0 ? _x : [];
8966
9100
  var handleOnFailValidation = function (refList) {
8967
9101
  var _a, _b;
8968
9102
  if ((refList === null || refList === void 0 ? void 0 : refList.length) > 0) {
@@ -9034,16 +9168,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9034
9168
  disabledOnEnter_2 = true;
9035
9169
  return null;
9036
9170
  });
9037
- if ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareListObjectHandleData) {
9171
+ if ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListObjectHandleData) {
9038
9172
  var listObjectViewType = props.type === "read"
9039
9173
  ? "read"
9040
9174
  : selectedObjectId
9041
9175
  ? "update"
9042
9176
  : "new";
9043
- (_4 = (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListObjectHandleData) === null || _4 === void 0 ? void 0 : _4.call(_3, listObjectViewType, selectedObjectData);
9177
+ (_0 = (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListObjectHandleData) === null || _0 === void 0 ? void 0 : _0.call(_z, listObjectViewType, selectedObjectData);
9044
9178
  }
9045
9179
  return (react_1.default.createElement(react_1.default.Fragment, null,
9046
- react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_5 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _5 !== void 0 ? _5 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
9180
+ react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " ").concat(gridGap, " pb-32 mt-6 sm:pb-36"), ref: objectFormRef, refList: objectFormInputRefs, handleComplete: handleSubmitObjectDataType, disabledOnEnter: disabledOnEnter_2, handleOnFailValidation: handleOnFailValidation }, renderDataTemplateFormContent(selectedObjectData, (_1 = filterObjectModel === null || filterObjectModel === void 0 ? void 0 : filterObjectModel.objectData) !== null && _1 !== void 0 ? _1 : [], objectFormInputRefs, true, filterObjectModel.type === "listObject", undefined, filterObjectModel.type === "listObject"
9047
9181
  ? selectedData
9048
9182
  : undefined)),
9049
9183
  react_1.default.createElement("div", { className: "flex justify-end pt-8" },
@@ -9167,7 +9301,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9167
9301
  var model = modelFound !== null && modelFound !== void 0 ? modelFound : defaultModel;
9168
9302
  return (react_1.default.createElement(react_1.default.Fragment, null,
9169
9303
  react_1.default.createElement(form_1.Form, { ref: batchUpdateFormRef, refList: [batchUpdateColumnIdRef, batchUpdateInputRef], handleComplete: handleBatchUpdateData },
9170
- react_1.default.createElement(select_1.Select, { ref: batchUpdateColumnIdRef, id: "columnId", value: (_a = batchUpdateData.columnId) !== null && _a !== void 0 ? _a : "", label: "Column ID", options: columnIdOptions, onChange: function (value) {
9304
+ react_1.default.createElement(select_1.Select, { portalDropdown: true, ref: batchUpdateColumnIdRef, id: "columnId", value: (_a = batchUpdateData.columnId) !== null && _a !== void 0 ? _a : "", label: "Column ID", options: columnIdOptions, onChange: function (value) {
9171
9305
  var _a;
9172
9306
  var _b;
9173
9307
  var columnDataValue = undefined;
@@ -9220,12 +9354,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9220
9354
  return "Export ".concat(exportType.toUpperCase());
9221
9355
  else if (exportQR)
9222
9356
  return "Export QR";
9223
- else if (sortModal)
9224
- return "Sort Data";
9225
- else if (filterModal)
9226
- return "Slice Data";
9227
- else if (overviewModal)
9228
- return "Model Overview";
9229
9357
  else if (addTabModal)
9230
9358
  return "Add Tab";
9231
9359
  else if (offlineModal)
@@ -9257,7 +9385,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9257
9385
  };
9258
9386
  return (react_1.default.createElement(react_1.default.Fragment, null,
9259
9387
  renderNotification("root"),
9260
- ((_49 = (_48 = props.renderSettings) === null || _48 === void 0 ? void 0 : _48.renderLoadingUI) === null || _49 === void 0 ? void 0 : _49.call(_48)) && loading ? ((_50 = props.renderSettings) === null || _50 === void 0 ? void 0 : _50.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_51 = props.organise) === null || _51 === void 0 ? void 0 : _51.darkMode, darkModeBg: (_52 = props.organise) === null || _52 === void 0 ? void 0 : _52.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9388
+ ((_54 = (_53 = props.renderSettings) === null || _53 === void 0 ? void 0 : _53.renderLoadingUI) === null || _54 === void 0 ? void 0 : _54.call(_53)) && loading ? ((_55 = props.renderSettings) === null || _55 === void 0 ? void 0 : _55.renderLoadingUI()) : (react_1.default.createElement(modal_1.Modal, { darkMode: (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.darkMode, darkModeBg: (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.darkModeBg, maxWidth: selectedObjectStructureId || excelModal ? "2xl" : undefined, open: modalVisible, title: renderModalTitle(), renderContent: renderModalContent, onClose: function () {
9261
9389
  var _a, _b;
9262
9390
  if (loading)
9263
9391
  return;
@@ -9268,7 +9396,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9268
9396
  setExportCSVEmail((_b = (_a = props.devSettings.currentUser) === null || _a === void 0 ? void 0 : _a.userEmail) !== null && _b !== void 0 ? _b : "");
9269
9397
  }
9270
9398
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) })),
9271
- react_1.default.createElement(modal_1.Modal, { darkMode: (_53 = props.organise) === null || _53 === void 0 ? void 0 : _53.darkMode, darkModeBg: (_54 = props.organise) === null || _54 === void 0 ? void 0 : _54.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9399
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkMode, darkModeBg: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkModeBg, maxWidth: "2xl", open: referenceCreationModal.id ? true : false, renderContent: function () {
9272
9400
  return (react_1.default.createElement(referenceModal_1.ReferenceModal, { referenceModelSchema: referenceModelSchema, referenceDataStructure: referenceCreationModal, devSettings: props.devSettings, handleCreateRefId: function (dataId) {
9273
9401
  if (dataId) {
9274
9402
  var currentValue = selectedData[referenceCreationModal.id];
@@ -9284,19 +9412,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9284
9412
  }, onClose: function () {
9285
9413
  setReferenceCreationModal({ id: "", name: "", type: "string" });
9286
9414
  } }),
9287
- react_1.default.createElement(modal_1.Modal, { darkMode: (_55 = props.organise) === null || _55 === void 0 ? void 0 : _55.darkMode, darkModeBg: (_56 = props.organise) === null || _56 === void 0 ? void 0 : _56.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9415
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkMode, darkModeBg: (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.darkModeBg, maxWidth: "2xl", open: Object.keys(referenceDeleteTableData).length > 0, renderContent: renderReferenceDeleteTable, onClose: function () {
9288
9416
  setReferenceDeleteTableData({});
9289
9417
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9290
- react_1.default.createElement(modal_1.Modal, { darkMode: (_57 = props.organise) === null || _57 === void 0 ? void 0 : _57.darkMode, darkModeBg: (_58 = props.organise) === null || _58 === void 0 ? void 0 : _58.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9418
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.darkMode, darkModeBg: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkModeBg, open: deleteModal, renderContent: renderDeleteModalContent, onClose: function () {
9291
9419
  setDeletePasscodeInput("");
9292
9420
  setDeleteModal(!deleteModal);
9293
9421
  setDeleteFeedId("");
9294
9422
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9295
- react_1.default.createElement(modal_1.Modal, { darkMode: (_59 = props.organise) === null || _59 === void 0 ? void 0 : _59.darkMode, darkModeBg: (_60 = props.organise) === null || _60 === void 0 ? void 0 : _60.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9423
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkMode, darkModeBg: (_65 = props.organise) === null || _65 === void 0 ? void 0 : _65.darkModeBg, open: batchUpdateModal, renderContent: renderBatchUpdateModalContent, onClose: function () {
9296
9424
  setBatchUpdateData({ columnId: "", columnData: {} });
9297
9425
  setBatchUpdateModal(false);
9298
9426
  }, notification: react_1.default.createElement(react_1.default.Fragment, null, renderNotification("modal")) }),
9299
- react_1.default.createElement(modal_1.Modal, { darkMode: (_61 = props.organise) === null || _61 === void 0 ? void 0 : _61.darkMode, darkModeBg: (_62 = props.organise) === null || _62 === void 0 ? void 0 : _62.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9427
+ react_1.default.createElement(modal_1.Modal, { darkMode: (_66 = props.organise) === null || _66 === void 0 ? void 0 : _66.darkMode, darkModeBg: (_67 = props.organise) === null || _67 === void 0 ? void 0 : _67.darkModeBg, title: "Edit Auth Method", open: selectedAuthMethod ? true : false, renderContent: function () {
9300
9428
  var _a;
9301
9429
  if (props.space)
9302
9430
  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 }));
@@ -9304,7 +9432,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
9304
9432
  }, onClose: function () {
9305
9433
  setSelectedAuthMethod("");
9306
9434
  } }),
9307
- isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_63 = props.organise) === null || _63 === void 0 ? void 0 : _63.darkMode, darkModeBg: (_64 = props.organise) === null || _64 === void 0 ? void 0 : _64.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9435
+ isActivityLog && (react_1.default.createElement(modal_1.Modal, { darkMode: (_68 = props.organise) === null || _68 === void 0 ? void 0 : _68.darkMode, darkModeBg: (_69 = props.organise) === null || _69 === void 0 ? void 0 : _69.darkModeBg, open: activityModal, title: "Activity Log", renderContent: function () {
9308
9436
  var _a, _b;
9309
9437
  return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
9310
9438
  ? props.title