blixify-ui-web 1.3.53 → 1.3.55

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 (43) hide show
  1. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/index.js +436 -137
  3. package/lib/components/data/dataTemplate/index.js.map +1 -1
  4. package/lib/components/data/dataTemplate/timelineBars.d.ts +0 -2
  5. package/lib/components/data/dataTemplate/timelineBars.d.ts.map +1 -1
  6. package/lib/components/data/dataTemplate/timelineBars.js +2 -8
  7. package/lib/components/data/dataTemplate/timelineBars.js.map +1 -1
  8. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +3 -0
  9. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
  10. package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
  11. package/lib/components/data/formula/index.d.ts.map +1 -1
  12. package/lib/components/data/formula/index.js +23 -7
  13. package/lib/components/data/formula/index.js.map +1 -1
  14. package/lib/components/display/modal/index.d.ts.map +1 -1
  15. package/lib/components/display/modal/index.js +3 -1
  16. package/lib/components/display/modal/index.js.map +1 -1
  17. package/lib/components/display/newGrid/index.d.ts.map +1 -1
  18. package/lib/components/display/newGrid/index.js +52 -21
  19. package/lib/components/display/newGrid/index.js.map +1 -1
  20. package/lib/components/display/newKanban/index.d.ts +9 -0
  21. package/lib/components/display/newKanban/index.d.ts.map +1 -1
  22. package/lib/components/display/newKanban/index.js +162 -47
  23. package/lib/components/display/newKanban/index.js.map +1 -1
  24. package/lib/components/display/newTable/index.d.ts.map +1 -1
  25. package/lib/components/display/newTable/index.js +77 -21
  26. package/lib/components/display/newTable/index.js.map +1 -1
  27. package/lib/components/display/newTable/rowRendering.d.ts +17 -0
  28. package/lib/components/display/newTable/rowRendering.d.ts.map +1 -1
  29. package/lib/components/display/newTable/rowRendering.js +16 -1
  30. package/lib/components/display/newTable/rowRendering.js.map +1 -1
  31. package/lib/components/display/newTimeline/index.d.ts +19 -0
  32. package/lib/components/display/newTimeline/index.d.ts.map +1 -0
  33. package/lib/components/display/newTimeline/index.js +139 -0
  34. package/lib/components/display/newTimeline/index.js.map +1 -0
  35. package/lib/components/index.d.ts +1 -0
  36. package/lib/components/index.d.ts.map +1 -1
  37. package/lib/components/index.js +3 -1
  38. package/lib/components/index.js.map +1 -1
  39. package/lib/components/input/select/index.d.ts.map +1 -1
  40. package/lib/components/input/select/index.js +6 -4
  41. package/lib/components/input/select/index.js.map +1 -1
  42. package/lib/tail.css +1 -1
  43. package/package.json +1 -1
@@ -132,6 +132,7 @@ var newTable_1 = require("../../display/newTable");
132
132
  var newList_1 = require("../../display/newList");
133
133
  var listRowFields_1 = require("../../display/newList/listRowFields");
134
134
  var newGrid_1 = require("../../display/newGrid");
135
+ var newTimeline_1 = require("../../display/newTimeline");
135
136
  var newKanban_1 = require("../../display/newKanban");
136
137
  var newCalendar_1 = require("../../display/newCalendar");
137
138
  var address_1 = require("../../input/address");
@@ -183,6 +184,7 @@ var timelineBars_1 = require("./timelineBars");
183
184
  var viewStatePersistence_1 = require("./viewStatePersistence");
184
185
  var permissions_1 = require("./permissions");
185
186
  var columnWidth_1 = require("../../display/newTable/columnWidth");
187
+ var rowRendering_1 = require("../../display/newTable/rowRendering");
186
188
  // INFO: builds the notification message for a failed write. Callers must gate on
187
189
  // `err.response` alone, never on a specific status — a catch that only handles 400 shows
188
190
  // the user nothing at all for any other status, so a write silently disappears. A 5xx is
@@ -213,6 +215,9 @@ var handleIsEmptyElement = function (element) {
213
215
  // one request; kept short, since a row scrolled into view shows an empty
214
216
  // bubble until its count arrives
215
217
  var COMMENT_COUNT_BATCH_MS = 50;
218
+ // INFO: draws its content when mounted, so content handed to a closed pop-up
219
+ // is not built until the pop-up opens
220
+ var LazyContent = function (props) { return (react_1.default.createElement(react_1.default.Fragment, null, props.render())); };
216
221
  // INFO: long enough for the views a closing comments panel saves to land
217
222
  var CLOSED_ROW_RECOUNT_MS = 1500;
218
223
  // INFO: how long an in-place refresh that keeps the group totals waits for its
@@ -232,6 +237,9 @@ var PAGE_LIMIT_OPTIONS = [10, 25, 50, 100];
232
237
  // INFO: the most rows a formula sort or filter reads into the browser; each is
233
238
  // evaluated, filtered and ordered locally, so a larger read could freeze the tab
234
239
  exports.FORMULA_VIEW_MAX_ROWS = 5000;
240
+ // INFO: holds the per-group loader while a returning kanban reads its lanes
241
+ // back, so lane sentinels queue behind it; no band can take this key
242
+ var KANBAN_LANE_CATCH_UP_KEY = "__laneCatchUp";
235
243
  var CALENDAR_VIEW_BY_SWITCH = {
236
244
  month: "dayGridMonth",
237
245
  week: "timeGridWeek",
@@ -889,6 +897,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
889
897
  scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
890
898
  scrollOffset: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollOffset,
891
899
  scrollPageIndex: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollPageIndex,
900
+ scrollLaneRows: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollLaneRows,
892
901
  });
893
902
  // INFO: one restore per mount — polling and SSE refetches must not scroll the user back
894
903
  var scrollRestoredRef = (0, react_1.useRef)(false);
@@ -913,8 +922,28 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
913
922
  : null;
914
923
  })[0];
915
924
  var scrollCatchUpRef = (0, react_1.useRef)(initialScrollCatchUp);
925
+ // INFO: a kanban's lanes page themselves, so a card deep in one lane is not
926
+ // in the board's first pages. On a return to the board a record was opened
927
+ // from, every lane reads back to the cards it held (see
928
+ // handleCatchUpKanbanLanes); null once that is done with or dropped
929
+ var initialLaneCatchUp = (0, react_1.useState)(function () {
930
+ var _a, _b;
931
+ return isPersistEnabled &&
932
+ Object.keys((_a = persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollLaneRows) !== null && _a !== void 0 ? _a : {}).length > 0 &&
933
+ !!(persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId) &&
934
+ (0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistKey)
935
+ ? persistedState.scrollLaneRows
936
+ : null;
937
+ })[0];
938
+ var laneCatchUpRef = (0, react_1.useRef)(initialLaneCatchUp);
939
+ var laneCatchUpRunningRef = (0, react_1.useRef)(false);
916
940
  // INFO: tells a mount apart from a tab switch on a mounted instance
917
941
  var scrollIdentityRef = (0, react_1.useRef)(null);
942
+ // INFO: the grid, list and kanban items built so far, by the settings they
943
+ // were built with and then by their record. An item whose record and
944
+ // settings are unchanged keeps its object, so a page load builds and draws
945
+ // only the new items
946
+ var gridItemCacheRef = (0, react_1.useRef)(new Map());
918
947
  var scrollScopeStartRef = (0, react_1.useRef)(null);
919
948
  var scrollScopeEndRef = (0, react_1.useRef)(null);
920
949
  // INFO: captures the doc exactly as loaded from the server — used by
@@ -2638,9 +2667,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2638
2667
  if (!isPersistEnabled)
2639
2668
  return;
2640
2669
  scrollCaptureRef.current = __assign(__assign({}, (0, viewStatePersistence_1.handleCaptureScrollPosition)(recordId, handleResolveScrollAxis(), handleResolveScrollScope())), {
2641
- // INFO: page mode saves pageIndex itself
2642
- scrollPageIndex: renderCheckScrollMode()
2670
+ // INFO: page mode saves pageIndex itself, and kanban lanes their own
2671
+ // depth instead of a page of the whole list
2672
+ scrollPageIndex: renderCheckScrollMode() && !handleCheckKanbanLanePaging()
2643
2673
  ? handleResolveScrollPageIndex(recordId)
2674
+ : undefined, scrollLaneRows: handleCheckKanbanLanePaging()
2675
+ ? handleGetKanbanLaneRows()
2644
2676
  : undefined });
2645
2677
  handleSaveView(handleBuildViewSnapshot());
2646
2678
  (0, viewStatePersistence_1.handleMarkLastDrill)((_a = props.organise) === null || _a === void 0 ? void 0 : _a.persistViewState, props.collectionId, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.persistKey);
@@ -2662,6 +2694,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2662
2694
  return;
2663
2695
  }
2664
2696
  scrollCatchUpRef.current = null;
2697
+ laneCatchUpRef.current = null;
2665
2698
  scrollCaptureRef.current = {};
2666
2699
  /* eslint-disable */
2667
2700
  }, [
@@ -2785,12 +2818,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2785
2818
  scrollAnchorId: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollAnchorId,
2786
2819
  scrollOffset: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollOffset,
2787
2820
  scrollPageIndex: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollPageIndex,
2821
+ scrollLaneRows: persistedState === null || persistedState === void 0 ? void 0 : persistedState.scrollLaneRows,
2788
2822
  };
2789
2823
  var isOtherListReturn = !(0, viewStatePersistence_1.handleIsLastDrill)(props.collectionId, (_c = props.organise) === null || _c === void 0 ? void 0 : _c.persistKey);
2790
2824
  scrollRestoredRef.current = isSwitch || isOtherListReturn;
2791
2825
  // INFO: a list that will not restore has no rows to catch up to
2792
- if (scrollRestoredRef.current)
2826
+ if (scrollRestoredRef.current) {
2793
2827
  scrollCatchUpRef.current = null;
2828
+ laneCatchUpRef.current = null;
2829
+ }
2794
2830
  /* eslint-disable */
2795
2831
  }, [props.collectionId, (_106 = props.organise) === null || _106 === void 0 ? void 0 : _106.persistKey]);
2796
2832
  /* eslint-enable */
@@ -2816,6 +2852,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
2816
2852
  /* eslint-disable */
2817
2853
  }, [isPersistEnabled, props.type, tableLoading, spaceTableData.length]);
2818
2854
  /* eslint-enable */
2855
+ // INFO: the board's first rows are in, so its lanes read back to the depth
2856
+ // they had. Waits for the kanban tab, as a list can read its first rows on
2857
+ // another tab before the saved one is chosen
2858
+ (0, react_1.useEffect)(function () {
2859
+ if (!laneCatchUpRef.current || laneCatchUpRunningRef.current)
2860
+ return;
2861
+ if (props.type !== "list" || tableLoading)
2862
+ return;
2863
+ if (!handleCheckKanbanLanePaging())
2864
+ return;
2865
+ handleCatchUpKanbanLanes();
2866
+ /* eslint-disable */
2867
+ }, [props.type, tableLoading, tableData.length, selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.id]);
2868
+ /* eslint-enable */
2819
2869
  (0, react_1.useEffect)(function () {
2820
2870
  handleCheckOfflineDataLength();
2821
2871
  /* eslint-disable */
@@ -4627,7 +4677,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
4627
4677
  if (!isScrollMode && !isFirebase) {
4628
4678
  handleSetListData(dataList, prettierDataList);
4629
4679
  setSize((_m = responseData.count) !== null && _m !== void 0 ? _m : 0);
4630
- if (renderCheckGroupPaging())
4680
+ // INFO: kanban lanes load by scroll from the rows this read gave
4681
+ // them, so they only drop the cursors of the list read before
4682
+ if (handleCheckKanbanLanePaging())
4683
+ handleResetGroupPaging();
4684
+ else if (renderCheckGroupPaging())
4631
4685
  handleLoadGroupFirstPages();
4632
4686
  }
4633
4687
  else {
@@ -11236,7 +11290,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11236
11290
  return null;
11237
11291
  };
11238
11292
  var renderListActionElements = function () {
11239
- 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;
11293
+ 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;
11240
11294
  var actionElementList = [];
11241
11295
  // INFO: sort, Slice Data and Model Overview all moved into the view
11242
11296
  // settings panel and the flex filters, so the Space row keeps only
@@ -11286,9 +11340,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11286
11340
  };
11287
11341
  // INFO: Desktop — PopUp (hidden on mobile)
11288
11342
  actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
11289
- 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)
11290
- ? "".concat((_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.darkModeBg) !== null && _p !== void 0 ? _p : "bg-gray-900", " text-white")
11291
- : "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 } })));
11343
+ 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(""),
11344
+ // INFO: built only while the panel is open — it lists
11345
+ // every column, so building it on each redraw of a wide
11346
+ // table cost as much as the table's own rows
11347
+ renderComp: react_1.default.createElement(LazyContent, { render: function () {
11348
+ var _a, _b, _c;
11349
+ return (react_1.default.createElement("div", { className: "w-[calc(100vw-2rem)] max-w-[320px] rounded-md p-4 shadow-lg ".concat(((_a = props.organise) === null || _a === void 0 ? void 0 : _a.darkMode)
11350
+ ? "".concat((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.darkModeBg) !== null && _c !== void 0 ? _c : "bg-gray-900", " text-white")
11351
+ : "bg-white") }, renderViewSettingsContent()));
11352
+ } }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_m = props === null || props === void 0 ? void 0 : props.lib) === null || _m === void 0 ? void 0 : _m.Transition } })));
11292
11353
  // INFO: Mobile — the popover cannot fit the panel and overflows the
11293
11354
  // viewport, so a Modal takes over (same split as the flex filter)
11294
11355
  actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
@@ -11296,11 +11357,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11296
11357
  viewSettingsIcon("-mobile", function () {
11297
11358
  return setViewSettingsModalOpen(true);
11298
11359
  }),
11299
- 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(); } })));
11360
+ react_1.default.createElement(modal_1.Modal, { open: viewSettingsModalOpen, maxWidth: "lg", title: "View", darkMode: (_o = props.organise) === null || _o === void 0 ? void 0 : _o.darkMode, darkModeBg: (_p = props.organise) === null || _p === void 0 ? void 0 : _p.darkModeBg, onClose: function () { return setViewSettingsModalOpen(false); }, renderContent: function () { return renderViewSettingsContent(); } })));
11300
11361
  }
11301
11362
  // INFO: Flex filter — desktop uses PopUp, mobile uses Modal
11302
- if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareFlexFilters) {
11303
- var flexActions = __assign({ handleAddFilter: handleFlexFilterAdd, handleRemoveFilter: handleFlexFilterRemove, handleClearAllFilters: handleFlexFilterClearAll, handleColumnChange: handleFlexFilterColumnChange, handleOperatorChange: handleFlexFilterOperatorChange, handleValueChange: handleFlexFilterValueChange, handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded, handleReferenceSearch: handleFlexFilterReferenceSearch, isContainsSupported: isFlexOrSupported }, (isFlexOrSupported
11363
+ if ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareFlexFilters) {
11364
+ var flexActions_1 = __assign({ handleAddFilter: handleFlexFilterAdd, handleRemoveFilter: handleFlexFilterRemove, handleClearAllFilters: handleFlexFilterClearAll, handleColumnChange: handleFlexFilterColumnChange, handleOperatorChange: handleFlexFilterOperatorChange, handleValueChange: handleFlexFilterValueChange, handleReferenceOptionsLoaded: handleFlexFilterReferenceOptionsLoaded, handleReferenceSearch: handleFlexFilterReferenceSearch, isContainsSupported: isFlexOrSupported }, (isFlexOrSupported
11304
11365
  ? {
11305
11366
  handleAddOrFilter: handleFlexFilterAddOr,
11306
11367
  canAddOrFilter: function (filterId) {
@@ -11309,17 +11370,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11309
11370
  }
11310
11371
  : {}));
11311
11372
  // INFO: Search input will only render above flex filters if bareListFilterAsPopup is true
11312
- var searchInput = !isFirebase &&
11313
- ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareListFilterAsPopup) &&
11314
- !((_v = props.organise) === null || _v === void 0 ? void 0 : _v.hideSearch) &&
11373
+ var searchInput_1 = !isFirebase &&
11374
+ ((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareListFilterAsPopup) &&
11375
+ !((_s = props.organise) === null || _s === void 0 ? void 0 : _s.hideSearch) &&
11315
11376
  filterComponent_1 &&
11316
11377
  Array.isArray(filterComponent_1) &&
11317
11378
  filterComponent_1.length > 0
11318
11379
  ? filterComponent_1[filterComponent_1.length - 1]
11319
11380
  : undefined;
11320
11381
  var flexFilterLength_1 = activeFlexFilterCount_1;
11321
- if (!((_w = props.organise) === null || _w === void 0 ? void 0 : _w.hideSearch) &&
11322
- ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListFilterAsPopup) &&
11382
+ if (!((_t = props.organise) === null || _t === void 0 ? void 0 : _t.hideSearch) &&
11383
+ ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareListFilterAsPopup) &&
11323
11384
  (filterSearchParams === null || filterSearchParams === void 0 ? void 0 : filterSearchParams["search"]))
11324
11385
  flexFilterLength_1 += 1;
11325
11386
  var flexFilterIconBtn = function (mobile) {
@@ -11332,17 +11393,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11332
11393
  };
11333
11394
  // INFO: Desktop — PopUp (hidden on mobile)
11334
11395
  actionElementList.push(react_1.default.createElement("div", { className: "hidden md:block" },
11335
- 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, flexFilterPanelStructure, 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, {
11336
- darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode,
11337
- darkModeBg: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.darkModeBg,
11338
- }), 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 } })));
11396
+ react_1.default.createElement(popUp_1.PopUp, { darkMode: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.darkMode, ctaComp: flexFilterIconBtn(), renderComp: react_1.default.createElement(LazyContent, { render: function () {
11397
+ var _a, _b, _c, _d;
11398
+ return (0, flexFilter_1.renderFlexFilterPopupContent)(flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions_1, (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListFilterQuery, searchInput_1, (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListFilterAddComponent, undefined, {
11399
+ darkMode: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkMode,
11400
+ darkModeBg: (_d = props.organise) === null || _d === void 0 ? void 0 : _d.darkModeBg,
11401
+ });
11402
+ } }), anchor: "right", excludePortalIds: ["datepicker-portal", "select-portal"], lib: { Transition: (_w = props === null || props === void 0 ? void 0 : props.lib) === null || _w === void 0 ? void 0 : _w.Transition } })));
11339
11403
  // INFO: Mobile — IconButton that opens a Modal (hidden on desktop)
11340
11404
  actionElementList.push(react_1.default.createElement("div", { className: "block md:hidden" },
11341
- !((_4 = props.bareSettings) === null || _4 === void 0 ? void 0 : _4.bareListMobileFloatingSearch) &&
11405
+ !((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListMobileFloatingSearch) &&
11342
11406
  flexFilterIconBtn(true),
11343
- (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, 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, {
11344
- darkMode: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.darkMode,
11345
- darkModeBg: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkModeBg,
11407
+ (0, flexFilter_1.renderFlexFilterModal)(flexFilterModalOpen, flexFilters, flexFilterPanelStructure, devSettings, dbModule, flexFilterReferenceOptions, flexFilterReferenceSearch, flexActions_1, function () { return setFlexFilterModalOpen(false); }, (_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareListFilterQuery, searchInput_1, (_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareListFilterAddComponent, {
11408
+ darkMode: (_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.darkMode,
11409
+ darkModeBg: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkModeBg,
11346
11410
  })));
11347
11411
  }
11348
11412
  // INFO: bareUpdateActionBottom positions the read/update action bar. The list's own
@@ -11351,14 +11415,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11351
11415
  var actionBtns = renderActionButtons(resolvedType);
11352
11416
  if (actionBtns)
11353
11417
  actionElementList.push(actionBtns);
11354
- if (schemaPresent || ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.showExport)) {
11355
- 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 (
11418
+ if (schemaPresent || ((_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.showExport)) {
11419
+ actionElementList.push(react_1.default.createElement(popUp_1.PopUp, { darkMode: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.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: ((_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.darkMode) ? "bg-white/10" : "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
11356
11420
  //TODO: Bug - Crash on Next Js
11357
11421
  // <Menu.Item>
11358
11422
  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)
11359
11423
  // </Menu.Item>
11360
11424
  ); })), lib: {
11361
- Transition: (_12 = props === null || props === void 0 ? void 0 : props.lib) === null || _12 === void 0 ? void 0 : _12.Transition,
11425
+ Transition: (_5 = props === null || props === void 0 ? void 0 : props.lib) === null || _5 === void 0 ? void 0 : _5.Transition,
11362
11426
  } }));
11363
11427
  }
11364
11428
  if (actionElementList.length > 0) {
@@ -11536,6 +11600,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11536
11600
  // INFO: a two-line inbox row — the full field list moves behind the row's
11537
11601
  // arrow
11538
11602
  isCompactRow) {
11603
+ var _a, _b;
11539
11604
  var gridData = [];
11540
11605
  var isKanban = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "kanban";
11541
11606
  var isListEditable = canInlineUpdate;
@@ -11578,13 +11643,56 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11578
11643
  }
11579
11644
  return true;
11580
11645
  });
11646
+ // INFO: everything an item is built from apart from its own record; host
11647
+ // functions count as unchanged, as the table's rows count them
11648
+ var itemCacheKey = [
11649
+ type,
11650
+ imageTag,
11651
+ kanbanGroupId,
11652
+ useColumnName,
11653
+ isCompactRow,
11654
+ titleKey,
11655
+ isListEditable,
11656
+ visibleColumns.map(function (eachModel) { return (0, rowRendering_1.handleFingerprint)(eachModel); }).join("|"),
11657
+ booleanModels.map(function (eachModel) { return eachModel.id; }).join(","),
11658
+ booleanModels.length ? (0, rowRendering_1.handleGetIdentity)(kanbanChecked) : "",
11659
+ Object.keys((_a = props.bareSettings) !== null && _a !== void 0 ? _a : {})
11660
+ .sort()
11661
+ .map(function (eachKey) {
11662
+ return "".concat(eachKey, "=").concat((0, rowRendering_1.handleFingerprint)(props.bareSettings[eachKey]));
11663
+ })
11664
+ .join(","),
11665
+ (_b = props.organise) === null || _b === void 0 ? void 0 : _b.disableEllipsisOnLongWord,
11666
+ (0, rowRendering_1.handleFingerprint)(selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings),
11667
+ groupId,
11668
+ isCompactRow ? handleCheckGroupSectionTab() : "",
11669
+ ].join("|");
11670
+ var itemCache = gridItemCacheRef.current.get(itemCacheKey);
11671
+ if (!itemCache) {
11672
+ // INFO: a few settings are kept, so switching between two tabs reuses
11673
+ // both tabs' items
11674
+ if (gridItemCacheRef.current.size >= 4)
11675
+ gridItemCacheRef.current.clear();
11676
+ itemCache = new WeakMap();
11677
+ gridItemCacheRef.current.set(itemCacheKey, itemCache);
11678
+ }
11581
11679
  spaceTableData.forEach(function (eachData, index) {
11582
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11583
- var clonedEachData = JSON.parse(JSON.stringify(eachData));
11584
- var allValues = Object.values(clonedEachData);
11680
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
11681
+ var selectedTData = tableData[index];
11682
+ // INFO: the legacy kanban moves a dropped card by writing its lane onto
11683
+ // the item, so its items are built afresh on every draw as before
11684
+ var isItemCached = !!eachData &&
11685
+ typeof eachData === "object" &&
11686
+ !(isKanban && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW));
11687
+ var cachedItem = isItemCached ? itemCache.get(eachData) : undefined;
11688
+ if (cachedItem && cachedItem.raw === selectedTData) {
11689
+ gridData.push(cachedItem.data);
11690
+ return;
11691
+ }
11692
+ var allValues = Object.values(eachData);
11585
11693
  var title = "";
11586
11694
  if (allValues.length > 0) {
11587
- var renderedTitle = (0, readModule_1.renderEachRowDataBasedOnDataType)(titleKey, eachData[titleKey], props.bareSettings, true, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.disableEllipsisOnLongWord);
11695
+ var renderedTitle = (0, readModule_1.renderEachRowDataBasedOnDataType)(titleKey, eachData[titleKey], props.bareSettings, true, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.disableEllipsisOnLongWord);
11588
11696
  if (renderedTitle !== " - ")
11589
11697
  title = renderedTitle;
11590
11698
  }
@@ -11648,8 +11756,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11648
11756
  }, className: "border-primary-500 border-2 rounded focus:ring-gray-50" })));
11649
11757
  });
11650
11758
  }
11651
- var selectedTGroupData = tableData;
11652
- var selectedTData = selectedTGroupData[index];
11653
11759
  var data = {
11654
11760
  id: selectedTData["_id"] ? selectedTData["_id"] : selectedTData["id"],
11655
11761
  title: title,
@@ -11677,9 +11783,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11677
11783
  // INFO: a host that formats this date itself keeps its format
11678
11784
  trailing: !rowFields.dateKey
11679
11785
  ? undefined
11680
- : ((_c = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListDescription) === null || _c === void 0 ? void 0 : _c.call(_b, rowFields.dateKey, eachData[rowFields.dateKey]))
11786
+ : ((_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareListDescription) === null || _d === void 0 ? void 0 : _d.call(_c, rowFields.dateKey, eachData[rowFields.dateKey]))
11681
11787
  ? handleRenderField_1(rowFields.dateKey)
11682
- : (0, listRowFields_1.handleFormatListRowDate)((_d = selectedTData[rowFields.dateKey]) !== null && _d !== void 0 ? _d : eachData[rowFields.dateKey]),
11788
+ : (0, listRowFields_1.handleFormatListRowDate)((_e = selectedTData[rowFields.dateKey]) !== null && _e !== void 0 ? _e : eachData[rowFields.dateKey]),
11683
11789
  badge: rowFields.badgeKey
11684
11790
  ? handleRenderField_1(rowFields.badgeKey)
11685
11791
  : undefined,
@@ -11700,12 +11806,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11700
11806
  if (type === "kanban" && (laneSettings === null || laneSettings === void 0 ? void 0 : laneSettings.subGroupBy)) {
11701
11807
  data[laneSettings.subGroupBy] =
11702
11808
  selectedTData[laneSettings.subGroupBy];
11703
- data.subGroupLabel = (0, readModule_1.renderEachRowDataBasedOnDataType)(laneSettings.subGroupBy, eachData[laneSettings.subGroupBy], props.bareSettings, true, (_e = props.organise) === null || _e === void 0 ? void 0 : _e.disableEllipsisOnLongWord);
11809
+ data.subGroupLabel = (0, readModule_1.renderEachRowDataBasedOnDataType)(laneSettings.subGroupBy, eachData[laneSettings.subGroupBy], props.bareSettings, true, (_f = props.organise) === null || _f === void 0 ? void 0 : _f.disableEllipsisOnLongWord);
11704
11810
  }
11705
- var gridComponent = (_g = (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareListGridComponent) === null || _g === void 0 ? void 0 : _g.call(_f, eachData, selectedTData);
11811
+ var gridComponent = (_h = (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListGridComponent) === null || _h === void 0 ? void 0 : _h.call(_g, eachData, selectedTData);
11706
11812
  if (gridComponent)
11707
11813
  data[type === "grid" ? "extra" : "action"] = gridComponent;
11708
- var eachDataTags = (_j = (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListGridTags) === null || _j === void 0 ? void 0 : _j.call(_h, eachData, selectedTData);
11814
+ var eachDataTags = (_k = (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareListGridTags) === null || _k === void 0 ? void 0 : _k.call(_j, eachData, selectedTData);
11709
11815
  if (eachDataTags) {
11710
11816
  if (Array.isArray(eachDataTags)) {
11711
11817
  var gridTagList_1 = [];
@@ -11718,12 +11824,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11718
11824
  data["tags"] = gridTagList_1;
11719
11825
  }
11720
11826
  }
11721
- var ribbonText = (_l = (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListGridRibbonText) === null || _l === void 0 ? void 0 : _l.call(_k, eachData, selectedTData);
11827
+ var ribbonText = (_m = (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListGridRibbonText) === null || _m === void 0 ? void 0 : _m.call(_l, eachData, selectedTData);
11722
11828
  if (ribbonText)
11723
11829
  data["ribbonText"] = ribbonText;
11724
11830
  var eachDataGridImage = "";
11725
- var gridFallbackImg = (_o = (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListGridFallbackImg) === null || _o === void 0 ? void 0 : _o.call(_m, eachData, selectedTData);
11726
- var cellImageSrc = (0, utils_1.handleGetRenderedImageSrc)(clonedEachData[imageTag]);
11831
+ var gridFallbackImg = (_p = (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListGridFallbackImg) === null || _p === void 0 ? void 0 : _p.call(_o, eachData, selectedTData);
11832
+ var cellImageSrc = (0, utils_1.handleGetRenderedImageSrc)(eachData[imageTag]);
11727
11833
  if (cellImageSrc) {
11728
11834
  eachDataGridImage = cellImageSrc;
11729
11835
  }
@@ -11739,8 +11845,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11739
11845
  data["imageUrl"] = eachDataGridImage;
11740
11846
  }
11741
11847
  else {
11742
- data["img"] = (0, utils_1.handleGetRenderedImageSrc)(clonedEachData[imageTag]);
11848
+ data["img"] = (0, utils_1.handleGetRenderedImageSrc)(eachData[imageTag]);
11743
11849
  }
11850
+ if (isItemCached)
11851
+ itemCache.set(eachData, { raw: selectedTData, data: data });
11744
11852
  gridData.push(data);
11745
11853
  });
11746
11854
  return gridData;
@@ -11762,6 +11870,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11762
11870
  var paginationType = renderResolvedPaginationType();
11763
11871
  if (paginationType !== "scroll" && paginationType !== "page")
11764
11872
  return false;
11873
+ if ((selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "kanban")
11874
+ return handleCheckKanbanLanePaging();
11765
11875
  if (!groupId || isFirebase)
11766
11876
  return false;
11767
11877
  // INFO: a formula sort or filter needs every row read and ordered at
@@ -11792,6 +11902,44 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
11792
11902
  (groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.type) === "boolean") &&
11793
11903
  !!((_d = (0, groupSections_1.handleGetGroupOptions)(groupAttributeDS)) === null || _d === void 0 ? void 0 : _d.length));
11794
11904
  };
11905
+ // INFO: a kanban's lanes are its column's options, so each lane pages itself
11906
+ // through the same band reads as a table group, always by scroll — a board
11907
+ // has no room for a pager per lane. A lane joining several values (a
11908
+ // cluster) or a lane per linked record keeps the single board read.
11909
+ var handleCheckKanbanLanePaging = function () {
11910
+ var _a, _b, _c, _d, _e, _f;
11911
+ if ((selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) !== "kanban")
11912
+ return false;
11913
+ if (!((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW) || isFirebase || isFormulaView)
11914
+ return false;
11915
+ if ((_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.unionCollections) === null || _c === void 0 ? void 0 : _c.length)
11916
+ return false;
11917
+ if ((_e = (_d = selectedTab.kanbanSettings) === null || _d === void 0 ? void 0 : _d.groupCluster) === null || _e === void 0 ? void 0 : _e.length)
11918
+ return false;
11919
+ var laneColumn = handleGetKanbanLaneColumn();
11920
+ return ((laneColumn === null || laneColumn === void 0 ? void 0 : laneColumn.type) === "list" && !!((_f = (0, groupSections_1.handleGetGroupOptions)(laneColumn)) === null || _f === void 0 ? void 0 : _f.length));
11921
+ };
11922
+ var handleGetKanbanLaneColumn = function () {
11923
+ var _a;
11924
+ var laneId = (_a = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings) === null || _a === void 0 ? void 0 : _a.title;
11925
+ if (!laneId)
11926
+ return undefined;
11927
+ return displayStructure.find(function (eachDS) { return eachDS.id === laneId; });
11928
+ };
11929
+ // INFO: the column the bands page by — the kanban's lane column on a kanban
11930
+ // tab, the list's group-by column everywhere else
11931
+ var handleGetPagedGroupColumn = function () {
11932
+ return (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "kanban"
11933
+ ? handleGetKanbanLaneColumn()
11934
+ : handleGetGroupColumn();
11935
+ };
11936
+ var handleGetPagedGroupOptions = function () {
11937
+ return (0, groupSections_1.handleGetGroupOptions)(handleGetPagedGroupColumn(), props.devSettings.organisationMembers);
11938
+ };
11939
+ // INFO: bands load by scroll in scroll mode, and kanban lanes in every mode
11940
+ var renderCheckGroupScroll = function () {
11941
+ return renderCheckScrollMode() || handleCheckKanbanLanePaging();
11942
+ };
11795
11943
  // INFO: a list or grid tab draws the table's group sections, unless the
11796
11944
  // host replaces it with its own list component
11797
11945
  var handleCheckGroupSectionTab = function () {
@@ -12496,7 +12644,42 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12496
12644
  }); };
12497
12645
  // INFO: a row's section under per-group paging
12498
12646
  var handleResolveGroupKey = function (row) {
12499
- return (0, groupSections_1.handleGetGroupKey)(handleGetGroupColumn(), groupId ? row === null || row === void 0 ? void 0 : row[groupId] : undefined, handleGetGroupColumnOptions(), isFirebase);
12647
+ var column = handleGetPagedGroupColumn();
12648
+ return (0, groupSections_1.handleGetGroupKey)(column, column ? row === null || row === void 0 ? void 0 : row[column.id] : undefined, handleGetPagedGroupOptions(), isFirebase);
12649
+ };
12650
+ // INFO: the rows of one band already loaded. A kanban's lanes are not table
12651
+ // sections, so they are counted from the rows themselves
12652
+ var handleCountLoadedGroupRows = function (groupKey) {
12653
+ var _a, _b, _c;
12654
+ if (handleCheckKanbanLanePaging())
12655
+ return tableDataRef.current.filter(function (eachRow) { return handleResolveGroupKey(eachRow) === groupKey; }).length;
12656
+ return ((_c = (_b = ((_a = handleBuildNewTableGroups()) !== null && _a !== void 0 ? _a : []).find(function (eachGroup) { return eachGroup.id === groupKey; })) === null || _b === void 0 ? void 0 : _b.rowIds.length) !== null && _c !== void 0 ? _c : 0);
12657
+ };
12658
+ // INFO: a kanban lane's band — an option's lane is its own, Unassigned is No
12659
+ // Value, and a lane per value outside the options belongs to Unknown
12660
+ var handleGetKanbanLaneKey = function (laneId) {
12661
+ var _a;
12662
+ if (laneId === newKanban_1.NEW_KANBAN_UNASSIGNED_ID)
12663
+ return groupSections_1.GROUP_EMPTY_KEY;
12664
+ var isOption = ((_a = handleGetPagedGroupOptions()) !== null && _a !== void 0 ? _a : []).some(function (eachOption) { return eachOption.key === laneId; });
12665
+ return isOption ? laneId : groupSections_1.GROUP_UNKNOWN_KEY;
12666
+ };
12667
+ var handleGetKanbanLaneStatus = function (laneId) {
12668
+ var _a;
12669
+ var groupKey = handleGetKanbanLaneKey(laneId);
12670
+ var state = groupPageState[groupKey];
12671
+ // INFO: the board's first read held every row, so no lane has more
12672
+ var isListLoaded = !tableLoading && tableData.length >= size;
12673
+ return {
12674
+ // INFO: Unknown is read as one band shared by several lanes, so its
12675
+ // total is no single lane's
12676
+ count: (state === null || state === void 0 ? void 0 : state.fetched) && groupKey !== groupSections_1.GROUP_UNKNOWN_KEY
12677
+ ? state.size
12678
+ : undefined,
12679
+ loadingMore: state === null || state === void 0 ? void 0 : state.loadingMore,
12680
+ exhausted: (_a = state === null || state === void 0 ? void 0 : state.exhausted) !== null && _a !== void 0 ? _a : isListLoaded,
12681
+ readId: groupPagingGenRef.current,
12682
+ };
12500
12683
  };
12501
12684
  var handleSetGroupPageState = function (groupKey, state) {
12502
12685
  return setGroupPageState(function (previous) {
@@ -12516,59 +12699,66 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12516
12699
  // sort the main read uses, scoped to that group, and runs it through the
12517
12700
  // same prettifier so its rows carry the shape of every other row. Returns
12518
12701
  // undefined when the list was re-read while the page was in flight.
12519
- var handleReadGroupPage = function (groupKey, cursor) { return __awaiter(void 0, void 0, void 0, function () {
12520
- var generation, groupAttributeDS, groupQuery, mainCond, sectionQuery, responseData, rawRows, count, prettierRows;
12521
- var _a, _b, _c, _d, _e, _f, _g, _h;
12522
- return __generator(this, function (_j) {
12523
- switch (_j.label) {
12524
- case 0:
12525
- generation = groupPagingGenRef.current;
12526
- groupAttributeDS = handleGetGroupColumn();
12527
- if (!groupAttributeDS)
12528
- return [2 /*return*/, undefined];
12529
- groupQuery = (0, groupSections_1.handleGetGroupSectionQuery)(groupAttributeDS, groupKey, (_a = handleGetGroupColumnOptions()) !== null && _a !== void 0 ? _a : []);
12530
- mainCond = handleReadQueryHocCond();
12531
- sectionQuery = (0, groupSections_1.handleScopeSectionQuery)(groupQuery, (_b = mainCond.query) !== null && _b !== void 0 ? _b : []);
12532
- // INFO: the list's own filters leave this section no rows
12533
- if (!sectionQuery)
12534
- return [2 /*return*/, { rawRows: [], prettierRows: [], count: 0 }];
12535
- return [4 /*yield*/, readServerQuery.call(__assign(__assign({}, mainCond), { query: sectionQuery, cursor: cursor, limit: limit, stopLimit: undefined, skip: 0 }))];
12536
- case 1:
12537
- responseData = _j.sent();
12538
- if (generation !== groupPagingGenRef.current)
12539
- return [2 /*return*/, undefined];
12540
- rawRows = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.data) !== null && _c !== void 0 ? _c : [];
12541
- count = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.count) !== null && _d !== void 0 ? _d : 0;
12542
- prettierRows = [];
12543
- if (!(rawRows.length > 0)) return [3 /*break*/, 3];
12544
- return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(rawRows, props.devSettings, (_e = props.lib) === null || _e === void 0 ? void 0 : _e.axios, displayStructure, (_f = props.organise) === null || _f === void 0 ? void 0 : _f.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_g = props.edit) === null || _g === void 0 ? void 0 : _g.activityLog : undefined, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
12545
- case 2:
12546
- prettierRows = _j.sent();
12547
- rawRows.forEach(function (eachData) {
12548
- // INFO: normalise _id -> id to match the shape the main list carries
12549
- if (eachData["_id"]) {
12550
- eachData["id"] = eachData["_id"];
12551
- delete eachData["_id"];
12552
- }
12553
- });
12554
- _j.label = 3;
12555
- case 3:
12556
- if (generation !== groupPagingGenRef.current)
12557
- return [2 /*return*/, undefined];
12558
- return [2 /*return*/, { rawRows: rawRows, prettierRows: prettierRows, count: count }];
12559
- }
12702
+ var handleReadGroupPage = function (groupKey_1, cursor_2) {
12703
+ var args_1 = [];
12704
+ for (var _i = 2; _i < arguments.length; _i++) {
12705
+ args_1[_i - 2] = arguments[_i];
12706
+ }
12707
+ return __awaiter(void 0, __spreadArray([groupKey_1, cursor_2], args_1, true), void 0, function (groupKey, cursor, pageLimit) {
12708
+ var generation, groupAttributeDS, groupQuery, mainCond, sectionQuery, responseData, rawRows, count, prettierRows;
12709
+ var _a, _b, _c, _d, _e, _f, _g, _h;
12710
+ if (pageLimit === void 0) { pageLimit = limit; }
12711
+ return __generator(this, function (_j) {
12712
+ switch (_j.label) {
12713
+ case 0:
12714
+ generation = groupPagingGenRef.current;
12715
+ groupAttributeDS = handleGetPagedGroupColumn();
12716
+ if (!groupAttributeDS)
12717
+ return [2 /*return*/, undefined];
12718
+ groupQuery = (0, groupSections_1.handleGetGroupSectionQuery)(groupAttributeDS, groupKey, (_a = handleGetPagedGroupOptions()) !== null && _a !== void 0 ? _a : []);
12719
+ mainCond = handleReadQueryHocCond();
12720
+ sectionQuery = (0, groupSections_1.handleScopeSectionQuery)(groupQuery, (_b = mainCond.query) !== null && _b !== void 0 ? _b : []);
12721
+ // INFO: the list's own filters leave this section no rows
12722
+ if (!sectionQuery)
12723
+ return [2 /*return*/, { rawRows: [], prettierRows: [], count: 0 }];
12724
+ return [4 /*yield*/, readServerQuery.call(__assign(__assign({}, mainCond), { query: sectionQuery, cursor: cursor, limit: pageLimit, stopLimit: undefined, skip: 0 }))];
12725
+ case 1:
12726
+ responseData = _j.sent();
12727
+ if (generation !== groupPagingGenRef.current)
12728
+ return [2 /*return*/, undefined];
12729
+ rawRows = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.data) !== null && _c !== void 0 ? _c : [];
12730
+ count = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.count) !== null && _d !== void 0 ? _d : 0;
12731
+ prettierRows = [];
12732
+ if (!(rawRows.length > 0)) return [3 /*break*/, 3];
12733
+ return [4 /*yield*/, (0, listModule_1.handleListDataBasedOnModel)(rawRows, props.devSettings, (_e = props.lib) === null || _e === void 0 ? void 0 : _e.axios, displayStructure, (_f = props.organise) === null || _f === void 0 ? void 0 : _f.handleNavigate, setActivityModal, setActivityId, isActivityLog ? (_g = props.edit) === null || _g === void 0 ? void 0 : _g.activityLog : undefined, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListActionBtns, !canUpdateRecord, undefined, handleSeedListReferenceOptions, isDateWarnings)];
12734
+ case 2:
12735
+ prettierRows = _j.sent();
12736
+ rawRows.forEach(function (eachData) {
12737
+ // INFO: normalise _id -> id to match the shape the main list carries
12738
+ if (eachData["_id"]) {
12739
+ eachData["id"] = eachData["_id"];
12740
+ delete eachData["_id"];
12741
+ }
12742
+ });
12743
+ _j.label = 3;
12744
+ case 3:
12745
+ if (generation !== groupPagingGenRef.current)
12746
+ return [2 /*return*/, undefined];
12747
+ return [2 /*return*/, { rawRows: rawRows, prettierRows: prettierRows, count: count }];
12748
+ }
12749
+ });
12560
12750
  });
12561
- }); };
12751
+ };
12562
12752
  // INFO: scroll mode — appends the NEXT page of ONE group to the shared flat
12563
12753
  // tableData / spaceTableData, so handleBuildNewTableGroups() keeps building
12564
12754
  // bands from one source; each group advances its own cursor
12565
12755
  var handleFetchGroupNextPage = function (groupKey) { return __awaiter(void 0, void 0, void 0, function () {
12566
- var current, groupSize, cursor, generation, page_1, existingIds_1, appendRaw_1, appendPretty_1, nextCursor, err_36, nextKey;
12567
- var _a, _b, _c, _d, _e, _f, _g;
12568
- return __generator(this, function (_h) {
12569
- switch (_h.label) {
12756
+ var current, groupSize, cursor, generation, page, err_36, nextKey;
12757
+ var _a;
12758
+ return __generator(this, function (_b) {
12759
+ switch (_b.label) {
12570
12760
  case 0:
12571
- if (!renderCheckGroupPaging() || !renderCheckScrollMode())
12761
+ if (!renderCheckGroupPaging() || !renderCheckGroupScroll())
12572
12762
  return [2 /*return*/];
12573
12763
  current = groupPageStateRef.current[groupKey];
12574
12764
  if ((current === null || current === void 0 ? void 0 : current.loadingMore) || (current === null || current === void 0 ? void 0 : current.exhausted))
@@ -12579,7 +12769,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12579
12769
  !tableLoading &&
12580
12770
  size > 0 &&
12581
12771
  tableDataRef.current.length >= size) {
12582
- groupSize = (_c = (_b = ((_a = handleBuildNewTableGroups()) !== null && _a !== void 0 ? _a : []).find(function (eachGroup) { return eachGroup.id === groupKey; })) === null || _b === void 0 ? void 0 : _b.rowIds.length) !== null && _c !== void 0 ? _c : 0;
12772
+ groupSize = handleCountLoadedGroupRows(groupKey);
12583
12773
  handleSetGroupPageState(groupKey, {
12584
12774
  cursor: groupSize,
12585
12775
  size: groupSize,
@@ -12595,39 +12785,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12595
12785
  return [2 /*return*/];
12596
12786
  }
12597
12787
  groupLoadingKeyRef.current = groupKey;
12598
- cursor = (_g = (_d = current === null || current === void 0 ? void 0 : current.cursor) !== null && _d !== void 0 ? _d : (_f = ((_e = handleBuildNewTableGroups()) !== null && _e !== void 0 ? _e : []).find(function (eachGroup) { return eachGroup.id === groupKey; })) === null || _f === void 0 ? void 0 : _f.rowIds.length) !== null && _g !== void 0 ? _g : 0;
12788
+ cursor = (_a = current === null || current === void 0 ? void 0 : current.cursor) !== null && _a !== void 0 ? _a : handleCountLoadedGroupRows(groupKey);
12599
12789
  generation = groupPagingGenRef.current;
12600
12790
  handleSetGroupPageState(groupKey, { cursor: cursor, loadingMore: true });
12601
- _h.label = 1;
12791
+ _b.label = 1;
12602
12792
  case 1:
12603
- _h.trys.push([1, 3, 4, 5]);
12793
+ _b.trys.push([1, 3, 4, 5]);
12604
12794
  return [4 /*yield*/, handleReadGroupPage(groupKey, cursor)];
12605
12795
  case 2:
12606
- page_1 = _h.sent();
12607
- if (!page_1)
12796
+ page = _b.sent();
12797
+ if (!page)
12608
12798
  return [2 /*return*/];
12609
- existingIds_1 = new Set(tableDataRef.current.map(function (eachRow) { var _a; return (_a = eachRow.id) !== null && _a !== void 0 ? _a : eachRow._id; }));
12610
- appendRaw_1 = [];
12611
- appendPretty_1 = [];
12612
- page_1.rawRows.forEach(function (eachRow, eachIndex) {
12613
- var _a;
12614
- if (existingIds_1.has((_a = eachRow.id) !== null && _a !== void 0 ? _a : eachRow._id))
12615
- return;
12616
- appendRaw_1.push(eachRow);
12617
- appendPretty_1.push(page_1.prettierRows[eachIndex]);
12618
- });
12619
- handleSetListData(tableDataRef.current.concat(appendRaw_1), spaceTableDataRef.current.concat(appendPretty_1));
12620
- nextCursor = cursor + page_1.rawRows.length;
12621
- handleSetGroupPageState(groupKey, {
12622
- cursor: nextCursor,
12623
- size: page_1.count,
12624
- loadingMore: false,
12625
- fetched: true,
12626
- exhausted: page_1.rawRows.length === 0 || nextCursor >= page_1.count,
12627
- });
12799
+ handleAppendGroupPage(groupKey, cursor, page);
12628
12800
  return [3 /*break*/, 5];
12629
12801
  case 3:
12630
- err_36 = _h.sent();
12802
+ err_36 = _b.sent();
12631
12803
  if (generation !== groupPagingGenRef.current)
12632
12804
  return [2 /*return*/];
12633
12805
  // INFO: clear the in-flight flag so a failed page can be retried on the
@@ -12649,14 +12821,120 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12649
12821
  });
12650
12822
  }); };
12651
12823
  handleFetchGroupNextPageRef.current = handleFetchGroupNextPage;
12824
+ // INFO: appends one band page read from `cursor` to the shared flat rows and
12825
+ // moves that band on past it
12826
+ var handleAppendGroupPage = function (groupKey, cursor, page) {
12827
+ // INFO: append only rows not already present, keeping tableData and
12828
+ // spaceTableData positionally identical
12829
+ var existingIds = new Set(tableDataRef.current.map(function (eachRow) { var _a; return (_a = eachRow.id) !== null && _a !== void 0 ? _a : eachRow._id; }));
12830
+ var appendRaw = [];
12831
+ var appendPretty = [];
12832
+ page.rawRows.forEach(function (eachRow, eachIndex) {
12833
+ var _a;
12834
+ if (existingIds.has((_a = eachRow.id) !== null && _a !== void 0 ? _a : eachRow._id))
12835
+ return;
12836
+ appendRaw.push(eachRow);
12837
+ appendPretty.push(page.prettierRows[eachIndex]);
12838
+ });
12839
+ handleSetListData(tableDataRef.current.concat(appendRaw), spaceTableDataRef.current.concat(appendPretty));
12840
+ var nextCursor = cursor + page.rawRows.length;
12841
+ handleSetGroupPageState(groupKey, {
12842
+ cursor: nextCursor,
12843
+ size: page.count,
12844
+ loadingMore: false,
12845
+ fetched: true,
12846
+ exhausted: page.rawRows.length === 0 || nextCursor >= page.count,
12847
+ });
12848
+ };
12849
+ // INFO: the cards each kanban lane holds, by encoded band key, kept with the
12850
+ // scroll position when a card is opened
12851
+ var handleGetKanbanLaneRows = function () {
12852
+ var laneRows = {};
12853
+ tableDataRef.current.forEach(function (eachRow) {
12854
+ var _a;
12855
+ var laneKey = (0, viewStatePersistence_1.handleEncodeLaneKey)(handleResolveGroupKey(eachRow));
12856
+ laneRows[laneKey] = ((_a = laneRows[laneKey]) !== null && _a !== void 0 ? _a : 0) + 1;
12857
+ });
12858
+ return laneRows;
12859
+ };
12860
+ // INFO: on a return to the board, reads each lane from the cards the first
12861
+ // read gave it back to the cards it held, plus a page in case the opened
12862
+ // card moved down, then restores the position again — the first restore
12863
+ // ran on the board's first page, where a deep card was not yet drawn. Lane
12864
+ // sentinels wait behind it. A fresh read while it runs drops the pages and
12865
+ // leaves the catch-up for the next first read
12866
+ var handleCatchUpKanbanLanes = function () { return __awaiter(void 0, void 0, void 0, function () {
12867
+ var savedLaneRows, generation, isComplete, _i, _a, _b, laneKey, savedRows, groupKey, loaded, target, page, err_37, nextKey;
12868
+ return __generator(this, function (_c) {
12869
+ switch (_c.label) {
12870
+ case 0:
12871
+ savedLaneRows = laneCatchUpRef.current;
12872
+ if (!savedLaneRows || groupLoadingKeyRef.current)
12873
+ return [2 /*return*/];
12874
+ laneCatchUpRunningRef.current = true;
12875
+ generation = groupPagingGenRef.current;
12876
+ groupLoadingKeyRef.current = KANBAN_LANE_CATCH_UP_KEY;
12877
+ isComplete = true;
12878
+ _i = 0, _a = Object.entries(savedLaneRows);
12879
+ _c.label = 1;
12880
+ case 1:
12881
+ if (!(_i < _a.length)) return [3 /*break*/, 6];
12882
+ _b = _a[_i], laneKey = _b[0], savedRows = _b[1];
12883
+ groupKey = (0, viewStatePersistence_1.handleDecodeLaneKey)(laneKey);
12884
+ loaded = handleCountLoadedGroupRows(groupKey);
12885
+ target = Math.min(savedRows + limit, viewStatePersistence_1.SCROLL_RESTORE_MAX_ROWS);
12886
+ if (target <= loaded)
12887
+ return [3 /*break*/, 5];
12888
+ handleSetGroupPageState(groupKey, { cursor: loaded, loadingMore: true });
12889
+ _c.label = 2;
12890
+ case 2:
12891
+ _c.trys.push([2, 4, , 5]);
12892
+ return [4 /*yield*/, handleReadGroupPage(groupKey, loaded, target - loaded)];
12893
+ case 3:
12894
+ page = _c.sent();
12895
+ if (!page) {
12896
+ isComplete = false;
12897
+ return [3 /*break*/, 6];
12898
+ }
12899
+ handleAppendGroupPage(groupKey, loaded, page);
12900
+ return [3 /*break*/, 5];
12901
+ case 4:
12902
+ err_37 = _c.sent();
12903
+ if (generation !== groupPagingGenRef.current) {
12904
+ isComplete = false;
12905
+ return [3 /*break*/, 6];
12906
+ }
12907
+ // INFO: the lane pages on by scroll from what it has
12908
+ handleSetGroupPageState(groupKey, { loadingMore: false });
12909
+ return [3 /*break*/, 5];
12910
+ case 5:
12911
+ _i++;
12912
+ return [3 /*break*/, 1];
12913
+ case 6:
12914
+ laneCatchUpRunningRef.current = false;
12915
+ // INFO: a fresh read already emptied the queue for the new list
12916
+ if (!isComplete || generation !== groupPagingGenRef.current)
12917
+ return [2 /*return*/];
12918
+ laneCatchUpRef.current = null;
12919
+ groupLoadingKeyRef.current = null;
12920
+ requestAnimationFrame(function () {
12921
+ return (0, viewStatePersistence_1.handleRestoreScrollPosition)(scrollCaptureRef.current, handleResolveScrollAxis(), handleResolveScrollScope());
12922
+ });
12923
+ nextKey = groupLoadQueueRef.current.shift();
12924
+ if (nextKey)
12925
+ handleFetchGroupNextPageRef.current(nextKey);
12926
+ return [2 /*return*/];
12927
+ }
12928
+ });
12929
+ }); };
12652
12930
  // INFO: page mode — swaps ONE group's rows for its page `page`; every other
12653
12931
  // group keeps the page it is on
12654
12932
  var handleFetchGroupPage = function (groupKey, page) { return __awaiter(void 0, void 0, void 0, function () {
12655
- var generation, result, keptRaw_1, keptPretty_1, loaded, err_37;
12933
+ var generation, result, keptRaw_1, keptPretty_1, loaded, err_38;
12656
12934
  return __generator(this, function (_a) {
12657
12935
  switch (_a.label) {
12658
12936
  case 0:
12659
- if (!renderCheckGroupPaging() || renderCheckScrollMode())
12937
+ if (!renderCheckGroupPaging() || renderCheckGroupScroll())
12660
12938
  return [2 /*return*/];
12661
12939
  generation = groupPagingGenRef.current;
12662
12940
  handleSetGroupPageState(groupKey, { loadingMore: true });
@@ -12688,7 +12966,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12688
12966
  });
12689
12967
  return [3 /*break*/, 4];
12690
12968
  case 3:
12691
- err_37 = _a.sent();
12969
+ err_38 = _a.sent();
12692
12970
  if (generation !== groupPagingGenRef.current)
12693
12971
  return [2 /*return*/];
12694
12972
  handleSetGroupPageState(groupKey, { loadingMore: false });
@@ -12699,6 +12977,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
12699
12977
  }); };
12700
12978
  // INFO: page mode — after each fresh read every band reads its own first
12701
12979
  // page, so each shows its real total and pages on its own
12980
+ var handleResetGroupPaging = function () {
12981
+ groupPagingGenRef.current += 1;
12982
+ groupLoadingKeyRef.current = null;
12983
+ groupLoadQueueRef.current = [];
12984
+ groupPageStateRef.current = {};
12985
+ setGroupPageState({});
12986
+ };
12702
12987
  var handleLoadGroupFirstPages = function () {
12703
12988
  var _a;
12704
12989
  groupPagingGenRef.current += 1;
@@ -13674,6 +13959,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13674
13959
  var renderEventAvailabilities = function () {
13675
13960
  var eventAvailabilities = [];
13676
13961
  if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.startDate) {
13962
+ // INFO: read once for the view rather than per row — each look-up
13963
+ // walks the whole schema
13964
+ var startDateFormat = handleFindColumnDateFormat(calendarSettings_1.startDate);
13965
+ var endDateFormat = calendarSettings_1.endDate
13966
+ ? handleFindColumnDateFormat(calendarSettings_1.endDate)
13967
+ : undefined;
13677
13968
  for (var _i = 0, spaceTableData_1 = spaceTableData; _i < spaceTableData_1.length; _i++) {
13678
13969
  var eachData = spaceTableData_1[_i];
13679
13970
  var rawStart = (0, timelineBars_1.handleReadDateText)(eachData[calendarSettings_1.startDate]);
@@ -13684,15 +13975,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13684
13975
  // one row without a date must not hide every row after it
13685
13976
  if (!rawStart)
13686
13977
  continue;
13687
- else if (!(0, dateFormat_1.handleParseListDate)(rawStart, handleFindColumnDateFormat(calendarSettings_1.startDate)).isValid()) {
13978
+ var startDate = (0, dateFormat_1.handleParseListDate)(rawStart, startDateFormat);
13979
+ if (!startDate.isValid()) {
13688
13980
  continue;
13689
13981
  }
13690
13982
  else {
13691
13983
  var id = eachData.id;
13692
13984
  var title = (0, readModule_1.handleCutPreviewText)(eachData[calendarSettings_1.title]);
13693
- var startDate = (0, dateFormat_1.handleParseListDate)(rawStart, handleFindColumnDateFormat(calendarSettings_1.startDate));
13694
13985
  var endDate = calendarSettings_1.endDate && rawEnd
13695
- ? (0, dateFormat_1.handleParseListDate)(rawEnd, handleFindColumnDateFormat(calendarSettings_1.endDate))
13986
+ ? (0, dateFormat_1.handleParseListDate)(rawEnd, endDateFormat)
13696
13987
  : startDate;
13697
13988
  var eventAvailability = {
13698
13989
  id: id,
@@ -13749,6 +14040,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13749
14040
  };
13750
14041
  // INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
13751
14042
  if ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareNewDTW) {
14043
+ // INFO: each event's unformatted row by id, found in one pass — a
14044
+ // search of every row for every event froze a busy month. The first
14045
+ // row holding an id keeps it, as the search found
14046
+ var rawRowById_1 = new Map();
14047
+ tableData.forEach(function (eachRow) {
14048
+ [eachRow === null || eachRow === void 0 ? void 0 : eachRow[serverId], eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, eachRow === null || eachRow === void 0 ? void 0 : eachRow.id].forEach(function (eachId) {
14049
+ if (eachId === undefined)
14050
+ return;
14051
+ var key = String(eachId);
14052
+ if (!rawRowById_1.has(key))
14053
+ rawRowById_1.set(key, eachRow);
14054
+ });
14055
+ });
13752
14056
  var mappedCalendarEvents = renderEventAvailabilities().map(function (ev) {
13753
14057
  var _a, _b, _c, _d;
13754
14058
  return ({
@@ -13765,13 +14069,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13765
14069
  date: ev.date,
13766
14070
  // INFO: the unformatted row, so a tap handler can tell which
13767
14071
  // collection a union event came from
13768
- meta: {
13769
- rawData: tableData.find(function (eachRow) {
13770
- return [eachRow === null || eachRow === void 0 ? void 0 : eachRow[serverId], eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, eachRow === null || eachRow === void 0 ? void 0 : eachRow.id].some(function (eachId) {
13771
- return eachId !== undefined && String(eachId) === String(ev.id);
13772
- });
13773
- }),
13774
- },
14072
+ meta: { rawData: rawRowById_1.get(String(ev.id)) },
13775
14073
  });
13776
14074
  });
13777
14075
  // INFO: lets the app reshape the fetched events — e.g. expand one
@@ -13940,10 +14238,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13940
14238
  return timelineGroupId_1 ? (0, timelineBars_1.handleOrderByGroup)(tasks) : tasks;
13941
14239
  };
13942
14240
  var timelineTasks = renderTimelineTasks();
13943
- // INFO: parallel hex list for Apex distributed bars — one colour per
13944
- // task, in the same order; undefined falls back to the chart default
13945
- var timelinePrimary_1 = timelinePrimaryColour;
13946
- var timelineColors = timelineTasks.map(function (eachTask) { var _a; return (_a = eachTask.color) !== null && _a !== void 0 ? _a : timelinePrimary_1; });
13947
14241
  var timelineWindow_1 = (0, timelineBars_1.handleGetTimelineWindow)(timelineRange.unit, timelineRange.anchor);
13948
14242
  var handleChangeTimelineRange_1 = function (next) {
13949
14243
  setTimelineRange(next);
@@ -13978,11 +14272,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
13978
14272
  // INFO: a row per record at a readable height, scrolling past a
13979
14273
  // screen rather than squeezing every bar into a fixed chart
13980
14274
  react_1.default.createElement("div", { "data-testid": "dtw-timeline-scroll", className: "max-h-[70vh] overflow-y-auto" },
13981
- react_1.default.createElement(ganttChart_1.GanttChart, { title: typeof props.title === "string" ? props.title : "Timeline", tasks: timelineTasks, colors: timelineColors, chartOnly: true, chartSize: (0, timelineBars_1.handleGetTimelineHeight)(timelineTasks.length), rangeStart: handleCheckTimelineWindow(timelineSettings_1)
14275
+ react_1.default.createElement(newTimeline_1.NewTimeline, { tasks: timelineTasks, barColor: timelinePrimaryColour, rangeStart: handleCheckTimelineWindow(timelineSettings_1)
13982
14276
  ? timelineWindow_1.start
13983
14277
  : undefined, rangeEnd: handleCheckTimelineWindow(timelineSettings_1)
13984
14278
  ? timelineWindow_1.end
13985
- : undefined, axisOnTop: true, barLabelColor: "#ffffff", darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, onClick: function (taskId) {
14279
+ : undefined, darkMode: (_41 = props.organise) === null || _41 === void 0 ? void 0 : _41.darkMode, onClick: function (taskId) {
13986
14280
  var _a, _b;
13987
14281
  if (taskId)
13988
14282
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", taskId, "general");
@@ -14233,6 +14527,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14233
14527
  var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
14234
14528
  // INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
14235
14529
  if ((_57 = props.bareSettings) === null || _57 === void 0 ? void 0 : _57.bareNewDTW) {
14530
+ var isLanePaging = renderCheckGroupPaging();
14236
14531
  return (
14237
14532
  // INFO: the same top spacing as the table, list and grid
14238
14533
  react_1.default.createElement("div", { className: "mt-5" },
@@ -14250,9 +14545,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
14250
14545
  .filter(function (_a) {
14251
14546
  var width = _a[1];
14252
14547
  return Number.isFinite(width);
14253
- })), onResizeLane: handleResizeLane, data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
14548
+ })), onResizeLane: handleResizeLane, data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: !isLanePaging && kanbanData.length === limit
14254
14549
  ? "Data has exceeded limit, please apply filters"
14255
- : "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, sortBy: (kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.sortBy)
14550
+ : "", onColumnLoadMore: isLanePaging
14551
+ ? function (laneId) {
14552
+ return handleFetchGroupNextPage(handleGetKanbanLaneKey(laneId));
14553
+ }
14554
+ : undefined, getColumnStatus: isLanePaging ? handleGetKanbanLaneStatus : undefined, groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, sortBy: (kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.sortBy)
14256
14555
  ? {
14257
14556
  id: kanbanSettings.sortBy,
14258
14557
  type: kanbanSettings.sortType,